Skip to content

Instantly share code, notes, and snippets.

@kaskad88
Last active October 1, 2018 15:02
Show Gist options
  • Save kaskad88/2ab02fddc1e1a3a4e7d023acfb89a086 to your computer and use it in GitHub Desktop.
Save kaskad88/2ab02fddc1e1a3a4e7d023acfb89a086 to your computer and use it in GitHub Desktop.
Cherry post formats api
add_filter( 'shortcode_atts_gallery', '__tm_modify_shortcode_atts_gallery', 10, 4 );
function __tm_modify_shortcode_atts_gallery ( $out, $pairs, $atts, $shortcode ) {
$cherry_post_formats_api_args = __prifix_theme()->get_core()->modules['cherry-post-formats-api']->args;
if ( $cherry_post_formats_api_args['rewrite_default_gallery'] ) {
$out['link'] = $cherry_post_formats_api_args['gallery_args']['link'];
}
return $out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment