Ariel
Forum Replies Created
-
Forum: Plugins
In reply to: [Leira Letter Avatar] still no lucky on buddypress and wordpress 5.8Hi @masterseoonline
If you try with a clean installation the error continues?
Do you have other plugins that modifies user avatar?Forum: Plugins
In reply to: [Leira Letter Avatar] It does not work with WP 5.8Hi @hunter112
What is the fatal error you are getting?
Do you have other plugins/theme installed? which one?Forum: Plugins
In reply to: [Leira Letter Avatar] Plugin ConflictHi @jermhen
Where do I find this “YITH WooCommerce Advanced Reviews Premium” plugin? I couldn’t find it in the plugins repo.
Is it the same as “YITH WooCommerce Advanced Reviews“? or is a premium version of it?Kind regards!
Forum: Plugins
In reply to: [Leira Letter Avatar] Possible to change font?@brynzovskii
this snippet does not work for svg format.
To change the svg you need to use “leira_letter_avatar_image_content” filter.
This should do the trick.function change_svg_font($avatar){ $current = " -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;"; $replace = "Your Font"; $avatar = str_replace($current, $replace, $avatar); return $avatar; } add_filter( 'leira_letter_avatar_image_content', 'change_svg_font', 10, 2);
Any further questions please open a new support thread.
Forum: Reviews
In reply to: [Cron Jobs] Dead easyThanks @paddy-landau for you review.
Cheers!Forum: Plugins
In reply to: [Leira Letter Avatar] Crashes our siteHi @realact
Thanks for the feed back.
Acording to the line where the error was found the problem is related with the option “use grvatar if available”.
This particular option is expensive computacionally speaking as it requests the user avatar from gravatar.
Maybe there was some kind gravatar issue at the moment or ,most probably, there is a comunication issue with gravatar system.
I will further investigate the issue, now i have where to look at. in the meanwhile you should be fine if you uncheck the plugin setting I mentioned above.Kind Regards
Forum: Plugins
In reply to: [Leira Letter Avatar] Choose a specific background for a particular userHi @clawduda
Thanks for you kind words! glad you enjoy the plugin.I have a question please. Is it possible to choose a specific background for one specific user?
You can achieve it if you know the email or the ID of the user for the one you want to create the custom background.
This code will do the trick. A user with id “1” or email “[email protected]” will have an avatar with a red background. Modify it to fit your needs. I added some helpful comments./** * Show custom background color for specific user * * @param $url_args * @param $id_or_email * * @return mixed */ function custom_background_for_specific_user( $url_args, $id_or_email ) { $user = false; $email = false; if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) { $id_or_email = get_comment( $id_or_email ); } // Process the user identifier. if ( is_numeric( $id_or_email ) ) { $user = get_user_by( 'id', absint( $id_or_email ) ); } elseif ( is_string( $id_or_email ) ) { if ( strpos( $id_or_email, '@md5.gravatar.com' ) ) { // MD5 hash. list( $email_hash ) = explode( '@', $id_or_email ); } else { // Email address. $email = $id_or_email; } $user = get_user_by( 'email', $id_or_email ); } elseif ( $id_or_email instanceof WP_User ) { // User object. $user = $id_or_email; } elseif ( $id_or_email instanceof WP_Post ) { // Post object. $user = get_user_by( 'id', (int) $id_or_email->post_author ); } elseif ( $id_or_email instanceof WP_Comment ) { if ( ! empty( $id_or_email->user_id ) ) { $user = get_user_by( 'id', (int) $id_or_email->user_id ); } if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) { $email = $id_or_email->comment_author_email; } } if ( $user ) { $email = $user->user_email; } /** * Use this code if you want to show a custom background for a user with a known email */ if ( $email && $email == '[email protected]' ) { $url_args['bg'] = 'ff0000'; $url_args['color'] = 'ffffff'; } /** * Use this code if you want to show a custom background to user with ID = = 1 */ if ( $user && $user->ID == 1 ) { $url_args['background'] = 'ff0000'; $url_args['color'] = 'ffffff'; } return $url_args; } add_filter( 'leira_letter_avatar_url_args', 'custom_background_for_specific_user', 10, 2 );
Kind regards!
Forum: Plugins
In reply to: [Leira Letter Avatar] Apply network setting to all of subsites?Forum: Plugins
In reply to: [Leira Letter Avatar] Possible to change font?Did you remove the avatar folder in uploads directory? Otherwise image wont be regenerated
Forum: Plugins
In reply to: [Leira Letter Avatar] Suggestion to improve the pluginThis plugin does not modify the avatar img alt attribute.
Check your plugin/themes installed, one of those is causing the problem.Regards
While cloning the admin role is a good idea, i dont think is a good idea to give regular users such kind priviledge. I supose you removed certain capabilities for this cloned role, so regular users shouldnt be able to break anything in theory, but i am not so sure about it.
My advise leave user roles as they are and use the snippet i sent you.
Kind RegardsHi @evalast
Your question is not related with this plugin.
Its more a woo commerce question/feature you want for your installtion.
Anyway i am more than glad to help. So the code below should do the trick. Replace “example_role” for your your roleadd_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1); function _wc_disable_admin_bar($prevent_admin_access) { if (!current_user_can('example_role')) { return $prevent_admin_access; } return false; } add_filter('woocommerce_prevent_admin_access', '_wc_prevent_admin_access', 10, 1); function _wc_prevent_admin_access($prevent_admin_access) { if (!current_user_can('example_role')) { return $prevent_admin_access; } return false; }
Forum: Plugins
In reply to: [Leira Letter Avatar] Possible to change font?avoid pointing to theme as you might want to delete the theme at some point and you will gonna break letter avatar.
Put the ttf file in wp-content/uploads/ directory and use this code.function my_image_font( $font, $data ) { $uploads = wp_get_upload_dir(); $uploads = $uploads['basedir']; $font = $uploads . '/Barlow-SemiBold.ttf'; return $font; } add_filter( 'leira_letter_avatar_image_font', 'my_image_font', 10, 2 );
Forum: Plugins
In reply to: [Leira Letter Avatar] Plugin applying letters to profile with picsI found the problem, it should work with the last update
Check it out and let me know.Forum: Plugins
In reply to: [Leira Letter Avatar] Plugin considers the first letter of the email@vejapixel I just tried a clean new wp installation, installed leira letter avatar and is getting the letter from user name.
Which wp version are you using?
Which theme?