Hook: admin_menu_settings
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_settings

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

Usage


renderDropdownMenu(
    'settings', 
    'fas fa-sliders-h', 
    $lang['settings'], 
    $jkv['theme_admin'], 
    [
        ['url' => DynamicRewrite::parseUrl('settings'), 'label' => $lang['settings'], 'page' => 'settings'],
        ['url' => DynamicRewrite::parseUrl('social'), 'label' => $lang['site_social'], 'page' => 'social']
    ], 
    'admin_menu_settings'
);
    

This hook ensures flexibility for adding settings-related options to the "Settings" dropdown.

Example Implementation


DynamicHooks::addHook('admin_menu_settings', function () {
    return [
        ['url' => '/custom-settings', 'label' => 'Custom Settings']
    ];
}, 'settings_plugin_namespace');
    

Best Practices

  • Ensure menu items align logically within the settings dropdown.
  • Use clear labels and ensure valid URLs for settings items.
  • Test settings-related menu items thoroughly.

Troubleshooting

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