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.../inc
File: date-helper.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Date helper class.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Internals
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Class WPSEO_Date_Helper
[8] Fix | Delete
*
[9] Fix | Delete
* Note: Move this class with namespace to the src/helpers directory and add a class_alias for BC.
[10] Fix | Delete
*/
[11] Fix | Delete
class WPSEO_Date_Helper {
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Formats a given date in UTC TimeZone format.
[15] Fix | Delete
*
[16] Fix | Delete
* @param string $date String representing the date / time.
[17] Fix | Delete
* @param string $format The format that the passed date should be in.
[18] Fix | Delete
*
[19] Fix | Delete
* @return string The formatted date.
[20] Fix | Delete
*/
[21] Fix | Delete
public function format( $date, $format = DATE_W3C ) {
[22] Fix | Delete
return YoastSEO()->helpers->date->format( $date, $format );
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Formats the given timestamp to the needed format.
[27] Fix | Delete
*
[28] Fix | Delete
* @param int $timestamp The timestamp to use for the formatting.
[29] Fix | Delete
* @param string $format The format that the passed date should be in.
[30] Fix | Delete
*
[31] Fix | Delete
* @return string The formatted date.
[32] Fix | Delete
*/
[33] Fix | Delete
public function format_timestamp( $timestamp, $format = DATE_W3C ) {
[34] Fix | Delete
return YoastSEO()->helpers->date->format_timestamp( $timestamp, $format );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Formats a given date in UTC TimeZone format and translate it to the set language.
[39] Fix | Delete
*
[40] Fix | Delete
* @param string $date String representing the date / time.
[41] Fix | Delete
* @param string $format The format that the passed date should be in.
[42] Fix | Delete
*
[43] Fix | Delete
* @return string The formatted and translated date.
[44] Fix | Delete
*/
[45] Fix | Delete
public function format_translated( $date, $format = DATE_W3C ) {
[46] Fix | Delete
return YoastSEO()->helpers->date->format_translated( $date, $format );
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Check if a string is a valid datetime.
[51] Fix | Delete
*
[52] Fix | Delete
* @param string $datetime String input to check as valid input for DateTime class.
[53] Fix | Delete
*
[54] Fix | Delete
* @return bool True when datatime is valid.
[55] Fix | Delete
*/
[56] Fix | Delete
public function is_valid_datetime( $datetime ) {
[57] Fix | Delete
return YoastSEO()->helpers->date->is_valid_datetime( $datetime );
[58] Fix | Delete
}
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function