• Resolved Rodrigo

    (@rghedin)


    After installed, this plugin adds a ton of inline CSS on header, in a style tag with the ID activitypub-followers-style-inline-css.

    I don’t even use blocks. What do I need to declare on functions.php to avoid ActivityPub plugin to load those inline CSS?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    If you do not use the blocks on your site, you can disable them with this code snippet:

    add_filter( 'activitypub_site_supports_blocks', '__return_false' );

    @jeherve unfortunately that’s not working for me.

    Activityhub puts CSS with ids “activitypub-followers-style-inline-css” and “activitypub-follow-me-style-inline-css” into the header and I can’t see how to disable them.

    Thread Starter Rodrigo

    (@rghedin)

    @megabulk2, this code removes those inline CSS:

    function remove_wp_block_library_css(){
      wp_dequeue_style( 'activitypub-followers-style' );
      wp_dequeue_style( 'activitypub-follow-me-style' );
    } 
    add_action( 'wp_print_styles', 'remove_wp_block_library_css', 100 );

    Unfortunately, ActivityPub still calls an extra, useless file, /wp-includes/css/dist/components/style.min.css.

    We’re trying to fix this issue on GitHub.

    @rghedin perfect, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove inline CSS added to header’ is closed to new replies.