Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Last active April 16, 2020 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/0e28a3196b8c3e1db3a5b18a12759282 to your computer and use it in GitHub Desktop.
Save jesseeproductions/0e28a3196b8c3e1db3a5b18a12759282 to your computer and use it in GitHub Desktop.
Use Full Image Size in Print View
/**
* 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