You are here

function hook_icon_providers in Icon API 8

Same name and namespace in other branches
  1. 7 icon.api.php \hook_icon_providers()

Define information about icon providers.

To provide archived file import support, a provider must implement hook_icon_PROVIDER_import_process() and hook_icon_PROVIDER_import_validate().

Return value

array An associative array containing:

  • provider_name: A unique machine name and an associative array containing:

    • title: Optional, human readable title for the provider. If omitted, it will fall back to using the provider_name.
    • url: Optional, URL for more information regarding the provider.
    • default bundle: Optional, an array containing default bundle properties specific to this provider.

See also

icon_icon_providers()

icon_provider_load()

icon_providers()

icon_provider_defaults()

hook_icon_PROVIDER_import_process()

hook_icon_PROVIDER_import_validate()

1 function implements hook_icon_providers()

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

icon_icon_providers in includes/bundles.inc
Implements hook_icon_providers().

File

./icon.api.php, line 239
icon.api.php Hooks and form elements provided by the Icon API module.

Code

function hook_icon_providers() {
  $providers['my_provider'] = array(
    'title' => t('My Provider'),
    'url' => 'http://example.com',
    'default bundle' => array(
      'render' => 'sprite',
      'settings' => array(),
    ),
  );
  return $providers;
}