function hook_media_browser_plugin_info in D7 Media 7.3
Same name and namespace in other branches
- 7.4 media.api.php \hook_media_browser_plugin_info()
- 7 media.api.php \hook_media_browser_plugin_info()
- 7.2 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()
3 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 modules/
media_internet/ media_internet.media.inc - Implements hook_media_browser_plugin_info().
- media_media_browser_plugin_info in ./
media.media.inc - Implements hook_media_browser_plugin_info().
- media_module_test_media_browser_plugin_info in tests/
media_module_test.module - Implements hook_media_browser_plugin_info().
1 invocation of hook_media_browser_plugin_info()
- media_get_browser_plugin_info in ./
media.module - Returns metadata describing Media browser plugins.
File
- ./
media.api.php, line 82 - 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;
}