| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
use EBS\Security\Sanitizer; |
| 6 |
|
| 7 |
/* * ********************************************************* |
| 8 |
* BUTTONS |
| 9 |
* ********************************************************* */ |
| 10 |
|
| 11 |
function osc_theme_image( $params, $content = 'Label' ) { |
| 12 |
$atts = shortcode_atts( |
| 13 |
array( |
| 14 |
'src' => '', |
| 15 |
'class' => '', |
| 16 |
'shape' => '', |
| 17 |
), |
| 18 |
$params |
| 19 |
); |
| 20 |
|
| 21 |
$src = Sanitizer::url( $atts['src'] ); |
| 22 |
$class = Sanitizer::class_list( $atts['class'] ); |
| 23 |
$shape = Sanitizer::class_list( $atts['shape'] ); |
| 24 |
|
| 25 |
$out = '<img src="' . $src . '" class="' . $class . ' ' . $shape . EBS_CONTAINER_CLASS . '">'; |
| 26 |
|
| 27 |
return $out; |
| 28 |
} |
| 29 |
|
| 30 |
ebs_backward_compatibility_callback( 'image', 'osc_theme_image' ); |
| 31 |
|