safecss_class

Load in the class only when needed.

Description

safecss_class(); 

Usage

  1. if ( !function_exists( 'safecss_class' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/custom-css/custom-css.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = safecss_class(); 
  7.  

Defined (1)

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

/modules/custom-css/custom-css.php  
  1. function safecss_class() { 
  2. // Wrapped so we don't need the parent class just to load the plugin 
  3. if ( class_exists('safecss') ) 
  4. return; 
  5.  
  6. require_once( dirname( __FILE__ ) . '/csstidy/class.csstidy.php' ); 
  7.  
  8. class safecss extends csstidy_optimise
  9. function __construct( &$css ) { 
  10. return $this->csstidy_optimise( $css ); 
  11.  
  12. function postparse() { 
  13.  
  14. /** 
  15. * Fires after parsing the css. 
  16. * @module custom-css 
  17. * @since 1.8.0 
  18. * @param obj $thisCSSTidyobject. 
  19. */ 
  20. do_action( 'csstidy_optimize_postparse', $this ); 
  21.  
  22. return parent::postparse(); 
  23.  
  24. function subvalue() { 
  25.  
  26. /** 
  27. * Fires before optimizing the Custom CSS subvalue. 
  28. * @module custom-css 
  29. * @since 1.8.0 
  30. * @param obj $thisCSSTidyobject. 
  31. **/ 
  32. do_action( 'csstidy_optimize_subvalue', $this ); 
  33.  
  34. return parent::subvalue();