Automattic\WooCommerce\Internal\Admin
WCAdminAssets::get_file_version()
Gets the file modified time as a cache buster if we're in dev mode, or the plugin version otherwise.
Метод класса: WCAdminAssets{}
Хуков нет.
Возвращает
Строку
. The cache buster value to use for the given file.
Использование
$result = WCAdminAssets::get_file_version( $ext );
- $ext(строка) (обязательный)
- File extension.
Код WCAdminAssets::get_file_version() WCAdminAssets::get file version WC 7.3.0
public static function get_file_version( $ext ) { if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { return filemtime( WC_ADMIN_ABSPATH . self::get_path( $ext ) ); } return WC_VERSION; }