MPFT_Video

Extends MPFT

Methods

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

Field Properties

This field type stores the following field properties alongside the standard value:

  • aspect_ratio YouTube

    A short description of the aspect ratio of the video. e.g. “widescreen”

  • categories YouTube

    An array of category descriptions

  • description YouTube Vimeo

    The description of the video

  • duration YouTube Vimeo

    The duration of the video in hh:mm:ss format

  • width Vimeo

    The width of the video

  • height Vimeo

    The height of the video

  • host YouTube Vimeo

    The host of the video, either youtube or vimeo

  • keywords YouTube Vimeo

    A CSV string of keywords attached to the video

  • published YouTube Vimeo

    The publish date of the video in UTC format

  • stats Vimeo

    An associative array of statistics related to the video containing, number_of_likes, number_of_comments, number_of_plays

  • thumbnail YouTube Vimeo

    A primary thumbnail for the video, returned as a WOOF_Image

  • thumbnails YouTube Vimeo

    An associative array of URLs of thumbnails for the video

  • title YouTube Vimeo

    The title of the video

  • updated YouTube

    The last update date of the video

  • user_name Vimeo

    A descriptive user name for the video

  • video_id YouTube Vimeo

    The id of the video on YouTube and Vimeo, as used in the video URL

List of Methods

Property Methods

  • __toString()String

    Overloads the --to-string method to output a default embed for the video when this field is echoed. Note: this method is not intended to be called directly.

  • embed( Array / String $args, Array / String $options = uses the defaults in the player embed documentation., Boolean $get = false )String

    Embeds the video using appropriate embed code for the host of the video. Allows you to specify the flashvars, params, and embed API options in an arguments parameter.For API options relevant to Vimeo, see here.For API options relevant to YouTube, see here.Note: Embedding videos requires swfobject to be enqueued in your page.

  • url()String

    A synonym for the value method, to make code more readable, noting that the video type stores the URL of the video as its primary data. .

  • __toString()String

    Overloads the --to-string method to output a default embed for the video when this field is echoed. Note: this method is not intended to be called directly.

  • embed( Array / String $args, Array / String $options = uses the defaults in the player embed documentation., Boolean $get = false )String

    Embeds the video using appropriate embed code for the host of the video. Allows you to specify the flashvars, params, and embed API options in an arguments parameter.For API options relevant to Vimeo, see here.For API options relevant to YouTube, see here.Note: Embedding videos requires swfobject to be enqueued in your page.

  • url()String

    A synonym for the value method, to make code more readable, noting that the video type stores the URL of the video as its primary data. .

Base Class Methods

View method list from the base class MPFT.

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