Publisher Theme Compatibility + Fix issue
-
Hi
we received a ticket about incompatibility of your plugin with our Publisher theme.https://themeforest.net/item/publisher-magazine-blog-newspaper-and-review-wordpress-theme/15801051
https://community.betterstudio.com/supports/ticket/featured-images-from-urls-arent-showing/
As i checked your plugin have not any filter for “wp_get_attachment_image_src” function and out theme is using it to get thumbnail details. Please add following code into into your plugin to make it compatible with our themes ( and third-party themes and plugins).
`add_filter( ‘wp_get_attachment_image_src’, ‘fifu_replace_attachment_image_src’, 10, 2 );
if ( ! function_exists( ‘fifu_replace_attachment_image_src’ ) ) {
/**
* Replaced attachment src with external thumbnail URL
*
* @hooked wp_get_attachment_image_src
*
* @param $image
* @param $attachment_id
*
* @return array
*/
function fifu_replace_attachment_image_src( $image, $attachment_id ) {if ( $attachment_id == get_post_thumbnail_id( get_the_ID() ) ) {
$src = get_post_meta( get_the_ID(), ‘fifu_image_url’, TRUE );
if ( $src ) {
return array(
$src,
0,
0,
FALSE
);
}
}return $image;
}
}
`Thanks for your efforts and good works.
- The topic ‘Publisher Theme Compatibility + Fix issue’ is closed to new replies.