Commit Graph

96 Commits

Author SHA1 Message Date
Sergey Biryukov
18987f840c Accessibility: Make sure layout tables across the admin are correctly linearized.
Adds `role="presentation"` to the `<table>` elements used for layout purposes.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props greatislander, afercia.
Merges [45403] to the 5.2 branch.
See #46899.
Built from https://develop.svn.wordpress.org/branches/5.2@45834


git-svn-id: http://core.svn.wordpress.org/branches/5.2@45645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 04:13:54 +00:00
Gary Pendergast
2b4f8ff69e Terms: Show error colours when a term fails to update.
Props birgire, afercia, jaymanpandya.
Fixes #43703.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 04:50:50 +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
Sergey Biryukov
f700ac6075 Docs: Use WP_Term instead of generic object type for the $tag parameter in wp-admin/edit-tag-form.php hook docs.
Props xhezairi, ocean90.
Fixes #43507.
Built from https://develop.svn.wordpress.org/trunk@42822


git-svn-id: http://core.svn.wordpress.org/trunk@42652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 02:01:29 +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
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
2429d4acea Taxonomy: Introduce a back_to_items taxonomy label.
This is used after updating a taxonomy term in the link to return to the term listing screen.

Props benoitchantre

Fixes #41898

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


git-svn-id: http://core.svn.wordpress.org/trunk@41453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 14:39:45 +00:00
Dominik Schilling
f2589e222e Taxonomy/Users: Use correct escaping function for URLs.
Built from https://develop.svn.wordpress.org/trunk@41522


git-svn-id: http://core.svn.wordpress.org/trunk@41355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 21:14:47 +00:00
Dominik Schilling
9041e7a071 Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
Built from https://develop.svn.wordpress.org/trunk@41398


git-svn-id: http://core.svn.wordpress.org/trunk@41231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 09:13:44 +00:00
Rachel Baker
580cf33c81 Taxonomy: Remove extraneous ' included in Term delete markup.
Unmatched single quotation mark after the delete link href was introduced in r40655.

Props Chouby.
Fixes #9777.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 19:50:44 +00:00
Adam Silverstein
d1ec180619 Taxonomy: Add a "delete" button on term edit page.
Add a 'delete' link next to the update button on the term edit screen so you can delete a term while you are reviewing it's details. 

Props cklosows, bradt, ocean90, johnbillion, DrewAPicture, ryan, MatheusGimenez, maguiar.
Fixes #9777.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 19:26:41 +00:00
Boone Gorges
b6572af5d2 Taxonomy: Improve 'Parent' label when editing taxonomy terms.
Instead of the hardcoded 'Parent', use the `parent_item` label.

Props abrain, dlh.
Fixes #34545.
Built from https://develop.svn.wordpress.org/trunk@40146


git-svn-id: http://core.svn.wordpress.org/trunk@40085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-03 02:54:42 +00:00
Sergey Biryukov
8603da629f Taxonomy: Add an explanation for "Parent" dropdown for hierarchical custom taxonomies.
Props F J Kaiser, raggedrobins, DrewAPicture, diddledan, SergeyBiryukov.
Fixes #23447.
Built from https://develop.svn.wordpress.org/trunk@39895


git-svn-id: http://core.svn.wordpress.org/trunk@39832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:19:39 +00:00
Dominik Schilling
859498efd3 Taxonomy: On wp-admin/term.php, don't show a 'Back to' link which links to the current page.
Fixes #37573.
Built from https://develop.svn.wordpress.org/trunk@38753


git-svn-id: http://core.svn.wordpress.org/trunk@38696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:13:28 +00:00
Sergey Biryukov
3c5204f9f4 Docs: Correct the description of {$taxonomy}_term_new_form_tag hook, making it more consistent with other *_form_tag hooks.
Props BjornW.
Fixes #38104.
Built from https://develop.svn.wordpress.org/trunk@38629


git-svn-id: http://core.svn.wordpress.org/trunk@38572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 13:33:29 +00:00
Sergey Biryukov
0cdf2d371b I18N: Add context and translator comments to Back to %s strings.
Fixes #37095.
Built from https://develop.svn.wordpress.org/trunk@37703


git-svn-id: http://core.svn.wordpress.org/trunk@37669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 21:51:28 +00:00
Peter Wilson
47d26cd9fb DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

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


git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +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
Pascal Birchler
9462ab0576 Taxonomy: After [36874], rename $term_id to $tag_ID in wp-admin/edit-tag-form.php.
This ensures that no variables changed in the process of introducing `wp-admin/term.php`, improving overall backward compatibility.

Props Chouby for initial patch.
Fixes #34988.
Built from https://develop.svn.wordpress.org/trunk@36969


git-svn-id: http://core.svn.wordpress.org/trunk@36937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-11 08:52:29 +00:00
Drew Jaynes
cc1261f7fd Docs: Add an explanation for the dynamic portion of the {$taxonomy}_term_edit_form_top hook, introduced in [36526].
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 18:19:26 +00:00
Boone Gorges
9a178f2510 Introduce {$taxonomy}_term_edit_form_top action to edit-tag-form.php.
This new action gives developers a place to output content at the beginning
of the form element on edit-tags.php.

Props flixos90.
Fixes #35252.
Built from https://develop.svn.wordpress.org/trunk@36526


git-svn-id: http://core.svn.wordpress.org/trunk@36493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 04:01:26 +00:00
Pascal Birchler
27fa2f65eb Taxonomy: Introduce wp-admin/term.php for editing single terms.
This is similar to `edit.php` -> `post.php` and `users.php` -> `user-edit.php` and fixes a bug where screen options for the list table were shown while editing a term.

Fixes #34988.
Built from https://develop.svn.wordpress.org/trunk@36308


git-svn-id: http://core.svn.wordpress.org/trunk@36275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 08:27:27 +00:00
Andrea Fercia
24afea92c2 When editing terms, properly display an admin notice-warning when tag_ID is empty.
Also, avoids two related PHP notices when empty or not set (and thus the global `$tag` is a WP_Error object).

Fixes: #34515.
Built from https://develop.svn.wordpress.org/trunk@35875


git-svn-id: http://core.svn.wordpress.org/trunk@35839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-11 22:49:41 +00:00
Scott Taylor
d28e914a06 When applying the 'editable_slug' filter, add a second param that provides more context.
Props MikeSchinkel, jesin.
Fixes #31568.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 05:49:24 +00:00
Scott Taylor
ff3ae0e747 Don't redirect to the Term list table after submitting the form on the Edit Term page.
Props chiragswadia, UmeshSingla, rhyswynne, afercia.
Fixes #17455.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:59:42 +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
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
Drew Jaynes
4815bfc2a0 Update hook docs for the editable_slug filter as it is evaluated in more than just a term slug context, it is also leveraged for use with post URIs.
See #31569.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 07:04:27 +00:00
Dion Hulse
4f7856aabe Fix the editable_slug hook documentation, the PHPDoc must come directly before the hook call, with no HTML inbetween.
Props DrewAPicture. Fixes #31569

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


git-svn-id: http://core.svn.wordpress.org/trunk@31668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 06:43:26 +00:00
Boone Gorges
25e625b9b0 Apply 'taxonomy_parent_dropdown_args' filter when editing terms.
Added in WP 3.7 [25123], the 'taxonomy_parent_dropdown_args' filter affected
only the term creation interface. This changeset introduces parity by ensuring
that it is applied when editing terms as well.

The new `$context` parameter indicates whether the filter is being applied in
a 'new' or 'edit' context.

Props TimothyBlynJacobs, DrewAPicture.
Fixes #29853.
Built from https://develop.svn.wordpress.org/trunk@30998


git-svn-id: http://core.svn.wordpress.org/trunk@30980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-29 15:27:22 +00:00
Andrew Ozz
7cc113ab66 Do not autofocus text fields on page load on mobile devices. This is currently broken in many mobile browsers:
- iOS Safari opens the keyboard and auto-scrolls on the first tap anywhere on the screen triggering the click at an unexpected place. That makes it impossible to follow links or press buttons.
- Chrome on iOS opens the keyboard on load and may scroll the focused field off screen.
- The Android 4.4 browser only highlights the field, the user has to tap it to open the keyboard and type.
See #30703.
Built from https://develop.svn.wordpress.org/trunk@30842


git-svn-id: http://core.svn.wordpress.org/trunk@30832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-13 22:08:23 +00:00
Drew Jaynes
2faf449f51 Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/*.
Also includes some changes to move hook docs to directly precede hook lines. This is necessary to prevent DocBlock-matching confusion when core is parsed.

Affects DocBlocks for the following hooks:
* `wp_ajax_ . $_REQUEST['action']`
* `wp_ajax_nopriv_ . $_REQUEST['action']`
* `admin_footer- . $GLOBALS['hook_suffix']`
* `admin_head-$hook_suffix`
* `admin_post_nopriv_{$action}`
* `admin_post_{$action}`
* `load-  . $page_hook`
* `load- . $plugin_page`
* `load-importer- . $importer`
* `load- . $pagenow`
* `admin_action_ . $_REQUEST['action']`
* `async_upload_{$type}`
* `add_meta_boxes_ . $post_type`
* `{$taxonomy}_pre_edit_form`
* `{$taxonomy}_term_edit_form_tag`
* `{$taxonomy}_edit_form_fields`
* `{$taxonomy}_edit_form`
* `after-{$taxonomy}-table`
* `{$taxonomy}_pre_add_form`
* `{$taxonomy}_term_new_form_tag`
* `{$taxonomy}_add_form_fields`
* `{$taxonomy}_add_form`
* `media_upload_$type`
* `media_upload_$tab`
* `install_plugins_pre_$tab`
* `install_plugins_$tab`
* `install_themes_pre_{$tab}`
* `install_themes_{$tab}`
* `update-core-custom_{$action}`
* `update-custom_{$action}`
* `user_{$name}_label`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:42:24 +00:00
Sergey Biryukov
87ff969ee6 * Use correct context for 'Name' and 'Parent' strings on taxonomy screens.
* Remove unnecessary context for 'Slug' and 'Description' strings.

props andg.
fixes #29824.
Built from https://develop.svn.wordpress.org/trunk@29821


git-svn-id: http://core.svn.wordpress.org/trunk@29587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 20:01:16 +00:00
Sergey Biryukov
a47214cfa6 Use a more consistent markup on taxonomy and user screens.
props paulwilde.
fixes #29842.
Built from https://develop.svn.wordpress.org/trunk@29820


git-svn-id: http://core.svn.wordpress.org/trunk@29586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 19:40:16 +00:00
Sergey Biryukov
6ee7e6061a Add classes to form containers on taxonomy screens.
props jarednova.
fixes #28196.
Built from https://develop.svn.wordpress.org/trunk@29803


git-svn-id: http://core.svn.wordpress.org/trunk@29570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 00:29:16 +00:00
Andrew Ozz
eb1d21d782 Remove all "valign" attributes from tables in wp-admin, props MikeHansenMe, Marventus. Fixes #22712.
Built from https://develop.svn.wordpress.org/trunk@27029


git-svn-id: http://core.svn.wordpress.org/trunk@26905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 19:06:15 +00:00
Drew Jaynes
da7a2421a3 Inline documentation for hooks in wp-admin/edit-tag-form.php.
Props nicolealleyinteractivecom, kpdesign.
Fixes #25448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-02 04:02:10 +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
Drew Jaynes
9c5afca0f3 Cleanup incorrect duplicate comments for hooks in wp-admin/edit-tag-form.php introduced in [26274].
Also corrects the @since version for {$taxonomy}_term_new_form_tag in wp-admin/edit-tags.php.

Props kpdesign. See #25532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-23 21:18:10 +00:00
Drew Jaynes
a9a62622bc Inline documentation for hooks in wp-admin/edit-tags.php.
Props pauldewouters for the initial patch.
Fixes #25532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-19 23:16:10 +00:00
Andrew Nacin
88af5fa369 Add actions for term editing/creation form tags, for adding enctype attributes. Matches the pattern we've used elsewhere. props JustinSainton, fixes #15261.
Built from https://develop.svn.wordpress.org/trunk@25034


git-svn-id: http://core.svn.wordpress.org/trunk@25021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-16 19:54:09 +00:00
Ryan Boren
5e958d50c9 Enter the semicolon. Props F J Kaiser, SergeyBiryukov. fixes #21393
git-svn-id: http://core.svn.wordpress.org/trunk@22261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-18 13:06:39 +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
nacin
e09d2e6f76 Add line breaks before most form field descriptions (the italicized gray text on General Settings and other screens). props johnbillion, helenyhou, fixes #17390.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-26 00:58:16 +00:00
ryan
340e93324c Remove extraneous spaces. Props kenan3008, dimadin. fixes #19501 #19433
git-svn-id: http://svn.automattic.com/wordpress/trunk@19596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-14 17:36:38 +00:00
dd32
fc52dfeec4 Correct the logic for Taxonomy edit page actions. Props michaeltyson for initial patch. Fixes #17617
git-svn-id: http://svn.automattic.com/wordpress/trunk@18078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-31 05:05:42 +00:00
nacin
9009245db5 Tag textareas escaped earlier with textarea_escaped. see #15454.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-25 17:58:01 +00:00
ryan
3a66c698ee Remove some unnecessary esc_textarea() calls. Props garyc40. see #15454
git-svn-id: http://svn.automattic.com/wordpress/trunk@17001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 17:48:20 +00:00
markjaquith
6482610f9a esc_textarea() and application for obvious textarea escaping. props alexkingorg. fixes #15454
git-svn-id: http://svn.automattic.com/wordpress/trunk@16431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 17:12:01 +00:00
scribu
799baf139c Use submit_button() in more places. See #15064
git-svn-id: http://svn.automattic.com/wordpress/trunk@15830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 18:24:34 +00:00