wordpress/wp-content/themes/basic/themify/class-themify-cache.php
/**
     * Styles output, if cache exsists will return cached file, else will cache then return cached file
     *
     * @param array
     *
     * return array
     */
Styles output, if cache exsists will return cached file, else will cache then return cached file
@param array

return array
Styles output if cache exsists will return cached file else will cache then return cached file @param array return array
public static function styles($todo) {
        if (!empty($todo) && !self::disable_cache()) {
            $dir = self::get_page_cache_dir('styles');
            if (!$dir) {
                return $todo;
            }
            $fname = self::$is_footer ? 'footer' : 'header';
            $cache_dir = self::create_scripts_dir('styles', $fname);
            $file_path = self::get_cache_dir(true);
            $file_path.= $dir . pathinfo($cache_dir, PATHINFO_BASENAME);
            if (is_file($cache_dir)) {
                if(!self::check_cache($cache_dir, FALSE)){
                    $cache_dir = self::get_cache_dir();
                    self::removeDirectory($cache_dir. 'scripts/');
                    self::removeDirectory($cache_dir. 'styles/');
                    return $todo;
                }
                $is_own = self::is_minify_all();
                $enque_styles = array('themify_cache_' . $fname);
                global $wp_styles;
                foreach ($todo as $handler) {
                    if (isset($wp_styles->registered[$handler])) {
                        $output = !$is_own?self::is_themify_file($wp_styles->registered[$handler]->src,$handler):true;
                        if ($output && (empty($wp_styles->registered[$handler]->extra['conditional']) && (empty($wp_styles->registered[$handler]->args) || $wp_styles->registered[$handler]->args == 'screen' || $wp_styles->registered[$handler]->args == 'all'))) {
                            unset($wp_styles->registered[$handler]);
                            $wp_styles->done[] = $handler;
                        } else {
                            $enque_styles[] = $handler;
                        }
                    }
                }
                wp_enqueue_style('themify_cache_' . $fname, $file_path, array(), THEMIFY_VERSION);
                self::$style_iscreated = true;
                return $enque_styles;
            }
        }
        return $todo;
    }
public static function styles ( $ todo ) { if ( ! empty ( $ todo ) && ! self :: disable_cache ( ) ) { $ dir = self :: get_page_cache_dir ( 'styles' ) ; if ( ! $ dir ) { return $ todo ; } $ fname = self :: $ is_footer ? 'footer' : 'header' ; $ cache_dir = self :: create_scripts_dir ( 'styles' , $ fname ) ; $ file_path = self :: get_cache_dir ( true ) ; $ file_path .= $ dir . pathinfo ( $ cache_dir , PATHINFO_BASENAME ) ; if ( is_file ( $ cache_dir ) ) { if ( ! self :: check_cache ( $ cache_dir , FALSE ) ) { $ cache_dir = self :: get_cache_dir ( ) ; self :: removeDirectory ( $ cache_dir . 'scripts/' ) ; self :: removeDirectory ( $ cache_dir . 'styles/' ) ; return $ todo ; } $ is_own = self :: is_minify_all ( ) ; $ enque_styles = array ( 'themify_cache_' . $ fname ) ; global $ wp_styles ; foreach ( $ todo as $ handler ) { if ( isset ( $ wp_styles -> registered [ $ handler ] ) ) { $ output = ! $ is_own ? self :: is_themify_file ( $ wp_styles -> registered [ $ handler ] -> src , $ handler ) : true ; if ( $ output && ( empty ( $ wp_styles -> registered [ $ handler ] -> extra [ 'conditional' ] ) && ( empty ( $ wp_styles -> registered [ $ handler ] -> args ) || $ wp_styles -> registered [ $ handler ] -> args == 'screen' || $ wp_styles -> registered [ $ handler ] -> args == 'all' ) ) ) { unset ( $ wp_styles -> registered [ $ handler ] ) ; $ wp_styles -> done [ ] = $ handler ; } else { $ enque_styles [ ] = $ handler ; } } } wp_enqueue_style ( 'themify_cache_' . $ fname , $ file_path , array ( ) , THEMIFY_VERSION ) ; self :: $ style_iscreated = true ; return $ enque_styles ; } } return $ todo ; }
Styles output, if cache exsists will return cached file, else will cache then return cached file
 @param array
Styles output if cache exsists will return cached file else will cache then return cached file @param array