imrelaszlo
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] Force use English language on admin interfaceOkay.
I think a new setting like “Use English in admin interface” would be a good feature.
Here is the solution if someone needs it:
add_filter('override_load_textdomain', function ($override, $domain) {
if ('litespeed-cache' === $domain):
return true;
endif;
return $override;
}, 99, 2);
add_filter('plugin_locale', function ($locale, $domain) {
if ('litespeed-cache' === $domain):
return 'en_US';
endif;
return $locale;
}, 99, 2);Here is my final code in case anyone needs it:
function mx_additional_webp_replacement($content) { $matches = []; $lsmedia = \LiteSpeed\Core::cls('Media'); $webp_ok = (defined('LITESPEED_GUEST_OPTM') || $lsmedia->conf(\LiteSpeed\Base::O_IMG_OPTM_WEBP)) && $lsmedia->webp_support(); if ($webp_ok && preg_match_all("/background-image: url\('(https?:\/\/[^\/]+)?(\/[\w\-\/\.jpg]+)'\)/", $content, $matches, PREG_PATTERN_ORDER)) { if (isset($matches[2]) && is_array($matches[2])): foreach ($matches[2] as $image): if (!empty($image) && file_exists(ABSPATH . $image) && file_exists(ABSPATH . ($webp = str_replace(".jpg", ".jpg.webp", $image)))): $content = str_replace($image, $webp, $content); endif; endforeach; endif; } return $content; } add_filter('litespeed_buffer_after', 'mx_additional_webp_replacement', 99, 1);
Hello! Here is the output: https://pastes.io/inceltmjge
The portal-motor replaces the HTML encoded characters.
The problem is here:
url('https
In the real code, it is (without spaces):
u r l ( & # 0 3 9 ; h t t p s
Dear qtwrk!
Thank you for help me. The problem: the apostrophes aound the URL are HTML entities (numerical entities) in the server gererated source code. Please check it in the code sent by the server, not in the browser’s inspect window. I cannot modify the pattern to include this entities (I’ve testing with https://regex101.com/ website).
Hello! In the media manager, there is a webp wersion. Azd, of course, if I extend the URL fith “.webp”, the image file is there.
Website URL: https://www.vitalforce.hu/
Relevant code:
<div class="swiper-slide" data-swiper-slide-index="0" style="width: 980px; transition-duration: 0ms; opacity: 1; transform: translate3d(-980px, 0px, 0px);"> <a > <div class="elementor-carousel-image" role="img" aria-label="Futópad, futópadok" style="background-image: url('https://www.vitalforce.hu/www-uploads/2022/07/1-vitalforce-slider-2022-980x400-futopadok.jpg')"> </div> </a> </div>
Hello qtwrk! The images in Elementor’s carousel plugin are CSS background images. They are not replaced. Can I call the replacement function outside of the plugin? I can write a code for my website if calling replacement functions are accessible and public from the plugin.
Same problem here. With 1.3.2, the return value for get_current_user_id() is zero.
Forum: Plugins
In reply to: [JWT Authentication for WP REST API] Error 401 rest_not_logged_inSame problem here with CoCart / Expo. 1.3.0 works okay, but 1.3.1 and 1.3.2 not. The return value for get_current_user_id() is zero.
Forum: Plugins
In reply to: [SupportCandy - Helpdesk & Customer Support Ticket System] Secret KeyPlease read the release notes / changelog:
3.0.0 (July 29, 2022)
Warning: We discontinued the REST APIs for some time. However, it will be back soon with a new version.We also need the REST API, look at this thread:
https://www.ads-software.com/support/topic/rest-api-v3-2/
- This reply was modified 2 years, 1 month ago by imrelaszlo.
Forum: Plugins
In reply to: [SupportCandy - Helpdesk & Customer Support Ticket System] REST API v3I think the code was totally rewritten. This is good, because the old code was ugly in many places, to say the least. Certain elements of the REST API are already included in the code, but there is no documentation for it, and it is feared that this will change many times.
Dear developers, when can we expect even a beta state?
Hello! The same problem appeared here. Any resolution / bugfix?
- This reply was modified 3 years ago by imrelaszlo. Reason: mistypeing
@satollo many thanks! I have a Premium subscription, there would have been no problem if it was a paid product. I’ve checked the bounce plugin, but not the advanced import… I did not notice that it was suitable for the task. Thank you!