/** * Add contextual help * * @since 0.2.0 */ function wp_user_profiles_add_contextual_help() { // Static sidebar get_current_screen()->set_help_sidebar('<p>' . esc_html__('Some information may be displayed publicly on the site.', 'wp-user-profiles') . '</p>' . '<p>' . esc_html__('Always use a strong password, and never give your login information to anyone.', 'wp-user-profiles') . '</p>'); // Allow plugins to easily hook in do_action('wp_user_profiles_add_contextual_help'); }
/** * Setup options mostly. * * @todo Get list of displayed columns from options * */ function WP_CMR_List_Table($args = '') { $args = wp_parse_args($args, array('plural' => '', 'iColumns' => 3, 'per_page' => 20, 'iDisplayStart' => 0, 'ajax_action' => 'wp_crm_list_table', 'current_screen' => '', 'table_scope' => '', 'singular' => '', 'ajax' => false)); $this->_args = $args; if (empty($this->_args['current_screen'])) { $screen = get_current_screen(); $this->_args['current_screen'] = $screen->id; } //* Returns columns, hidden, sortable */ list($columns, $hidden) = $this->get_column_info(); //** Build aoColumns for ajax return */ $column_count = 0; foreach ($columns as $column_slug => $column_title) { if (in_array($column_slug, $hidden)) { $column_visible = 'false'; } else { $column_visible = 'true'; } $this->aoColumns[] = "{ 'sClass': '{$column_slug} column-{$column_slug}', 'bVisible': {$column_visible}}"; $this->aoColumnDefs[] = "{ 'sName': '{$column_slug}', 'aTargets': [{$column_count}]}"; $this->column_ids[$column_count] = $column_slug; $column_count++; } $this->_args['iColumns'] = count($this->aoColumns); }
/** * initialize */ public function initialize() { $screen = get_current_screen(); add_filter('views_' . $screen->id, array($this, 'donate_link')); add_action('admin_head', array($this, 'add_columns')); add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); }
/** * Process redirection of all dashboard pages for password reset * * @since 1.8 * * @return void */ public function admin_init() { if ( isset( get_current_screen()->id ) && ( 'profile' === get_current_screen()->id || 'profile-network' === get_current_screen()->id ) ) { if ( isset( $this->settings['expire'] ) && $this->settings['expire'] === true ) { //make sure we're enforcing a password change $current_user = wp_get_current_user(); if ( isset( $current_user->ID ) && $current_user->ID !== 0 ) { //make sure we have a valid user $required = get_user_meta( $current_user->ID, 'itsec_password_change_required', true ); if ( $required == true ) { wp_safe_redirect( admin_url( 'profile.php?itsec_password_expired=true#pass1' ) ); exit(); } } } } }
/** * Add Away mode Javascript * * @return void */ public function admin_script() { global $itsec_globals; if (isset(get_current_screen()->id) && strpos(get_current_screen()->id, 'security_page_toplevel_page_itsec_settings') !== false) { wp_enqueue_script('itsec_strong_passwords_js', $this->module_path . 'js/admin-strong-passwords.js', array('jquery'), $itsec_globals['plugin_build']); } }
public function enqueue_admin_scripts() { if (get_current_screen()->id == $this->plugin_screen_hook_suffix) { wp_enqueue_script($this->plugin_slug . '-admin-script', get_stylesheet_directory_uri() . '/video-player/js/progression-admin.js', array('jquery', 'wp-color-picker'), $this->version); } wp_enqueue_media(); }
/** * Enqueue common styles * * @return void */ function admin_enqueue_scripts() { $screen = get_current_screen(); // Enqueue scripts and styles for registered pages (post types) only if ('post' != $screen->base || !in_array($screen->post_type, $this->meta_box['pages'])) { return; } wp_enqueue_style('rwmb', RWMB_CSS_URL . 'style.css', array(), RWMB_VER); // Load clone script conditionally $has_clone = false; foreach ($this->fields as $field) { if ($field['clone']) { $has_clone = true; } // Enqueue scripts and styles for fields $class = self::get_class_name($field); if (method_exists($class, 'admin_enqueue_scripts')) { call_user_func(array($class, 'admin_enqueue_scripts')); } } if ($has_clone) { wp_enqueue_script('rwmb-clone', RWMB_JS_URL . 'clone.js', array('jquery'), RWMB_VER, true); } if ($this->validation) { wp_enqueue_script('jquery-validate', RWMB_JS_URL . 'jquery.validate.min.js', array('jquery'), RWMB_VER, true); wp_enqueue_script('rwmb-validate', RWMB_JS_URL . 'validate.js', array('jquery-validate'), RWMB_VER, true); } }
/** * Enqueue Scripts on Manage Gallery page */ function enqueue() { $current_screen = get_current_screen(); if (!empty($current_screen) && $current_screen->base == 'nggallery-manage-images') { $this->localize(); } }
/** * Contextual help content. * * @since 2.0.0 */ public function help() { $screen = get_current_screen(); $theme_settings_help = '<h3>' . __('Theme Settings', 'genesis') . '</h3>' . '<p>' . __('Your Theme Settings provides control over how the theme works. You will be able to control a lot of common and even advanced features from this menu. Some child themes may add additional menu items to this list, including the ability to select different color schemes or set theme specific features such as a slider. Each of the boxes can be collapsed by clicking the box header and expanded by doing the same. They can also be dragged into any order you desire or even hidden by clicking on "Screen Options" in the top right of the screen and "unchecking" the boxes you do not want to see. Below you\'ll find the items common to every child theme …', 'genesis') . '</p>'; $information_help = '<h3>' . __('Information', 'genesis') . '</h3>' . '<p>' . __('The information box allows you to see the current Genesis theme information and display if desired.', 'genesis') . '</p>' . '<p>' . __('Normally, this should be unchecked. You can also set to enable automatic updates.', 'genesis') . '</p>' . '<p>' . __('This does not mean the updates happen automatically without your permission; it will just notify you that an update is available. You must select it to perform the update.', 'genesis') . '</p>' . '<p>' . __('If you provide an email address and select to notify that email address when the update is available, your site will email you when the update can be performed.No, updates only affect files being updated.', 'genesis') . '</p>'; $feeds_help = '<h3>' . __('Custom Feeds', 'genesis') . '</h3>' . '<p>' . __('If you use Feedburner to handle your rss feed(s) you can use this function to set your site\'s native feed to redirect to your Feedburner feed.', 'genesis') . '</p>' . '<p>' . __('By filling in the feed links calling for the main site feed, it will display as a link to Feedburner.', 'genesis') . '</p>' . '<p>' . __('By checking the "Redirect Feed" box, all traffic to default feed links will be redirected to the Feedburner link instead.', 'genesis') . '</p>'; $layout_help = '<h3>' . __('Default Layout', 'genesis') . '</h3>' . '<p>' . __('This lets you select the default layout for your entire site. On most of the child themes you\'ll see these options:', 'genesis') . '</p>' . '<ul>' . '<li>' . __('Content Sidebar', 'genesis') . '</li>' . '<li>' . __('Sidebar Content', 'genesis') . '</li>' . '<li>' . __('Sidebar Content Sidebar', 'genesis') . '</li>' . '<li>' . __('Content Sidebar Sidebar', 'genesis') . '</li>' . '<li>' . __('Sidebar Sidebar Content', 'genesis') . '</li>' . '<li>' . __('Full Width Content', 'genesis') . '</li>' . '</ul>' . '<p>' . __('These options can be extended or limited by the child theme. Additionally, many of the child themes do not allow different layouts on the home page as they have been designed for a specific home page layout.', 'genesis') . '</p>' . '<p>' . __('This layout can also be overridden in the post/page/term layout options on each post/page/term.', 'genesis') . '</p>'; $header_help = '<h3>' . __('Header', 'genesis') . '</h3>' . '<p>' . __('The <strong>Dynamic text</strong> option will use the Site Title and Site Description from your site\'s settings in your header.', 'genesis') . '</p>' . '<p>' . __('The <strong>Image logo</strong> option will use a logo image file in the header instead of the site\'s title and description. This setting adds a .header-image class to your site, allowing you to specify the header image in your child theme\'s style.css. By default, the logo can be saved as logo.png and saved to the images folder of your child theme.', 'genesis') . '</p>'; $navigation_help = '<h3>' . __('Navigation', 'genesis') . '</h3>' . '<p>' . __('The Primary Navigation Extras typically display on the right side of your Primary Navigation menu.', 'genesis') . '</p>' . '<ul>' . '<li>' . __('Today\'s date displays the current date', 'genesis') . '</li>' . '<li>' . __('RSS feed link displays a link to the RSS feed for your site that a reader can use to subscribe to your site using the feedreader of their choice.', 'genesis') . '</li>' . '<li>' . __('Search form displays a small search form utilizing the WordPress search functionality.', 'genesis') . '</li>' . '<li>' . __('Twitter link displays a link to your Twitter profile, as indicated in Twitter ID setting. Enter only your user name in this setting.', 'genesis') . '</li>' . '</ul>' . '<p>' . __('These options can be extended or limited by the child theme.', 'genesis') . '</p>'; $breadcrumbs_help = '<h3>' . __('Breadcrumbs', 'genesis') . '</h3>' . '<p>' . __('This box lets you define where the "Breadcrumbs" display. The Breadcrumb is the navigation tool that displays where a visitor is on the site at any given moment.', 'genesis') . '</p>'; $comments_help = '<h3>' . __('Comments and Trackbacks', 'genesis') . '</h3>' . '<p>' . __('This allows a site wide decision on whether comments and trackbacks (notifications when someone links to your page) are enabled for posts and pages.', 'genesis') . '</p>' . '<p>' . __('If you enable comments or trackbacks here, it can be disabled on an individual post or page. If you disable here, they cannot be enabled on an individual post or page.', 'genesis') . '</p>'; $archives_help = '<h3>' . __('Content Archives', 'genesis') . '</h3>' . '<p>' . __('In the Genesis Theme Settings you may change the site wide Content Archives options to control what displays in the site\'s Archives.', 'genesis') . '</p>' . '<p>' . __('Archives include any pages using the blog template, category pages, tag pages, date archive, author archives, and the latest posts if there is no custom home page.', 'genesis') . '</p>' . '<p>' . __('The first option allows you to display the post content or the post excerpt. The Display post content setting will display the entire post including HTML code up to the <!--more--> tag if used (this is HTML for the comment tag that is not displayed in the browser).', 'genesis') . '</p>' . '<p>' . __('It may also be coupled with the second field "Limit content to [___] characters" to limit the content to a specific number of letters or spaces. This will strip any HTML, but allows for more precise and easily changed lengths than the excerpt.', 'genesis') . '</p>' . '<p>' . __('The Display post excerpt setting will display the first 55 words of the post after also stripping any included HTML or the manual/custom excerpt added in the post edit screen.', 'genesis') . '</p>' . '<p>' . __('The \'Include post image?\' setting allows you to show a thumbnail of the first attached image or currently set featured image.', 'genesis') . '</p>' . '<p>' . __('This option should not be used with the post content unless the content is limited to avoid duplicate images.', 'genesis') . '</p>' . '<p>' . __('The \'Image Size\' list is populated by the available image sizes defined in the theme.', 'genesis') . '</p>' . '<p>' . __('Post Navigation Technique allows you to select one of three navigation methods.', 'genesis') . '</p>'; $blog_help = '<h3>' . __('Blog Page', 'genesis') . '</h3>' . '<p>' . __('This works with the Blog Template, which is a page template that shows your latest posts. It\'s what people see when they land on your homepage.', 'genesis') . '</p>' . '<p>' . __('In the General Settings you can select a specific category to display from the drop down menu, and exclude categories by ID, or even select how many posts you\'d like to display on this page.', 'genesis') . '</p>' . '<p>' . __('There are some special features of the Blog Template that allow you to specify which category to show on each page using the template, which is helpful if you have a "News" category (or something else) that you want to display separately.', 'genesis') . '</p>' . '<p>' . sprintf(__('You can find more on this feature in the <a href="%s" target="_blank">How to Add a Post Category Page tutorial.</a>', 'genesis'), 'http://www.studiopress.com/tutorials/genesis/add-post-category-page') . '</p>'; $scripts_help = '<h3>' . __('Header and Footer Scripts', 'genesis') . '</h3>' . '<p>' . sprintf(__('This provides you with two fields that will output to the %1$s element of your site and just before the %2$s tag. These will appear on every page of the site and are a great way to add analytic code and other scripts. You cannot use PHP in these fields. If you need to use PHP then you should look into the Genesis Simple Hooks plugin.', 'genesis'), '<code><head></code>', '<code></body></code>') . '</p>'; $home_help = '<h3>' . __('How Home Pages Work', 'genesis') . '</h3>' . '<p>' . __('Most Genesis child themes include a custom home page.', 'genesis') . '</p>' . '<p>' . __('To use this type of home page, make sure your latest posts are set to show on the front page. You can setup a page with the Blog page template to show a blog style list of your latest posts on another page.', 'genesis') . '</p>' . '<p>' . __('This home page is typically setup via widgets in the sidebars for the home page. This can be accessed via the Widgets menu item under Appearance.', 'genesis') . '</p>' . '<p>' . __('Child themes that include this type of home page typically include additional theme-specific tutorials which can be accessed via a sticky post at the top of that child theme support forum.', 'genesis') . '</p>' . '<p>' . __('If your theme uses a custom home page and you want to show the latest posts in a blog format, do not use the blog template. Instead, you need to rename the home.php file to home-old.php instead.', 'genesis') . '</p>' . '<p>' . __('Another common home page is the "blog" type home page, which is common to most of the free child themes. This shows your latest posts and requires no additional setup.', 'genesis') . '</p>' . '<p>' . __('The third type of home page is the new dynamic home page. This is common on the newest child themes. It will show your latest posts in a blog type listing unless you put widgets into the home page sidebars.', 'genesis') . '</p>' . '<p>' . __('This setup is preferred because it makes it easier to show a blog on the front page (no need to rename the home.php file) and does not have the confusion of no content on the home page when the theme is initially installed.', 'genesis') . '</p>'; $screen->add_help_tab(array('id' => $this->pagehook . '-theme-settings', 'title' => __('Theme Settings', 'genesis'), 'content' => $theme_settings_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-information', 'title' => __('Information', 'genesis'), 'content' => $information_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-feeds', 'title' => __('Custom Feeds', 'genesis'), 'content' => $feeds_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-layout', 'title' => __('Default Layout', 'genesis'), 'content' => $layout_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-header', 'title' => __('Header', 'genesis'), 'content' => $header_help)); if (genesis_first_version_compare('2.0.2', '<=')) { $screen->add_help_tab(array('id' => $this->pagehook . '-navigation', 'title' => __('Navigation', 'genesis'), 'content' => $navigation_help)); } $screen->add_help_tab(array('id' => $this->pagehook . '-breadcrumbs', 'title' => __('Breadcrumbs', 'genesis'), 'content' => $breadcrumbs_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-comments', 'title' => __('Comments and Trackbacks', 'genesis'), 'content' => $comments_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-archives', 'title' => __('Content Archives', 'genesis'), 'content' => $archives_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-blog', 'title' => __('Blog Page', 'genesis'), 'content' => $blog_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-scripts', 'title' => __('Header and Footer Scripts', 'genesis'), 'content' => $scripts_help)); $screen->add_help_tab(array('id' => $this->pagehook . '-home', 'title' => __('Home Pages', 'genesis'), 'content' => $home_help)); //* Add help sidebar $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'genesis') . '</strong></p>' . '<p><a href="http://my.studiopress.com/help/" target="_blank">' . __('Get Support', 'genesis') . '</a></p>' . '<p><a href="http://my.studiopress.com/snippets/" target="_blank">' . __('Genesis Snippets', 'genesis') . '</a></p>' . '<p><a href="http://my.studiopress.com/tutorials/" target="_blank">' . __('Genesis Tutorials', 'genesis') . '</a></p>'); }
/** * Modify column editable type * @param $editable * @param $column * @return mixed */ function editable_column_settings($editable, $column) { $key = str_replace("cpachidden_", "", $column['field']); $screen = get_current_screen(); if ('column-meta' == $column['type']) { if (array_key_exists($key, $this->fields) && $this->fields[$key]['type'] == 'select') { $editable['type'] = 'select'; $editable['options'] = $this->get_column_options($this->fields[$key]['options']); } if (!empty($screen) && $screen->id == 'users' && $column['field_type'] == 'array') { global $wpdb; $editable['type'] = 'select'; $values = $wpdb->get_col("SELECT DISTINCT meta_value FROM {$wpdb->usermeta} WHERE meta_key='" . $column['field'] . "'"); $i = 0; foreach ($values as $value) { if (empty($value)) { continue; } $editable['options'][$i]['value'] = $value; $editable['options'][$i]['label'] = $value; $i++; } $editable['options'][$i]['value'] = ""; $editable['options'][$i]['label'] = ""; } } return $editable; }
/** * Add some new fields to the attachment edit panel. * @param array form fields edit panel * @return array form fields with enable-media-replace fields added */ function enable_media_replace($form_fields, $post) { // Check if we are on media upload screen for insertion of replace link $on_media_edit_screen = false; $current_wp_version = get_bloginfo('version'); if ($current_wp_version < 3.5) { if (isset($_GET["attachment_id"]) && $_GET["attachment_id"]) { $on_media_edit_screen = true; } } else { $current_screen = get_current_screen(); if (!is_null($current_screen) && $current_screen->base == 'post' && $current_screen->post_type == 'attachment') { $on_media_edit_screen = true; } } if ($on_media_edit_screen == true) { $url = admin_url("upload.php?page=enable-media-replace/enable-media-replace.php&action=media_replace&attachment_id=" . $post->ID); $action = "media_replace"; $editurl = wp_nonce_url($url, $action); if (FORCE_SSL_ADMIN) { $editurl = str_replace("http:", "https:", $editurl); } $link = "href=\"{$editurl}\""; $form_fields["enable-media-replace"] = array("label" => __("Replace media", "enable-media-replace"), "input" => "html", "html" => "<p><a class='button-secondary'{$link}>" . __("Upload a new file", "enable-media-replace") . "</a></p>", "helps" => __("To replace the current file, click the link and upload a replacement.", "enable-media-replace")); } return $form_fields; }
private function _getDefaultScreenIcon() { $_oScreen = get_current_screen(); $_sIconIDAttribute = $this->_getScreenIDAttribute($_oScreen); $_aAttributes = array('class' => $this->getClassAttribute($this->getAOrB(empty($_sIconIDAttribute) && $_oScreen->post_type, sanitize_html_class('icon32-posts-' . $_oScreen->post_type), ''), $this->getAOrB(empty($_sIconIDAttribute) || $_sIconIDAttribute == $this->oFactory->oProp->sClassName, 'generic', '')), 'id' => "icon-" . $_sIconIDAttribute); return $this->_getScreenIconByAttributes($_aAttributes); }
/** * Register settings * * @since 1.3 */ public function register_settings() { // Weed out all admin pages except the Jigoshop Settings page hits global $pagenow; if ($pagenow != 'admin.php' && $pagenow != 'options.php') { return; } $screen = get_current_screen(); if ($screen->base != 'jigoshop_page_jigoshop_settings' && $screen->base != 'options') { return; } $slug = $this->get_current_tab_slug(); $options = isset($this->our_parser->tabs[$slug]) ? $this->our_parser->tabs[$slug] : ''; if (!is_array($options)) { jigoshop_log("Jigoshop Settings API: -NO- valid options for 'register_settings()' - EXITING with:"); jigoshop_log($slug); return; } register_setting(JIGOSHOP_OPTIONS, JIGOSHOP_OPTIONS, array($this, 'validate_settings')); if (is_array($options)) { foreach ($options as $index => $option) { switch ($option['type']) { case 'title': add_settings_section($option['section'], $option['name'], array($this, 'display_section'), JIGOSHOP_OPTIONS); break; default: $this->create_setting($index, $option); break; } } } add_action('admin_enqueue_styles', array($this, 'settings_styles'), 9); add_action('admin_enqueue_scripts', array($this, 'settings_scripts'), 9); }
/** * Add Contextual help tabs */ public function add_tabs() { $screen = get_current_screen(); if (!in_array($screen->id, wc_get_screen_ids())) { return; } $video_map = array('wc-settings' => array('title' => __('General Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'), 'wc-settings-general' => array('title' => __('General Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'), 'wc-settings-products' => array('title' => __('Product Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true'), 'wc-settings-tax' => array('title' => __('Tax Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true'), 'wc-settings-checkout' => array('title' => __('Checkout Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true'), 'wc-settings-shipping' => array('title' => __('Shipping Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'), 'wc-settings-account' => array('title' => __('Account Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true'), 'wc-settings-email' => array('title' => __('Email Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true'), 'wc-settings-api' => array('title' => __('Webhook Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true'), 'wc-settings-checkout-wc_gateway_paypal' => array('title' => __('PayPal Standard', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true'), 'wc-settings-checkout-wc_gateway_simplify_commerce' => array('title' => __('Simplify Commerce', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true'), 'wc-settings-shipping' => array('title' => __('Shipping Settings', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'), 'wc-settings-shipping-wc_shipping_free_shipping' => array('title' => __('Free Shipping', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/po191fmvy9?videoFoam=true'), 'wc-settings-shipping-wc_shipping_local_delivery' => array('title' => __('Local Delivery', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/5qjepx9ozj?videoFoam=true'), 'wc-settings-shipping-wc_shipping_local_pickup' => array('title' => __('Local Pickup', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/pe95ph0apb?videoFoam=true'), 'edit-product_cat' => array('title' => __('Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'), 'edit-product_tag' => array('title' => __('Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'), 'edit-product_shipping_class' => array('title' => __('Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'), 'product_attributes' => array('title' => __('Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'), 'product' => array('title' => __('Simple Products', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true'), 'wc-status' => array('title' => __('System Status', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true'), 'wc-reports' => array('title' => __('Reports', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true'), 'edit-shop_coupon' => array('title' => __('Coupons', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'), 'shop_coupon' => array('title' => __('Coupons', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'), 'edit-shop_order' => array('title' => __('Managing Orders', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'), 'shop_order' => array('title' => __('Managing Orders', 'woocommerce'), 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true')); $page = empty($_GET['page']) ? '' : sanitize_title($_GET['page']); $tab = empty($_GET['tab']) ? '' : sanitize_title($_GET['tab']); $section = empty($_REQUEST['section']) ? '' : sanitize_title($_REQUEST['section']); $video_key = $page ? implode('-', array_filter(array($page, $tab, $section))) : $screen->id; // Fallback for sections if (!isset($video_map[$video_key])) { $video_key = $page ? implode('-', array_filter(array($page, $tab))) : $screen->id; } // Fallback for tabs if (!isset($video_map[$video_key])) { $video_key = $page ? $page : $screen->id; } if (isset($video_map[$video_key])) { $screen->add_help_tab(array('id' => 'woocommerce_101_tab', 'title' => __('WooCommerce 101', 'woocommerce'), 'content' => '<h2><a href="http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommerce&utm_medium=Wizard&utm_content=Videos&utm_campaign=Onboarding">' . __('WooCommerce 101', 'woocommerce') . '</a> – ' . esc_html($video_map[$video_key]['title']) . '</h2>' . '<iframe src="' . esc_url($video_map[$video_key]['url']) . '" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="480" height="298"></iframe>')); } $screen->add_help_tab(array('id' => 'woocommerce_docs_tab', 'title' => __('Documentation', 'woocommerce'), 'content' => '<h2>' . __('Documentation', 'woocommerce') . '</h2>' . '<p>' . __('Should you need help understanding, using, or extending WooCommerce, please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.', 'woocommerce') . '</p>' . '<p><a href="' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/' . '" class="button button-primary">' . __('WooCommerce Documentation', 'woocommerce') . '</a> <a href="' . 'http://docs.woothemes.com/wc-apidocs/' . '" class="button">' . __('Developer API Docs', 'woocommerce') . '</a></p>')); $screen->add_help_tab(array('id' => 'woocommerce_support_tab', 'title' => __('Support', 'woocommerce'), 'content' => '<h2>' . __('Support', 'woocommerce') . '</h2>' . '<p>' . sprintf(__('After %sreading the documentation%s, for further assistance you can use the %scommunity forums%s on WordPress.org to talk with other users. If however you are a WooThemes customer, or need help with premium add-ons sold by WooThemes, please %suse our helpdesk%s.', 'woocommerce'), '<a href="http://docs.woothemes.com/documentation/plugins/woocommerce/">', '</a>', '<a href="https://wordpress.org/support/plugin/woocommerce">', '</a>', '<a href="http://support.woothemes.com">', '</a>') . '</p>' . '<p>' . __('Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce') . '</p>' . '<p><a href="' . admin_url('admin.php?page=wc-status') . '" class="button button-primary">' . __('System Status', 'woocommerce') . '</a> <a href="' . 'https://wordpress.org/support/plugin/woocommerce' . '" class="button">' . __('WordPress.org Forums', 'woocommerce') . '</a> <a href="' . 'http://support.woothemes.com' . '" class="button">' . __('WooThemes Customer Support', 'woocommerce') . '</a></p>')); $screen->add_help_tab(array('id' => 'woocommerce_education_tab', 'title' => __('Education', 'woocommerce'), 'content' => '<h2>' . __('Education', 'woocommerce') . '</h2>' . '<p>' . __('If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course ran by one of our educational partners.', 'woocommerce') . '</p>' . '<p><a href="' . 'http://www.woothemes.com/educational-partners/?utm_source=WooCommerce&utm_medium=Wizard&utm_content=Partners&utm_campaign=Onboarding' . '" class="button button-primary">' . __('View Education Partners', 'woocommerce') . '</a></p>')); $screen->add_help_tab(array('id' => 'woocommerce_bugs_tab', 'title' => __('Found a bug?', 'woocommerce'), 'content' => '<h2>' . __('Found a bug?', 'woocommerce') . '</h2>' . '<p>' . sprintf(__('If you find a bug within WooCommerce core you can create a ticket via <a href="%s">Github issues</a>. Ensure you read the <a href="%s">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href="%s">system status report</a>.', 'woocommerce'), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url('admin.php?page=wc-status')) . '</p>' . '<p><a href="' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '" class="button button-primary">' . __('Report a bug', 'woocommerce') . '</a> <a href="' . admin_url('admin.php?page=wc-status') . '" class="button">' . __('System Status', 'woocommerce') . '</a></p>')); $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'woocommerce') . '</strong></p>' . '<p><a href="' . 'http://www.woothemes.com/woocommerce/' . '" target="_blank">' . __('About WooCommerce', 'woocommerce') . '</a></p>' . '<p><a href="' . 'http://wordpress.org/extend/plugins/woocommerce/' . '" target="_blank">' . __('WordPress.org Project', 'woocommerce') . '</a></p>' . '<p><a href="' . 'https://github.com/woothemes/woocommerce' . '" target="_blank">' . __('Github Project', 'woocommerce') . '</a></p>' . '<p><a href="' . 'http://www.woothemes.com/product-category/themes/woocommerce/' . '" target="_blank">' . __('Official Themes', 'woocommerce') . '</a></p>' . '<p><a href="' . 'http://www.woothemes.com/product-category/woocommerce-extensions/' . '" target="_blank">' . __('Official Extensions', 'woocommerce') . '</a></p>'); }
/** * Register and enqueue scripts * * Action hook: admin_enqueue_scripts * * @since 0.1 */ function _wpsc_te2_action_admin_enqueue_scripts() { wp_register_script('wpsc-auto-resize-field', WPSC_TE_V2_JS_URL . '/auto-resize-field.js', array('jquery'), WPSC_VERSION); wp_register_script('wpsc-fix-reading-settings', WPSC_TE_V2_JS_URL . '/fix-reading-settings.js', array('jquery'), WPSC_VERSION); wp_register_script('wpsc-presentation-settings', WPSC_TE_V2_JS_URL . '/presentation-settings.js', array('jquery'), WPSC_VERSION); wp_register_script('wpsc-multi-select', WPSC_TE_V2_JS_URL . '/multi-select.js', array('jquery', 'wpsc-select2'), WPSC_VERSION); wp_register_script('wpsc-select2', WPSC_TE_V2_JS_URL . '/select2.full.min.js', array('jquery'), WPSC_VERSION); $current_screen = get_current_screen(); switch ($current_screen->id) { case 'settings_page_wpsc-settings': // Settings->Store->Pages wp_enqueue_script('wpsc-auto-resize-field'); // Settings->Store->Presentation wp_enqueue_script('wpsc-multi-select'); wp_enqueue_script('wpsc-presentation-settings'); break; // Appearance->Widgets // Appearance->Widgets case 'widgets': wp_enqueue_script('wpsc-multi-select'); break; // Settings->Reading // Settings->Reading case 'options-reading': _wpsc_te2_enqueue_reading_settings_fix(); break; } }
function _wpsc_action_enqueue_media_styles() { $current_screen = get_current_screen(); if ('wpsc-product' == $current_screen->id) { wp_enqueue_style('wpsc-media', WPSC_URL . '/wpsc-admin/css/media.css', array('media-views'), WPSC_VERSION); } }
/** * Enqueue Stylesheet for admin Screen. */ function email_downloads_enqueue_styles() { $screen = get_current_screen(); if ($screen->id === 'toplevel_page_email_downloads') { wp_enqueue_style('nano_downloads_email', plugins_url('css/admin-stylesheet.css', __FILE__)); } }
/** * Refresh the post list. */ function refresh() { global $wpdb; $screen = get_current_screen(); if ('edit-wpm-testimonial' != $screen->id) { return; } $result = $wpdb->get_results("SELECT count(*) as cnt, max(menu_order) as max, min(menu_order) as min FROM {$wpdb->posts} WHERE post_type = 'wpm-testimonial' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future')"); $count = $result[0]; // Exit if already one for one. if (0 == $count->cnt || $count->cnt == $count->max) { return; } // Initial or reset if (0 == $count->min && 0 == $count->max) { // Order by descending post date. $results = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpm-testimonial' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') ORDER BY post_date DESC"); foreach ($results as $key => $result) { $wpdb->update($wpdb->posts, array('menu_order' => $key + 1), array('ID' => $result->ID)); } } else { // Consecutive reorder with new posts at top. $results = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'wpm-testimonial' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') ORDER BY menu_order ASC, post_date DESC"); foreach ($results as $key => $result) { $wpdb->update($wpdb->posts, array('menu_order' => $key + 1), array('ID' => $result->ID)); } } }
public function summary_widget() { $screen = get_current_screen(); if ($screen->base == 'dashboard') { ?> <!-- New Wrap with custom welcome screen--> <div class="wrap mjp-dashboard"> <div id="welcome-panel_custom" class="welcome-panel"> <?php wp_nonce_field('welcome-panel-nonce', 'welcomepanelnonce', false); ?> <?php //do_action( 'welcome_panel' ); ?> <div class="mjp-welcome-content"> <div class="welcome-panel-column-container"> <div class="welcom-panel-container"> </div> </div> </div> </div> </div><!-- wrap --> <?php } }
/** * Enqueue common styles * * @return void */ public function admin_enqueue_scripts() { $screen = get_current_screen(); if (isset($screen) && 'post' == $screen->base && isset($this->options['pages']) && in_array($screen->post_type, $this->options['pages']) || isset($screen) && 'edit-tags' == $screen->base && isset($this->options['taxonomies']) && in_array($screen->taxonomy, $this->options['taxonomies'])) { wp_enqueue_style('oxy-metabox-global', OXY_TF_URI . 'assets/css/metaboxes/metabox-global.css', array('jquery-oxygenna-ui-theme')); wp_enqueue_script('metabox-options-global', OXY_TF_URI . 'assets/javascripts/metabox-options-global.js', array('jquery', 'jquery-ui-tooltip')); // enqueue scripts for each field foreach ($this->options['fields'] as $field) { if (isset($field['type'])) { $new_field = OxygennaOptions::create_option($field); if ($new_field !== false) { $new_field->enqueue(); } } } // enqueue metabox-wide javascripts if (isset($this->options['javascripts'])) { foreach ($this->options['javascripts'] as $js) { wp_enqueue_script($js['handle'], $js['src'], $js['deps']); if (isset($js['localize'])) { wp_localize_script($js['handle'], $js['localize']['object_handle'], $js['localize']['data']); } } } } }
/** * Adds a custom filter on 'request' when viewing the "Testimonials" screen in the admin. * * @since 1.0.0 */ public function load_edit() { $screen = get_current_screen(); if (!empty($screen->post_type) && 'testimonial' === $screen->post_type) { add_action('admin_head', array($this, 'print_styles')); } }
/** * Add Away mode Javascript * * @return void */ public function admin_script() { global $itsec_globals; if (isset(get_current_screen()->id) && strpos(get_current_screen()->id, 'security_page_toplevel_page_itsec_advanced') !== false) { wp_enqueue_script('itsec_content_directory_js', $this->module_path . 'js/admin-content_directory.js', array('jquery'), $itsec_globals['plugin_build']); } }
function corpobox_admin_contextual_help() { $screen = get_current_screen(); if ($screen->id == 'themes') { $screen->add_help_tab(array('id' => 'corpobox_wellcom_tab', 'title' => __('Corpobox Theme', 'corpobox'), 'content' => '<p><strong>' . __('Thank you for choosing this Theme!', 'corpobox') . '</strong></p><p>' . __('The Theme has a contextual help for almost all admin screens. More information, help and support you will find on the website DinevThemes.com', 'corpobox') . '</p><p><strong>' . __('Quick Start', 'corpobox') . '</strong></p><p>' . __('Using Customizer set your color, upload a background image (or select any color), upload the image (or select any color) header and other settings.', 'corpobox') . '</p><p>' . __('The theme has page templates for the Home Page. In the Home Tagline section can be used shortcode. For example, instead of heading to place the slider using shortcode slideshow plugin Soliloquy Sliders.', 'corpobox') . '</p><p>' . __('If for Home page is the selected page with a default page template: featured image and the title of the child pages will be shown in two columns below the main content', 'corpobox') . '</p>')); } if ($screen->id == 'post') { $screen->add_help_tab(array('id' => 'corpobox-post-fimg', 'title' => __('Theme Features', 'corpobox'), 'content' => '<p><strong>' . __('Theme Features', 'corpobox') . '</strong></p><p><strong>' . __('Use Featured image', 'corpobox') . '</strong></p><p>' . __('Upload the image that will be displayed header on single post.', 'corpobox') . '</p><p><strong>' . __('Use Excerpt', 'corpobox') . '</strong></p><p>' . __('Enter text in Metabox Excerpt to show announcement or the focus of the post.', 'corpobox') . '</p><p><strong>' . __('Format', 'corpobox') . '</strong></p><p>' . __('<b>Quote.</b> As title, type the author quotes. Quote place in the main text box without using tag blockquote (b-quote). Featured image and Excerpt are not used.<br /><b>Link.</b> As title, type the name Link. URL place in the main text box without using http (http://). Featured image and Excerpt are not used.', 'corpobox') . '</p><p><strong>' . __('Button', 'corpobox') . '</strong></p><p>' . __('To show the button, use the link class, , for example <code>class="btn blue"</code>. Color options: green, blue, red.', 'corpobox') . '</p><p><strong>' . __('Gallery shortcode', 'corpobox') . '</strong></p><p>' . __('For a slideshow gallery use the built-in parameter shortcode Themes <code>type="slider"</code>, sample: <code>[gallery columns="..." ids="..." type="slider"]</code>', 'corpobox') . '</p>')); } if ($screen->id == 'page') { $screen->add_help_tab(array('id' => 'corpobox_page_tab', 'title' => __('Theme Features', 'corpobox'), 'content' => '<p><strong>' . __('Theme Features', 'corpobox') . '</strong></p><p><strong>' . __('Use Featured image', 'corpobox') . '</strong></p><p>' . __('Upload the image that will be displayed header on page.', 'corpobox') . '</p><p><strong>' . __('Use Excerpt', 'corpobox') . '</strong></p><p>' . __('Enter text in Metabox Excerpt to show announcement or the focus of the page.', 'corpobox') . '</p><p><strong>' . __('Templates', 'corpobox') . '</strong></p><p>' . __('The theme has several page templates. Use metabox Page Attributes > dropdown Template.', 'corpobox') . '</p><p><strong>' . __('Button', 'corpobox') . '</strong></p><p>' . __('To show the button, use the link class, , for example <code>class="btn blue"</code>. Color options: green, blue, red.', 'corpobox') . '</p><p><strong>' . __('Gallery shortcode', 'corpobox') . '</strong></p><p>' . __('For a slideshow gallery use the built-in parameter shortcode Themes <code>type="slider"</code>, sample: <code>[gallery columns="..." ids="..." type="slider"]</code>', 'corpobox') . '</p>')); } if ($screen->id == 'widgets') { $screen->add_help_tab(array('id' => 'corpobox-widgets', 'title' => __('Theme Features', 'corpobox'), 'content' => '<p><strong>' . __('Custom widgets', 'corpobox') . '</strong></p><p>' . __('The theme has custom widgets with the prefix Corpobox in the title. For the widget the Author box to fill in the biography in the edit screen of the user profile.', 'corpobox') . '</p>')); } if ($screen->id == 'appearance_page_custom-header') { $screen->add_help_tab(array('id' => 'corpobox-header', 'title' => __('Theme Features', 'corpobox'), 'content' => '<p><strong>' . __('Custom Header background Color', 'corpobox') . '</strong></p><p>' . __('Background color header set using Customizer. Go to Customize > Colors: Header BG Color', 'corpobox') . '</p>')); } if ($screen->id == 'nav-menus') { $screen->add_help_tab(array('id' => 'corpobox-social-menus', 'title' => __('Social Menu', 'corpobox'), 'content' => '<p><strong>' . __('Custom widgets', 'corpobox') . '</strong></p><p>' . __('Menu icons social media is displayed in the footer. Included all popular icons of social media, and Feedburner. To create a menu item, use the tab Links (Edit Menus). And select Social Menu as Theme locations.', 'corpobox') . '</p><p>' . __('Example:<br />tab <strong>Links</strong><br /><em>URL</em> http://twitter.com/your<br /><em>Navigation Label</em> Twitter', 'corpobox') . '</p>')); $screen->add_help_tab(array('id' => 'corpobox-top-menus', 'title' => __('Top Menu', 'corpobox'), 'content' => __('<p><strong>Top Menu</strong></p><p>The theme has an additional top menu bar.</p><p>If you create a menu item using Links tab (Edit Menus) and links will be http://tel: OR http://mailto: OR https://goo.gl (short link google map) it will be displayed icons Font Awesome.</p><p>Example:<br />tab <strong>Links</strong><br /><em>URL</em> http://tel:+1916000000<br /><em>Navigation Label</em> +1 916 00.00.00</p>', 'corpobox'))); } /** *else */ return; }
function ninja_forms_load_screen_options_tab() { global $ninja_forms_help_screen_tabs, $ninja_forms_screen_options; $current_tab = ninja_forms_get_current_tab(); $current_page = esc_html($_REQUEST['page']); $screen = get_current_screen(); if (isset($ninja_forms_help_screen_tabs['_universal_'])) { foreach ($ninja_forms_help_screen_tabs['_universal_'] as $key => $tab) { $screen->add_help_tab(array('id' => $key, 'title' => $tab['title'], 'callback' => $tab['content'])); } } if (isset($ninja_forms_help_screen_tabs[$current_page]['_universal_'])) { foreach ($ninja_forms_help_screen_tabs[$current_page]['_universal_'] as $key => $tab) { $screen->add_help_tab(array('id' => $key, 'title' => $tab['title'], 'callback' => $tab['content'])); } } if (isset($ninja_forms_help_screen_tabs[$current_page][$current_tab])) { foreach ($ninja_forms_help_screen_tabs[$current_page][$current_tab] as $key => $tab) { $screen->add_help_tab(array('id' => $key, 'title' => $tab['title'], 'callback' => $tab['content'])); } } if (isset($ninja_forms_screen_options['_universal_']) or isset($ninja_forms_screen_options[$current_page]['_universal_']) or isset($ninja_forms_screen_options[$current_page][$current_tab])) { add_filter('screen_layout_columns', 'ninja_forms_display_screen_options'); $screen->add_option('ninja_forms', ''); } }
/** * @see CPAC_Column_Actions::get_actions() * @since 2.4.7 */ public function get_actions($id) { $actions = array(); $user_object = new WP_User($id); $screen = get_current_screen(); if ('site-users-network' == $screen->id) { $url = "site-users.php?id={$this->site_id}&"; } else { $url = 'users.php?'; } if (get_current_user_id() == $user_object->ID) { $edit_link = 'profile.php'; } else { $edit_link = esc_url(add_query_arg('wp_http_referer', urlencode(stripslashes($_SERVER['REQUEST_URI'])), "user-edit.php?user_id={$user_object->ID}")); } if (current_user_can('edit_user', $user_object->ID)) { $edit = "<strong><a href=\"{$edit_link}\">{$user_object->user_login}</a></strong><br />"; $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; } else { $edit = "<strong>{$user_object->user_login}</strong><br />"; } if (!is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('delete_user', $user_object->ID)) { $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&user={$user_object->ID}", 'bulk-users') . "'>" . __('Delete') . "</a>"; } if (is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('remove_user', $user_object->ID)) { $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url($url . "action=remove&user={$user_object->ID}", 'bulk-users') . "'>" . __('Remove') . "</a>"; } return $actions; }
/** * Set up the enqueue for the CSS & JavaScript files. * * @since 3.0.0 */ function admin_load() { get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview'), 'content' => '<p>' . __('You can customize the look of your site without touching any of your theme’s code by using a custom background. Your background can be an image or a color.') . '</p>' . '<p>' . __('To use a background image, simply upload it, then choose your display options below. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.') . '</p>' . '<p>' . __('You can also choose a background color. If you know the hexadecimal code for the color you want, enter it in the Background Color field. If not, click on the Select a Color link, and a color picker will allow you to choose the exact shade you want.') . '</p>' . '<p>' . __('Don’t forget to click on the Save Changes button when you are finished.') . '</p>')); get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'); wp_enqueue_script('custom-background'); wp_enqueue_style('farbtastic'); }
/** * Add contextual help to the Themes and Post edit screens. * * @since Twenty Fourteen 1.0 */ function twentyfourteen_contextual_help() { if ('admin_head-edit.php' === current_filter() && 'post' !== $GLOBALS['typenow']) { return; } get_current_screen()->add_help_tab(array('id' => 'twentyfourteen', 'title' => __('Twenty Fourteen', 'twentyfourteen'), 'content' => '<ul>' . '<li>' . sprintf(__('The home page features your choice of up to 6 posts prominently displayed in a grid or slider, controlled by a <a href="%1$s">tag</a>; you can change the tag and layout in <a href="%2$s">Appearance → Customize</a>. If no posts match the tag, <a href="%3$s">sticky posts</a> will be displayed instead.', 'twentyfourteen'), esc_url(add_query_arg('tag', _x('featured', 'featured content default tag slug', 'twentyfourteen'), admin_url('edit.php'))), admin_url('customize.php'), admin_url('edit.php?show_sticky=1')) . '</li>' . '<li>' . sprintf(__('Enhance your site design by using <a href="%s">Featured Images</a> for posts you’d like to stand out (also known as post thumbnails). This allows you to associate an image with your post without inserting it. Twenty Fourteen uses featured images for posts and pages—above the title—and in the Featured Content area on the home page.', 'twentyfourteen'), 'https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail') . '</li>' . '<li>' . sprintf(__('For an in-depth tutorial, and more tips and tricks, visit the <a href="%s">Twenty Fourteen documentation</a>.', 'twentyfourteen'), 'https://codex.wordpress.org/Twenty_Fourteen') . '</li>' . '</ul>')); }
/** * Adds a custom filter on 'request' when viewing the "Services" screen in the admin. * * @since 1.0.0 */ public function load_edit() { $screen = get_current_screen(); if (!empty($screen->post_type) && CHERRY_SERVICES_NAME === $screen->post_type) { add_action('admin_head', array($this, 'print_styles')); } }
public function help_tab() { $screen = get_current_screen(); // Return early if we're not on the book post type. if ('wd_gallery' != $screen->post_type) { return; } // Setup help tab args. $args = array('id' => 'wdg_getting_started', 'title' => 'Getting Started', 'content' => '<h3>Getting Started</h3><ol> <li>Go to wd Gallery and click ‘Add new Gallery’ button</li> <li>Type the name of the gallery and add images</li> <li>Publish and you have a just created your first photo gallery</li> </ol> <h4>Creating gallery list page</h4> <ol> <li>Create a new page or edit and existing one</li> <li>Click on ‘Add wd Gallery’ button directly above the Editor</li> <li>Press the ‘Insert Shortcode’ button for Galleries overview</li> <li>You should have a short code in your editor ([wd_gallery])</li> <li>Save the page and you\\’re done!</li> </ol> '); // Add the help tab. $screen->add_help_tab($args); $contextual_help = '<h3>' . __('Feedback', 'wd-gallery') . '</h3>'; $contextual_help .= '<p>' . __('Your opinion matters! We would appreciate if you can share what you think about wd Gallery with us. We would love to improve it!', 'wd-gallery') . '</p>'; $contextual_help .= '<p>' . __('Just shoot us an email at <a href="mailto:labs@wiredot.com">labs@wiredot.com</a>', 'wd-gallery') . '</p>'; // Setup help tab args. $args = array('id' => 'wdg_feedback', 'title' => 'Feedback', 'content' => $contextual_help); // Add the help tab. $screen->add_help_tab($args); }
/** Help Tab Content*/ function eventon_admin_help_tab_content() { $screen = get_current_screen(); ob_start(); ?> <p><b>EventON WP Event Calendar General Information.</b></p> <p><a class='evo_admin_btn btn_prime' href='<?php echo get_admin_url(); ?> index.php?page=evo-getting-started'>Getting started guide to eventON</a></p> <p>All the updated documentation for eventON can be found from our <a class='evo_admin_btn btn_triad'href='http://www.myeventon.com/documentation/'>online documentation library.</a></p> <?php $content = ob_get_clean(); ob_start(); ?> <p><b>Support for EventON Calendar</b></p> <p>We provide support for issues directly related to eventON calendar via our <a href='http://helpdesk.ashanjay.com' target='_blank' class='evo_admin_btn btn_triad'>HelpDesk</a> EventON valid purchase code is required to access helpdesk if eventON came bundled with your theme.</p> <p>Before creating a ticket, please check the troubleshooter guide that can very well help you solve your issue by trying our common solutions.</p> <p>Please check out our <a href='http://www.myeventon.com/documentation/check-eventon-working/' class='evo_admin_btn btn_triad' target='_blank' >troubleshooter guide to eventon</a></p> <?php $support = ob_get_clean(); $screen->add_help_tab(array('id' => 'eventon_overview_tab', 'title' => __('General', 'eventon'), 'content' => $content)); $screen->add_help_tab(array('id' => 'eventon_overview_tab_s', 'title' => __('Support', 'eventon'), 'content' => $support)); $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'eventon') . '</strong></p>' . '<p><a href="http://www.myeventon.com/" target="_blank">' . __('EventON', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/changelog/" target="_blank">' . __('Changelog', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/documentation/" target="_blank">' . __('Documentation', 'eventon') . '</a></p>' . '<p><a href="http://www.myeventon.com/addons/" target="_blank">' . __('Addons', 'eventon') . '</a></p>' . '<p><a href="http://helpdesk.ashanjay.com" target="_blank">' . __('Helpdesk', 'eventon') . '</a></p>'); }