/** * Show the setup wizard */ public function setup_wizard() { if (empty($_GET['page']) || 'wc-setup' !== $_GET['page']) { return; } $this->steps = array('introduction' => array('name' => __('Introduction', 'woocommerce'), 'view' => array($this, 'wc_setup_introduction'), 'handler' => ''), 'pages' => array('name' => __('Page Setup', 'woocommerce'), 'view' => array($this, 'wc_setup_pages'), 'handler' => array($this, 'wc_setup_pages_save')), 'locale' => array('name' => __('Store Locale', 'woocommerce'), 'view' => array($this, 'wc_setup_locale'), 'handler' => array($this, 'wc_setup_locale_save')), 'shipping_taxes' => array('name' => __('Shipping & Tax', 'woocommerce'), 'view' => array($this, 'wc_setup_shipping_taxes'), 'handler' => array($this, 'wc_setup_shipping_taxes_save')), 'payments' => array('name' => __('Payments', 'woocommerce'), 'view' => array($this, 'wc_setup_payments'), 'handler' => array($this, 'wc_setup_payments_save')), 'next_steps' => array('name' => __('Ready!', 'woocommerce'), 'view' => array($this, 'wc_setup_ready'), 'handler' => '')); $this->step = isset($_GET['step']) ? sanitize_key($_GET['step']) : current(array_keys($this->steps)); $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; wp_register_script('select2', WC()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array('jquery'), '3.5.2'); wp_register_script('wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array('jquery', 'select2'), WC_VERSION); wp_localize_script('wc-enhanced-select', 'wc_enhanced_select_params', array('i18n_matches_1' => _x('One result is available, press enter to select it.', 'enhanced select', 'woocommerce'), 'i18n_matches_n' => _x('%qty% results are available, use up and down arrow keys to navigate.', 'enhanced select', 'woocommerce'), 'i18n_no_matches' => _x('No matches found', 'enhanced select', 'woocommerce'), 'i18n_ajax_error' => _x('Loading failed', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_1' => _x('Please enter 1 or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_n' => _x('Please enter %qty% or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_1' => _x('Please delete 1 character', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_n' => _x('Please delete %qty% characters', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_1' => _x('You can only select 1 item', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_n' => _x('You can only select %qty% items', 'enhanced select', 'woocommerce'), 'i18n_load_more' => _x('Loading more results…', 'enhanced select', 'woocommerce'), 'i18n_searching' => _x('Searching…', 'enhanced select', 'woocommerce'), 'ajax_url' => admin_url('admin-ajax.php'), 'search_products_nonce' => wp_create_nonce('search-products'), 'search_customers_nonce' => wp_create_nonce('search-customers'))); wp_enqueue_style('woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION); wp_enqueue_style('wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array('dashicons', 'install'), WC_VERSION); wp_register_script('wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array('jquery', 'wc-enhanced-select'), WC_VERSION); wp_localize_script('wc-setup', 'wc_setup_params', array('locale_info' => json_encode(include WC()->plugin_path() . '/i18n/locale-info.php'))); if (!empty($_POST['save_step']) && isset($this->steps[$this->step]['handler'])) { call_user_func($this->steps[$this->step]['handler']); } ob_start(); $this->setup_wizard_header(); $this->setup_wizard_steps(); $this->setup_wizard_content(); $this->setup_wizard_footer(); exit; }
/** * Enqueue scripts */ function mb_scripts() { wp_enqueue_style('_mbbasetheme-style', get_stylesheet_uri()); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } }
function admin_enqueue_scripts() { // scripts wp_enqueue_script('acf-input'); // styles wp_enqueue_style('acf-input'); }
function includeLoginFiles() { wp_register_style('custom_wp_login_css', get_bloginfo('stylesheet_directory') . '/css/login.css', false, '1.0.0'); wp_enqueue_style('custom_wp_login_css'); wp_register_script('custom_wp_login_js', get_bloginfo('stylesheet_directory') . '/js/login.js', false, '1.0.0'); wp_enqueue_script('custom_wp_login_js'); }
/** * @internal * {@inheritdoc} */ protected function _enqueue_static($id, $option, $data) { wp_enqueue_style('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/css/styles.css'), array(), fw()->manifest->get_version()); wp_enqueue_script('fw-option-' . $this->get_type(), fw_get_framework_directory_uri('/includes/option-types/' . $this->get_type() . '/static/js/scripts.js'), array('fw-events', 'jquery-ui-sortable'), fw()->manifest->get_version(), true); fw()->backend->enqueue_options_static($option['box-options']); return true; }
/** * Enqueue scripts and styles for the theme. */ function fast_scripts() { //LOAD style.css via filesystem. Uses Sass to ompile '/assets/scss/style.scss' to: 'styl.css' wp_enqueue_style('fast-sass', get_stylesheet_uri(), array(), '1.0.0'); //LOAD jQuery.min.js via CDN JS wp_enqueue_script('fast-jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), '1.0.0', true); //LOAD Boostrap.min.js via CDN JS wp_enqueue_script('fast-bootstrap', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js', array(), '1.0.0', true); //LOAD navigation.js via filesystem wp_enqueue_script('fast-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '1.0.0', true); //LOAD fast-skip-link-focus.js via filesystem //wp_enqueue_script( 'fast-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '1.0.0', true ); //LOAD instantclick.js via CDN JS wp_enqueue_script('fast-instantclick', 'https://cdnjs.cloudflare.com/ajax/libs/instantclick/3.0.1/instantclick.min.js', array(), '1.0.0', true); //CALL instant click into end of footer scripts, for init function call_instant_click() { echo '<script data-no-instant>InstantClick.init();</script>'; } add_action('wp_footer', 'call_instant_click', 200); //load at end //IF IS singlular & comments are enabled, load comment-reply.js via filesystem if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } }
function wplms_dashboard_template() { if (!is_user_logged_in()) { wp_redirect(site_url()); } $template = 'templates/dashboard'; global $bp; if ($bp->current_component == 'dashboard') { wp_enqueue_style('wplms-dashboard-css', WPLMS_DASHBOARD_URL . '/css/wplms-dashboard.css', array(), '1.0'); wp_enqueue_script('wplms-dashboard-js', WPLMS_DASHBOARD_URL . '/js/wplms-dashboard.js', array('jquery', 'jquery-ui-sortable'), '1.0'); if (is_active_widget(false, false, 'wplms_instructor_dash_stats', true) || is_active_widget(false, false, 'wplms_dash_stats', true)) { wp_enqueue_script('wplms-sparkline', WPLMS_DASHBOARD_URL . '/js/jquery.sparkline.min.js', array('jquery'), true); } if (is_active_widget(false, false, 'wplms_instructor_stats', true) || is_active_widget(false, false, 'wplms_instructor_commission_stats', true) || is_active_widget(false, false, 'wplms_student_stats', true)) { wp_enqueue_script('wplms-raphael', WPLMS_DASHBOARD_URL . '/js/raphael-min.js', array('jquery'), true); wp_enqueue_script('wplms-morris', WPLMS_DASHBOARD_URL . '/js/morris.min.js', array('jquery'), true); } $translation_array = array('earnings' => __('Earnings', 'wplms-dashboard'), 'payout' => __('Payout', 'wplms-dashboard'), 'students' => __('# Students', 'wplms-dashboard'), 'saved' => __('SAVED', 'wplms-dashboard'), 'saving' => __('SAVING ...', 'wplms-dashboard'), 'stats_calculated' => __('Stats Calculated, reloading page ...', 'wplms-dashboard')); wp_localize_script('wplms-dashboard-js', 'wplms_dashboard_strings', $translation_array); } $located_template = apply_filters('bp_located_template', locate_template($template, false), $template); if ($located_template && $located_template != '') { bp_get_template_part(apply_filters('bp_load_template', $located_template)); } else { bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/dashboard')); } }
/** * understrap enqueue scripts * * @package understrap */ function understrap_scripts() { // wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.2.8', false ); wp_enqueue_style('understrap-theme', get_stylesheet_directory_uri() . '/css/theme.css', array(), '0.2.8', false); // wp_enqueue_script('jquery'); wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.js', array(), '2.1.4', false); wp_enqueue_script('understrap-navigation', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true); wp_enqueue_script('understrap-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true); // angular relations wp_enqueue_script('angular', get_template_directory_uri() . '/js/angular.js', array(), '1.4.9', true); wp_enqueue_script('angular-ui-router', '//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.17/angular-ui-router.min.js', array(), '0.2.17', true); wp_enqueue_script('angular-animate', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-animate.js', array(), '1.4.9', true); wp_enqueue_script('angular-sanitize', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-sanitize.min.js', array(), '1.4.9', true); wp_enqueue_script('ui-bootstrap', '//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.1.2.js', array(), '1.1.2', true); // Angualr APP wp_enqueue_script('app', get_template_directory_uri() . '/js/app.js', array(), null, true); // Custom JS wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', array(), null, true); // NON SASS CSS wp_enqueue_style('animate', get_stylesheet_directory_uri() . '/css/animate.css', array(), '0.2.8', false); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } if (is_active_sidebar('hero')) { wp_enqueue_style('understrap-carousel-style', get_template_directory_uri() . '/css/owl.carousel.css', array(), '20024', false); wp_enqueue_script('understrap-carousel-script', get_template_directory_uri() . '/js/owl.carousel.min.js', array(), '20024', true); } }
/** * Load our special font CSS file. * * @since Twenty Twelve 1.2 */ function twentytwelve_custom_header_fonts() { $font_url = twentytwelve_get_font_url(); if (!empty($font_url)) { wp_enqueue_style('twentytwelve-fonts', esc_url_raw($font_url), array(), null); } }
/** * Enqueue styles and scripts * * @access public * @return void * @since 1.0.0 */ public function enqueue_styles_scripts() { $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; wp_register_script('yith_wcas_jquery-autocomplete', YITH_WCAS_URL . 'assets/js/devbridge-jquery-autocomplete' . $suffix . '.js', array('jquery'), '1.2.7', true); $css = file_exists(get_stylesheet_directory() . '/woocommerce/yith_ajax_search.css') ? get_stylesheet_directory_uri() . '/woocommerce/yith_ajax_search.css' : YITH_WCAS_URL . 'assets/css/yith_wcas_ajax_search.css'; wp_enqueue_style('yith_wcas_frontend', $css); }
function enqueue_dashboard_stylesheet($hook) { if ('index.php' != $hook) { return; } wp_enqueue_style('bub_dashboard_widget', pb_backupbuddy::plugin_url() . '/css/dashboard_widget.css'); }
function Attachments() { wp_register_script('admin-bar-plugin', $this->pluginUrl . '/js/admin-bar.js', array('jquery-form')); wp_enqueue_script('admin-bar-plugin'); wp_register_style('admin-bar-plugin', $this->pluginUrl . '/css/admin-bar.css'); wp_enqueue_style('admin-bar-plugin'); }
function add_styles() { wp_register_style('userpro_rd_custom', userpro_rd_url . 'admin/css/userpro-redirection.css'); wp_enqueue_style('userpro_rd_custom'); wp_register_script('userpro_rd_custom', userpro_rd_url . 'admin/scripts/userpro-redirection.js'); wp_enqueue_script('userpro_rd_custom'); }
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'); }
/** * Load our special font CSS files. * * @since Twenty Thirteen 1.0 */ function twentythirteen_custom_header_fonts() { // Add Source Sans Pro and Bitter fonts. wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); // Add Genericons font. wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03'); }
function pi_ts_enqueue_styles() { /* jQuery tweetscroll plugin */ wp_register_style('tweetscroll', TS_PLUGIN_URL . '/css/tweetscroll.css', array(), TWEETSCROLL_VERSION, 'screen'); // load javascript scripts wp_enqueue_style('tweetscroll'); }
/** * Init function. * * Enqueues styles and scripts on post edit page. * * @param type $post_type * @param type $post * @param type $groups * @param type $wpcf_active */ function wpcf_pr_admin_post_init_action($post_type, $post, $groups, $wpcf_active) { // See if any data $has = wpcf_pr_admin_get_has($post_type); $belongs = wpcf_pr_admin_get_belongs($post_type); /* * Enqueue styles and scripts */ if (!empty($has) || !empty($belongs)) { $output = wpcf_pr_admin_post_meta_box_output($post, array('post_type' => $post_type, 'has' => $has, 'belongs' => $belongs)); add_meta_box('wpcf-post-relationship', __('Post Relationship', 'wpcf'), 'wpcf_pr_admin_post_meta_box', $post_type, 'normal', 'default', array('output' => $output)); if (!empty($output)) { wp_enqueue_script('wpcf-post-relationship', WPCF_EMBEDDED_RELPATH . '/resources/js/post-relationship.js', array('jquery', 'select2'), WPCF_VERSION); wp_enqueue_style('wpcf-post-relationship', WPCF_EMBEDDED_RELPATH . '/resources/css/post-relationship.css', array(), WPCF_VERSION); if (!$wpcf_active) { wpcf_enqueue_scripts(); wp_enqueue_style('wpcf-pr-post', WPCF_EMBEDDED_RES_RELPATH . '/css/fields-post.css', array(), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation', WPCF_EMBEDDED_RES_RELPATH . '/js/' . 'jquery-form-validation/jquery.validate.min.js', array('jquery'), WPCF_VERSION); wp_enqueue_script('wpcf-form-validation-additional', WPCF_EMBEDDED_RES_RELPATH . '/js/' . 'jquery-form-validation/additional-methods.min.js', array('jquery'), WPCF_VERSION); } wpcf_admin_add_js_settings('wpcf_pr_del_warning', '\'' . __('Are you sure about deleting this post?', 'wpcf') . '\''); wpcf_admin_add_js_settings('wpcf_pr_pagination_warning', '\'' . __('If you continue without saving your changes, they might get lost.', 'wpcf') . '\''); } } }
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); }
/** * Enqueue the CSS for XProfile admin styling * * @since BuddyPress (1.1) */ function xprofile_add_admin_css() { if (!empty($_GET['page']) && strpos($_GET['page'], 'bp-profile-setup') !== false) { $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_style('xprofile-admin-css', buddypress()->plugin_url . "bp-xprofile/admin/css/admin{$min}.css", array(), bp_get_version()); } }
function _cfs_admin_script() { wp_register_style('cfs-style', plugins_url('css/cfs_admin.css', dirname(__FILE__))); wp_enqueue_style('cfs-style'); wp_register_script('cfs-script', plugins_url('js/cfs_admin.js', dirname(__FILE__)), array(), '1.0.0', true); wp_enqueue_script('cfs-script'); }
function twentyhua_10_scripts_styles() { // bootstrap wp_enqueue_script('twentyhua-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150701', true); wp_enqueue_style('twentyhua-style', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '20150701'); wp_enqueue_style('twentyhua-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '20150701'); }
public function enqueue() { $names = $this->get_names(); foreach ($names as $name) { wp_enqueue_style($name); } }
function sfsi_footerFeedbackScript() { wp_enqueue_style('wp-pointer'); wp_enqueue_script('wp-pointer'); wp_enqueue_script('utils'); // for user settings $html = '<div>'; $html .= '<label>Optional: Please tell us why you deactivate our plugin so that we can make it better!</label>'; $html .= '<textarea id="sfsi_feedbackMsg" name="reason"></textarea>'; $html .= '</div>'; ?> <script type="text/javascript"> jQuery('#social-media-and-share-icons-ultimate-social-media .deactivate a').click(function(){ jQuery('#social-media-and-share-icons-ultimate-social-media .deactivate a').pointer({ content: '<form method="post" id="sfsi_feedbackForm"><?php echo $html; ?> <div><input type="button" name="sfsi_sendFeedback" value="Submit & Deactivate" class="button primary-button" /></div><img id="sfsi_loadergif" src="<?php echo site_url() . "/wp-includes/images/spinner.gif"; ?> " /></form>', position: { edge:'top', align:'left', }, close: function() { // } }).pointer('open'); return false; }); jQuery("body").on("click","input[name='sfsi_sendFeedback']", function(){ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?> '; var deactivateUrl = jQuery('#social-media-and-share-icons-ultimate-social-media .deactivate a').attr('href'); var e = { action:"sfsi_feedbackForm", email: '<?php echo get_option("admin_email"); ?> ', msg:jQuery("#sfsi_feedbackMsg").val() }; jQuery("#sfsi_loadergif").show(); jQuery.ajax({ url:ajaxurl, type:"post", data:e, success:function(responce) { //alert(responce); jQuery("#sfsi_loadergif").hide(); window.location.href = deactivateUrl; } }); }); </script> <?php }
function rsttst_load_styles() { if (!is_admin()) { wp_enqueue_style('rest-styles', plugins_url('assets/rest-styles.css', __FILE__)); wp_enqueue_script('rest-scripts', plugins_url('assets/rest-scripts.js', __FILE__), array('jquery'), 1.0); } }
function ox_adding_scripts() { if (!function_exists('is_login_page')) { function is_login_page() { return !strncmp($_SERVER['REQUEST_URI'], '/wp-login.php', strlen('/wp-login.php')); } } if (!is_admin() && !is_login_page()) { /*removed wp-embed.min.js*/ wp_deregister_script('wp-embed'); /*jquery*/ wp_deregister_script('jquery'); $infooter = !is_page(array($order_form_pages)) ? true : false; wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js", false, '1.11.3', $infooter); wp_enqueue_script('jquery'); /*bootstrap*/ wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css'); /*slicknav menu*/ wp_enqueue_script('slicknav', get_template_directory_uri() . '/js/jquery.slicknav.min.js', array('jquery'), '', true); /*bxslider*/ wp_enqueue_style('bxslider', get_template_directory_uri() . '/css/jquery.bxslider.min.css'); wp_enqueue_script('bxslider', get_template_directory_uri() . '/js/jquery.bxslider.min.js', array('jquery'), '', true); /*zopim chat*/ wp_enqueue_script('zopim', get_template_directory_uri() . '/js/zopimClear.js', array('jquery'), '', true); /*custom css*/ wp_enqueue_style('custom', get_template_directory_uri() . '/style.css', array('bootstrap')); /*custom js*/ wp_enqueue_script('custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '', true); } }
function print_tooltip_scripts() { wp_enqueue_style('gform_tooltip', GFCommon::get_base_url() . '/css/tooltip.css', null, GFCommon::$version); wp_enqueue_style('gform_font_awesome', GFCommon::get_base_url() . '/css/font-awesome.css', null, GFCommon::$version); wp_print_scripts('gform_tooltip_init'); wp_print_styles('gform_tooltip', 'gform_font_awesome'); }
/** * Enqueue required global styles and scirpts * * @access public * @since 0.0.0 * * @see wp_enqueue_style() * * @return void */ public function enqueue_global_scripts() { //enqueue styles wp_enqueue_style('wfg-styles', plugins_url('/css/wfg-styles.css', dirname(__FILE__))); //enqueue scripts wp_enqueue_script('wfg-scripts', plugins_url('/js/wfg-scripts.js', dirname(__FILE__)), array('jquery')); }
static function InitClass() { wp_enqueue_style(WPFB . '-admin', WPFB_PLUGIN_URI . 'css/admin.css', array(), WPFB_VERSION, 'all'); wp_register_script('jquery-deserialize', WPFB_PLUGIN_URI . 'bower_components/jquery-deserialize/dist/jquery.deserialize.min.js', array('jquery'), WPFB_VERSION); if (isset($_GET['page'])) { $page = $_GET['page']; if ($page == 'wpfilebase_files') { wp_enqueue_script('postbox'); wp_enqueue_style('dashboard'); } elseif ($page == 'wpfilebase' && isset($_GET['action']) && $_GET['action'] == 'sync') { do_action('wpfilebase_sync'); wp_die("Filebase synced."); } } add_action('wp_dashboard_setup', array(__CLASS__, 'AdminDashboardSetup')); //wp_register_widget_control(WPFB_PLUGIN_NAME, "[DEPRECATED]".WPFB_PLUGIN_NAME .' '. __('File list','wp-filebase'), array(__CLASS__, 'WidgetFileListControl'), array('description' => __('DEPRECATED','wp-filebase'))); add_action('admin_print_scripts', array('WPFB_AdminLite', 'AdminPrintScripts')); self::CheckChangedVer(); if (basename($_SERVER['PHP_SELF']) === "plugins.php") { if (isset($_GET['wpfb-uninstall']) && current_user_can('edit_files')) { update_option('wpfb_uninstall', !empty($_GET['wpfb-uninstall']) && $_GET['wpfb-uninstall'] != "0"); } if (get_option('wpfb_uninstall')) { function wpfb_uninstall_warning() { echo "\n\t\t\t\t<div id='wpfb-warning' class='updated fade'><p><strong>" . __('WP-Filebase will be uninstalled completely when deactivating the Plugin! All settings and File/Category Info will be deleted. Actual files in the upload directory will not be removed.', 'wp-filebase') . ' <a href="' . add_query_arg('wpfb-uninstall', '0') . '">' . __('Cancel') . "</a></strong></p></div>\n\t\t\t\t"; } add_action('admin_notices', 'wpfb_uninstall_warning'); } } }
/** * Styles & Scripts */ function om_wpb_admin_scripts() { if (in_array(get_post_type(), vc_editor_post_types())) { wp_enqueue_style('om_wpb_admin_styles', TEMPLATE_DIR_URI . '/wpb/assets/css/wpb-admin.css', array(), OM_THEME_VERSION); //wp_enqueue_script( 'om_wpb_custom_views', TEMPLATE_DIR_URI . '/wpb/assets/js/custom-views.js', array('jquery'), OM_THEME_VERSION, true); } }
public static function admin_styles() { global $CRAYON_VERSION; wp_enqueue_style('crayon', plugins_url(CRAYON_STYLE, __FILE__), array(), $CRAYON_VERSION); wp_enqueue_style('crayon_global', plugins_url(CRAYON_STYLE_GLOBAL, __FILE__), array(), $CRAYON_VERSION); wp_enqueue_style('crayon_admin', plugins_url(CRAYON_STYLE_ADMIN, __FILE__), array('editor-buttons'), $CRAYON_VERSION); }