Commit Graph

109 Commits

Author SHA1 Message Date
Sergey Biryukov 69566bbd21 Make get_home_path() return consistent slashes. fixes #23175.
git-svn-id: https://develop.svn.wordpress.org/trunk@23669 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-12 11:04:14 +00:00
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
Mark Jaquith 24a509c81a Resolve DOCUMENT_ROOT symlinks and standardize Windows slashing for various paths related to Multisite rewrite rule generation. props SergeyBiryukov, nacin, wpewill. fixes #23104 and #23073 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@23295 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-10 08:08:14 +00:00
Mark Jaquith 30ead1f605 Fix code vomit in IIS rewrite rule generation. fixes #22920 for trunk. props toscho.
git-svn-id: https://develop.svn.wordpress.org/trunk@23177 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-13 22:54:36 +00:00
Andrew Nacin 40e9cce21d When creating a network, use get_home_path() to calculate where .htaccess (or web.config) lives. fixes #22639.
git-svn-id: https://develop.svn.wordpress.org/trunk@22982 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 03:42:02 +00:00
Andrew Nacin 81a083e180 Remove errant space.
git-svn-id: https://develop.svn.wordpress.org/trunk@22981 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 02:59:04 +00:00
Andrew Nacin e517a360cd Correctly calculate the location of wp-config.php, used in the instructions for setting up a network. see #22639.
git-svn-id: https://develop.svn.wordpress.org/trunk@22980 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 02:54:29 +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 7f29924c6a Remove ms-files.php rewriting from WordPress multisite. fixes #19235.
Keep existing networks compatible with a ms_files_rewriting network option.



git-svn-id: https://develop.svn.wordpress.org/trunk@21823 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 22:22:20 +00:00
Andrew Nacin 4ca469ce8f Align the spacing of the multisite constants with what has been long-established in wp-config and wp-config-sample. props ryanduff, fixes #19869.
git-svn-id: https://develop.svn.wordpress.org/trunk@19956 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-20 16:35:03 +00:00
Ryan Boren c9b84969c3 s/Admin Bar/Toolbar/. Props ocean90. fixes #19461
git-svn-id: https://develop.svn.wordpress.org/trunk@19569 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-08 16:49:16 +00:00
Daryl Koopersmith 9dd06a1af9 Update help text on settings pages. props Ipstenu, see #19020.
git-svn-id: https://develop.svn.wordpress.org/trunk@19472 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-29 16:58:58 +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
Ryan Boren fd10e500e4 Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@19054 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-24 19:13:23 +00:00
Andrew Nacin 86638ed332 Use correct capture group in IIS7 multisite subdirectory rewrite rules. props carlospaulino, eduplessis, ruslany. fixes #17708.
git-svn-id: https://develop.svn.wordpress.org/trunk@19018 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-19 22:57:37 +00:00
Andrew Nacin 804702bc00 Close strong tag. props scribu. fixes #18970.
git-svn-id: https://develop.svn.wordpress.org/trunk@18979 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-17 18:57:06 +00:00
Ryan Boren 319d070078 Introduce wp_get_db_schema() for rerieving the various flavors of the WP db schema. Eliminates need to use global. Allows multiple calls to wpmu_create_blog(). see #12028
git-svn-id: https://develop.svn.wordpress.org/trunk@18899 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-06 00:21:24 +00:00
Mark Jaquith a3bdf19206 Be more consistent with ERROR: messages. fixes #15887
git-svn-id: https://develop.svn.wordpress.org/trunk@18841 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 17:18:35 +00:00
Jon Cave 8a96846c8d Fix undefined index "subdomain_install" in wp-admin/network.php. Props cyberhobo, SergeyBiryukov. Fixes #17697.
git-svn-id: https://develop.svn.wordpress.org/trunk@18692 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-16 21:20:43 +00:00
Andrew Nacin db79dcc18a Use correct closing tag. props pagesimplify. (wp-hackers)
git-svn-id: https://develop.svn.wordpress.org/trunk@18492 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-31 22:16:19 +00:00
Peter Westwood 7fa99c4253 Help Tab text updatates. Fixes #17312 prop dougwrites.
git-svn-id: https://develop.svn.wordpress.org/trunk@18092 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-01 15:37:04 +00:00
Ryan Boren 9781af86f5 Update some network admin help text. Props dougwrites. fixes #16988
git-svn-id: https://develop.svn.wordpress.org/trunk@17921 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-13 19:25:38 +00:00
Andrew Nacin f504e221e1 Switch from Panel/SubPanel to Screen in inline documentation and Codex links. props michaelh, fixes #17265.
git-svn-id: https://develop.svn.wordpress.org/trunk@17748 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-28 15:24:49 +00:00
Andrew Nacin 9fd728dc4e Set base if we return to network step 2. props scribu, fixes #15620.
git-svn-id: https://develop.svn.wordpress.org/trunk@17323 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-16 21:50:45 +00:00
Andrew Nacin a3a37df98a Help fixes. props zeo, fixes #15346.
git-svn-id: https://develop.svn.wordpress.org/trunk@17014 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-17 03:32:46 +00:00
Ryan Boren deea690720 Better backup notices. Props SergeyBiryukov, kapeels. fixes #15753
git-svn-id: https://develop.svn.wordpress.org/trunk@16921 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 17:02:29 +00:00
Ryan Boren 6dc2d07bc4 Pink trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@16900 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-13 21:21:50 +00:00
Andrew Nacin 3e38f2e429 Optimize the keys/salts textarea. fixes #15092.
git-svn-id: https://develop.svn.wordpress.org/trunk@16746 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-06 15:26:30 +00:00
Ryan Boren 71ec2d33de Network setup fixes. Props wpdavis. fixes #15620
git-svn-id: https://develop.svn.wordpress.org/trunk@16672 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-01 21:32:40 +00:00
Andrew Nacin 90343807eb Every time you nest a ternary operator, a kitten dies.
git-svn-id: https://develop.svn.wordpress.org/trunk@16455 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-18 05:37:00 +00:00
Andrew Nacin 2b9c7f6113 Redirect from network.php to network/setup.php. see #15461.
git-svn-id: https://develop.svn.wordpress.org/trunk@16454 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-18 05:29:03 +00:00
Andrew Nacin dc27759993 Move the network version of Tools > Network to the network admin. props wpdavis, fixes #15461.
git-svn-id: https://develop.svn.wordpress.org/trunk@16453 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-18 05:24:13 +00:00
Mark Jaquith 55e0256967 esc_textarea() and application for obvious textarea escaping. props alexkingorg. fixes #15454
git-svn-id: https://develop.svn.wordpress.org/trunk@16431 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 17:12:01 +00:00
Andrew Nacin d96e57bed8 Prevent network creation when OMG_DO_NOT_UPGRADE_GLOBAL_TABLES is defined. props wpmuguru, fixes #14246.
git-svn-id: https://develop.svn.wordpress.org/trunk@16094 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-29 22:44:05 +00:00
Mark Jaquith d65cdf4ba8 Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064
git-svn-id: https://develop.svn.wordpress.org/trunk@16061 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-28 21:56:43 +00:00
Andrew Nacin f7345eb522 wp_htmledit_pre for salts in wp-admin/network. fixes #15092.
git-svn-id: https://develop.svn.wordpress.org/trunk@15965 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-26 03:36:23 +00:00
Andrew Nacin 0799c3f519 Avoid extra conditional in the subdirectory rewrite rules. props wpmuguru, fixes #15083.
git-svn-id: https://develop.svn.wordpress.org/trunk@15949 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-24 21:09:33 +00:00
Andrew Nacin 76a83d9086 Correct typo and use full blogs.dir path. props filosofo, fixes #14871.
git-svn-id: https://develop.svn.wordpress.org/trunk@15618 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-14 16:53:28 +00:00
Andrew Nacin f680252c00 Add a constant for allow_subdirectory_install as conventional plugins have to be disabled on network.php. fixes #13844.
git-svn-id: https://develop.svn.wordpress.org/trunk@15225 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-11 16:38:11 +00:00
Andrew Nacin 53d3846f6a target=blank for help. props jorbin, see #13467
git-svn-id: https://develop.svn.wordpress.org/trunk@15132 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-03 21:00:39 +00:00
Ryan Boren f69da134f5 Help text cleanup. Props zeo. fixes #13467
git-svn-id: https://develop.svn.wordpress.org/trunk@15126 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-03 13:37:51 +00:00
Ryan Boren 0922715668 Cut 'em out, move 'em on, trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@15116 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 20:04:07 +00:00
Andrew Nacin 7bf4b1e790 Proper whitespace before and after content within a textarea on network.php. props ocean90.
git-svn-id: https://develop.svn.wordpress.org/trunk@15076 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-31 15:27:31 +00:00
Nikolay Bachiyski ea4293b291 Better detection whether we are on the Network page. Use custom constant to tell us. See #13565, props nacin
We used to load multisite translations each time WP_ALLOW_MULTISITE was defined, but
it could lead to alot of false positives. Generic config files can include to allow
users to updgrade to multisite without further editing the config file.


git-svn-id: https://develop.svn.wordpress.org/trunk@15064 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-29 20:35:19 +00:00
Nikolay Bachiyski 3b599031a1 Remove a space in the beginning of a translatable string.
It was a typo -- the space should have been between the parent and the quote.


git-svn-id: https://develop.svn.wordpress.org/trunk@15051 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-29 12:12:48 +00:00
Ron Rennick ae20f0776b will the real host please step forward, fixes #13594
git-svn-id: https://develop.svn.wordpress.org/trunk@15037 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-28 16:40:55 +00:00
Andrew Nacin 764331ccef Better branching to account for mod_rewrite mimicry. see #12758.
git-svn-id: https://develop.svn.wordpress.org/trunk@15026 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-28 02:58:21 +00:00