Esempio n. 1
0
 /**
  * Output menu color CSS for the current custom menu.
  */
 public function ajax_output_menu_color_css()
 {
     $custom_menu = $this->wp_menu_editor->load_custom_menu();
     if (empty($custom_menu) || empty($custom_menu['color_css'])) {
         return;
     }
     header('Content-Type: text/css');
     header('X-Content-Type-Options: nosniff');
     //No really IE, it's CSS. Honest.
     //Enable browser caching.
     header('Cache-Control: public');
     header('Expires: Thu, 31 Dec ' . date('Y', strtotime('+1 year')) . ' 23:59:59 GMT');
     header('Pragma: cache');
     echo $custom_menu['color_css'];
     exit;
 }