/** * Add the Create a Site nav to the Sites directory navigation. * * bp-legacy puts the Create a Site nav at the last position of * the Sites directory navigation. * * @since BuddyPress (2.2.0) * * @uses bp_blog_create_nav_item() to output the Create a Site nav item * @return string */ function bp_legacy_theme_blog_create_nav() { bp_blog_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. * * @since BuddyPress (2.2.0) * * @uses bp_blog_create_nav_item() to output the Create a Site nav item. * * @return string HTML Output */ 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(); }