Пример #1
0
 public function postsDropdownField($post_type, $name, $value)
 {
     $galleries = get_posts(['post_type' => self::prefix($post_type), 'posts_per_page' => -1]);
     $options = array_combine(F\pluck($galleries, 'post_name'), F\pluck($galleries, 'post_title'));
     include MU_PLUGIN_BASE_DIR . '/templates/form-options.php';
 }
Пример #2
0
 public function testExceptionThrownInMagicGetWhileIteratingIterator()
 {
     $this->setExpectedException('DomainException', '__get exception: foobar');
     pluck($this->getExceptionIterator, 'foobar');
 }