- escape functions in templates;

This commit is contained in:
nikitasinelnikov
2019-07-17 16:55:09 +03:00
parent 878bee507d
commit b47a6e2137
18 changed files with 583 additions and 497 deletions
+45 -15
View File
@@ -1,3 +1,5 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
<div class="um-form">
@@ -33,9 +35,13 @@
</div>
<div class="um-account-name">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>"><?php esc_html_e( um_user( 'display_name' ) ); ?></a>
<a href="<?php echo esc_url( um_user_profile_url() ); ?>">
<?php echo esc_html( um_user( 'display_name' ) ); ?>
</a>
<div class="um-account-profile-link">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link"><?php _e( 'View profile', 'ultimate-member' ); ?></a>
<a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link">
<?php _e( 'View profile', 'ultimate-member' ); ?>
</a>
</div>
</div>
@@ -45,21 +51,39 @@
<div class="um-account-meta radius-<?php echo esc_attr( UM()->options()->get('profile_photocorner') ); ?>">
<div class="um-account-meta-img uimob800-hide"><a href="<?php echo esc_url( um_user_profile_url() ); ?>"><?php echo get_avatar( um_user('ID'), 120 ); ?></a></div>
<div class="um-account-meta-img uimob800-hide">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>">
<?php echo get_avatar( um_user('ID'), 120 ); ?>
</a>
</div>
<?php if ( UM()->mobile()->isMobile() ) { ?>
<div class="um-account-meta-img-b uimob800-show" title="<?php echo esc_attr( um_user( 'display_name' ) ); ?>"><a href="<?php echo esc_url( um_user_profile_url() ); ?>"><?php echo get_avatar( um_user('ID'), 120 ); ?></a></div>
<div class="um-account-meta-img-b uimob800-show" title="<?php echo esc_attr( um_user( 'display_name' ) ); ?>">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>">
<?php echo get_avatar( um_user('ID'), 120 ); ?>
</a>
</div>
<?php } else { ?>
<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php echo esc_attr( um_user( 'display_name' ) ); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120 ); ?></a></div>
<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php echo esc_attr( um_user( 'display_name' ) ); ?>">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>">
<?php echo get_avatar( um_user('ID'), 120 ); ?>
</a>
</div>
<?php } ?>
<div class="um-account-name uimob800-hide">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>"><?php esc_html_e( um_user( 'display_name', 'html' ) ); ?></a>
<div class="um-account-profile-link"><a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link"><?php _e( 'View profile', 'ultimate-member' ); ?></a></div>
<a href="<?php echo esc_url( um_user_profile_url() ); ?>">
<?php echo esc_html( um_user( 'display_name', 'html' ) ); ?>
</a>
<div class="um-account-profile-link">
<a href="<?php echo esc_url( um_user_profile_url() ); ?>" class="um-link">
<?php _e( 'View profile', 'ultimate-member' ); ?>
</a>
</div>
</div>
</div>
@@ -69,15 +93,21 @@
if ( isset( $info['custom'] ) || UM()->options()->get( "account_tab_{$id}" ) == 1 || $id == 'general' ) { ?>
<li>
<a data-tab="<?php echo esc_attr( $id )?>" href="<?php echo esc_url( UM()->account()->tab_link( $id ) ); ?>" class="um-account-link <?php if ( $id == UM()->account()->current_tab ) echo 'current'; ?>">
<a data-tab="<?php echo esc_attr( $id )?>" href="<?php echo esc_url( UM()->account()->tab_link( $id ) ); ?>" class="um-account-link <?php if ( $id == UM()->account()->current_tab ) echo 'current'; ?>">
<?php if ( UM()->mobile()->isMobile() ) { ?>
<span class="um-account-icontip uimob800-show" title="<?php echo esc_attr( $info['title'] ); ?>"><i class="<?php echo esc_attr( $info['icon'] ); ?>"></i></span>
<span class="um-account-icontip uimob800-show" title="<?php echo esc_attr( $info['title'] ); ?>">
<i class="<?php echo esc_attr( $info['icon'] ); ?>"></i>
</span>
<?php } else { ?>
<span class="um-account-icontip uimob800-show um-tip-w" title="<?php echo esc_attr( $info['title'] ); ?>"><i class="<?php echo esc_attr( $info['icon'] ); ?>"></i></span>
<span class="um-account-icontip uimob800-show um-tip-w" title="<?php echo esc_attr( $info['title'] ); ?>">
<i class="<?php echo esc_attr( $info['icon'] ); ?>"></i>
</span>
<?php } ?>
<span class="um-account-icon uimob800-hide"><i class="<?php echo esc_attr( $info['icon'] ); ?>"></i></span>
<span class="um-account-title uimob800-hide"><?php esc_html_e( $info['title'] ); ?></span>
<span class="um-account-icon uimob800-hide">
<i class="<?php echo esc_attr( $info['icon'] ); ?>"></i>
</span>
<span class="um-account-title uimob800-hide"><?php echo esc_html( $info['title'] ); ?></span>
<span class="um-account-arrow uimob800-hide">
<i class="<?php if ( is_rtl() ) { ?>um-faicon-angle-left<?php } else { ?>um-faicon-angle-right<?php } ?>"></i>
</span>
@@ -112,7 +142,7 @@
* ?>
*/
do_action( 'um_before_form', $args );
foreach ( UM()->account()->tabs as $id => $info ) {
$current_tab = UM()->account()->current_tab;
@@ -121,7 +151,7 @@
<div class="um-account-nav uimob340-show uimob500-show">
<a href="#" data-tab="<?php echo esc_attr( $id ); ?>" class="<?php if ( $id == $current_tab ) echo 'current'; ?>">
<?php esc_html_e( $info['title'] ); ?>
<?php echo esc_html( $info['title'] ); ?>
<span class="ico"><i class="<?php echo esc_attr( $info['icon'] ); ?>"></i></span>
<span class="arr"><i class="um-faicon-angle-down"></i></span>
</a>
@@ -158,7 +188,7 @@
* ?>
*/
do_action( 'um_after_account_page_load' ); ?>
</div>
</div>