wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

Add vertical boxes support #159

Closed vinkla closed 8 years ago

vinkla commented 8 years ago

It would be nice if we could have the option to customize the boxes like this:

screen shot 2016-03-02 at 6 08 24 pm
frozzare commented 8 years ago

Yeah, that would be nice. When doing this it's important to test so all properties looks good, testing the different layout options for properties that has this setting, for example flexible and repeater.

frozzare commented 8 years ago

This will be out in v3.1.0. You can set this on box and property level. All properties will inherit it from the box if the default value isn't matched. Setting a property to horizontal (with sidebar) layout when the box has vertical layout will not work.

Box:

$this->box( [
  'title'  => 'Content',
  'layout' => 'vertical'
], [] );

Property:

papi_property( [
  'title'  => 'Name',
  'type'   => 'string',
  'layout' => 'vertical'
] );
vinkla commented 8 years ago

shaun-the-sheep-movie-not-my-gif-2016-oscar-nominations-tIeCLkB8geYtW