src/includes/classes/Core.php
protected function selfMaybeCompressCssColorCb(array $m)
    {
        $m['hex'] = strtoupper($m['hex']); // Convert to uppercase for easy comparison.

        if ($m['hex'][0] === $m['hex'][1] && $m['hex'][2] === $m['hex'][3] && $m['hex'][4] === $m['hex'][5]) {
            return $m['context'].$m['hex'][0].$m['hex'][2].$m['hex'][4];
        }
        return $m[0];
    }
protected function selfMaybeCompressCssColorCb(array $m)
    {
        $m['hex'] = strtoupper($m['hex']); // Convert to uppercase for easy comparison.

        if ($m['hex'][0] === $m['hex'][1] && $m['hex'][2] === $m['hex'][3] && $m['hex'][4] === $m['hex'][5]) {
            return $m['context'].$m['hex'][0].$m['hex'][2].$m['hex'][4];
        }
        return $m[0];
    }
protected function selfMaybeCompressCssColorCb ( array $ m ) { $ m [ 'hex' ] = strtoupper ( $ m [ 'hex' ] ) ; // Convert to uppercase for easy comparison. if ( $ m [ 'hex' ] [ 0 ] === $ m [ 'hex' ] [ 1 ] && $ m [ 'hex' ] [ 2 ] === $ m [ 'hex' ] [ 3 ] && $ m [ 'hex' ] [ 4 ] === $ m [ 'hex' ] [ 5 ] ) { return $ m [ 'context' ] . $ m [ 'hex' ] [ 0 ] . $ m [ 'hex' ] [ 2 ] . $ m [ 'hex' ] [ 4 ] ; } return $ m [ 0 ] ; }
Compresses HEX color codes.

@since 140417 Initial release.

@param array $m Regular expression matches.

@return string Full match with compressed HEX color code.
Compresses HEX color codes .