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

Returns:

  • String Note: always returns the embed code regardless of whether the get parameter is true or not.

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. Please see the example for example code that you can place in your functions.php file.

Example:

Parameters:

  • Array / String $args

    An associative array or query string (compatible with wp_parse_args) which supports the following values:

    • id – the ID of the embed wrapping element – defaults to “player-“.md5(video_id)
    • version – the minimum flash player version required (for flash embeds). default 8
    • width – default 640
    • height – default 360
    • params – an args array or query string with the embed flash params.
      default: array( “allowScriptAccess” => “always”, “wmode” => “transparent” )
    • flashvars – an args array or query string with the flashvars.
      default: array()
    • attr – the HTML attributes in the output object tag (flash embed)
      default: array()
  • Array / String $options = uses the defaults in the player embed documentation.

    An associative array or query string (compatible with wp_parse_args) with the player options for the relevant video host (see method description).

  • Boolean $get = false

    Whether to get the embed code only. If this is false, the code will be echoed immediately, otherwise it is returned.

Latest From the Blog

Ability to deactivate licence domains within MasterPress account management

25th October 2024

We have just rolled out an account management feature which allows licence holders to have better control over the domains that use their licence key. From the MasterPress Account Management page, the list of Active Sites that use your licence now includes a function that allows you to remove a domain from your licence. Simply… 

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