advantage_wp_title

General Framework function.

Description

advantage_wp_title( $title, $sep ); 

Parameters (2)

0. $title
The title.
1. $sep
The sep.

Usage

  1. if ( !function_exists( 'advantage_wp_title' ) ) { 
  2. require_once '/inc/lib-general.php'; 
  3.  
  4. // The title. 
  5. $title = null; 
  6.  
  7. // The sep. 
  8. $sep = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = advantage_wp_title($title, $sep); 
  12.  

Defined (1)

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

/inc/lib-general.php  
  1. function advantage_wp_title( $title, $sep ) { 
  2. global $paged, $page; 
  3.  
  4. if ( is_feed() ) 
  5. return $title; 
  6.  
  7. $title .= get_bloginfo( 'name' ); 
  8.  
  9. $site_description = get_bloginfo( 'description', 'display' ); 
  10. if ( $site_description && ( is_home() || is_front_page() ) ) 
  11. $title = "$title $sep $site_description"; 
  12. if ( $paged >= 2 || $page >= 2 ) 
  13. $title = "$title $sep " . sprintf( __( 'Page %s', 'advantage' ), max( $paged, $page ) ); 
  14.  
  15. return $title;