예제 #1
0
 public static function get_all_wrappers()
 {
     if (!empty(self::$all_wrappers_cache)) {
         return self::$all_wrappers_cache;
     }
     $wrappers_by_layout = HeadwayOption::get_group('wrappers');
     if (!$wrappers_by_layout || !is_array($wrappers_by_layout)) {
         return null;
     }
     $all_wrappers = array();
     foreach ($wrappers_by_layout as $layout_id => $layout_wrappers) {
         if (is_array($layout_wrappers)) {
             $all_wrappers = array_merge($all_wrappers, self::format_wrappers_array($layout_wrappers, $layout_id));
         }
     }
     self::$all_wrappers_cache = $all_wrappers;
     return $all_wrappers;
 }