The filter is documented in public/class-media-credit-public.php
. In your filter function, you’d have to check for when to include the link and return true
in that case.
The code in functions.php
would look something like this:
function my_media_credit_link_filter( $include_links, $post_id, $post_thumbnail_id ) {
if (some condition) {
$include_links = true;
}
return $include_links;
}
add_filter( 'media_credit_post_thumbnail_include_links', 'my_media_credit_link_filter', 10, 3 );
However, if you are not a PHP developer yourself, I suggest you hire someone to the necessary adaptions for you. If you need custom markup, you could also use the media_credit_post_thumbnail
filter to completely replace the standard output or even manually integrate the media credits into the relevant templates via the public API.
-
This reply was modified 8 years ago by
pepe.