themosis / documentation

Official documentation of the Themosis framework.
http://framework.themosis.com/
52 stars 37 forks source link

Add Metabox "can()" method #23

Closed jlambe closed 5 years ago

jlambe commented 8 years ago

Metabox API has a can() method that developers can use in order to limit the display of the metabox based on a role or capability.

// Metabox is viewed only by administrator...
Metabox::make('My Metabox for admin', 'page')->set()->can('administrator');
jlambe commented 5 years ago

2.0 version use the setCapability method instead. Documentation has been updated.