Commit Graph

238 Commits

Author SHA1 Message Date
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