Closed r-brown closed 5 years ago
I can take a look into this.
Hi @Jaace - absolutely, thank you for your support!
Hi there @r-brown , i made a dirty solution for this issue. Principally i just copied the the code that generates a gallery from WP (media.php), modified some lines in that and put it into credit-tracker-shortcodes.php
Why so? Of course i could just filter the HTML which is returned from WP, but then i should implement a search and replace function with regular expressions in order to find the figcaption tag for each image and then replace their content with the proper authors. But regular expressions would cost too much resources.
Please tell me if you are interested in the solution.
Hi @idea--list ,
Thank you for your contribution. Sure, we are interested in the improvement you've made. Please share this with us. If we decide to not include this in a standard plugin delivery (due to the WordPress upgrade process stability), we can create a Wiki page with this troubleshooting.
Best, r-brown
How to create gallery: https://codex.wordpress.org/The_WordPress_Gallery
Tested using below post/page content:
<strong>Credit Tracker table</strong>
[credit_tracker_table]
<strong>Credit Tracker at WP Gallery</strong>
[gallery link="none" size="large" ids="8,7,5"]
Result
Docu / Wiki / etc. is outstanding
When I create a Gallery collection of images using the WordPress "Add Media" function, the Credit Tracker information is not outputted via the image caption.
Is this expected behavior and, if so, is there a function/filter which could add the Credit Tracker metadata to captions of Gallery images?
Source: https://wordpress.org/support/topic/credit-metadata-on-gallery-captions