Tung Du
Forum Replies Created
-
Hi @ahcj,
I’m sorry for this very late reply. You need to modify your snippet a little bit to make it work. You need to pass a function as the second argument of
add_filter
, you passed a boolean, that’s why you got the error.add_filter( 'simple_local_avatars_dynamic_resize', '__return_false' );
Forum: Plugins
In reply to: [Simple Local Avatars] Possible to show larger image?You can try changing the avatar size using
pre_get_avatar_data
:add_filter( 'pre_get_avatar_data', function( $args ) { $args['size'] = 'full'; return $args; }, 5 );
If the code above doesn’t work, you should contact Divi support and ask them for a way to change the avatar size. (I don’t have experience working with Divi).
Simple Local Avatars filter the avatar data, so it inherits the settings of the default avatar. Changing the size of the default avatar will change the size of the local avatar.
Forum: Plugins
In reply to: [Simple Local Avatars] Possible to show larger image?Hi @jpnl,
You can set the size argument in your
get_avatar
calls tofull
to show the avatar using the original image size.Hope this helps!
Forum: Plugins
In reply to: [Simple Local Avatars] Avatar DistortedHi @ronsmithmd,
Can you please share with us the site that is having the issue? This plugin always crops the avatar using the 1:1 ratio, so the cropped avatar should be square. If you can give me the site having the issue, it’s much easier for me to trace the bug.
> What is the recommended image dimension or ratio for an avatar?
There is no recommended size/ratio. It depends on how your theme, this plugin crops avatar using the size your theme uses.
> Is there a way to eliminate the Gravatar image since it is confusing when it still shows up?
Go to Settings > Discussion, you’ll find the “Local Avatars Only” checkbox, checking that box disables Gravatar on your site.
Forum: Plugins
In reply to: [Simple Local Avatars] Avatar for guestHi @thenino,
Simple Local Avatars doesn’t support the feature you mentioned above. But you can do it with code, see this: https://www.wpbeginner.com/wp-tutorials/how-to-change-the-default-gravatar-on-wordpress/
Hope this helps!
Forum: Plugins
In reply to: [Convert to Blocks] Show which editor in useHi @scarne,
Thanks for your report, I can confirm your issue and submitted a fix here: https://github.com/10up/convert-to-blocks/pull/36. This fix will be included in the next release.
Hi @webstructure, I notice you mentioned the version in the first post, I’m sorry for the duplicated question!
Look like one of your plugins or theme functions is affecting the srcset output. Here is a fresh site with only the Azure plugin activated: https://10up.tungdu.com/hello-world/, the srcset output is correct.
Can you please test the plugin on a fresh site or with other plugins deactivated? Do you use CNAME and if yes, how you config it?
Hi @codyng,
Looking at this: https://github.com/10up/windows-azure-storage/blob/develop/windows-azure-storage.php#L341-L349, you can mock the data
windows_azure_storage_info
for old attachments usingget_post_metadata
filter.This is the example of data stored in
windows_azure_storage_info
https://gist.github.com/dinhtungdu/8bc74d07e6449d6833b8e2b85f9ea730Hi @webstructure,
Which version of the plugin are you using? I tested the latest version and the scrset data is correctly set.
Forum: Plugins
In reply to: [Restricted Site Access] Restrict only by IP addressHi @mike80222,
Maybe I don’t have it configured right?
You configured it correctly. RSA doesn’t restrict access to the login page. it only restricts access to WordPress requests.
You will need other solutions than RSA to solve your blog. I found this blog, hope it helps: https://wpmudev.com/blog/limit-access-login-page/
And/or … is there a page somewhere that lists all the RSA hooks, hopefully with a short description of each?
Unfortunately, we don’t have any page listing RSA hooks, yet. But you can search within
restricted_site_access.php
(search for apply_filters, do_action), all hooks are in there.Forum: Plugins
In reply to: [Restricted Site Access] Allow REST requestsHi @ayssono,
You can use this snippet to exclude REST API instead.
add_filter( 'restricted_site_access_is_restricted', function( $restricted, $wp ) { if ( ! empty( $wp->query_vars['rest_route'] ) ) { return false; } return $restricted; }, 10, 2 );
Hope this helps!
Forum: Plugins
In reply to: [Simple Local Avatars] Post Avatar using rest APIHi @salmanqureshi11, Yes, you can set/get the local avatar through Users REST API endpoints, see this for more information: https://github.com/10up/simple-local-avatars/blob/develop/includes/class-simple-local-avatars.php#L637-L680
Users Reference: https://developer.www.ads-software.com/rest-api/reference/users/
For example, you want to get the avatar of a user, make a GET request to
/wp/v2/users/<id>
and the response should include the simple_local_avatar field.To update the user avatar, create a POST request to
/wp/v2/users/<id>
and include themedia_id
in the submitted data.Hope this helps!
Forum: Plugins
In reply to: [Safe Redirect Manager] How to use Safe Redirect Manager?Hi @juhah,
– For the Redirect from, the path should be relative to the root of this WordPress installation (or the sub-site, if you are running a multi-site).
– You shouldn’t check the Enable regex for normal URL. Checking that box means the plugin will use Regular Expression to detect the matched redirects, only check if you’re familiar with Regular Expression.
– Because you’re redirecting to another site, you should put the whole URL with https to the “Redirect to” field.
Hope this helps!
Forum: Plugins
In reply to: [Restricted Site Access] Plesk Smart Update> So that’s why I am speculating that it’s htaccess/rewrite rules from RSA causing the issue.
FYI, RSA doesn’t add any htaccess/rewrite rule. RSA hooks to
parse_request
action to restrict the access of visitors based on IP address.Forum: Plugins
In reply to: [Restricted Site Access] Plesk Smart UpdateHi @wildlifeworld, I don’t have experient with Plesk Smart Update so I can’t confirm the direction you mentioned.
IMO, you should contact the support team to see if you can exclude some specific plugins from the update test (in this case, it’s RSA).
Hope that helps!