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/wordpres.../src/helpers
File: sanitization-helper.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Helpers;
[2] Fix | Delete
[3] Fix | Delete
use WPSEO_Utils;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* A helper object for sanitization.
[7] Fix | Delete
*/
[8] Fix | Delete
class Sanitization_Helper {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Emulate the WP native sanitize_text_field function in a %%variable%% safe way.
[12] Fix | Delete
*
[13] Fix | Delete
* @codeCoverageIgnore We have to write test when this method contains own code.
[14] Fix | Delete
*
[15] Fix | Delete
* @param string $value String value to sanitize.
[16] Fix | Delete
*
[17] Fix | Delete
* @return string The sanitized string.
[18] Fix | Delete
*/
[19] Fix | Delete
public function sanitize_text_field( $value ) {
[20] Fix | Delete
return WPSEO_Utils::sanitize_text_field( $value );
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
/**
[24] Fix | Delete
* Sanitize a url for saving to the database.
[25] Fix | Delete
* Not to be confused with the old native WP function.
[26] Fix | Delete
*
[27] Fix | Delete
* @codeCoverageIgnore We have to write test when this method contains own code.
[28] Fix | Delete
*
[29] Fix | Delete
* @param string $value String URL value to sanitize.
[30] Fix | Delete
* @param array $allowed_protocols Optional set of allowed protocols.
[31] Fix | Delete
*
[32] Fix | Delete
* @return string The sanitized URL.
[33] Fix | Delete
*/
[34] Fix | Delete
public function sanitize_url( $value, $allowed_protocols = [ 'http', 'https' ] ) {
[35] Fix | Delete
return WPSEO_Utils::sanitize_url( $value, $allowed_protocols );
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function