Пример #1
0
 /**
  * @return array An associative array of filenames to template display names.
  */
 public function getPageTemplates()
 {
     if (!$this->_cache->containsKey('templates')) {
         $wpTheme = $this->_wpFunctions->wp_get_theme();
         /* @noinspection PhpUndefinedMethodInspection */
         $toReturn = $wpTheme->get_page_templates();
         $toReturn['index.php'] = 'default';
         asort($toReturn);
         $this->_cache->put('templates', $toReturn);
     }
     return $this->_cache->get('templates');
 }