Skip to content

Instantly share code, notes, and snippets.

@giucu91
Last active January 14, 2020 08:18
Show Gist options
  • Save giucu91/fce8327f580ea0ed734cff42b3823ebe to your computer and use it in GitHub Desktop.
Save giucu91/fce8327f580ea0ed734cff42b3823ebe to your computer and use it in GitHub Desktop.
[Modula] - Remove captions from lightbox
<?php
add_filter( 'modula_shortcode_item_data', 'photoguy_link_title', 99, 3 );
function photoguy_link_title( $item_data, $item, $settings ){
if( isset( $item_data['link_attributes']['title'] ) ){
unset( $item_data['link_attributes']['title'] );
}
if( isset( $item_data['link_attributes']['data-sub-html'] ) ){
unset( $item_data['link_attributes']['data-sub-html'] );
}
if( isset( $item_data['link_attributes']['data-title'] ) ){
unset( $item_data['link_attributes']['data-title'] );
}
return $item_data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment