Esempio n. 1
0
 public function testOptions()
 {
     $registry = new PostTypeRegistry();
     $contentType = $this->getMock("Sypress\\ContentType\\ContentTypeInterface");
     $expected = [];
     $this->assertEquals($expected, $registry->options($contentType));
 }
Esempio n. 2
0
 /**
  * Registers a Sypress theme within WordPress
  * 
  * @param ThemeInterface $theme Theme
  */
 public function register(ThemeInterface $theme)
 {
     foreach ($theme->getNavMenus() as $handle => $label) {
         register_nav_menu($handle, $label);
     }
     foreach ($theme->getContentTypes() as $contentType) {
         $this->postTypeRegistry->register($contentType);
     }
 }