Commit Graph

211 Commits

Author SHA1 Message Date
Ryan Boren
5f809d1d22 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:00:25 +00:00
Ryan Boren
43a7e695e9 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: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Ryan Boren
cc5ed3a485 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: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Andrew Nacin
9bba27f4e5 Fix various typos and omissions across a number of help tabs. props DrewAPicture, Ipstenu. see #22451.
git-svn-id: http://core.svn.wordpress.org/trunk@22812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 08:45:15 +00:00
Andrew Nacin
33af30eb7f Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

API-wise:
 * New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
 * Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
 * wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
 * New edit_form_after_title hook.

props helenyhou, ocean90. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00
ryan
c76116505e Give Add New button on edit taxonomy pages primary button styling. Props JustinSainton. fixes #21406
git-svn-id: http://core.svn.wordpress.org/trunk@21365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-30 18:41:42 +00:00
ryan
fdae8f9b42 Fix some spelling errors. Props thee17. fixes #21191
git-svn-id: http://core.svn.wordpress.org/trunk@21333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 18:06:13 +00:00
ryan
f45383244d Fix per_page screen option for custom post types and taxonomies. Don't convert taxonomy and post type slugs from hyphen to underscore when saving the per_page usermeta. Props nacin. see #18958
git-svn-id: http://core.svn.wordpress.org/trunk@21322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 16:13:13 +00:00
azaozz
34535097b7 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-24 00:15:15 +00:00
markjaquith
52e3f32f5d Periods at the ends of sentences should be in the translated string, not outside it. Fixes an instance of that on the Tags page. props Nao. fixes #21131
git-svn-id: http://core.svn.wordpress.org/trunk@21216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-05 20:06:19 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
6bba5a265b Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 04:51:35 +00:00
ryan
8ace5a6b4c Use WP_Screen::add_help_tab(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 02:22:07 +00:00
nacin
10cd387b2e Split chunk of help text on edit-tags.php into 'Adding Categories' and 'Adding Tags' tabs, respectively. see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 01:51:34 +00:00
koopersmith
fcdf942e04 Use 3.3 help API on edit tags page. props Ipstenu, see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-29 17:37:04 +00:00
ryan
efbbab1b3c Help tabs. Props chexee. see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-24 00:21:39 +00:00
ryan
73432f9c5a Use taxnow to determine the taxonomy for GET and POST requests in edit-tags.php. Props nacin. fixes #19131
git-svn-id: http://svn.automattic.com/wordpress/trunk@19253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-11 15:44:16 +00:00
nacin
bfb98c193e s/add_help_sidebar/set_help_sidebar/g and introduce screen->remove_help_tab($id) and screen->remove_help_tabs(). see #19020, #18785.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 20:14:10 +00:00
ryan
3ad1f67958 Use add_help_sidebar(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 03:12:37 +00:00
ryan
62afab8db3 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-24 19:13:23 +00:00
ryan
3dc95bc55a Don't filter taxonomy list. see #18983
git-svn-id: http://svn.automattic.com/wordpress/trunk@18990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-18 16:33:31 +00:00
ryan
99d80d6b4a Avoid notices when viewing non-existent taxonomy. Props ocean90, johnbillion. fixes #18716
git-svn-id: http://svn.automattic.com/wordpress/trunk@18966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-13 18:55:40 +00:00
ryan
c28bd6af03 Die when attempting to edit non-existent term. Props johnbillion. fixes #18718
git-svn-id: http://svn.automattic.com/wordpress/trunk@18954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-12 20:30:50 +00:00
nacin
795ca8d394 Revert [18861], [18862], [18864], [18874], [18879], and [18880]. see #18785.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-07 04:57:12 +00:00
azaozz
bbafdfa0e5 Use add_option() method, introduce add_option_context() method for adding specific text above the screen options, see #18690
git-svn-id: http://svn.automattic.com/wordpress/trunk@18867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-03 04:00:57 +00:00
azaozz
3575537e5f Add screen_options with contextual content, see #18690
git-svn-id: http://svn.automattic.com/wordpress/trunk@18864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-02 06:59:36 +00:00
nacin
4319712d64 Rename 'Post Tags' to 'Tags'. props scribu, fixes #17683.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-11 17:52:46 +00:00
ryan
8192d0dae8 Validation fixes. Props ocean90, peaceablewhale. see #17364
git-svn-id: http://svn.automattic.com/wordpress/trunk@18010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-23 23:33:30 +00:00
nacin
9cb6e158fc Switch from Panel/SubPanel to Screen in inline documentation and Codex links. props michaelh, fixes #17265.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 15:24:49 +00:00
ryan
f63ccddadb Pink the whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:35:36 +00:00
westi
9400a59207 Don't redirect continually on empty search results pages. Fixes #16357 props garyc40
git-svn-id: http://svn.automattic.com/wordpress/trunk@17366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-26 09:56:17 +00:00
ryan
b345e996c7 Pagination fixes. Props garyc40. fixes #16357
git-svn-id: http://svn.automattic.com/wordpress/trunk@17361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-25 19:20:20 +00:00
nacin
37075f7f71 Remove AJAX from list tables. first pass. see #16262.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-16 21:47:24 +00:00
nacin
94eb65baa0 Revert [17270], [17273], see #16166, see #16262.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-16 21:34:38 +00:00
nacin
7c5fd789ac Keep sorting and paging for bulk actions. props garyc40, see #16166.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-12 17:06:33 +00:00
ryan
0a2e59988d Fix menu highlight for link category edit. Props duck_. fixes #15877
git-svn-id: http://svn.automattic.com/wordpress/trunk@17041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-18 16:48:20 +00:00
nacin
411b6fed54 Help fixes. props zeo, fixes #15346.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-17 03:32:46 +00:00
scribu
cfe09b99e5 Introduce WP_List_Table::search_box(). See #15353
git-svn-id: http://svn.automattic.com/wordpress/trunk@17006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 20:45:10 +00:00
scribu
5fce5c6d14 Always display the table, with a placeholder row when there are no items. Fixes #15849
git-svn-id: http://svn.automattic.com/wordpress/trunk@17002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 19:05:14 +00:00
westi
ad2ab9b7ae Ensure we always have a $help to append to. Fixes #15845 props garyc40.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 13:09:16 +00:00
nacin
cc08068dba 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: http://svn.automattic.com/wordpress/trunk@16990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 08:43:22 +00:00
nacin
1cd758dc89 Help text edits. props dougwrites, fixes #15346.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 06:37:03 +00:00
scribu
f75da0a4ab Fix edit-tags button conflict. Props batmoo. Fixes #15356
git-svn-id: http://svn.automattic.com/wordpress/trunk@16655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-01 18:21:42 +00:00
ryan
847499e531 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@16438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 18:47:34 +00:00
scribu
866c6e1faa submit_button() fixes. Props sbressler. See #15064
git-svn-id: http://svn.automattic.com/wordpress/trunk@16362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 23:49:53 +00:00
nacin
dc07485821 Set $tax as the taxonomy object, and kill off our colliding global from menu construction. see #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 03:28:09 +00:00
westi
3f5ab5b9bf Extra cap checks. See #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-06 10:07:35 +00:00
westi
5e90c5d1c3 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: http://svn.automattic.com/wordpress/trunk@16175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-04 08:07:03 +00:00
scribu
3ded7f7c68 complete the renaming. props ocean90. See #14579
git-svn-id: http://svn.automattic.com/wordpress/trunk@16172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-03 22:06:45 +00:00