当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_is_user_change_avatar函数代码示例

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


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

示例1: xprofile_action_delete_avatar

/**
 * This function runs when an action is set for a screen:
 * example.com/members/andy/profile/change-avatar/ [delete-avatar]
 *
 * The function will delete the active avatar for a user.
 *
 * @package BuddyPress Xprofile
 * @uses bp_core_delete_avatar() Deletes the active avatar for the logged in user.
 * @uses add_action() Runs a specific function for an action when it fires.
 */
function xprofile_action_delete_avatar()
{
    if (!bp_is_user_change_avatar() || !bp_is_action_variable('delete-avatar', 0)) {
        return false;
    }
    // Check the nonce
    check_admin_referer('bp_delete_avatar_link');
    if (!bp_is_my_profile() && !bp_current_user_can('bp_moderate')) {
        return false;
    }
    if (bp_core_delete_existing_avatar(array('item_id' => bp_displayed_user_id()))) {
        bp_core_add_message(__('Your avatar was deleted successfully!', 'buddypress'));
    } else {
        bp_core_add_message(__('There was a problem deleting that avatar, please try again.', 'buddypress'), 'error');
    }
    bp_core_redirect(wp_get_referer());
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:27,代码来源:bp-xprofile-actions.php

示例2: bp_avatar_is_front_edit

/**
 * Checks whether Avatar UI should be loaded.
 *
 * @since  2.3.0
 *
 * @return bool True if Avatar UI should load, false otherwise.
 */
function bp_avatar_is_front_edit()
{
    $retval = false;
    // No need to carry on if the current WordPress version is not supported.
    if (!bp_attachments_is_wp_version_supported()) {
        return $retval;
    }
    if (bp_is_user_change_avatar() && 'crop-image' !== bp_get_avatar_admin_step()) {
        $retval = !bp_core_get_root_option('bp-disable-avatar-uploads');
    }
    if (bp_is_active('groups')) {
        // Group creation
        if (bp_is_group_create() && bp_is_group_creation_step('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) {
            $retval = !bp_disable_group_avatar_uploads();
            // Group Manage
        } elseif (bp_is_group_admin_page() && bp_is_group_admin_screen('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) {
            $retval = !bp_disable_group_avatar_uploads();
        }
    }
    /**
     * Use this filter if you need to :
     * - Load the avatar UI for a component that is !groups or !user (return true regarding your conditions)
     * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false())
     *
     * @since  2.3.0
     *
     * @param bool whether to load the Avatar UI.
     */
    return apply_filters('bp_avatar_is_front_edit', $retval);
}
开发者ID:toby-bushell,项目名称:triumph,代码行数:37,代码来源:bp-core-avatars.php

示例3: bp_is_change_avatar

function bp_is_change_avatar()
{
    _deprecated_function(__FUNCTION__, '1.5', 'bp_is_user_change_avatar()');
    return bp_is_user_change_avatar();
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:5,代码来源:1.5.php

示例4: bp_get_the_body_class

/**
 * Customize the body class, according to the currently displayed BP content.
 *
 * Uses the above is_() functions to output a body class for each scenario.
 *
 * @since 1.1.0
 *
 * @param array      $wp_classes     The body classes coming from WP.
 * @param array|bool $custom_classes Classes that were passed to get_body_class().
 * @return array $classes The BP-adjusted body classes.
 */
function bp_get_the_body_class($wp_classes = array(), $custom_classes = false)
{
    $bp_classes = array();
    /* Pages *************************************************************/
    if (is_front_page()) {
        $bp_classes[] = 'home-page';
    }
    if (bp_is_directory()) {
        $bp_classes[] = 'directory';
    }
    if (bp_is_single_item()) {
        $bp_classes[] = 'single-item';
    }
    /* Components ********************************************************/
    if (!bp_is_blog_page()) {
        if (bp_is_user_profile()) {
            $bp_classes[] = 'xprofile';
        }
        if (bp_is_activity_component()) {
            $bp_classes[] = 'activity';
        }
        if (bp_is_blogs_component()) {
            $bp_classes[] = 'blogs';
        }
        if (bp_is_messages_component()) {
            $bp_classes[] = 'messages';
        }
        if (bp_is_friends_component()) {
            $bp_classes[] = 'friends';
        }
        if (bp_is_groups_component()) {
            $bp_classes[] = 'groups';
        }
        if (bp_is_settings_component()) {
            $bp_classes[] = 'settings';
        }
    }
    /* User **************************************************************/
    if (bp_is_user()) {
        $bp_classes[] = 'bp-user';
        // Add current user member types.
        if ($member_types = bp_get_member_type(bp_displayed_user_id(), false)) {
            foreach ($member_types as $member_type) {
                $bp_classes[] = sprintf('member-type-%s', esc_attr($member_type));
            }
        }
    }
    if (!bp_is_directory()) {
        if (bp_is_user_blogs()) {
            $bp_classes[] = 'my-blogs';
        }
        if (bp_is_user_groups()) {
            $bp_classes[] = 'my-groups';
        }
        if (bp_is_user_activity()) {
            $bp_classes[] = 'my-activity';
        }
    } else {
        if (bp_get_current_member_type()) {
            $bp_classes[] = 'type';
        }
    }
    if (bp_is_my_profile()) {
        $bp_classes[] = 'my-account';
    }
    if (bp_is_user_profile()) {
        $bp_classes[] = 'my-profile';
    }
    if (bp_is_user_friends()) {
        $bp_classes[] = 'my-friends';
    }
    if (bp_is_user_messages()) {
        $bp_classes[] = 'my-messages';
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
//.........这里部分代码省略.........
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:bp-core-template.php

示例5: output_flickr_youtube_content

function output_flickr_youtube_content()
{
    global $bp, $wpdb;
    $current_displayed_user = $bp->displayed_user->id;
    $current_loggedin_user = $bp->loggedin_user->id;
    $current_displayed_user_full_name = $bp->displayed_user->fullname;
    $get_user_list = "SELECT user_login FROM " . $wpdb->base_prefix . "users WHERE ID= '" . $current_displayed_user . "' ORDER by ID limit 1";
    $sql_get_user_list = $wpdb->get_var($get_user_list);
    ?>

<?php 
    if ($current_displayed_user == $current_loggedin_user) {
        $v_id = 'My';
    } else {
        $v_id = $sql_get_user_list . '&acute;s';
    }
    ?>


<?php 
    if ($current_displayed_user == $current_loggedin_user) {
        $u_id = 'My';
    } else {
        $u_id = $sql_get_user_list;
    }
    $my_flickr_id = get_user_meta($bp->displayed_user->id, 'user_flickr', true);
    $my_video_id = get_user_meta($bp->displayed_user->id, 'user_video', true);
    $my_video_id_misc = get_user_meta($bp->displayed_user->id, 'user_video_misc', true);
    ?>


<?php 
    if (!bp_is_user_profile_edit() && !bp_is_user_change_avatar()) {
        if ($my_flickr_id) {
            ?>
<div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e("Flickr", TEMPLATE_DOMAIN);
            ?>
&nbsp;&nbsp;&nbsp;&nbsp;<span><a href="http://www.flickr.com/photos/<?php 
            echo $my_flickr_id;
            ?>
"><?php 
            _e("See All &rarr;", TEMPLATE_DOMAIN);
            ?>
</a></span></h4>
<ul id="myflickr">
<li>
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=10&amp;display=latest&amp;size=s&amp;layout=x&amp;source=user&amp;user=<?php 
            echo "{$my_flickr_id}";
            ?>
">
</script>
</li>
</ul>
</div>
<?php 
        }
        ?>


<?php 
        if ($my_video_id) {
            ?>
<div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e('Video', TEMPLATE_DOMAIN);
            ?>
</h4>

<div class="video-wrapper">
	<div class="video-container">
  <iframe width="1280" height="720" src="http://www.youtube.com/embed/<?php 
            echo stripcslashes($my_video_id);
            ?>
" frameborder="0" allowfullscreen></iframe>
  </div></div>

</div>
<?php 
        } else {
            ?>

        <div class="bp-widget">
<h4><?php 
            echo $v_id;
            ?>
 <?php 
            _e('Video', TEMPLATE_DOMAIN);
            ?>
</h4>
<p>
<?php 
            echo stripcslashes($my_video_id_misc);
//.........这里部分代码省略.........
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:101,代码来源:bp-component-functions.php

示例6: bp_get_the_body_class

function bp_get_the_body_class($nxt_classes, $custom_classes = false)
{
    $bp_classes = array();
    /** Pages *************************************************************/
    if (is_front_page()) {
        $bp_classes[] = 'home-page';
    }
    if (bp_is_directory()) {
        $bp_classes[] = 'directory';
    }
    if (bp_is_single_item()) {
        $bp_classes[] = 'single-item';
    }
    /** Components ********************************************************/
    if (!bp_is_blog_page()) {
        if (bp_is_user_profile()) {
            $bp_classes[] = 'xprofile';
        }
        if (bp_is_activity_component()) {
            $bp_classes[] = 'activity';
        }
        if (bp_is_blogs_component()) {
            $bp_classes[] = 'blogs';
        }
        if (bp_is_messages_component()) {
            $bp_classes[] = 'messages';
        }
        if (bp_is_friends_component()) {
            $bp_classes[] = 'friends';
        }
        if (bp_is_groups_component()) {
            $bp_classes[] = 'groups';
        }
        if (bp_is_settings_component()) {
            $bp_classes[] = 'settings';
        }
    }
    /** User **************************************************************/
    if (!bp_is_directory()) {
        if (bp_is_user_blogs()) {
            $bp_classes[] = 'my-blogs';
        }
        if (bp_is_user_groups()) {
            $bp_classes[] = 'my-groups';
        }
        if (bp_is_user_activity()) {
            $bp_classes[] = 'my-activity';
        }
    }
    if (bp_is_my_profile()) {
        $bp_classes[] = 'my-account';
    }
    if (bp_is_user_profile()) {
        $bp_classes[] = 'my-profile';
    }
    if (bp_is_user_friends()) {
        $bp_classes[] = 'my-friends';
    }
    if (bp_is_user_messages()) {
        $bp_classes[] = 'my-messages';
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
    if (bp_is_user_groups_activity()) {
        $bp_classes[] = 'groups-activity';
    }
    if (is_user_logged_in()) {
        $bp_classes[] = 'logged-in';
    }
    /** Messages **********************************************************/
    if (bp_is_messages_inbox()) {
        $bp_classes[] = 'inbox';
    }
    if (bp_is_messages_sentbox()) {
        $bp_classes[] = 'sentbox';
    }
    if (bp_is_messages_compose_screen()) {
        $bp_classes[] = 'compose';
    }
    if (bp_is_notices()) {
        $bp_classes[] = 'notices';
    }
    if (bp_is_user_friend_requests()) {
        $bp_classes[] = 'friend-requests';
    }
    if (bp_is_create_blog()) {
        $bp_classes[] = 'create-blog';
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:101,代码来源:bp-core-template.php

示例7: bp_get_the_body_class

function bp_get_the_body_class($wp_classes = array(), $custom_classes = false)
{
    $bp_classes = array();
    /** Pages *************************************************************/
    if (is_front_page()) {
        $bp_classes[] = 'home-page';
    }
    if (bp_is_directory()) {
        $bp_classes[] = 'directory';
    }
    if (bp_is_single_item()) {
        $bp_classes[] = 'single-item';
    }
    /** Components ********************************************************/
    if (!bp_is_blog_page()) {
        if (bp_is_user_profile()) {
            $bp_classes[] = 'xprofile';
        }
        if (bp_is_activity_component()) {
            $bp_classes[] = 'activity';
        }
        if (bp_is_blogs_component()) {
            $bp_classes[] = 'blogs';
        }
        if (bp_is_messages_component()) {
            $bp_classes[] = 'messages';
        }
        if (bp_is_friends_component()) {
            $bp_classes[] = 'friends';
        }
        if (bp_is_groups_component()) {
            $bp_classes[] = 'groups';
        }
        if (bp_is_settings_component()) {
            $bp_classes[] = 'settings';
        }
    }
    /** User **************************************************************/
    if (bp_is_user()) {
        $bp_classes[] = 'bp-user';
    }
    if (!bp_is_directory()) {
        if (bp_is_user_blogs()) {
            $bp_classes[] = 'my-blogs';
        }
        if (bp_is_user_groups()) {
            $bp_classes[] = 'my-groups';
        }
        if (bp_is_user_activity()) {
            $bp_classes[] = 'my-activity';
        }
    }
    if (bp_is_my_profile()) {
        $bp_classes[] = 'my-account';
    }
    if (bp_is_user_profile()) {
        $bp_classes[] = 'my-profile';
    }
    if (bp_is_user_friends()) {
        $bp_classes[] = 'my-friends';
    }
    if (bp_is_user_messages()) {
        $bp_classes[] = 'my-messages';
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
    if (bp_is_user_groups_activity()) {
        $bp_classes[] = 'groups-activity';
    }
    /** Messages **********************************************************/
    if (bp_is_messages_inbox()) {
        $bp_classes[] = 'inbox';
    }
    if (bp_is_messages_sentbox()) {
        $bp_classes[] = 'sentbox';
    }
    if (bp_is_messages_compose_screen()) {
        $bp_classes[] = 'compose';
    }
    if (bp_is_notices()) {
        $bp_classes[] = 'notices';
    }
    if (bp_is_user_friend_requests()) {
        $bp_classes[] = 'friend-requests';
    }
    if (bp_is_create_blog()) {
        $bp_classes[] = 'create-blog';
//.........这里部分代码省略.........
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:101,代码来源:bp-core-template.php

示例8: body_class

 function body_class($wp_classes, $custom_classes = false)
 {
     global $bp;
     $bp_classes = array();
     if (bp_is_directory()) {
         $bp_classes[] = 'directory';
     } elseif (bp_is_single_item()) {
         $bp_classes[] = 'single-item';
     } elseif (bp_is_activity_component() || $this->show_activity_page) {
         $bp_classes[] = 'activity';
     }
     if ($this->adminbar && $this->theme->have_adminbar()) {
         $bp_classes[] = 'adminbar';
     }
     if (!is_page() && is_front_page() && is_file(CHILD_DIR . '/home.php')) {
         $bp_classes[] = 'home';
     }
     if ($this->show_activity_page) {
         $bp_classes[] = 'internal-page';
     } elseif (!bp_is_blog_page()) {
         $wp_classes = array();
         if (!bp_is_directory()) {
             $bp_classes[] = 'internal-page';
         }
         if (bp_is_user_profile()) {
             $bp_classes[] = 'profile';
         } elseif (bp_is_blogs_component()) {
             $bp_classes[] = 'blogs';
         } elseif (bp_is_messages_component()) {
             $bp_classes[] = 'messages';
         } elseif (bp_is_friends_component()) {
             $bp_classes[] = 'friends';
         } elseif (bp_is_groups_component()) {
             $bp_classes[] = 'groups';
         } elseif (bp_is_settings_component()) {
             $bp_classes[] = 'settings';
         }
     }
     if (is_user_logged_in()) {
         $bp_classes[] = 'logged-in';
         if (!bp_is_directory()) {
             if (bp_is_user_friends()) {
                 $bp_classes[] = 'my-friends';
             } elseif (bp_is_user_activity()) {
                 $bp_classes[] = 'my-activity';
             } elseif (bp_is_user_blogs()) {
                 $bp_classes[] = 'my-blogs';
             } elseif (bp_is_user_groups()) {
                 $bp_classes[] = 'my-groups';
             } elseif (bp_is_messages_inbox()) {
                 $bp_classes[] = 'inbox';
             } elseif (bp_is_messages_sentbox()) {
                 $bp_classes[] = 'sentbox';
             } elseif (bp_is_messages_compose_screen()) {
                 $bp_classes[] = 'compose';
             } elseif (bp_is_notices()) {
                 $bp_classes[] = 'notices';
             } elseif (bp_is_user_friend_requests()) {
                 $bp_classes[] = 'friend-requests';
             } elseif (bp_is_create_blog()) {
                 $bp_classes[] = 'create-blog';
             } elseif (bp_is_group_leave()) {
                 $bp_classes[] = 'leave-group';
             } elseif (bp_is_group_invites()) {
                 $bp_classes[] = 'group-invites';
             } elseif (bp_is_group_forum_topic_edit()) {
                 $bp_classes[] = 'group-forum-topic-edit';
             } elseif (bp_is_group_admin_page()) {
                 $bp_classes[] = 'group-admin';
             } elseif (bp_is_group_create()) {
                 $bp_classes[] = 'group-create';
             } elseif (bp_is_user_change_avatar()) {
                 $bp_classes[] = 'change-avatar';
             } elseif (bp_is_user_profile_edit()) {
                 $bp_classes[] = 'profile-edit';
             }
         }
     } else {
         $bp_classes[] = 'visitor';
     }
     if (bp_is_group_members()) {
         $bp_classes[] = 'group-members';
     } elseif (bp_is_group_home()) {
         $bp_classes[] = 'group-home';
     } elseif (bp_is_group_forum()) {
         $bp_classes[] = 'group-forum';
         if (bp_is_group_forum_topic()) {
             $bp_classes[] = 'group-forum-topic';
         }
     } else {
         if (bp_is_user_recent_commments()) {
             $bp_classes[] = 'recent-comments';
         }
         if (bp_is_user_recent_posts()) {
             $bp_classes[] = 'recent-posts';
         }
         if (bp_is_user_friends_activity()) {
             $bp_classes[] = 'friends-activity';
         } elseif (bp_is_single_activity()) {
             $bp_classes[] = 'activity-permalink';
//.........这里部分代码省略.........
开发者ID:hscale,项目名称:webento,代码行数:101,代码来源:class.front.php

示例9: shoestrap_is_bp

/**
 * Check if this is a BuddyPress page or not.
 * Returns true or false (boolean)
 */
function shoestrap_is_bp()
{
    $bp = false;
    /** Pages *************************************************************/
    if (!$bp && bp_is_directory()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_item()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_activity_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_blogs_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_friends_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_groups_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_settings_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_user()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_blogs()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_my_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_messages()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_commments()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_posts()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_change_avatar()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups_activity()) {
        $bp = true;
    } elseif (!$bp && is_user_logged_in()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_inbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_sentbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_compose_screen()) {
        $bp = true;
    } elseif (!$bp && bp_is_notices()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friend_requests()) {
        $bp = true;
    } elseif (!$bp && bp_is_create_blog()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_leave()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_invites()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_members()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_admin_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_create()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_home()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_register_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_activation_page()) {
        $bp = true;
    } elseif (!$bp && !bp_is_blog_page()) {
        $bp = true;
    }
    return $bp;
}
开发者ID:MinecraftServernet,项目名称:shoestrap-3,代码行数:97,代码来源:buddypress.php

示例10: bp_core_avatar_reset_query

/**
 * Reset the week parameter of the WordPress main query if needed
 *
 * When cropping an avatar, a $_POST['w'] var is sent, setting the 'week'
 * parameter of the WordPress main query to this posted var. To avoid
 * notices, we need to make sure this 'week' query var is reset to 0
 *
 * @since  BuddyPress (2.2.0)
 *
 * @param  WP_Query $posts_query the main query object
 * @uses   bp_is_group_create()
 * @uses   bp_is_group_admin_page()
 * @uses   bp_is_group_admin_screen() to check for a group admin screen
 * @uses   bp_action_variable() to check for the group's avatar creation step
 * @uses   bp_is_user_change_avatar() to check for the user's change profile screen
 */
function bp_core_avatar_reset_query($posts_query = null)
{
    $reset_w = false;
    // Group's avatar edit screen
    if (bp_is_group_admin_page()) {
        $reset_w = bp_is_group_admin_screen('group-avatar');
        // Group's avatar create screen
    } elseif (bp_is_group_create()) {
        /**
         * we can't use bp_get_groups_current_create_step()
         * as it's not set yet
         */
        $reset_w = 'group-avatar' === bp_action_variable(1);
        // User's change avatar screen
    } else {
        $reset_w = bp_is_user_change_avatar();
    }
    // A user or a group is cropping an avatar
    if (true === $reset_w && isset($_POST['avatar-crop-submit'])) {
        $posts_query->set('w', 0);
    }
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:38,代码来源:bp-core-avatars.php

示例11: test_member_profile_change_avatar

 function test_member_profile_change_avatar()
 {
     $this->go_to(bp_core_get_user_domain(bp_loggedin_user_id()) . bp_get_profile_slug() . '/change-avatar');
     $this->assertTrue(bp_is_user_change_avatar());
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:5,代码来源:xprofile.php

示例12: output_profile_header_content

function output_profile_header_content()
{
    global $bp, $wpdb;
    $current_displayed_user = $bp->displayed_user->id;
    $current_loggedin_user = $bp->loggedin_user->id;
    $current_displayed_user_full_name = $bp->displayed_user->fullname;
    $get_user_list = "SELECT user_login FROM " . $wpdb->base_prefix . "users WHERE ID= '" . $current_displayed_user . "' ORDER by ID limit 1";
    $sql_get_user_list = $wpdb->get_var($get_user_list);
    ?>

<?php 
    $my_profile_header_img = get_user_meta($bp->displayed_user->id, 'profile_header_img', true);
    $my_profile_bg_img = get_user_meta($bp->displayed_user->id, 'profile_bg_img', true);
    $my_profile_ads_boxtrue = get_user_meta($bp->displayed_user->id, 'profile_ads_boxtrue', true);
    $my_profile_ads_box2 = get_user_meta($bp->displayed_user->id, 'profile_ads_box2', true);
    $my_profile_link_color = get_user_meta($bp->displayed_user->id, 'profile_link_color', true);
    ?>


<?php 
    if (!bp_is_user_profile_edit() && !bp_is_user_change_avatar()) {
        ?>

<?php 
        if ($my_profile_header_img != "") {
            ?>

<div id="profile-header-img"><img src="<?php 
            echo stripcslashes($my_profile_header_img);
            ?>
" alt="profile-header" /></div>

<?php 
        }
        ?>


<?php 
    }
}
开发者ID:hscale,项目名称:webento,代码行数:40,代码来源:bp-component-functions.php


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