Overview

Classes

  • Papi_Admin
  • Papi_Admin_Ajax
  • Papi_Admin_Assets
  • Papi_Admin_Management_Pages
  • Papi_Admin_Menu
  • Papi_Admin_Meta_Box
  • Papi_Admin_Meta_Box_Tabs
  • Papi_Admin_Option_Handler
  • Papi_Admin_Post_Handler
  • Papi_Admin_View
  • Papi_Attachment_Type
  • Papi_Conditional_Rules
  • Papi_Container
  • Papi_Core_Autoload
  • Papi_Core_Conditional
  • Papi_Core_Conditional_Rule
  • Papi_Core_Data_Handler
  • Papi_Core_Page
  • Papi_Core_Property
  • Papi_Core_Type
  • Papi_Loader
  • Papi_Option_Page
  • Papi_Option_Type
  • Papi_Page_Type
  • Papi_Page_Type_Meta
  • Papi_Porter
  • Papi_Porter_Driver
  • Papi_Porter_Driver_Core
  • Papi_Post_Page
  • Papi_Property
  • Papi_Property_Bool
  • Papi_Property_Checkbox
  • Papi_Property_Color
  • Papi_Property_Datetime
  • Papi_Property_Divider
  • Papi_Property_Dropdown
  • Papi_Property_Editor
  • Papi_Property_Email
  • Papi_Property_File
  • Papi_Property_Flexible
  • Papi_Property_Gallery
  • Papi_Property_Hidden
  • Papi_Property_Html
  • Papi_Property_Image
  • Papi_Property_Link
  • Papi_Property_Number
  • Papi_Property_Post
  • Papi_Property_Radio
  • Papi_Property_Reference
  • Papi_Property_Relationship
  • Papi_Property_Repeater
  • Papi_Property_String
  • Papi_Property_Term
  • Papi_Property_Text
  • Papi_Property_Url
  • Papi_Property_User

Functions

  • current_page
  • papi
  • papi_action_delete_value
  • papi_action_include
  • papi_append_post_type_query
  • papi_body_class
  • papi_cache_delete
  • papi_cache_get
  • papi_cache_key
  • papi_cache_set
  • papi_camel_case
  • papi_cast_string_value
  • papi_convert_to_string
  • papi_current_user_is_allowed
  • papi_dashify
  • papi_delete_field
  • papi_delete_option
  • papi_delete_property_meta_value
  • papi_display_page_type
  • papi_doing_ajax
  • papi_esc_html
  • papi_f
  • papi_field
  • papi_field_shortcode
  • papi_field_value
  • papi_fields
  • papi_filter_conditional_rule_allowed
  • papi_filter_core_load_one_type_on
  • papi_filter_format_value
  • papi_filter_load_value
  • papi_filter_settings_directories
  • papi_filter_settings_only_page_type
  • papi_filter_settings_page_type_column_title
  • papi_filter_settings_show_page_type
  • papi_filter_settings_show_standard_page_type
  • papi_filter_settings_show_standard_page_type_in_filter
  • papi_filter_settings_sort_order
  • papi_filter_settings_standard_page_description
  • papi_filter_settings_standard_page_name
  • papi_filter_settings_standard_page_thumbnail
  • papi_filter_update_value
  • papi_from_property_array_slugs
  • papi_get_all_files_in_directory
  • papi_get_all_page_type_files
  • papi_get_all_page_types
  • papi_get_box_property
  • papi_get_class_name
  • papi_get_field
  • papi_get_file_path
  • papi_get_number_of_pages
  • papi_get_only_objects
  • papi_get_option
  • papi_get_options_and_properties
  • papi_get_or_post
  • papi_get_page
  • papi_get_page_new_url
  • papi_get_page_query_strings
  • papi_get_page_type
  • papi_get_page_type_base_path
  • papi_get_page_type_by_id
  • papi_get_page_type_by_post_id
  • papi_get_page_type_id
  • papi_get_page_type_key
  • papi_get_page_type_meta_value
  • papi_get_page_type_name
  • papi_get_page_type_template
  • papi_get_parent_post_id
  • papi_get_post_id
  • papi_get_post_type
  • papi_get_post_type_label
  • papi_get_post_types
  • papi_get_property_class_name
  • papi_get_property_meta_value
  • papi_get_property_options
  • papi_get_property_type
  • papi_get_property_type_key
  • papi_get_property_type_key_f
  • papi_get_qs
  • papi_get_sanitized_post
  • papi_get_slugs
  • papi_get_tab_options
  • papi_html_name
  • papi_html_tag
  • papi_include_template
  • papi_is_empty
  • papi_is_json
  • papi_is_method
  • papi_is_option_page
  • papi_is_option_type
  • papi_is_page_type
  • papi_is_property
  • papi_is_property_type_key
  • papi_is_rule
  • papi_management_page_type_render_box
  • papi_maybe_convert_to_array
  • papi_maybe_convert_to_object
  • papi_maybe_get_callable_value
  • papi_maybe_json_decode
  • papi_maybe_json_encode
  • papi_nl2br
  • papi_option_shortcode
  • papi_option_type_exists
  • papi_page_type_exists
  • papi_populate_properties
  • papi_property
  • papi_remove_papi
  • papi_remove_trailing_quotes
  • papi_render_html_tag
  • papi_render_properties
  • papi_render_property
  • papi_require_text
  • papi_required_html
  • papi_rule
  • papi_santize_data
  • papi_set_page_type_id
  • papi_setup_tabs
  • papi_slugify
  • papi_sort_order
  • papi_tab
  • papi_template
  • papi_template_include
  • papi_to_array
  • papi_to_property_array_slugs
  • papi_translate_keys
  • papi_underscorify
  • papi_update_field
  • papi_update_option
  • papi_update_property_meta_value
  • papi_with
  • papify
  • the_papi_field
  • the_papi_option
  • the_papi_page_type_name
  • Overview
  • Class

Overview

Classes summary
Papi_Admin

Admin class that handle loading of Papi types, columns and loading of posts.

Papi_Admin_Ajax Admin class that handle ajax calls.
Papi_Admin_Assets Admin class that handle assets.
Papi_Admin_Management_Pages Admin class that handle management pages.
Papi_Admin_Menu Admin class that handles admin menus.
Papi_Admin_Meta_Box Admin class that handles admin meta boxes.
Papi_Admin_Meta_Box_Tabs

Admin class that handles admin tabs in meta boxes.

Papi_Admin_Option_Handler Admin class that handle option post data.
Papi_Admin_Post_Handler Admin class that handle post data.
Papi_Admin_View Admin class that handle admin view rendering.
Papi_Attachment_Type

Papi type that handle attachment post type, post data and rendering. All attachment types should extend this class.

Papi_Conditional_Rules

Conditional rules class that contains all rules.

Papi_Container Container class that implements a container.
Papi_Core_Autoload Autoload class that autoload classes.
Papi_Core_Conditional

Core class that handle if a conditional rule should display the property or not.

Papi_Core_Conditional_Rule Core class that implements a conditional rule.
Papi_Core_Data_Handler Core class that handle core post data.
Papi_Core_Page Core class that implements a Papi page.
Papi_Core_Property Core class that implements a Papi property.
Papi_Core_Type Core class that implements a Papi type.
Papi_Loader

Papi loader class that handle the loading of the plugin.

Papi_Option_Page Option page implementation of Papi page.
Papi_Option_Type

Papi type that handle option, option data and rendering. All option types should extend this class.

Papi_Page_Type

Papi type that handle all psot types except attachment, option data and rendering. All page types should extend this class.

Papi_Page_Type_Meta

Base Papi type implementation of meta data for a page type.

Papi_Porter

Papi Porter class that handle import and export of properties data.

Papi_Porter_Driver Abstract implementation of Papi Porter driver.
Papi_Porter_Driver_Core Papi core Porter driver.
Papi_Post_Page Post page implementation of Papi page.
Papi_Property

Base property that implements the rendering of a property in WordPress admin.

Papi_Property_Bool Bool (true/false) property.
Papi_Property_Checkbox

HTML checkbox property that can handle one or more checkboxes.

Papi_Property_Color

Color property that implements WordPress color picker as a property.

Papi_Property_Datetime Datetime property.
Papi_Property_Divider Divider property.
Papi_Property_Dropdown Dropdown property.
Papi_Property_Editor WordPress editor property.
Papi_Property_Email HTML5 email input property.
Papi_Property_File WordPress media file property.
Papi_Property_Flexible

Flexible repeater property that can repeat multiple properties with different properties per layout.

Papi_Property_Gallery WordPress media file property as a gallery.
Papi_Property_Hidden HTML hidden input property.
Papi_Property_Html HTML property that can display html in the admin.
Papi_Property_Image WordPress media image property.
Papi_Property_Link WordPress link manager property.
Papi_Property_Number HTML5 number input property.
Papi_Property_Post

Post property that can handle relationship between posts.

Papi_Property_Radio

HTML radio buttons property that can handle one or more radio buttons.

Papi_Property_Reference

Property that shows which relationships that exists between the current post and other posts.

Papi_Property_Relationship

Relationship property that can handle more than one relationship between posts.

Papi_Property_Repeater Repeater property that can repeat multiple properties.
Papi_Property_String HTML text input property.
Papi_Property_Term

Term property that handle relationship between terms and posts.

Papi_Property_Text HTML textarea property.
Papi_Property_Url HTML5 url input property.
Papi_Property_User

User property that handle relationship between users and posts.

Functions summary
current_page Get the current page. Like in EPiServer.
papi Return the instance of Papi to everyone.
papi_action_delete_value Delete the property value from the database.
papi_action_include Fire the 'papi/include' action, where plugins should include files.
papi_append_post_type_query Append post type query string.
papi_body_class Add page type class name as a css class on body.
papi_cache_delete Delete value from cache.
papi_cache_get Get value from cache.
papi_cache_key Get Papi cache key.
papi_cache_set Set value in cache.
papi_camel_case Convert a value to camel case.
papi_cast_string_value Cast string value to right value type.
papi_convert_to_string Try convert to string if is possible else return empty string.
papi_current_user_is_allowed Check if current is allowed the given capabilities.
papi_dashify

Dashify the given string. Replacing whitespace and underscore with a dash.

papi_delete_field Delete value in the database.
papi_delete_option Delete value in the database.
papi_delete_property_meta_value

Delete property value from database. If it's on a option page it will fetch the value from the option table instead of the postmeta table.

papi_display_page_type Check if the page type should be displayed or not.
papi_doing_ajax Check if Papi is doing a AJAX request or not.
papi_esc_html Papi escape html.
papi_f Add underscores at the start of the string.
papi_field Get value for a property on a page.
papi_field_shortcode Shortcode for papi_get_field function.
papi_field_value Get field value by keys.
papi_fields Get boxes with properties slug for a page.
papi_filter_conditional_rule_allowed Get conditional rule value.
papi_filter_core_load_one_type_on This filter will return all post types that should load only one page type.
papi_filter_format_value Format the value of the property before it's returned to WordPress admin or the site.
papi_filter_load_value This filter is applied after the value is loaded in the database.
papi_filter_settings_directories Get all registered page type directories.
papi_filter_settings_only_page_type Get the only page type that will be used for the given post type.
papi_filter_settings_page_type_column_title Change column title for page type column.
papi_filter_settings_show_page_type Show page type in add new page view for the given post type.
papi_filter_settings_show_standard_page_type Show standard page type on the given post type.
papi_filter_settings_show_standard_page_type_in_filter Show standard page type in filter dropdown on the given post type.
papi_filter_settings_sort_order Get the default sort order that is 1000.
papi_filter_settings_standard_page_description Get standard page description for the given post type.
papi_filter_settings_standard_page_name Get standard page name for the given post type.
papi_filter_settings_standard_page_thumbnail Get standard page thumbnail for the given post type.
papi_filter_update_value This filter is applied before the value is saved in the database.
papi_from_property_array_slugs Convert array of slugs to array with arrays in.
papi_get_all_files_in_directory Get all files in directory.
papi_get_all_page_type_files Get all page type files from the register directories.
papi_get_all_page_types Get all page types that exists.
papi_get_box_property Get box property.
papi_get_class_name Get namespace name and/or class name from page type file.
papi_get_field Get value for a property on a page.
papi_get_file_path Get page type file from page type query.
papi_get_number_of_pages

Get number of how many pages uses the given page type. This will also work with only page type.

papi_get_only_objects Get only objects from the value.
papi_get_option Get property value for property on a option page.
papi_get_options_and_properties Get options and properties.
papi_get_or_post Get value from $_GET or $_POST with the given key.
papi_get_page Get the data page.
papi_get_page_new_url Get the url to 'post-new.php' with query string of the page type to load.
papi_get_page_query_strings Get page query strings.
papi_get_page_type Get a page type by file path.
papi_get_page_type_base_path Get page type base path.
papi_get_page_type_by_id Get page type by identifier.
papi_get_page_type_by_post_id Get page type from post id.
papi_get_page_type_id Get page type id.
papi_get_page_type_key Get the page type key that is used for each post.
papi_get_page_type_meta_value Get page type id.
papi_get_page_type_name Get the Page type name.
papi_get_page_type_template Get template file from post id.
papi_get_parent_post_id Get post parent id.
papi_get_post_id Get post or page id from a object.
papi_get_post_type Get WordPress post type in various ways
papi_get_post_type_label Get post type label.
papi_get_post_types Get all post types Papi should work with.
papi_get_property_class_name Get property class name.
papi_get_property_meta_value

Get property value from database. If it's on a option page it will fetch the value from the option table instead of the postmeta table.

papi_get_property_options Get property options.
papi_get_property_type Get property type by the given type.
papi_get_property_type_key Get the right key for a property type.
papi_get_property_type_key_f Get the right key for a property type with a underscore as the first character.
papi_get_qs Get query string if it exists and is not empty.
papi_get_sanitized_post Get sanitized value from global $_POST.
papi_get_slugs Get boxes with properties slug for a page.
papi_get_tab_options Get tabs options.
papi_html_name Get a php friendly name.
papi_html_tag Get html tag from tag name and array of attributes.
papi_include_template Include partial view.
papi_is_empty

Check if the given object is empty or not. Values like "0", 0 and false should not return true.

papi_is_json Test if given object is a JSON string or not.
papi_is_method Check which http method it is.
papi_is_option_page Check if it's a option page url.
papi_is_option_type Check if $obj is a instanceof Papi_Option_Type.
papi_is_page_type Check if $obj is a instanceof Papi_Page_Type.
papi_is_property Check if the given value is a instance of a property or not.
papi_is_property_type_key Check if it's ends with '_property'.
papi_is_rule Check if the given value is a instance of the rule class.
papi_management_page_type_render_box Render management box table.
papi_maybe_convert_to_array Maybe convert value to array if array or return the value.
papi_maybe_convert_to_object Maybe convert value to object if array or return the value.
papi_maybe_get_callable_value Papi get callable value if is it callable.
papi_maybe_json_decode Maybe JSON decode the given string.
papi_maybe_json_encode Maybe JSON encode the given object.
papi_nl2br Replace '\n' with '
'.
papi_option_shortcode Shortcode for papi_get_option function.
papi_option_type_exists Check if option type exists.
papi_page_type_exists Check if page type exists.
papi_populate_properties Populate properties array.
papi_property Create a new property array or rendering a template property file.
papi_remove_papi Remove papi- or papi_ from the given string.
papi_remove_trailing_quotes

Remove trailing dobule quote. PHP's $_POST object adds this automatic.

papi_render_html_tag Render html tag from tag name and array of attributes.
papi_render_properties Render properties the right way.
papi_render_property Render the given property.
papi_require_text Get require text for property.
papi_required_html Get require tag for property.
papi_rule Get conditional rule.
papi_santize_data Santize data.
papi_set_page_type_id Set page type to a post.
papi_setup_tabs Setup tabs.
papi_slugify Slugify the given string.
papi_sort_order Sort array based on given key and numeric value.
papi_tab Create a new tab array or rendering a template tab file.
papi_template Load a template array file and merge values with it.
papi_template_include Include template files from Papis custom page template meta field.
papi_to_array Get a array of $obj.
papi_to_property_array_slugs

Convert array of arrays to array of slugs. The given slug will match a key with the number of properties.

papi_translate_keys Translate array keys.
papi_underscorify

Underscorify the given string. Replacing whitespace and dash with a underscore.

papi_update_field Update field with new value. The old value will be deleted.
papi_update_option Update field with new value. The old value will be deleted.
papi_update_property_meta_value

Update property values on the post with the given post id or update property values on the option page.

papi_with Return the given object. Useful for chaining.
papify Add papi_ to the given string ad the start of the string.
the_papi_field Echo the value for property on a page.
the_papi_option Echo the value for property on a option page.
the_papi_page_type_name Echo the Page type name.
API documentation generated by ApiGen