diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index 3742ca08..181749c5 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -1482,11 +1482,11 @@ if ( ! class_exists( 'Admin_Settings' ) ) { options()->get( $field_data['id'] ); - $value = ! empty( $option_value ) ? $option_value : ( ! empty( $field_data['default'] ) ? $field_data['default'] : '' ); + $value = isset( $option_value ) && ! empty( $option_value ) ? $option_value : ( isset( $field_data['default'] ) ? $field_data['default'] : '' ); $license = get_option( "{$field_data['id']}_edd_answer" ); - if ( is_object( $license ) ) { + if ( is_object( $license ) && ! empty( $value ) ) { // activate_license 'invalid' on anything other than valid, so if there was an error capture it if ( false === $license->success ) { @@ -1718,7 +1718,10 @@ if ( ! class_exists( 'Admin_Settings' ) ) { ); $license_status = null; - } ?> + + } + + ?> @@ -1731,7 +1734,7 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
- license ) || 'valid' == $license ) { ?> + license ) || 'valid' == $license ) ) { ?> diff --git a/includes/core/class-query.php b/includes/core/class-query.php index e0f963f4..04b5e7e2 100644 --- a/includes/core/class-query.php +++ b/includes/core/class-query.php @@ -109,7 +109,7 @@ if ( ! class_exists( 'Query' ) ) { } else { $custom_posts = new \WP_Query(); - $args['post_status'] = explode( ',', $args['post_status'] ); + $args['post_status'] = is_array( $args['post_status'] ) ? $args['post_status'] : explode( ',', $args['post_status'] ); $custom_posts->query( $args ); diff --git a/includes/core/um-filters-language.php b/includes/core/um-filters-language.php index 09687f94..fb699b14 100644 --- a/includes/core/um-filters-language.php +++ b/includes/core/um-filters-language.php @@ -48,7 +48,7 @@ function um_core_page_wpml_permalink( $array ){ $permalink_base = UM()->options()->get( 'permalink_base' ); // Get user slug - $profile_slug = get_user_meta( um_profile_id(), "um_user_profile_url_slug_{$permalink_base}", true ); + $profile_slug = strtolower( get_user_meta( um_profile_id(), "um_user_profile_url_slug_{$permalink_base}", true ) ); $current_language = ICL_LANGUAGE_CODE; foreach ( $array as $lang_code => $arr ) { $sitepress->switch_lang( $lang_code );