veerap
Forum Replies Created
-
PHP Warning and Deprecated notices are not “harmless” when you try to test PHP compatibility in big picture and find the actual issues from code. This plugin outputs 35 rows of messages for every page load that makes almost impossible to find the real issues.
Please update the priority to fix the warnings.
Forum: Plugins
In reply to: [Siteimprove] PHP warning in debug logs+1 for this fix, debug logs are filled with this warning after PHP 8 upgrade and it makes other issues harder to debug
PHP Warning: Undefined array key "si_preview" in /data/wordpress/htdocs/wp-content/plugins/siteimprove/includes/class-siteimprove.php on line 148
Forum: Plugins
In reply to: [WP SmartCrop] Bug with add_image_size custom crop positionSame kind of issue here that cropping is not fired at all with custom image sizes.
My case: When using WP own soft crop image sizes (large, medium) “data-smartcrop-focus” and SmartCrop related classes are set correct. All good there.
But when creating own image size
add_image_size( 'hd', 1920, 1080, false );
regenerated thumbnails
and then working with that size
the_post_thumbnail( 'hd' );
or
wp_get_attachment_image( $attachment_id, 'hd' );
…there is no SmartCrop related functionality in element.
Forum: Plugins
In reply to: [WP SmartCrop] Purge image from browser cache after cropmy hack was tailored for specific custom theme. Maybe more global solution would be to detect cropping with wp_get_attachment_image_src filter:
function filter_wp_get_attachment_image_src( $image, $attachment_id, $size, $icon ) { // Check if SmartCrop is enabled. if ( get_post_meta( $attachment_id, '_wpsmartcrop_enabled', true ) ) { // Add focus meta to image src. $smartcrop = get_post_meta( $attachment_id, '_wpsmartcrop_image_focus', true ); $image[0] .= '?smartcrop=' . 'x' . $smartcrop['left'] . 'y' . $smartcrop['top']; } return $image; }; // Add the filter. add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src', 10, 4 );
Forum: Plugins
In reply to: [Polylang] Keywords disappear when I want to save.Having the same issue. New keyword (or category) is created but not assigned to any language if it’s created in post editing view. Creating tags & categories in post editing view seems to work in Pro version but not in the free one.
How to reproduce:
– Install WordPress 5.3. of 5.3.1
– Use any of the “Twenty X” theme
– Install Polylang 2.6.8 & create few languages
– Try to create new tag for “Hello World”
– Check newly create tag in Posts -> Tags view -> it’s not set in any languageForum: Plugins
In reply to: [WP SmartCrop] Purge image from browser cache after cropIn my case we are talking about really large website where is +90 users who are creating the content -> so the level of technicality is varied, some do not even know what hard refresh/reload means. Featured images that are hard cropped as panorama like aspect ratio is my issue because even the less technical content creators needs to see the change in crop focus as easily as possible. So that’s why it was “critical” in apostrophes ??
My hack for it:
So I’m created my own “the_post_thumbnail” function that checks from attachment meta if
– there is a SmartCrop enabled
– if so, it sets xy coordinates from focus as attachment url parameter
Works as desired, browser sees the new version when first loaded and then saves it to cache (and next time serves it from there).- This reply was modified 5 years ago by veerap.
Forum: Plugins
In reply to: [WP SmartCrop] Purge image from browser cache after cropSame issue occurs with twenty nineteen theme & all other plugins are deactivated :/
It’s not an option in my case to exclude specific images from browser cache, so I think I’ll just try to create some other workaround for it (since there only few places in theme where “purge” is “critical”).
Forum: Plugins
In reply to: [Bitly's Wordpress Plugin] WP-Bitly discontinued@modded Wondering the same as sivivatu above, is there any updates about continue? ??
Forum: Plugins
In reply to: [Polylang] How do I remove HREFLANG from head?There is a hook for it that you can use: https://hookr.io/filters/pll_rel_hreflang_attributes/
- This reply was modified 5 years, 5 months ago by veerap.
Forum: Plugins
In reply to: [Polylang] Hreflang not visible to google and other crawlersCould be also related to this: https://polylang.pro/doc/google-reports-error-about-hreflang-attributes/ so should be fixed by itself over time.
Forum: Plugins
In reply to: [Polylang] Display same content in different languagesI would just update to PRO and use Synchronized post feature https://polylang.pro/doc/synchronized-posts/. But I’m lazy, so it’s up to you do you want to get your hands dirty with
redirect_canonical
filter ??Forum: Plugins
In reply to: [Polylang] 2 Linked Front pages saves same dataForum: Plugins
In reply to: [Polylang] Language selector not showing all languagesI would try to find out does this happen with every language switcher or just with one in main menu (since you use highly customized theme):
– Try to deactivate dropdown and flags from language switcher to see if there is any changes
– Try to run language switcher via widget area
– Try to run<ul><?php pll_the_languages();?></ul>
via codeIf one of these language switchers works there might be something incompatibility in your theme or other plugins. If no luck, follow instructions Please read before posting
Forum: Plugins
In reply to: [Polylang] Show content from category inside language homepageYou can change a post language to desired language (use the dropdown in post editing view) and you don’t have to create translations if you don’t need them.
Forum: Plugins
In reply to: [Polylang] New terms not syncTerm must be translated to all languages so it can be synced. So for example, you cannot create new term in EN product editing view and expect that it will translated it self for all other languages.