public function register_admin_color_scheme() { global $_wp_admin_css_colors; wp_admin_css_color('darkadmin', __('DarkAdmin'), plugins_url('css/colors-darkadmin.css', __FILE__), array('#222', '#333', '#0074a2', '#2ea2cc')); $_wp_admin_css_colors['darkadmin']->icon_colors = array('base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff'); $this->replace_css('colors', 'colors-darkadmin.css'); }
/** * Collect schema from wordpress active theme * * @return boolean true on success false if color schema folder is not exists * in the active theme folder */ public function collectSchema() { $options = $this->getOptions(); $path = get_template_directory() . $options['path']; // make sure that the color schema folder exsists if (!file_exists($path) || !is_dir($path)) { return; // just ignore } // register the new color schema $contents = new \DirectoryIterator($path); foreach ($contents as $content) { if ($contents->isDot()) { continue; } if ($contents->isDir()) { $name = $content->getFilename(); $init = parse_ini_file($content->getPathname() . '/schema.ini'); if (!is_array($init)) { trigger_error('Unbale Admin Color Schema Config File', E_USER_ERROR); } $suffix = is_rtl() ? '-rtl' : ''; $url = get_template_directory_uri() . $options['path'] . '/' . $name . "/colors{$suffix}.css"; wp_admin_css_color($name, __(isset($init['name']) && !empty($init['name']) ? $init['name'] : $name, isset($init['domain']) && !empty($init['domain']) ? $init['domain'] : 'default'), $url, isset($init['colors']) && is_array($init['colors']) ? $init['colors'] : array(), isset($init['icons']) && is_array($init['icons']) ? $init['icons'] : array()); } } }
/** * Register the admin color scheme * * @action admin_init */ public function register_scheme() { $suffix = is_rtl() ? '-rtl' : ''; $suffix .= SCRIPT_DEBUG ? '' : '.min'; $url = add_query_arg(['ver' => static::VERSION], plugins_url("assets/colors{$suffix}.css", __FILE__)); wp_admin_css_color('godaddy', 'GoDaddy', $url, ['#212121', '#77c043', '#008a32', '#f2812e'], ['base' => '#000', 'focus' => '#008a32', 'current' => '#fff']); }
public function admin_init() { $schemes = $this->get_option('schemes', array()); foreach ($schemes as $scheme) { wp_admin_css_color($scheme['slug'], $scheme['name'], esc_url($scheme['uri']), array($scheme['base_color'], $scheme['icon_color'], $scheme['highlight_color'], $scheme['notification_color']), array('base' => $scheme['icon_color'], 'focus' => $scheme['icon_focus'], 'current' => $scheme['icon_current'])); } }
function additional_admin_color_schemes() { //Get the theme directory $theme_dir = get_template_directory_uri(); //Color Template hinzufügen wp_admin_css_color('hinzkunz', __('Hinz und Kunz'), $theme_dir . '/admin-colors/hinzkunz/colors.css', array('#004c5a', '#004c5a', '#004c5a', '#004c5a')); }
function mp6_register_admin_color_scheme() { global $wp_styles, $_wp_admin_css_colors; wp_admin_css_color('mp6', 'MP6', plugins_url('css/colors-mp6.css', __FILE__), array('#222', '#333', '#0074a2', '#2ea2cc')); $_wp_admin_css_colors['mp6']->icon_colors = array('base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff'); // set modification time $wp_styles->registered['colors']->ver = filemtime(plugin_dir_path(__FILE__) . 'css/colors-mp6.css'); // set dependencies $wp_styles->registered['colors']->deps[] = 'open-sans'; $wp_styles->registered['colors']->deps[] = 'dashicons'; }
/** * Register color schemes. */ function usa_color_schemes() { $suffix = is_rtl() ? '-rtl' : ''; $debug = WP_DEBUG ? '' : '.min'; wp_admin_css_color('open-highway', __('Open Highway', 'admin_schemes'), plugins_url("open-highway/colors{$suffix}{$debug}.css", __FILE__), array('#212121', '#323a45', '#5b616b', '#fdb81e'), array('base' => '#fad980', 'focus' => '#fdb81e', 'current' => '#fdb81e')); wp_admin_css_color('shenandoah', __('Shenandoah', 'admin_schemes'), plugins_url("shenandoah/colors{$suffix}{$debug}.css", __FILE__), array('#212121', '#494440', '#2e8540', '#4aa564'), array('base' => '#e4e5e7', 'focus' => '#212121', 'current' => '#212121')); wp_admin_css_color('old-glory', __('Old Glory', 'admin_schemes'), plugins_url("old-glory/colors{$suffix}{$debug}.css", __FILE__), array('#112e51', '#205493', '#0071bc', '#cc2211'), array('base' => '#e1f3f8', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('from-many-one', __('From Many One', 'admin_schemes'), plugins_url("from-many-one/colors{$suffix}{$debug}.css", __FILE__), array('#212121', '#323a45', '#981b1e', '#9bdaf1'), array('base' => '#f1f1f3', 'focus' => '#9bdaf1', 'current' => '#9bdaf1')); wp_admin_css_color('nasa', __('NASA', 'admin_schemes'), plugins_url("nasa/colors{$suffix}{$debug}.css", __FILE__), array('#000', '#262626', '#0B3D91', '#FC3D21'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('nasa-1976', __('NASA 1976', 'admin_schemes'), plugins_url("nasa-1976/colors{$suffix}{$debug}.css", __FILE__), array('#0F1515', '#1e2a29', '#5D824B', '#a7b145'), array('base' => '#f1f3f3', 'focus' => '#fff', 'current' => '#fff')); }
/** * Register color schemes. */ function add_colors() { $suffix = is_rtl() ? '-rtl' : ''; wp_admin_css_color('vinyard', __('Vinyard', 'admin_schemes'), plugins_url("vineyard/colors{$suffix}.css", __FILE__), array('#301D25', '#462b36', '#d3995d', '#eabe3f'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('primary', __('Primary', 'admin_schemes'), plugins_url("primary/colors{$suffix}.css", __FILE__), array('#282b48', '#35395c', '#f38135', '#e7c03a'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('80s-kid', __('80\'s Kid', 'admin_schemes'), plugins_url("80s-kid/colors{$suffix}.css", __FILE__), array('#0A3D80', '#0c4da1', '#ed5793', '#eb853b'), array('base' => '#e4e5e7', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('aubergine', __('Aubergine', 'admin_schemes'), plugins_url("aubergine/colors{$suffix}.css", __FILE__), array('#4c4b5f', '#585a61', '#e87162', '#da9b49'), array('base' => '#e4e4e7', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('cruise', __('Cruise', 'admin_schemes'), plugins_url("cruise/colors{$suffix}.css", __FILE__), array('#292B46', '#36395c', '#8bbc9f', '#d2ac1f'), array('base' => '#f1f1f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('flat', __('Flat', 'admin_schemes'), plugins_url("flat/colors{$suffix}.css", __FILE__), array('#1F2C39', '#2c3e50', '#1abc9c', '#f39c12'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('lawn', __('Lawn', 'admin_schemes'), plugins_url("lawn/colors{$suffix}.css", __FILE__), array('#0F1515', '#1e2a29', '#5D824B', '#a7b145'), array('base' => '#f1f3f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('seashore', __('Seashore', 'admin_schemes'), plugins_url("seashore/colors{$suffix}.css", __FILE__), array('#F8F6F1', '#d5cdad', '#7D6B5C', '#456a7f'), array('base' => '#533C2F', 'focus' => '#F8F6F1', 'current' => '#F8F6F1')); }
/** * Register the custom admin color scheme */ function add_color_scheme() { // child theme if (file_exists(get_stylesheet_directory() . "/admin-color.css")) { wp_admin_css_color('st', __('Super Thorough', 'st-color-scheme'), get_stylesheet_directory_uri() . '/admin-color.css', array('#474247', '#de1e7e', '#ec76b1', '#d51d79')); } elseif (file_exists(get_template_directory() . "/admin-color.css")) { // parent theme wp_admin_css_color('st', __('Super Thorough', 'st-color-scheme'), get_template_directory_uri() . '/admin-color.css', array('#474247', '#de1e7e', '#ec76b1', '#d51d79')); } else { // plugin wp_admin_css_color('st', __('Super Thorough', 'st-color-scheme'), plugins_url('st-admin.css', __FILE__), array('#474247', '#de1e7e', '#ec76b1', '#d51d79')); } }
/** * Register the color schemes */ function wpacs_add_color_schemes() { $rtlsuff = is_rtl() ? '-rtl' : ''; wp_admin_css_color('blood', __('Blood', 'wpacs-admin-schemes'), plugins_url("blood/colors{$rtlsuff}.css", __FILE__), array('#bf0000', '#fc4141', '#222222', '#b03f3f')); wp_admin_css_color('babyblue', __('Baby Blue', 'wpacs-admin-schemes'), plugins_url("babyblue/colors{$rtlsuff}.css", __FILE__), array('#6bc4ff', '#0077ff', '#034799', '#08a8cc')); wp_admin_css_color('fresh', __('Fresh', 'wpacs-admin-schemes'), plugins_url("fresh/colors{$rtlsuff}.css", __FILE__), array('#71bd00', '#a7e051', '#426e00', '#7f9959')); wp_admin_css_color('pumpkin', __('Pumpkin', 'wpacs-admin-schemes'), plugins_url("pumpkin/colors{$rtlsuff}.css", __FILE__), array('#c99300', '#edbc34', '#7a5900', '#ccb064')); wp_admin_css_color('night', __('Night', 'wpacs-admin-schemes'), plugins_url("night/colors{$rtlsuff}.css", __FILE__), array('#222222', '#444444', '#666666', '#333333')); wp_admin_css_color('facebook', __('Facebook', 'wpacs-admin-schemes'), plugins_url("facebook/colors{$rtlsuff}.css", __FILE__), array('#2a4994', '#3763d4', '#252661', '#132142')); wp_admin_css_color('tiranga', __('Tiranga', 'wpacs-admin-schemes'), plugins_url("tiranga/colors{$rtlsuff}.css", __FILE__), array('#ff9933', '#128807', '#000088', '#94510d')); wp_admin_css_color('remix', __('Remix', 'wpacs-admin-schemes'), plugins_url("remix/colors{$rtlsuff}.css", __FILE__), array('#aa9d88', '#627c83', '#59524c', '#e14d43')); wp_admin_css_color('modern', __('Modern', 'wpacs-admin-schemes'), plugins_url("modern/colors{$rtlsuff}.css", __FILE__), array('#009688', '#ffc107', '#212121', '#00796b')); wp_admin_css_color('elegance', __('Elegance', 'wpacs-admin-schemes'), plugins_url("elegance/colors{$rtlsuff}.css", __FILE__), array('#568259', '#4a4238', '#00120b', '#3f6142')); wp_admin_css_color('simplicity', __('Simplicity', 'wpacs-admin-schemes'), plugins_url("simplicity/colors{$rtlsuff}.css", __FILE__), array('#9e9e9e', '#cddc39', '#616161', '#98a80c')); wp_admin_css_color('chocolate', __('Chocolate', 'wpacs-admin-schemes'), plugins_url("chocolate/colors{$rtlsuff}.css", __FILE__), array('#5d4037', '#795548', '#362620', '#422d26')); }
/** * Build admin hooks. * * @since 3.3.0 */ public function makeHooks() { //Admin panel if (!TTO_IS_ADMIN) { return; } //i18n $locale = apply_filters('theme_locale', get_locale(), TTO_I18N); load_textdomain(TTO_I18N, TTO_PATH . '/languages/' . $locale . '.mo'); //Add custom CSS colors ~ Earth wp_admin_css_color('teatocss-earth', TeaThemeOptions::__('Tea T.O. ~ Earth'), TTO_URI . '/assets/css/teato.admin.earth.css?ver=v' . TTO_VERSION_NUM, array('#222', '#303231', '#55bb3a', '#91d04d')); //Add custom CSS colors ~ Ocean wp_admin_css_color('teatocss-ocean', TeaThemeOptions::__('Tea T.O. ~ Ocean'), TTO_URI . '/assets/css/teato.admin.ocean.css?ver=v' . TTO_VERSION_NUM, array('#222', '#303231', '#3a80bb', '#4d9dd0')); //Add custom CSS colors ~ Vulcan wp_admin_css_color('teatocss-vulcan', TeaThemeOptions::__('Tea T.O. ~ Vulcan'), TTO_URI . '/assets/css/teato.admin.vulcan.css?ver=v' . TTO_VERSION_NUM, array('#222', '#303231', '#bb3a3a', '#d04d4d')); //Add custom CSS colors ~ Wind wp_admin_css_color('teatocss-wind', TeaThemeOptions::__('Tea T.O. ~ Wind'), TTO_URI . '/assets/css/teato.admin.wind.css?ver=v' . TTO_VERSION_NUM, array('#222', '#303231', '#69d2e7', '#a7dbd8')); //Hooks add_action('admin_menu', array(&$this, 'hookAssets'), 999); //Get configs $hooks = TeaThemeOptions::getConfigs('backendhooks'); $modules = TeaThemeOptions::getConfigs('modules'); if (isset($hooks['emojicons']) && $hooks['emojicons']) { add_action('init', array(&$this, 'hookDisableWPEmojicons')); } if (isset($hooks['versioncheck']) && $hooks['versioncheck']) { add_action('after_setup_theme', array(&$this, 'hookRemoveAdminWPVersionCheck')); } if (isset($hooks['baricons']) && $hooks['baricons']) { add_action('wp_before_admin_bar_render', array(&$this, 'hookRemoveBarIcons')); } if (isset($hooks['menus']) && $hooks['menus']) { add_action('admin_menu', array(&$this, 'hookRemoveMenus')); } if (isset($modules['sanitizedfilename']) && $modules['sanitizedfilename']) { add_filter('sanitize_file_name', array(&$this, 'hookSanitizeFilename'), 10); } }
/** * Custom Admin Color Scheme */ public function colorScheme() { global $color_scheme; global $base_plugin_directory; wp_admin_css_color('custom-scheme', $color_scheme, $base_plugin_directory . '/assets/css/colors.css', array('#000000', '#e72234', '#ebecec', '#456a7f')); }
/** * Registers the bbPress admin color scheme * * Because wp-content can exist outside of the WordPress root there is no * way to be certain what the relative path of the admin images is. * We are including the two most common configurations here, just in case. * * @since bbPress (r2521) * * @uses wp_admin_css_color() To register the color scheme */ public function register_admin_style() { wp_admin_css_color('bbpress', __('Green', 'bbpress'), $this->styles_url . 'admin.css', array('#222222', '#006600', '#deece1', '#6eb469')); }
/** * Registers the bbPress admin color scheme * * Because wp-content can exist outside of the WordPress root there is no * way to be certain what the relative path of the admin images is. * We are including the two most common configurations here, just in case. * * @since bbPress (r2521) * * @uses wp_admin_css_color() To register the color scheme */ public function register_admin_style() { // Updated admin color scheme CSS if (function_exists('wp_enqueue_media')) { $green_scheme = $this->styles_url . 'green.css'; } else { $green_scheme = $this->styles_url . 'green-34.css'; } // Register the green scheme wp_admin_css_color('bbpress', esc_html_x('Green', 'admin color scheme', 'bbpress'), $green_scheme, array('#222222', '#006600', '#deece1', '#6eb469')); }
/** * Add an admin color scheme. * * This helper function makes it easier to add color schemes to the admin by * abstracting out the steps needed to add icon colors, customizer css, etc. * * @since 2.0 * * @param string $slug The color scheme slug. Used to generate the stylesheet paths, if not overriden. * @param array $args { * An array of arguments. * @type string 'label' The color scheme name, human-readable. * Defaults to slug. * @type array 'palette' An array of CSS color definitions which are used to give the user a feel for the theme. * Default array(). * @type array 'icon' An array of colors used by svgpainter to generate the background, hover, and active * icon colors for custom SVG icons. * Default array('base' => '#eee', 'focus' => '#fff', 'current' => '#fff'). * @type array 'admin_path' Path to the admin stylesheet. Internally, MP6 uses the same file structure for * all schemes, allowing us to define the path based on the scheme's slug. * Default plugin_dir_path( __FILE__ ) . 'schemes/'. $args['slug'] .'/admin-colors.css'. * @type array 'admin_url' URL to the admin stylesheet. * Default plugins_url( "schemes/$slug/admin-colors.css", __FILE__ ). * @type array 'customizer_path' Path to the customizer stylesheet. Internally, MP6 uses the same file structure for * all schemes, allowing us to define the path based on the scheme's slug. * Default 'schemes/'. $args['slug'] .'/customizer.css'. * @type array 'customizer_url' URL to the customizer stylesheet. * Default plugins_url( "schemes/$slug/customizer.css", __FILE__ ). * } * @return boolean True if the admin stylesheet was found & the new theme was added; false if there was no slug, * or the stylesheet was not found. */ function mp6_add_admin_colors($slug, $args = array()) { global $_wp_admin_css_colors; $defaults = array('label' => $slug, 'palette' => array(), 'icon' => array('base' => '#eee', 'focus' => '#fff', 'current' => '#fff'), 'admin_path' => plugin_dir_path(__FILE__) . "schemes/{$slug}/admin-colors.css", 'admin_url' => plugins_url("schemes/{$slug}/admin-colors.css", __FILE__), 'customizer_path' => plugin_dir_path(__FILE__) . "schemes/{$slug}/customizer.css", 'customizer_url' => plugins_url("schemes/{$slug}/customizer.css", __FILE__)); $args = wp_parse_args($args, $defaults); if (file_exists($args['admin_path'])) { wp_admin_css_color($slug, $args['label'], $args['admin_url'], $args['palette']); $_wp_admin_css_colors[$slug]->icon_colors = $args['icon']; if (file_exists($args['customizer_path'])) { $_wp_admin_css_colors[$slug]->customzier = $args['customizer_path']; $_wp_admin_css_colors[$slug]->customzier_url = $args['customizer_url']; } return true; } return false; }
/** * Registers the bbPress admin color scheme * * Because wp-content can exist outside of the WordPress root there is no * way to be certain what the relative path of the admin images is. * We are including the two most common configurations here, just in case. * * @since bbPress (r2521) * * @uses wp_admin_css_color() To register the color scheme */ public function register_admin_style() { // Normal wp-content dir if (0 === $this->content_depth) { $css_file = $this->styles_url . 'admin.css'; } elseif (1 === $this->content_depth) { $css_file = $this->styles_url . 'admin-1.css'; } elseif (2 === $this->content_depth) { $css_file = $this->styles_url . 'admin-2.css'; } // Load the admin CSS styling wp_admin_css_color('bbpress', __('Green', 'bbpress'), $css_file, array('#222222', '#006600', '#deece1', '#6eb469')); }
$pathdata['path'] = str_replace($pathdata['subdir'], $subdir, $pathdata['path']); $pathdata['url'] = str_replace($pathdata['subdir'], $subdir, $pathdata['url']); $pathdata['subdir'] = str_replace($pathdata['subdir'], $subdir, $pathdata['subdir']); do_action('download_monitor_dlm_upload_dir', $pathdata); return $pathdata; } } ################################################################################ // REPLACE ADMIN URL ################################################################################ if (function_exists('admin_url')) { wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); } else { wp_admin_css_color('classic', __('Blue'), get_bloginfo('wpurl') . '/wp-admin/css/colors-classic.css', array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), get_bloginfo('wpurl') . '/wp-admin/css/colors-fresh.css', array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); } wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); if (!current_user_can('upload_files') || !current_user_can('user_can_add_new_download')) { wp_die(__('You do not have permission to upload files/downloads.')); } load_plugin_textdomain('wp-download_monitor', '/'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes();
/** * add new adminstyle to usersettings * @param $file */ function _mw_adminimize_admin_styles($file) { global $wp_version; $_mw_adminimize_path = WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__)) . '/css/'; if (version_compare($wp_version, '3.0alpha', '>=')) { // MW Adminimize Classic Tweak $styleName = 'Adminimize:' . ' Tweak ' . __('Blue'); wp_admin_css_color('mw_classic_tweak', $styleName, $_mw_adminimize_path . 'mw_classic28_tweak.css', array('#073447', '#21759b', '#eaf3fa', '#bbd8e7')); // MW Adminimize Fresh Tweak $styleName = 'Adminimize:' . ' Tweak ' . __('Gray'); wp_admin_css_color('mw_fresh_tweak', $styleName, $_mw_adminimize_path . 'mw_fresh28_tweak.css', array('#464646', '#6d6d6d', '#f1f1f1', '#dfdfdf')); } if (version_compare($wp_version, '2.7alpha', '>=') && version_compare($wp_version, '3.0alpha', '<')) { // MW Adminimize Classic $styleName = 'Adminimize:' . ' ' . __('Blue'); wp_admin_css_color('mw_classic', $styleName, $_mw_adminimize_path . 'mw_classic27.css', array('#073447', '#21759b', '#eaf3fa', '#bbd8e7')); // MW Adminimize Fresh $styleName = 'Adminimize:' . ' ' . __('Gray'); wp_admin_css_color('mw_fresh', $styleName, $_mw_adminimize_path . 'mw_fresh27.css', array('#464646', '#6d6d6d', '#f1f1f1', '#dfdfdf')); // MW Adminimize Classic Fixed $styleName = 'Adminimize:' . ' Fixed ' . __('Blue'); wp_admin_css_color('mw_classic_fixed', $styleName, $_mw_adminimize_path . 'mw_classic28_fixed.css', array('#073447', '#21759b', '#eaf3fa', '#bbd8e7')); // MW Adminimize Fresh Fixed $styleName = 'Adminimize:' . ' Fixed ' . __('Gray'); wp_admin_css_color('mw_fresh_fixed', $styleName, $_mw_adminimize_path . 'mw_fresh28_fixed.css', array('#464646', '#6d6d6d', '#f1f1f1', '#dfdfdf')); // MW Adminimize Classic Tweak $styleName = 'Adminimize:' . ' Tweak ' . __('Blue'); wp_admin_css_color('mw_classic_tweak', $styleName, $_mw_adminimize_path . 'mw_classic28_tweak.css', array('#073447', '#21759b', '#eaf3fa', '#bbd8e7')); // MW Adminimize Fresh Tweak $styleName = 'Adminimize:' . ' Tweak ' . __('Gray'); wp_admin_css_color('mw_fresh_tweak', $styleName, $_mw_adminimize_path . 'mw_fresh28_tweak.css', array('#464646', '#6d6d6d', '#f1f1f1', '#dfdfdf')); } elseif (version_compare($wp_version, '2.7alpha', '<')) { // MW Adminimize Classic $styleName = 'MW Adminimize:' . ' ' . __('Classic'); wp_admin_css_color('mw_classic', $styleName, $_mw_adminimize_path . 'mw_classic.css', array('#07273E', '#14568A', '#D54E21', '#2683AE')); // MW Adminimize Fresh $styleName = 'MW Adminimize:' . ' ' . __('Fresh'); wp_admin_css_color('mw_fresh', $styleName, $_mw_adminimize_path . 'mw_fresh.css', array('#464646', '#CEE1EF', '#D54E21', '#2683AE')); // MW Adminimize WordPress 2.3 $styleName = 'MW Adminimize:' . ' ' . __('WordPress 2.3'); wp_admin_css_color('mw_wp23', $styleName, $_mw_adminimize_path . 'mw_wp23.css', array('#000000', '#14568A', '#448ABD', '#83B4D8')); // MW Adminimize Colorblind $styleName = 'MW Adminimize:' . ' ' . __('Maybe i\'m colorblind'); wp_admin_css_color('mw_colorblind', $styleName, $_mw_adminimize_path . 'mw_colorblind.css', array('#FF9419', '#F0720C', '#710001', '#550007', '#CF4529')); // MW Adminimize Grey $styleName = 'MW Adminimize:' . ' ' . __('Grey'); wp_admin_css_color('mw_grey', $styleName, $_mw_adminimize_path . 'mw_grey.css', array('#000000', '#787878', '#F0F0F0', '#D8D8D8', '#909090')); } /** * style and changes for plugin Admin Drop Down Menu * by Ozh * http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/ */ if (function_exists('wp_ozh_adminmenu')) { // MW Adminimize Classic include ozh adminmenu $styleName = 'MW Adminimize inc. Admin Drop Down Menu' . ' ' . __('Classic'); wp_admin_css_color('mw_classic_ozh_am', $styleName, $_mw_adminimize_path . 'mw_classic_ozh_am.css', array('#07273E', '#14568A', '#D54E21', '#2683AE')); // MW Adminimize Fresh include ozh adminmenu $styleName = 'MW Adminimize inc. Admin Drop Down Menu' . ' ' . __('Fresh'); wp_admin_css_color('mw_fresh_ozh_am', $styleName, $_mw_adminimize_path . 'mw_fresh_ozh_am.css', array('#464646', '#CEE1EF', '#D54E21', '#2683AE')); } /** * style and changes for plugin Lighter Menus * by corpodibacco * http://www.italyisfalling.com/lighter-menus */ if (function_exists('lm_build')) { // MW Adminimize Classic include Lighter Menus $styleName = 'MW Adminimize inc. Lighter Menus' . ' ' . __('Classic'); wp_admin_css_color('mw_classic_lm', $styleName, $_mw_adminimize_path . 'mw_classic_lm.css', array('#07273E', '#14568A', '#D54E21', '#2683AE')); // MW Adminimize Fresh include Lighter Menus $styleName = 'MW Adminimize inc. Lighter Menus' . ' ' . __('Fresh'); wp_admin_css_color('mw_fresh_lm', $styleName, $_mw_adminimize_path . 'mw_fresh_lm.css', array('#464646', '#CEE1EF', '#D54E21', '#2683AE')); } }
/** * Register color schemes. */ function add_colors() { wp_admin_css_color('blacky_wood', __('Blood Moon Night', 'admin_schemes'), plugins_url("blood-moon-night/blacky-wood.css", __FILE__), array('#000', '#9C684F', '#BEBEBE', '#3C3C3C'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); }
/** * Registers the bbPress admin color scheme * * Because wp-content can exist outside of the WordPress root there is no * way to be certain what the relative path of the admin images is. * We are including the two most common configurations here, just in case. * * @since bbPress (r2521) * * @uses wp_admin_css_color() To register the color scheme */ public function register_admin_style() { // RTL and/or minified $suffix = is_rtl() ? '-rtl' : ''; //$suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; // Mint wp_admin_css_color('bbp-mint', esc_html_x('Mint', 'admin color scheme', 'bbpress'), $this->styles_url . 'mint' . $suffix . '.css', array('#4f6d59', '#33834e', '#5FB37C', '#81c498'), array('base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff')); // Evergreen wp_admin_css_color('bbp-evergreen', esc_html_x('Evergreen', 'admin color scheme', 'bbpress'), $this->styles_url . 'evergreen' . $suffix . '.css', array('#324d3a', '#446950', '#56b274', '#324d3a'), array('base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff')); // Bail if already using the fresh color scheme if ('fresh' === get_user_option('admin_color')) { return; } // Force 'colors-fresh' dependency global $wp_styles; $wp_styles->registered['colors']->deps[] = 'colors-fresh'; }
/** * Registers the default Admin color schemes * * @since 3.0.0 */ function register_admin_color_schemes() { wp_admin_css_color('classic', _x('Blue', 'admin color scheme'), admin_url('css/colors-classic.css'), array('#5589aa', '#cfdfe9', '#d1e5ee', '#eff8ff')); wp_admin_css_color('fresh', _x('Gray', 'admin color scheme'), admin_url('css/colors-fresh.css'), array('#555', '#a0a0a0', '#ccc', '#f1f1f1')); }
/** * Init event called at admin_init * Instantiates various sub-classes, remove meta boxes from post pages & registers custom post status. */ function init_css_js() { // This is to work around JavaScript dependency errors global $concatenate_scripts; // @codingStandardsIgnoreLine $concatenate_scripts = false; // Note: Will auto-register a dependency $handle named 'colors' wp_admin_css_color('pb_colors', 'Pressbooks', \Pressbooks\Utility\asset_path('styles/colors-pb.css'), apply_filters('pressbooks_admin_colors', array('#b40026', '#d4002d', '#e9e9e9', '#dfdfdf'))); wp_deregister_style('pressbooks-book'); // Theme's CSS wp_enqueue_style('pressbooks-admin', \Pressbooks\Utility\asset_path('styles/pressbooks.css')); if ('pb_catalog' == esc_attr(@$_REQUEST['page'])) { wp_enqueue_style('wp-color-picker'); wp_enqueue_style('pressbooks-catalog', \Pressbooks\Utility\asset_path('styles/catalog.css')); wp_enqueue_script('color-picker', \Pressbooks\Utility\asset_path('scripts/color-picker.js'), ['wp-color-picker']); wp_enqueue_script('select2-js', \Pressbooks\Utility\asset_path('scripts/select2.js'), ['jquery']); } if ('pressbooks_theme_options' == esc_attr(@$_REQUEST['page'])) { wp_enqueue_style('select2', \Pressbooks\Utility\asset_path('styles/select2.css')); wp_enqueue_style('theme-options', \Pressbooks\Utility\asset_path('styles/theme-options.css')); wp_enqueue_script('select2-js', \Pressbooks\Utility\asset_path('scripts/select2.js'), ['jquery']); wp_enqueue_script('theme-options-js', \Pressbooks\Utility\asset_path('scripts/theme-options.js'), ['jquery']); } if ('pb_custom_css' == esc_attr(@$_REQUEST['page'])) { wp_enqueue_style('pb-custom-css', \Pressbooks\Utility\asset_path('styles/custom-css.css')); } // Don't let other plugins override our scripts $badScripts = array('jquery-blockui', 'jquery-bootstrap', 'pb-organize', 'pb-feedback', 'pb-export', 'pb-metadata', 'pb-import'); array_walk($badScripts, function ($value, $key) { wp_deregister_script($value); }); // Enqueue later, on-the-fly, using action: admin_print_scripts- wp_register_script('jquery-blockui', \Pressbooks\Utility\asset_path('scripts/blockui.js'), ['jquery', 'jquery-ui-core']); wp_register_script('js-cookie', \Pressbooks\Utility\asset_path('scripts/js-cookie.js'), ['jquery']); wp_register_script('pb-export', \Pressbooks\Utility\asset_path('scripts/export.js'), ['jquery', 'js-cookie']); wp_register_script('pb-organize', \Pressbooks\Utility\asset_path('scripts/organize.js'), ['jquery', 'jquery-ui-core', 'jquery-blockui']); wp_register_script('pb-metadata', \Pressbooks\Utility\asset_path('scripts/book-information.js'), ['jquery']); wp_register_script('pb-import', \Pressbooks\Utility\asset_path('scripts/import.js'), ['jquery']); wp_register_style('pb-export', \Pressbooks\Utility\asset_path('styles/export.css')); wp_register_style('pb-organize', \Pressbooks\Utility\asset_path('styles/organize.css')); wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-sortable'); }
/** * Registers the bbPress admin color scheme * * Because wp-content can exist outside of the WordPress root there is no * way to be certain what the relative path of the admin images is. * We are including the two most common configurations here, just in case. * * @since 2.0.0 bbPress (r2521) * * @uses wp_admin_css_color() To register the color scheme */ public function register_admin_style() { // Color schemes are not available when running out of src if (false !== strpos(plugin_basename(bbpress()->file), 'src')) { return; } // RTL and/or minified $suffix = is_rtl() ? '-rtl' : ''; $suffix .= defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; // Mint wp_admin_css_color('bbp-mint', esc_html_x('Mint', 'admin color scheme', 'bbpress'), $this->styles_url . 'mint/colors' . $suffix . '.css', array('#4f6d59', '#33834e', '#5FB37C', '#81c498'), array('base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff')); // Evergreen wp_admin_css_color('bbp-evergreen', esc_html_x('Evergreen', 'admin color scheme', 'bbpress'), $this->styles_url . 'evergreen/colors' . $suffix . '.css', array('#324d3a', '#446950', '#56b274', '#324d3a'), array('base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff')); }
if (get_option('db_version') != $wp_db_version) { require_once '../wp-includes/class-snoopy.php'; $client = new Snoopy(); @$client->fetch(get_option("siteurl") . "wp-admin/upgrade.php?step=1"); } require_once ABSPATH . 'wp-admin/includes/admin.php'; auth_redirect(); nocache_headers(); update_category_cache(); $posts_per_page = get_option('posts_per_page'); $what_to_show = get_option('what_to_show'); $date_format = get_option('date_format'); $time_format = get_option('time_format'); wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), array('#07273E', '#14568A', '#D54E21', '#2683AE')); wp_admin_css_color('fresh', __('Fresh'), admin_url("css/colors-fresh.css"), array('#464646', '#CEE1EF', '#D54E21', '#2683AE')); wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); $editing = false; if (isset($_GET['page'])) { $plugin_page = stripslashes($_GET['page']); $plugin_page = plugin_basename($plugin_page); } require ABSPATH . 'wp-admin/menu.php'; do_action('admin_init'); // Handle plugin admin pages. if (isset($plugin_page)) { $page_hook = get_plugin_page_hook($plugin_page, $pagenow); if ($page_hook) { do_action('load-' . $page_hook); if (!isset($_GET['noheader'])) {
function admin_custom_color_scheme_option() { if (isset($_GET['custom-color-scheme'])) { $this->set_custom_color_scheme(); exit; } /* Custom scheme */ wp_admin_css_color('wpi_custom_scheme', ub_get_option('ucs_color_scheme_name', 'Ultimate'), admin_url('?custom-color-scheme', __FILE__), array(ub_get_option('ucs_admin_menu_background_color', '#45B29D'), ub_get_option('ucs_admin_menu_submenu_background_color', '#334D5C'), ub_get_option('ucs_admin_menu_current_background_color', '#EFC94C'), ub_get_option('ucs_table_view_switch_icon_color', '#45B29D'), ub_get_option('ucs_table_alternate_row_color', '#E5ECF0'))); }
/** * Registers the default Admin color schemes * * @since 3.0.0 */ function register_admin_color_schemes() { wp_admin_css_color('classic', __('Blue'), admin_url('css/colors-classic.css'), array('#5589aa', '#cfdfe9', '#d1e5ee', '#eff8ff')); wp_admin_css_color('fresh', __('Gray'), admin_url('css/colors-fresh.css'), array('#7c7976', '#c6c6c6', '#e0e0e0', '#f1f1f1')); }
/** * Registers the default Admin color schemes * * @since 3.0.0 * * @global string $wp_version */ function register_admin_color_schemes() { $suffix = is_rtl() ? '-rtl' : ''; $suffix .= SCRIPT_DEBUG ? '' : '.min'; wp_admin_css_color('fresh', _x('Default', 'admin color scheme'), false, array('#222', '#333', '#0073aa', '#00a0d2'), array('base' => '#999', 'focus' => '#00a0d2', 'current' => '#fff')); // Other color schemes are not available when running out of src if (false !== strpos($GLOBALS['wp_version'], '-src')) { return; } wp_admin_css_color('light', _x('Light', 'admin color scheme'), admin_url("css/colors/light/colors{$suffix}.css"), array('#e5e5e5', '#999', '#d64e07', '#04a4cc'), array('base' => '#999', 'focus' => '#ccc', 'current' => '#ccc')); wp_admin_css_color('blue', _x('Blue', 'admin color scheme'), admin_url("css/colors/blue/colors{$suffix}.css"), array('#096484', '#4796b3', '#52accc', '#74B6CE'), array('base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('midnight', _x('Midnight', 'admin color scheme'), admin_url("css/colors/midnight/colors{$suffix}.css"), array('#25282b', '#363b3f', '#69a8bb', '#e14d43'), array('base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('sunrise', _x('Sunrise', 'admin color scheme'), admin_url("css/colors/sunrise/colors{$suffix}.css"), array('#b43c38', '#cf4944', '#dd823b', '#ccaf0b'), array('base' => '#f3f1f1', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('ectoplasm', _x('Ectoplasm', 'admin color scheme'), admin_url("css/colors/ectoplasm/colors{$suffix}.css"), array('#413256', '#523f6d', '#a3b745', '#d46f15'), array('base' => '#ece6f6', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('ocean', _x('Ocean', 'admin color scheme'), admin_url("css/colors/ocean/colors{$suffix}.css"), array('#627c83', '#738e96', '#9ebaa0', '#aa9d88'), array('base' => '#f2fcff', 'focus' => '#fff', 'current' => '#fff')); wp_admin_css_color('coffee', _x('Coffee', 'admin color scheme'), admin_url("css/colors/coffee/colors{$suffix}.css"), array('#46403c', '#59524c', '#c7a589', '#9ea476'), array('base' => '#f3f2f1', 'focus' => '#fff', 'current' => '#fff')); }
/** * Register the custom admin color scheme * * @TODO Implement RTL stylesheets * @TODO Implement Icon colors */ function add_color_scheme() { wp_admin_css_color('flat', __('Flat', 'flat-color-scheme'), plugins_url('style.css', __FILE__), array('#34495e', '#2c3e50', '#ecf0f1', '#1abc9c')); }
do_action('after_db_upgrade'); } elseif (get_option('db_version') != $wp_db_version) { wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); exit; } require_once ABSPATH . 'wp-admin/includes/admin.php'; auth_redirect(); nocache_headers(); update_category_cache(); set_screen_options(); $posts_per_page = get_option('posts_per_page'); $date_format = get_option('date_format'); $time_format = get_option('time_format'); wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); $editing = false; if (isset($_GET['page'])) { $plugin_page = stripslashes($_GET['page']); $plugin_page = plugin_basename($plugin_page); } require ABSPATH . 'wp-admin/menu.php'; do_action('admin_init'); // Handle plugin admin pages. if (isset($plugin_page)) { if (!($page_hook = get_plugin_page_hook($plugin_page, $pagenow))) { $page_hook = get_plugin_page_hook($plugin_page, $plugin_page); // backwards compatibility for plugins using add_management_page if (empty($page_hook) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php')) {
/** * Registers the default Admin color schemes * * @since 3.0.0 */ function register_admin_color_schemes() { wp_admin_css_color('classic', __('Blue'), admin_url("css/colors-classic.css"), array('#073447', '#21759B', '#EAF3FA', '#BBD8E7')); wp_admin_css_color('fresh', __('Gray'), admin_url("css/colors-fresh.css"), array('#464646', '#6D6D6D', '#F1F1F1', '#DFDFDF')); }