# userswp/1.2.63/templates/bootstrap/modal-profile-image-crop.php

UsersWP – Front-end login form, User Registration, User Profile &amp; Members Directory plugin for WP, version 1.2.63. 88 lines.

- Page: https://pluginprobe.com/plugins/userswp/1.2.63/code/templates/bootstrap/modal-profile-image-crop.php
- Raw: https://pluginprobe.com/plugins/userswp/1.2.63/raw/templates/bootstrap/modal-profile-image-crop.php
- Modified: 2026-03-30T08:27:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/userswp/1.2.63/code/templates/bootstrap/modal-profile-image-crop.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

global $aui_bs5;

$type  = isset( $_POST['uwp_popup_type'] ) && $_POST['uwp_popup_type'] == 'avatar' ? 'avatar' : 'banner';
$image_url = !empty($args['image_url']) ? esc_url( $args['image_url'] ) : '';
?>
<div class="modal-header" xmlns="http://www.w3.org/1999/html">
	<h5 class="modal-title" id="uwp-profile-modal-title">
		<?php
		if ($type == 'avatar') {
			esc_html_e( 'Change your profile photo', 'userswp' );
		} else {
			esc_html_e( 'Change your cover photo', 'userswp' );
		}
		?>
	</h5>
</div>
<div class="modal-body text-center">
	<div id="uwp-bs-modal-notice"></div>
	<div align="center">
		<img src="<?php echo esc_url( $image_url ); ?>" id="uwp-<?php echo esc_attr( $type ); ?>-to-crop" />
	</div>
</div>

<div class="modal-footer">
	<button type="button" data-type="<?php echo esc_attr( $type ); ?>" class="btn btn-outline-primary uwp_modal_btn uwp-modal-close" data-<?php echo ( $aui_bs5 ? 'bs-' : '' ); ?>dismiss="modal"><?php esc_html_e( 'Cancel', 'userswp' ); ?></button>
	<div class="uwp-<?php echo esc_attr( $type ); ?>-crop-p-wrap">
		<div id="<?php echo esc_attr( $type ); ?>-crop-actions">
			<form class="uwp-crop-form" method="post">
				<?php
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'id'    =>  esc_html( $type.'-x' ),
	                'name'  =>  'uwpx',
	                'value' =>  '',
	                'no_wrap' => true,
                ));
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'id'    =>  esc_html( $type.'-y' ),
	                'name'  =>  'uwpy',
	                'value' =>  '',
	                'no_wrap' => true,
                ));
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'id'    =>  esc_html( $type.'-w' ),
	                'name'  =>  'uwpw',
	                'value' =>  '',
	                'no_wrap' => true,
                ));
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'id'    =>  esc_html( $type.'-h' ),
	                'name'  =>  'uwph',
	                'value' =>  '',
	                'no_wrap' => true,
                ));
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'id'    =>  esc_html( 'uwp-'.$type.'-crop-image' ),
	                'name'  =>  'uwp_crop',
	                'value' =>  esc_attr( $image_url ),
	                'no_wrap' => true,
                ));
                echo aui()->input(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'  =>  'hidden',
	                'name'  =>  'uwp_crop_nonce',
	                'value' => esc_html( wp_create_nonce( 'uwp_crop_nonce_'.$type ) ),
	                'no_wrap' => true,
                ));
                echo aui()->button(array( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	                'type'       =>  'submit',
	                'id'         => esc_html( 'save_uwp_'.$type ),
	                'content'    => esc_html__( 'Apply', 'userswp' ),
	                'name'       => esc_html( 'uwp_'.$type.'_crop' ),
                ));
                ?>
			</form>
		</div>
	</div>
</div>

```
