How to Rebuild Registry On Admin Form Submit I would like to initiate theme registry rebuild(drupal_theme_rebuild) on a particular form submit. This is admin form for my custom settings:

function HOOK_menu(){
 $items['admin/some-url'] = array(
        'title' =&gt; 'Custom Settigns',
        'page callback' =&gt; 'drupal_get_form',
        'page arguments' =&gt; array('my_admin_interface'),
        'access arguments' =&gt; array('administer users'),
        'type' =&gt; MENU_NORMAL_ITEM,
    );
 return $items;
}

function my_admin_interface($form, $form_state)
{
    $form['some_settings'] = array(...);
    return system_settings_form($form);
}


The form works well and the settings are being saved, however. The changes involve theme functions, so I need to rebuild the registry whenever the form is submited. What is the best approach? Can I attach to form element function drupal_theme_rebuild or there is hook I can use to call  drupal_theme_rebuild(). What is the best way rebuild theme registry after a form is processed and new settings saved. Thank you for your help
In order to fire a submit callback you have to add it to #submit array within your form. Here is an example.

/**
 * Form builder.
 */
function my_admin_interface($form, $form_state) {
  $form['#submit'][] = 'my_admin_interface_submit';
  return system_settings_form($form);
}

/**
 * Submit handler.
 */
function my_admin_interface_submit($form, $form_state) {
  drupal_set_message(t('Hey there!'));
}


Here is a link to the manual.