Plugin Directory

Timestamp:
06/17/2024 08:08:23 AM (6 weeks ago)
Author:
takayukister
Message:

Merge changes on GitHub https://github.com/rocklobster-in/contact-form-7/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7/trunk/includes/config-validator/validator.php

    r2972540 r3103414  
    7171     * Constructor.
    7272     */
    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(
    7575            'include' => null,
    7676            'exclude' => null,
     
    7979        $this->contact_form = $contact_form;
    8080
    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'];
    8787        }
    8888    }
     
    126126     * Counts detected errors.
    127127     */
    128     public function count_errors( $args = '' ) {
    129         $args = wp_parse_args( $args, array(
     128    public function count_errors( $s = '' ) {
     129        $s, array(
    130130            'section' => '',
    131131            'code' => '',
     
    139139            }
    140140
    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'] ) {
    144144                continue;
    145145            }
     
    150150                }
    151151
    152                 if ( $args['code'] and $error['code'] !== $args['code'] ) {
     152                if ( $s['code'] ) {
    153153                    continue;
    154154                }
Note: See TracChangeset for help on using the changeset viewer.