mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
- added escape functions, security fix for XSS;
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
namespace um\admin\core;
|
||||
|
||||
// Exit if accessed directly.
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
|
||||
|
||||
@@ -34,6 +35,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function create_list() {
|
||||
$this->old_extensions_notice();
|
||||
$this->install_core_page_notice();
|
||||
@@ -195,7 +199,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
|
||||
ob_start(); ?>
|
||||
|
||||
<div class="<?php echo esc_attr( $class ) ?> um-admin-notice notice <?php echo $dismissible ? 'is-dismissible' : '' ?>" data-key="<?php echo $key ?>">
|
||||
<div class="<?php echo esc_attr( $class ) ?> um-admin-notice notice <?php echo $dismissible ? 'is-dismissible' : '' ?>" data-key="<?php echo esc_attr( $key ) ?>">
|
||||
<?php echo ! empty( $notice_data['message'] ) ? $notice_data['message'] : '' ?>
|
||||
</div>
|
||||
|
||||
@@ -301,7 +305,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="<?php echo esc_attr( add_query_arg( 'um_adm_action', 'install_core_pages' ) ); ?>" class="button button-primary"><?php _e( 'Create Pages', 'ultimate-member' ) ?></a>
|
||||
<a href="<?php echo esc_url( add_query_arg( 'um_adm_action', 'install_core_pages' ) ); ?>" class="button button-primary"><?php _e( 'Create Pages', 'ultimate-member' ) ?></a>
|
||||
|
||||
<a href="javascript:void(0);" class="button-secondary um_secondary_dimiss"><?php _e( 'No thanks', 'ultimate-member' ) ?></a>
|
||||
</p>
|
||||
@@ -384,7 +388,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
$ignore = admin_url('users.php');
|
||||
$ignore = admin_url( 'users.php' );
|
||||
|
||||
$messages[0]['err_content'] = sprintf( __( 'Are you sure you want to delete the selected user(s)? The following users will be deleted: <p>%s</p> <strong>This cannot be undone!</strong>','ultimate-member'), $users);
|
||||
$messages[0]['err_content'] .= '<p><a href="'. esc_html( $confirm_uri ) .'" class="button-primary">' . __( 'Remove', 'ultimate-member' ) . '</a> <a href="'.$ignore.'" class="button">' . __('Undo','ultimate-member') . '</a></p>';
|
||||
|
||||
Reference in New Issue
Block a user