BuddyDev

Search

mpp_register_media_view( $type, $storage, $view )

Register a new media view. Media views represent single media item.

Description

This function is used to register new views for single media item.

Parameters

$type (String) (Required) :- Unique identifier for the media type

$storage (String) (Required) :- Unique identifier for the storage manager. Media Views are dependent on their storage(e.g remote media vs local media). You should use  “default” or “local” for now.

$view (MPP_Media_View) (Required) :- An object of MPP_Media_View class. All concrete media view must extend MPP_Media_View class.

Returns

Boolean. True on success, false on failure.

 Examples

The example shows how we register a default video view

 

Note:-

It must be used on or after “mpp_setup_core” action.

See also:-

mpp_deregister_media_view

 Changelog

  • Since 1.0.0

Source

medisapress/core/api/mpp-api.php