bp_core_get_minified_asset_suffix

Get the correct filename suffix for minified assets.

Description

(string) bp_core_get_minified_asset_suffix(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bp_core_get_minified_asset_suffix' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_get_minified_asset_suffix(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-functions.php  
  1. function bp_core_get_minified_asset_suffix() { 
  2. $ext = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; 
  3.  
  4. // Ensure the assets can be located when running from /src/. 
  5. if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src' ) { 
  6. $ext = str_replace( '.min', '', $ext ); 
  7.  
  8. return $ext;