• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_stylesheet_directory_uri函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: cherry_plugin_settings

 function cherry_plugin_settings()
 {
     global $wpdb;
     if (!function_exists('get_plugin_data')) {
         require_once ABSPATH . 'wp-admin/includes/plugin.php';
     }
     $upload_dir = wp_upload_dir();
     $plugin_data = get_plugin_data(plugin_dir_path(__FILE__) . 'cherry-plugin.php');
     //Cherry plugin constant variables
     define('CHERRY_PLUGIN_DIR', plugin_dir_path(__FILE__));
     define('CHERRY_PLUGIN_URL', plugin_dir_url(__FILE__));
     define('CHERRY_PLUGIN_DOMAIN', $plugin_data['TextDomain']);
     define('CHERRY_PLUGIN_DOMAIN_DIR', $plugin_data['DomainPath']);
     define('CHERRY_PLUGIN_VERSION', $plugin_data['Version']);
     define('CHERRY_PLUGIN_NAME', $plugin_data['Name']);
     define('CHERRY_PLUGIN_SLUG', plugin_basename(__FILE__));
     define('CHERRY_PLUGIN_DB', $wpdb->prefix . CHERRY_PLUGIN_DOMAIN);
     define('CHERRY_PLUGIN_REMOTE_SERVER', esc_url('http://tmbhtest.com/cherryframework.com/components_update/'));
     //Other constant variables
     define('CURRENT_THEME_DIR', get_stylesheet_directory());
     define('CURRENT_THEME_URI', get_stylesheet_directory_uri());
     define('UPLOAD_BASE_DIR', str_replace("\\", "/", $upload_dir['basedir']));
     define('UPLOAD_DIR', str_replace("\\", "/", $upload_dir['path'] . '/'));
     // if ( !defined('API_URL') ) {
     // 	define( 'API_URL', esc_url( 'http://updates.cherry.template-help.com/cherrymoto/v3/api/' ) );
     // }
     load_plugin_textdomain(CHERRY_PLUGIN_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/' . CHERRY_PLUGIN_DOMAIN_DIR);
     do_action('cherry_plugin_settings');
 }
开发者ID:drupalninja,项目名称:schome_org,代码行数:29,代码来源:cherry-plugin.php


示例2: crmpress_constants

/**
 *
 * This function adds all the constants that can be used for the CRM Press framework.
 *
 * @since 1.0
 *
 */
function crmpress_constants()
{
    // Define directory constants
    define('PARENT_DIR', get_template_directory());
    define('CHILD_DIR', get_stylesheet_directory());
    define('CRMPRESS_IMAGES_DIR', PARENT_DIR . '/images');
    define('CRMPRESS_LIB_DIR', PARENT_DIR . '/lib');
    define('CRMPRESS_ADMIN_DIR', CRMPRESS_LIB_DIR . '/admin');
    define('CRMPRESS_BUILD_DIR', CRMPRESS_LIB_DIR . '/build');
    define('CRMPRESS_METABOX_DIR', CRMPRESS_LIB_DIR . '/metabox');
    define('CRMPRESS_CSS_DIR', CRMPRESS_LIB_DIR . '/css');
    define('CRMPRESS_FUNCTIONS_DIR', CRMPRESS_LIB_DIR . '/functions');
    define('CRMPRESS_JS_DIR', CRMPRESS_LIB_DIR . '/js');
    define('CRMPRESS_RESOURCES_DIR', CRMPRESS_LIB_DIR . '/resources');
    define('CRMPRESS_WIDGETS_DIR', CRMPRESS_LIB_DIR . '/widgets');
    // Define URL constants
    define('PARENT_URL', get_template_directory_uri());
    define('CHILD_URL', get_stylesheet_directory_uri());
    define('CRMPRESS_IMAGES_URL', PARENT_URL . '/images');
    define('CRMPRESS_LIB_URL', PARENT_URL . '/lib');
    define('CRMPRESS_ADMIN_URL', CRMPRESS_LIB_URL . '/admin');
    define('CRMPRESS_BUILD_URL', CRMPRESS_LIB_URL . '/build');
    define('CRMPRESS_METABOX_URL', CRMPRESS_LIB_URL . '/metabox');
    define('CRMPRESS_CSS_URL', CRMPRESS_LIB_URL . '/css');
    define('CRMPRESS_FUNCTIONS_URL', CRMPRESS_LIB_URL . '/functions');
    define('CRMPRESS_JS_URL', CRMPRESS_LIB_URL . '/js');
    define('CRMPRESS_RESOURCES_URL', CRMPRESS_LIB_URL . '/resources');
    define('CRMPRESS_WIDGETS_URL', CRMPRESS_LIB_URL . '/widgets');
}
开发者ID:netcon-source,项目名称:CRM-Press,代码行数:36,代码来源:init.php


示例3: register_custom_post_types

function register_custom_post_types()
{
    /* Register custom post types
     *****************************/
    register_post_type('news', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/news-icon.png', 'labels' => array('name' => _x('Новости', 'post type general name'), 'singular_name' => _x('Новость', 'post type singular name'), 'add_new' => _x('Добавить новую', 'Новость'), 'add_new_item' => __('Добавить новую новость'), 'edit_item' => __('Редактировать новость'), 'new_item' => __('Новая новость'), 'view_item' => __('Посмотреть новость'), 'search_items' => __('Поиск новостей'), 'not_found' => __('Новостей не найдено'), 'not_found_in_trash' => __('Новостей не найдено в корзине'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'nitem', 'with_front' => FALSE), 'register_meta_box_cb' => 'news_add_box', 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    register_post_type('banners', array('public' => true, 'publicly_queryable' => true, 'has_archive' => false, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/banners-icon.png', 'labels' => array('name' => _x('Баннеры', 'post type general name'), 'singular_name' => _x('Баннер', 'post type singular name'), 'add_new' => _x('Добавить новый', 'Баннер'), 'add_new_item' => __('Добавить новый баннер'), 'edit_item' => __('Редактировать баннер'), 'new_item' => __('Новый баннер'), 'view_item' => __('Посмотреть баннер'), 'search_items' => __('Поиск баннеров'), 'not_found' => __('Баннеры не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'banners', 'with_front' => FALSE), 'supports' => array('title')));
    register_post_type('ads', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/adsa_icon.png', 'labels' => array('name' => _x('Объявления', 'post type general name'), 'singular_name' => _x('Объявление', 'post type singular name'), 'add_new' => _x('Добавить новое', 'Объявление'), 'add_new_item' => __('Добавить новое объявление'), 'edit_item' => __('Редактировать объявление'), 'new_item' => __('Новое объявление'), 'view_item' => __('Посмотреть объявление'), 'search_items' => __('Поиск объявлений'), 'not_found' => __('Объявления не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'ads', 'with_front' => FALSE), 'register_meta_box_cb' => 'ads_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('catalog', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/catalog_icon.png', 'labels' => array('name' => _x('Справочник', 'post type general name'), 'singular_name' => _x('Организация', 'post type singular name'), 'add_new' => _x('Добавить организацию', 'Организация'), 'add_new_item' => __('Добавить новую организацию'), 'edit_item' => __('Редактировать организацию'), 'new_item' => __('Новая организация'), 'view_item' => __('Посмотреть организацию'), 'search_items' => __('Поиск организаций'), 'not_found' => __('Организации не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'catalog', 'with_front' => FALSE), 'register_meta_box_cb' => 'cat_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('people', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/drs-icon.png', 'labels' => array('name' => _x('Врачи', 'post type general name'), 'singular_name' => _x('Врач', 'post type singular name'), 'add_new' => _x('Добавить врача', 'врач'), 'add_new_item' => __('Добавить нового врача'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новый врач'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск врача'), 'not_found' => __('Записи не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'register_meta_box_cb' => 'pl_add_box', 'rewrite' => array('slug' => 'people', 'with_front' => FALSE), 'supports' => array('title', 'editor', 'thumbnail', 'comments')));
    /*Новости АВТОМАБИЛКИ начало*/
    register_post_type('som', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/car-icon.png', 'labels' => array('name' => _x('Somicadze', 'post type general name'), 'singular_name' => _x('Som', 'post type singular name'), 'add_new' => _x('Добавить запись', 'новость'), 'add_new_item' => __('Добавить новую запись'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новая запись'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск записей'), 'not_found' => __('Запись не найдена'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 6, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'somnews', 'with_front' => FALSE), 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    /* Register custom taxonomies
     *****************************/
    $labelsTags = array('name' => _x('Метки', 'taxonomy general name'), 'singular_name' => _x('Метки', 'taxonomy singular name'), 'search_items' => __('Поиск меток'), 'all_items' => __('Все метки'), 'edit_item' => __('Редактировать метку'), 'update_item' => __('Обновить метку'), 'add_new_item' => __('Добавить новую метку'), 'new_item_name' => __('Новая метка'));
    register_taxonomy('ntag', array('news'), array('hierarchical' => false, 'labels' => $labelsTags, 'show_ui' => 'radio', 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => array('slug' => 'ntag')));
    $labelsCat = array('name' => _x('Рубрики новостей', 'taxonomy general name'), 'singular_name' => _x('Рубрика', 'taxonomy singular name'), 'search_items' => __('Поиск рубрик'), 'all_items' => __('Все рубрики'), 'parent_item' => __('Родительская рубрика'), 'parent_item_colon' => __('Родительская рубрика:'), 'edit_item' => __('Редактировать рубрику'), 'update_item' => __('Обновить рубрику'), 'add_new_item' => __('Добавить новую рубрику'), 'new_item_name' => __('Новая рубрика'));
    register_taxonomy('ncategory', array('news'), array('hierarchical' => true, 'labels' => $labelsCat, 'show_ui' => 'radio', 'query_var' => true, 'rewrite' => array('slug' => 'ncategory')));
    $labelsLoc = array('name' => _x('Регионы', 'taxonomy general name'), 'singular_name' => _x('Регион', 'taxonomy singular name'), 'search_items' => __('Поиск региона'), 'all_items' => __('Все регионы'), 'parent_item' => __('Родительский регион'), 'parent_item_colon' => __('Родительский регион:'), 'edit_item' => __('Редактировать регион'), 'update_item' => __('Обновить регион'), 'add_new_item' => __('Добавить новый регион'), 'new_item_name' => __('Новый регион'));
    register_taxonomy('nlocation', array('news', 'ads', 'catalog'), array('public' => true, 'hierarchical' => true, 'labels' => $labelsLoc, 'query_var' => 'nlocation', 'show_ui' => true, 'rewrite' => array('slug' => 'nlocation', 'with_front' => false)));
    $labelsAdsCat = array('name' => _x('Категории объявлений', 'taxonomy general name'), 'singular_name' => _x('Категория', 'taxonomy singular name'), 'search_items' => __('Поиск категории'), 'all_items' => __('Все категории'), 'parent_item' => __('Родительская категория'), 'parent_item_colon' => __('Родительская категория:'), 'edit_item' => __('Редактировать категорию'), 'update_item' => __('Обновить категорию'), 'add_new_item' => __('Добавить новую категорию'), 'new_item_name' => __('Новая категория'));
    register_taxonomy('adscategory', 'ads', array('public' => true, 'hierarchical' => true, 'labels' => $labelsAdsCat, 'query_var' => 'adscategory', 'show_ui' => true, 'rewrite' => array('slug' => 'adscategory', 'with_front' => false)));
    $labelsCatalogCat = array('name' => _x('Разделы справочника', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский раздел'), 'parent_item_colon' => __('Родительский раздел:'), 'edit_item' => __('Редактировать раздел'), 'update_item' => __('Обновить раздел'), 'add_new_item' => __('Добавить новый раздел'), 'new_item_name' => __('Новый раздел'));
    register_taxonomy('catcategory', 'catalog', array('public' => true, 'hierarchical' => true, 'labels' => $labelsCatalogCat, 'query_var' => 'catcategory', 'show_ui' => true, 'rewrite' => array('slug' => 'catcategory', 'with_front' => false)));
    $labelsMedicalNewsCat = array('name' => _x('Тип', 'taxonomy general name'), 'singular_name' => _x('Тип', 'taxonomy singular name'), 'search_items' => __('Поиск типов'), 'all_items' => __('Все типы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('medcat', 'medicalnews', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsMedicalNewsCat, 'query_var' => 'medcat', 'show_ui' => true, 'rewrite' => array('slug' => 'medcat', 'with_front' => false)));
    $labelsSomCat = array('name' => _x('Разделы', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('somcat', 'som', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsSomCat, 'query_var' => 'somcat', 'show_ui' => true, 'rewrite' => array('slug' => 'somcat', 'with_front' => false)));
}
开发者ID:TimurMG,项目名称:mg-red,代码行数:28,代码来源:post-types.php


示例4: localedge_scripts_and_styles

function localedge_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // modernizr (without media query polyfill)
    wp_enqueue_script('localedge-modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js', false, null);
    // respondjs
    wp_enqueue_script('localedge-respondjs', '//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js', false, null);
    // register main stylesheet
    wp_enqueue_style('localedge-stylesheet', get_stylesheet_directory_uri() . '/css/style.css', array(), '', 'all');
    // ie-only style sheet
    wp_enqueue_style('localedge-ie-only', get_stylesheet_directory_uri() . '/css/ie.css', array(), '');
    $wp_styles->add_data('localedge-ie-only', 'conditional', 'lt IE 9');
    // add conditional wrapper around ie stylesheet
    //Magnific Popup (LightBox)
    wp_enqueue_script('localedge-magnific-popup-js', '//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js', array('jquery'), '0.9.9', true);
    //Font Awesome (icon set)
    wp_enqueue_style('localedge-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3');
    // iCheck (better radio and checkbox inputs)
    wp_enqueue_script('localedge-icheck', '//cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.1/icheck.min.js', array('jquery'), '1.0.1', true);
    //Chosen - http://harvesthq.github.io/chosen/
    wp_enqueue_script('chosen-js', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.jquery.min.js', array('jquery'), '1.1.0', true);
    // comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
    //adding scripts file in the footer
    wp_enqueue_script('localedge-js', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), '', true);
}
开发者ID:maverickmediaco,项目名称:truenorthrealtorsny,代码行数:29,代码来源:functions.php


示例5: wl_removeScripts

function wl_removeScripts()
{
    //De-Queuing Styles sheet
    wp_dequeue_style('default', get_template_directory_uri() . '/css/default.css');
    //EN-Queing Style sheet
    wp_enqueue_style('lite-brown', get_stylesheet_directory_uri() . '/green.css');
}
开发者ID:bigkey,项目名称:php-getting-started,代码行数:7,代码来源:functions.php


示例6: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (!empty($instance['email'])) {
         echo '<a href="mailto:' . $instance['email'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/mail.png" alt="Email" /></a> ';
     }
     if (!empty($instance['rss'])) {
         echo '<a href="' . $instance['rss'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/rss.png" alt="RSS" /></a> ';
     }
     if (!empty($instance['twitter'])) {
         echo '<a href="' . $instance['twitter'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/twitter.png" alt="Twitter" /></a> ';
     }
     if (!empty($instance['facebook'])) {
         echo '<a href="' . $instance['facebook'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/facebook.png" alt="Facebook" /></a> ';
     }
     if (!empty($instance['linkedin'])) {
         echo '<a href="' . $instance['linkedin'] . '"><img src="' . get_stylesheet_directory_uri() . '/lib/images/linkedin.png" alt="Linkedin" /></a> ';
     }
     echo $after_widget;
 }
开发者ID:digideskio,项目名称:stammtisch,代码行数:25,代码来源:widget-connect.php


示例7: ellak_font_awesome

function ellak_font_awesome()
{
    // Font Awesome
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
    // Facebook SDK
    wp_enqueue_script('facebook-sdk', get_stylesheet_directory_uri() . '/js/facebook.js', array(), '2.3', true);
}
开发者ID:eellak,项目名称:gpchild-ellak,代码行数:7,代码来源:functions.php


示例8: _s_scripts

/**
 * Enqueue scripts and styles.
 */
function _s_scripts()
{
    /**
     * If WP is in script debug, or we pass ?script_debug in a URL - set debug to true.
     */
    $debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true || isset($_GET['script_debug']) ? true : false;
    /**
     * If we are debugging the site, use a unique version every page load so as to ensure no cache issues.
     */
    $version = '1.0.0';
    /**
     * Should we load minified scripts? Also enqueue live reload to allow for extensionless reloading.
     */
    $suffix = '.min';
    if (true === $debug) {
        $suffix = '';
        wp_enqueue_script('live-reload', '//localhost:35729/livereload.js', array(), $version, true);
    }
    wp_enqueue_style('_s-google-font', _s_font_url(), array(), null);
    wp_enqueue_style('_s-style', get_stylesheet_directory_uri() . '/style' . $suffix . '.css', array(), $version);
    wp_enqueue_script('_s-project', get_template_directory_uri() . '/assets/js/project' . $suffix . '.js', array('jquery'), $version, true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:mukeshkumar108,项目名称:wd_s,代码行数:28,代码来源:scripts.php


示例9: get_wpas_uri

/**
 * Returns full URI of the WPAS directory
 *
 * @return string
 */
function get_wpas_uri()
{
    if (defined('WPAS_URI')) {
        return rtrim(WPAS_URI, '/');
    }
    return get_stylesheet_directory_uri() . '/' . basename(__DIR__);
}
开发者ID:dsopiarz,项目名称:wp-advanced-search,代码行数:12,代码来源:lib.php


示例10: theme_enqueue_styles

function theme_enqueue_styles()
{
    $parent_style = 'parent-style';
    wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
    wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
    wp_enqueue_script('rankmenu', get_stylesheet_directory_uri() . '/js/script.js', 'jquery', '1.0', true);
}
开发者ID:ksan5835,项目名称:outlooknew,代码行数:7,代码来源:functions.php


示例11: dfwpchild_enqueue_style

function dfwpchild_enqueue_style()
{
    //Le nom du fichier css du projet
    //dépends du 'mode' choisi en admin
    $projectCssName = get_option('debug_mode') == 'prod' ? 'index.min.css' : 'index.css';
    //Enregistrer la css dans la pile
    wp_register_style('dfwpchild_index', get_stylesheet_directory_uri() . '/dist/css/' . $projectCssName);
    //Enregistrer la css de la pattern
    wp_register_style('dfwpchild_pattern', get_stylesheet_directory_uri() . '/dist/css/pattern.min.css');
    //Enregistrer la css de la maintenance
    wp_register_style('dfwpchild_maintenance', get_stylesheet_directory_uri() . '/dist/css/maintenance.min.css');
    //Charger le css du projet
    wp_enqueue_style('dfwpchild_index');
    //Pour la page pattern uniquement
    if (is_page_Template('page-pattern.php')) {
        //On charge la css qui va bien
        wp_dequeue_style('dfwpchild_index');
        wp_enqueue_style('dfwpchild_pattern');
    }
    //Si la maintenance est activée
    if (get_option('maintenance_mode') == 'true') {
        //Si on est pas sur l'admin, qu'on est pas un utilisateur connecté ou que l'on est pas sur la page de login
        if (!is_admin() && !is_user_logged_in() && Login::isLoginPage() == false) {
            //On charge la feuille de style de la maintenance
            wp_dequeue_style('dfwpchild_index');
            wp_enqueue_style('dfwpchild_maintenance');
        }
    }
}
开发者ID:posykrat,项目名称:dfwp_child,代码行数:29,代码来源:settings.php


示例12: homepage_scripts

function homepage_scripts()
{
    if (is_front_page()) {
        wp_enqueue_style('lander-styles', get_stylesheet_directory_uri() . '/home-styles.css');
        wp_enqueue_script('landerjs', get_template_directory_uri() . '/library/js/home.js', array('jquery'), '', true);
    }
}
开发者ID:jaycbrf4,项目名称:JD_BOOTSTRAP_ONE_PAGE,代码行数:7,代码来源:functions.php


示例13: wpo_init_constants

 function wpo_init_constants()
 {
     $theme_mods = get_theme_mods();
     if (!defined('TEMPLATEURI')) {
         define('TEMPLATEURI', trailingslashit(get_stylesheet_directory_uri()));
     }
     if (!defined('HOMEURL')) {
         define('HOMEURL', trailingslashit(get_home_url()));
     }
     if (!defined('THEMECOLOR')) {
         if (!empty($theme_mods['wpo_theme_color'])) {
             $meta_color = $theme_mods['wpo_theme_color'];
         } else {
             $meta_color = '#000000';
         }
         define('THEMECOLOR', $meta_color);
     }
     if (!defined('HEADERCOLOR')) {
         if (!empty($theme_mods['wpo_header_color'])) {
             $meta_color = $theme_mods['wpo_header_color'];
         } else {
             $meta_color = '#000000';
         }
         define('HEADERCOLOR', $meta_color);
     }
 }
开发者ID:bigandy,项目名称:wp-offline,代码行数:26,代码来源:misc.php


示例14: teutopress_acf_settings_dir

function teutopress_acf_settings_dir($dir)
{
    // update path
    $dir = get_stylesheet_directory_uri() . '/acf/';
    // return
    return $dir;
}
开发者ID:Teutomedien,项目名称:_teutopress,代码行数:7,代码来源:acf.php


示例15: set_url

 /**
  * Properly set the Kirki URL for assets.
  * Determines if Kirki is installed as a plugin, in a child theme, or a parent theme
  * and then does some calculations to get the proper URL for its CSS & JS assets.
  */
 public function set_url()
 {
     // The path of the Kirki's parent-folder.
     $path = wp_normalize_path(dirname(Kirki::$path));
     // Get parent-theme path.
     $parent_theme_path = get_template_directory();
     $parent_theme_path = wp_normalize_path($parent_theme_path);
     // Get child-theme path.
     $child_theme_path = get_stylesheet_directory_uri();
     $child_theme_path = wp_normalize_path($child_theme_path);
     Kirki::$url = plugin_dir_url(dirname(__FILE__) . 'kirki.php');
     // Is Kirki included in a parent theme?
     if (false !== strpos(Kirki::$path, $parent_theme_path)) {
         Kirki::$url = get_template_directory_uri() . str_replace($parent_theme_path, '', Kirki::$path);
     }
     // Is there a child-theme?
     if ($child_theme_path !== $parent_theme_path) {
         // Is Kirki included in a child theme?
         if (false !== strpos(Kirki::$path, $child_theme_path)) {
             Kirki::$url = get_template_directory_uri() . str_replace($child_theme_path, '', Kirki::$path);
         }
     }
     // Apply the kirki/config filter.
     $config = apply_filters('kirki/config', array());
     if (isset($config['url_path'])) {
         Kirki::$url = esc_url_raw($config['url_path']);
     }
 }
开发者ID:aristath,项目名称:kirki,代码行数:33,代码来源:class-kirki-init.php


示例16: bones_scripts_and_styles

function bones_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    if (!is_admin()) {
        // modernizr and main stylesheets
        wp_register_script('bones-modernizr', get_stylesheet_directory_uri() . '/assets/js/libs/modernizr.custom.min.js', array(), '2.5.3', false);
        wp_register_style('bones-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-css', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.carousel.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-theme', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.theme.default.min.css', array(), '', 'all');
        wp_register_style('bones-ie-only', get_stylesheet_directory_uri() . '/assets/css/ie.min.css', array(), '');
        // comment reply script for threaded comments
        if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
            wp_enqueue_script('comment-reply');
        }
        //adding scripts file in the footer
        wp_register_script('bones-js', get_stylesheet_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
        wp_register_script('bones-quickshare', get_stylesheet_directory_uri() . '/assets/vendor/quickshare/dist/quickshare.min.js', array('jquery'), '', true);
        wp_register_script('bones-owlcarousel-js', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/owl.carousel.min.js', array('jquery'), '', true);
        wp_enqueue_script('bones-modernizr');
        wp_enqueue_style('bones-stylesheet');
        wp_enqueue_style('bones-owlcarousel-css');
        wp_enqueue_style('bones-owlcarousel-theme');
        wp_enqueue_style('bones-ie-only');
        $wp_styles->add_data('bones-ie-only', 'conditional', 'lt IE 9');
        // add conditional wrapper around ie stylesheet
        wp_enqueue_script('jquery');
        wp_enqueue_script('bones-js');
        wp_enqueue_script('bones-quickshare');
        wp_enqueue_script('bones-owlcarousel-js');
    }
}
开发者ID:ranchodeluxemedia,项目名称:studiobase,代码行数:32,代码来源:scripts.php


示例17: no_wp_logo_admin_bar_remove

function no_wp_logo_admin_bar_remove()
{
    ?>
        <style type="text/css">
            #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
                content: url(<?php 
    echo get_stylesheet_directory_uri();
    ?>
/img/logo-s.png)   !important;
                top: 0px;
/*                right: 0;
                z-index: 100000 !important;
*//*                display: none;
*/            }

            #wpadminbar #wp-admin-bar-wp-logo > a.ab-item {
                pointer-events: none;
                cursor: default;
                top: 0px;
/*                right: 0;
                z-index: 100000 !important;
*/                display: none;

            }   
        </style>
    <?php 
}
开发者ID:agustinpfs,项目名称:gatelin,代码行数:27,代码来源:functions.php


示例18: hudson_enqueue_admin_styles

/**
 * Enqueues admin stylesheets and JavaScript.
 */
function hudson_enqueue_admin_styles()
{
    wp_register_style('hudson-admin', get_stylesheet_directory_uri() . '/css/admin.css');
    wp_enqueue_style('hudson-admin');
    wp_register_script('hudson-admin', get_stylesheet_directory_uri() . '/js/admin.min.js');
    wp_enqueue_script('hudson-admin');
}
开发者ID:noahcoley,项目名称:standard-child-themes,代码行数:10,代码来源:functions.php


示例19: foundationpress_scripts

 function foundationpress_scripts()
 {
     // Enqueue Main Stylesheet
     wp_enqueue_style('Main Stylesheet', get_stylesheet_directory_uri() . '/css/foundation.css');
     // Deregister the jquery version bundled with wordpress
     wp_deregister_script('jquery');
     // Modernizr is used for polyfills and feature detection. Must be placed in header. (Not required)
     wp_register_script('modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '2.8.3', false);
     // Fastclick removes the 300ms delay on click events in mobile environments. Must be placed in header. (Not required)
     wp_register_script('fastclick', get_template_directory_uri() . '/js/vendor/fastclick.js', array(), '1.0.0', false);
     // CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
     wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);
     // Self hosted jQuery placed in the footer. (Comment the script above and uncomment the script below if you want to switch).
     //wp_register_script( 'jquery', get_template_directory_uri() . '/js/vendor/jquery.js', array(), '2.1.3', true );
     // If you'd like to cherry-pick the foundation components you need in your project, head over to Gruntfile.js and see lines 67-88
     // It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :)
     wp_register_script('foundation', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '5.5.1', true);
     wp_register_script('troispointszero', get_template_directory_uri() . '/js/custom/troispointzero.js', array('jquery'), '1.0');
     // Enqueue all registered scripts
     wp_enqueue_script('modernizr');
     wp_enqueue_script('fastclick');
     wp_enqueue_script('jquery');
     wp_enqueue_script('foundation');
     wp_enqueue_script('troispointszero');
 }
开发者ID:alexandrethiebaut,项目名称:ntsc,代码行数:25,代码来源:enqueue-scripts.php


示例20: widget

    public function widget($args, $instance)
    {
        global $post;
        $postID = $post->ID;
        $type = $instance['type'];
        $text = $instance['text'];
        ?>
        <div class='widget uw-story-social'>
            <h3 class='widget-title'><?php 
        echo $type;
        ?>
</h3>
            <div class='<?php 
        echo strtolower($type);
        ?>
-widget'>
                <div class='social-head'>
                    <img src='<?php 
        echo get_stylesheet_directory_uri();
        ?>
/img/social.jpg'>
                    <span>University of Washington</span>
                </div>
                <p><?php 
        echo $text;
        ?>
</p>
            </div>
        </div>
        <?php 
    }
开发者ID:uweb,项目名称:story-central,代码行数:31,代码来源:uw_story_social_widget.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_stylesheet_uri函数代码示例发布时间:2022-05-15
下一篇:
PHP get_stylesheet_directory函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap