Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

+12 -8
View File
@@ -11,35 +11,39 @@
namespace IPS\Output\Plugin;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use function defined;
use function in_array;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Template Plugin - Vendor prefix
*/
class _Prefix
class Prefix
{
/**
* @brief Can be used when compiling CSS
*/
public static $canBeUsedInCss = TRUE;
public static bool $canBeUsedInCss = TRUE;
/**
* Defined here so that we can remove names later as browser support for the non-prefixed version improves, without changing our css.
*
* @brief The styles this plugin will prefix
*/
protected static $supportedStyles = array(
protected static array $supportedStyles = array(
'user-select'
);
/**
* @brief Supported vendor prefixes
*/
protected static $prefixes = array( '-webkit-', '-moz-', '-ms-', '-o-', '' );
protected static array $prefixes = array( '-webkit-', '-moz-', '-ms-', '-o-', '' );
/**
* Run the plug-in
@@ -49,9 +53,9 @@ class _Prefix
* @return string Code to eval
* @note Occasionally a style isn't consistent between browsers, so simply adding a prefix isn't always sufficient - you may need other CSS to resolve browser inconsistencies
*/
public static function runPlugin( $data, $options )
public static function runPlugin( string $data, array $options ): string
{
if ( \in_array( $data, static::$supportedStyles ) )
if ( in_array( $data, static::$supportedStyles ) )
{
$output = array();