rebase on oct-10-2023
This commit is contained in:
@@ -19,8 +19,10 @@ function wpcf7_swv_available_rules() {
|
||||
'tel' => 'WPCF7_SWV_TelRule',
|
||||
'number' => 'WPCF7_SWV_NumberRule',
|
||||
'date' => 'WPCF7_SWV_DateRule',
|
||||
'time' => 'WPCF7_SWV_TimeRule',
|
||||
'file' => 'WPCF7_SWV_FileRule',
|
||||
'enum' => 'WPCF7_SWV_EnumRule',
|
||||
'dayofweek' => 'WPCF7_SWV_DayofweekRule',
|
||||
'minitems' => 'WPCF7_SWV_MinItemsRule',
|
||||
'maxitems' => 'WPCF7_SWV_MaxItemsRule',
|
||||
'minlength' => 'WPCF7_SWV_MinLengthRule',
|
||||
@@ -168,7 +170,13 @@ abstract class WPCF7_SWV_Rule {
|
||||
* @return array Array of properties.
|
||||
*/
|
||||
public function to_array() {
|
||||
return (array) $this->properties;
|
||||
$properties = (array) $this->properties;
|
||||
|
||||
if ( defined( 'static::rule_name' ) and static::rule_name ) {
|
||||
$properties = array( 'rule' => static::rule_name ) + $properties;
|
||||
}
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,7 +284,7 @@ abstract class WPCF7_SWV_CompositeRule extends WPCF7_SWV_Rule {
|
||||
*/
|
||||
class WPCF7_SWV_Schema extends WPCF7_SWV_CompositeRule {
|
||||
|
||||
const version = 'Contact Form 7 SWV Schema 2022-10';
|
||||
const version = 'Contact Form 7 SWV Schema 2023-07';
|
||||
|
||||
public function __construct( $properties = '' ) {
|
||||
$this->properties = wp_parse_args( $properties, array(
|
||||
|
||||
Reference in New Issue
Block a user