本文整理汇总了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');
?>
" />
示例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);
}
示例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 {
示例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();
}
示例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();
}
}