Last active
April 16, 2020 11:52
-
-
Save jesseeproductions/0e28a3196b8c3e1db3a5b18a12759282 to your computer and use it in GitHub Desktop.
Use Full Image Size in Print View
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use Full Image Size in Print View | |
*/ | |
add_filter('cctor_print_image_url', 'cctor_use_full_for_print_coupon', 15 ); | |
function cctor_use_full_for_print_coupon( $coupon_id ) { | |
$couponimage_id = get_post_meta( get_the_id(), 'cctor_image', true ); | |
$couponimage = wp_get_attachment_image_src( $couponimage_id, 'full' ); | |
$couponimage = isset( $couponimage[0] ) ? $couponimage[0] : ''; | |
return wp_normalize_path( $couponimage ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment