/** * Removes a single metafield from being persisted * * @param string $field */ public function removeMetaField($field) { if (!is_string($field)) { throw new \Exception('Metabox meta field must be a string.'); } $this->meta_fields->pop($field); return $this; }
/** * Removes single taxonomy * * @param string $taxonomy */ public function removeTaxonomy($taxonomy) { if (!is_string($taxonomy)) { throw new \Exception('PostType taxonomy must be a string.'); } if ($this->taxonomies->hasValue($taxonomy)) { $this->taxonomies->pop($taxonomy); } return $this; }
/** * Removes single post types * * @param string $post_type * @return \Ponticlaro\Bebop\Cms\Taxonomy Taxonomy instance */ public function removePostType($post_type) { if (is_a($post_type, 'Ponticlaro\\Bebop\\PostType')) { $post_type = $post_type->getId(); } if (!is_string($post_type)) { throw new \Exception('Taxonomy post type must be either a string or a \\Ponticlaro\\Bebop\\PostType instance.'); } $this->post_types->pop($post_type); return $this; }