- setting for new FA and enqueue styles based on this option;

This commit is contained in:
Mykyta Synelnikov
2024-04-17 12:54:07 +03:00
parent e1fbd249ff
commit 9a4bf10df5
6 changed files with 41 additions and 3 deletions
+3 -1
View File
@@ -191,7 +191,9 @@ final class Enqueue extends \um\common\Enqueue {
wp_style_add_data( 'um_members', 'suffix', $suffix );
}
wp_register_style( 'um_styles', $css_url . 'um-styles' . $suffix . '.css', array( 'um_ui', 'um_tipsy', 'um_raty', 'um_fonticons_ii', 'um_fonticons_fa', 'select2' ), UM_VERSION );
$deps = array_merge( array( 'um_ui', 'um_tipsy', 'um_raty', 'select2' ), self::$fonticons_handlers );
wp_register_style( 'um_styles', $css_url . 'um-styles' . $suffix . '.css', $deps, UM_VERSION );
wp_register_style( 'um_profile', $css_url . 'um-profile' . $suffix . '.css', array(), UM_VERSION );
wp_register_style( 'um_responsive', $css_url . 'um-responsive' . $suffix . '.css', array( 'um_profile' ), UM_VERSION );
wp_register_style( 'um_account', $css_url . 'um-account' . $suffix . '.css', array(), UM_VERSION );
@@ -2112,6 +2112,13 @@ 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,
),
),
@@ -2222,6 +2229,12 @@ 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] );
}
}
}