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');
 }
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');
    }
}
 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');
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 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'));
 }
 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
 }
 /**
  * Enqueues the JavaScript needed for displaying the videos page.
  *
  * @access private
  * @since 0.1
  */
 public function _add_playlist_page_scripts()
 {
     nxt_register_script($this->get_uid(), ClassBlogs_Utils::get_base_js_url() . 'youtube-class-playlist.js', array('jquery'), ClassBlogs_Settings::VERSION);
     nxt_enqueue_script($this->get_uid());
 }
 /**
  * Register a script with data from a config map
  *
  * @param string $handle
  * @param string $config_map
  */
 private function register_script($handle, $config_map)
 {
     $deps = array();
     foreach ($config_map->item_at(self::TRIGGER_DEPS)->to_array() as $dep) {
         if ($this->scripts->contains($dep) || nxt_script_is($dep, 'registered')) {
             array_push($deps, $dep);
         }
     }
     // do it
     nxt_register_script($handle, $config_map->item_at(self::TRIGGER_PATH), $deps);
 }
function woo_custom_nav_scripts()
{
    //STYLES AND JAVASCRIPT
    nxt_enqueue_script('jquery');
    nxt_enqueue_script('jquery-ui-core');
    nxt_enqueue_script('jquery-ui-draggable');
    nxt_enqueue_script('jquery-ui-droppable');
    nxt_enqueue_script('jquery-ui-sortable');
    nxt_enqueue_script('jquery-ui-dialog');
    nxt_register_script('woo-nav-dynamic', get_template_directory_uri() . '/functions/js/custom_menu_dynamic_items.js', array('jquery-ui-dialog'));
    nxt_enqueue_script('woo-nav-dynamic');
    nxt_register_script('woo-nav-initial', get_template_directory_uri() . '/functions/js/custom_menu_initial_items.js', array('jquery-ui-dialog'));
    nxt_enqueue_script('woo-nav-initial');
    nxt_register_script('woo-nav-autocomplete', get_template_directory_uri() . '/functions/js/jquery.autocomplete.js', array('jquery'));
    nxt_enqueue_script('woo-nav-autocomplete');
    //Default Style
    echo '<link rel="stylesheet" href="' . get_template_directory_uri() . '/functions/css/custom_menu.css" type="text/css" media="all" />';
}
Esempio n. 10
0
 /**
  * Adds the plugin's admin JavaScript to the page.
  *
  * This uses the value of the `$admin_media` member variable to determine
  * which admin files should be added.
  *
  * @access private
  * @since 0.1
  */
 public function _add_admin_js()
 {
     if (array_key_exists('js', $this->admin_media) && !empty($this->admin_media['js'])) {
         $js_url = ClassBlogs_Utils::get_base_js_url();
         foreach ($this->admin_media['js'] as $js_file) {
             nxt_register_script($this->get_uid(), $js_url . $js_file, array('jquery'), ClassBlogs_Settings::VERSION, true);
         }
         nxt_print_scripts($this->get_uid());
     }
 }
Esempio n. 11
0
 function woo_load_only()
 {
     add_action('admin_head', 'woo_admin_head', 10);
     nxt_register_script('jquery-ui-datepicker', get_template_directory_uri() . '/functions/js/ui.datepicker.js', array('jquery-ui-core'));
     nxt_register_script('jquery-input-mask', get_template_directory_uri() . '/functions/js/jquery.maskedinput-1.2.2.js', array('jquery'));
     nxt_register_script('woo-scripts', get_template_directory_uri() . '/functions/js/woo-scripts.js', array('jquery'));
     nxt_register_script('woo-admin-interface', get_template_directory_uri() . '/functions/js/woo-admin-interface.js', array('jquery'), '5.3.5');
     nxt_register_script('colourpicker', get_template_directory_uri() . '/functions/js/colorpicker.js', array('jquery'));
     nxt_enqueue_script('jquery-ui-datepicker');
     nxt_enqueue_script('jquery-input-mask');
     nxt_enqueue_script('woo-scripts');
     nxt_enqueue_script('colourpicker');
     nxt_enqueue_script('woo-admin-interface');
     nxt_enqueue_script('woo-custom-fields');
     nxt_enqueue_script('jquery-ui-slider');
     // Register the typography preview JavaScript.
     nxt_register_script('woo-typography-preview', get_template_directory_uri() . '/functions/js/woo-typography-preview.js', array('jquery'), '1.0.0', true);
     nxt_enqueue_script('woo-typography-preview');
 }
Esempio n. 12
0
 /**
  * BPSP_Static()
  *
  * Constructor, registers enqueues.
  */
 function BPSP_Static()
 {
     if (!defined(BPSP_VERSION)) {
         define(BPSP_VERSION, '');
     }
     // Scripts
     // Custom jQuery UI components
     nxt_register_script('jquery-ui-datepicker', BPSP_WEB_URI . '/static/js/jquery-ui/jquery.ui.datepicker.js', array('jquery-ui-mouse'), '1.8.12', true);
     nxt_register_script('jquery-ui-slider', BPSP_WEB_URI . '/static/js/jquery-ui/jquery.ui.slider.js', array('jquery-ui-mouse'), '1.8.12', true);
     // FullCalendar
     nxt_register_script('fullcalendar', BPSP_WEB_URI . '/static/js/fullcalendar/fullcalendar.min.js', array('jquery-ui-droppable', 'jquery-ui-resizable'), '1.4.7');
     nxt_localize_script('fullcalendar', 'fcLanguage', $this->fullcalendar_l10n());
     // jQuery UI Date & Time picker
     nxt_register_script('datetimepicker', BPSP_WEB_URI . '/static/js/datetimepicker/jquery-ui-timepicker-addon.js', array('jquery-ui-datepicker', 'jquery-ui-slider'), '0.9.8', true);
     nxt_localize_script('datetimepicker', 'dtpLanguage', $this->datetimepicker_l10n());
     // Flexselect
     nxt_register_script('liquidmetal', BPSP_WEB_URI . '/static/js/flexselect/liquidmetal.js', null, '0.1');
     nxt_register_script('flexselect', BPSP_WEB_URI . '/static/js/flexselect/jquery.flexselect.js', array('jquery', 'liquidmetal'), '0.2');
     // DataTables
     nxt_register_script('datatables', BPSP_WEB_URI . '/static/js/datatables/jquery.dataTables.min.js', array('jquery'), '1.6.2');
     // Localize datatables
     nxt_localize_script('datatables', 'oLanguage', $this->datatables_l10n());
     // InputHint
     nxt_register_script('inputhint', BPSP_WEB_URI . '/static/js/inputhint/jquery.inputhint.js', array('jquery'), '1.0');
     // Sprakline
     nxt_register_script('sparkline', BPSP_WEB_URI . '/static/js/sparkline/jquery.sparkline.min.js', array('jquery'), '1.6');
     // jsTree
     nxt_register_script('jstree', BPSP_WEB_URI . '/static/js/jstree/jquery.jstree.js', array('jquery'), '1.0-rc3');
     // formBuilder
     nxt_register_script('formbuilder', BPSP_WEB_URI . '/static/js/formbuilder/jquery.formbuilder.min.js', array('jquery'), '0.3.1');
     nxt_localize_script('formbuilder', 'fbLanguage', $this->formbuilder_l10n());
     // WordCounter
     nxt_register_script('word-counter', site_url() . '/nxt-admin/js/word-count.js', array('jquery'));
     // Loaders
     nxt_register_script('courseware-editor', BPSP_WEB_URI . '/static/js/courseware-editor.js', array('inputhint', 'word-counter'), BPSP_VERSION, true);
     nxt_register_script('list-assignments', BPSP_WEB_URI . '/static/js/list-assignments.js', array('datatables'), BPSP_VERSION, true);
     nxt_register_script('single-assignment', BPSP_WEB_URI . '/static/js/single-assignment.js', array('jquery'), BPSP_VERSION, true);
     nxt_register_script('assignments', BPSP_WEB_URI . '/static/js/assignments.js', array('datetimepicker'), BPSP_VERSION, true);
     nxt_register_script('bibliography', BPSP_WEB_URI . '/static/js/bibliography.js', array('flexselect', 'datatables'), BPSP_VERSION, true);
     nxt_register_script('new-bibliograpy', BPSP_WEB_URI . '/static/js/new-bibliograpy.js', array('inputhint'), BPSP_VERSION, true);
     nxt_register_script('edit-bibliograpy', BPSP_WEB_URI . '/static/js/edit-bibliograpy.js', array('inputhint'), BPSP_VERSION, true);
     nxt_register_script('gradebook', BPSP_WEB_URI . '/static/js/gradebook.js', array('datatables'), BPSP_VERSION, true);
     nxt_register_script('schedules', BPSP_WEB_URI . '/static/js/schedules.js', array('datatables', 'datetimepicker', 'inputhint'), BPSP_VERSION, true);
     nxt_register_script('list-schedules', BPSP_WEB_URI . '/static/js/list-schedules.js', array('fullcalendar', 'datatables'), BPSP_VERSION, true);
     nxt_register_script('delete-schedule', BPSP_WEB_URI . '/static/js/delete-schedule.js', array('datatables'), BPSP_VERSION, true);
     nxt_register_script('group-dashboard', BPSP_WEB_URI . '/static/js/group-dashboard.js', array('sparkline'), BPSP_VERSION, true);
     nxt_register_script('lectures', BPSP_WEB_URI . '/static/js/lectures.js', array('jstree'), BPSP_VERSION, true);
     nxt_register_script('new-assignment', BPSP_WEB_URI . '/static/js/new-assignment.js', array('courseware-editor', 'formbuilder', 'jquery-ui-sortable'), BPSP_VERSION, true);
     nxt_register_script('edit-assignment', BPSP_WEB_URI . '/static/js/edit-assignment.js', array('courseware-editor', 'formbuilder', 'jquery-ui-sortable'), BPSP_VERSION, true);
     // Styles
     nxt_register_style('courseware', BPSP_WEB_URI . '/static/css/courseware.css', null, BPSP_VERSION);
     nxt_register_style('courseware-editor', BPSP_WEB_URI . '/static/css/courseware-editor.css', null, BPSP_VERSION);
     nxt_register_style('jquery-ui-courseware-custom', BPSP_WEB_URI . '/static/css/jquery-ui-custom/theme/smoothness/jquery-ui-custom.css', '1.8.2');
     nxt_register_style('fullcalendar', BPSP_WEB_URI . '/static/css/fullcalendar/jquery.fullcalendar.css', null, '1.4.7');
     nxt_register_style('datatables', BPSP_WEB_URI . '/static/css/datatables/jquery.datatables.css', null, '1.6.2');
     nxt_register_style('datetimepicker', BPSP_WEB_URI . '/static/css/datetimepicker/jquery.timepicker.css', array('jquery-ui-courseware-custom'), '0.5');
     nxt_register_style('flexselect', BPSP_WEB_URI . '/static/css/flexselect/jquery.flexselect.css', null, '0.2');
     nxt_register_style('formbuilder', BPSP_WEB_URI . '/static/css/formbuilder/jquery.formbuilder.css', null, '0.3-beta');
     // Hooks
     add_action('bp_head', array(&$this, 'load_courseware_css'));
     add_action('courseware_editor', array(&$this, 'courseware_editor_enqueues'));
     add_action('courseware_list_schedules_screen', array(&$this, 'list_schedules_enqueues'));
     add_action('courseware_list_assignments_screen', array(&$this, 'list_assignments_enqueues'));
     add_action('courseware_assignment_screen', array(&$this, 'assignment_enqueues'));
     add_action('courseware_bibliography_screen', array(&$this, 'bibs_enqueues'));
     add_action('courseware_new_bibliography_screen', array(&$this, 'new_bib_enqueues'));
     add_action('courseware_edit_bibliography_screen', array(&$this, 'edit_bib_enqueues'));
     add_action('courseware_new_schedule_screen', array(&$this, 'schedules_enqueues'));
     add_action('courseware_edit_schedule_screen', array(&$this, 'schedules_enqueues'));
     add_action('courseware_delete_schedule_screen', array(&$this, 'delete_schedule_enqueues'));
     add_action('courseware_gradebook_screen', array(&$this, 'gradebook_enqueues'));
     add_action('courseware_group_dashboard', array(&$this, 'group_dashboard_enqueues'));
     add_action('courseware_lectures_screen', array(&$this, 'lectures_enqueues'));
     add_action('courseware_new_assignment_screen', array(&$this, 'new_assignment_enqueues'));
     add_action('courseware_edit_assignment_screen', array(&$this, 'edit_assignment_enqueues'));
 }
Esempio n. 13
0
 /**
  * Admin init
  *
  * @return void
  */
 function admin_init()
 {
     nxt_register_style('w3tc-options', plugins_url('pub/css/options.css', W3TC_FILE));
     nxt_register_style('w3tc-lightbox', plugins_url('pub/css/lightbox.css', W3TC_FILE));
     nxt_register_style('w3tc-widget', plugins_url('pub/css/widget.css', W3TC_FILE));
     nxt_register_script('w3tc-metadata', plugins_url('pub/js/metadata.js', W3TC_FILE));
     nxt_register_script('w3tc-options', plugins_url('pub/js/options.js', W3TC_FILE));
     nxt_register_script('w3tc-lightbox', plugins_url('pub/js/lightbox.js', W3TC_FILE));
     nxt_register_script('w3tc-widget', plugins_url('pub/js/widget.js', W3TC_FILE));
 }
Esempio n. 14
0
function et_epanel_media_upload_scripts()
{
    nxt_enqueue_script('media-upload');
    nxt_enqueue_script('thickbox');
    nxt_register_script('my-upload', get_template_directory_uri() . '/epanel/js/custom_uploader.js', array('jquery', 'media-upload', 'thickbox'));
    nxt_enqueue_script('my-upload');
}
 public function onnxtEnqueueScripts()
 {
     $bInFooter = self::getOption('js_head') == 'Y' ? false : true;
     $sBootstrapOption = self::getOption('option');
     if (self::getOption('prettify') == 'Y') {
         $sUrlPrefix = self::$PLUGIN_URL . 'js/google-code-prettify/';
         nxt_register_script('prettify_script', $sUrlPrefix . 'prettify.js', '', self::$VERSION, $bInFooter);
         nxt_enqueue_script('prettify_script');
     }
     if (preg_match("/^twitter/", $sBootstrapOption)) {
         $sTwitterVersion = self::TwitterVersionLegacy;
         $aBootstrapJsOptions = array('alert' => self::getOption('alert_js'), 'button' => self::getOption('button_js'), 'dropdown' => self::getOption('dropdown_js'), 'modal' => self::getOption('modal_js'), 'tooltip' => self::getOption('tooltip_js'), 'popover' => self::getOption('popover_js'), 'scrollspy' => self::getOption('scrollspy_js'), 'tab' => self::getOption('tab_js'));
         if ($sBootstrapOption == 'twitter') {
             $aBootstrapJsOptions['transition'] = self::getOption('transition_js');
             // Bootstrap v2.0+
             $aBootstrapJsOptions['collapse'] = self::getOption('collapse_js');
             // Bootstrap v2.0+
             $aBootstrapJsOptions['carousel'] = self::getOption('carousel_js');
             // Bootstrap v2.0+
             $aBootstrapJsOptions['typeahed'] = self::getOption('typeahed_js');
             // Bootstrap v2.0+
             $sTwitterVersion = self::TwitterVersion;
         }
         $sUrlPrefix = self::$PLUGIN_URL . 'resources/bootstrap-' . $sTwitterVersion . '/js/bootstrap';
         /* removed - no longer supported
         			if ( self::getOption( 'hotlink' ) == 'Y' && ($sTwitterVersion == self::TwitterVersionLegacy) ) {
         				$sUrlPrefix = 'http://twitter.github.com/bootstrap/'.$sTwitterVersion.'/bootstrap-';
         			}
         			*/
         if (self::getOption('all_js') == 'Y' && $sTwitterVersion == self::TwitterVersion) {
             nxt_register_script('bootstrap-all-min', $sUrlPrefix . '.min.js', '', self::$VERSION, $bInFooter);
             nxt_enqueue_script('bootstrap-all-min');
         } else {
             foreach ($aBootstrapJsOptions as $sJsLib => $sDisplay) {
                 if ($sDisplay == 'Y') {
                     $sUrl = $sUrlPrefix . '-' . $sJsLib . '.js';
                     nxt_register_script('bootstrap' . $sJsLib, $sUrl, '', self::$VERSION, $bInFooter);
                     nxt_enqueue_script('bootstrap' . $sJsLib);
                 }
             }
         }
         //Include the JS to "activate" all the tooltips & popovers.
         //From Version 2.0.1a this was moved "inline" using hooks to nxt_footer
         /*
         if ( self::getOption( 'tooltip_js' ) == 'Y'
         		|| self::getOption( 'popover_js' ) == 'Y'
         		|| (self::getOption( 'all_js' ) == 'Y' && $sTwitterVersion == self::TwitterVersion) ) {
         
         	$sScriptVersion = self::$PLUGIN_URL.'resources/misc/js/plugin/auto_tooltip_popover.js';
         	if ($sBootstrapOption == 'twitter-legacy') {
         		$sScriptVersion = self::$PLUGIN_URL.'resources/misc/js/plugin/auto_tooltip_popover-tbs140.js';
         	}
         	//nxt_register_script( 'plugin_auto_tooltip_popover', $sScriptVersion, '', self::$VERSION, $bInFooter );
         	//nxt_enqueue_script( 'plugin_auto_tooltip_popover' );
         }
         */
     }
 }
Esempio n. 16
0
 function huddle_load_js()
 {
     global $is_IE;
     if (is_admin()) {
     } else {
         nxt_deregister_script('jquery');
         nxt_deregister_script('l10n');
         nxt_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
         nxt_register_script('html5shim', 'http://html5shim.googlecode.com/svn/trunk/html5.js');
         nxt_register_script('superfish', get_template_directory_uri() . '/js/superfish.js', array('jquery'));
         nxt_register_script('buddypress', get_template_directory_uri() . '/js/buddypress.js', array('jquery'));
         nxt_register_script('colorbox', get_template_directory_uri() . '/js/jquery.colorbox-min.js', array('jquery'));
         nxt_register_script('theme_custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), 1.0, TRUE);
         nxt_enqueue_script(array('superfish', 'colorbox', 'buddypress', 'theme_custom'));
         if (is_single()) {
             nxt_enqueue_script('comment-reply');
         }
         if ($is_IE) {
             nxt_enqueue_script('html5shim');
         }
     }
 }
Esempio n. 17
0
 /**
  * Register a ICE script
  *
  * @param string $handle
  * @param string $src
  * @param array $deps
  */
 private function register_script($handle, $src, $deps = false)
 {
     return nxt_register_script($handle, sprintf('%s/%s', ICE_JS_URL, $src), $deps, ICE_VERSION);
 }
24. LinkedIn Button
  24.1 Load Javascript for LinkedIn Button
25. Google +1 Button
  25.1 Load Javascript for Google +1 Button
Esempio n. 19
0
/**
 * woo_custom_enqueue function.
 * 
 * @description Enqueue JavaScript files used with the custom fields.
 * @access public
 * @param string $hook
 * @since 2.6.0
 * @return void
 */
function woo_custom_enqueue($hook)
{
    nxt_register_script('jquery-ui-datepicker', get_template_directory_uri() . '/functions/js/ui.datepicker.js', array('jquery-ui-core'));
    nxt_register_script('jquery-input-mask', get_template_directory_uri() . '/functions/js/jquery.maskedinput-1.2.2.js', array('jquery'));
    nxt_register_script('woo-custom-fields', get_template_directory_uri() . '/functions/js/woo-custom-fields.js', array('jquery'));
    if (in_array($hook, array('post.php', 'post-new.php', 'page-new.php', 'page.php'))) {
        nxt_enqueue_script('jquery-ui-datepicker');
        nxt_enqueue_script('jquery-input-mask');
        nxt_enqueue_script('woo-custom-fields');
    }
}
Esempio n. 20
0
 public function add_comment_js()
 {
     if (!(is_page() || is_single())) {
         return;
     }
     if ($this->options['appearance']['comment_editor'] != 't') {
         return;
     }
     // if W3 Total Cache is enabled, turn off minify for page with CKEditor in comments
     if (is_plugin_active('w3-total-cache/w3-total-cache.php')) {
         define('DONOTMINIFY', true);
     }
     nxt_enqueue_script('ckeditor', $this->ckeditor_path . $this->options['advanced']['load_method']);
     nxt_enqueue_script('ckeditor.utils', $this->plugin_path . 'includes/ckeditor.utils.js', array('ckeditor', 'jquery'));
     nxt_deregister_script('comment-reply');
     nxt_register_script('comment-reply', $this->plugin_path . 'includes/ckeditor.comment-reply.js', array('ckeditor', 'ckeditor.utils'), "20100901");
     $this->generate_js_options(true);
     $this->add_nxtcompat_styles();
 }