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
Andrew Nacin de15d6636a Add manual new lines to a string, as double quotes with \n is not optimal due to sprintf-parsing reasons. props SergeyBiryukov, fixes #22486. see #22260.
git-svn-id: https://develop.svn.wordpress.org/trunk@22664 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 06:11:42 +00:00
Peter Westwood e64c828f44 i18n: Fix the usage of sprintf replacements in the Multisite Network Admin new site page. See #22260.
git-svn-id: https://develop.svn.wordpress.org/trunk@22272 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 11:30:09 +00:00
Ryan Boren 8d5ca186c2 Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: https://develop.svn.wordpress.org/trunk@22124 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 19:04:34 +00:00
Mark Jaquith 52801db5fc Make Multisite work when WordPress is installed in a subdirectory. You can now have WordPress Multisite as an SVN external or a Git submodule! props johnjamesjacoby, evansolomon, duck_, jakemgold, nacin, markjaquith. see #19796
git-svn-id: https://develop.svn.wordpress.org/trunk@22042 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:07:21 +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
Andrew Nacin d8e2eb8943 Do not break a domain on network/site-new.php across two lines. props SergeyBiryukov, fixes #19895.
git-svn-id: https://develop.svn.wordpress.org/trunk@20621 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-27 19:02:10 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +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
Ryan Boren 996231e74d Use get_site_url() instead of hard-coding the protocol. Props SergeyBiryukov, exell.christopher. fixes #17466
git-svn-id: https://develop.svn.wordpress.org/trunk@19211 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-08 14:13:42 +00:00
Andrew Nacin 840f20feb2 More s/add_help_sidebar/set_help_sidebar/. fixes #19020.
git-svn-id: https://develop.svn.wordpress.org/trunk@19122 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-02 21:32:16 +00:00
Ryan Boren 71aa0059d0 Use add_help_sidebar(). see #19020
git-svn-id: https://develop.svn.wordpress.org/trunk@19114 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-02 05:33:53 +00:00
Andrew Nacin 1287ec492a Translated strings in attributes require esc_attr(). s/_e/esc_attr_e/g
git-svn-id: https://develop.svn.wordpress.org/trunk@19028 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-20 15:04:46 +00:00
Andrew Nacin b709c2ac4e Add 'Visit Dashboard' and 'Edit Site' links to the site added message on site-new.php. props vegasgeek, SergeyBiryukov. fixes #18047. fixes #17313.
git-svn-id: https://develop.svn.wordpress.org/trunk@18750 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-22 07:17:27 +00:00
Ryan Boren 24c08b8bf5 Allow creating sites with IDN domains. Props SergeyBiryukov, wpmuguru. fixes #15554
git-svn-id: https://develop.svn.wordpress.org/trunk@18473 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-26 21:35:39 +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 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 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
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
Peter Westwood ea7bd69745 Generate Human Readable passwords as they are much more userfriendly. Fixes #13324 props Otto42.
git-svn-id: https://develop.svn.wordpress.org/trunk@16284 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 23:31:54 +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
Andrew Nacin c6f08a2929 And site-new, too. props PeteMall, see #15174.
git-svn-id: https://develop.svn.wordpress.org/trunk@15908 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 20:31:01 +00:00
Andrew Nacin 63f0dd2135 Add @since to new file. props markmcwilliams. see #15174.
git-svn-id: https://develop.svn.wordpress.org/trunk@15895 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 15:38:50 +00:00
Ryan Boren e93f819e09 Move add site form to site-new.php. see #15174
git-svn-id: https://develop.svn.wordpress.org/trunk@15886 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 13:49:49 +00:00