Commit Graph

236 Commits

Author SHA1 Message Date
Sergey Biryukov
561bde29c7 Administration: Add .protected-post-excerpt class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.
Built from https://develop.svn.wordpress.org/trunk@41770


git-svn-id: http://core.svn.wordpress.org/trunk@41604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:50:46 +00:00
Andrea Fercia
a42b9cebde Quick/Bulk Edit: Improve the inline error messages styling.
- uses the core `notice` styles for the Quick Edit form inline error messages
- adds missing periods at the end of a few error messages

Props ocean90, karmatosed, melchoyce, afercia.
Fixes #35496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 21:52:52 +00:00
Andrea Fercia
6a6795382a Accessibility: List Tables: use aria-current for the views current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:44:47 +00:00
Sergey Biryukov
c28cc57f3b Quick/Bulk Edit: Remove duplicate inline-edit-{$screen->post_type} CSS class from Quick Edit table rows.
Props ibachal.
Fixes #41906.
Built from https://develop.svn.wordpress.org/trunk@41576


git-svn-id: http://core.svn.wordpress.org/trunk@41409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 11:02:46 +00:00
John Blackbourn
b140e8f574 General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.
Props keesiemeijer for identifying the issues

See #38462

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


git-svn-id: http://core.svn.wordpress.org/trunk@41059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:43:43 +00:00
Drew Jaynes
1a28ec87e1 Docs: Remove @access notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
Sergey Biryukov
04c688ad52 Docs: Add missing closing quote for 'Restore' in post_row_actions and page_row_actions filters documentation.
See #26397.
Built from https://develop.svn.wordpress.org/trunk@40882


git-svn-id: http://core.svn.wordpress.org/trunk@40732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 23:11:43 +00:00
Andrea Fercia
3aabc09e9c Administration: Fix some HTML validation errors.
Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from `rel="permalink"` to `rel="bookmark"`.

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 17:58:43 +00:00
Sergey Biryukov
f884d7973b Posts, Post Types: Introduce post_date_column_status filter for post status text in list tables' Date column.
Props pbearne.
Fixes #39545.
Built from https://develop.svn.wordpress.org/trunk@40361


git-svn-id: http://core.svn.wordpress.org/trunk@40268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-01 14:07:44 +00:00
Sergey Biryukov
0b7148ebbb Docs: Add description for $mode global in WP_Media_List_Table and WP_Posts_List_Table.
See #40208.
Built from https://develop.svn.wordpress.org/trunk@40309


git-svn-id: http://core.svn.wordpress.org/trunk@40216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 03:47:07 +00:00
Pascal Birchler
3e189479a7 List Tables: Hide 'Empty Trash' and 'Empty Spam' buttons when view is already empty.
Props ivantedja, Presskopp, printsachen1, Jaydeep Rami, mathieuhays, cazm.
Fixes #38341.
Built from https://develop.svn.wordpress.org/trunk@40297


git-svn-id: http://core.svn.wordpress.org/trunk@40204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-17 16:54:42 +00:00
John Blackbourn
4482f92070 Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field.
Built from https://develop.svn.wordpress.org/trunk@39956


git-svn-id: http://core.svn.wordpress.org/trunk@39893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 13:41:44 +00:00
Sergey Biryukov
54001e2756 List Tables: Pass the $which parameter to restrict_manage_posts filter instance in WP_Media_List_Table, missed in [37422].
Props wpsmith.
Fixes #38772.
Built from https://develop.svn.wordpress.org/trunk@39917


git-svn-id: http://core.svn.wordpress.org/trunk@39854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 02:38:42 +00:00
Felix Arntz
72380176dc Multisite: Remove redundant is_super_admin() when checking for edit_others_posts.
The super admin on multisite as well as the administrator on non-multisite both have this capability already. For custom post types using different capabilities this change ensures that only users with that capability have permissions.

Fixes #39059. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 22:09:42 +00:00
Dion Hulse
5f7bbe66d7 Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 07:42:31 +00:00
Andrea Fercia
6fe17e2a3d Administration: Better accessibility for the "Post locked" indicator.
- hides the locked icon from assistive technologies
- adds hidden text to indicate the post is locked
- moves the info about who's currently editing to the top of the title table cell

Props mariovalney.
Fixes #38185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:59:29 +00:00
Pascal Birchler
81a26f6900 Posts, Post Types: Add support for post type templates.
WordPress has supported custom page templates for over 12 years, allowing developers to create various layouts for specific pages.
While this feature is very helpful, it has always been limited to the 'page' post type and not was not available to other post types.

By opening up the page template functionality to all post types, we continue to improve the template hierarchy's flexibility.

In addition to the `Template Name` file header, the post types supported by a template can be specified using `Template Post Type: post, foo, bar`.
When at least one template exists for a post type, the 'Post Attributes' meta box will be displayed in the back end, without the need to add post type support for `'page-attributes'`. 'Post Attributes' can be customized per post type using the `'attributes'` label when registering a post type.

Props johnbillion, Mte90, dipesh.kakadiya, swissspidy.
Fixes #18375.
Built from https://develop.svn.wordpress.org/trunk@38951


git-svn-id: http://core.svn.wordpress.org/trunk@38894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 08:07:30 +00:00
Pascal Birchler
11a13f147b List Tables: Do not show filter button when there are no filter options available.
Props juhise, dipesh.kakadiya, swissspidy.
Fixes #37407.
Built from https://develop.svn.wordpress.org/trunk@38854


git-svn-id: http://core.svn.wordpress.org/trunk@38797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:33:54 +00:00
Andrew Ozz
d91da52588 Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Drew Jaynes
7eb6471461 Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 14:00:31 +00:00
Dominik Schilling
60dc856d64 Posts: Introduce WP_Post_Type and use it in register_post_type() and unregister_post_type().
This changes the global `$wp_post_types` to an array of `WP_Post_Type` objects. `WP_Post_Type` includes methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies.
Each post type argument becomes a property of `WP_Post_Type`.

Props swissspidy, flixos90.
Fixes #36217.
Built from https://develop.svn.wordpress.org/trunk@37890


git-svn-id: http://core.svn.wordpress.org/trunk@37831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 16:41:35 +00:00
Jeremy Felt
6f3f00ea97 Multisite: Change WP_Network id property to an integer.
For consistency and developer sanity.

Props flixos90.
Fixes #37050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 14:26:29 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Dominik Schilling
251274abf6 List Tables: Pass the $which parameter to restrict_manage_posts and restrict_manage_users.
`$which` contains the location of the extra table nav markup: 'top' or 'bottom'.

Props martin.krcho.
Fixes #35307.
Built from https://develop.svn.wordpress.org/trunk@37422


git-svn-id: http://core.svn.wordpress.org/trunk@37388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-12 15:13:27 +00:00
Aaron Jorbin
1972aa2a2a Add grunt prerelease task
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557

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


git-svn-id: http://core.svn.wordpress.org/trunk@36898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 05:37:27 +00:00
Sergey Biryukov
1dc98b2e49 Taxonomy: Remove unnecessary 'All categories' string on Edit Posts and Edit Links screens and use taxonomy's all_items label instead.
Props johnbillion.
Fixes #36049.
Built from https://develop.svn.wordpress.org/trunk@36808


git-svn-id: http://core.svn.wordpress.org/trunk@36775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-02 22:14:25 +00:00
Jeremy Felt
7ee69ca8d1 Remove extra spaces between function names and brackets
These were introduced when making list table view modes sticky.

See #16774, #34365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 16:51:27 +00:00
Andrea Fercia
62d8fda8dd After [36171] remove all the occurrences of the old CSS clearfix.
The old clearfix was applied to very specific items and defined multiple times
across CSS files. Uses the new generic `.wp-clearfix` utility class instead.

See #26396.
Built from https://develop.svn.wordpress.org/trunk@36422


git-svn-id: http://core.svn.wordpress.org/trunk@36389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 13:46:27 +00:00
Andrea Fercia
82c596594b After [36333] correctly use esc_attr() instead of esc_attr__().
See #35313.
Built from https://develop.svn.wordpress.org/trunk@36334


git-svn-id: http://core.svn.wordpress.org/trunk@36301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 16:03:25 +00:00
Andrea Fercia
497de1d658 Accessibility: Remove title attributes from the Posts list table.
Fixes #35313.
Built from https://develop.svn.wordpress.org/trunk@36333


git-svn-id: http://core.svn.wordpress.org/trunk@36300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 15:47:26 +00:00
Sergey Biryukov
5b29dbbf09 I18N: Add missing context for 'Trash' strings.
Fixes #35054.
Built from https://develop.svn.wordpress.org/trunk@35901


git-svn-id: http://core.svn.wordpress.org/trunk@35865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-13 19:03:26 +00:00
Boone Gorges
714be37ea5 Show user_login in Dashboard user dropdowns.
User dropdowns in wp-admin have traditionally shown the users' display names.
However, this causes ambiguity when users share display names. To correct this,
we now show the unique user_login in parentheses after the display name.

The new `display_name_with_login` value for the `show` parameter of
`wp_dropdown_users()` enables this functionality. The default value of `show`
has not been changed, for backward compatibility, but all instances of
`wp_dropdown_users()` in core wp-admin have been switched.

This changeset also reduces some duplicated logic when assembling a user list
when `include_selected` is true.

Props krogsgard, boonebgorges.
Fixes #31251.
Built from https://develop.svn.wordpress.org/trunk@35790


git-svn-id: http://core.svn.wordpress.org/trunk@35754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 20:57:26 +00:00
Scott Taylor
19834a4c21 List Tables: After [35622] and [34271], improve pagination logic when queries are altered.
Props bradyvercher.
Fixes #29870.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 20:25:26 +00:00
Scott Taylor
af0498989c List Tables: After [34728], don't try to infer orderby from query params.
List tables are really good.

Props cklosows.
Fixes #25493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 20:19:26 +00:00
Scott Taylor
128a9c3acd List Tables: after [34271], account for searches when calculating pagination.
Fixes #29870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 23:14:26 +00:00
Dominik Schilling
122f38f748 List Tables: Define the global $mode variable for Quick Edit savings.
Also remove two unused global imports for `$mode`.

Fixes #34577.
Built from https://develop.svn.wordpress.org/trunk@35518


git-svn-id: http://core.svn.wordpress.org/trunk@35482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 21:29:25 +00:00
Helen Hou-Sandí
6ca92efe23 List tables: Move the view mode switcher into screen options for posts.
Having a view mode switcher nestled within table navigation makes no sense, especially now that it's a sticky user option. While less convenient for frequent switching, there is no evidence as of yet that there is a large userbase of frequent view mode switchers.

Introduces a filter for `view_mode_post_types`, which by default is all hierarchical post types with edit UI on.

props Oxymoron.
fixes #22222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-22 19:25:25 +00:00
Drew Jaynes
b37bb95aad Administration: Introduce the manage_posts_extra_tablenav action, which fires inside the tablenav for the posts list table, and just outside the "actions" container.
Props hlashbrooke, wonderboymusic.
Fixes #30341.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-18 14:56:23 +00:00
Drew Jaynes
8a386cb24f Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 15:13:25 +00:00
Sergey Biryukov
1157540283 Replace Quick Edit and Bulk Edit headings with <legend> elements.
Props afercia.
Fixes #34289.
Built from https://develop.svn.wordpress.org/trunk@35234


git-svn-id: http://core.svn.wordpress.org/trunk@35200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 00:45:25 +00:00
Sergey Biryukov
7fdbebdd7d In WP_Posts_List_Table, correct the type for $comment_pending_count.
See #11381.
Built from https://develop.svn.wordpress.org/trunk@35223


git-svn-id: http://core.svn.wordpress.org/trunk@35189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-16 18:25:25 +00:00
Scott Taylor
7547dc5125 Posts List Table: ensure that "All" gets the "current" CSS class when applicable.
Props afercia.
Fixes #19609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 00:09:24 +00:00
John Blackbourn
1e90e58da3 Correct pagination when viewing the 'Mine' link on the post listing screen.
Fixes #19609
Props ocean90

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


git-svn-id: http://core.svn.wordpress.org/trunk@34802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 21:36:25 +00:00
Scott Taylor
594a208753 Post List Table: Ensure that edit.php with no query string produces the proper markup and links in the date column header.
Add 2 methods to `WP_List_Table`, `->get_orderby()` and `->get_order()`. Override the methods in `WP_Posts_List_Table`.

`WP_Posts_List_Table` calls `wp_edit_posts_query()` in `->prepare_items()` which is a wrapper for `wp()`. As such, we can obtain `orderby` and `order` via `get_query_var()`, instead of the URL.

Fixes #25493.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 02:10:25 +00:00
John Blackbourn
2571b6dcec Correct the logic used when determining whether to display the 'Mine' link on post list tables. It should only be shown when the count for the user's posts differs for the total count of posts. is_multi_author() cannot be used because it only considers Posts.
Fixes #19609

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


git-svn-id: http://core.svn.wordpress.org/trunk@34631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 19:15:24 +00:00
Scott Taylor
75b1dde362 Posts List Table: check is_multi_author() before attempting to set ->user_posts_count. Also, don't show "Mine" when the count is the same as "All."
Fixes #19609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-26 06:51:26 +00:00
Scott Taylor
f9c2a88a8a List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.
Props wonderboymusic, Viper007Bond.
Fixes #21249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 06:06:25 +00:00
John Blackbourn
f38013229b Implement a 'Mine' link on post listing screens in the admin area for all users who have authored posts. This feature was previously only available to users who cannot edit other users' posts (namely Authors and Contributors).
Props linuxologos, wonderboymusic
Fixes #19609

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


git-svn-id: http://core.svn.wordpress.org/trunk@34324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 17:28:24 +00:00
Scott Taylor
47fead7a38 Post List Table: 'All' view should be selected when appropriate for paged responses.
Props kraftbj, wonderboymusic.
Fixes #33923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 18:17:24 +00:00