mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed issues with admin notices and their priority;
This commit is contained in:
@@ -27,7 +27,7 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
$this->templates_path = um_path . 'includes/admin/templates/';
|
||||
|
||||
add_action( 'admin_init', array( &$this, 'admin_init' ), 0 );
|
||||
add_action( 'admin_notices', array( $this, 'check_wrong_install_folder' ), 3 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -54,28 +54,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if plugin is installed with correct folder
|
||||
*/
|
||||
function check_wrong_install_folder() {
|
||||
$invalid_folder = false;
|
||||
|
||||
$slug_array = explode( '/', um_plugin );
|
||||
if ( $slug_array[0] != 'ultimate-member' )
|
||||
$invalid_folder = true;
|
||||
|
||||
if ( $invalid_folder ) { ?>
|
||||
|
||||
<div class="error">
|
||||
<p>
|
||||
<?php printf( __( 'You have installed <strong>%s</strong> with wrong folder name. Correct folder name is <strong>"ultimate-member"</strong>.', 'ultimate-member' ), ultimatemember_plugin_name ) ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Init admin action/filters + request handlers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user