Comments for Jetpack Developer Resources https://developer.jetpack.com Wed, 04 Mar 2026 09:04:39 +0000 hourly 1 http://wordpress.com/ Comment on jetpack_blaze_enabled by Osk https://developer.jetpack.com/hooks/jetpack_blaze_enabled/comment-page-1/#comment-29642 Fri, 13 Oct 2023 13:20:34 +0000 http://developer.jetpack.com/hooks/jetpack_blaze_enabled/#comment-29642 In reply to gabeshepherd.

You can check this page to understand where to add snippets:

How to use actions and filters to customize Jetpack?

]]>
Comment on jetpack_blaze_enabled by gabeshepherd https://developer.jetpack.com/hooks/jetpack_blaze_enabled/comment-page-1/#comment-29561 Tue, 01 Aug 2023 19:19:27 +0000 http://developer.jetpack.com/hooks/jetpack_blaze_enabled/#comment-29561 In which file do you add the snippet?

]]>
Comment on jetpack_search_allowed_taxonomies_for_widget_filters by Derek Smart https://developer.jetpack.com/hooks/jetpack_search_allowed_taxonomies_for_widget_filters/comment-page-1/#comment-29253 Tue, 29 Nov 2022 15:04:18 +0000 http://developer.jetpack.com/hooks/jetpack_search_allowed_taxonomies_for_widget_filters/#comment-29253 Example usage:

add_filter( 'jetpack_search_allowed_taxonomies_for_widget_filters', function( $taxonomies ) {
    $custom_taxonomies = array(
        'custom-taxonomy-slug',
        'custom-taxonomy-slug-2',
        // ... and so on
    );
    return array_merge( $custom_taxonomies, $taxonomies );
} );
]]>
Comment on jetpack_copy_post_post_types by Jeremy Herve https://developer.jetpack.com/hooks/jetpack_copy_post_post_types/comment-page-1/#comment-27650 Wed, 02 Feb 2022 08:54:43 +0000 http://developer.jetpack.com/hooks/jetpack_copy_post_post_types/#comment-27650 In reply to Henry.

Instead of passing an array of post types, you would want to add each element of your array (i.e. each new post type slug) to the existing array that’s exposed by the filter. I hope this clarifies things a bit.

]]>
Comment on jetpack_copy_post_post_types by Henry https://developer.jetpack.com/hooks/jetpack_copy_post_post_types/comment-page-1/#comment-27648 Tue, 01 Feb 2022 19:44:12 +0000 http://developer.jetpack.com/hooks/jetpack_copy_post_post_types/#comment-27648 Hello, can I pass an array of post types?

]]>
Comment on jetpack_photon_skip_image by Gwyneth Llewelyn https://developer.jetpack.com/hooks/jetpack_photon_skip_image/comment-page-1/#comment-27146 Thu, 22 Apr 2021 02:34:10 +0000 http://developer.jetpack.me/hooks/jetpack_photon_skip_image/#comment-27146 Site accelerator (“Photon”), as well as WordPress itself, doesn’t like SVG. Thankfully, a few plugins on the library allow sanitised SVG to be uploaded and used as any other image file format. The trouble is that Photon gets quite confused with SVG… here is an attempt to get it to ignore any URL ending with .svg:


function photon_skip_svg ( $val, $src, $tag ) {
    $img_file = parse_url($src, PHP_URL_PATH); // returns false if unparseable
    
    // if it ends with 'svg', let Photon ignore it
    if ( $img_file !== false && strripos( $img_file, ".svg", strlen( $img_file ) - 4 ) !== false ) { 
        return true;
    }

    return $val;
}
add_filter( 'jetpack_photon_skip_image', 'photon_skip_svg', 10, 3 );

It sort of works for me with new SVGs; already existing ones might require some cache purging…

]]>
Comment on jetpack_get_available_modules by Viktor Szépe https://developer.jetpack.com/hooks/jetpack_get_available_modules/comment-page-1/#comment-27052 Tue, 16 Mar 2021 05:28:32 +0000 http://developer.jetpack.me/hooks/jetpack_get_available_modules/#comment-27052 // Enable only Jetpack Search add_filter( 'jetpack_get_available_modules', static function ($modules) { return array_intersect_key($modules, ['search' => true]); }, 10, 1 ); ]]> Comment on jetpack_honor_dnt_header_for_stats by Dat Hoang https://developer.jetpack.com/hooks/jetpack_honor_dnt_header_for_stats/comment-page-1/#comment-26904 Mon, 07 Dec 2020 08:23:16 +0000 http://developer.jetpack.com/hooks/jetpack_honor_dnt_header_for_stats/#comment-26904 </a>. Hello, please contact us <a href="https://jetpack.com/contact-support/" rel="nofollow ugc">via this contact form</a> if you have a Jetpack paid plan for your site. Otherwise, you can also ask for help in <a href="https://wordpress.org/support/plugin/jetpack/" rel="nofollow ugc">the community forum</a>.]]> In reply to timelessbymelissatatiana ♥️.

Hello, please contact us via this contact form if you have a Jetpack paid plan for your site. Otherwise, you can also ask for help in the community forum.

]]>
Comment on jetpack_honor_dnt_header_for_stats by timelessbymelissatatiana ♥️ https://developer.jetpack.com/hooks/jetpack_honor_dnt_header_for_stats/comment-page-1/#comment-26901 Sat, 05 Dec 2020 19:11:18 +0000 http://developer.jetpack.com/hooks/jetpack_honor_dnt_header_for_stats/#comment-26901 I can’t see my stats

]]>
Comment on jetpack_relatedposts_filter_thumbnail_size by Dat Hoang https://developer.jetpack.com/hooks/jetpack_relatedposts_filter_thumbnail_size/comment-page-1/#comment-26876 Fri, 27 Nov 2020 10:42:17 +0000 http://developer.jetpack.me/2015/10/25/jetpack_relatedposts_filter_thumbnail_size/#comment-26876 In reply to claudi79.

Hi Claudia,

You do not need to wait. However, make sure that you purge your site cache after adding this snippet in your theme’s functions.php. If that still does not work, we suggest giving it a try with Code Snippets plugin.

In case, the issue is still there, please contact us via our Contact Support page (if you have a paid Jetpack subscription) or the community forum.

]]>