Server IP : 104.21.14.103 / Your IP : 18.227.72.172 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/cwd/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Domain/ |
Upload File : |
<?php /** * Returns information about the package and handles init. * * @package WooCommerce/Blocks */ namespace Automattic\WooCommerce\Blocks\Domain; /** * Main package class. * * @since 2.5.0 */ class Package { /** * Holds the current version of the blocks plugin. * * @var string */ private $version; /** * Holds the main path to the blocks plugin directory. * * @var string */ private $path; /** * Constructor * * @param string $version Version of the plugin. * @param string $plugin_path Path to the main plugin file. */ public function __construct( $version, $plugin_path ) { $this->version = $version; $this->path = $plugin_path; } /** * Returns the version of the plugin. * * @return string */ public function get_version() { return $this->version; } /** * Returns the path to the plugin directory. * * @param string $relative_path If provided, the relative path will be * appended to the plugin path. * * @return string */ public function get_path( $relative_path = '' ) { return trailingslashit( $this->path ) . $relative_path; } /** * Returns the url to the blocks plugin directory. * * @param string $relative_url If provided, the relative url will be * appended to the plugin url. * * @return string */ public function get_url( $relative_url = '' ) { // Append index.php so WP does not return the parent directory. return plugin_dir_url( $this->path . '/index.php' ) . $relative_url; } /** * Checks if we're executing the code in an experimental build mode. * * @return boolean */ public static function is_experimental_build() { return WOOCOMMERCE_BLOCKS_PHASE > 2; } /** * Checks if we're executing the code in an feature plugin or experimental build mode. * * @return boolean */ public static function is_feature_plugin_build() { return WOOCOMMERCE_BLOCKS_PHASE > 1; } }