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

PHP nxt_enqueue_script函数代码示例

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

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



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

示例1: 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


示例2: init_scripts

 /**
  */
 public function init_scripts()
 {
     parent::init_scripts();
     if (is_admin()) {
         nxt_enqueue_script('jquery-jstree');
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:9,代码来源:class.php


示例3: woo_load_tumblog_libraries

function woo_load_tumblog_libraries()
{
    nxt_enqueue_script('newscript', get_template_directory_uri() . '/functions/js/tumblog-ajax.js', array('jquery', 'jquery-form'));
    nxt_enqueue_script('nicedit', get_template_directory_uri() . '/functions/js/nicEdit.js');
    nxt_enqueue_script('phpjs', get_template_directory_uri() . '/functions/js/php.js');
    nxt_enqueue_script('datepicker', get_template_directory_uri() . '/functions/js/ui.datepicker.js', array('jquery'));
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:7,代码来源:admin-tumblog-quickpress.php


示例4: members_admin_enqueue_scripts

/**
 * Loads the admin JavaScript 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_scripts($hook_suffix)
{
    $pages = array('users_page_roles', 'users_page_role-new');
    if (in_array($hook_suffix, $pages)) {
        nxt_enqueue_script('members-admin', trailingslashit(MEMBERS_URI) . 'js/admin.js', array('jquery'), '20110525', true);
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:13,代码来源:admin.php


示例5: et_ptemplate_upload_categories_scripts

function et_ptemplate_upload_categories_scripts($hook_suffix)
{
    if (in_array($hook_suffix, array('post.php', 'post-new.php'))) {
        nxt_register_script('et-ptemplates', get_template_directory_uri() . '/epanel/page_templates/js/et-ptemplates.js', array('jquery'));
        nxt_enqueue_script('et-ptemplates');
    }
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:7,代码来源:page_templates.php


示例6: 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


示例7: optionsframework_mlu_js

 function optionsframework_mlu_js()
 {
     // Registers custom scripts for the Media Library AJAX uploader.
     nxt_register_script('of-medialibrary-uploader', OPTIONS_FRAMEWORK_DIRECTORY . 'js/of-medialibrary-uploader.js', array('jquery', 'thickbox'));
     nxt_enqueue_script('of-medialibrary-uploader');
     nxt_enqueue_script('media-upload');
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:7,代码来源:options-medialibrary-uploader.php


示例8: woothemes_mlu_js

 function woothemes_mlu_js()
 {
     // Register custom scripts for the Media Library AJAX uploader.
     nxt_register_script('woo-medialibrary-uploader', get_template_directory_uri() . '/functions/js/woo-medialibrary-uploader.js', array('jquery', 'thickbox'));
     nxt_enqueue_script('woo-medialibrary-uploader');
     nxt_enqueue_script('media-upload');
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:7,代码来源:admin-medialibrary-uploader.php


示例9: woothemes_add_javascript

 function woothemes_add_javascript()
 {
     global $woo_options;
     nxt_register_script('slides', get_template_directory_uri() . '/includes/js/slides.min.jquery.js', array('jquery'));
     nxt_register_script('prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto.js', array('jquery'));
     nxt_register_script('jCarousel', get_template_directory_uri() . '/includes/js/jquery.jcarousel.min.js', array('jquery'));
     nxt_register_script('portfolio', get_template_directory_uri() . '/includes/js/portfolio.js', array('jquery', 'prettyPhoto', 'jCarousel', 'slides'));
     nxt_register_script('woo-feedback', get_template_directory_uri() . '/includes/js/feedback.js', array('jquery', 'slides'));
     // Load the prettyPhoto JavaScript and CSS for use on the portfolio page template.
     if (is_page_template('template-portfolio.php') || is_front_page() || is_singular() && get_post_type() == 'portfolio' || is_tax('portfolio-gallery')) {
         nxt_enqueue_script('portfolio');
     }
     // Conditionally load the Feedback JavaScript, where needed.
     $load_feedback_js = false;
     if (is_page_template('template-feedback.php')) {
         $load_feedback_js = true;
     }
     // Allow child themes/plugins to load the Feedback JavaScript when they need it.
     $load_feedback_js = apply_filters('woo_load_feedback_js', $load_feedback_js);
     if ($load_feedback_js) {
         nxt_enqueue_script('woo-feedback');
     }
     do_action('woothemes_add_javascript');
     $general_dependencies = array('jquery');
     if (is_singular()) {
         $general_dependencies[] = 'jquery-ui-tabs';
     }
     nxt_enqueue_script('general', get_template_directory_uri() . '/includes/js/general.js', $general_dependencies);
     // Load the JavaScript for the slides and testimonals on the homepage.
     if (is_home()) {
         nxt_enqueue_script('slides');
         // Load the custom slider settings.
         $autoStart = false;
         $autoSpeed = 6;
         $slideSpeed = 0.5;
         $effect = 'slide';
         $nextprev = 'true';
         $pagination = 'true';
         $hoverpause = 'true';
         $autoheight = 'false';
         // Get our values from the database and, if they're there, override the above defaults.
         $fields = array('autoStart' => 'auto', 'autoSpeed' => 'interval', 'slideSpeed' => 'speed', 'effect' => 'effect', 'nextprev' => 'nextprev', 'pagination' => 'pagination', 'hoverpause' => 'hover', 'autoHeight' => 'autoheight');
         foreach ($fields as $k => $v) {
             if (is_array($woo_options) && isset($woo_options['woo_slider_' . $v]) && $woo_options['woo_slider_' . $v] != '') {
                 ${$k} = $woo_options['woo_slider_' . $v];
             }
         }
         // Set auto speed to 0 if we want to disable automatic sliding.
         if ($autoStart == 'false') {
             $autoSpeed = 0;
         }
         $data = array('speed' => $slideSpeed, 'auto' => $autoSpeed, 'effect' => $effect, 'nextprev' => $nextprev, 'pagination' => $pagination, 'hoverpause' => $hoverpause, 'autoheight' => $autoHeight);
         nxt_localize_script('general', 'woo_slider_settings', $data);
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:55,代码来源:theme-js.php


示例10: init_scripts

 /**
  * @internal copied from bp-default/functions.php
  */
 public function init_scripts()
 {
     parent::init_scripts();
     // Bump this when changes are made to bust cache
     $version = '20120110';
     // the global BuddyPress JS - Ajax will not work without it
     nxt_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), $version);
     // Add words that we need to use in JS to the end of the page so they can be translated and still used.
     $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'view' => __('View', 'buddypress'), 'mark_as_fav' => __('Favorite', 'buddypress'), 'remove_fav' => __('Remove Favorite', 'buddypress'));
     nxt_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:14,代码来源:class.php


示例11: __construct

 function __construct()
 {
     $widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest groups', 'buddypress'));
     parent::__construct(false, __('Groups', 'buddypress'), $widget_ops);
     if (is_active_widget(false, false, $this->id_base) && !is_admin() && !is_network_admin()) {
         if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
             nxt_enqueue_script('groups_widget_groups_list-js', BP_PLUGIN_URL . '/bp-groups/js/widget-groups.dev.js', array('jquery'));
         } else {
             nxt_enqueue_script('groups_widget_groups_list-js', BP_PLUGIN_URL . '/bp-groups/js/widget-groups.js', array('jquery'));
         }
     }
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:12,代码来源:bp-groups-widgets.php


示例12: init_scripts

 /**
  */
 public function init_scripts()
 {
     parent::init_scripts();
     if (is_admin()) {
         // need uploader plugin, ajax response, image editor scripts
         nxt_enqueue_script('ice-uploader');
         nxt_enqueue_script('nxt-ajax-response');
         nxt_enqueue_script('image-edit');
         // localize the upload wrapper
         $this->localize_script();
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:14,代码来源:class.php


示例13: __construct

 function __construct()
 {
     $widget_ops = array('description' => __('A dynamic list of recently active, popular, and newest members', 'buddypress'));
     parent::__construct(false, $name = __('Members', 'buddypress'), $widget_ops);
     if (is_active_widget(false, false, $this->id_base) && !is_admin() && !is_network_admin()) {
         if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
             nxt_enqueue_script('bp_core_widget_members-js', BP_PLUGIN_URL . '/bp-core/js/widget-members.dev.js', array('jquery'), '20110723');
         } else {
             nxt_enqueue_script('bp_core_widget_members-js', BP_PLUGIN_URL . '/bp-core/js/widget-members.js', array('jquery'), '20110723');
         }
     }
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:12,代码来源:bp-core-widgets.php


示例14: init_scripts

 /**
  * Enqueue required scripts
  */
 public function init_scripts()
 {
     // call parent
     parent::init_scripts();
     // jQuery UI is always needed
     nxt_enqueue_script('jquery-ui-accordion');
     nxt_enqueue_script('jquery-ui-button');
     nxt_enqueue_script('jquery-ui-dialog');
     nxt_enqueue_script('jquery-ui-progressbar');
     nxt_enqueue_script('jquery-ui-tabs');
     // call localize script *LAST*
     $this->localize_script();
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:16,代码来源:registry.php


示例15: woothemes_add_javascript

 function woothemes_add_javascript()
 {
     global $woo_options;
     nxt_register_script('prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto.js', array('jquery'));
     nxt_register_script('portfolio', get_template_directory_uri() . '/includes/js/portfolio.js', array('jquery', 'prettyPhoto'));
     nxt_register_script('flexslider', get_template_directory_uri() . '/includes/js/jquery.flexslider.min.js', array('jquery'));
     if ((is_home() || is_front_page()) && isset($woo_options['woo_featured']) && $woo_options['woo_featured'] == 'true') {
         nxt_enqueue_script('flexslider');
     }
     if (is_page_template('template-portfolio.php') || is_front_page() || is_singular() && get_post_type() == 'portfolio' || is_tax('portfolio-gallery') || is_post_type_archive('portfolio')) {
         nxt_enqueue_script('portfolio');
     }
     nxt_enqueue_script('third party', get_template_directory_uri() . '/includes/js/third-party.js', array('jquery'));
     nxt_enqueue_script('general', get_template_directory_uri() . '/includes/js/general.js', array('jquery'));
 }
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:15,代码来源:theme-js.php


示例16: dpa_add_js

/**
 * Enqueues JavaScript files.
 *
 * @since 2.0
 * @global object $bp BuddyPress global settings
 */
function dpa_add_js()
{
    global $bp;
    if (!bp_is_current_component($bp->achievements->slug)) {
        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_script('achievements-admin-js', plugins_url('/js/admin.js', __FILE__), array(), ACHIEVEMENTS_VERSION);
    }
    if ($bp->is_single_item) {
        nxt_enqueue_script('achievements-detail-js', plugins_url('/js/detail.js', __FILE__), array(), ACHIEVEMENTS_VERSION);
    } else {
        nxt_enqueue_script('achievements-directory-js', plugins_url('/js/directory.js', __FILE__), array(), ACHIEVEMENTS_VERSION);
    }
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:21,代码来源:achievements-cssjs.php


示例17: xprofile_add_admin_js

function xprofile_add_admin_js()
{
    if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) {
        nxt_enqueue_script('jquery-ui-core');
        nxt_enqueue_script('jquery-ui-tabs');
        nxt_enqueue_script('jquery-ui-mouse');
        nxt_enqueue_script('jquery-ui-draggable');
        nxt_enqueue_script('jquery-ui-droppable');
        nxt_enqueue_script('jquery-ui-sortable');
        if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            nxt_enqueue_script('xprofile-admin-js', BP_PLUGIN_URL . '/bp-xprofile/admin/js/admin.dev.js', array('jquery', 'jquery-ui-sortable'), '20110723');
        } else {
            nxt_enqueue_script('xprofile-admin-js', BP_PLUGIN_URL . '/bp-xprofile/admin/js/admin.js', array('jquery', 'jquery-ui-sortable'), '20110723');
        }
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:16,代码来源:bp-xprofile-cssjs.php


示例18: messages_add_autocomplete_js

function messages_add_autocomplete_js()
{
    global $bp;
    // Include the autocomplete JS for composing a message.
    if (bp_is_messages_component() && bp_is_current_action('compose')) {
        add_action('nxt_head', 'messages_autocomplete_init_jsblock');
        if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            nxt_enqueue_script('bp-jquery-autocomplete', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.autocomplete.dev.js', array('jquery'), '20110723');
            nxt_enqueue_script('bp-jquery-autocomplete-fb', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.autocompletefb.dev.js', array(), '20110723');
            nxt_enqueue_script('bp-jquery-bgiframe', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.bgiframe.dev.js', array(), '20110723');
            nxt_enqueue_script('bp-jquery-dimensions', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.dimensions.dev.js', array(), '20110723');
        } else {
            nxt_enqueue_script('bp-jquery-autocomplete', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.autocomplete.js', array('jquery'), '20110723');
            nxt_enqueue_script('bp-jquery-autocomplete-fb', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.autocompletefb.js', array(), '20110723');
            nxt_enqueue_script('bp-jquery-bgiframe', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.bgiframe.js', array(), '20110723');
            nxt_enqueue_script('bp-jquery-dimensions', BP_PLUGIN_URL . '/bp-messages/js/autocomplete/jquery.dimensions.js', array(), '20110723');
        }
    }
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:19,代码来源:bp-messages-cssjs.php


示例19: 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


示例20: bp_tpack_enqueue_scripts

/**
 * Enqueues BuddyPress JS and related AJAX functions
 *
 * @since 1.2
 */
function bp_tpack_enqueue_scripts()
{
    // Do not enqueue JS if it's disabled
    if (get_option('bp_tpack_disable_js')) {
        return;
    }
    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'));
    // BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>')) {
        // Bump this when changes are made to bust cache
        $version = '20110818';
        $params['view'] = __('View', 'buddypress');
    } else {
        $version = '20110729';
        if (bp_displayed_user_id()) {
            $params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
        }
    }
    // Enqueue the global JS - Ajax will not work without it
    nxt_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), $version);
    // Localize the JS strings
    nxt_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:29,代码来源:bpt-functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nxt_enqueue_style函数代码示例发布时间:2022-05-15
下一篇:
PHP nxt_die函数代码示例发布时间: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