Skip to content

v2.0.0

Compare
Choose a tag to compare
@frozzare frozzare released this 22 Jun 14:36
· 892 commits to 2.x since this release

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 like papi/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 use papi_delete_field or papi_delete_option, the post id will be zero when deleting a option value.

Filters

  • papi/settings/standard_page_type_{$post_type} is renamed to papi/settings/show_standard_page_type_{$post_type}

New functions

  • papi_get_slugs, replacing papi_get_fields

Field

  • papi_get_field, get the property database value. Replacing papi_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 replacing blank_text and include_blank
  • Upgraded Select2 to 4.0

Relationship

  • choose_max is renamed to limit.

Repeater

  • Added limit setting.
  • Added layout setting with table or row. The table value will render the repeater as a table and the row value will render the repeater as a row on the height.

Deprecated

  • current_page is deprecated since 2.0.0. Use papi_get_page instead.
  • papi_field is deprecated since 2.0.0 and replaced with papi_get_field
  • papi_fields is deprecated since 2.0.0 and replaced with papi_get_slugs
  • papi_get_page_type_meta_value is deprecated since 2.0.0 and replacede with papi_get_page_type_id

Thanks

Thanks to all contributors and all who have tested Papi during the development.