bp_blog_backcompat_create_nav_item

Checks if a specific theme is still filtering the Blogs directory title if so, transform the title button into a Blogs directory nav item.

Description

(string) bp_blog_backcompat_create_nav_item(); 

Returns (string)

HTML Output


Usage

  1. if ( !function_exists( 'bp_blog_backcompat_create_nav_item' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_blog_backcompat_create_nav_item(); 
  7.  

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_blog_backcompat_create_nav_item() { 
  2. // Bail if Blogs nav item is already used by bp-legacy. 
  3. if ( has_action( 'bp_blogs_directory_blog_types', 'bp_legacy_theme_blog_create_nav', 999 ) ) { 
  4. return; 
  5.  
  6. // Bail if the theme is not filtering the Blogs directory title. 
  7. if ( ! has_filter( 'bp_blogs_directory_header' ) ) { 
  8. return; 
  9.