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'); }
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 }
/** * woo_custom_enqueue_css function. * * @description Enqueue CSS files used with the custom fields. * @access public * @author Matty * @since 4.8.0 * @return void */ function woo_custom_enqueue_css() { global $pagenow; nxt_register_style('woo-custom-fields', get_template_directory_uri() . '/functions/css/woo-custom-fields.css'); nxt_register_style('jquery-ui-datepicker', get_template_directory_uri() . '/functions/css/jquery-ui-datepicker.css'); if (in_array($pagenow, array('post.php', 'post-new.php', 'page-new.php', 'page.php'))) { nxt_enqueue_style('woo-custom-fields'); nxt_enqueue_style('jquery-ui-datepicker'); } }
public function onnxtPrintStyles() { if (self::getOption('prettify') == 'Y') { $sUrlPrefix = self::$PLUGIN_URL . 'resources/misc/js/google-code-prettify/'; nxt_register_style('prettify_style', $sUrlPrefix . 'prettify.css'); nxt_enqueue_style('prettify_style'); } }
/** * Register a style with data from a config map * * @param string $handle * @param string $config_map */ private function register_style($handle, $config_map) { if ($this->styles_ignore->contains($handle)) { return; } $deps = array(); foreach ($config_map->item_at(self::TRIGGER_DEPS)->to_array() as $dep) { if ($this->styles->contains($dep) || nxt_style_is($dep, 'registered')) { array_push($deps, $dep); } } // reg it nxt_register_style($handle, $config_map->item_at(self::TRIGGER_PATH), $deps); }
function woo_framework_load_css() { nxt_register_style('woo-admin-interface', get_template_directory_uri() . '/functions/admin-style.css', '', '5.3.10'); nxt_register_style('jquery-ui-datepicker', get_template_directory_uri() . '/functions/css/jquery-ui-datepicker.css'); nxt_register_style('colourpicker', get_template_directory_uri() . '/functions/css/colorpicker.css'); nxt_enqueue_style('woo-admin-interface'); nxt_enqueue_style('jquery-ui-datepicker'); nxt_enqueue_style('colourpicker'); }
/** * 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); } } }
/** * 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)); }
function bbb_admin_init() { nxt_register_style('bbbStylesheet', nxt_PLUGIN_URL . '/bigbluebutton/css/bbb_stylesheet.css'); }
/** * Include OpenID stylesheet. * * "Intelligently" decides whether to enqueue or print the CSS file, based on whether * the 'nxt_print_styles' * action has been run. (This logic taken from the core nxt_admin_css function) **/ function openid_style() { if (!nxt_style_is('openid', 'registered')) { nxt_register_style('openid', plugins_url('openid/f/openid.css'), array(), OPENID_PLUGIN_REVISION); } if (did_action('nxt_print_styles')) { nxt_print_styles('openid'); } else { nxt_enqueue_style('openid'); } }
/** * Call enqueue styles action * * Never call this manually unless you really know what you are doing! * * @internal */ public function do_enqueue_styles() { // already run? if (true === $this->did_styles) { // yep, don't run again return; } else { // update toggle $this->did_styles = true; } // have a custom ui stylesheet? if ($this->ui_stylesheet) { // register custom ui stylesheet nxt_register_style(self::UI_STYLE_HANDLE, $this->ui_stylesheet); } else { // register default ui stylesheet $this->register_style(self::UI_STYLE_HANDLE, 'ui/jquery-ui-1.8.16.custom.css'); } // register default styles $this->register_style('jquery-juicy', 'juicy/jquery.juicy.css', array('@:ui')); $this->register_style('ice-ui', 'ui.css', array('jquery-juicy')); $this->register_style('ice-colorpicker', 'colorpicker.css'); do_action('ice_init_styles'); do_action('ice_register_styles'); do_action('ice_enqueue_styles'); }
function woo_load_frontend_css() { nxt_register_style('woo-layout', get_template_directory_uri() . '/css/layout.css'); nxt_enqueue_style('woo-layout'); }
/** * 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')); }