Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Created July 24, 2017 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kraftbj/048f21c4f921561eb68764db5a2c8def to your computer and use it in GitHub Desktop.
Save kraftbj/048f21c4f921561eb68764db5a2c8def to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Jetpack - Disable Slideshow
Plugin URI: https://jetpack.com
Description: Disable Jetpack's slideshow feature
Author URI:
Version: 2017.07.24
License: GPL
*/
function bk_remove_jp_shortcode( $shortcodes ) {
$jetpack_shortcodes_dir = WP_CONTENT_DIR . '/plugins/jetpack/modules/shortcodes/';
$shortcodes_to_unload = array( 'slideshow.php' );
foreach ( $shortcodes_to_unload as $shortcode ) {
if ( $key = array_search( $jetpack_shortcodes_dir . $shortcode, $shortcodes ) ) {
unset( $shortcodes[$key] );
}
}
return $shortcodes;
}
add_filter( 'jetpack_shortcodes_to_include', 'bk_remove_jp_shortcode' );
@gordielachance
Copy link

Thanks, it's incredible that there is not an option in Jetpack...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment