Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shortcode Placeholder Image dummyimage_shortcode_function
// Añadir Shortcode
function dummyimage_shortcode_function( $atts ) {
// Atributos
$atts = shortcode_atts(
array(
'width' => '600',
'height' => '300',
'background' => 'eeeeee',
'text' => 'ffffff',
),
$atts
);
return '<img src="https://dummyimage.com/'. $value['width'] . '/'. $value['height'] . '/'. $value['backgound'] . '/'. $value['text'] . '.jpg">';
}
add_shortcode( 'dummyimage', 'dummyimage_shortcode_function' );
add_shortcode( 'dummyimage', 'dummyimage_shortcode_function' );
// Añadir Shortcode
function dummyimage_shortcode_function( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'width' => '600',
'height' => '300',
'background' => 'eeeeee',
'text' => 'ffffff',
),
$atts
);
return '<img src="https://dummyimage.com/'. $value['width'] . '/'. $value['height'] . '/'. $value['backgound'] . '/'. $value['text'] . '.jpg">';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment