示例#1
0
 public function __construct(WP_Term $term = null)
 {
     $this->term = $term ?: new WP_Term((object) ['taxonomy' => $this->taxonomy]);
     parent::__construct($this->term->to_array());
 }
示例#2
0
 public static function doRefreshRewrites($id = 0)
 {
     $type = get_post_type($id);
     if (static::doPostTypeFilter('refreshRewrites', $type, compact('id'))) {
         parent::doRefreshRewrites($id, $type);
     }
 }
示例#3
0
文件: Base.php 项目: expresser/role
 public function __construct(WP_Role $role = null)
 {
     $this->role = $role ?: new WP_Role($this->name, $this->capabilities);
     parent::__construct((array) $this->role);
 }
示例#4
0
文件: Base.php 项目: expresser/user
 public static function doRefreshRewrites($id = 0, $exclude = false)
 {
     parent::doRefreshRewrites($id, 'user', $exclude);
 }