Hook: admin_menu_logs
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_logs

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

Usage


renderDropdownMenu(
    'logs', 
    'fas fa-tachometer-alt', 
    $lang['logs'], 
    $jkv['theme_admin'], 
    [
        ['url' => DynamicRewrite::parseUrl('activitylogs'), 'label' => $lang['logs_activity'], 'page' => 'activitylogs'],
        ['url' => DynamicRewrite::parseUrl('searchlogs'), 'label' => $lang['logs_search'], 'page' => 'searchlogs']
    ], 
    'admin_menu_logs'
);
    

This hook ensures flexibility for adding logs-related options to the "Logs" dropdown.

Example Implementation


DynamicHooks::addHook('admin_menu_logs', function () {
    return [
        ['url' => '/custom-logs', 'label' => 'Custom Logs']
    ];
}, 'logs_plugin_namespace');
    

Best Practices

  • Ensure log-related items are categorized appropriately.
  • Provide clear labels for log-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 "Logs" menu.
Was this article helpful?
0 out of 0 found this helpful