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 Description


Return Return

(string|null) HTML Output


Top ↑

Source Source

File: bp-blogs/bp-blogs-template.php

function bp_blog_backcompat_create_nav_item() {
	// Bail if Blogs nav item is already used by bp-legacy.
	if ( has_action( 'bp_blogs_directory_blog_types', 'bp_legacy_theme_blog_create_nav', 999 ) ) {
		return;
	}

	// Bail if the theme is not filtering the Blogs directory title.
	if ( ! has_filter( 'bp_blogs_directory_header' ) ) {
		return;
	}

	bp_blog_create_nav_item();
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.