BuddyDev

Search

mpp_register_gallery_view( $type, $view )

Register a gallery view for the given type.

Description

This function is used to register new gallery view for given type. Admin can choose to use this view from the settings page for each component.

Parameters

$type (String) (Required):- The unique identifier for the media type we registered via mpp_register_type

$view (MPP_Gallery_View) (Required):- An object of MPP_Gallery_View type. You must extend this class to provide a concrete implementation.

Returns

Boolean. True on success, false on failure.

 Examples

The code shows how we register the default gallery view(grid view) for photos.

Note:-

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

See also:-

mpp_deregister_gallery_view

 Changelog

  • Since 1.0.0

Source

medisapress/core/api/mpp-api.php