Opal-Estate-Pro/templates/user/profile.php

70 lines
2.6 KiB
PHP
Raw Normal View History

2019-09-25 03:44:27 +02:00
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
2019-09-10 06:27:33 +02:00
<div class="property-submission-form">
<?php if ( ! empty( $_SESSION['messages'] ) ) : ?>
2019-09-25 03:44:27 +02:00
<div class="opalesate_messages">
2019-09-10 06:27:33 +02:00
<?php foreach ( $_SESSION['messages'] as $message ) : ?>
<?php $status = isset( $message[0] ) ? $message[0] : 'success'; ?>
<?php $msg = isset( $message[1] ) ? $message[1] : ''; ?>
2019-09-25 03:44:27 +02:00
<div class="opalesate_message_line <?php echo esc_attr( $status ) ?>">
2019-09-10 06:27:33 +02:00
<?php printf( '%s', $msg ) ?>
2019-09-25 03:44:27 +02:00
</div>
2019-09-10 06:27:33 +02:00
2019-09-25 03:44:27 +02:00
<?php endforeach;
unset( $_SESSION['messages'] ); ?>
</div>
2019-09-10 06:27:33 +02:00
<?php endif; ?>
2019-09-25 03:44:27 +02:00
<div class="opalestate-admin-box">
<div class="box-content">
<?php
$current_user = wp_get_current_user();
$user_info = '';
if ( $current_user->display_name !== $current_user->user_login ) {
$user_info = "<span class='username'>({$current_user->user_login})</span>";
}
?>
<h3><?php esc_html_e( 'Edit User Profile', 'opalestate-pro' ); ?>&nbsp;<?php echo wp_kses_post( $user_info ); ?></h3>
2019-09-10 06:27:33 +02:00
<?php
2019-09-25 03:44:27 +02:00
do_action( 'opalestate_profile_form_before' );
2019-09-10 06:27:33 +02:00
2019-09-25 03:44:27 +02:00
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
echo cmb2_get_metabox_form( $metaboxes[ OPALESTATE_USER_PROFILE_PREFIX . 'front' ], $user_id, [
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary btn btn-primary"></form>',
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
] );
}
2019-09-10 06:27:33 +02:00
2019-09-25 03:44:27 +02:00
do_action( 'opalestate_profile_form_after' );
2019-09-10 06:27:33 +02:00
?>
2019-09-25 03:44:27 +02:00
</div>
</div>
<div class="opalestate-admin-box">
<div class="box-content">
<h3><?php esc_html_e( 'Change Password', 'opalestate-pro' ); ?></h3>
2019-09-10 06:27:33 +02:00
<?php
2019-09-25 03:44:27 +02:00
do_action( 'opalestate_profile_form_before' );
2019-09-10 06:27:33 +02:00
2019-09-25 03:44:27 +02:00
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
echo cmb2_get_metabox_form( $metaboxes[ OPALESTATE_USER_PROFILE_PREFIX . 'frontchangepass' ], $user_id, [
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary btn btn-primary"></form>',
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
] );
}
2019-09-10 06:27:33 +02:00
2019-09-25 03:44:27 +02:00
do_action( 'opalestate_profile_form_after' );
2019-09-10 06:27:33 +02:00
?>
2019-09-25 03:44:27 +02:00
</div>
</div>
2019-09-10 06:27:33 +02:00
</div>