mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +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:
@@ -1061,19 +1061,25 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
*/
|
||||
function sorting_licenses_options( $settings ) {
|
||||
//sorting licenses
|
||||
if ( empty( $settings['licenses']['fields'] ) )
|
||||
if ( empty( $settings['licenses']['fields'] ) ) {
|
||||
return $settings;
|
||||
}
|
||||
|
||||
$licenses = $settings['licenses']['fields'];
|
||||
@uasort( $licenses, create_function( '$a,$b', 'return strnatcasecmp($a["label"],$b["label"]);' ) );
|
||||
@uasort( $licenses, function( $a, $b ) {
|
||||
return strnatcasecmp( $a["label"], $b["label"] );
|
||||
} );
|
||||
$settings['licenses']['fields'] = $licenses;
|
||||
|
||||
|
||||
//sorting extensions
|
||||
if ( empty( $settings['extensions']['sections'] ) )
|
||||
if ( empty( $settings['extensions']['sections'] ) ) {
|
||||
return $settings;
|
||||
}
|
||||
|
||||
$extensions = $settings['extensions']['sections'];
|
||||
@uasort( $extensions, create_function( '$a,$b', 'return strnatcasecmp($a["title"],$b["title"]);' ) );
|
||||
@uasort( $extensions, function( $a, $b ) {
|
||||
return strnatcasecmp( $a["title"], $b["title"] );
|
||||
} );
|
||||
|
||||
$keys = array_keys( $extensions );
|
||||
if ( $keys[0] != "" ) {
|
||||
@@ -1082,7 +1088,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
$extensions[$new_key] = $temp;
|
||||
$extensions[""] = $extensions[$keys[0]];
|
||||
unset( $extensions[$keys[0]] );
|
||||
@uasort( $extensions, create_function( '$a,$b', 'return strnatcasecmp($a["title"],$b["title"]);' ) );
|
||||
@uasort( $extensions, function( $a, $b ) {
|
||||
return strnatcasecmp( $a["title"], $b["title"] );
|
||||
} );
|
||||
}
|
||||
|
||||
$settings['extensions']['sections'] = $extensions;
|
||||
@@ -1099,13 +1107,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
*/
|
||||
function get_section_fields( $tab, $section ) {
|
||||
|
||||
if ( empty( $this->settings_structure[$tab] ) )
|
||||
if ( empty( $this->settings_structure[ $tab ] ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
if ( ! empty( $this->settings_structure[$tab]['sections'][$section]['fields'] ) ) {
|
||||
return $this->settings_structure[$tab]['sections'][$section]['fields'];
|
||||
} elseif ( ! empty( $this->settings_structure[$tab]['fields'] ) ) {
|
||||
return $this->settings_structure[$tab]['fields'];
|
||||
if ( ! empty( $this->settings_structure[ $tab ]['sections'][ $section ]['fields'] ) ) {
|
||||
return $this->settings_structure[ $tab ]['sections'][ $section ]['fields'];
|
||||
} elseif ( ! empty( $this->settings_structure[ $tab ]['fields'] ) ) {
|
||||
return $this->settings_structure[ $tab ]['fields'];
|
||||
}
|
||||
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user