- 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:
nikitozzzzzzz
2017-10-18 15:45:59 +03:00
parent 29dccf9f7b
commit 5d14060aff
2 changed files with 31 additions and 0 deletions
+20
View File
@@ -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 }
}
/**