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


PHP nxt_enqueue_style函数代码示例

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


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

示例1: members_admin_enqueue_style

/**
 * Loads the admin stylesheet for the required pages based off the $hook_suffix parameter.
 *
 * @since 0.2.0
 * @param string $hook_suffix The hook for the current page in the admin.
 */
function members_admin_enqueue_style($hook_suffix)
{
    $pages = array('users_page_roles', 'users_page_role-new', 'settings_page_members-settings');
    if (in_array($hook_suffix, $pages)) {
        nxt_enqueue_style('members-admin', trailingslashit(MEMBERS_URI) . 'css/admin.css', false, '20110525', 'screen');
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:13,代码来源:admin.php

示例2: admin_load

 /**
  * Set up the enqueue for the CSS & JavaScript files.
  *
  * @since 3.0.0
  */
 function admin_load()
 {
     get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('You can customize the look of your site without touching any of your theme&#8217;s code by using a custom background. Your background can be an image or a color.') . '</p>' . '<p>' . __('To use a background image, simply upload it, then choose your display options below. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.') . '</p>' . '<p>' . __('You can also choose a background color. If you know the hexadecimal code for the color you want, enter it in the Background Color field. If not, click on the Select a Color link, and a color picker will allow you to choose the exact shade you want.') . '</p>' . '<p>' . __('Don&#8217;t forget to click on the Save Changes button when you are finished.') . '</p>'));
     get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.nxtclass.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>') . '</p>' . '<p>' . __('<a href="http://nxtclass.org/support/" target="_blank">Support Forums</a>') . '</p>');
     nxt_enqueue_script('custom-background');
     nxt_enqueue_style('farbtastic');
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:custom-background.php

示例3: initialize

 public function initialize()
 {
     $this->user = new stdClass();
     if (is_user_logged_in()) {
         /* Populate settings we need for the menu based on the current user. */
         $this->user->blogs = get_blogs_of_user(get_current_user_id());
         if (is_multisite()) {
             $this->user->active_blog = get_active_blog_for_user(get_current_user_id());
             $this->user->domain = empty($this->user->active_blog) ? user_admin_url() : trailingslashit(get_home_url($this->user->active_blog->blog_id));
             $this->user->account_domain = $this->user->domain;
         } else {
             $this->user->active_blog = $this->user->blogs[get_current_blog_id()];
             $this->user->domain = trailingslashit(home_url());
             $this->user->account_domain = $this->user->domain;
         }
     }
     add_action('nxt_head', 'nxt_admin_bar_header');
     add_action('admin_head', 'nxt_admin_bar_header');
     if (current_theme_supports('admin-bar')) {
         $admin_bar_args = get_theme_support('admin-bar');
         // add_theme_support( 'admin-bar', array( 'callback' => '__return_false') );
         $header_callback = $admin_bar_args[0]['callback'];
     }
     if (empty($header_callback)) {
         $header_callback = '_admin_bar_bump_cb';
     }
     add_action('nxt_head', $header_callback);
     nxt_enqueue_script('admin-bar');
     nxt_enqueue_style('admin-bar');
     do_action('admin_bar_init');
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:class-nxt-admin-bar.php

示例4: init_styles

 /**
  */
 public function init_styles()
 {
     parent::init_styles();
     if (is_admin()) {
         // need image editor styles
         nxt_enqueue_style('imgareaselect');
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:10,代码来源:class.php

示例5: woothemes_add_css

 function woothemes_add_css()
 {
     nxt_register_style('prettyPhoto', get_template_directory_uri() . '/includes/css/prettyPhoto.css');
     if (is_page_template('template-portfolio.php') || is_front_page() || is_singular() && get_post_type() == 'portfolio' || is_tax('portfolio-gallery')) {
         nxt_enqueue_style('prettyPhoto');
     }
     do_action('woothemes_add_css');
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:8,代码来源:theme-js.php

示例6: xprofile_add_admin_css

function xprofile_add_admin_css()
{
    if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) {
        if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            nxt_enqueue_style('xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.dev.css', array(), '20110723');
        } else {
            nxt_enqueue_style('xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css', array(), '20110723');
        }
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:10,代码来源:bp-xprofile-cssjs.php

示例7: messages_add_autocomplete_css

function messages_add_autocomplete_css()
{
    global $bp;
    if (bp_is_messages_component() && bp_is_current_action('compose')) {
        if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            nxt_enqueue_style('bp-messages-autocomplete', BP_PLUGIN_URL . '/bp-messages/css/autocomplete/jquery.autocompletefb.dev.css', array(), '20110723');
        } else {
            nxt_enqueue_style('bp-messages-autocomplete', BP_PLUGIN_URL . '/bp-messages/css/autocomplete/jquery.autocompletefb.css', array(), '20110723');
        }
        nxt_print_styles();
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:12,代码来源:bp-messages-cssjs.php

示例8: init

 function init()
 {
     global $pagenow;
     if ((current_user_can('edit_posts') || current_user_can('edit_pages')) && get_user_option('rich_editing') == 'true' && in_array($pagenow, array('post.php', 'post-new.php', 'page-new.php', 'page.php'))) {
         // Add the tinyMCE buttons and plugins.
         add_filter('mce_buttons', array(&$this, 'filter_mce_buttons'));
         add_filter('mce_external_plugins', array(&$this, 'filter_mce_external_plugins'));
         // Register the colourpicker JavaScript.
         nxt_register_script('woo-colourpicker', $this->framework_url() . 'js/colorpicker.js', array('jquery'), '3.6', true);
         // Loaded into the footer.
         nxt_enqueue_script('woo-colourpicker');
         // Register the colourpicker CSS.
         nxt_register_style('woo-colourpicker', $this->framework_url() . 'css/colorpicker.css');
         nxt_enqueue_style('woo-colourpicker');
         // Register the custom CSS styles.
         nxt_register_style('woo-shortcode-generator', $this->framework_url() . 'css/shortcode-generator.css');
         nxt_enqueue_style('woo-shortcode-generator');
     }
     // End IF Statement
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:20,代码来源:admin-shortcode-generator.php

示例9: dpa_add_css

/**
 * Enqueues CSS files.
 *
 * @since 2.0
 * @global object $bp BuddyPress global settings
 */
function dpa_add_css()
{
    global $bp;
    if (is_active_widget(false, false, 'achievements-sitewide') || is_active_widget(false, false, 'achievements-available-achievements') || is_active_widget(false, false, 'achievements-member-achievements') || is_active_widget(false, false, 'achievements-featured-achievement') || is_active_widget(false, false, 'achievements-member-achievements-available') || is_active_widget(false, false, 'achievements-member-points')) {
        nxt_enqueue_style('achievements-widget', plugins_url('/css/widget.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
    }
    if (!bp_is_current_component($bp->achievements->slug)) {
        if (bp_is_active('activity') && bp_is_activity_component() && !bp_is_blog_page() || bp_is_component_front_page('activity') && bp_is_front_page()) {
            nxt_enqueue_style('achievements-directory', plugins_url('/css/directory.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
        }
        nxt_print_styles();
        return;
    }
    if (DPA_SLUG_CREATE == $bp->current_action && dpa_permission_can_user_create() || DPA_SLUG_ACHIEVEMENT_EDIT == $bp->current_action && dpa_permission_can_user_edit() || DPA_SLUG_ACHIEVEMENT_CHANGE_PICTURE == $bp->current_action && dpa_permission_can_user_change_picture() || DPA_SLUG_ACHIEVEMENT_GRANT == $bp->current_action && dpa_permission_can_user_grant()) {
        nxt_enqueue_style('achievements-admin', plugins_url('/css/admin.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
    }
    if ($bp->is_single_item) {
        nxt_enqueue_style('achievements-detail', plugins_url('/css/detail.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
    } else {
        nxt_enqueue_style('achievements-directory', plugins_url('/css/directory.css', __FILE__), array(), ACHIEVEMENTS_VERSION);
    }
    nxt_print_styles();
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:29,代码来源:achievements-cssjs.php

示例10: bp_tpack_enqueue_styles

/**
 * Enqueues BuddyPress basic styles
 *
 * @since 1.2
 */
function bp_tpack_enqueue_styles()
{
    // Do not enqueue CSS if it's disabled
    if (get_option('bp_tpack_disable_css')) {
        return;
    }
    // BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>')) {
        $stylesheet = 'bp.css';
        // Bump this when changes are made to bust cache
        $version = '20110918';
    } else {
        $stylesheet = 'bp-backpat.css';
        $version = '20110729';
    }
    // Add the wireframe BP page styles
    nxt_enqueue_style('bp', plugins_url('/bp-template-pack/') . $stylesheet, array(), $version);
    // Enqueue RTL styles for BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>') && is_rtl()) {
        nxt_enqueue_style('bp-rtl', plugins_url('/bp-template-pack/') . 'bp-rtl.css', array('bp'), $version);
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:27,代码来源:bpt-functions.php

示例11: handle_style_conditions

 /**
  * Handle enqueing styles when specific conditions are met
  *
  * @internal
  */
 public function handle_style_conditions()
 {
     // loop through styles and check if conditions are set
     foreach ($this->styles as $handle => $config_map) {
         // and conditions in stack?
         if (count($config_map->item_at(self::TRIGGER_CONDS))) {
             // check if ANY of the conditions eval to true
             foreach ($config_map->item_at(self::TRIGGER_CONDS) as $callback) {
                 // try to exec the callback
                 if (function_exists($callback) && call_user_func_array($callback, $config_map->item_at(self::TRIGGER_PARAMS)->to_array()) == true) {
                     // callback exists and evaled to true, enqueue it
                     nxt_enqueue_style($handle);
                     // done with this inner (conditions) loop
                     break;
                 }
             }
         }
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:24,代码来源:scheme_enqueue.php

示例12: bp_core_add_admin_menu_styles

/**
 * Loads admin panel styles and scripts.
 *
 * @package BuddyPress Core
 * @since {@internal Unknown}}
 */
function bp_core_add_admin_menu_styles()
{
    if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
        nxt_enqueue_style('bp-admin-css', apply_filters('bp_core_admin_css', BP_PLUGIN_URL . '/bp-core/css/admin.dev.css'), array(), '20110723');
    } else {
        nxt_enqueue_style('bp-admin-css', apply_filters('bp_core_admin_css', BP_PLUGIN_URL . '/bp-core/css/admin.css'), array(), '20110723');
    }
    nxt_enqueue_script('thickbox');
    nxt_enqueue_style('thickbox');
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:16,代码来源:bp-core-admin.php

示例13: nxt_iframe

/**
 * {@internal Missing Short Description}}
 *
 * Wrap iframe content (produced by $content_func) in a doctype, html head/body
 * etc any additional function args will be passed to content_func.
 *
 * @since 2.5.0
 *
 * @param unknown_type $content_func
 */
function nxt_iframe($content_func)
{
    _nxt_admin_html_begin();
    ?>
<title><?php 
    bloginfo('name');
    ?>
 &rsaquo; <?php 
    _e('Uploads');
    ?>
 &#8212; <?php 
    _e('NXTClass');
    ?>
</title>
<?php 
    nxt_enqueue_style('colors');
    // Check callback name for 'media'
    if (is_array($content_func) && !empty($content_func[1]) && 0 === strpos((string) $content_func[1], 'media') || !is_array($content_func) && 0 === strpos($content_func, 'media')) {
        nxt_enqueue_style('media');
    }
    nxt_enqueue_style('ie');
    ?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof nxtOnload!='function'){nxtOnload=func;}else{var oldonload=nxtOnload;nxtOnload=function(){oldonload();func();}}};
var userSettings = {'url':'<?php 
    echo SITECOOKIEPATH;
    ?>
','uid':'<?php 
    if (!isset($current_user)) {
        $current_user = nxt_get_current_user();
    }
    echo $current_user->ID;
    ?>
','time':'<?php 
    echo time();
    ?>
'};
var ajaxurl = '<?php 
    echo admin_url('admin-ajax.php');
    ?>
', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
isRtl = <?php 
    echo (int) is_rtl();
    ?>
;
//]]>
</script>
<?php 
    do_action('admin_enqueue_scripts', 'media-upload-popup');
    do_action('admin_print_styles-media-upload-popup');
    do_action('admin_print_styles');
    do_action('admin_print_scripts-media-upload-popup');
    do_action('admin_print_scripts');
    do_action('admin_head-media-upload-popup');
    do_action('admin_head');
    if (is_string($content_func)) {
        do_action("admin_head_{$content_func}");
    }
    ?>
</head>
<body<?php 
    if (isset($GLOBALS['body_id'])) {
        echo ' id="' . $GLOBALS['body_id'] . '"';
    }
    ?>
 class="no-js">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js', 'js');
</script>
<?php 
    $args = func_get_args();
    $args = array_slice($args, 1);
    call_user_func_array($content_func, $args);
    do_action('admin_print_footer_scripts');
    ?>
<script type="text/javascript">if(typeof nxtOnload=='function')nxtOnload();</script>
</body>
</html>
<?php 
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:91,代码来源:media.php

示例14: load_editor

 /**
  * load_editor()
  *
  * Loads editor scripts and styles
  */
 function load_editor()
 {
     do_action('courseware_editor');
     nxt_enqueue_script('assignments');
     nxt_enqueue_style('datetimepicker');
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:11,代码来源:assignments.class.php

示例15: bp_dtheme_enqueue_styles

 /**
  * Enqueue theme CSS safely
  *
  * For maximum flexibility, BuddyPress Default's stylesheet is enqueued, using nxt_enqueue_style().
  * If you're building a child theme of bp-default, your stylesheet will also be enqueued,
  * automatically, as dependent on bp-default's CSS. For this reason, bp-default child themes are
  * not recommended to include bp-default's stylesheet using @import.
  *
  * If you would prefer to use @import, or would like to change the way in which stylesheets are
  * enqueued, you can override bp_dtheme_enqueue_styles() in your theme's functions.php file.
  *
  * @see http://codex.nxtclass.org/Function_Reference/nxt_enqueue_style
  * @see http://codex.buddypress.org/releases/1-5-developer-and-designer-information/
  * @since 1.5
  */
 function bp_dtheme_enqueue_styles()
 {
     // Bump this when changes are made to bust cache
     $version = '20120110';
     // Register our main stylesheet
     nxt_register_style('bp-default-main', get_template_directory_uri() . '/_inc/css/default.css', array(), $version);
     // If the current theme is a child of bp-default, enqueue its stylesheet
     if (is_child_theme() && 'bp-default' == get_template()) {
         nxt_enqueue_style(get_stylesheet(), get_stylesheet_uri(), array('bp-default-main'), $version);
     }
     // Enqueue the main stylesheet
     nxt_enqueue_style('bp-default-main');
     // Default CSS RTL
     if (is_rtl()) {
         nxt_enqueue_style('bp-default-main-rtl', get_template_directory_uri() . '/_inc/css/default-rtl.css', array('bp-default-main'), $version);
     }
     // Responsive layout
     if (current_theme_supports('bp-default-responsive')) {
         nxt_enqueue_style('bp-default-responsive', get_template_directory_uri() . '/_inc/css/responsive.css', array('bp-default-main'), $version);
         if (is_rtl()) {
             nxt_enqueue_style('bp-default-responsive-rtl', get_template_directory_uri() . '/_inc/css/responsive-rtl.css', array('bp-default-responsive'), $version);
         }
     }
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:39,代码来源:functions.php


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