Server IP : 104.21.14.103 / Your IP : 3.129.250.144 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/cwd/wp-content/plugins/wordpress-seo/inc/indexables/validators/ |
Upload File : |
<?php /** * WPSEO plugin file. * * @package WPSEO\Indexables */ /** * Class WPSEO_Keyword_Validator. */ class WPSEO_Keyword_Validator implements WPSEO_Endpoint_Validator { /** * Validates the keyword-related data. * * @param array $request_data The request data to validate. * * @throws WPSEO_Invalid_Argument_Exception Thrown if the keyword or the score is of an invalid value type. */ public function validate( $request_data ) { if ( WPSEO_Validator::key_exists( $request_data, 'keyword' ) && ! WPSEO_Validator::is_string( $request_data['keyword'] ) ) { throw WPSEO_Invalid_Argument_Exception::invalid_string_parameter( $request_data['keyword'], 'keyword' ); } if ( WPSEO_Validator::key_exists( $request_data, 'score' ) && ! WPSEO_Validator::is_integer( $request_data['score'] ) ) { throw WPSEO_Invalid_Argument_Exception::invalid_integer_parameter( $request_data['score'], 'score' ); } } }