Commit Graph

61 Commits

Author SHA1 Message Date
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
Sergey Biryukov 16e16c7ee4 Use correct escaping function. fixes #23334.
git-svn-id: https://develop.svn.wordpress.org/trunk@23413 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 05:52:23 +00:00
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Ryan Boren 46d017a331 Use retina logo in install, upgrade, setup-config, repair, and confirmation screens.
Props kopepasah, SergeyBiryukov
fixes #22375


git-svn-id: https://develop.svn.wordpress.org/trunk@22419 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 17:34:22 +00:00
Ryan Boren e260aa0e7a Remove set_time_limit() from sites.php. Props dllh. fixes #19486 see #21521
git-svn-id: https://develop.svn.wordpress.org/trunk@22259 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 21:40:31 +00:00
Ryan Boren 3ca9c27717 Remove dupe/deprecated code from sites.php.
Props wonderboymusic
fixes #21553


git-svn-id: https://develop.svn.wordpress.org/trunk@22064 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 17:11:07 +00:00
Andrew Nacin 245b0655d2 Remove user/site suggestions (autocompletion) from search inputs, as the UX isn't proper.
* Removes all instances of site-search, so away it goes. Sidesteps a number of bugs with site-search.
 * Renames user-search to user-suggest, which means it better describes the current behavior (autocompletion) while allowing for future behavior (instant search).
 * Ties user suggestions to a single .wp-suggest-user class.

with help from markjaquith, helenyhou, wonderboymusic. 
fixes #20835.



git-svn-id: https://develop.svn.wordpress.org/trunk@21003 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-05 18:51:33 +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
Mark Jaquith 461e24643c Autocomplete site names in Network Admin. More user completion areas. props Japh, DrewAPicture. see #19810.
git-svn-id: https://develop.svn.wordpress.org/trunk@20279 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 04:54:58 +00:00
Jon Cave c6d3eafb7e Drop unnecessary if-statements which also have some strange logic. Fixes #20159.
git-svn-id: https://develop.svn.wordpress.org/trunk@20092 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-02 22:01:41 +00:00
Andrew Nacin 09b4c5d21f Update login-logo.png to use proper color. Copy it over wordpress-logo.png. Make that one canonical, and stop using login-logo.png. Leave it for plugins. props iammattthomas. see #19955.
git-svn-id: https://develop.svn.wordpress.org/trunk@19937 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-17 04:57:56 +00:00
Andrew Nacin 0c59eacb55 Use is_rtl() for html direction when possible. In sites.php, language_attributes() will always exist (MU vestige). When the DB is dead, language_attributes() is worse than a simple is_rtl() check. is_rtl() exists here due to wp_load_translations_early(). see #18180.
git-svn-id: https://develop.svn.wordpress.org/trunk@19862 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 06:05:35 +00:00
Ryan Boren ae0d5be06c Best practice, use wp_safe_redirect() when dealing with referrers. Props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@19579 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-10 18:26:48 +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 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 2efff75050 Revert [18861], [18862], [18864], [18874], [18879], and [18880]. see #18785.
git-svn-id: https://develop.svn.wordpress.org/trunk@18911 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-07 04:57:12 +00:00
Andrew Ozz 98554b4bb6 Use add_option() method, introduce add_option_context() method for adding specific text above the screen options, see #18690
git-svn-id: https://develop.svn.wordpress.org/trunk@18867 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-03 04:00:57 +00:00
Andrew Ozz d0d3855285 Add screen_options with contextual content, see #18690
git-svn-id: https://develop.svn.wordpress.org/trunk@18864 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-02 06:59:36 +00:00
Andrew Nacin 13999695f1 Dissolve wp-admin/network/edit.php. props PeteMall, fixes #18379.
git-svn-id: https://develop.svn.wordpress.org/trunk@18562 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-18 02:29:06 +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
Mark Jaquith 4f8b646e03 Centralize pagination bound exceeding redirects for list tables. props garyc40. props johnjamesjacoby. fixes #16208
git-svn-id: https://develop.svn.wordpress.org/trunk@17900 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-12 06:09:42 +00:00
Daryl Koopersmith 2c5592178f Admin Header 2: The Return of 32px Icons. Props, iammattthomas. see #17324.
git-svn-id: https://develop.svn.wordpress.org/trunk@17872 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-12 00:22:22 +00:00
Ryan Boren 57d714aedc Remove favorite_actions() from h2s. Restore Add New buttons. see #17324
git-svn-id: https://develop.svn.wordpress.org/trunk@17849 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-10 19:18:16 +00:00
Mark Jaquith e897910b75 Big UI style update. props koopersmith. see #17324
git-svn-id: https://develop.svn.wordpress.org/trunk@17800 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-04 20:15:05 +00:00
Andrew Nacin 2b4674a3b4 Remove AJAX from list tables. first pass. see #16262.
git-svn-id: https://develop.svn.wordpress.org/trunk@17322 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-16 21:47:24 +00:00
Mark Jaquith b6cd198d8e Add "paged param is greater than total pages" redirects to a few more screens. props greuben. fixes #16187
git-svn-id: https://develop.svn.wordpress.org/trunk@17274 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-13 00:03:38 +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
scribu 0f40bb19cd Introduce WP_List_Table::search_box(). See #15353
git-svn-id: https://develop.svn.wordpress.org/trunk@17006 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 20:45:10 +00:00
Andrew Nacin afecafe7ab Remove check_permissions() calls outside of AJAX context. Also only check for switch_themes in check_permissions() for the themes table. see #15326.
git-svn-id: https://develop.svn.wordpress.org/trunk@16990 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 08:43:22 +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 2fe23d30da Apply the break. Props ocean90. fixes #15802
git-svn-id: https://develop.svn.wordpress.org/trunk@16899 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-13 21:03:34 +00:00
Peter Westwood 4e3458f227 Actions and Filters for the Network Admin sites panel to make it easier to add custom actions.
git-svn-id: https://develop.svn.wordpress.org/trunk@16707 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-03 12:12:44 +00:00
Nikolay Bachiyski a643a8f79d Add New string fixes. Fixes #15577
git-svn-id: https://develop.svn.wordpress.org/trunk@16612 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-29 16:54:06 +00:00
Ryan Boren 53ae0610e6 Check delete_site and delete_sites caps. Check for delete_user is more places.
git-svn-id: https://develop.svn.wordpress.org/trunk@16329 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-12 16:35:28 +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
Peter Westwood cf37645868 Check the current user can create sites before showing the button. See #14435 props PeteMall.
git-svn-id: https://develop.svn.wordpress.org/trunk@16185 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-04 17:21:25 +00:00
Peter Westwood 817aa1975c Revert [16171] and [16172] - The class names were fine as they were and the MultiSite classes stand out more with the original naming.
git-svn-id: https://develop.svn.wordpress.org/trunk@16175 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-04 08:07:03 +00:00
scribu d1034ad0d3 complete the renaming. props ocean90. See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@16172 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-03 22:06:45 +00:00
Ryan Boren 103523a499 Drop Sites search action dropdown. Determine the search action from the search string. see #15170
git-svn-id: https://develop.svn.wordpress.org/trunk@16166 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-03 18:28:02 +00:00
Peter Westwood c4633bbd54 The big renaming of the list-table class files.
See #14579

git-svn-id: https://develop.svn.wordpress.org/trunk@16128 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-01 09:19:50 +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
Ryan Boren eb4985a24d Action switch no longer needed. see #15174
git-svn-id: https://develop.svn.wordpress.org/trunk@16014 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-27 16:06:40 +00:00
Andrew Nacin 4dd97a09bf Language cleanup. props jane, scribu, fixes #14585.
git-svn-id: https://develop.svn.wordpress.org/trunk@16001 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-27 08:14:48 +00:00
Andrew Nacin 49589001bb Commit the rest of [15955]. see #14579.
git-svn-id: https://develop.svn.wordpress.org/trunk@15956 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-25 02:58:25 +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
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
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
Ryan Boren 682376a2ae Use get_users() instead of get_users_of_blog(). Props scribu. see #15053
git-svn-id: https://develop.svn.wordpress.org/trunk@15882 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 13:08:47 +00:00