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;
}
Exemplo n.º 2
0
/**
 * SeoPress settings page in admin
 *
 * @package SeoPress
 * @author Sven Lehnert, Sven Wagener
 * @copyright Copyright (C) Themekraft.com
 **/
function seopress_options()
{
    global $seopress_plugin_url;
    /*
     * Adding display
     */
    $display = new TK_WP_ADMIN_DISPLAY(__('Options', 'seopress'), 'plugins');
    $display->add_element('<p>' . __('Configure global settings for SeoPress.', 'seopress') . '</p>');
    $form = new TK_WP_FORM('seopress_options');
    /*
     * Adding jqueryui tabs
     */
    $tabs = new TK_WP_JQUERYUI_TABS();
    require_once 'options_seo.tab.php';
    $tabs->add_tab('cap_main_blog', __('Seo', 'seopress'), sp_admin_settings_tab());
    do_action('sp_options_tabs', $tabs);
    $form->add_element($tabs->get_html());
    $display->add_element($form->get_html());
    $display->write_html();
    include 'footer.php';
}
/**
 * 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;
}
Exemplo n.º 4
0
function sp_page_metabox()
{
    $mb = new TK_WP_METABOX('sp_post_metabox', __('SeoPress Settings', 'seopress'), 'page');
    $title_field = apply_filters('sp_page_metabox_title', $title_field);
    $description_field = apply_filters('sp_page_metabox_description', $description_field);
    $keywords_field = apply_filters('sp_page_metabox_keywords', $keywords_field);
    $noindex_field = apply_filters('sp_page_metabox_noindex', $noindex_field);
    $post_metabox_table = apply_filters('sp_page_metabox_table', $post_metabox_table);
    $tabs = new TK_WP_JQUERYUI_TABS();
    $html = '<p class="sp_metabox_description">' . __('Leave fields blank if you want to use standard values.', 'seopress') . '</p>';
    $html .= '<table class="form-table">
				<tbody>
					<tr>
						<td width="200" valign="top"><label for="seopress_title">' . __('Title', 'seopress') . ':</label></td>
						<td>' . tk_wp_form_textfield('title', 'sp_post_metabox', 'title', ' style="width:99%"') . $title_field . '</td>
					</tr>
					<tr>
						<td valign="top"><label for="seopress_description">' . __('Description', 'seopress') . ':</label></td>
						<td>' . tk_wp_form_textfield('description', 'sp_post_metabox', 'description', ' style="width:99%"') . $description_field . '</td>
					</tr>
					<tr>
						<td valign="top"><label for="seopress_keywords">' . __('Keywords', 'seopress') . ':</label></td>
						<td>' . tk_wp_form_textfield('keywords', 'sp_post_metabox', 'keywords', ' style="width:99%"') . $keywords_field . '</td>
					</tr>
					<tr>
						<td valign="top"><label for="seopress_noindex">' . __('Ban searchengines', 'seopress') . ':</label></td>
						<td>' . tk_wp_form_checkbox('noindex', 'sp_post_metabox', 'noindex') . $noindex_field . '</td>
					</tr>
					' . $page_metabox_table . '
				</tbody>
			</table>';
    $html = apply_filters('sp_page_metabox_html', $html);
    $tabs->add_tab('cap_post_seo', __('SEO', 'seopress'), $html);
    do_action('sp_page_metabox_tabs', $tabs);
    $html = $tabs->get_html();
    $mb->add_element($html);
    $mb->create();
}
Exemplo n.º 5
0
/**
 * SeoPress SEO Settings page in admin
 *
 * @package SeoPress
 * @author Sven Lehnert, Sven Wagener
 * @copyright Copyright (C) Themekraft.com
 **/
function seopress_seo()
{
    global $seopress_plugin_url;
    $html = apply_filters('sp_settings_top', $html);
    /*
     * Adding display
     */
    $display = new TK_WP_ADMIN_DISPLAY(__('Page types', 'seopress'), 'plugins');
    $display->add_element('<p>' . __('Optimize your Wordpress pages.', 'seopress') . '</p>');
    $form = new TK_WP_FORM('seopress_seo_settings', 'POST', 'seopress_settings');
    /*
     * Adding jqueryui tabs
     */
    $tabs = new TK_WP_JQUERYUI_TABS();
    require_once 'seo_wordpress.tab.php';
    require_once 'seo_wordpressmu.tab.php';
    require_once 'seo_buddypress.tab.php';
    require_once 'seo_buddypress_plugins.tab.php';
    // Wordpress tab
    $tabs->add_tab('cap_main_blog', __('Wordpress', 'seopress'), sp_admin_wp_tab());
    // Wordpress networked blogs tab
    if (defined('SITE_ID_CURRENT_SITE')) {
        $tabs->add_tab('cap_user_blogs', __('Wordpress Network', 'seopress'), sp_admin_wpmu_tab());
    }
    // Buddypress tabs
    if (tk_is_buddypress()) {
        $tabs->add_tab('cap_bp_standard', __('Buddypress', 'seopress'), sp_admin_bp_tab());
        if (sp_is_bp_plugin_installed()) {
            $tabs->add_tab('cap_bp_plugins', __('Buddypress Plugins', 'seopress'), sp_admin_bp_plugins_tab());
        }
    }
    do_action('sp_seo_settings_tabs', $tabs);
    $form->add_element($tabs->get_html());
    $display->add_element($form->get_html());
    $html .= $display->get_html();
    $html = apply_filters('sp_seo_settings_bottom', $html);
    echo $html;
    include 'footer.php';
}