myblogs_options
Enable the Global Settings section on the My Sites screen.
Description
By default, the Global Settings section is hidden. Passing a non-empty string to this filter will enable the section, and allow new settings to be added, either globally or for specific sites.
Parameters (2)
- 0. $var (string) =>
''
- The settings HTML markup. Default empty.
- 1. $global (string) =>
'global'
- Context of the setting (global or site-specific). Default global..
Usage
- To run the hook, copy the example below.
- $var = apply_filters( 'myblogs_options', $var, $global );
- if ( !empty( $var ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the myblogs_options callback
- function filter_myblogs_options( $var, $global ) {
- // make filter magic happen here...
- return $var;
- };
- // add the filter
- add_filter( 'myblogs_options', 'filter_myblogs_options', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'myblogs_options', 'filter_myblogs_options', 10, 2 );
Defined (2)
The filter is defined in the following location(s).
- /wp-admin/my-sites.php
- $settings_html = apply_filters( 'myblogs_options', '', 'global' );
- echo apply_filters( 'myblogs_options', '', $user_blog );