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.../public_h.../wp-conte.../plugins/wordpres.../admin
File: class-gutenberg-compatibility.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Gutenberg_Compatibility
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Class WPSEO_Gutenberg_Compatibility
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Gutenberg_Compatibility {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* The currently released version of Gutenberg.
[13] Fix | Delete
*
[14] Fix | Delete
* @var string
[15] Fix | Delete
*/
[16] Fix | Delete
public const CURRENT_RELEASE = '18.6.1';
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* The minimally supported version of Gutenberg by the plugin.
[20] Fix | Delete
*
[21] Fix | Delete
* @var string
[22] Fix | Delete
*/
[23] Fix | Delete
public const MINIMUM_SUPPORTED = '18.6.1';
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Holds the current version.
[27] Fix | Delete
*
[28] Fix | Delete
* @var string
[29] Fix | Delete
*/
[30] Fix | Delete
protected $current_version = '';
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* WPSEO_Gutenberg_Compatibility constructor.
[34] Fix | Delete
*/
[35] Fix | Delete
public function __construct() {
[36] Fix | Delete
$this->current_version = $this->detect_installed_gutenberg_version();
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Determines whether or not Gutenberg is installed.
[41] Fix | Delete
*
[42] Fix | Delete
* @return bool Whether or not Gutenberg is installed.
[43] Fix | Delete
*/
[44] Fix | Delete
public function is_installed() {
[45] Fix | Delete
return $this->current_version !== '';
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Determines whether or not the currently installed version of Gutenberg is below the minimum supported version.
[50] Fix | Delete
*
[51] Fix | Delete
* @return bool True if the currently installed version is below the minimum supported version. False otherwise.
[52] Fix | Delete
*/
[53] Fix | Delete
public function is_below_minimum() {
[54] Fix | Delete
return version_compare( $this->current_version, $this->get_minimum_supported_version(), '<' );
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
/**
[58] Fix | Delete
* Gets the currently installed version.
[59] Fix | Delete
*
[60] Fix | Delete
* @return string The currently installed version.
[61] Fix | Delete
*/
[62] Fix | Delete
public function get_installed_version() {
[63] Fix | Delete
return $this->current_version;
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* Determines whether or not the currently installed version of Gutenberg is the latest, fully compatible version.
[68] Fix | Delete
*
[69] Fix | Delete
* @return bool Whether or not the currently installed version is fully compatible.
[70] Fix | Delete
*/
[71] Fix | Delete
public function is_fully_compatible() {
[72] Fix | Delete
return version_compare( $this->current_version, $this->get_latest_release(), '>=' );
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
/**
[76] Fix | Delete
* Gets the latest released version of Gutenberg.
[77] Fix | Delete
*
[78] Fix | Delete
* @return string The latest release.
[79] Fix | Delete
*/
[80] Fix | Delete
protected function get_latest_release() {
[81] Fix | Delete
return self::CURRENT_RELEASE;
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* Gets the minimum supported version of Gutenberg.
[86] Fix | Delete
*
[87] Fix | Delete
* @return string The minumum supported release.
[88] Fix | Delete
*/
[89] Fix | Delete
protected function get_minimum_supported_version() {
[90] Fix | Delete
return self::MINIMUM_SUPPORTED;
[91] Fix | Delete
}
[92] Fix | Delete
[93] Fix | Delete
/**
[94] Fix | Delete
* Detects the currently installed Gutenberg version.
[95] Fix | Delete
*
[96] Fix | Delete
* @return string The currently installed Gutenberg version. Empty if the version couldn't be detected.
[97] Fix | Delete
*/
[98] Fix | Delete
protected function detect_installed_gutenberg_version() {
[99] Fix | Delete
if ( defined( 'GUTENBERG_VERSION' ) ) {
[100] Fix | Delete
return GUTENBERG_VERSION;
[101] Fix | Delete
}
[102] Fix | Delete
[103] Fix | Delete
return '';
[104] Fix | Delete
}
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function