Commit Graph

313 Commits

Author SHA1 Message Date
Eric Lewis d27606936b Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 20:33:30 +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 7d421dbe42 Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.
See #18218, #32329.
Built from https://develop.svn.wordpress.org/trunk@38077


git-svn-id: http://core.svn.wordpress.org/trunk@38018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:15:34 +00:00
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
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 `&mdash;`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
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
Andrew Nacin 9bba27f4e5 Fix various typos and omissions across a number of help tabs. props DrewAPicture, Ipstenu. see #22451.
git-svn-id: http://core.svn.wordpress.org/trunk@22812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 08:45:15 +00:00
Andrew Nacin 33af30eb7f Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

API-wise:
 * New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
 * Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
 * wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
 * New edit_form_after_title hook.

props helenyhou, ocean90. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00
ryan c76116505e Give Add New button on edit taxonomy pages primary button styling. Props JustinSainton. fixes #21406
git-svn-id: http://core.svn.wordpress.org/trunk@21365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-30 18:41:42 +00:00
ryan fdae8f9b42 Fix some spelling errors. Props thee17. fixes #21191
git-svn-id: http://core.svn.wordpress.org/trunk@21333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 18:06:13 +00:00
ryan f45383244d Fix per_page screen option for custom post types and taxonomies. Don't convert taxonomy and post type slugs from hyphen to underscore when saving the per_page usermeta. Props nacin. see #18958
git-svn-id: http://core.svn.wordpress.org/trunk@21322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 16:13:13 +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
markjaquith 52e3f32f5d Periods at the ends of sentences should be in the translated string, not outside it. Fixes an instance of that on the Tags page. props Nao. fixes #21131
git-svn-id: http://core.svn.wordpress.org/trunk@21216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-05 20:06:19 +00:00
ryan e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan 07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +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
ryan 8ace5a6b4c Use WP_Screen::add_help_tab(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 02:22:07 +00:00
nacin 10cd387b2e Split chunk of help text on edit-tags.php into 'Adding Categories' and 'Adding Tags' tabs, respectively. see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 01:51:34 +00:00
koopersmith fcdf942e04 Use 3.3 help API on edit tags page. props Ipstenu, see #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-29 17:37:04 +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
ryan 73432f9c5a Use taxnow to determine the taxonomy for GET and POST requests in edit-tags.php. Props nacin. fixes #19131
git-svn-id: http://svn.automattic.com/wordpress/trunk@19253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-11 15:44:16 +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
ryan 62afab8db3 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-24 19:13:23 +00:00
ryan 3dc95bc55a Don't filter taxonomy list. see #18983
git-svn-id: http://svn.automattic.com/wordpress/trunk@18990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-18 16:33:31 +00:00
ryan 99d80d6b4a Avoid notices when viewing non-existent taxonomy. Props ocean90, johnbillion. fixes #18716
git-svn-id: http://svn.automattic.com/wordpress/trunk@18966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-13 18:55:40 +00:00
ryan c28bd6af03 Die when attempting to edit non-existent term. Props johnbillion. fixes #18718
git-svn-id: http://svn.automattic.com/wordpress/trunk@18954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-12 20:30:50 +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
nacin 4319712d64 Rename 'Post Tags' to 'Tags'. props scribu, fixes #17683.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-11 17:52:46 +00:00
ryan 8192d0dae8 Validation fixes. Props ocean90, peaceablewhale. see #17364
git-svn-id: http://svn.automattic.com/wordpress/trunk@18010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-23 23:33:30 +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 f63ccddadb Pink the whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:35:36 +00:00
westi 9400a59207 Don't redirect continually on empty search results pages. Fixes #16357 props garyc40
git-svn-id: http://svn.automattic.com/wordpress/trunk@17366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-26 09:56:17 +00:00
ryan b345e996c7 Pagination fixes. Props garyc40. fixes #16357
git-svn-id: http://svn.automattic.com/wordpress/trunk@17361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-25 19:20:20 +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
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
ryan 0a2e59988d Fix menu highlight for link category edit. Props duck_. fixes #15877
git-svn-id: http://svn.automattic.com/wordpress/trunk@17041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-18 16:48:20 +00:00
nacin 411b6fed54 Help fixes. props zeo, fixes #15346.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-17 03:32:46 +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
scribu 5fce5c6d14 Always display the table, with a placeholder row when there are no items. Fixes #15849
git-svn-id: http://svn.automattic.com/wordpress/trunk@17002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 19:05:14 +00:00
westi ad2ab9b7ae Ensure we always have a $help to append to. Fixes #15845 props garyc40.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 13:09:16 +00:00
nacin cc08068dba Remove check_permissions() calls outside of AJAX context. Also only check for switch_themes in check_permissions() for the themes table. see #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 08:43:22 +00:00
nacin 1cd758dc89 Help text edits. props dougwrites, fixes #15346.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 06:37:03 +00:00
scribu f75da0a4ab Fix edit-tags button conflict. Props batmoo. Fixes #15356
git-svn-id: http://svn.automattic.com/wordpress/trunk@16655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-01 18:21:42 +00:00
ryan 847499e531 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@16438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 18:47:34 +00:00
scribu 866c6e1faa submit_button() fixes. Props sbressler. See #15064
git-svn-id: http://svn.automattic.com/wordpress/trunk@16362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 23:49:53 +00:00
nacin dc07485821 Set $tax as the taxonomy object, and kill off our colliding global from menu construction. see #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 03:28:09 +00:00
westi 3f5ab5b9bf Extra cap checks. See #15326.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-06 10:07:35 +00:00