Commit Graph

27 Commits

Author SHA1 Message Date
Ryan Boren 436b32ef62 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
git-svn-id: https://develop.svn.wordpress.org/trunk@23567 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:14:09 +00:00
Ryan Boren c363aea627 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:28:40 +00:00
Ryan Boren a6c8efadb9 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Ryan Boren ce960f67a0 Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().
Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.

Group multiple operations within a single switch where possible.

fixes #21432


git-svn-id: https://develop.svn.wordpress.org/trunk@21414 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-03 17:51:42 +00:00
Andrew Nacin 8ecb207683 Correct the link to http://codex.wordpress.org/Network_Admin_Sites_Screen in the network admin help sidebars. props Nao. fixes #20607.
git-svn-id: https://develop.svn.wordpress.org/trunk@20713 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-03 13:34:33 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Ryan Boren 9f8cbd8efc Use WP_Screen::add_help_tab(). see #19020
git-svn-id: https://develop.svn.wordpress.org/trunk@19514 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-01 02:22:07 +00:00
Andrew Nacin 4cb3487019 More help sidebars. see #19020.
git-svn-id: https://develop.svn.wordpress.org/trunk@19121 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-02 20:54:56 +00:00
Ryan Boren a118d32b6b Link to site being edited. Props lloydbudd. fixes #17257
git-svn-id: https://develop.svn.wordpress.org/trunk@18129 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-03 15:35:45 +00:00
Andrew Nacin 3816cc9b8a D'oh. Use the proper URL to the multisite support forum. see #15880.
git-svn-id: https://develop.svn.wordpress.org/trunk@17144 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-25 19:21:00 +00:00
Andrew Nacin 91bb1425e9 Move to what will be the new Network Admin Codex page URLs. see #15314.
git-svn-id: https://develop.svn.wordpress.org/trunk@17045 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-18 18:27:12 +00:00
Andrew Nacin 5ca70d0b83 Merge the help strings across the network/site- pages. see #15880.
git-svn-id: https://develop.svn.wordpress.org/trunk@17044 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-18 18:02:11 +00:00
Andrew Nacin 8336d6afcf Network admin contextual help fixes. props SergeyBiryukov, fixes #15314.
git-svn-id: https://develop.svn.wordpress.org/trunk@17037 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-17 23:34:10 +00:00
Andrew Nacin e01d886bfe Minor cleanups.
git-svn-id: https://develop.svn.wordpress.org/trunk@16986 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 07:41:38 +00:00
Andrew Nacin 7a5a8de701 Network Admin: Rename Options to Settings. Kick the tab to the end as well. see #15314.
git-svn-id: https://develop.svn.wordpress.org/trunk@16984 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 07:13:01 +00:00
Andrew Nacin b4bede6797 Move to 'Documentation on XY' in the network admin. see #15314.
git-svn-id: https://develop.svn.wordpress.org/trunk@16983 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 07:07:42 +00:00
Andrew Nacin 4ab83c02c8 Network Admin contextual help. props andrea_r (!), see #15314.
git-svn-id: https://develop.svn.wordpress.org/trunk@16981 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 06:52:47 +00:00
Andrew Nacin 3ebb27ae3e Always exit after wp_redirect. props filosofo, fixes #15518.
git-svn-id: https://develop.svn.wordpress.org/trunk@16847 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-09 18:02:54 +00:00
Andrew Nacin f11e53166e s/can_edit_site/can_edit_network/g. see #15720.
git-svn-id: https://develop.svn.wordpress.org/trunk@16833 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-09 12:36:39 +00:00
Peter Westwood 9c2a7dc314 Introduce can_edit_site to replace inline checks on whether or not the site_id is for the current Network. See #15716.
git-svn-id: https://develop.svn.wordpress.org/trunk@16764 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-07 14:28:40 +00:00
Pete Mall f9c217c5e3 Add missign hooks in site-options. Fixes #15593
git-svn-id: https://develop.svn.wordpress.org/trunk@16627 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-30 20:29:02 +00:00
Ryan Boren 31ecc8008a Whitespace cleanup. Props sorich87. see #14147
git-svn-id: https://develop.svn.wordpress.org/trunk@16306 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-11 16:57:22 +00:00
Andrew Nacin ffd50167bd Network admin multisite checks and docs. see #14435.
git-svn-id: https://develop.svn.wordpress.org/trunk@16272 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 14:27:15 +00:00
Ryan Boren ae76af21a9 Generalize seletion for h2 and h3 tabs. Props chrisbliss18 fixes #15154
git-svn-id: https://develop.svn.wordpress.org/trunk@15962 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-25 20:45:58 +00:00
Andrew Nacin b61c50cbf3 Use correct network admin icon. props PeteMall, see #15174.
git-svn-id: https://develop.svn.wordpress.org/trunk@15907 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 20:24:54 +00:00
Andrew Nacin 337eeb3134 Checkboxes over radio buttons for site info tab. Values outside of 0/1 won't be changed, see #12832 for previous discussion. see #15174.
git-svn-id: https://develop.svn.wordpress.org/trunk@15906 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 20:23:54 +00:00
Ryan Boren 69994bf7ca Tabbed interface for site editing. see #15174
git-svn-id: https://develop.svn.wordpress.org/trunk@15903 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 18:35:52 +00:00