function sp_admin_bp_plugins_tabs() { global $bp; // Getting saved data $bp_seo_components = get_blog_option(SITE_ID_CURRENT_SITE, "bp_seo_plugins"); // <===== Have to be replaced with framework !!! $tabs = new TK_WP_JQUERYUI_TABS(); // Getting all active components $bp_components = sp_get_bp_components(); foreach ($bp_components as $bp_component) { // If component is a plugin -> Add tab if (sp_is_bp_plugin($bp_component)) { $tab_name = ucwords(strtolower(str_replace('_', ' ', $bp_component))); $tabs->add_tab('cap_' . $bp_component, $tab_name, seopress_component_tab($bp_component)); } } $html = $tabs->get_html(); return $html; }
/** * Configuration tab for buddypress * * @package SeoPress * @author Sven Wagener * @copyright Copyright (C) Themekraft **/ function sp_admin_bp_tab() { global $bp, $seopress_plugin_url; $html .= sp_admin_tab_header(__('Buddypress', 'seopress'), __('Setup your title and meta tags of the buddypress pages.', 'seopress'), $seopress_plugin_url . 'includes/images/logo-buddypress.png'); $bp_seo_components = get_blog_option(SITE_ID_CURRENT_SITE, 'bp_seo_plugins'); // Searching for component slugs and adding to array $bp_components = array(); foreach ((array) $bp as $key => $value) { if ($bp->{$key}->slug != '') { array_push($bp_components, $bp->{$key}->slug); } } /* * Adding jqueryui tabs */ $html .= '<h3>' . __('Setup Buddypress pages', 'seopress') . '</h3>'; $tabs = new TK_WP_JQUERYUI_TABS(); if (tk_bp_is_active_component('activity')) { $tabs->add_tab('cap_bp_activities', __('Activity', 'seopress'), sp_admin_bp_activities_tab()); } $tabs->add_tab('cap_bp_members', __('Members', 'seopress'), sp_admin_bp_members_tab()); $tabs->add_tab('cap_bp_profiles', __('Profiles', 'seopress'), sp_admin_bp_profiles_tab()); if (tk_bp_is_active_component('groups')) { $tabs->add_tab('cap_bp_groups', __('Groups', 'seopress'), sp_admin_bp_groups_tab()); } if (tk_bp_is_active_component('forums')) { $tabs->add_tab('cap_bp_forums', __('Forums', 'seopress'), sp_admin_bp_forums()); } if (tk_bp_is_active_component('blogs')) { $tabs->add_tab('cap_bp_blogs', __('Blogs', 'seopress'), sp_admin_bp_blogs()); } if (get_option('users_can_register')) { $tabs->add_tab('cap_bp_registration', __('Registration', 'seopress'), sp_admin_bp_register()); } $html .= $tabs->get_html(); $button = '<p class="submit"><input class="button-primary" type="submit" name="save" value="' . __('Save', 'seopress') . '" /></p>'; $html .= $button; return $html; }