function _entity_embed_button_image in Entity Embed 7.3
Same name and namespace in other branches
- 7 entity_embed.module \_entity_embed_button_image()
- 7.2 entity_embed.module \_entity_embed_button_image()
Helper function to create a URL to an embed button icon.
Parameters
int $fid: A file ID.
Return value
string A string containing a URL that may be used to access the file.
2 calls to _entity_embed_button_image()
- entity_embed_editor_ckeditor_plugins in ./
entity_embed.editor_ckeditor.inc - Implements hook_editor_ckeditor_plugins().
- _entity_embed_entity_embed_js_settings in ./
entity_embed.module - Implements callback_filter_js_settings().
File
- ./
entity_embed.module, line 555 - Provides a CKEditor plugin and text filter for embedding and rendering entities.
Code
function _entity_embed_button_image($fid) {
$url = file_create_url(drupal_get_path('module', 'entity_embed') . '/js/plugins/drupalentity/entity.png');
if ($fid) {
if ($file = file_load($fid)) {
$url = file_create_url($file->uri);
}
}
return $url;
}