remove fontawesome
-
Hello,
I choose custom icons from admin panel.
Do I still need to run below code to remove font awesome?
Or it is deleted automatically?if ( function_exists( 'yith_wishlist_install' ) ){ if ( ! function_exists( 'yith_wcwl_remove_awesome_stylesheet' ) ) { function yith_wcwl_remove_awesome_stylesheet() { wp_deregister_style( 'yith-wcwl-font-awesome' ); } } add_action( 'wp_enqueue_scripts', 'yith_wcwl_remove_awesome_stylesheet', 20 ); }
-
Ok.
I removed font awesome and wishlist page design is ruined. https://prnt.sc/11b0hzt
edit wishlist name is not working. All the design become ugly.Btw, If I allow font awesome this button is pure white and can’t be seen.
I didn’t realise it, google lighthouse tool warned me.<a class="btn button show-title-form"> <i class="fa fa-pencil"></i>Custom wishlist</a>so;
1. Can we completely get rid of fontawesome. Even from design? How?
2. Can we have an opiton to on/off custom wishlist naming? Or remove it completely.I have removed these titles with below code. But I wish to have it in setings so no need to add additional CSS.
/* Yith wislisht remove title forms */ .hidden-title-form, .wishlist-title-with-form { display: none; }I still looking for fontawesome free version of the plugin.
Hi there
FontAwesome is required for many icons across the plugin, so we still suggest to use it to prevent any desing problem
Anyway, if you correctly remove it, overall appearance of the plugin shouldn’t break; if this did happen chances are that you missed to remove it from main style dependenciesHere a snippet of PHP code that should help you safely dequeue fontawesome from your site, without breaking the overall appearance of the plugin
if ( ! function_exists( 'yith_wcwl_dequeue_fontawesome' ) ) { function yith_wcwl_dequeue_fontawesome() { wp_dequeue_style( 'yith-wcwl-font-awesome' ); } add_action( 'wp_enqueue_scripts', 'yith_wcwl_dequeue_fontawesome', 15 ); } if ( ! function_exists( 'yith_wcwl_remove_fontawesome_dependency' ) ) { function yith_wcwl_remove_fontawesome_dependency( $deps ) { if ( false !== $pos = array_search( 'yith-wcwl-font-awesome', $deps ) ) { unset( $deps[ $pos ] ); } } add_filter( 'yith_wcwl_main_style_deps', 'yith_wcwl_remove_fontawesome_dependency' ); }Try to add it at the end of functions.php file of your theme or child theme
Hope this helpsCan you also check title edit issue?
Sure, would you please share an url to your installation, so I can check the edit button?
Hi,
It was there but not working. Also I don’t want people to rename their wishlist.
So I solved as below.
This removed title edit are, which was not working already in free version.OPEN
yith-woocommerce-wishlist/templates/wishlist-view-header.phpFIND AND DELETE
if ( ! empty( $page_title ) ) : ?> <div class="wishlist-title-container"> <div class="wishlist-title <?php echo ( $can_user_edit_title ) ? 'wishlist-title-with-form' : ''; ?>"> <?php echo apply_filters( 'yith_wcwl_wishlist_title', '<h2>' . esc_html( $page_title ) . '</h2>' ); ?> <?php if ( $can_user_edit_title ) : ?> <a class="btn button show-title-form"> <?php echo apply_filters( 'yith_wcwl_edit_title_icon', '<i class="fa fa-pencil"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php esc_html_e( 'Edit title', 'yith-woocommerce-wishlist' ); ?> </a> <?php endif; ?> </div> <?php if ( $can_user_edit_title ) : ?> <div class="hidden-title-form"> <input type="text" value="<?php echo esc_attr( $page_title ); ?>" name="wishlist_name"/> <div class="edit-title-buttons"> <a role="button" href="#" class="hide-title-form"> <?php echo apply_filters( 'yith_wcwl_cancel_wishlist_title_icon', '<i class="fa fa-remove"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </a> <a role="button" href="#" class="save-title-form"> <?php echo apply_filters( 'yith_wcwl_save_wishlist_title_icon', '<i class="fa fa-check"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </a> </div> </div> <?php endif; ?> </div> <?php endif;Any chance YITH could adopt SVG icons in the future and do away with Font awesome for good?
@mitchellk Currently there is no plan to completely remove FontAwesome from the plugin; we will definitey move to latest version of the library, offering option for backward compatibility, but we will stick with font-icon, at least for the moment
Anyway, note that I’m just talking about the near future (we have scheduled the update process till version 3.1); if there is enough request, or any really valid reason why this has to change, we will definitely look into this manner for future releases
Hi, There are many reasons. Fontawesome is incredible big, loads unnecessary icons, create extra http request.
But inline svg don’t.On the other hand it offers the flexibility to pick up any icon from a selection and use it for your project
I understand that in most cases it won’t be necessary and could be replaced with a (small) set of SVG icons, but we also need to consider all the people that uses custom icons for their ATW buttonMaybe a way forward would be to offer a “default” icon set, and an option to access FontAwesome library, if you want
Thank you for your inputs, I’ll bring these instances to next developers briefing
I got your point.
Option to choose is perfect way.1. I want to use fontawesome. No need SVG.
2. I want to use SVG, will select from pre arranged ones. No need fontawesome.That is the best way for my opinion
The topic ‘remove fontawesome’ is closed to new replies.