layers_apply_inline_styles

The Layers layers apply inline styles function.

Description

layers_apply_inline_styles(); 

Usage

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

Defined (1)

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

/core/helpers/template.php  
  1. function layers_apply_inline_styles() { 
  2. global $layers_inline_css; 
  3.  
  4. $layers_inline_css = apply_filters( 'layers_inline_css', $layers_inline_css ); 
  5.  
  6. if( '' == $layers_inline_css || FALSE == $layers_inline_css ) return; 
  7.  
  8. wp_enqueue_style( 
  9. LAYERS_THEME_SLUG . '-inline-styles',  
  10. get_template_directory_uri() . '/assets/css/inline.css' 
  11. ); 
  12.  
  13. wp_add_inline_style( 
  14. LAYERS_THEME_SLUG . '-inline-styles',  
  15. $layers_inline_css 
  16. );