- Timestamp:
- 06/17/2024 08:08:23 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contact-form-7/trunk/includes/config-validator/validator.php
r2972540 r3103414 71 71 * Constructor. 72 72 */ 73 public function __construct( WPCF7_ContactForm $contact_form, $ args = '' ) {74 $ args = wp_parse_args( $args, array(73 public function __construct( WPCF7_ContactForm $contact_form, $s = '' ) { 74 $s, array( 75 75 'include' => null, 76 76 'exclude' => null, … … 79 79 $this->contact_form = $contact_form; 80 80 81 if ( isset( $ args['include'] ) ) {82 $this->include = (array) $ args['include'];83 } 84 85 if ( isset( $ args['exclude'] ) ) {86 $this->exclude = (array) $ args['exclude'];81 if ( isset( $s['include'] ) ) { 82 $this->include = (array) $s['include']; 83 } 84 85 if ( isset( $s['exclude'] ) ) { 86 $this->exclude = (array) $s['exclude']; 87 87 } 88 88 } … … 126 126 * Counts detected errors. 127 127 */ 128 public function count_errors( $ args = '' ) {129 $ args = wp_parse_args( $args, array(128 public function count_errors( $s = '' ) { 129 $s, array( 130 130 'section' => '', 131 131 'code' => '', … … 139 139 } 140 140 141 if ( $ args['section']142 and $key !== $ args['section']143 and preg_replace( '/\..*$/', '', $key, 1 ) !== $ args['section'] ) {141 if ( $s['section'] 142 and $key !== $s['section'] 143 and preg_replace( '/\..*$/', '', $key, 1 ) !== $s['section'] ) { 144 144 continue; 145 145 } … … 150 150 } 151 151 152 if ( $ args['code'] and $error['code'] !== $args['code'] ) {152 if ( $s['code'] ) { 153 153 continue; 154 154 }
Note: See TracChangeset
for help on using the changeset viewer.