Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/contact-.../includes/swv
File: schema-holder.php
<?php
[0] Fix | Delete
[1] Fix | Delete
trait WPCF7_SWV_SchemaHolder {
[2] Fix | Delete
[3] Fix | Delete
protected $schema;
[4] Fix | Delete
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Retrieves SWV schema for this holder object (contact form).
[8] Fix | Delete
*
[9] Fix | Delete
* @return WPCF7_SWV_Schema The schema object.
[10] Fix | Delete
*/
[11] Fix | Delete
public function get_schema() {
[12] Fix | Delete
if ( isset( $this->schema ) ) {
[13] Fix | Delete
return $this->schema;
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
$schema = new WPCF7_SWV_Schema( array(
[17] Fix | Delete
'locale' => isset( $this->locale ) ? $this->locale : '',
[18] Fix | Delete
) );
[19] Fix | Delete
[20] Fix | Delete
do_action( 'wpcf7_swv_create_schema', $schema, $this );
[21] Fix | Delete
[22] Fix | Delete
return $this->schema = $schema;
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Validates form inputs based on the schema and given context.
[28] Fix | Delete
*/
[29] Fix | Delete
public function validate_schema( $context, WPCF7_Validation $validity ) {
[30] Fix | Delete
$schema = $this->get_schema();
[31] Fix | Delete
[32] Fix | Delete
foreach ( $schema->validate( $context ) as $result ) {
[33] Fix | Delete
if ( is_wp_error( $result ) ) {
[34] Fix | Delete
$rule = $result->get_error_data();
[35] Fix | Delete
$field = $rule->get_property( 'field' );
[36] Fix | Delete
[37] Fix | Delete
if ( isset( $field ) and $validity->is_valid( $field ) ) {
[38] Fix | Delete
$validity->invalidate( $field, $result );
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
}
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function