myblogs_options

Enable the Global Settings section on the My Sites screen.

Description

apply_filters( 'myblogs_options', (string) $var, (string) $global ); 

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.
  1. $var = apply_filters( 'myblogs_options', $var, $global ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the myblogs_options callback 
  2. function filter_myblogs_options( $var, $global ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'myblogs_options', 'filter_myblogs_options', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. 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  
  1. $settings_html = apply_filters( 'myblogs_options', '', 'global' ); 
  1. echo apply_filters( 'myblogs_options', '', $user_blog );