Commit Graph

348 Commits

Author SHA1 Message Date
Dominik Schilling
25e66e4f1e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 15:16:29 +00:00
Pascal Birchler
aaa11d6207 Allow searching for 0 throughout the admin.
Fixes #31025.
Built from https://develop.svn.wordpress.org/trunk@36302


git-svn-id: http://core.svn.wordpress.org/trunk@36269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:06:25 +00:00
Sergey Biryukov
387d3bca32 Add translator comments for strings in wp-admin/edit-comments.php.
Props ramiy for initial patch.
Fixes #34586.
Built from https://develop.svn.wordpress.org/trunk@35549


git-svn-id: http://core.svn.wordpress.org/trunk@35513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-06 00:23:25 +00:00
Scott Taylor
0c2b2a0e3d List Tables/WP_Screen: in WP_Screen, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.

Built from https://develop.svn.wordpress.org/trunk@34891


git-svn-id: http://core.svn.wordpress.org/trunk@34856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 01:28:25 +00:00
Scott Taylor
bc5eb3a623 Comments: add date column to WP_Comments_List_Table to allow sorting and to break out the date/time from the comment content column.
Props jshreve.
Fixes #15520.

Built from https://develop.svn.wordpress.org/trunk@34504


git-svn-id: http://core.svn.wordpress.org/trunk@34468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:27:26 +00:00
Scott Taylor
1a01a9ab55 In the edit-comments.php admin handler, toggle wp_defer_comment_counting() so that only unique post IDs have their comment count updated. Currently, if you delete 50 comments from the same post, the count would get reset 50 times. Not joking.
See #33875.

Built from https://develop.svn.wordpress.org/trunk@34132


git-svn-id: http://core.svn.wordpress.org/trunk@34100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:24:26 +00:00
Sergey Biryukov
d2919e2d71 Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/edit-comments.php.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33669. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33860


git-svn-id: http://core.svn.wordpress.org/trunk@33828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-02 18:04:21 +00:00
Scott Taylor
7808d5d1fa Comments: dynamically update the document title text of the Comments List Table page when dynamically updating the number of comments awaiting moderation.
Fixes #33414. 

Built from https://develop.svn.wordpress.org/trunk@33821


git-svn-id: http://core.svn.wordpress.org/trunk@33789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 17:58:22 +00:00
Dominik Schilling
4a31dd6fe8 Comments: Update help text for new comment bubbles.
props kraftbj.
fixes #33256.
Built from https://develop.svn.wordpress.org/trunk@33589


git-svn-id: http://core.svn.wordpress.org/trunk@33556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-06 08:03:26 +00:00
Sergey Biryukov
48a1c86245 Comment string tweaks:
* Merge two strings about an invalid comment ID.
* Add missing context to 'Mark as Spam' string.
* Merge two 'In Response To' strings, replace redundant context with a translator comment.

props pavelevap.
fixes #32334.
Built from https://develop.svn.wordpress.org/trunk@33436


git-svn-id: http://core.svn.wordpress.org/trunk@33403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 23:36:24 +00:00
Konstantin Obenland
7dc1d06e64 Proper heading for admin screens.
First step towards restoring a good heading structure in wp-admin.
The previous `<h1>` contained the site title and a link to the front page and was removed with the toolbar refactoring in 3.2.

Props joedolson, afercia.
Fixes #31650.


Built from https://develop.svn.wordpress.org/trunk@32974


git-svn-id: http://core.svn.wordpress.org/trunk@32945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 15:41:25 +00:00
Sergey Biryukov
ed0da72d97 Replace echo __() with _e().
props marsjaninzmarsa.
fixes #32239.
Built from https://develop.svn.wordpress.org/trunk@32333


git-svn-id: http://core.svn.wordpress.org/trunk@32304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 16:18:28 +00:00
Dominik Schilling
64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Helen Hou-Sandí
d85f8fe326 Admin notices: Make (most) core notices dismissible.
These no longer return upon refreshing the page when JS is on and working, so users should be able to dismiss them. This is particularly important on the post edit screen when DFW is triggered, but pretty much all notices can be dismissed if needed. A post on Make/Core will follow with information on how this can be leveraged in plugins.

props valendesigns, afercia, paulwilde, adamsilverstein, helen.
fixes #31233. see #23367.

Built from https://develop.svn.wordpress.org/trunk@31973


git-svn-id: http://core.svn.wordpress.org/trunk@31952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 22:06:28 +00:00
Dominik Schilling
13ad2d4e16 Screen Options: Improve items per page option label.
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.

props afercia.
fixes #31349, #15576.
Built from https://develop.svn.wordpress.org/trunk@31696


git-svn-id: http://core.svn.wordpress.org/trunk@31677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 15:32:27 +00:00
Scott Taylor
7f8b548df1 In HTML5, the action attribute is no longer required. Remove this attribute when empty.
The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces." 
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

Built from https://develop.svn.wordpress.org/trunk@31200


git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 04:16:24 +00:00
John Blackbourn
d88ed475b0 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
Fixes #10551
Props nacin

Built from https://develop.svn.wordpress.org/trunk@30356


git-svn-id: http://core.svn.wordpress.org/trunk@30355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-16 06:16:22 +00:00
Andrew Nacin
1ade5bb2f3 Comments: Update border color and help text.
props bcworkz.
fixes #26967.

Built from https://develop.svn.wordpress.org/trunk@27774


git-svn-id: http://core.svn.wordpress.org/trunk@27611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 05:08:14 +00:00
Andrew Nacin
0c16c0477b Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.

Built from https://develop.svn.wordpress.org/trunk@27369


git-svn-id: http://core.svn.wordpress.org/trunk@27219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:27 +00:00
Andrew Ozz
8d6059b383 Remove all screen_icon() calls and deprecate the functions, props TobiasBg, fixes #26119
Built from https://develop.svn.wordpress.org/trunk@26518


git-svn-id: http://core.svn.wordpress.org/trunk@26411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-02 03:53:11 +00:00
Andrew Nacin
fd57b239d2 Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.

Built from https://develop.svn.wordpress.org/trunk@25616


git-svn-id: http://core.svn.wordpress.org/trunk@25533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 00:18:11 +00:00
Andrew Nacin
a7b26bd103 Remove unnecessary printf(). fixes #25321.
Built from https://develop.svn.wordpress.org/trunk@25439


git-svn-id: http://core.svn.wordpress.org/trunk@25361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 19:12:10 +00:00
Sergey Biryukov
415a5c60da * Pass ellipsis as a parameter to wp_html_excerpt() instead of appending it manually.
* Consolidate the logic to avoid appending ellipsis if the entire string is shown.
* Show ellipsis after truncated filenames and post titles.

props solarissmoke, bpetty, SergeyBiryukov. fixes #11446.

git-svn-id: http://core.svn.wordpress.org/trunk@24214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-09 00:22:02 +00:00
Andrew Nacin
7b47322e22 Ensure the referer functions operate completely on unslashed data: wp_referer_field(), wp_original_referer_field(), wp_get_referer(), wp_get_original_referer().
Use wp_slash() instead of addslashes().

see #21767.



git-svn-id: http://core.svn.wordpress.org/trunk@23578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:58:43 +00:00
Ryan Boren
f3a83744e9 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
git-svn-id: http://core.svn.wordpress.org/trunk@23567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:14:09 +00:00
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
Ryan Boren
837c290ded Improve the contextual help for the comment bubble in the 'In Response To' column. Props lessbloat. fixes #19788
git-svn-id: http://core.svn.wordpress.org/trunk@22275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-23 13:37:18 +00:00
nacin
00db8b7053 Convert a bulleted list to paragraphs in the Moderating Comments help tab. props pavelevap, see #19788.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-01 14:45:19 +00:00
ryan
02a1dd7ccb Best practice, use wp_safe_redirect() when dealing with referrers. Props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-10 18:26:48 +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
nacin
c0dcf616c1 Help tweaks for comments, media, edit.php, update-core.php. props jane, see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 01:33:26 +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
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
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
westi
1443193079 Help Tab text updatates. Fixes #17312 prop dougwrites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-01 15:37:04 +00:00
ryan
5316894390 Fix broken help link. Props SergeyBiryukov. fixes #17265
git-svn-id: http://svn.automattic.com/wordpress/trunk@17919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-13 19:08:09 +00:00
markjaquith
0e57bd3a37 Centralize pagination bound exceeding redirects for list tables. props garyc40. props johnjamesjacoby. fixes #16208
git-svn-id: http://svn.automattic.com/wordpress/trunk@17900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-12 06:09:42 +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
e9d62d1f01 From post back to get. Props SergeyBiryukov. fixes #16335
git-svn-id: http://svn.automattic.com/wordpress/trunk@17345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-22 01:31:21 +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
westi
eb9c28f45a Switch back to GET from REQUEST for these so the non js searches work again. See #14927
git-svn-id: http://svn.automattic.com/wordpress/trunk@17307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-15 02:03:46 +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
nacin
b0be8cd9f4 Validation fixes. props ocean90, fixes #15287.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-24 14:19:41 +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