[wp-trac] [WordPress Trac] #25344: Introduce *_network_meta() functions

WordPress Trac noreply at wordpress.org
Tue Sep 17 17:33:45 UTC 2013


#25344: Introduce *_network_meta() functions
-------------------------+-----------------------------
 Reporter:  jeremyfelt   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Multisite    |    Version:
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 The `get_metadata()`, `update_metadata()`, `delete_metadata()`, and
 `add_metadata()` functions are abstracted well enough for posts, comments,
 and users that adding in wrappers for network meta is pretty straight
 forward.

 The attached patch introduces `get_network_meta()`,
 `update_network_meta()`, `delete_network_meta()`, and
 `add_network_meta()`.

 A few caveats:
 * The table we're pulling from is sitemeta, which is a bummer. While the
 functions are named `*_network_meta()`, we still end up passing `site` as
 a parameter to the wrapped function. As it stands, any filters available
 would still need to use `site` rather than network. There's a chance we
 can work around this with some logic on the underlying functions, but I
 didn't go that far yet.
 * Certain network meta likely has more consequence when removed. It may be
 worth protecting a few of the meta keys so that they are validated
 properly and are not deleted. See next point.
 * This may or may not belong as part of an overall Network strategy that
 includes better structure around what a WP_Network object looks like and
 requires. That thought probably belongs somewhere else. :)

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25344>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list