Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Tweak Jetpack Carousel
- Plugin URI: http://mikelittle.org/
- Description: Remove the title and description from the JetPack Carousel overlay
- Author: Mike Little
- Version: 0.1
- Author URI: http://mikelittle.org/
- License: GPL V2+
- */
- add_filter( 'jp_carousel_add_data_to_images', 'z1_no_carousel_data', 10, 2 );
- function z1_no_carousel_data( $html, $attachment_id ) {
- $html = preg_replace( '/data-image-title="[^"]*"/', '', $html);
- $html = preg_replace( '/data-image-description="[^"]*"/', '', $html);
- $html = preg_replace( '/data-comments-opened="[^"]*"/', '', $html);
- return $html;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement