wpseo_opengraph_author_facebook

Filter: 'wpseo_opengraph_author_facebook' - Allow developers to filter the Yoast SEO post authors facebook profile URL.

Description

apply_filters( 'wpseo_opengraph_author_facebook', (unknown) $get_the_author_meta ); 

Parameters (1)

0. $get_the_author_meta (unknown) => get_the_author_meta( 'facebook', $GLOBALS['post']->post_author )
The get the author meta.

Usage

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

Defined (1)

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

/frontend/class-opengraph.php  
  1. $facebook = apply_filters( 'wpseo_opengraph_author_facebook', get_the_author_meta( 'facebook', $GLOBALS['post']->post_author ) );