jumbo
Forum Replies Created
-
Forum: Plugins
In reply to: [Speculative Loading] Is there a filter to disable?@mwhiteley16 The
__return_nullversion of the filter I posted above works 100%. Just examine the HTML source code before and after the change and you’ll see it’s no longer being outputted.It removes the following “speculationrules” script tag (I prettied up the minified version) from above the closing body tag:
<script type="speculationrules">
{
"prefetch": [
{
"source": "document",
"where": {
"and": [
{
"href_matches": "/*"
},
{
"not": {
"href_matches": [
"/wp-*.php",
"/wp-admin/*",
"/wp-content/uploads/*",
"/wp-content/*",
"/wp-content/plugins/*",
"/wp-content/themes/mytheme/*",
"/*\\?(.+)"
]
}
},
{
"not": {
"selector_matches": "a[rel~=\"nofollow\"]"
}
},
{
"not": {
"selector_matches": ".no-prefetch, .no-prefetch a"
}
}
]
},
"eagerness": "conservative"
}
]
}
</script>Forum: Plugins
In reply to: [Speculative Loading] Is there a filter to disable?I now realize the filter was failing because
nullwas being passed as the argument inadd_filter()instead of__return_null.Here’s the working code that can be placed in
functions.phpor a must-use plugin to disable speculation loading site-wide:// Disable Speculative Loading via the Speculation Rules API (since WordPress v6.8).
add_filter( 'wp_speculation_rules_configuration', '__return_null' );Forum: Plugins
In reply to: [Speculative Loading] Is there a filter to disable?When I try the following (as suggested), it causes the entire footer source code to disappear.
add_filter( 'wp_speculation_rules_configuration', null );Great advice. You’re right, just excluding the common front-end URLs isn’t enough. I noticed several silent WooCommerce AJAX calls that access other URIs/URLs.
I’d have to do a lot of testing to make sure I’m not excluding something necessary. But now I have a blueprint of what to do and what to avoid.
Thanks @giuseForum: Plugins
In reply to: [WP Fastest Cache - WordPress Cache Plugin] Errors with “Other CDN Providers”I was trying to use a localhost URL:
https://cdn.testbed.testIt’s not accessible online. It’s mapped to
127.0.0.1via theHOSTSfile. It’s only for local development.Thanks.
Hi @m_uysl, it’s working great now. Thanks.
Hi @m_uysl), I just wanted to bump this and reiterate that the main “Minify HTML” setting doesn’t appear to work. I’m not referring to the “Optimize HTML via Dom Parser.” I’m just talking about “Minify HTML” alone.
I did a fresh WordPress install, installed Powered Cache, then enabled “Minify HTML,” then saved settings. That was the only change. Afterward, no page content is minified.
Powered Cache is the only active plugin.
H @m_uysl,
Note: I don’t know why this thread was marked as “NSFW” after I posted it.
Understood about the DOM minification option. I wasn’t planning on using that option. I just wanted to report it at the same time.
Putting that aside, I want to circle back to my original report of the base “Minify HTML” option alone not having any effect. (I have “Optimize HTML via Dom Parser” disabled in this case.)
When I compared the HTML source after enabling it that one option, it looked like it had no effect, but after closer inspection, the minification does have a minor effect that I only noticed when I did a line-by-line text comparison.
For instance, here’s a portion without minification enabled:
<!doctype html> <html lang="en-US"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" />And here’s where it looks like after powered cache minification is enabled:
<!doctype html><html lang="en-US"><head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'/> <meta property="og:locale" content="en_US"/> <meta property="og:type" content="website"/>Notice how it:
- didn’t remove most EOL (new end of line) characters
- didn’t remove any spaces at the beginning of lines
Yet it removed the space between the self-closing HTML tags
[space]/>to/>It seems like once it gets to a
/>It breaks the processing flow.
The self-closing tags above are minified throughout the page, mostly in
<img />to<img/>tags. The rest of the document is left untouched and unminified.That is until you get to the closing body and html tags, which gets minified:
Here’s the before, without minification:
</noscript> --> </body> </html>And here’s after minification enabled:
</noscript> --> </body></html>In the meantime, I’ve added in the “Minify HTML” plugin to minify output, which works well with Powered Cache, and doesn’t remove the
<!-- Cache served by Powered Cache -->string at the end, even though it has an option to remove all other HTML comments (which I’ve enabled).Thanks.
Thanks @m_uysl, I test the new version and it’s working great. All issues resolved.
Forum: Plugins
In reply to: [Safe Redirect Manager] Custom 410 template?Thanks @dkotter. This is great. I can work with that. Thanks again.
Hi @m_uysl
Everything is working great now. Thanks. I just left a review.
Apologies. Please delete this post. My support ticket is inaccurate.
Forum: Plugins
In reply to: [Cache Enabler] Cache directories not created since version 1.8.10Came to report the same thing. Upgrading from 1.8.9 to 1.8.10, cache directory and files no longer created. Downgraded to 1.8.9 and everything’s back to normal.
I’m testing on a Windows machine, which always worked fine pre-1.8.10.
Forum: Developing with WordPress
In reply to: Disabling Gutenberg Duotone Filter?The following trac comment seems to resolve the issue:
https://core.trac.ww.wp.xz.cn/ticket/54941#comment:6It removes the gutenberg inline style tags within the head tag, the SVG HTML footer code, and doesn’t mangle the admin area gutenberg editor styles and interface. So no need to mess with theme.json.
Forum: Developing with WordPress
In reply to: Disabling Gutenberg Duotone Filter?Here’s a github issue that touches upon the OP’s problem as well:
https://github.com/WordPress/gutenberg/issues/38299It works but it also ruines the gutenberg editing interface, making it totaly bugged.
That’s a definite downside. And trying to recreate the gutenberg styles within theme.json doesn’t seem possible without much trial and error.
It would be nice if there were some way to merge a limited theme.json with the core defaults, but that doesn’t appear possible either.
There doesn’t even appear to be a default, core theme.json file that could be referenced and used. Well, the new twenty-twenty-two theme has one, but its styles differ from the wordpress default.