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


PHP bp_get_avatar_admin_step函数代码示例

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


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

示例1: _e

            _e('Delete Avatar', 'bp-magic');
            ?>
"><?php 
            _e('Delete My Avatar', 'bp-magic');
            ?>
</a></p>
			<?php 
        }
        ?>

		<?php 
    }
    ?>

		<?php 
    if ('crop-image' == bp_get_avatar_admin_step()) {
        ?>

			<h5><?php 
        _e('Crop Your New Avatar', 'bp-magic');
        ?>
</h5>

			<img src="<?php 
        bp_avatar_to_crop();
        ?>
" id="avatar-to-crop" class="avatar" alt="<?php 
        _e('Avatar to crop', 'bp-magic');
        ?>
" />
开发者ID:buddydev,项目名称:bp-magic,代码行数:30,代码来源:change-avatar.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: sprintf

    <?php 
echo sprintf(__('Select an image from your computer to upload or change your cover photo. 
                The image must be larger than %spx in width and %spx in height (%sx%s pixels) 
                to attain quality cover photo.', 'gears'), BCP_MAX_WIDTH, BCP_MAX_HEIGHT, BCP_MAX_WIDTH, BCP_MAX_HEIGHT);
?>
</p>
<p>
    <?php 
_e('Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'gears');
?>
</p>
           
<form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data">

    <?php 
if ('upload-image' == bp_get_avatar_admin_step()) {
    ?>
        <?php 
    wp_nonce_field('bp_avatar_upload');
    ?>
        <p id="avatar-upload" class="break-row-top">
            <input class="break-row-bottom" type="file" name="file" id="file" />
            <input class="break-row-bottom" type="hidden" name="action" value="bp_avatar_upload" />
            <input class="break-row-bottom mg-top-35" type="submit" name="upload_cover_photo" 
                id="upload_cover_photo"  value="<?php 
    _e('Upload Image', 'gears');
    ?>
" />
        </p>
        <?php 
} else {
开发者ID:poweronio,项目名称:mbsite,代码行数:31,代码来源:cover-photo.php

示例4: bp_avatar_admin_step

/**
 * Output the current avatar upload step.
 *
 * @since 1.1.0
 */
function bp_avatar_admin_step()
{
    echo bp_get_avatar_admin_step();
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:9,代码来源:bp-core-template.php

示例5: crop_avatar

 function crop_avatar()
 {
     global $bp;
     $step = bp_get_avatar_admin_step();
     if ('crop-image' == $step || !empty($bp->groups->current_create_step) && $bp->groups->current_create_step == 'group-avatar') {
         bp_core_add_jquery_cropper();
     }
 }
开发者ID:hscale,项目名称:webento,代码行数:8,代码来源:class.front.php


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