ns_ogimage

The NextScripts: Social Networks Auto-Poster ns ogimage hook.

Description

apply_filters( 'ns_ogimage', (unknown) $ogimage ); 

Parameters (1)

0. $ogimage (unknown)
The ogimage.

Usage

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

Defined (1)

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

/NextScripts_SNAP.php  
  1. $ogImgsOut = ''; if (!empty($ogimgs) && is_array($ogimgs)) foreach ($ogimgs as $ogimage) $ogImgsOut .= '<meta property="og:image" content="'.esc_url(apply_filters('ns_ogimage', $ogimage)).'" />'."\r\n";