Skip to content

Feature 464. Add Post Status support in post meta conditions#1272

Open
lopandpe wants to merge 1 commit intohtmlburger:developmentfrom
lopandpe:464/post_status_condition
Open

Feature 464. Add Post Status support in post meta conditions#1272
lopandpe wants to merge 1 commit intohtmlburger:developmentfrom
lopandpe:464/post_status_condition

Conversation

@lopandpe
Copy link

Added support for the post_status condition. This allows adding a post_status (e.g., draft, publish, etc.) to the 'where' clauses on the container.

Container::make('post_meta', 'My container')
	->where('post_type', '=', 'book')
	->where('post_status', '=', 'publish')
	->add_fields(array(

		Field::make('text', 'book_field1', __('My field only visible on published books'),
	));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant