Created
July 24, 2017 17:43
-
-
Save kraftbj/048f21c4f921561eb68764db5a2c8def to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, it's incredible that there is not an option in Jetpack...