umdevelopera / um-account-tabs

Adds custom tabs to user account
GNU General Public License v3.0
8 stars 1 forks source link

Account Tab Icon is not showing #13

Open temereva opened 1 month ago

temereva commented 1 month ago

On the Account Tab edit screen, the Appearance metabox shows a message "The selected icon is using an outdated version. Please select the icon above to use latest version."

The plugin is up to date, the icon list shows icons from "fasfa-..." (Font Awesome?) set, not the original "UM" icon set. The icon is being saved and added to the HTML correctly, but it's not showing on the front-end. Possibly because the font itself is not loaded? I'd preferred not to enable one more icon font though, but used the existing UM icon font. Is there is a way to do that?

Thank you!

cryptexvinci commented 1 month ago

Go to class-admin.php. Then change line 278 with this $icon = isset( $input['_icon'] ) ? esc_attr( $input['_icon'] ) : '';

heidipowers commented 1 month ago

Hello, I made this update but still see the same error. Is it still the recommended fix? Thank you so much!

heidipowers commented 1 month ago

chatGPT suggested this fix which resolved it for me:

$icon = isset( $input['_icon'] ) ? wp_strip_all_tags( $input['_icon'] ) : '';
update_post_meta( $post_id, '_icon', $icon );