Terence Eden
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] Dummy CSS still appearing – v7.5.0.1That works perfectly! Thank you so much. Brilliant plugin and a brilliant team!
Forum: Plugins
In reply to: [LiteSpeed Cache] Dummy CSS still appearing – v7.5.0.1I think this is a bug in your regex then.
HTML attributes are allowed to be unquoted – see the spec at https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
So in https://github.com/litespeedtech/lscache_wp/blob/master/src/optimize.cls.php
You need to update the regex from:
const DUMMY_CSS_REGEX = "#<link rel=['\"]stylesheet['\"] id=['\"]litespeed-cache-dummy-css['\"] href=['\"].+assets/css/litespeed-dummy\.css[?\w.=-]*['\"][ \w='\"/]*>#isU";To
const DUMMY_CSS_REGEX = "#<link rel=['\"]?stylesheet['\"]? id=['\"]?litespeed-cache-dummy-css['\"]? href=['\"]?.+assets/css/litespeed-dummy\.css[?\w.=-]*['\"]?[ \w='\"/]*>#isU";Or, even better, just remove the line which has the ID of
litespeed-cache-dummy-css– that will prevent it from being confused by plugins which alter the order of attribute values.Forum: Plugins
In reply to: [LiteSpeed Cache] Dummy CSS still appearing – v7.5.0.1Here’s the log. https://pastebin.ubuntu.com/p/T23H4hy3yF/
Forum: Plugins
In reply to: [Antispam Bee] Honeypot and use with comment_form()?Got it! I can’t change that – my theme strips out quotes.
But I can change your regex to make the quotes optional. I did that and it works.
Want me to send a Pull Request?
Forum: Plugins
In reply to: [Antispam Bee] Honeypot and use with comment_form()?The code is at https://gitlab.com/edent/blog-theme/-/blob/master/comments.php
I hadn’t checked that box. I’ll do so now. Thanks!
Forum: Plugins
In reply to: [LiteSpeed Cache] Cannot modify header information – headers already sentLooking at the cron jobs, it might be caused by the official Automattic ActivityPub plugin – https://github.com/Automattic/wordpress-activitypub/
I’ll check with them. But, in the meantime, could you use https://www.php.net/manual/en/function.headers-sent.php to check before throwing an error?
Forum: Fixing WordPress
In reply to: Missing MIME type using atom_enclosure()Raised a bug and PR at https://core.trac.ww.wp.xz.cn/ticket/63292
I’ve solved the problem by uninstalling JetPack.
Due to Matt Mullenweg’s recent behaviour, I simply can’t trust my data and my site to someone who makes capricious decisions without regard to the WordPress community.
I’m sad that I can’t continue using JetPack. But Matt Mullenweg has destroyed my faith in JetPack and WordPress.
Hi @bizanimesh – I have disabled the JetPack plugin due to Matt Mullenweg’s recent behaviour. I simply can’t trust my data and my site to someone who makes capricious decisions without regard to the WordPress community.
I’m sad that I can’t continue using JetPack to send my subscribers new posts. But Matt Mullenweg has destroyed my faith in JetPack and WordPress.
Sadly, this doesn’t work.
add_filter( 'jetpack_tools_to_include', '__return_empty_array' );If I *just* have that in my functions.php, it loads up all sort of irrelevant JP stuff like jetpack_videopress_flash_embed_filter and jetpack_spotify_embed_ids
The only thing I need from JetPack is stats. So I’ve ended up with this unwieldy monster function:
add_action('init', function() {
if ( class_exists( 'Jetpack_Simple_Payments' ) ) {
remove_filter(
'the_content',
[Jetpack_Simple_Payments::get_instance(), 'remove_auto_paragraph_from_product_description'],
0
);
}
remove_filter( 'the_content', 'jetpack_videopress_flash_embed_filter', 7 );
remove_filter( 'the_content', 'jetpack_spotify_embed_ids', 7 );
remove_filter( 'the_content', 'jetpack_fix_youtube_shortcode_display_filter', 7 );
remove_filter( 'the_content', 'convert_smilies', 20 );
foreach ( array( 'the_content', 'the_title', 'wp_title', 'document_title' ) as $filter ) {
remove_filter( $filter, 'capital_P_dangit', 11 );
}
remove_filter( 'comment_text', 'capital_P_dangit', 31 ); // No idea why this is separate
remove_filter( 'the_content', 'do_blocks', 9 );
if ( \function_exists( 'crowdsignal_link' ) ) {
\remove_filter( 'the_content', 'crowdsignal_link', 1 );
}
// Remove Open Graph
add_filter( "jetpack_enable_open_graph", "__return_false" );
// Remove JetPack CSS
// https://css-tricks.com/snippets/wordpress/removing-jetpack-css/
add_filter( 'jetpack_sharing_counts', '__return_false', 99 );
add_filter( 'jetpack_implode_frontend_css', '__return_false', 99 );
// Remove the forced Blaze
// https://developer.jetpack.com/hooks/jetpack_blaze_enabled/
add_filter( 'jetpack_blaze_enabled', '__return_false' );
add_filter( 'jetpack_tools_to_include', '__return_empty_array' );
}, 11);
// Remove Sharing Icons
// https://jetpack.com/2013/06/10/moving-sharing-icons/
function jptweak_remove_share() {
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
if ( class_exists( 'Jetpack_Likes' ) ) {
remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
}
}
add_action( 'loop_start', 'jptweak_remove_share' );Like, this is clearly bonkers, right? I want one function from your plugin. There’s no sensible way to disable all the other extraneous stuff.
I do appreciate all the work you do. But JetPack just doesn’t work for me any more. I want something modular rather than running dozens of irrelevant functions.
It seems to work in my tests. Can you tell me more about what you tried, and how you’re still experiencing issues?
I’ve added this code to functions.php
add_filter( 'jetpack_tools_to_include', function( $tools ) {
var_dump($tools);die();
$index = array_search( 'geo-location.php', $tools, true );
if ( $index ) {
unset( $tools[$index] );
}
return $tools;
} );I’m then looping through
$wp_filter["the_content"]->callbacksas per https://shkspr.mobi/blog/2024/08/wordpress-display-hook-action-priority-in-the-dashboard/Doing so would add hundreds of toggles
I think you misunderstand me. There are already toggles like this for all sorts of JetPack options:

If I’ve turned off something, there shouldn’t be any filter loaded.
For example, I don’t have Monetize switched on – but the filter is still active. You say it doesn’t have a noticeable impact – but that could change in the future. I want JetPack to respect my choices.
Additionally, I can’t find a setting for Geotagged posts. Again, I don’t want something loaded if I’m not using it. These things shouldn’t be forced onto users; we should have a choice.
- This reply was modified 1 year, 8 months ago by Terence Eden.
Thanks @jeherve – sadly the
jetpack_tools_to_includefilter doesn’t seem to be firing. But it gives me something to look for.Could I please encourage you to make these switches visible in the JetPack UI? I don’t think it is fair to ask users to add custom functions to toggle this functionality. If someone hasn’t switched on Payments, for example, there’s no need to load it up by default.
@kittmedia Thanks! That appears to work. The only one I can’t get removed now is
Jetpack_Geo_Location::the_content_microformatThe rest I’ve destroyed with
remove_filter(
'the_content',
[Jetpack_Simple_Payments::get_instance(), 'remove_auto_paragraph_from_product_description'],
0
);
remove_filter( 'the_content', 'jetpack_videopress_flash_embed_filter', 7 );
remove_filter( 'the_content', 'jetpack_spotify_embed_ids', 7 );
remove_filter( 'the_content', 'jetpack_fix_youtube_shortcode_display_filter', 7 );It’s https://shkspr.mobi/blog/
Thanks
Jetpack Version 13.6 – which I believe is the latest.
WordPress Version 6.6.1
PHP Version 8.3.9