[development] _settings hook deprecated

Khalid B kb at 2bits.com
Mon Jul 10 20:25:55 UTC 2006


I added an example to the page to make it clearer.

On 7/10/06, Dries Buytaert <dries.buytaert at gmail.com> wrote:
> 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