- notices texts changes;

- remove language notice;
- fixed duplicated "redirect_to" field;
- added compatibility with PHP7.2 (removed deprecated functions and ini variables);
This commit is contained in:
nikitozzzzzzz
2018-11-15 18:53:59 +02:00
parent 986b294aed
commit 819d5333db
12 changed files with 44 additions and 274 deletions
-74
View File
@@ -215,14 +215,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
add_meta_box( 'um-metaboxes-sidebox-2', __( 'User Cache', 'ultimate-member' ), array( &$this, 'user_cache' ), $this->pagehook, 'side', 'core' );
if ( $this->language_avaialable_not_installed() ) {
add_meta_box( 'um-metaboxes-sidebox-2', __( 'Language', 'ultimate-member' ), array( &$this, 'dl_language' ), $this->pagehook, 'side', 'core' );
} else if ( $this->language_avaialable_installed() ) {
add_meta_box( 'um-metaboxes-sidebox-2', __( 'Language', 'ultimate-member' ), array( &$this, 'up_language' ), $this->pagehook, 'side', 'core' );
} else if ( $this->language_not_available() ) {
add_meta_box( 'um-metaboxes-sidebox-2', __( 'Language', 'ultimate-member' ), array( &$this, 'ct_language' ), $this->pagehook, 'side', 'core' );
}
//If there are active and licensed extensions - show metabox for upgrade it
$exts = UM()->plugin_updater()->um_get_active_plugins();
if ( 0 < count( $exts ) ) {
@@ -231,33 +223,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
}
/**
*
*/
function up_language() {
$locale = get_option('WPLANG');
include_once UM()->admin()->templates_path . 'dashboard/language-update.php';
}
/**
*
*/
function dl_language() {
$locale = get_option('WPLANG');
include_once UM()->admin()->templates_path . 'dashboard/language-download.php';
}
/**
*
*/
function ct_language() {
$locale = get_option('WPLANG');
include_once UM()->admin()->templates_path . 'dashboard/language-contrib.php';
}
/**
*
*/
@@ -298,45 +263,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
}
/**
* Language not available
*
* @return bool
*/
function language_not_available() {
$locale = get_option( 'WPLANG' );
if ( $locale && !strstr($locale, 'en_') && !isset( UM()->available_languages[$locale] ) && !file_exists( WP_LANG_DIR . '/plugins/ultimatemember-' . $locale . '.mo' ) )
return true;
return false;
}
/**
* Language available but not installed
*
* @return bool
*/
function language_avaialable_not_installed() {
$locale = get_option('WPLANG');
if ( $locale && isset( UM()->available_languages[$locale] ) && !file_exists( WP_LANG_DIR . '/plugins/ultimatemember-' . $locale . '.mo' ) )
return true;
return false;
}
/**
* Language available and installed
*
* @return bool
*/
function language_avaialable_installed() {
$locale = get_option('WPLANG');
if ( $locale && isset( UM()->available_languages[$locale] ) && file_exists( WP_LANG_DIR . '/plugins/ultimatemember-' . $locale . '.mo' ) )
return true;
return false;
}
/**
* Get a directory size
*