If my module provides its own toggles via the hook_fasttoggle_* hooks, the only thing that doesn't work is no one will see my toggle on the admin/settings/fasttoggle page and therefore, it will never get 'enabled'. The only way to do this is to have sub-module alter the fasttoggle settings form:

/**
 * Implements hook_form_FORM_ID_alter().
 */
function disemvowel_form_fasttoggle_settings_form_alter(&$form, $form_state) {
  $form['comments']['fasttoggle_comment_settings']['#options']['disemvowel'] = t('Disemvowel/Un-disemvowel');
}

It would make sense that somehow the options should be populated based on the data from hook_fasttoggle_options() or hook_fasttoggle_labels().

Comments

nigelcunningham’s picture

Assigned: Unassigned » nigelcunningham

I'll look into this - I think I can see room to clean things up a little, and part of that might be making a better API for adding other toggles/flags.

ari-meetai’s picture

Version: 6.x-1.x-dev » master

settings.php should not be the place for this...

hook_fasttoggle_labels() doesn't really function as expected.

nigelcunningham’s picture

Issue summary: View changes

D7's dev branch has seen a major rework that should make this much more doable. Is there still interest?

nigelcunningham’s picture

Status: Active » Closed (fixed)

In fact, I think this should be entirely doable now, as the node, user and comment support has all been moved into submodules - disemvowel should be able to use the same api.

Closing as fixed; please reopen if you find issues.