/** * Add contextual help text for a page. * * Creates a 'Screen Info' help tab. * * @since 2.7.0 * * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. * @param string $help The content of a 'Screen Info' help tab. * * @todo: deprecate? */ function add_contextual_help($screen, $help) { if (is_string($screen)) { $screen = convert_to_screen($screen); } WP_Screen::add_old_compat_help($screen, $help); }
/** * Add contextual help text for a page. * * Creates an 'Overview' help tab. * * @since 2.7.0 * @deprecated 3.3.0 * @deprecated Use get_current_screen()->add_help_tab() * @see WP_Screen * * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. * @param string $help The content of an 'Overview' help tab. */ function add_contextual_help($screen, $help) { _deprecated_function(__FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()'); if (is_string($screen)) { $screen = convert_to_screen($screen); } WP_Screen::add_old_compat_help($screen, $help); }
/** * Function is loaded by WordPress, if WP-Table Reloaded's admin menu entry is called, * Load the scripts, stylesheets and language, all of this will be done before the page is shown by show_manage_page() */ function load_manage_page() { // show admin footer message (only on pages of WP-Table Reloaded) add_filter('admin_footer_text', array(&$this->helper, 'add_admin_footer_text')); $this->init_language_support(); // get and check action parameter from passed variables $default_action = 'list'; $default_action = apply_filters('wp_table_reloaded_default_action', $default_action); $this->allowed_actions = apply_filters('wp_table_reloaded_allowed_actions', $this->allowed_actions); $action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : $default_action; // check if action is in allowed actions and if method is callable, if yes, call it if (in_array($action, $this->allowed_actions)) { $this->action = $action; } add_thickbox(); // load js and css for admin, needs to stand below thickbox script $this->add_manage_page_js(); // will add script to footer $this->add_manage_page_css(); // needs to be added to the header // done after determining the action, because needs action parameter to load correct help string if (version_compare($GLOBALS['wp_version'], '3.3', '>')) { WP_Screen::add_old_compat_help(convert_to_screen($this->hook), $this->helper->get_contextual_help_string()); } else { add_contextual_help($this->hook, $this->helper->get_contextual_help_string()); } }