- fixed issues with admin notices and their priority;

This commit is contained in:
nikitozzzzzzz
2018-04-03 11:46:30 +03:00
parent 39f55b2906
commit f2b6249516
11 changed files with 435 additions and 164 deletions
+1 -23
View File
@@ -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
*/