aioseop_filter_callback

The All In One SEO Pack aioseop filter callback function.

Description

(string) aioseop_filter_callback( $matches ); 

Returns (string)

Parameters (1)

0. $matches
The matches.

Usage

  1. if ( !function_exists( 'aioseop_filter_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/aioseop_functions.php'; 
  3.  
  4. // The matches. 
  5. $matches = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = aioseop_filter_callback($matches); 
  9.  

Defined (1)

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

/inc/aioseop_functions.php  
  1. function aioseop_filter_callback( $matches ) { 
  2. if ( $matches[1] && ! empty( $matches[1] ) ) { 
  3. $postID = $matches[1]; 
  4. if ( empty( $postID ) ) { 
  5. $postID = get_option( 'page_on_front' ); 
  6. $title_attrib = stripslashes( get_post_meta( $postID, '_aioseop_titleatr', true ) ); 
  7. if ( empty( $title_attrib ) && ! empty( $matches[4] ) ) { 
  8. $title_attrib = $matches[4]; 
  9. if ( ! empty( $title_attrib ) ) { 
  10. $title_attrib = ' title="' . strip_tags( $title_attrib ) . '"'; 
  11.  
  12. return '<li class="page_item page-item-' . $postID . $matches[2] . '"><a href="' . $matches[3] . '"' . $title_attrib . '>';