Class Reference

This section offers developers a complete reference to the classes and methods available in the MasterPress API.

While this section contains a lot of examples, the Code Recipes section might be a better place to start if you’re new to this API, or not highly familiar with the PHP language. For more information on the breakdown of packages below, refer to Packages: WOOF, MEOW and Field Types in the introductory section.

WOOF

WOOF

The major class in the API, which provides a point of entry into the rest of the API via the global variable $wf.

WOOF_Collection

Represents a collection of other objects, supporting foreach iteration via PHP’s Iterator interface, and many other features such as sorting. The MasterPress API makes heavy use of collections, which offer far more power than basic arrays.

WOOF_CommentAuthor

Respresents an unknown author of a post comment, that is, a visitor who is not registered on the site.

WOOF_EXIF

Represents EXIF (EXchangable Image file Format) photographic information about an image, if available.

WOOF_Expression

Represents a delayed evaluation of an object property, by encapsulating a base context object and an expression to be evaluated on that object. 

WOOF_File

A powerful class representing a file within your WordPress site, which also provides base methods for the WOOF_Image class.

WOOF_HTML

A utility class for generating HTML code, used heavily throughout the MasterPress UI, but also handy for theme development.

WOOF_Image

A powerful class representing an image file within your WordPress site, which offers resizing, cropping, and manipulation features.

WOOF_Inflector

A utility class for working with English-language strings, offering operations like pluralization, singularization, underscoring, title-casing, and so on. Based on a component of the Akelos framework, which is a port of the Ruby on Rails Inflector.

WOOF_Post

Represents a single post or page in WordPress, including posts based on custom post types.

WOOF_PostCol

Provides methods used in the presentation of columns in WordPress post listings screens. 

WOOF_PostType

Represents a WordPress post type (custom or built-in), containing many powerful methods for querying, and working with posts of each type.

WOOF_Silent

A powerful class that provides silent failure for error or empty-object conditions, allowing theme developers to code in a more concise style, reminiscent of aspects of jQuery.

Note: you won’t generally create a WOOF_Silent object, or request once specifically – they are purely a shell object which the rest of the API uses to return conditions that would normally be “false”, or an error”

WOOF_Taxonomy

Represents a single Taxonomy (custom or built-in) within WordPress, containing many powerful methods for working with the terms within each taxonomy. 

WOOF_Term

Represents a single term within a WordPress taxonomy, containing many powerful methods for working with them.

WOOF_User

Represents a single user within WordPress.

WOOF_Wrap

An abstract base class for most of the other classes in the API, providing common behaviours such as property and method overloading via PHP’s magic methods.

MEOW

MEOW

Extends the WOOF class to include support for MasterPress field sets and incoming post relationships. 

MEOW_Field

Represents a single field within a MasterPress field set. 

MEOW_FieldSet

Represents a single field set item within a multiple-item field set. 

MEOW_FieldSetCollection

Represents the collection of field set item records in a MasterPress multiple-item field set.

MEOW_Post

Extends the WOOF_Post class to include support for MasterPress field sets and incoming post relations.

MEOW_PostType

Extends the WOOF_PostType class to augment in_a, in_the, with_a, and so on methods to regard posts which are linked to taxonomy terms via related term fields (and not via the standard UI).

MEOW_Term

Extends the WOOF_Term class to include support for MasterPress field sets and incoming post relations.

MEOW_User

Extends the WOOF_User class to include support for MasterPress field sets and incoming post relations.

Field Types

MPFT

The base class for all MasterPress field types, which establishes the necessary methods for implementing a field type user interface, and a base API for each field type used in theme development.

MPFT_Audio

The UI and API implementation for the Audio File upload field type.

MPFT_Checkbox

The UI and API implementation for the single Checkbox field type.

MPFT_DropDownList

The UI and API implementation for the Dropdown List (HTML single-select) field type, augmented by Select2.

MPFT_File

The UI and API implementation for the generic File Upload field type.

MPFT_FileBase

Provides common UI and API implementation details to all upload field types.

MPFT_Image

The UI and API implementation for the Image File Upload field type.

MPFT_ListBox

The UI and API implementation for the List Box (HTML multi-select) field type, augmented by Select2.

MPFT_Map

The UI and API implementation for the Map field type.

MPFT_Spinner

The UI and API implementation for the Input Spinner (numerical input) field type.

MPFT_TextBox

The UI and API implementation for the Text Box (HTML text input) field type.

MPFT_TextBoxMultiline

The UI and API implementation for the Multiline Text Box (HTML textarea) field type.

MPFT_Video

The UI and API implementation for the Video field type, allowing you to link to videos on YouTube or Vimeo.

MPFT_VisualEditor

The UI and API implementation for the Visual (TinyMCE) and HTML (CodeMirror) rich content field type.

Latest From the Blog

MasterPress 1.3.10 is now available

9th November 2023

MasterPress 1.3.10 is a feature and bugfix release. Workaround for fatal error introduced by changes to WordPress’ wpdb class in WordPress 6.4. Added actions to MPC files upload_field & WF image save_image functions.

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the WordPress.com hosted service.

Three AM