function hook_media_browser_plugin_info

cis7 media.api.php hook_media_browser_plugin_info()
cle7 media.api.php hook_media_browser_plugin_info()
elmsmedia7 media.api.php hook_media_browser_plugin_info()
icor7 media.api.php hook_media_browser_plugin_info()
meedjum_blog7 media.api.php hook_media_browser_plugin_info()
mooc7 media.api.php hook_media_browser_plugin_info()

Returns a list of plugins for the media browser.

Return value

array A nested array of plugin information, keyed by plugin name. Each plugin info array may have the following keys:

  • title: (required) A name for the tab in the media browser.
  • class: (required) The class name of the handler. This class must implement a view() method, and may (should) extend the MediaBrowserPlugin class.
  • weight: (optional) Integer to determine the tab order. Defaults to 0.
  • access callback: (optional) A callback for user access checks.
  • access arguments: (optional) An array of arguments for the user access

check.

Additional custom keys may be provided for use by the handler.

See also

hook_media_browser_plugin_info_alter()

media_get_browser_plugin_info()

2 functions implement hook_media_browser_plugin_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

media_internet_media_browser_plugin_info in sites/all/modules/ulmus/media/modules/media_internet/media_internet.media.inc
Implements hook_media_browser_plugin_info().
media_media_browser_plugin_info in sites/all/modules/ulmus/media/media.media.inc
Implements hook_media_browser_plugin_info().
1 invocation of hook_media_browser_plugin_info()
media_get_browser_plugin_info in sites/all/modules/ulmus/media/media.module
Returns metadata describing Media browser plugins.

File

sites/all/modules/ulmus/media/media.api.php, line 50
Hooks provided by the Media module.

Code

function hook_media_browser_plugin_info() {
  $info['media_upload'] = array(
    'title' => t('Upload'),
    'class' => 'MediaBrowserUpload',
    'weight' => -10,
    'access callback' => 'user_access',
    'access arguments' => array('create files'),
  );

  return $info;
}