add_query_var('A5_file'); } function css_template() { $A5_file = get_query_var('A5_file'); if ($A5_file == 'wp_css' || $A5_file == 'admin_css' || $A5_file == 'login_css') : header('Content-type: text/css'); echo $this->write_dss(); exit; endif; if ($A5_file == 'wp_js' || $A5_file == 'admin_js' || $A5_file == 'login_js') : header('Content-type: text/javascript'); echo $this->write_djs(); exit; endif; if ($A5_file == 'export') : extract($args); header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename="'.$name.'-' . str_replace('.','-', $_SERVER['SERVER_NAME']) . '-' . date('Y') . date('m') . date('d') . '.txt"'); header('Content-Type: text/plain; charset=utf-8'); echo json_encode($options); exit; endif; } // getting css to frontend function wp_enqueue_scripts () { $A5_css_file=get_bloginfo('url').'/?A5_file=wp_css'; wp_register_style('A5-framework', $A5_css_file, false, self::version, 'all'); wp_enqueue_style('A5-framework'); } // getting css to backend function admin_enqueue_scripts ($hook) { if (self::$hooks !== false) : if (!in_array($hook, self::$hooks)) return; endif; $A5_css_file=get_bloginfo('url').'/?A5_file=admin_css'; wp_register_style('A5-framework', $A5_css_file, false, self::version, 'all'); wp_enqueue_style('A5-framework'); } // getting css to login screen function login_enqueue_scripts () { $A5_css_file=get_bloginfo('url').'/?A5_file=login_css'; wp_register_style('A5-framework', $A5_css_file, false, self::version, 'all'); wp_enqueue_style('A5-framework'); } // writing the styles to a dynamic file function write_dss() { $eol = "\r\n"; $css_text = '@charset "UTF-8";'.$eol.'/* CSS Document createtd by the A5 Plugin Framework */'.$eol; $css_text .= self::$styles; echo $css_text; } // writing the javascript to a dynamic file function write_djs() { $eol = "\r\n"; $css_text = '@charset "UTF-8";'.$eol.'/* CSS Document createtd by the A5 Plugin Framework */'.$eol; $css_text .= self::$styles; echo $css_text; } // writing the styles inline function print_inline() { $eol = "\r\n"; $inline_text = ('css' == self::$type) ? ''.$eol : $eol.''.$eol; echo $inline_text; } } // A5_Dynamic CSS ?>