Hook: admin_menu_tags
avatar
Señor FAQ

¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.


Hook: admin_menu_tags

The admin_menu_tags hook allows developers to add or modify menu items in the "Tags" dropdown menu of the admin interface.

Usage


renderDropdownMenu(
    'tags', 
    'fas fa-tags', 
    $lang['tags'], 
    $jkv['theme_admin'], 
    [
        ['url' => DynamicRewrite::parseUrl('tags'), 'label' => $lang['tags'], 'page' => 'tags'],
        ['url' => DynamicRewrite::parseUrl('tags', 'settings'), 'label' => $lang['settings'], 'page' => 'tags', 'page1' => 'settings']
    ], 
    'admin_menu_tags'
);
    

This hook ensures flexibility for adding tags-related options to the "Tags" dropdown.

Example Implementation


DynamicHooks::addHook('admin_menu_tags', function () {
    return [
        ['url' => '/custom-tags', 'label' => 'Custom Tags']
    ];
}, 'tags_plugin_namespace');
    

Best Practices

  • Ensure tag-related menu items are categorized logically.
  • Provide clear labels for tags-related menu items.
  • Test added items for proper integration.

Troubleshooting

  • Verify the hook is registered under the intended namespace.
  • Check for conflicts with other plugins modifying the "Tags" menu.
Was this article helpful?
0 out of 0 found this helpful