Commit Graph

259 Commits

Author SHA1 Message Date
Sergey Biryukov
d4e1683d23 Taxonomy: Introduce a redirect_term_location filter to change the redirect on term editing.
This complements the `redirect_post_location` filter added in [12260].

Props alexvandervegt.
Fixes #36367.
Built from https://develop.svn.wordpress.org/trunk@37696


git-svn-id: http://core.svn.wordpress.org/trunk@37662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-14 15:06:30 +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
Andrea Fercia
1ae8891261 Accessibility: make the tab order match the visual order in the Edit terms screens.
Fixes #35664.
Built from https://develop.svn.wordpress.org/trunk@37439


git-svn-id: http://core.svn.wordpress.org/trunk@37405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-16 13:02:29 +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
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
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
Sergey Biryukov
db2189e717 After [34891], rename new post type and taxonomy label keys to match the default strings.
See #32147.
Built from https://develop.svn.wordpress.org/trunk@35376


git-svn-id: http://core.svn.wordpress.org/trunk@35340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-23 16:48: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
John Blackbourn
970752a351 Remove the ability to view the term editing screen for taxonomies with show_ui set to false. It is unexpected and unintended behaviour that this is allowed.
If your plugin or site does rely on this behaviour, the arguments that are passed to `register_taxonomy()` should be altered so that `show_ui` is `true`, and arguments such as `show_in_menu` and `show_in_nav_menus` are false.

Fixes #33938

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


git-svn-id: http://core.svn.wordpress.org/trunk@34323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 17:11:25 +00:00
Sergey Biryukov
a87885262f Include placeholder in translator comment.
See #31863.
Built from https://develop.svn.wordpress.org/trunk@34306


git-svn-id: http://core.svn.wordpress.org/trunk@34270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 19:03:25 +00:00
Scott Taylor
ea0cf44097 Don't use HTML tags in translation strings in edit-tags.php.
Props ramiy.
Fixes #31863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:53:25 +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
Scott Taylor
9957d43e13 Bump H3 headings to H2 on the {Term} screens for better accessibility.
Props mrahmadawais.
Fixes #33658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:17:25 +00:00
Sergey Biryukov
c3b663ad8d Provide more helful feedback than just “Cheatin’ uh?” for permission errors in wp-admin/edit-tags.php.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33670. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33852


git-svn-id: http://core.svn.wordpress.org/trunk@33820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-02 16:06:21 +00:00
Scott Taylor
c15a1c2bab Replace some hyphens with —s in admin help tabs.
Props pixolin.
Fixes #30605.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-19 04:53:25 +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
Boone Gorges
66c1d75c1c Tag/category conversion link on edit-tags.php should point to specific importer page when cat2tag plugin is active.
Props solarissmoke, c3mdigital.
Fixes #16369.
Built from https://develop.svn.wordpress.org/trunk@32792


git-svn-id: http://core.svn.wordpress.org/trunk@32763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 04:30:26 +00:00
Scott Taylor
b56b9b3e5c Add @global annotations for wp-admin/*.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +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
Drew Jaynes
d8f67f4340 Fix Docblock syntax for the taxonomy_parent_dropdown_args filter.
See [30998]. See #31888

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


git-svn-id: http://core.svn.wordpress.org/trunk@31982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-04 14:13:27 +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
11a205d489 Edit Terms: Show error messages actually as error messages.
props rahulbhangale, SergeyBiryukov.
fixes #31241.
Built from https://develop.svn.wordpress.org/trunk@31823


git-svn-id: http://core.svn.wordpress.org/trunk@31805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 21:59:27 +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
Sergey Biryukov
067ee8c476 Remove inaccurate part of {$taxonomy}_add_form_fields action description.
props joostdekeijzer.
fixes #31052.
Built from https://develop.svn.wordpress.org/trunk@31247


git-svn-id: http://core.svn.wordpress.org/trunk@31228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-19 15:31:23 +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
Scott Taylor
84867b3e9c Admin globals:
* Declare `$wp_importers` as a global in `admin.php`
* Declare `$post_type`, `$post_type_object`, and  `$post` as globals where applicable

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 05:29:22 +00:00
Scott Taylor
60b0cd7943 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Boone Gorges
8572a07a25 Fix incorrect @since tag introduced in [30998].
Props dimadin.
See #25853.
Built from https://develop.svn.wordpress.org/trunk@30999


git-svn-id: http://core.svn.wordpress.org/trunk@30981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-29 17:18:22 +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
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
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
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
Scott Taylor
1595d6a20c In the form handler logic for edit-tags.php, don't redirect until $_REQUEST['paged'] has been checked. All switch cases (except edit) now use break instead of exit.
Fixes #16162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 04:54:16 +00:00
Scott Taylor
d433f8f1ed Remove unreachable break statements in wp-admin/edit-tags.php. break is unnecessary after die, exit, and wp_die.
See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 14:52:16 +00:00
Drew Jaynes
a866838b31 Ensure adjacency of a duplicate hook comment for a the_category filter call.
See #26869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 06:43:16 +00:00
Scott Taylor
c38cf4f912 Popular tags' edit links should respect the current post type. Adds unit test.
Props mordauk, fahmiadib.
Fixes #25566.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 18:40:15 +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
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
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
63568b0b61 Return to 'Item' for term updated messages for the link_category taxonomy.
props SergeyBiryukov, pavelevap.
fixes #18714.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 18:59:09 +00:00
Dominik Schilling
1eb25761ee Replace duplicated lines in [25143] with an assignment. see #18714.
Built from https://develop.svn.wordpress.org/trunk@25144


git-svn-id: http://core.svn.wordpress.org/trunk@25124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-27 21:25:09 +00:00
Andrew Nacin
737330ac4b Add a terms_updated_messages filter to edit-tags.php, along with taxonomy-specific strings.
props johnbillion.
fixes #18714.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-27 21:13:08 +00:00
Sergey Biryukov
a66fde2ea1 Add 'taxonomy_parent_dropdown_args' filter for the parent dropdown on taxonomy term editing screens. props leewillis77. fixes #18166.
Built from https://develop.svn.wordpress.org/trunk@25123


git-svn-id: http://core.svn.wordpress.org/trunk@25103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-26 17:31:09 +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
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