wpseo_html_namespaces

Allow for adding additional namespaces to the prefix attributes.

Description

apply_filters( 'wpseo_html_namespaces', (string) $namespaces ); 

Parameters (1)

0. $namespaces (string)
Currently registered namespaces which are to be added to the prefix attribute. Namespaces are strings and have the following syntax: ns: http://url.to.namespace/definition

Usage

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

Defined (1)

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

/frontend/class-opengraph.php  
  1. $namespaces = apply_filters( 'wpseo_html_namespaces', $namespaces );