The MU forums have moved to WordPress.org

WPMU site admin add_action hooks (9 posts)

  1. delayedinsanity
    Member
    Posted 14 years ago #

    Are we going to see hooks for adding code to the Site Admin pages (such as 'Edit Blogs') in the merge? It would be very welcome! I was in the middle of adding some extended options to the wpmu-blogs.php, when 2.8.2 came out... :P

  2. SteveAtty
    Member
    Posted 14 years ago #

    I've added my own function box to the edit posts page, and its draggable too.

    But maybe thats not what you mean.

  3. delayedinsanity
    Member
    Posted 14 years ago #

    Heh sort of, but not really. I've added a few dialogs to the edit blogs page, but they're added directly through wpmu-blogs.php (and handled in wpmu-edit.php).

    It would be nice to ease upgrades if there was some kind of add_action hook to drop code into the site admin pages. :)

  4. delayedinsanity
    Member
    Posted 14 years ago #

    Hmm, pardon me while I eat my words... do_action.

  5. dsader
    Member
    Posted 14 years ago #

    Edit blogs page has "Misc Blog Actions"

    Example:

    add_action('wpmueditblogaction', 'blah');
    function blah() {
    global $options;
    //print_r($options); //just to see what's in $options
    echo some html;
    Then,
    Build your inputs(radio, checkbox etc) with $options['whatever_option']
    Done.
    }

    I use the wpmueditblogaction hook in "More Privacy Options" plugin.

  6. delayedinsanity
    Member
    Posted 14 years ago #

    Yeah, although I scanned through the files I didn't know at the time I could just look for the do_action()'s to find all the built in hooks. Now that I've done my studying on the Actions API, I've found them all since, and even wrote about it a little haha, Adding your own hooks....

    ¡Muchas gracias! everybody.

  7. SteveAtty
    Member
    Posted 14 years ago #

    Nice little article

  8. delayedinsanity
    Member
    Posted 14 years ago #

    Thank you. :) I'm going to try and write them as I go, and while I know there's already a lot out there, more never hurt anybody. Helps me to learn too.

  9. SteveAtty
    Member
    Posted 14 years ago #

    It does, I keep meaning to write up my snippet of code for the draggable section I added to the edit post/page screen.

About this Topic

  • Started 14 years ago by delayedinsanity
  • Latest reply from SteveAtty