• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bp_is_profile_component函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中bp_is_profile_component函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_is_profile_component函数的具体用法?PHP bp_is_profile_component怎么用?PHP bp_is_profile_component使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了bp_is_profile_component函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: lsx_buddypress_page_columns

/**
 * Forces the BP Profile Pages to be 1 Column
 * 
 * @package lsx
 * @subpackage jetpack
 * @category infinite scroll
 */
function lsx_buddypress_page_columns($layout)
{
    if (bp_is_profile_component() || bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component() || bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()) {
        $layout = '1c';
    }
    return $layout;
}
开发者ID:LinaPeterssonOberg,项目名称:exam,代码行数:14,代码来源:buddypress.php


示例2: bphelp_pbpp_redirect

function bphelp_pbpp_redirect()
{
    global $bp;
    //IMPORTANT: Do not alter the following line.
    $bphelp_my_redirect_slug = get_option('bphelp-my-redirect-slug', 'register');
    if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bbp_is_single_forum() || bbp_is_single_topic() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_members_component() || bp_is_profile_component()) {
        if (!is_user_logged_in()) {
            bp_core_redirect(get_option('home') . '/' . $bphelp_my_redirect_slug);
        }
    }
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:11,代码来源:private-bp-pages.php


示例3: logged_out_redirect

function logged_out_redirect()
{
    global $bp;
    // BuddyPress components to lock
    if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page(BP_MEMBERS_SLUG) || bp_is_profile_component()) {
        // Check if user is logged out
        if (!is_user_logged_in()) {
            // Check if a page was selected for redirection
            if (of_get_option('redirect')) {
                $redirect_page = get_permalink(of_get_option('redirect'));
                // If not redirect to login page
            } else {
                $redirect_page = site_url('/wp-login.php');
            }
            wp_redirect($redirect_page);
            exit;
        }
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:19,代码来源:private-bp.php


示例4: setup_title

 /**
  * Sets up the title for pages and <title>
  */
 public function setup_title()
 {
     if (bp_is_profile_component()) {
         $bp = buddypress();
         if (bp_is_my_profile()) {
             $bp->bp_options_title = _x('My Profile', 'Page title', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => bp_displayed_user_id(), 'type' => 'thumb', 'alt' => sprintf(_x('Profile picture of %s', 'Avatar alt', 'buddypress'), bp_get_displayed_user_fullname())));
             $bp->bp_options_title = bp_get_displayed_user_fullname();
         }
     }
     parent::setup_title();
 }
开发者ID:AceMedia,项目名称:BuddyPress,代码行数:16,代码来源:bp-xprofile-loader.php


示例5: bp_is_user_change_avatar

function bp_is_user_change_avatar()
{
    if (bp_is_profile_component() && bp_is_current_action('change-avatar')) {
        return true;
    }
    return false;
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:7,代码来源:bp-core-template.php


示例6: bp_get_member_activity_feed_link

/**
 * Returns the member activity feed link
 *
 * @since 1.2.0
 *
 * @uses bp_is_profile_component()
 * @uses bp_is_current_action()
 * @uses bp_displayed_user_domain()
 * @uses bp_get_activity_slug()
 * @uses bp_is_active()
 * @uses bp_get_friends_slug()
 * @uses bp_get_groups_slug()
 * @uses apply_filters() To call the 'bp_get_activities_member_rss_link' hook
 *
 * @return string $link The member activity feed link
 */
function bp_get_member_activity_feed_link()
{
    global $bp;
    if (bp_is_profile_component() || bp_is_current_action('just-me')) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/feed/';
    } elseif (bp_is_active('friends') && bp_is_current_action(bp_get_friends_slug())) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed/';
    } elseif (bp_is_active('groups') && bp_is_current_action(bp_get_groups_slug())) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
    } elseif ('favorites' == $bp->current_action) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
    } elseif ('mentions' == $bp->current_action) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
    } else {
        $link = '';
    }
    return apply_filters('bp_get_activities_member_rss_link', $link);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:34,代码来源:bp-activity-template.php


示例7: uni_avatar_scripts

function uni_avatar_scripts()
{
    wp_enqueue_script('jquery');
    if (get_option('uni_upload_form_in_front')) {
        wp_enqueue_media();
    }
    if (function_exists('bp_is_active')) {
        if (bp_is_profile_component() && 'change-avatar' == bp_current_action() && get_option('uni_avatar_enable_buddypress_form_override')) {
            wp_enqueue_media();
        }
    }
    if (class_exists('bbPress')) {
        if (bbp_is_single_user_edit()) {
            wp_enqueue_media();
        }
    }
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-widget');
    wp_enqueue_script('jcrop');
    wp_register_script('jquery.iframe-transport', UNI_AVATAR_WP_PLUGIN_URL . 'js/jquery.iframe-transport.js', array('jquery-ui-widget'), '1.8.3');
    wp_enqueue_script('jquery.iframe-transport');
    wp_register_script('jquery.fileupload', UNI_AVATAR_WP_PLUGIN_URL . 'js/jquery.fileupload.js', array('jquery-ui-widget'), '5.42.3');
    wp_enqueue_script('jquery.fileupload');
    wp_register_script('jquery.fileupload-process', UNI_AVATAR_WP_PLUGIN_URL . 'js/jquery.fileupload-process.js', array('jquery-ui-widget'), '5.42.3');
    wp_enqueue_script('jquery.fileupload-process');
    wp_register_script('jquery.fileupload-validate', UNI_AVATAR_WP_PLUGIN_URL . 'js/jquery.fileupload-validate.js', array('jquery-ui-widget'), '5.42.3');
    wp_enqueue_script('jquery.fileupload-validate');
    wp_register_script('uni-avatar-modal', UNI_AVATAR_WP_PLUGIN_URL . 'js/uni-avatar-modal.js', array('jquery.fileupload'), UNI_AVATAR_VERSION);
    wp_enqueue_script('uni-avatar-modal');
    $params = array('site_url' => get_bloginfo('url'), 'ajax_url' => admin_url('admin-ajax.php'), 'upload_form_in_front_on' => get_option('uni_upload_form_in_front') || function_exists('bp_is_active') && get_option('uni_avatar_enable_buddypress_form_override') && bp_is_profile_component() && 'change-avatar' == bp_current_action() || class_exists('bbPress') && bbp_is_single_user_edit() ? 1 : 0, 'select_avatars_on' => get_option('uni_avatar_custom_avatars') ? 1 : 0, 'uni_avatar_max' => get_option('uni_avatar_default_size') ? get_option('uni_avatar_default_size') * 1024 : UNI_AVATAR_DEFAULT_SIZE * 1024, 'modal_upload_title' => __('Upload Avatar', 'uni-avatar'), 'modal_select_title' => __('Select Avatar', 'uni-avatar'), 'file_not_allowed' => __('File type not allowed', 'uni-avatar'), 'file_too_large' => __('File is too large', 'uni-avatar'));
    wp_localize_script('uni-avatar-modal', 'uniavatarparams', $params);
    wp_enqueue_style('dashicons');
    wp_enqueue_style('admin-css', UNI_AVATAR_WP_PLUGIN_URL . 'css/uniavatar-styles-front.css');
}
开发者ID:PHQ-Design,项目名称:souza-lima,代码行数:34,代码来源:uni-user-avatar.php


示例8: setup_title

 /**
  * Sets up the title for pages and <title>
  *
  * @global obj $bp
  */
 function setup_title()
 {
     global $bp;
     if (bp_is_profile_component()) {
         if (bp_is_my_profile()) {
             $bp->bp_options_title = __('My Profile', 'buddypress');
         } else {
             $bp->bp_options_avatar = bp_core_fetch_avatar(array('item_id' => $bp->displayed_user->id, 'type' => 'thumb'));
             $bp->bp_options_title = $bp->displayed_user->fullname;
         }
     }
     parent::setup_title();
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:18,代码来源:bp-xprofile-loader.php


示例9: check_if_privacy_on

 function check_if_privacy_on()
 {
     global $bp;
     $privacy_enable = get_option('tn_wpmu_privacy_status');
     $privacy_redirect = get_option('tn_wpmu_privacy_redirect');
     if ($privacy_enable == "enable") {
         if (bp_is_profile_component() || bp_is_activity_component() || bp_is_page(BP_MEMBERS_SLUG) || bp_is_user()) {
             if (!is_user_logged_in()) {
                 if ($privacy_redirect == '') {
                     bp_core_redirect($bp->root_domain . '/' . bp_get_root_slug('register'));
                 } else {
                     bp_core_redirect($privacy_redirect);
                 }
             }
         }
     }
     //off
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:18,代码来源:functions.php


示例10: inject_js

 function inject_js()
 {
     if ((bp_is_my_profile() || is_super_admin()) && bp_is_profile_component() && bp_is_current_action('change-cover')) {
         wp_enqueue_script('bpcp-js', plugin_dir_url(__FILE__) . 'bpcp.js', array('jquery'));
     }
 }
开发者ID:EfncoPlugins,项目名称:buddypress-cover-photo,代码行数:6,代码来源:profile-cover.php


示例11: bp_get_member_activity_feed_link

/**
 * Return the member activity feed link.
 *
 * @since BuddyPress (1.2.0)
 *
 * @uses bp_is_profile_component()
 * @uses bp_is_current_action()
 * @uses bp_displayed_user_domain()
 * @uses bp_get_activity_slug()
 * @uses bp_is_active()
 * @uses bp_get_friends_slug()
 * @uses bp_get_groups_slug()
 * @uses apply_filters() To call the 'bp_get_activities_member_rss_link' hook.
 *
 * @return string $link The member activity feed link.
 */
function bp_get_member_activity_feed_link()
{
    // Single member activity feed link
    if (bp_is_profile_component() || bp_is_current_action('just-me')) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/feed/';
        // Friend feed link
    } elseif (bp_is_active('friends') && bp_is_current_action(bp_get_friends_slug())) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed/';
        // Group feed link
    } elseif (bp_is_active('groups') && bp_is_current_action(bp_get_groups_slug())) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
        // Favorites activity feed link
    } elseif ('favorites' === bp_current_action()) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
        // Mentions activity feed link
    } elseif ('mentions' === bp_current_action() && bp_activity_do_mentions()) {
        $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
        // No feed link
    } else {
        $link = '';
    }
    /**
     * Filters the member activity feed link.
     *
     * @since BuddyPress (1.0.0)
     *
     * @param string $link URL for the member activity feed.
     */
    return apply_filters('bp_get_activities_member_rss_link', $link);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:46,代码来源:bp-activity-template.php


示例12: bp_is_user_change_avatar

function bp_is_user_change_avatar()
{
    return (bool) (bp_is_profile_component() && bp_is_current_action('change-avatar'));
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:4,代码来源:bp-core-template.php


示例13: get_content_width

/**
 * Get content width
 */
function get_content_width($site_width)
{
    global $cap, $post, $bp;
    if ($cap->cc_responsive_enable) {
        $cap->rightsidebar_width = 225;
        $cap->leftsidebar_width = 225;
    }
    $cap->archive_template = $cap->archive_template == 'full-width' && defined('is_pro') ? $cap->archive_template : $cap->sidebar_position;
    if (defined('BP_VERSION') && bp_is_user() && check_value($cap->bp_profile_sidebars, 'none', '==')) {
        return $site_width;
    } else {
        if (defined('BP_VERSION') && bp_is_user() && check_value($cap->bp_profile_sidebars, 'default', '!=')) {
            if (check_value($cap->bp_profile_sidebars, 'left', '==') || check_value($cap->bp_profile_sidebars, 'left and right', '==')) {
                $site_width -= $cap->leftsidebar_width;
            }
            if (check_value($cap->bp_profile_sidebars, 'right', '==') || check_value($cap->bp_profile_sidebars, 'left and right', '==')) {
                $site_width -= $cap->rightsidebar_width;
            }
            return $site_width;
        } else {
            if ((!is_page() || is_page('search') || is_search()) && !is_archive() || function_exists('is_bbpress') && is_bbpress() && !is_archive()) {
                $tpl = !empty($post) ? get_post_meta($post->ID, '_wp_page_template', TRUE) : FALSE;
                $tpl = empty($tpl) ? 'default' : $tpl;
                $affected = FALSE;
                if (check_value($cap->bp_profile_sidebars, 'default', '==') && $tpl == 'full-width.php') {
                    return $site_width;
                }
                if (check_value($cap->bp_profile_sidebars, 'default', '==') && ($tpl == '_pro/tpl-left-and-right-sidebar.php' || $tpl == '_pro/tpl-left-sidebar.php')) {
                    $site_width -= $cap->leftsidebar_width;
                    $affected = TRUE;
                }
                if (check_value($cap->bp_profile_sidebars, 'default', '==') && ($tpl == '_pro/tpl-left-and-right-sidebar.php' || $tpl == '_pro/tpl-right-sidebar.php')) {
                    $site_width -= $cap->rightsidebar_width;
                    $affected = TRUE;
                }
                if ($affected) {
                    return $site_width;
                }
                if (check_value($cap->bp_profile_sidebars, 'none', '==')) {
                    return $site_width;
                } elseif (check_value($cap->bp_profile_sidebars, 'left', '==') || check_value($cap->bp_profile_sidebars, 'default', '==') && check_value($cap->sidebar_position, 'left', '==')) {
                    $site_width -= $cap->leftsidebar_width;
                }
                if (check_value($cap->bp_profile_sidebars, 'right', '==') || check_value($cap->bp_profile_sidebars, 'default', '==') && check_value($cap->sidebar_position, 'right', '===')) {
                    $site_width -= $cap->rightsidebar_width;
                } else {
                    if (check_value($cap->bp_profile_sidebars, 'left and right', '==') || check_value($cap->bp_profile_sidebars, 'default', '==') && check_value($cap->sidebar_position, 'left and right', '==')) {
                        $site_width = $site_width - $cap->rightsidebar_width - $cap->leftsidebar_width;
                    }
                }
                return $site_width;
            } elseif (is_archive()) {
                if (defined('is_pro') && ($cap->archive_template == 'full-width' || check_value($cap->archive_template, 'full-width', '=='))) {
                    return $site_width;
                }
                if (is_archive() && ($cap->archive_template == 'left' || $cap->archive_template == 'left and right' || check_value($cap->archive_template, 'left', '==') || check_value($cap->archive_template, 'left and right', '=='))) {
                    $site_width -= $cap->leftsidebar_width;
                }
                if ($cap->archive_template == "right" || $cap->archive_template == "left and right" || check_value($cap->archive_template, 'right', '==') || check_value($cap->archive_template, 'left and right', '==')) {
                    $site_width -= $cap->rightsidebar_width;
                }
            } else {
                if (isset($post)) {
                    $detect = new TK_WP_Detect();
                    $component = explode('-', $detect->tk_get_page_type());
                    if (!empty($component[2])) {
                        if ($component[2] == 'groups' && !empty($component[3]) && (property_exists($bp, 'unfiltered_uri') && !empty($bp->unfiltered_uri[0]) && $bp->unfiltered_uri[0] != 'members')) {
                            if ($cap->bp_groups_sidebars == 'default' && check_value($cap->sidebar_position, 'left and right', '==') || $cap->bp_groups_sidebars == 'left' || $cap->bp_groups_sidebars == __('left', 'cc') || $cap->bp_groups_sidebars == 'left and right' || check_value($cap->bp_groups_sidebars, 'left and right', '==')) {
                                $site_width -= $cap->leftsidebar_width;
                            }
                            if ($cap->bp_groups_sidebars == 'default' || $cap->bp_groups_sidebars == 'right' || check_value($cap->bp_groups_sidebars, 'right', '==') || $cap->bp_groups_sidebars == 'left and right' || check_value($cap->bp_groups_sidebars, 'left and right', '==')) {
                                $site_width -= $cap->rightsidebar_width;
                            }
                            return $site_width;
                        } elseif (property_exists($bp, 'unfiltered_uri') && !empty($bp->unfiltered_uri[0]) && $bp->unfiltered_uri[0] == 'members' || bp_is_activity_component() || bp_is_profile_component() || bp_is_messages_component() || bp_is_friends_component() || bp_is_settings_component()) {
                            if (($cap->bp_profile_sidebars == 'default' || check_value($cap->sidebar_position, 'default', '==')) && ($cap->bp_profile_sidebars == 'left and right' || check_value($cap->sidebar_position, 'left and right', '==') || check_value($cap->sidebar_position, 'left', '==') || $cap->sidebar_position == 'left') || $cap->bp_profile_sidebars == 'left' || check_value($cap->bp_profile_sidebars, 'left', '==') || $cap->bp_profile_sidebars == 'left and right' || check_value($cap->bp_profile_sidebars, 'left and right', '==')) {
                                $site_width -= $cap->leftsidebar_width;
                            }
                            if (($cap->bp_profile_sidebars == "default" || check_value($cap->bp_profile_sidebars, 'default', '==')) && ($cap->sidebar_position == "right" || check_value($cap->sidebar_position, 'right', '==') || $cap->sidebar_position == "left and right" || check_value($cap->sidebar_position, 'left and right', '==')) || $cap->bp_profile_sidebars == 'right' || check_value($cap->bp_profile_sidebars, 'right', '==') || $cap->bp_profile_sidebars == 'left and right' || check_value($cap->bp_profile_sidebars, 'left and right', '==')) {
                                $site_width -= $cap->rightsidebar_width;
                            }
                            return $site_width;
                        } elseif ($component[2] == 'members') {
                            if (check_value($cap->sidebar_position, 'left and right', '==') || check_value($cap->sidebar_position, 'default', '==')) {
                                $site_width -= $cap->leftsidebar_width;
                            }
                            if (check_value($cap->sidebar_position, 'left and right', '==') || check_value($cap->sidebar_position, 'right', '==')) {
                                $site_width -= $cap->rightsidebar_width;
                            }
                            return $site_width;
                        } else {
                            if ($component[2] != 'forums') {
                                if (check_value($cap->sidebar_position, 'left and right', '==') || check_value($cap->sidebar_position, 'default', '==')) {
                                    $site_width -= $cap->leftsidebar_width;
                                }
                                if (check_value($cap->sidebar_position, 'left and right', '==') || check_value($cap->sidebar_position, 'right', '==')) {
                                    $site_width -= $cap->rightsidebar_width;
//.........这里部分代码省略.........
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:101,代码来源:width-calculators.php


示例14: sidebar_right

 /**
  * footer: add the sidebar and their default widgets to the right sidebar
  *
  * located: footer.php do_action( 'sidebar_left' )
  *
  * @package Custom Community
  * @since 1.8.3
  */
 function sidebar_right()
 {
     global $cap, $post, $bp;
     $tmp = !empty($post) ? get_post_meta($post->ID, '_wp_page_template', true) : '';
     if (defined('BP_VERSION') && bp_is_user() && ($cap->bp_profile_sidebars == __('none', 'cc') || $cap->bp_profile_sidebars == __('left', 'cc'))) {
         return;
     }
     if (defined('BP_VERSION') && bp_is_group() && ($cap->bp_groups_sidebars == __('none', 'cc') || $cap->bp_groups_sidebars == __('left', 'cc'))) {
         return;
     }
     if (function_exists('is_bbpress') && (is_bbpress() && defined('BP_VERSION') && !bp_is_user() && !bp_is_group()) && ($cap->sidebar_position == __('left', 'cc') || $cap->sidebar_position == __('full-width', 'cc'))) {
         return;
     } else {
         if (function_exists('is_bbpress') && (is_bbpress() && defined('BP_VERSION') && !bp_is_user() && !bp_is_group()) && ($cap->sidebar_position == __('right', 'cc') || $cap->sidebar_position == __('left and right', 'cc'))) {
             locate_template(array('sidebar.php'), true);
             return;
         }
     }
     if ($tmp == 'full-width.php' || $tmp == 'tpl-search-full-width.php' || $tmp == 'left-sidebar.php' || $tmp == '_pro/tpl-left-sidebar.php') {
         return;
     }
     if ($tmp == 'left-and-right-sidebar.php' || $tmp == 'right-sidebar.php' || $tmp == '_pro/tpl-left-and-right-sidebar.php' || $tmp == '_pro/tpl-search-right-and-left-sidebar.php' || $tmp == '_pro/tpl-right-sidebar.php' || $tmp == '_pro/tpl-search-right-sidebar.php') {
         locate_template(array('sidebar.php'), true);
         return;
     }
     $component = explode('-', $this->detect->tk_get_page_type());
     if (!empty($component[2])) {
         if ($component[2] == 'groups' && !empty($component[3]) && $bp->unfiltered_uri[0] != 'members') {
             if ($cap->bp_groups_sidebars == 'right' || $cap->bp_groups_sidebars == __('right', 'cc') || $cap->bp_groups_sidebars == 'left and right' || $cap->bp_groups_sidebars == __('left and right', 'cc')) {
                 locate_template(array('groups/single/group-sidebar-right.php'), true);
             } elseif (($cap->bp_groups_sidebars == "default" || $cap->bp_groups_sidebars == __("default", 'cc')) && ($cap->sidebar_position == "right" || $cap->sidebar_position == __("right", 'cc')) || ($cap->sidebar_position == "left and right" || $cap->sidebar_position == __("left and right", 'cc')) && ($cap->bp_groups_sidebars == "default" || $cap->bp_groups_sidebars == __("default", 'cc'))) {
                 locate_template(array('sidebar.php'), true);
             }
             return;
         } elseif ($bp->unfiltered_uri[0] == 'members' || bp_is_activity_component() || bp_is_profile_component() || bp_is_messages_component() || bp_is_friends_component() || bp_is_settings_component()) {
             if ($cap->bp_profile_sidebars == 'right' || $cap->bp_profile_sidebars == __('right', 'cc') || $cap->bp_profile_sidebars == 'left and right' || $cap->bp_profile_sidebars == __('left and right', 'cc')) {
                 locate_template(array('members/single/member-sidebar-right.php'), true);
             } elseif (($cap->bp_profile_sidebars == "default" || $cap->bp_profile_sidebars == __("default", 'cc')) && ($cap->sidebar_position == "right" || $cap->sidebar_position == __("right", 'cc')) || ($cap->sidebar_position == "left and right" || $cap->sidebar_position == __("left and right", 'cc')) && ($cap->bp_profile_sidebars == "default" || $cap->bp_profile_sidebars == __("default", 'cc'))) {
                 locate_template(array('sidebar.php'), true);
             }
             return;
         } else {
             if ($cap->sidebar_position == "right" || $cap->sidebar_position == __("right", 'cc') || $cap->sidebar_position == "left and right" || $cap->sidebar_position == __("left and right", 'cc')) {
                 locate_template(array('sidebar.php'), true);
                 return;
             }
         }
     } elseif (empty($component[2]) && !is_archive() && !is_page()) {
         if ($cap->sidebar_position == "right" || $cap->sidebar_position == __("right", 'cc') || $cap->sidebar_position == "left and right" || $cap->sidebar_position == __("left and right", 'cc')) {
             locate_template(array('sidebar.php'), true);
             return;
         }
     }
     $cap->archive_template = $cap->archive_template == 'full-width' && defined('is_pro') ? $cap->archive_template : $cap->sidebar_position;
     if (is_archive() && ($cap->archive_template == "right" || $cap->archive_template == "left and right" || $cap->archive_template == __("right", 'cc') || $cap->archive_template == __("left and right", 'cc'))) {
         locate_template(array('sidebar.php'), true);
         return;
     } else {
         if (!is_page() && ($cap->archive_template == "left" || $cap->archive_template == __("left", 'cc') || $cap->archive_template == 'full-width' || $cap->archive_template == __('full-width', 'cc'))) {
             return;
         }
     }
     if ($cap->sidebar_position == __('left and right', 'cc') || $cap->sidebar_position == __('right', 'cc')) {
         locate_template(array('sidebar.php'), true);
         return;
     }
 }
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:75,代码来源:theme-generator.php


示例15: suffusion_bp_content_class

 /**
  * Similar to the post_class() function, but for BP. This is NOT used by core Suffusion, but is useful for child themes using BP.
  * This might be defined by the Suffusion BuddyPress Pack for BP users of Suffusion, but is included conditionally here so
  * that the theme and the plugin can be used independently of each other and so that one version of Suffusion can work with an older
  * version of the BP pack.
  *
  * @since 3.6.7
  * @param bool $custom
  * @param bool $echo
  * @return bool|string
  */
 function suffusion_bp_content_class($custom = false, $echo = true)
 {
     if (!function_exists('bp_is_group')) {
         return false;
     }
     $css = array();
     $css[] = 'post';
     if (function_exists('bp_is_profile_component') && bp_is_profile_component()) {
         $css[] = 'profile-component';
     }
     if (function_exists('bp_is_activity_component') && bp_is_activity_component()) {
         $css[] = 'activity-component';
     }
     if (function_exists('bp_is_blogs_component') && bp_is_blogs_component()) {
         $css[] = 'blogs-component';
     }
     if (function_exists('bp_is_messages_component') && bp_is_messages_component()) {
         $css[] = 'messages-component';
     }
     if (function_exists('bp_is_friends_component') && bp_is_friends_component()) {
         $css[] = 'friends-component';
     }
     if (function_exists('bp_is_groups_component') && bp_is_groups_component()) {
         $css[] = 'groups-component';
     }
     if (function_exists('bp_is_settings_component') && bp_is_settings_component()) {
         $css[] = 'settings-component';
     }
     if (function_exists('bp_is_member') && bp_is_member()) {
         $css[] = 'member';
     }
     if (function_exists('bp_is_user_activity') && bp_is_user_activity()) {
         $css[] = 'user-activity';
     }
     if (function_exists('bp_is_user_friends_activity') && bp_is_user_friends_activity()) {
         $css[] = 'user-friends-activity';
     }
     if (function_exists('bp_is_activity_permalink') && bp_is_activity_permalink()) {
         $css[] = 'activity-permalink';
     }
     if (function_exists('bp_is_user_profile') && bp_is_user_profile()) {
         $css[] = 'user-profile';
     }
     if (function_exists('bp_is_profile_edit') && bp_is_profile_edit()) {
         $css[] = 'profile-edit';
     }
     if (function_exists('bp_is_change_avatar') && bp_is_change_avatar()) {
         $css[] = 'change-avatar';
     }
     if (function_exists('bp_is_user_groups') && bp_is_user_groups()) {
         $css[] = 'user-groups';
     }
     if (function_exists('bp_is_group') && bp_is_group()) {
         $css[] = 'group';
     }
     if (function_exists('bp_is_group_home') && bp_is_group_home()) {
         $css[] = 'group-home';
     }
     if (function_exists('bp_is_group_create') && bp_is_group_create()) {
         $css[] = 'group-create';
     }
     if (function_exists('bp_is_group_admin_page') && bp_is_group_admin_page()) {
         $css[] = 'group-admin-page';
     }
     if (function_exists('bp_is_group_forum') && bp_is_group_forum()) {
         $css[] = 'group-forum';
     }
     if (function_exists('bp_is_group_activity') && bp_is_group_activity()) {
         $css[] = 'group-activity';
     }
     if (function_exists('bp_is_group_forum_topic') && bp_is_group_forum_topic()) {
         $css[] = 'group-forum-topic';
     }
     if (function_exists('bp_is_group_forum_topic_edit') && bp_is_group_forum_topic_edit()) {
         $css[] = 'group-forum-topic-edit';
     }
     if (function_exists('bp_is_group_members') && bp_is_group_members()) {
         $css[] = 'group-members';
     }
     if (function_exists('bp_is_group_invites') && bp_is_group_invites()) {
         $css[] = 'group-invites';
     }
     if (function_exists('bp_is_group_membership_request') && bp_is_group_membership_request()) {
         $css[] = 'group-membership-request';
     }
     if (function_exists('bp_is_group_leave') && bp_is_group_leave()) {
         $css[] = 'group-leave';
     }
     if (function_exists('bp_is_group_single') && bp_is_group_single()) {
//.........这里部分代码省略.........
开发者ID:jpsutton,项目名称:suffusion,代码行数:101,代码来源:bp-integration.php


示例16: frontend_js

 public function frontend_js()
 {
     wp_enqueue_script('bp-cover-photo', plugin_dir_url(__FILE__) . '/assets/js/cover-photo.js', array('jquery'), null, true);
     if (function_exists('bp_is_my_profile') && (bp_is_my_profile() && bp_is_profile_component() && bp_is_current_action('change-cover-photo'))) {
         if (!($image = get_transient('profile_cover_photo_' . bp_displayed_user_id()))) {
             return;
         }
         $image = getimagesize($image);
         $full_width = $this->width;
         // max cover photo width
         $full_height = $this->height;
         // max cover photo height
         // calculate aspect ratio
         $aspect_ratio = $full_width / $full_height;
         wp_localize_script('bp-cover-photo', 'bp_cover_photo_l10n', array('width' => $image[0], 'height' => $image[1], 'aspectRatio' => $aspect_ratio));
     }
 }
开发者ID:Twizanex,项目名称:cover-image,代码行数:17,代码来源:wds-bp-cover-photo.php


示例17: bp_is_user_change_cover_image

/**
 * Is the current page the a user's change cover image profile page?
 *
 * Eg http://example.com/members/joe/profile/change-cover-image/ (or a subpage thereof).
 *
 * @since 2.4.0
 *
 * @return bool True if the current page is a user's profile edit cover image page.
 */
function bp_is_user_change_cover_image()
{
    return (bool) (bp_is_profile_component() && bp_is_current_action('change-cover-image'));
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:13,代码来源:bp-core-template.php


示例18: miss_is_bp

 /**
  *
  */
 function miss_is_bp()
 {
     if (function_exists('bp_is_group') && (bp_is_blog_page() || bp_is_my_profile() || bp_is_my_profile() || is_front_page() || bp_is_component_front_page('activity') || bp_is_directory() || bp_is_profile_component() || bp_is_activity_component() || bp_is_blogs_component() || bp_is_messages_component() || bp_is_friends_component() || bp_is_groups_component() || bp_is_settings_component() || bp_is_user_activity() || bp_is_user_friends_activity() || bp_is_activity_permalink() || bp_is_user_profile() || bp_is_profile_edit() || bp_is_change_avatar() || bp_is_user_groups() || bp_is_group() || bp_is_group_home() || bp_is_group_create() || bp_is_group_admin_page() || bp_is_group_forum() || bp_is_group_activity() || bp_is_group_forum_topic() || bp_is_group_forum_topic_edit() || bp_is_group_members() || bp_is_group_invites() || bp_is_group_membership_request() || bp_is_group_leave() || bp_is_group_single() || bp_is_user_blogs() || bp_is_user_recent_posts() || bp_is_user_recent_commments() || bp_is_create_blog() || bp_is_user_friends() || bp_is_friend_requests() || bp_is_user_messages() || bp_is_messages_inbox() || bp_is_messages_sentbox() || bp_is_notices() || bp_is_messages_compose_screen() || bp_is_activation_page() || bp_is_register_page())) {
         return true;
     }
     return false;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:10,代码来源:app.php



注:本文中的bp_is_profile_component函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bp_is_register_page函数代码示例发布时间:2022-05-24
下一篇:
PHP bp_is_network_activated函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap