Add a filter for programmatically modifying featured image captions in Newspaper

Posted in: Newspaper
Post count: 144

To increase flexibility and make the Newspaper theme more extendable for all developers, please consider adding a filter in tdb_state_single.php around line 401, where it currently says:

return $featured_image_array;

If you replace it with:

$featured_image_array = apply_filters( 'tdb_post_featured_image_data', $featured_image_array, $atts, $shortcode ); 

return $featured_image_array;

developers could programmatically modify $featured_image_array for instance, to append custom fields to the image caption—without editing core theme files. This would greatly enhance the theme’s extensibility and maintain a more future-proof solution for any developer enhancements.

Would you be able to have this incorporated in the next release?

  • This topic was modified 1 year by nearview. Reason: Formatting
Post count: 21065

Hello!

I’ll let our developers know about this.

Thank you!

Post count: 364

I’ve actually been looking for exactly this! It would make things so much easier to hook into the featured image caption without touching theme files. Really hope this gets added soon.

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.