diff --git a/includes/core/class-query.php b/includes/core/class-query.php index fd49510d..9000fb43 100644 --- a/includes/core/class-query.php +++ b/includes/core/class-query.php @@ -400,12 +400,12 @@ if ( ! class_exists( 'um\core\Query' ) ) { * @param null $fallback * @return int|mixed|null|string */ - function get_meta_value( $key, $array_key = null, $fallback = null ) { + function get_meta_value( $key, $array_key = null, $fallback = false ) { $post_id = get_the_ID(); $try = get_post_meta( $post_id, $key, true ); //old version if ( ! empty( $try ) ) - if ( false !== $try ) + if ( $try != '' ) if ( is_array( $try ) && in_array( $array_key, $try ) ) { return $array_key; } else if ( is_array( $try ) ) { diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index bba2f03b..c5b2ff76 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -353,6 +353,10 @@ function um_add_submit_button_to_login( $args ) { */ $primary_btn_word = apply_filters('um_login_form_button_one', $args['primary_btn_word'], $args ); + if ( ! isset( $primary_btn_word ) || $primary_btn_word == '' ){ + $primary_btn_word = UM()->options()->get( 'login_primary_btn_word' ); + } + /** * UM hook * @@ -377,6 +381,10 @@ function um_add_submit_button_to_login( $args ) { */ $secondary_btn_word = apply_filters( 'um_login_form_button_two', $args['secondary_btn_word'], $args ); + if ( ! isset( $secondary_btn_word ) || $secondary_btn_word == '' ){ + $secondary_btn_word = UM()->options()->get( 'login_secondary_btn_word' ); + } + $secondary_btn_url = ! empty( $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page( 'register' ); /** * UM hook diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index a916072f..bcc1bffb 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -1291,6 +1291,13 @@ function um_add_submit_button_to_profile( $args ) { // only when editing if ( UM()->fields()->editing == false ) { return; + } + + if ( ! isset( $args['primary_btn_word'] ) || $args['primary_btn_word'] == '' ){ + $args['primary_btn_word'] = UM()->options()->get( 'profile_primary_btn_word' ); + } + if ( ! isset( $args['secondary_btn_word'] ) || $args['secondary_btn_word'] == '' ){ + $args['secondary_btn_word'] = UM()->options()->get( 'profile_secondary_btn_word' ); } ?>