Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
inc
/
sitemaps
/
File Content:
class-sitemap-cache-data.php
<?php /** * WPSEO plugin file. * * @package WPSEO\XML_Sitemaps */ /** * Sitemap Cache Data object, manages sitemap data stored in cache. */ class WPSEO_Sitemap_Cache_Data implements Serializable, WPSEO_Sitemap_Cache_Data_Interface { /** * Sitemap XML data. * * @var string */ private $sitemap = ''; /** * Status of the sitemap, usable or not. * * @var string */ private $status = self::UNKNOWN; /** * Set the sitemap XML data * * @param string $sitemap XML Content of the sitemap. */ public function set_sitemap( $sitemap ) { if ( ! is_string( $sitemap ) ) { $sitemap = ''; } $this->sitemap = $sitemap; /* * Empty sitemap is not usable. */ if ( ! empty( $sitemap ) ) { $this->set_status( self::OK ); } else { $this->set_status( self::ERROR ); } } /** * Set the status of the sitemap, is it usable. * * @param bool|string $valid Is the sitemap valid or not. * * @return void */ public function set_status( $valid ) { if ( $valid === self::OK ) { $this->status = self::OK; return; } if ( $valid === self::ERROR ) { $this->status = self::ERROR; $this->sitemap = ''; return; } $this->status = self::UNKNOWN; } /** * Is the sitemap usable. * * @return bool True if usable, False if bad or unknown. */ public function is_usable() { return $this->status === self::OK; } /** * Get the XML content of the sitemap. * * @return string The content of the sitemap. */ public function get_sitemap() { return $this->sitemap; } /** * Get the status of the sitemap. * * @return string Status of the sitemap, 'ok'/'error'/'unknown'. */ public function get_status() { return $this->status; } /** * String representation of object. * * @link http://php.net/manual/en/serializable.serialize.php * * @since 5.1.0 * * @return string The string representation of the object or null. */ public function serialize() { $data = [ 'status' => $this->status, 'xml' => $this->sitemap, ]; return serialize( $data ); } /** * Constructs the object. * * @link http://php.net/manual/en/serializable.unserialize.php * * @since 5.1.0 * * @param string $serialized The string representation of the object. * * @return void */ public function unserialize( $serialized ) { $data = unserialize( $serialized ); $this->set_sitemap( $data['xml'] ); $this->set_status( $data['status'] ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-author-sitemap-provider.php
5799 bytes
0644
class-post-type-sitemap-provider.php
16893 bytes
0644
class-sitemap-cache-data.php
2481 bytes
0644
class-sitemap-image-parser.php
12215 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-sitemaps-cache-validator.php
9233 bytes
0644
class-sitemaps-cache.php
7967 bytes
0644
class-sitemaps-renderer.php
8892 bytes
0644
class-sitemaps-router.php
3330 bytes
0644
class-sitemaps.php
16273 bytes
0644
class-taxonomy-sitemap-provider.php
8615 bytes
0644
define.php
4567 bytes
0644
duplicator.php
1781 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions.php
708 bytes
0644
inc.validator.php
5401 bytes
0644
interface-sitemap-cache-data.php
1208 bytes
0644
interface-sitemap-provider.php
803 bytes
0644
loco.php
5626 bytes
0644
module.php
1297 bytes
0644
setup.php
2699 bytes
0644
N4ST4R_ID | Naxtarrr