本文整理汇总了PHP中bp_avatar_to_crop_src函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_avatar_to_crop_src函数的具体用法?PHP bp_avatar_to_crop_src怎么用?PHP bp_avatar_to_crop_src使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_avatar_to_crop_src函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_avatar_to_crop
<img src="<?php
bp_avatar_to_crop();
?>
" id="avatar-crop-preview" class="avatar" alt="<?php
_e('Avatar preview', 'bp-magic');
?>
" />
</div>
<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php
_e('Crop Image', 'bp-magic');
?>
" />
<input type="hidden" name="image_src" id="image_src" value="<?php
bp_avatar_to_crop_src();
?>
" />
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
<?php
wp_nonce_field('bp_avatar_cropstore');
?>
<?php
}
?>
示例2: if
<?php endif; ?>
<?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
<h5><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h5>
<img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
<div id="avatar-crop-pane">
<img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
</div>
<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
<input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
<?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
<?php endif; ?>
</form>
<?php else : ?>
<p><?php _e( 'Your avatar will be used on your profile and throughout the site. To change your avatar, please create an account with <a href="http://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ) ?></p>