Exemple #1
0
function tk_json_taglist($type = 'wp-home')
{
    global $special_tags;
    if (tk_is_buddypress()) {
        $fallback_type = 'bp-component-unknown';
    } else {
        $fallback_type = 'global';
    }
    $tags = $special_tags->get_tags($type, '', $fallback_type);
    foreach ($tags as $tag => $value) {
        $result[] = array('value' => $tag, 'desc' => $value['description']);
    }
    echo json_encode($result);
}
Exemple #2
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';
}
Exemple #3
0
 function tk_get_bp_page_type($page_type)
 {
     global $bp;
     if (is_page() && tk_is_buddypress() && $bp->current_component != '') {
         $slug = $bp->current_component;
         $component = tk_get_bp_component_by_slug($slug);
         $action = $bp->current_action;
         if ($component != '') {
             if ($action != '') {
                 if (bp_is_group_forum_topic()) {
                     $page_type = 'bp-component-' . $component . '-' . $action . '-topic';
                 } elseif (!bp_is_activity_front_page() && bp_is_activity_component() && $action != 'just-me') {
                     $page_type = 'bp-component-activity-activity';
                 } else {
                     $page_type = 'bp-component-' . $component . '-' . $action;
                 }
             } else {
                 $page_type = 'bp-component-' . $component;
             }
         }
     }
     return apply_filters('tk_get_bp_page_type', $page_type);
 }
Exemple #4
0
 private function init_special_tags()
 {
     global $special_tags;
     $special_tags = new TK_SPECIAL_TAGS();
     sp_init_special_tags();
     // Initializung Special tag sets & tags
     sp_init_special_tags_pt();
     // Initializung Special tag types
     if (tk_is_buddypress()) {
         // Should be reworked <- BP have to be hooked in
         sp_init_bp_special_tags();
         // Initializung Special tag sets & tags for buddypress
         sp_init_bp_special_tags_pt();
         // Initializung Special tag types for buddypress
     }
     $special_tags->add_type('unknown', array('global'));
     do_action('sp_init_special_tags');
 }