v2.0.0
Papi 2.0.0 is a big release with a flexible repeater, updated properties, option type (page type for options page), new API functions and bug fixes. Some internal functions has been removed or renamed.
Upgrading from Papi 1.x to 2.x will not be a big step and there is a upgrade guide describing what is changed since 2.x.
Requirements
- WordPress >= 4.0
- PHP >= 5.4.7
Enhancements
- Added
display( $post_type )
method to page type class, works likepapi/settings/show_page_type_{$post_type}
. - New property: Flexible repeater, a repeater where you can have different layouts on each row.
- Option type, just like page type but for option pages.
Actions
papi/delete_value/{$property_type}
is called when you usepapi_delete_field
orpapi_delete_option
, the post id will be zero when deleting a option value.
Filters
papi/settings/standard_page_type_{$post_type}
is renamed topapi/settings/show_standard_page_type_{$post_type}
New functions
papi_get_slugs
, replacingpapi_get_fields
Field
papi_get_field
, get the property database value. Replacingpapi_field
papi_update_field
, update a property database value.papi_delete_field
, delete the property database value.
Option
papi_delete_option
, delete property database value.papi_get_option
, get property value from Papi option type.papi_update_option
, update property database value.
Page type
papi_get_page_type_id
, get the page type id.papi_get_page_type_name
, get the page type name.the_papi_page_type_name
, echo the page type name.
Properties
Datetime
- Upgrade moment.js to 2.10.3
- Upgrade Pikaday
Dropdown and Post
placeholder
setting is replacingblank_text
andinclude_blank
- Upgraded Select2 to 4.0
Relationship
choose_max
is renamed tolimit
.
Repeater
- Added
limit
setting. - Added
layout
setting withtable
orrow
. Thetable
value will render the repeater as a table and therow
value will render the repeater as a row on the height.
Deprecated
current_page
is deprecated since 2.0.0. Usepapi_get_page
instead.papi_field
is deprecated since 2.0.0 and replaced withpapi_get_field
papi_fields
is deprecated since 2.0.0 and replaced withpapi_get_slugs
papi_get_page_type_meta_value
is deprecated since 2.0.0 and replacede withpapi_get_page_type_id
Thanks
Thanks to all contributors and all who have tested Papi during the development.