gform_is_valid_url

gform_is_valid_url

DescriptionUsageParametersExamplesPlacementSource Code

Description
Filters the result of URL validations, allowing for custom validation to be performed.
Usage
add_filter( 'gform_is_valid_url', 'custom_validation', 10, 2 );

Parameters

$is_valid bool
True if valid. False otherwise.

$url string
The URL being validated.

Examples
add_filter( 'gform_is_valid_url', 'custom_validation', 10, 2 );

function custom_validation( $is_valid, $url ) {
// Do something here.
return $is_valid;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in common.php.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註