Commit Graph

274 Commits

Author SHA1 Message Date
Sergey Biryukov f60094679f Coding Standards: Consistently use `do_action_deprecated()` and `apply_filters_deprecated()` for deprecated hooks.
Props jrf.
See #48255.
Built from https://develop.svn.wordpress.org/trunk@46684


git-svn-id: http://core.svn.wordpress.org/trunk@46484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-09 12:59:03 +00:00
Sergey Biryukov 49b4cfc034 Accessibility: Media: Replace `@` with `at` in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props audrasjb, afercia.
Fixes #47893.
Built from https://develop.svn.wordpress.org/trunk@46085


git-svn-id: http://core.svn.wordpress.org/trunk@45897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-09 00:07:57 +00:00
Sergey Biryukov f8ba775d7c Accessibility: Posts, Post Types: Replace `@` with `at` in the displayed date format.
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.

Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47832.
Built from https://develop.svn.wordpress.org/trunk@46083


git-svn-id: http://core.svn.wordpress.org/trunk@45895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:24:56 +00:00
Sergey Biryukov c1e3b68b19 Docs: Improve documentation for `do_meta_boxes` action.
Props felipeelia, killua99, SergeyBiryukov.
Fixes #46542.
Built from https://develop.svn.wordpress.org/trunk@46071


git-svn-id: http://core.svn.wordpress.org/trunk@45883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-06 00:06:56 +00:00
Sergey Biryukov e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov 16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Sergey Biryukov a186dbcb65 I18N: Update translator comments after [45674].
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45676


git-svn-id: http://core.svn.wordpress.org/trunk@45487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:52:56 +00:00
Sergey Biryukov 8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +00:00
Sergey Biryukov 18bd01985b Coding Standards: Rename `$r` variable used with `wp_parse_args()` to `$parsed_args` for clarity.
Props freewebmentor.
Fixes #45059.
Built from https://develop.svn.wordpress.org/trunk@45667


git-svn-id: http://core.svn.wordpress.org/trunk@45478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 00:48:58 +00:00
Gary Pendergast a02b5cc2a8 Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 01:45:56 +00:00
Sergey Biryukov cd9c6ce36e I18N: Merge duplicate "Add Comment" strings.
Props ramiy.
Fixes #47246.
Built from https://develop.svn.wordpress.org/trunk@45441


git-svn-id: http://core.svn.wordpress.org/trunk@45252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 18:43:52 +00:00
Gary Pendergast 4b1ff1c298 Media: Update the media bulk action labels for consistency.
Props ianbelanger, garrett-eclipse, afercia, Presskopp.
Fixes #44675.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 23:54:52 +00:00
Andrea Fercia 6fe48278ea Accessibility: Comments: Improve links and buttons semantics and interaction.
With the exception of the "Edit" link, the "row actions" controls in the Comments table behave differently depending if JavaScript support is on or off.
When JavaScript support is off, they behave like links. When JavaScript support is on, they behave like buttons and they need to be buttons or have an ARIA `role="button"` added via JavaScript.

Lastly, the buttons in the Reply/Quick Edit form and the "Add Comment" in the edit post page meta box need to be buttons.

Fixes #43412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 23:37:50 +00:00
Gary Pendergast 9fc53b8461 Block Editor: Restore the Custom Fields display option.
When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.

Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.

Props dd32, pento.
Fixes #46028.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 05:26:49 +00:00
Gary Pendergast 7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Andrea Fercia 9a9b5699fd Accessibility: Improve text input in the Tags meta box when using Safari + Voiceover.
Props parbaugh, konainm, wbrubaker, pento, ryelle.
Fixes #44966.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 22:30:49 +00:00
desrosj bbe9a37b6c Editor: Add custom fields meta box support in the block editor.
This brings support for the custom fields meta box into the new block editor.

The `webpack` and `copy-webpack-plugin` packages have also been updated.

This does not bump the `@wordpress` packages like in [43861] because of conflicts with package versions already installed in `trunk`. The packages will be brought up to date in a subsequent merge.

Merges [43861] and [43863] into trunk.

See #45145.
Fixes #45257.
Built from https://develop.svn.wordpress.org/trunk@44260


git-svn-id: http://core.svn.wordpress.org/trunk@44090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:52:51 +00:00
Sergey Biryukov 6ef54307b1 Block Editor: Hide the Custom Fields meta box option if that meta box has been removed.
Some plugins remove the Custom Fields meta box, particularly when they provide functionality that replaces it. The block editor would correctly not display this meta box in these circumstances, but it still showed the option to display or hide it.

Props pento, noisysocks.
Merges [43885] to trunk.
See #45282.
Built from https://develop.svn.wordpress.org/trunk@44244


git-svn-id: http://core.svn.wordpress.org/trunk@44074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:21:21 +00:00
Jeremy Felt ff7b1bfe48 Block Editor: Fix meta boxes not showing.
The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.

To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.

Merges [43837] from the 5.0 branch to trunk.

Props pento, peterwilsoncc.
Fixes #45172.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-16 01:19:54 +00:00
Gary Pendergast 56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast 8244397ffb Coding Standards: Prepare for upgrading WPCS to 1.0.0.
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.

These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-15 06:22:26 +00:00
Sergey Biryukov cd4c960a6c Administration: Change all the occurrences of "(opens in a new window)" to "(opens in a new tab)".
Props chetan200891, ianbelanger, afercia.
Fixes #43803.
Built from https://develop.svn.wordpress.org/trunk@43174


git-svn-id: http://core.svn.wordpress.org/trunk@43003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-05 09:45:22 +00:00
Sergey Biryukov 4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
Sergey Biryukov b9944def27 Posts, Post Types: Remove extra tabs around `page_attributes_meta_box_template` action in `page_attributes_meta_box()`.
Props chetan200891.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42674


git-svn-id: http://core.svn.wordpress.org/trunk@42502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 11:24:32 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Gary Pendergast c90cfa3b50 General: Fix some precision alignment formatting warnings.
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 23:57:55 +00:00
Gary Pendergast a779284c00 General: Reformat inline `if ()` statements inside HTML tags.
This pattern occurs a handful of times across the codebase:

`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`

Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 04:09:49 +00:00
John Blackbourn 4ef018df2b Docs: Correct the `@since` property for the `page_attributes_misc_attributes` action.
Props jeremyescott, jfarthing84

Fixes #42607

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


git-svn-id: http://core.svn.wordpress.org/trunk@42033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-19 11:52:52 +00:00
Sergey Biryukov 29d5ee851c I18N: Use a consistent pattern for translator comments for placeholders in some more Customizer strings.
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42006


git-svn-id: http://core.svn.wordpress.org/trunk@41840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:47:46 +00:00
Sergey Biryukov f156f90ff5 I18N: Add a context for remaining "Schedule" strings.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@42005


git-svn-id: http://core.svn.wordpress.org/trunk@41839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:35:47 +00:00
Sergey Biryukov 654386a5b7 Taxonomy: After [40984], add the `most_used` label for non-hierarchical taxonomies too, and use it on the Menus screen.
Props johnbillion.
Fixes #41150.
Built from https://develop.svn.wordpress.org/trunk@41987


git-svn-id: http://core.svn.wordpress.org/trunk@41821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 11:23:24 +00:00
Sergey Biryukov 3951984680 I18N: Remove `<b>` tag from a translatable string in `post_submit_meta_box()`.
Props ramiy.
Fixes #41681.
Built from https://develop.svn.wordpress.org/trunk@41910


git-svn-id: http://core.svn.wordpress.org/trunk@41744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:31:48 +00:00
Weston Ruter bd9d1d9178 Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.

Props westonruter, melchoyce.
See #39896, #39752, #34923.
Fixes #42220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 20:15:52 +00:00
Sergey Biryukov 33beafaf02 Posts, Post Types: Introduce `page_attributes_misc_attributes` action that fires before the help hint text in the 'Page Attributes' meta box.
Props markcallen, MikeHansenMe.
Fixes #34034.
Built from https://develop.svn.wordpress.org/trunk@41763


git-svn-id: http://core.svn.wordpress.org/trunk@41597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:55:47 +00:00
Sergey Biryukov d379f839cf Posts, Post Types: Pass `$post` parameter to `post_submitbox_start`, `attachment_submitbox_misc_actions`, `media_submitbox_misc_sections`, `audio_submitbox_misc_sections` filters.
Props sebastian.pisula, SergeyBiryukov.
Fixes #36206.
Built from https://develop.svn.wordpress.org/trunk@41581


git-svn-id: http://core.svn.wordpress.org/trunk@41414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-23 17:07:46 +00:00
Sergey Biryukov 4db08514ea Taxonomy: Convert tag cloud in Tags meta box to a list (`<ul>`) for better semantics and accessibility.
An unordered list allows screen reader users to know in advance how many tags are within the list.

Props audrasjb, afercia.
Fixes #40187.
Built from https://develop.svn.wordpress.org/trunk@41563


git-svn-id: http://core.svn.wordpress.org/trunk@41396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 11:28:44 +00:00
Boone Gorges 26fcea496d Introduce `most_used` taxonomy label, for text on 'Most Used' metabox tab.
Props mdifelice, jlambe.
Fixes #41150.
Built from https://develop.svn.wordpress.org/trunk@40984


git-svn-id: http://core.svn.wordpress.org/trunk@40834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:46:41 +00:00
Andrea Fercia 274596b8ef Accessibility: Add "(opens in a new window)" screen reader text to the "News-Nearby Events" dashboard widget footer links.
- standardizes similar messages in core to always use `(opens in a new window)`
- adds translators comments
- hides the dashicons with `aria-hidden="true"`, see #40428

Fixes #40733.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 22:47:41 +00:00
Sergey Biryukov 902b91400d Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld.
Fixes #40185.
Built from https://develop.svn.wordpress.org/trunk@40422


git-svn-id: http://core.svn.wordpress.org/trunk@40320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 22:42:43 +00:00
Sergey Biryukov cb46332a82 Text Changes: Remove periods from checkbox labels in Discussion meta box to improve consistency throughout the admin.
Checkbox labels generally don't have periods, unless it's a complete sentence.

Props juhise.
Fixes #33780.
Built from https://develop.svn.wordpress.org/trunk@40032


git-svn-id: http://core.svn.wordpress.org/trunk@39969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 07:05:39 +00:00
Sergey Biryukov 8e84504401 Link Manager: Correct version number for `_deprecated_argument()` in `xfn_check()`.
Props grapplerulrich.
Fixes #39737.
Built from https://develop.svn.wordpress.org/trunk@40029


git-svn-id: http://core.svn.wordpress.org/trunk@39966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-29 22:14:40 +00:00
John Blackbourn c2d709e9d6 I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
Andrea Fercia dff34d5988 Accessibility: Improve the Post Attributes meta box fields labels.
With [38951] the support for custom page templates has been extended to all post
types. By making the visible meta box titles real labels, accessibility improves
for all users and form fields have meaningful labels.

Fixes #38790.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 16:01:30 +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
Andrea Fercia 5c555e5d10 Accessibility: Improve the Tags meta box accessibility.
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This

Props joedolson, cgrymala, azaozz, afercia.
Fixes #27555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 18:16:42 +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 5ab4753564 Accessibility: Editor, Publish meta box: remove a stray label and redundant CSS.
Also, adds a `role="button"` attribute to the "Edit" links.

Props iseulde.
Fixes #28411.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-02 14:38:31 +00:00
John Blackbourn b84023ea33 Taxonomy: Introduce more fine grained capabilities for managing taxonomy terms.
This introduces the singular `edit_term`, `delete_term`, and `assign_term` meta capabilities for terms, and switches the base capability name for tags from `manage_categories` to `manage_post_tags` and the corresponding `edit_post_tags`, `delete_post_tags`, and `assign_post_tags`.

All of these capabilities ultimately map to `manage_categories` so by default there is no change in the behaviour of the capabilities for categories, tags, or custom taxonomies. The `map_meta_cap` filter and the `capabilities` argument when registering a taxonomy now allow for control over editing, deleting, and assigning individual terms, as well as a separation of capabilities for tags from those of categories.

Fixes #35614
Props johnjamesjacoby for feedback

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


git-svn-id: http://core.svn.wordpress.org/trunk@38641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 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
Andrea Fercia 576bdf9f8c Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.
The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.

- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box

Props karmatosed, hugobaeta, monikarao, afercia.
Fixes #37969, #37018. See #37448, #37138, #27314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 15:39:30 +00:00