public function __construct(WP_Term $term = null) { $this->term = $term ?: new WP_Term((object) ['taxonomy' => $this->taxonomy]); parent::__construct($this->term->to_array()); }
public static function doRefreshRewrites($id = 0) { $type = get_post_type($id); if (static::doPostTypeFilter('refreshRewrites', $type, compact('id'))) { parent::doRefreshRewrites($id, $type); } }
public function __construct(WP_Role $role = null) { $this->role = $role ?: new WP_Role($this->name, $this->capabilities); parent::__construct((array) $this->role); }
public static function doRefreshRewrites($id = 0, $exclude = false) { parent::doRefreshRewrites($id, 'user', $exclude); }