Commit Graph

26 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
Helen Hou-Sandi 1303e7377a its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665.
git-svn-id: https://develop.svn.wordpress.org/trunk@23191 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-20 15:55:32 +00:00
Andrew Nacin 8803a95bc3 Browse and install your wordpress.org plugin favorites from the plugin installer. props Otto42, Japh, DrewAPicture. fixes #22002.
git-svn-id: https://develop.svn.wordpress.org/trunk@22026 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 00:47:01 +00:00
Andrew Nacin e82d5080b8 New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:57:44 +00:00
Ryan Boren 1b25bfa42e Update plugin install screens to use the new stars. Add stars-rtl.png. Remove star.png and gray-star.png and add to old files list.
Props helenyhou
Fixes #20626



git-svn-id: https://develop.svn.wordpress.org/trunk@20754 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-09 16:27:24 +00:00
Ryan Boren 0bed53f213 When showing already installed themes in the theme installer list, indicate in the row actions that the theme is installed and offer an update link if updates are available.
Props SergeyBiryukov
Fixes #20618


git-svn-id: https://develop.svn.wordpress.org/trunk@20751 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-09 15:01:49 +00:00
Andrew Nacin 869f8217ff Replace commas with periods when converting ratings float values to strings, to avoid issues with localized decimal points.
In these cases, we want a period because it is going to be used by CSS.

props SergeyBiryukov.
fixes #19593.



git-svn-id: https://develop.svn.wordpress.org/trunk@20675 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-01 22:09:55 +00:00
Andrew Nacin f553c11f28 Default to keyword searches for the plugin and theme installers in case no search type is posted back. fixes #19619.
props georgestephanis, SergeyBiryukov for initial patches.



git-svn-id: https://develop.svn.wordpress.org/trunk@20639 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-30 00:44:47 +00:00
Andrew Nacin cfe73da905 Reduce clutter and repetive functionality from the initial landing page for installing plugins and themes by removing the tag/author/term dropdown.
The tag cloud (plugins) and feature filter (themes) is sufficient for tag functionality. All three "search by" fields are already weighted for a standard keyword search through the WP.org API.

fixes #19619 for 3.4.



git-svn-id: https://develop.svn.wordpress.org/trunk@20592 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-25 19:37:19 +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 f009eb7170 Remove 'Recently Updated' from plugin installer. Props nacin. see #19573
git-svn-id: https://develop.svn.wordpress.org/trunk@19627 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-22 21:21:57 +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
Dion Hulse 2ed7ccf052 Add new star.gif replacement with a Grey background (& White counterpart). Props chexee for star icons. Fixes #17428
git-svn-id: https://develop.svn.wordpress.org/trunk@18318 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-17 05:41:35 +00:00
Andrew Ozz e3a1054bef Add context to _e('Name'), props valentinas, fixes #16531
git-svn-id: https://develop.svn.wordpress.org/trunk@18247 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-10 22:13:26 +00:00
Ryan Boren 451d7d8ffb Pink the whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@17435 602fd350-edb4-49c9-b593-d223f7449a82
2011-02-09 17:35:36 +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
Andrew Nacin 4fcde740f1 Fix plugin-install column hiding and widths. props PeteMall, fixes #16210.
git-svn-id: https://develop.svn.wordpress.org/trunk@17281 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-13 01:50:23 +00:00
Ryan Boren 1f3ea01d78 List table spinner. Props scribu. see #15580
git-svn-id: https://develop.svn.wordpress.org/trunk@17090 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-20 18:45:05 +00:00
Andrew Nacin 266cd3f5df Replace check_permissions() with ajax_user_can(). New method returns true/false to current_user_can(), which we then handle in admin ajax. see #15326.
git-svn-id: https://develop.svn.wordpress.org/trunk@16992 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 09:18:28 +00:00
Andrew Nacin 4bc60bd62a String fixes. props demetris. fixes #15688.
git-svn-id: https://develop.svn.wordpress.org/trunk@16734 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-05 14:31:18 +00:00
scribu 9efb88a3ac Use more specific view classes in plugin & theme install screens. Props batmoo. Fixes #15658
git-svn-id: https://develop.svn.wordpress.org/trunk@16710 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-03 18:51:24 +00:00
Andrew Nacin c32cd17908 self_admin_url in plugin-install. props ocean90, fixes #14062.
git-svn-id: https://develop.svn.wordpress.org/trunk@16499 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-20 01:38:21 +00:00
scribu 7edd2f0090 Default to get_current_screen() in list table classes. See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@16182 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-04 15:00:55 +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 ed884411fe List-table Class Names: Consistency's Revenge. See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@16171 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-03 21:09:27 +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