filter

jetpack_shortcodes_to_include

This filter allows other plugins to override which shortcodes Jetpack loads. Fires as part of the `after_setup_theme` WP hook, so modifying code needs to be in a plugin, not in a theme’s functions.php.

Parameters

$shortcode_includes
array

An array of which shortcodes to include.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

You can use this filter to edit the list of shortcodes available when the Shortcode Embeds module is enabled. In the example below, we’ll remove the Slideshow shortcode from the list of available shortcodes:
// Remove the slideshow shortcode.
add_filter( 'jetpack_shortcodes_to_include', function ( $shortcodes ) {
	$shortcodes_to_remove = array( 'slideshow' );

	foreach ( $shortcodes as $key => $shortcode_path ) {
		if ( in_array( $key, $shortcodes_to_remove, true ) ) {
			unset( $shortcodes[ $key ] );
		}
	}

	return $shortcodes;
} );