[development] _settings hook deprecated

Dries Buytaert dries.buytaert at gmail.com
Mon Jul 10 19:43:36 UTC 2006


Hello world,

I just committed a patch that reorganizes the settings page, and that  
deprecates the _settings hook.  Settings pages are no longer a  
special case.  Modules that want to add a settings page should now  
use the regular menu callback system.  Add a MENU_NORMAL_ITEM to your  
modules _menu() function and register your module's settings page(s)  
under ?q=admin/settings/<some-path>. In your callback, you need to  
define the form using the forms API. You don't have to implement a  
_validate or _submit hook. Just use the helper function  
system_settings_form().  It takes no more than five minutes to  
convert your existing settings page.

I documented that change at http://drupal.org/node/64279#hook-settings.

Kind regards,

--
Dries Buytaert  ::  http://www.buytaert.net/



More information about the development mailing list