Created
September 18, 2018 10:40
-
-
Save MjHead/9abdeb35d798f459ce257f4cd9745340 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
add_filter( 'jet-engine/listings/allowed-callbacks', 'jet_add_attachment_callback', 10, 2 ); | |
function jet_add_attachment_callback( $callbacks ) { | |
$callbacks['jet_get_attachment_file'] = 'Get attachment file by ID'; | |
return $callbacks; | |
} | |
function jet_get_attachment_file( $attachment_id ) { | |
return wp_get_attachment_url( $attachment_id ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment