mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 11:46:27 +09:00
- 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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user