mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 22:54:03 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into beta/2.1.0
This commit is contained in:
@@ -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 ) ) {
|
||||
|
||||
@@ -376,7 +376,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
}
|
||||
|
||||
$output = ob_get_clean();
|
||||
return $output;
|
||||
return htmlspecialchars_decode( $output );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -280,9 +280,9 @@ function um_user_edit_profile( $args ) {
|
||||
|
||||
|
||||
//validation of correct values from options in wp-admin
|
||||
$stripslashes = $args['submitted'][ $key ];
|
||||
if ( is_string( $stripslashes ) ) {
|
||||
$stripslashes = stripslashes( $stripslashes );
|
||||
$stripslashes = '';
|
||||
if ( isset( $args['submitted'][ $key ] ) && is_string( $args['submitted'][ $key ] ) ) {
|
||||
$stripslashes = stripslashes( $args['submitted'][ $key ] );
|
||||
}
|
||||
if ( in_array( $array['type'], array( 'select' ) ) &&
|
||||
! empty( $array['options'] ) && ! empty( $stripslashes ) &&
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user