WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] multisite settings page, saving data in db - can wp api handle this (4 posts)

  1. munrobr
    Member
    Posted 2 years ago #

    I've got a multisite install:
    I'm looking for wp api to handle a settings page I've created to track and config in-house plugins (has its own top level menu link and sub menus)

    I've used http://ottopress.com/2009/wordpress-settings-api-tutorial/ to take a stab at this, but I feel as though it's only for single site? Either that or I haven't set it up properly, but I've gone through the whole thing multiple times and there's no db update or anything.

    Originally I had it linked to options.php, but obviously as it's a network settings page the page was not found. I removed the options.php and let it just post back to the current custom settings page. Will the functions not fire this way? Is that my problem? I'm pretty new to WP and php, so I'm a bit lost here.

    Any help would be appreciated.
    Thanks!

  2. ericktedeschi
    Member
    Posted 2 years ago #

    The functions get_site_option, update_site_option, delete_site_option and add_site_option can be used to write settings valid in all network.
    My plugin User Security Tools makes use of this functions.

    (http://wordpress.org/extend/plugins/user-security-tools/)

    This functions are in wp-include/functions.php

  3. munrobr
    Member
    Posted 2 years ago #

    This is a great help. Definitely steered me in the right direction.

    For anyone else looking to accomplish the whole register_settings thing on a multisite I definitely recommend the mentioned plugin for guidance. I also took a quick look based on what you said and found a neat tutorial:
    http://wpengineer.com/2324/register-settings-on-wordpress-multisite/

    edit: Just to clarify this is used instead of the register settings.

    Thanks for the help!

  4. francismaile
    Member
    Posted 1 year ago #

    So for multisite plugins, you don't use the Settings API?

Topic Closed

This topic has been closed to new replies.

About this Topic