Merge branch 'development/2.5.2' of https://github.com/ultimatemember/ultimatemember into development/2.5.2

This commit is contained in:
Nikita Sinelnikov
2022-11-09 03:17:40 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
if ( ! empty( $this->necessary_packages ) ) {
add_action( 'admin_menu', array( $this, 'admin_menu' ), 0 );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && current_user_can( 'manage_options' ) ) {
$this->init_packages_ajax();
add_action( 'wp_ajax_um_run_package', array( $this, 'ajax_run_package' ) );
+1 -1
View File
@@ -45,7 +45,7 @@ if ( count( $args['view_types'] ) == 1 ) {
} else {
$args['default_view'] = ! empty( $args['default_view'] ) ? $args['default_view'] : $args['view_types'][0];
$default_view = $args['default_view'];
$current_view = ( ! empty( $_GET[ 'view_type_' . $unique_hash ] ) && in_array( $_GET[ 'view_type_' . $unique_hash ], $args['view_types'] ) ) ? $_GET[ 'view_type_' . $unique_hash ] : $args['default_view'];
$current_view = ( ! empty( $_GET[ 'view_type_' . $unique_hash ] ) && in_array( $_GET[ 'view_type_' . $unique_hash ], $args['view_types'] ) ) ? sanitize_text_field( $_GET[ 'view_type_' . $unique_hash ] ) : $args['default_view'];
}
// Sorting