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