mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- changed form builder > icon field to new dropdown type;
This commit is contained in:
Vendored
-1
@@ -1 +0,0 @@
|
||||
.um-directory .um-member-directory-header .um-member-directory-header-row.um-member-directory-search-row{justify-content:flex-start}.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-search-line label{margin:0 0 0 10px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-view-type{margin:0 0 0 10px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-sorting .um-member-directory-sorting-a a{margin:0 0 0 5px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-sorting .um-member-directory-sorting-a .um-new-dropdown{right:-12px;left:auto}.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-filters .um-member-directory-filters-a a{margin:0 0 0 5px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-search .um-search-filter.um-datepicker-filter-type input,.um-directory .um-member-directory-header .um-member-directory-header-row .um-search .um-search-filter.um-timepicker-filter-type input{margin:0 0 0 5px!important}.um-directory .um-member-directory-header .um-member-directory-header-row .um-search .um-search-filter.um-datepicker-filter-type input:nth-child(even),.um-directory .um-member-directory-header .um-member-directory-header-row .um-search .um-search-filter.um-timepicker-filter-type input:nth-child(even){margin:0 5px 0 0!important}.um-directory .um-member-directory-header .um-member-directory-header-row .um-filtered-line .um-members-filter-tag{margin:0 0 5px 10px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-filtered-line .um-members-filter-tag:first-child{margin-left:10px}.um-directory .um-member-directory-header .um-member-directory-header-row .um-filtered-line .um-members-filter-tag .um-members-filter-remove{margin-left:0;margin-right:10px}.um-directory .um-members-wrapper .um-members.um-members-grid .um-member .um-member-card .um-members-edit-btn a.um-edit-profile-btn:before{margin-right:0;margin-left:8px}.um-directory .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-container .um-member-photo{margin:0 0 0 15px}.um-directory .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-container .um-member-card .um-member-card-content{margin:0 0 0 10px}.um-directory .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-container .um-member-card .um-member-card-actions .um-member-cog .um-new-dropdown{right:auto;left:0;text-align:right}.um-directory .um-members-pagination-box .um-members-pagi{align-items:center}.um-directory .um-members-pagination-box .um-members-pagi .pagi.pagi-arrow{transform:rotate(180deg)}.um-directory.uimob340 .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-view-type{margin:0 0 0 2px}.um-directory.uimob340 .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-sorting .um-new-dropdown{right:auto;left:0}.um-directory.uimob340 .um-members-wrapper .um-members.um-members-list .um-member .um-member-photo{margin:0 0 0 10px}.um-directory.uimob340 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer .um-member-card-footer-buttons{margin:0 0 0 10px}.um-directory.uimob500 .um-member-directory-header .um-member-directory-header-row .um-member-directory-nav-line .um-member-directory-view-type{margin:0 0 0 5px}.um-directory.uimob500 .um-members-wrapper .um-members.um-members-list .um-member .um-member-photo{margin:0 0 0 10px}.um-directory.uimob500 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer{align-items:flex-start}.um-directory.uimob500 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer .um-member-card-footer-buttons{margin:0 0 0 10px}.um-directory.uimob500 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer .um-member-card-footer-buttons .um-members-list-footer-button-wrapper{margin:0 0 5px 10px}.um-directory.uimob800 .um-members-wrapper .um-members.um-members-list .um-member .um-member-photo{margin:0 0 0 10px}.um-directory.uimob800 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer .um-member-card-footer-buttons{margin:0 0 0 10px}.um-directory.uimob800 .um-members-wrapper .um-members.um-members-list .um-member .um-member-card-footer .um-member-card-footer-buttons .um-members-list-footer-button-wrapper{margin:0 0 5px 10px}
|
||||
@@ -97,7 +97,14 @@ UM.admin = {
|
||||
select2_atts.dropdownParent = $iconSelector.parents('._heading_text');
|
||||
}
|
||||
|
||||
$iconSelector.select2( select2_atts );
|
||||
$iconSelector.select2( select2_atts ).on( 'change', function () {
|
||||
// handle outdated icons and remove them after select new one.
|
||||
let oldWrapper = $iconSelector.siblings('.um_admin_fonticon_wrapper');
|
||||
if ( oldWrapper.length > 0 ) {
|
||||
oldWrapper.find('#_icon').val( $iconSelector.val() );
|
||||
oldWrapper.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
"object"!=typeof window.UM&&(window.UM={}),"object"!=typeof window.UM.admin&&(window.UM.admin={}),UM.admin={tooltip:{all:null,init:function(){var t=jQuery(".um_tooltip");0<t.length&&(UM.admin.tooltip.all=t.tooltip({tooltipClass:"um_tooltip",content:function(){return jQuery(this).attr("title")}}))},close:function(){null!==UM.admin.tooltip.all&&0<UM.admin.tooltip.all&&"function"==typeof UM.admin.tooltip.all.tooltip&&UM.admin.tooltip.all.tooltip("close")}},colorPicker:{init:function(){var t=jQuery(".um-admin-colorpicker");t.length&&t.wpColorPicker()}},iconSelector:{init:function(){var t,n=jQuery(".um-icon-select-field");function e(t){var n=t.element;return void 0!==n?jQuery('<span><i class="'+jQuery(n).val()+'"></i> '+t.text+"</span>"):jQuery('<span><i class="'+t.id+'"></i> '+t.text+"</span>")}n.length&&(t={ajax:{url:wp.ajax.settings.url,dataType:"json",delay:250,data:function(t){return{search:t.term,action:"um_get_icons",page:t.page||1,nonce:um_admin_scripts.nonce}},processResults:function(t,n){n.page=n.page||1;var e=[];return t.data.icons&&jQuery.each(t.data.icons,function(t,n){e.push({id:t,text:n.label})}),{results:e,pagination:{more:50*n.page<t.data.total_count}}},cache:!0},minimumInputLength:0,allowClear:!0,width:"100%",allowHtml:!0,templateSelection:e,templateResult:e,dropdownCssClass:"um-select2-icon-dropdown",containerCssClass:"um-select2-icon-container"},n.parents(".um-admin-tri").length?t.dropdownParent=n.parents(".um-admin-tri"):n.parents("._heading_text").length&&(t.dropdownParent=n.parents("._heading_text")),n.select2(t))}}},jQuery(document).ready(function(){UM.admin.tooltip.init(),UM.admin.colorPicker.init(),UM.admin.iconSelector.init()});
|
||||
"object"!=typeof window.UM&&(window.UM={}),"object"!=typeof window.UM.admin&&(window.UM.admin={}),UM.admin={tooltip:{all:null,init:function(){var t=jQuery(".um_tooltip");0<t.length&&(UM.admin.tooltip.all=t.tooltip({tooltipClass:"um_tooltip",content:function(){return jQuery(this).attr("title")}}))},close:function(){null!==UM.admin.tooltip.all&&0<UM.admin.tooltip.all&&"function"==typeof UM.admin.tooltip.all.tooltip&&UM.admin.tooltip.all.tooltip("close")}},colorPicker:{init:function(){var t=jQuery(".um-admin-colorpicker");t.length&&t.wpColorPicker()}},iconSelector:{init:function(){let n=jQuery(".um-icon-select-field");function t(t){var n=t.element;return void 0!==n?jQuery('<span><i class="'+jQuery(n).val()+'"></i> '+t.text+"</span>"):jQuery('<span><i class="'+t.id+'"></i> '+t.text+"</span>")}var i;n.length&&(i={ajax:{url:wp.ajax.settings.url,dataType:"json",delay:250,data:function(t){return{search:t.term,action:"um_get_icons",page:t.page||1,nonce:um_admin_scripts.nonce}},processResults:function(t,n){n.page=n.page||1;var i=[];return t.data.icons&&jQuery.each(t.data.icons,function(t,n){i.push({id:t,text:n.label})}),{results:i,pagination:{more:50*n.page<t.data.total_count}}},cache:!0},minimumInputLength:0,allowClear:!0,width:"100%",allowHtml:!0,templateSelection:t,templateResult:t,dropdownCssClass:"um-select2-icon-dropdown",containerCssClass:"um-select2-icon-container"},n.parents(".um-admin-tri").length?i.dropdownParent=n.parents(".um-admin-tri"):n.parents("._heading_text").length&&(i.dropdownParent=n.parents("._heading_text")),n.select2(i).on("change",function(){var t=n.siblings(".um_admin_fonticon_wrapper");0<t.length&&(t.find("#_icon").val(n.val()),t.hide())}))}}},jQuery(document).ready(function(){UM.admin.tooltip.init(),UM.admin.colorPicker.init(),UM.admin.iconSelector.init()});
|
||||
@@ -186,16 +186,30 @@ jQuery(document).ready(function() {
|
||||
/**
|
||||
restore font icon
|
||||
**/
|
||||
// jQuery(document.body).on('click', 'span.um-admin-icon-clear', function(){
|
||||
// var element = jQuery(this).parents('p');
|
||||
// jQuery('#UM_fonticons a.um-admin-modal-back').attr('data-code', '');
|
||||
// element.find('input[type="hidden"]').val('');
|
||||
// element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
//
|
||||
// element = jQuery(this).parents('td');
|
||||
// element.find('input[type="hidden"]').val('');
|
||||
// element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
// jQuery(this).removeClass('show');
|
||||
// });
|
||||
|
||||
jQuery(document.body).on('click', 'span.um-admin-icon-clear', function(){
|
||||
var element = jQuery(this).parents('p');
|
||||
jQuery('#UM_fonticons a.um-admin-modal-back').attr('data-code', '');
|
||||
element.find('input[type="hidden"]').val('');
|
||||
element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
element.find('.um_admin_fonticon_wrapper').hide();
|
||||
// element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
|
||||
element = jQuery(this).parents('td');
|
||||
element.find('input[type="hidden"]').val('');
|
||||
element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
jQuery(this).removeClass('show');
|
||||
element.find('.um_admin_fonticon_wrapper').hide();
|
||||
//element.find('.um-admin-icon-value').html( wp.i18n.__( 'No Icon', 'ultimate-member' ) );
|
||||
//jQuery(this).removeClass('show');
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -40,6 +40,14 @@ class Site_Health {
|
||||
);
|
||||
}
|
||||
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
if ( ! empty( $first_activation_date ) && $first_activation_date < 1713342395 ) {
|
||||
$tests['direct']['um_outdated_icons'] = array(
|
||||
'label' => esc_html__( 'Are the icons in Ultimate Member Forms and Settings out of date?', 'ultimate-member' ),
|
||||
'test' => array( $this, 'outdated_icons_test' ),
|
||||
);
|
||||
}
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
@@ -77,6 +85,131 @@ class Site_Health {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool|array
|
||||
*/
|
||||
private function get_outdated_icons() {
|
||||
$result = array(
|
||||
'description' => '',
|
||||
'actions' => '',
|
||||
);
|
||||
|
||||
$old_icons = UM()->fonticons()->all;
|
||||
|
||||
$forms = get_posts(
|
||||
array(
|
||||
'post_type' => 'um_form',
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids',
|
||||
)
|
||||
);
|
||||
|
||||
$forms_count = 0;
|
||||
$break_forms = array();
|
||||
if ( ! empty( $forms ) ) {
|
||||
foreach ( $forms as $form_id ) {
|
||||
$fields = UM()->query()->get_attr( 'custom_fields', $form_id );
|
||||
if ( empty( $fields ) ) {
|
||||
continue;
|
||||
}
|
||||
foreach ( $fields as $field ) {
|
||||
if ( empty( $field['icon'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( in_array( $field['icon'], $old_icons, true ) ) {
|
||||
$break_forms[] = array(
|
||||
'id' => $form_id,
|
||||
'title' => get_the_title( $form_id ),
|
||||
'link' => get_edit_post_link( $form_id ),
|
||||
);
|
||||
$forms_count++;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0 < $forms_count ) {
|
||||
$result['description'] .= sprintf(
|
||||
'<p>%s</p>',
|
||||
__( 'Your fields\' icons in the Ultimate Member Forms are out of date.', 'ultimate-member' )
|
||||
);
|
||||
|
||||
if ( ! empty( $break_forms ) ) {
|
||||
$result['description'] .= sprintf(
|
||||
'<p>%s',
|
||||
__( 'Related to Ultimate Member Forms: ', 'ultimate-member' )
|
||||
);
|
||||
|
||||
$form_links = array();
|
||||
foreach ( $break_forms as $break_form ) {
|
||||
$form_links[] = sprintf(
|
||||
'<a href="%s" target="_blank">%s (#ID: %s)</a>',
|
||||
esc_url( $break_form['link'] ),
|
||||
esc_html( $break_form['title'] ),
|
||||
esc_html( $break_form['id'] )
|
||||
);
|
||||
}
|
||||
|
||||
$result['description'] .= sprintf(
|
||||
'%s</p><hr />',
|
||||
implode( ', ', $form_links )
|
||||
);
|
||||
}
|
||||
|
||||
$result['actions'] .= sprintf(
|
||||
'<p><a href="%s">%s</a></p>',
|
||||
admin_url( 'edit.php?post_type=um_form' ),
|
||||
esc_html__( 'Edit form fields and update', 'ultimate-member' )
|
||||
);
|
||||
}
|
||||
|
||||
$result = apply_filters( 'um_get_outdated_icons_result', $result, $old_icons );
|
||||
|
||||
if ( ! empty( $result['description'] ) ) {
|
||||
$result['description'] .= sprintf(
|
||||
'<p>%s</p>',
|
||||
__( 'As soon as legacy icons will be removed old icons may break the website\'s functionality.', 'ultimate-member' )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $result['description'] ) && ! empty( $result['actions'] ) ) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function outdated_icons_test() {
|
||||
$result = array(
|
||||
'label' => __( 'You have the most recent version of icons in Ultimate Member forms and settings', 'ultimate-member' ),
|
||||
'status' => 'good',
|
||||
'badge' => array(
|
||||
'label' => UM_PLUGIN_NAME,
|
||||
'color' => self::BADGE_COLOR,
|
||||
),
|
||||
'description' => sprintf(
|
||||
'<p>%s</p>',
|
||||
__( 'Your fields in the Ultimate Member Forms and settings have the most recent version and are ready to use.', 'ultimate-member' )
|
||||
),
|
||||
'actions' => '',
|
||||
'test' => 'um_outdated_icons',
|
||||
);
|
||||
|
||||
$outdated_icons = $this->get_outdated_icons();
|
||||
|
||||
if ( false !== $outdated_icons ) {
|
||||
$result['label'] = __( 'Some field icons and (or) Ultimate Member settings icons are out of date', 'ultimate-member' );
|
||||
$result['status'] = 'recommended';
|
||||
$result['badge']['color'] = 'orange';
|
||||
$result['description'] = $outdated_icons['description'];
|
||||
$result['actions'] = $outdated_icons['actions'];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function get_roles() {
|
||||
return UM()->roles()->get_roles();
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 || UM()->options()->get( 'enable_new_fonticons' ) ) {
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 ) {
|
||||
UM()->setup()->set_icons_options();
|
||||
|
||||
$um_icons_list = get_option( 'um_icons_list' );
|
||||
|
||||
@@ -1557,7 +1557,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
case '_icon':
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 || UM()->options()->get( 'enable_new_fonticons' ) ) {
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 ) {
|
||||
UM()->setup()->set_icons_options();
|
||||
|
||||
$um_icons_list = get_option( 'um_icons_list' );
|
||||
@@ -1593,52 +1593,85 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
|
||||
}
|
||||
} else {
|
||||
if ( 'row' === $this->set_field_type ) {
|
||||
$back = 'UM_edit_row';
|
||||
?>
|
||||
<p class="_heading_text">
|
||||
<label for="_icon"><?php esc_html_e( 'Icon', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Select an icon to appear in the field. Leave blank if you do not want an icon to show in the field.', 'ultimate-member' ) ); ?></label>
|
||||
<span class="um_admin_fonticon_wrapper">
|
||||
<a href="javascript:void(0);" class="button" data-modal="UM_fonticons" data-modal-size="normal" data-dynamic-content="um_admin_fonticon_selector" data-arg1="" data-arg2="" data-back="<?php echo esc_attr( $back ); ?>"><?php esc_html_e( 'Choose Icon', 'ultimate-member' ); ?></a>
|
||||
|
||||
<span class="um-admin-icon-value"><?php if ( ! empty( $this->edit_mode_value ) ) { ?><i class="<?php echo esc_attr( $this->edit_mode_value ); ?>"></i><?php } else { ?><?php esc_html_e( 'No Icon', 'ultimate-member' ); ?><?php } ?></span>
|
||||
UM()->setup()->set_icons_options();
|
||||
|
||||
<input type="hidden" name="_icon" id="_icon" value="<?php echo ! empty( $this->edit_mode_value ) ? esc_attr( $this->edit_mode_value ) : ''; ?>" />
|
||||
$um_icons_list = get_option( 'um_icons_list' );
|
||||
|
||||
<?php if ( ! empty( $this->edit_mode_value ) ) { ?>
|
||||
<span class="um-admin-icon-clear show"><i class="um-icon-android-cancel"></i></span>
|
||||
<?php } else { ?>
|
||||
<span class="um-admin-icon-clear"><i class="um-icon-android-cancel"></i></span>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
if ( $this->in_edit ) {
|
||||
$back = 'UM_edit_field';
|
||||
} else {
|
||||
$back = 'UM_add_field';
|
||||
}
|
||||
?>
|
||||
<div class="um-admin-tri">
|
||||
<p>
|
||||
if ( empty( $this->edit_mode_value ) || array_key_exists( $this->edit_mode_value, $um_icons_list ) ) {
|
||||
if ( 'row' === $this->set_field_type ) {
|
||||
?>
|
||||
|
||||
<p class="_heading_text">
|
||||
<label for="_icon"><?php esc_html_e( 'Icon', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Select an icon to appear in the field. Leave blank if you do not want an icon to show in the field.', 'ultimate-member' ) ); ?></label>
|
||||
<span class="um_admin_fonticon_wrapper">
|
||||
<a href="javascript:void(0);" class="button" data-modal="UM_fonticons" data-modal-size="normal" data-dynamic-content="um_admin_fonticon_selector" data-arg1="" data-arg2="" data-back="<?php echo esc_attr( $back ); ?>"><?php esc_html_e( 'Choose Icon', 'ultimate-member' ); ?></a>
|
||||
|
||||
<span class="um-admin-icon-value"><?php if ( ! empty( $this->edit_mode_value ) ) { ?><i class="<?php echo esc_attr( $this->edit_mode_value ); ?>"></i><?php } else { ?><?php esc_html_e( 'No Icon', 'ultimate-member' ) ?><?php } ?></span>
|
||||
|
||||
<input type="hidden" name="_icon" id="_icon" value="<?php echo ! empty( $this->edit_mode_value ) ? esc_attr( $this->edit_mode_value ) : ''; ?>" />
|
||||
|
||||
<?php if ( ! empty( $this->edit_mode_value ) ) { ?>
|
||||
<span class="um-admin-icon-clear show"><i class="um-icon-android-cancel"></i></span>
|
||||
<?php } else { ?>
|
||||
<span class="um-admin-icon-clear"><i class="um-icon-android-cancel"></i></span>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<select name="_icon" id="_icon" class="um-icon-select-field" data-placeholder="<?php esc_attr_e( 'Select Icon', 'ultimate-member' ); ?>" >
|
||||
<option value=""><?php esc_html_e( 'Select Icon', 'ultimate-member' ); ?></option>
|
||||
<?php if ( ! empty( $this->edit_mode_value ) && array_key_exists( $this->edit_mode_value, $um_icons_list ) ) { ?>
|
||||
<option value="<?php echo esc_attr( $this->edit_mode_value ); ?>" selected><?php echo esc_html( $um_icons_list[ $this->edit_mode_value ]['label'] ); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="um-admin-tri">
|
||||
<p>
|
||||
<label for="_icon"><?php esc_html_e( 'Icon', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Select an icon to appear in the field. Leave blank if you do not want an icon to show in the field.', 'ultimate-member' ) ); ?></label>
|
||||
<select name="_icon" id="_icon" class="um-icon-select-field" data-placeholder="<?php esc_attr_e( 'Select Icon', 'ultimate-member' ); ?>">
|
||||
<option value=""><?php esc_html_e( 'Select Icon', 'ultimate-member' ); ?></option>
|
||||
<?php if ( ! empty( $this->edit_mode_value ) && array_key_exists( $this->edit_mode_value, $um_icons_list ) ) { ?>
|
||||
<option value="<?php echo esc_attr( $this->edit_mode_value ); ?>" selected><?php echo esc_html( $um_icons_list[ $this->edit_mode_value ]['label'] ); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
} else {
|
||||
if ( 'row' === $this->set_field_type ) {
|
||||
?>
|
||||
|
||||
<p class="_heading_text">
|
||||
<label for="um_ui_icon_new"><?php esc_html_e( 'Icon', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Select an icon to appear in the field. Leave blank if you do not want an icon to show in the field.', 'ultimate-member' ) ); ?></label>
|
||||
<select name="um_ui_icon_new" id="um_ui_icon_new" class="um-icon-select-field" data-placeholder="<?php esc_attr_e( 'Select Icon', 'ultimate-member' ); ?>" >
|
||||
<option value=""><?php esc_html_e( 'Select Icon', 'ultimate-member' ); ?></option>
|
||||
<?php if ( ! empty( $this->edit_mode_value ) && array_key_exists( $this->edit_mode_value, $um_icons_list ) ) { ?>
|
||||
<option value="<?php echo esc_attr( $this->edit_mode_value ); ?>" selected><?php echo esc_html( $um_icons_list[ $this->edit_mode_value ]['label'] ); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<span class="um_admin_fonticon_wrapper">
|
||||
<span><?php esc_html_e( 'Icon is outdated. Please set the new one above.', 'ultimate-member' ); ?></span>
|
||||
<input type="hidden" name="_icon" id="_icon" value="<?php echo ! empty( $this->edit_mode_value ) ? esc_attr( $this->edit_mode_value ) : ''; ?>" />
|
||||
<span class="um-admin-icon-value"><i class="<?php echo esc_attr( $this->edit_mode_value ); ?>"></i></span>
|
||||
<span class="um-admin-icon-clear show"><i class="um-icon-android-cancel"></i></span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="um-admin-tri">
|
||||
<p>
|
||||
<label for="um_ui_icon_new"><?php esc_html_e( 'Icon', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Select an icon to appear in the field. Leave blank if you do not want an icon to show in the field.', 'ultimate-member' ) ); ?></label>
|
||||
<select name="um_ui_icon_new" id="um_ui_icon_new" class="um-icon-select-field" data-placeholder="<?php esc_attr_e( 'Select Icon', 'ultimate-member' ); ?>">
|
||||
<option value=""><?php esc_html_e( 'Select Icon', 'ultimate-member' ); ?></option>
|
||||
<?php if ( ! empty( $this->edit_mode_value ) && array_key_exists( $this->edit_mode_value, $um_icons_list ) ) { ?>
|
||||
<option value="<?php echo esc_attr( $this->edit_mode_value ); ?>" selected><?php echo esc_html( $um_icons_list[ $this->edit_mode_value ]['label'] ); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<span class="um_admin_fonticon_wrapper">
|
||||
<span><?php esc_html_e( 'Icon is outdated. Please set the new one above.', 'ultimate-member' ); ?></span>
|
||||
<input type="hidden" name="_icon" id="_icon" value="<?php echo ! empty( $this->edit_mode_value ) ? esc_attr( $this->edit_mode_value ) : ''; ?>" />
|
||||
<span class="um-admin-icon-value"><i class="<?php echo esc_attr( $this->edit_mode_value ); ?>"></i></span>
|
||||
<span class="um-admin-icon-clear show"><i class="um-icon-android-cancel"></i></span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2112,13 +2112,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'checkbox_label' => __( 'Enable Gutenberg Blocks', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to use Ultimate Member blocks in Gutenberg editor. Important some themes have the conflicts with Gutenberg editor.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'enable_new_fonticons',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'New fonticons', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable new fonticons', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to enable new Ultimate Member fonticons used latest version of FontAwesome library.', 'ultimate-member' ),
|
||||
),
|
||||
$same_page_update,
|
||||
),
|
||||
),
|
||||
@@ -2229,12 +2222,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
|
||||
} else {
|
||||
unset( $this->settings_structure['advanced']['sections']['features']['form_sections']['beta_features'] );
|
||||
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 ) {
|
||||
unset( $this->settings_structure['advanced']['sections']['features']['form_sections']['features']['fields'][1] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 || UM()->options()->get( 'enable_new_fonticons' ) ) {
|
||||
|
||||
} else {
|
||||
if ( ! empty( $first_activation_date ) && $first_activation_date < 1713342395 ) {
|
||||
?>
|
||||
<div id="UM_fonticons" style="display:none">
|
||||
|
||||
|
||||
@@ -600,16 +600,8 @@ if ( ! class_exists( 'um\Config' ) ) {
|
||||
'secure_notify_admins_banned_accounts__interval' => 'instant',
|
||||
'secure_allowed_redirect_hosts' => '',
|
||||
'delete_comments' => false,
|
||||
'enable_new_fonticons' => false,
|
||||
);
|
||||
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 ) {
|
||||
// first install set this option to true by default
|
||||
$this->settings_defaults['enable_new_fonticons'] = true;
|
||||
}
|
||||
|
||||
add_filter( 'um_get_tabs_from_config', '__return_true' );
|
||||
|
||||
$tabs = UM()->profile()->tabs();
|
||||
|
||||
@@ -270,13 +270,10 @@ class Enqueue {
|
||||
wp_register_style( 'um_fonticons_fa', $libs_url . 'legacy/fonticons/fonticons-fa' . $suffix . '.css', array(), UM_VERSION ); // FontAwesome
|
||||
$fonticons_handlers = array( 'um_fonticons_ii', 'um_fonticons_fa' );
|
||||
// New FontIcons from FontAwesome.
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
// @todo new version
|
||||
if ( empty( $first_activation_date ) || $first_activation_date >= 1713342395 || UM()->options()->get( 'enable_new_fonticons' ) ) {
|
||||
// First install set this option to true by default and use new FontAwesome icons
|
||||
wp_register_style( 'um_fontawesome', $css_url . 'um-fontawesome' . $suffix . '.css', array(), self::$fa_version ); // New FontAwesome
|
||||
$fonticons_handlers[] = 'um_fontawesome';
|
||||
}
|
||||
// First install set this option to true by default and use new FontAwesome icons
|
||||
wp_register_style( 'um_fontawesome', $css_url . 'um-fontawesome' . $suffix . '.css', array(), self::$fa_version ); // New FontAwesome
|
||||
$fonticons_handlers[] = 'um_fontawesome';
|
||||
self::$fonticons_handlers = $fonticons_handlers;
|
||||
|
||||
// Select2 JS.
|
||||
|
||||
Reference in New Issue
Block a user