mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- options optimization;
This commit is contained in:
@@ -22,23 +22,24 @@ if ( ! class_exists( 'Admin_Forms_Settings' ) ) {
|
||||
* Get field value
|
||||
*
|
||||
* @param array $field_data
|
||||
* @param string $i
|
||||
* @return string|array
|
||||
*/
|
||||
function get_field_value( $field_data ) {
|
||||
$default = isset( $field_data['default'] ) ? $field_data['default'] : UM()->options()->get_default( $field_data['id'] );
|
||||
function get_field_value( $field_data, $i = '' ) {
|
||||
$default = isset( $field_data['default' . $i] ) ? $field_data['default' . $i] : UM()->options()->get_default( $field_data['id' . $i] );
|
||||
|
||||
if ( $field_data['type'] == 'checkbox' || $field_data['type'] == 'multi_checkbox' ) {
|
||||
if ( isset( $field_data['value'] ) ) {
|
||||
return $field_data['value'];
|
||||
if ( isset( $field_data['value' . $i] ) ) {
|
||||
return $field_data['value' . $i];
|
||||
} else {
|
||||
$value = UM()->options()->get( $field_data['id'] );
|
||||
$value = UM()->options()->get( $field_data['id' . $i] );
|
||||
return '' !== $value ? $value : $default;
|
||||
}
|
||||
} else {
|
||||
if ( isset( $field_data['value'] ) ) {
|
||||
return $field_data['value'];
|
||||
if ( isset( $field_data['value' . $i] ) ) {
|
||||
return $field_data['value'. $i];
|
||||
} else {
|
||||
$value = UM()->options()->get( $field_data['id'] );
|
||||
$value = UM()->options()->get( $field_data['id' . $i] );
|
||||
return isset( $value ) ? $value : $default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,8 +468,8 @@ if ( ! class_exists( 'Admin_Forms' ) ) {
|
||||
$name = ! empty( $this->form_data['prefix_id'] ) ? $this->form_data['prefix_id'] . '[' . $name . ']' : $name;
|
||||
$name_attr = ' name="' . $name . '" ';
|
||||
|
||||
$default = isset( $field_data['default'. $i] ) ? $field_data['default'. $i] : '';
|
||||
$value = isset( $field_data['value'. $i] ) ? $field_data['value'. $i] : $default;
|
||||
$value = $this->get_field_value( $field_data, $i );
|
||||
|
||||
$value_attr = ' value="' . $value . '" ';
|
||||
|
||||
$fields[$i] = "<input type=\"text\" $id_attr $class_attr $name_attr $data_attr $value_attr $placeholder_attr style=\"display:inline;\"/>";
|
||||
@@ -976,16 +976,17 @@ if ( ! class_exists( 'Admin_Forms' ) ) {
|
||||
* Get field value
|
||||
*
|
||||
* @param array $field_data
|
||||
* @param string $i
|
||||
* @return string|array
|
||||
*/
|
||||
function get_field_value( $field_data ) {
|
||||
function get_field_value( $field_data, $i = '' ) {
|
||||
$default = ( $field_data['type'] == 'multi_checkbox' ) ? array() : '';
|
||||
$default = isset( $field_data['default'] ) ? $field_data['default'] : $default;
|
||||
$default = isset( $field_data['default' . $i] ) ? $field_data['default' . $i] : $default;
|
||||
|
||||
if ( $field_data['type'] == 'checkbox' || $field_data['type'] == 'multi_checkbox' ) {
|
||||
return ( isset( $field_data['value'] ) && '' !== $field_data['value'] ) ? $field_data['value'] : $default;
|
||||
return ( isset( $field_data['value' . $i] ) && '' !== $field_data['value' . $i] ) ? $field_data['value' . $i] : $default;
|
||||
} else {
|
||||
return isset( $field_data['value'] ) ? $field_data['value'] : $default;
|
||||
return isset( $field_data['value' . $i] ) ? $field_data['value' . $i] : $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
|
||||
'options' => $all_post_types,
|
||||
'columns' => 3,
|
||||
'value' => $restricted_access_post_metabox_value,
|
||||
'default' => UM()->um_get_default( 'restricted_access_post_metabox' ),
|
||||
'default' => UM()->options()->get_default( 'restricted_access_post_metabox' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'restricted_access_taxonomy_metabox',
|
||||
@@ -499,7 +499,7 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
|
||||
'options' => $all_taxonomies,
|
||||
'columns' => 3,
|
||||
'value' => $restricted_access_taxonomy_metabox_value,
|
||||
'default' => UM()->um_get_default( 'restricted_access_taxonomy_metabox' ),
|
||||
'default' => UM()->options()->get_default( 'restricted_access_taxonomy_metabox' ),
|
||||
),
|
||||
)
|
||||
),
|
||||
@@ -1206,7 +1206,7 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
|
||||
$settings = apply_filters( 'um_change_settings_before_save', $_POST['um_options'] );
|
||||
|
||||
foreach ( $settings as $key => $value ) {
|
||||
um_update_option( $key, $value );
|
||||
UM()->options()->update( $key, $value );
|
||||
}
|
||||
|
||||
do_action( "um_settings_save" );
|
||||
|
||||
@@ -877,35 +877,35 @@ fwrite( $css_doc_file, $css );
|
||||
fclose( $css_doc_file );
|
||||
|
||||
//remove old options
|
||||
um_remove_option( 'active_color' );
|
||||
um_remove_option( 'secondary_color' );
|
||||
um_remove_option( 'profile_align' );
|
||||
um_remove_option( 'register_align' );
|
||||
um_remove_option( 'login_align' );
|
||||
um_remove_option( 'primary_btn_color' );
|
||||
um_remove_option( 'primary_btn_hover' );
|
||||
um_remove_option( 'primary_btn_text' );
|
||||
um_remove_option( 'secondary_btn_color' );
|
||||
um_remove_option( 'secondary_btn_hover' );
|
||||
um_remove_option( 'secondary_btn_text' );
|
||||
um_remove_option( 'help_tip_color' );
|
||||
um_remove_option( 'form_field_label' );
|
||||
um_remove_option( 'form_border' );
|
||||
um_remove_option( 'form_border_hover' );
|
||||
um_remove_option( 'form_bg_color' );
|
||||
um_remove_option( 'form_bg_color_focus' );
|
||||
um_remove_option( 'form_text_color' );
|
||||
um_remove_option( 'form_placeholder' );
|
||||
um_remove_option( 'form_icon_color' );
|
||||
um_remove_option( 'form_asterisk_color' );
|
||||
um_remove_option( 'profile_photocorner' );
|
||||
um_remove_option( 'profile_main_bg' );
|
||||
um_remove_option( 'profile_header_bg' );
|
||||
um_remove_option( 'profile_header_text' );
|
||||
um_remove_option( 'profile_header_link_color' );
|
||||
um_remove_option( 'profile_header_link_hcolor' );
|
||||
um_remove_option( 'profile_header_icon_color' );
|
||||
um_remove_option( 'profile_header_icon_hcolor' );
|
||||
UM()->options()->remove( 'active_color' );
|
||||
UM()->options()->remove( 'secondary_color' );
|
||||
UM()->options()->remove( 'profile_align' );
|
||||
UM()->options()->remove( 'register_align' );
|
||||
UM()->options()->remove( 'login_align' );
|
||||
UM()->options()->remove( 'primary_btn_color' );
|
||||
UM()->options()->remove( 'primary_btn_hover' );
|
||||
UM()->options()->remove( 'primary_btn_text' );
|
||||
UM()->options()->remove( 'secondary_btn_color' );
|
||||
UM()->options()->remove( 'secondary_btn_hover' );
|
||||
UM()->options()->remove( 'secondary_btn_text' );
|
||||
UM()->options()->remove( 'help_tip_color' );
|
||||
UM()->options()->remove( 'form_field_label' );
|
||||
UM()->options()->remove( 'form_border' );
|
||||
UM()->options()->remove( 'form_border_hover' );
|
||||
UM()->options()->remove( 'form_bg_color' );
|
||||
UM()->options()->remove( 'form_bg_color_focus' );
|
||||
UM()->options()->remove( 'form_text_color' );
|
||||
UM()->options()->remove( 'form_placeholder' );
|
||||
UM()->options()->remove( 'form_icon_color' );
|
||||
UM()->options()->remove( 'form_asterisk_color' );
|
||||
UM()->options()->remove( 'profile_photocorner' );
|
||||
UM()->options()->remove( 'profile_main_bg' );
|
||||
UM()->options()->remove( 'profile_header_bg' );
|
||||
UM()->options()->remove( 'profile_header_text' );
|
||||
UM()->options()->remove( 'profile_header_link_color' );
|
||||
UM()->options()->remove( 'profile_header_link_hcolor' );
|
||||
UM()->options()->remove( 'profile_header_icon_color' );
|
||||
UM()->options()->remove( 'profile_header_icon_hcolor' );
|
||||
|
||||
//remove duplicates for UM Pages settings
|
||||
delete_option( 'um_core_pages' );
|
||||
@@ -1042,8 +1042,8 @@ foreach ( $all_taxonomies as $key => $value ) {
|
||||
$all_taxonomies[ $key ] = true;
|
||||
}
|
||||
|
||||
um_update_option( 'restricted_access_post_metabox', $all_post_types );
|
||||
um_update_option( 'restricted_access_taxonomy_metabox', $all_taxonomies );
|
||||
UM()->options()->update( 'restricted_access_post_metabox', $all_post_types );
|
||||
UM()->options()->update( 'restricted_access_taxonomy_metabox', $all_taxonomies );
|
||||
|
||||
|
||||
$roles_array = UM()->roles()->get_roles( false, array( 'administrator' ) );
|
||||
@@ -1279,7 +1279,7 @@ if ( ! empty( $profile_tab_main_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_main_roles );
|
||||
|
||||
um_update_option( 'profile_tab_main_roles', $profile_tab_main_roles );
|
||||
UM()->options()->update( 'profile_tab_main_roles', $profile_tab_main_roles );
|
||||
}
|
||||
|
||||
$profile_tab_posts_roles = UM()->options()->get( 'profile_tab_posts_roles' );
|
||||
@@ -1289,7 +1289,7 @@ if ( ! empty( $profile_tab_posts_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_posts_roles );
|
||||
|
||||
um_update_option( 'profile_tab_posts_roles', $profile_tab_posts_roles );
|
||||
UM()->options()->update( 'profile_tab_posts_roles', $profile_tab_posts_roles );
|
||||
}
|
||||
|
||||
$profile_tab_comments_roles = UM()->options()->get( 'profile_tab_comments_roles' );
|
||||
@@ -1299,7 +1299,7 @@ if ( ! empty( $profile_tab_comments_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_comments_roles );
|
||||
|
||||
um_update_option( 'profile_tab_comments_roles', $profile_tab_comments_roles );
|
||||
UM()->options()->update( 'profile_tab_comments_roles', $profile_tab_comments_roles );
|
||||
}
|
||||
|
||||
$profile_tab_activity_roles = UM()->options()->get( 'profile_tab_activity_roles' );
|
||||
@@ -1309,7 +1309,7 @@ if ( ! empty( $profile_tab_activity_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_activity_roles );
|
||||
|
||||
um_update_option( 'profile_tab_activity_roles', $profile_tab_activity_roles );
|
||||
UM()->options()->update( 'profile_tab_activity_roles', $profile_tab_activity_roles );
|
||||
}
|
||||
|
||||
$profile_tab_messages_roles = UM()->options()->get( 'profile_tab_messages_roles' );
|
||||
@@ -1319,7 +1319,7 @@ if ( ! empty( $profile_tab_messages_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_messages_roles );
|
||||
|
||||
um_update_option( 'profile_tab_messages_roles', $profile_tab_messages_roles );
|
||||
UM()->options()->update( 'profile_tab_messages_roles', $profile_tab_messages_roles );
|
||||
}
|
||||
|
||||
$profile_tab_reviews_roles = UM()->options()->get( 'profile_tab_reviews_roles' );
|
||||
@@ -1329,7 +1329,7 @@ if ( ! empty( $profile_tab_reviews_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_reviews_roles );
|
||||
|
||||
um_update_option( 'profile_tab_reviews_roles', $profile_tab_reviews_roles );
|
||||
UM()->options()->update( 'profile_tab_reviews_roles', $profile_tab_reviews_roles );
|
||||
}
|
||||
|
||||
$profile_tab_purchases_roles = UM()->options()->get( 'profile_tab_purchases_roles' );
|
||||
@@ -1339,7 +1339,7 @@ if ( ! empty( $profile_tab_purchases_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_purchases_roles );
|
||||
|
||||
um_update_option( 'profile_tab_purchases_roles', $profile_tab_purchases_roles );
|
||||
UM()->options()->update( 'profile_tab_purchases_roles', $profile_tab_purchases_roles );
|
||||
}
|
||||
|
||||
$profile_tab_product_reviews = UM()->options()->get( 'profile_tab_product-reviews_roles' );
|
||||
@@ -1349,7 +1349,7 @@ if ( ! empty( $profile_tab_product_reviews ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_product_reviews );
|
||||
|
||||
um_update_option( 'profile_tab_product-reviews_roles', $profile_tab_product_reviews );
|
||||
UM()->options()->update( 'profile_tab_product-reviews_roles', $profile_tab_product_reviews );
|
||||
}
|
||||
|
||||
|
||||
@@ -1360,7 +1360,7 @@ if ( ! empty( $profile_tab_forums_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_forums_roles );
|
||||
|
||||
um_update_option( 'profile_tab_forums_roles', $profile_tab_forums_roles );
|
||||
UM()->options()->update( 'profile_tab_forums_roles', $profile_tab_forums_roles );
|
||||
}
|
||||
|
||||
$profile_tab_friends_roles = UM()->options()->get( 'profile_tab_friends_roles' );
|
||||
@@ -1370,20 +1370,20 @@ if ( ! empty( $profile_tab_friends_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $profile_tab_friends_roles );
|
||||
|
||||
um_update_option( 'profile_tab_friends_roles', $profile_tab_friends_roles );
|
||||
UM()->options()->update( 'profile_tab_friends_roles', $profile_tab_friends_roles );
|
||||
}
|
||||
|
||||
|
||||
$register_role = UM()->options()->get( 'register_role' );
|
||||
if ( ! empty( $register_role ) ) {
|
||||
$register_role = 'um_' . $register_role;
|
||||
um_update_option( 'register_role', $register_role );
|
||||
UM()->options()->update( 'register_role', $register_role );
|
||||
}
|
||||
|
||||
$woo_oncomplete_role = UM()->options()->get( 'woo_oncomplete_role' );
|
||||
if ( ! empty( $woo_oncomplete_role ) ) {
|
||||
$woo_oncomplete_role = 'um_' . $woo_oncomplete_role;
|
||||
um_update_option( 'woo_oncomplete_role', $woo_oncomplete_role );
|
||||
UM()->options()->update( 'woo_oncomplete_role', $woo_oncomplete_role );
|
||||
}
|
||||
|
||||
$woo_oncomplete_except_roles = UM()->options()->get( 'woo_oncomplete_except_roles' );
|
||||
@@ -1393,7 +1393,7 @@ if ( ! empty( $woo_oncomplete_except_roles ) ) {
|
||||
return 'um_' . $item;
|
||||
}, $woo_oncomplete_except_roles );
|
||||
|
||||
um_update_option( 'woo_oncomplete_except_roles', $woo_oncomplete_except_roles );
|
||||
UM()->options()->update( 'woo_oncomplete_except_roles', $woo_oncomplete_except_roles );
|
||||
}
|
||||
|
||||
//for metadata for all bbPress forums
|
||||
|
||||
@@ -160,8 +160,8 @@
|
||||
add_action('um_admin_do_action__opt_into_tracking', 'um_admin_do_action__opt_into_tracking');
|
||||
function um_admin_do_action__opt_into_tracking( $action ) {
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
um_update_option( 'um_allow_tracking', 1 );
|
||||
|
||||
UM()->options()->update( 'um_allow_tracking', 1 );
|
||||
update_option( 'um_tracking_notice', 1 );
|
||||
|
||||
$tracking = new um\core\Tracking();
|
||||
@@ -176,8 +176,8 @@
|
||||
add_action('um_admin_do_action__opt_out_of_tracking', 'um_admin_do_action__opt_out_of_tracking');
|
||||
function um_admin_do_action__opt_out_of_tracking( $action ){
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
um_update_option( 'um_allow_tracking', 0 );
|
||||
|
||||
UM()->options()->update( 'um_allow_tracking', 0 );
|
||||
update_option('um_tracking_notice', 1 );
|
||||
|
||||
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
'id' => '_um_directory_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_directory_template', null, um_get_option( 'directory_template' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_directory_template', null, UM()->options()->get( 'directory_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'members' ),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
'id' => '_um_login_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_template', null, um_get_option( 'login_template' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_template', null, UM()->options()->get( 'login_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'login' ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
@@ -27,7 +27,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_login_max_width', null, um_get_option( 'login_max_width' ) ),
|
||||
'value' => UM()->query()->get_meta_value('_um_login_max_width', null, UM()->options()->get( 'login_max_width' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -35,7 +35,7 @@
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_icons', null, um_get_option( 'login_icons' ) ) ,
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_icons', null, UM()->options()->get( 'login_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
@@ -48,14 +48,14 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_primary_btn_word', null, um_get_option( 'login_primary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_primary_btn_word', null, UM()->options()->get( 'login_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn', null, um_get_option( 'login_secondary_btn' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn', null, UM()->options()->get( 'login_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
@@ -67,14 +67,14 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, um_get_option( 'login_secondary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_secondary_btn', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_forgot_pass_link',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Forgot Password Link?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_forgot_pass_link', null, um_get_option('login_forgot_pass_link') ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_forgot_pass_link', null, UM()->options()->get('login_forgot_pass_link') ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
@@ -85,7 +85,7 @@
|
||||
'id' => '_um_login_show_rememberme',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show "Remember Me"?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_show_rememberme', null, um_get_option('login_show_rememberme') ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_show_rememberme', null, UM()->options()->get('login_show_rememberme') ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
'id' => '_um_profile_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_template', null, um_get_option( 'profile_template' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_template', null, UM()->options()->get( 'profile_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'profile' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
@@ -43,7 +43,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_max_width', null, um_get_option( 'profile_max_width' ) ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_max_width', null, UM()->options()->get( 'profile_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -51,7 +51,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Area Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of the profile area inside profile (below profile header)', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_area_max_width', null, um_get_option( 'profile_area_max_width' ) ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_area_max_width', null, UM()->options()->get( 'profile_area_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -59,7 +59,7 @@
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_icons', null, um_get_option( 'profile_icons' ) ) ,
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_icons', null, UM()->options()->get( 'profile_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
@@ -72,14 +72,14 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_primary_btn_word', null, um_get_option( 'profile_primary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_primary_btn_word', null, UM()->options()->get( 'profile_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn', null, um_get_option( 'profile_secondary_btn' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn', null, UM()->options()->get( 'profile_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
@@ -91,7 +91,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, um_get_option( 'profile_secondary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, UM()->options()->get( 'profile_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_secondary_btn', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -110,7 +110,7 @@
|
||||
'type' => 'select',
|
||||
'label' => __( 'Cover photo ratio', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The shortcode is centered by default unless you specify otherwise here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_ratio', null, um_get_option( 'profile_cover_ratio' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_ratio', null, UM()->options()->get( 'profile_cover_ratio' ) ),
|
||||
'options' => array(
|
||||
'2.7:1' => '2.7:1',
|
||||
'2.2:1' => '2.2:1',
|
||||
@@ -123,7 +123,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Photo Size', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Set the profile photo size in pixels here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photosize', null, um_get_option( 'profile_photosize' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photosize', null, UM()->options()->get( 'profile_photosize' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -153,7 +153,7 @@
|
||||
'id' => '_um_profile_show_social_links',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show social links in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_social_links', null, UM()->um_get_option( 'profile_show_social_links' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_social_links', null, UM()->options()->get( 'profile_show_social_links' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
'id' => '_um_register_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_template', null, um_get_option( 'register_template' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_template', null, UM()->options()->get( 'register_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'register' ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
@@ -42,7 +42,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_max_width', null, um_get_option( 'register_max_width' ) ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_max_width', null, UM()->options()->get( 'register_max_width' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
@@ -50,7 +50,7 @@
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_icons', null, um_get_option( 'register_icons' ) ) ,
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_icons', null, UM()->options()->get( 'register_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
@@ -63,14 +63,14 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_primary_btn_word', null, um_get_option( 'register_primary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_primary_btn_word', null, UM()->options()->get( 'register_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn', null, um_get_option( 'register_secondary_btn' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn', null, UM()->options()->get( 'register_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
@@ -82,7 +82,7 @@
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, um_get_option( 'register_secondary_btn_word' ) ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, UM()->options()->get( 'register_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_secondary_btn', '=', 1 )
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user