publicize_checkbox_global_default

Filters the checkboxes for global connections with non-prilvedged users.

Description

apply_filters( 'publicize_checkbox_global_default', (bool) $true, (int) $post_id, (string) $name, (array) $connection ); 

Parameters (4)

0. $true (bool)
Indicates if this connection should be enabled. Default true.
1. $post_id (int)
ID of the current post
2. $name (string)
Name of the connection (Facebook, Twitter, etc)
3. $connection (array)
Array of data about the connection.

Usage

To run the hook, copy the example below.
  1. $true = apply_filters( 'publicize_checkbox_global_default', $true, $post_id, $name, $connection ); 
  2.  
  3. if ( !empty( $true ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the publicize_checkbox_global_default callback 
  2. function filter_publicize_checkbox_global_default( $true, $post_id, $name, $connection ) { 
  3. // make filter magic happen here... 
  4. return $true
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'publicize_checkbox_global_default', 'filter_publicize_checkbox_global_default', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'publicize_checkbox_global_default', 'filter_publicize_checkbox_global_default', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/modules/publicize/ui.php  
  1. $hidden_checkbox = apply_filters( 'publicize_checkbox_global_default', true, $post->ID, $name, $connection );