Support » Plugins » Hook for Settings->Discussions page

  • Resolved jephperro


    Hi, I need a little help finding the right hook.

    I’m writing a simple plugin for my WPMU site to disable (with javascript) one checkbox on the Settings->Discussion page.

    (I don’t want my users ever configuring their blog without the “administrator must always approve the comment” checked)

    Anyhoo, I can’t find a good hook to attach to when this page is loaded. The best that I can find is admin_print_scripts, or admin_footer so I can print some javascript to find the id (id=’comment_moderation’), to check the box and disable it

    Is there a hook I can use when the Settings->Discussion page is finished loading? Is there something better I could use?



Viewing 3 replies - 1 through 3 (of 3 total)
  • Attach a stylesheet and a small piece of jQuery to hide it?…

    Just as quick dirty fix?

    jquery hide it, then use the stylesheet to display:none as a backup incase the user has JS disabled…

    Well, yes, that would kind of work. But I really have to do 2 things:

    1. Make sure that the checkbox is checked.
    2. Disable the checkbox so the user cannot change it.

    So I’d rather not hide the div. So my solution so far is to use javascript to check and disable “comment_moderation”. The hook I use now is admin_footer,

    I was hoping for a better way, but maybe the only way to do it is quick and dirty.

    <input disabled="disabled" checked="checked …etc..

    Sets the checkbox to checked and disabled…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hook for Settings->Discussions page’ is closed to new replies.