contextual_help
Filters the legacy contextual help text.
Description
Parameters (3)
- 0. $old_help (string)
- Help text that appears on the screen.
- 1. $this_id (string)
- The this id.
- 2. $instance (WP_Screen)
- Current
WP_Screen
instance.
Usage
- To run the hook, copy the example below.
- $old_help = apply_filters( 'contextual_help', $old_help, $this_id, $instance );
- if ( !empty( $old_help ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the contextual_help callback
- function filter_contextual_help( $old_help, $this_id, $instance ) {
- // make filter magic happen here...
- return $old_help;
- };
- // add the filter
- add_filter( 'contextual_help', 'filter_contextual_help', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'contextual_help', 'filter_contextual_help', 10, 3 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/class-wp-screen.php
- $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this );