script_concat_settings()
- Since
- 2.8.0
- Source
wp-includes/script-loader.php:2400
Determines the concatenation and compression settings for scripts and styles.
Uses · 4
- wp_installing()Checks or sets whether WordPress is in "installation" mode.
- get_site_option()Retrieve an option value for the current network based on name of option.
- is_admin()Determines whether the current request is for an administrative interface page.
- did_action()Retrieves the number of times an action has been fired during the current request.
Used by · 6
- _WP_Editors::print_tinymce_scripts()Print (output) the main TinyMCE scripts.
- print_admin_styles()Prints the styles queue in the HTML head on admin pages.
- print_footer_scripts()Prints the scripts that were queued for the footer or too late for the HTML head.
- print_head_scripts()Prints the script queue in the HTML head on admin pages.
- print_late_styles()Prints the styles that were queued too late for the HTML head.
- wp_register_tinymce_scripts()Registers TinyMCE scripts.
Source
function script_concat_settings() { global $concatenate_scripts, $compress_scripts, $compress_css; $compressed_output = ( ini_get( 'zlib.output_compression' ) || 'ob_gzhandler' === ini_get( 'output_handler' ) ); $can_compress_scripts = ! wp_installing() && get_site_option( 'can_compress_scripts' ); if ( ! isset( $concatenate_scripts ) ) { $concatenate_scripts = defined( 'CONCATENATE_SCRIPTS' ) ? CONCATENATE_SCRIPTS : true; if ( ( ! is_admin() && ! did_action( 'login_init' ) ) || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) { $concatenate_scripts = false; } } if ( ! isset( $compress_scripts ) ) { $compress_scripts = defined( 'COMPRESS_SCRIPTS' ) ? COMPRESS_SCRIPTS : true; if ( $compress_scripts && ( ! $can_compress_scripts || $compressed_output ) ) { $compress_scripts = false; } } if ( ! isset( $compress_css ) ) { $compress_css = defined( 'COMPRESS_CSS' ) ? COMPRESS_CSS : true; if ( $compress_css && ( ! $can_compress_scripts || $compressed_output ) ) { $compress_css = false; } }}History
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/script-loader.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.