Last active
December 10, 2020 11:01
-
-
Save NilsDannemann/4689d01ed5fcac1bac4279bde746c7fe to your computer and use it in GitHub Desktop.
PHP - Shortcode - JetEngine no Image Fallback
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 | |
/** | |
* | |
* Shortcode: JetEngine no image fallback | |
* | |
*/ | |
function jetengine_img_handler( $atts, $content = null ) { | |
extract(shortcode_atts(array( | |
'src' => '' | |
), $atts)); | |
if ($src) { | |
return '<img src="'.$src.'">'; | |
} | |
} | |
add_shortcode( 'jetengine_img', 'jetengine_img_handler' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment