当前位置: 首页>>代码示例>>PHP>>正文


PHP Assets\asset_path函数代码示例

本文整理汇总了PHP中Roots\Sage\Assets\asset_path函数的典型用法代码示例。如果您正苦于以下问题:PHP asset_path函数的具体用法?PHP asset_path怎么用?PHP asset_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了asset_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('roboto/material', '//fonts.googleapis.com/css?family=Material+Icons|Roboto+Slab|Roboto:400,500,300,700', false, null);
    //  wp_enqueue_style('roboto/font', '//fonts.googleapis.com/css?family=Roboto+Slab:400,700,300|Roboto:400,500,700,900,300', false, null );
    //  wp_enqueue_style('material/font', '//fonts.googleapis.com/icon?family=Material+Icons', false, null );
    wp_enqueue_style('blueprint/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('blueprint/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
开发者ID:jbradach,项目名称:blueprint-wp,代码行数:14,代码来源:setup.php

示例2: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('google_fonts', '//fonts.googleapis.com/css?family=Open+Sans:400,300,700&subset=latin,cyrillic', false, null);
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    /** Localize Scripts */
    $php_array = array('admin_ajax' => admin_url('admin-ajax.php'));
    wp_localize_script('sage/js', 'php_array', $php_array);
}
开发者ID:romapad,项目名称:tian,代码行数:15,代码来源:setup.php

示例3: setup

/**
 * Theme setup
 */
function setup()
{
    global $redux_demo;
    $options = $redux_demo;
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'sage')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    add_image_size('slider', 1200, 600, true);
    update_option('medium_crop', 0);
    update_option('large_crop', 0);
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    //add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
    // Allow shortcode execution in widgets
    add_filter('widget_text', 'do_shortcode');
}
开发者ID:rku4er,项目名称:openlines-wp,代码行数:35,代码来源:init.php

示例4: custom_admin_assets

function custom_admin_assets()
{
    if (class_exists('Roots\\Sage\\Assets')) {
        wp_enqueue_style('admin-style', Assets\asset_path('styles/admin-style.css'));
        wp_enqueue_script('admin-script', Assets\asset_path('scripts/admin-script.js'));
    }
}
开发者ID:thewalkergroup,项目名称:walker-theme-setup,代码行数:7,代码来源:custom_admin.php

示例5: setup

/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['sobre-topo' => 'Menu "Sobre" do topo das páginas', 'sobre-footer' => 'Menu "Sobre" do rodapé das páginas', 'software-topo' => 'Menu "Software" do topo das páginas', 'software-footer' => 'Menu "Software" do rodapé das páginas', 'software-home' => 'Botões da seção "Software" da home', 'cursos-topo' => 'Menu "Cursos" do topo das páginas', 'cursos-footer' => 'Menu "Cursos" do rodapé das páginas', 'cursos-home' => 'Botões da seção "Cursos" da home', 'rede-topo' => 'Menu "Rede" do topo das páginas', 'rede-footer' => 'Menu "Rede" do rodapé das páginas', 'rede-home' => 'Botões da seção "Rede" da home']);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
}
开发者ID:hacklabr,项目名称:portal-timtec,代码行数:28,代码来源:init.php

示例6: setup

/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/rubi-translations
    load_theme_textdomain('rubi', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'rubi')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
}
开发者ID:sinaru,项目名称:Rubi-WordPress-Theme,代码行数:28,代码来源:init.php

示例7: front_page_scripts

/**
 * Aggiungo uno script in homepage
 */
function front_page_scripts()
{
    if (is_front_page()) {
        wp_enqueue_script('frontpage.js', Assets\asset_path('scripts/frontpage.js'), ['jquery']);
        wp_enqueue_script('gsap.js', Assets\asset_path('scripts/gsap.js'));
        wp_enqueue_script('scrollmagic.js', Assets\asset_path('scripts/scrollmagic.js'));
    }
}
开发者ID:iacopolea,项目名称:iacopoleardini,代码行数:11,代码来源:extras.php

示例8: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('pressbooks-publisher/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('pressbooks-publisher/fonts', 'https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Serif:400,400italic,700|Oswald', false, null);
    wp_enqueue_script('pressbooks-publisher/skip-link-focus-fix', Assets\asset_path('scripts/skip-link-focus-fix.js'), [], null, true);
    wp_enqueue_script('pressbooks-publisher/match-height', Assets\asset_path('scripts/matchheight.js'), ['jquery'], null, true);
    wp_enqueue_script('pressbooks-publisher/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
开发者ID:pressbooks,项目名称:pressbooks,代码行数:11,代码来源:setup.php

示例9: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
开发者ID:msoroeta,项目名称:theme-name,代码行数:11,代码来源:setup.php

示例10: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_localize_script('sage/js', 'themeUri', array('pages' => trailingslashit(get_template_directory_uri()) . 'pages/', 'templates' => trailingslashit(get_template_directory_uri()) . 'templates/'));
}
开发者ID:Paalt,项目名称:topp15,代码行数:12,代码来源:setup.php

示例11: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('wpb-google-fonts', 'href="https://fonts.googleapis.com/css?family=Raleway:400,100,200,300,600,700,900,800,500|Montserrat:400,700"', false);
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
开发者ID:urbanlink,项目名称:haagsemakers.nl,代码行数:12,代码来源:setup.php

示例12: setup

/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'odfw')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    add_image_size('hero', 1600, 580, true);
    add_image_size('grid', 255, 185, true);
    add_image_size('listing', 116, 63, false);
    add_filter('image_size_names_choose', function ($sizes) {
        return array_merge($sizes, array("listing" => __("Listing"), "grid" => __("Grid")));
    });
    //if(get_option('medium_size_w')!=640) update_option('medium_size_w',640);
    //if(get_option('medium_size_h')!=320) update_option('medium_size_h',320);
    if (get_option('large_size_w') != 750) {
        update_option('large_size_w', 750);
    }
    if (get_option('large_size_h') != 9999) {
        update_option('large_size_h', 9999);
    }
    // Defaults for inserting images
    update_option('image_default_align', 'none');
    update_option('image_default_link_type', 'none');
    update_option('image_default_size', 'large');
    update_option('upload_path', $_SERVER['DOCUMENT_ROOT'] . '/media');
    update_option('upload_url_path', 'http://' . $_SERVER['SERVER_NAME'] . '/media');
    add_filter('jpeg_quality', function ($arg) {
        return 75;
    });
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['gallery']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
    /* Doesn't need to be set over and over again so commented for now
      	// We need the medium and large image sizes to be cropped.
    	if(false === get_option("medium_crop")):
    		add_option("medium_crop", "1");
    	else:
    		update_option("medium_crop", "1");
    	endif;
     */
}
开发者ID:Ecotrust,项目名称:ocs-wp,代码行数:59,代码来源:init.php

示例13: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('sage/ScrollToFixed_js', Assets\asset_path('scripts/jquery-scrolltofixed-min.js'), ['jquery'], null, true);
    // wp_enqueue_script('sage/uisearch_js', Assets\asset_path('scripts/uisearch.js'), ['jquery'], null, true);
}
开发者ID:bolivar,项目名称:sage-8.4.1,代码行数:13,代码来源:setup.php

示例14: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('flexslider/js', Assets\asset_path('scripts/flexslider-config.js'), ['jquery'], null, true);
    wp_enqueue_script('blueimp-gallery/js', Assets\asset_path('scripts/blueimp-gallery-config.js'), ['jquery'], null, true);
}
开发者ID:valenciafg,项目名称:guanaima-theme,代码行数:13,代码来源:setup.php

示例15: assets

/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('animate', Assets\asset_path('styles/animate.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('gsap-js', 'http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenLite.min.js', array(), false, true);
}
开发者ID:akk74,项目名称:thrane-theme,代码行数:13,代码来源:setup.php


注:本文中的Roots\Sage\Assets\asset_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。