Rafał
Forum Replies Created
-
Sure
Good luck!
and thank you for your jobForum: Plugins
In reply to: [Rich Showcase for Google Reviews] Focus on review textHi @richplugins
Nice! Thank you!
Keyboard navigation through reviews will be a clear pleasure if you stop sliding when focus is inside, similar to hover state, do you agree?
Jumping with focus to the next invisible review box should cause the shift, of course.This issue occurs when there are 2 or more review boxes visible at once. Single behaves as expected.
- This reply was modified 1 year ago by Rafał.
Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] AVIF SupportForum: Plugins
In reply to: [Lightbox with PhotoSwipe] AVIF SupportUnfortunately, AVIF images still cannot enter into lightbox.
I’ve realized that they haven’t got needed attributes:data-lbwps-width, anddata-lbwps-height, so I’ve wrote the workaround (put in functions.php)/**
* Fix for AVIF images that can't get lightbox effect
*/
add_filter('the_content', function($content) {
if ( !is_singular() || strpos($content, '.avif') === false ) {
return $content;
} else {
// Use DOMDocument to parse and modify content
$dom = new DOMDocument();
libxml_use_internal_errors(true); // Suppress warnings for invalid HTML
$dom->loadHTML('<?xml encoding="utf-8" ?>' . $content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
libxml_clear_errors();
// Get all <a> elements in the content
$anchors = $dom->getElementsByTagName('a');
foreach ($anchors as $a) {
$href = $a->getAttribute('href');
// Check if the link points to an .avif image
if (strpos($href, '.avif') !== false) {
// Retrieve image metadata
$image_id = attachment_url_to_postid($href);
if ($image_id) {
$image_meta = wp_get_attachment_metadata($image_id);
if (!empty($image_meta['width']) && !empty($image_meta['height'])) {
// Add data attributes to the <a> tag
$a->setAttribute('data-lbwps-width', $image_meta['width']);
$a->setAttribute('data-lbwps-height', $image_meta['height']);
}
}
}
}
// Save the modified HTML content
return $dom->saveHTML();
}
});this works for me 🙂
Hi
Sorry, I couldn’t find suitable method to allow AVIF in Social tab.I use workaround which as OG:image gets featured image, even if it’s in AVIF format
add_filter('wpseo_opengraph_image', 'use_featured_image');
function use_featured_image($img) {
// Get the current post ID
$post_id = get_the_ID();
// Check if Yoast SEO has a social image set
$yoast_social_image = get_post_meta($post_id, '_yoast_wpseo_opengraph-image', true);
// Only use featured image if no Yoast social image is set
if (empty($yoast_social_image) && has_post_thumbnail($post_id)) {
$img = get_the_post_thumbnail_url($post_id, 'full');
}
return $img;
}Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] AVIF SupportThank you for your intervention and I keep my fingers crossed for good news in this matter
Forum: Plugins
In reply to: [hCaptcha for WP] Composer warningsOK, I’m going to be patient, thank you!
Forum: Plugins
In reply to: [hCaptcha for WP] hCaptcha and jQueryIndeed, now hCaptcha works without jQuery. I haven’t checked the last version, sorry. (But some earlier versions did not work without jQuery – blank box – in my WP environment, really)
Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] Admin Columns integrationWould be great, thank you!
Forum: Plugins
In reply to: [Hyperlink Group Block] Empty CSS Custom Properties in style attributeFixed since version 1.17.4.
Thanks! 🙂Forum: Plugins
In reply to: [Hyperlink Group Block] aria-label please+1
Forum: Plugins
In reply to: [Estatik Real Estate Plugin] How to customize PDF file nameThank you are trying to help me.
It isn’t clear for me, because I’m not a PHP programmer. Could you guide me further, please?Forum: Plugins
In reply to: [Estatik Real Estate Plugin] How to customize PDF template@novaleks I know I have to overwrite the template, but HOW to construct a function that passes the background color for QR code image???
Any help appreciatedForum: Plugins
In reply to: [Estatik Real Estate Plugin] How to customize PDF templateHi!
Sorry, it’s too difficult for me. Am i allowed to add another parameter here to set the background color or set it as transparent?Forum: Plugins
In reply to: [Estatik Real Estate Plugin] How to customize PDF templateHow to change the background color of QR code image?
(the default is #C4C4C4)I’ve changed this line:987 in \estatik\libraries\phpqrcode\phpqrcode.php
$col[0] = ImageColorAllocate($base_image,196,196,196);
as the last 3 parameters stands for R,G,B values
And it works, but I’ll lost this at next update of Estatik,
Is it possible to apply a filter to save my customization?