PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | admin/views/sp-framework/fields/upload/upload.php +7 -19 2.3.62.2.10 View file →
@@ -8,25 +8,13 @@
8 8 * @version 1.0.0
9 9 */
10 10 if ( ! class_exists( 'SP_PC_Fields_upload' ) ) {
11 11 class SP_PC_Fields_upload extends SP_PC_Fields {
12 - /**
13 - * Class constructor.
14 - *
15 - * @param [type] $field
16 - * @param string $value
17 - * @param string $unique
18 - * @param string $where
19 - * @param string $parent
20 - */
12 +
21 13 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
22 14 parent::__construct( $field, $value, $unique, $where, $parent );
23 15 }
24 - /**
25 - * The render method.
26 - *
27 - * @return void
28 - */
16 +
29 17 public function render() {
30 18
31 19 $args = wp_parse_args(
32 20 $this->field,
@@ -36,9 +24,9 @@
36 24 'remove_title' => esc_html__( 'Remove', 'smart-post-show' ),
37 25 )
38 26 );
39 27
40 - echo wp_kses_post( $this->field_before() );
28 + echo $this->field_before();
41 29
42 30 $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] );
43 31 $library = ( ! empty( $library ) ) ? implode( ',', $library ) : '';
44 32 $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
@@ -43,14 +31,14 @@
43 31 $library = ( ! empty( $library ) ) ? implode( ',', $library ) : '';
44 32 $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
45 33
46 34 echo '<div class="spf--wrap">';
47 - echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . wp_kses_post( $this->field_attributes() ) . '/>';
48 - echo '<a href="#" class="button button-primary spf--button" data-library="' . esc_attr( $library ) . '">' . esc_html( $args['button_title'] ) . '</a>';
49 - echo '<a href="#" class="button button-secondary spf-warning-primary spf--remove' . esc_attr( $hidden ) . '">' . esc_html( $args['remove_title'] ) . '</a>';
35 + echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . '/>';
36 + echo '<a href="#" class="button button-primary spf--button" data-library="' . esc_attr( $library ) . '">' . $args['button_title'] . '</a>';
37 + echo '<a href="#" class="button button-secondary spf-warning-primary spf--remove' . $hidden . '">' . $args['remove_title'] . '</a>';
50 38 echo '</div>';
51 39
52 - echo wp_kses_post( $this->field_after() );
40 + echo $this->field_after();
53 41
54 42 }
55 43 }
56 44 }