mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
- fixed dependencies with extensions, which installed with wrong folder name;
- added notice when UM is installed with wrong folder name;
This commit is contained in:
@@ -14,10 +14,30 @@ if ( ! class_exists( 'Admin' ) ) {
|
||||
|
||||
add_action( 'admin_init', array( &$this, 'admin_init' ), 0 );
|
||||
|
||||
add_action( 'admin_notices', array( $this, 'check_wrong_install_folder' ), 3 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user