| @@ -4,12 +4,8 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package WP_Stream |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | - exit; | |
| 10 | -} | |
| 11 | - | |
| 12 | 8 | /** |
| 13 | 9 | * Gets a specific external variable by name and optionally filters it. |
| 14 | 10 | * |
| 15 | 11 | * This is a polyfill function intended to be used in place of PHP's |
| @@ -109,5 +105,21 @@ | ||
| 109 | 105 | * @return bool |
| 110 | 106 | */ |
| 111 | 107 | function wp_stream_is_cron_enabled() { |
| 112 | 108 | return ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? false : true; |
| 109 | +} | |
| 110 | + | |
| 111 | +/** | |
| 112 | + * Get the asset min suffix if defined. | |
| 113 | + * | |
| 114 | + * @return string | |
| 115 | + */ | |
| 116 | +function wp_stream_min_suffix() { | |
| 117 | + $min = ''; | |
| 118 | + $is_script_debugging = ! defined( 'SCRIPT_DEBUG' ) || false === SCRIPT_DEBUG; | |
| 119 | + | |
| 120 | + if ( apply_filters( 'wp_stream_load_min_assets', $is_script_debugging ) ) { | |
| 121 | + $min = 'min.'; | |
| 122 | + } | |
| 123 | + | |
| 124 | + return $min; | |
| 113 | 125 | } |