layers_apply_custom_styles

The Layers layers apply custom styles function.

Description

layers_apply_custom_styles(); 

Usage

  1. if ( !function_exists( 'layers_apply_custom_styles' ) ) { 
  2. require_once '/core/helpers/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = layers_apply_custom_styles(); 
  7.  

Defined (1)

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

/core/helpers/template.php  
  1. function layers_apply_custom_styles() { 
  2.  
  3. if( '' == layers_get_theme_mod( 'custom-css' ) || FALSE == layers_get_theme_mod( 'custom-css' ) ) return; 
  4.  
  5. wp_enqueue_style( 
  6. LAYERS_THEME_SLUG . '-custom-styles',  
  7. get_template_directory_uri() . '/assets/css/custom.css' 
  8. ); 
  9. wp_add_inline_style( 
  10. LAYERS_THEME_SLUG . '-custom-styles',  
  11. layers_get_theme_mod( 'custom-css' ) 
  12. ); 
  13.