| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * @since 3.0 |
| 8 | 5 | */ |
| @@ -15,10 +12,8 @@ | ||
| 15 | 12 | protected $holds_email_values = true; |
| 16 | 13 | |
| 17 | 14 | /** |
| 18 | 15 | * @param $type string |
| 19 | - * | |
| 20 | - * @return void | |
| 21 | 16 | */ |
| 22 | 17 | protected function set_type( $type ) { |
| 23 | 18 | if ( empty( $type ) ) { |
| 24 | 19 | $type = 'text'; |
| @@ -25,11 +20,8 @@ | ||
| 25 | 20 | } |
| 26 | 21 | parent::set_type( $type ); |
| 27 | 22 | } |
| 28 | 23 | |
| 29 | - /** | |
| 30 | - * @return void | |
| 31 | - */ | |
| 32 | 24 | public function show_on_form_builder( $name = '' ) { |
| 33 | 25 | $field = FrmFieldsHelper::setup_edit_vars( $this->field ); |
| 34 | 26 | |
| 35 | 27 | ob_start(); |
| @@ -38,17 +30,14 @@ | ||
| 38 | 30 | $input_html = ob_get_contents(); |
| 39 | 31 | ob_end_clean(); |
| 40 | 32 | |
| 41 | 33 | if ( empty( $input_html ) ) { |
| 42 | - echo $this->builder_text_field( $name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 34 | + echo $this->builder_text_field( $name ); // WPCS: XSS ok. | |
| 43 | 35 | } else { |
| 44 | - echo $input_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 36 | + echo $input_html; // WPCS: XSS ok. | |
| 45 | 37 | } |
| 46 | 38 | } |
| 47 | 39 | |
| 48 | - /** | |
| 49 | - * @return false|string | |
| 50 | - */ | |
| 51 | 40 | public function front_field_input( $args, $shortcode_atts ) { |
| 52 | 41 | $pass_args = array( |
| 53 | 42 | 'errors' => $args['errors'], |
| 54 | 43 | 'html_id' => $args['html_id'], |