Merge remote-tracking branch 'remotes/origin/fix/default_buttons_text'

This commit is contained in:
nikitasinelnikov
2019-08-14 11:15:21 +03:00
4 changed files with 25 additions and 2 deletions
+2 -2
View File
@@ -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 ) ) {
+8
View File
@@ -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
+7
View File
@@ -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' );
} ?>
<div class="um-col-alt">
+8
View File
@@ -490,6 +490,10 @@ function um_add_submit_button_to_register( $args ) {
*/
$primary_btn_word = apply_filters('um_register_form_button_one', $primary_btn_word, $args );
if ( ! isset( $primary_btn_word ) || $primary_btn_word == '' ){
$primary_btn_word = UM()->options()->get( 'register_primary_btn_word' );
}
$secondary_btn_word = $args['secondary_btn_word'];
/**
* UM hook
@@ -515,6 +519,10 @@ function um_add_submit_button_to_register( $args ) {
*/
$secondary_btn_word = apply_filters( 'um_register_form_button_two', $secondary_btn_word, $args );
if ( ! isset( $secondary_btn_word ) || $secondary_btn_word == '' ){
$secondary_btn_word = UM()->options()->get( 'register_secondary_btn_word' );
}
$secondary_btn_url = ( isset( $args['secondary_btn_url'] ) && $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page('login');
/**
* UM hook