Commit Graph

30144 Commits

Author SHA1 Message Date
Scott Taylor
8854256155 Because programming is fun. After [32915], _.find() will return undefined if an empty array is passed - in that case, the function should return true.
See #32746.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 19:43:25 +00:00
Scott Taylor
15bfe75f88 When filtering media by type in wp.media.model.Attachments.filters.type(), account for the library's type being an array of full mime-types.
Fixes #32746.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 19:40:26 +00:00
Scott Taylor
3b88c839f9 In wp_prepare_attachment_for_js(), when setting filename, call wp_basename() on the result of get_attached_file(), not WP_Post->guid. guid can be set to the result get_permalink(), which is not a file path.
Props daxelrod.
Fixes #32531.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 18:30:26 +00:00
Scott Taylor
f61501f57f The query-attachments AJAX action immediately errors out if the user doesn't have the upload_files cap. As such, the Customizer shouldn't show buttons that launch the media modal when the user doesn't have the proper permissions to query attachments.
See #32654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 18:20:27 +00:00
Boone Gorges
3ffe2a059d Add expectedDeprecated flags to wp_richedit_pre() and wp_htmledit_pre() unit tests.
These functions were deprecated in [32899].

See #32425.
Built from https://develop.svn.wordpress.org/trunk@32912


git-svn-id: http://core.svn.wordpress.org/trunk@32883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 14:42:26 +00:00
Boone Gorges
fdd0917471 In WP_Comment_Query, parse meta_query vars after the pre_get_comments hook.
[31467] included a change that involved generating meta_query SQL before the
`pre_get_comments` hook, with the result that `pre_get_comments` callbacks were
no longer able to modify comment meta queries. We fix the problem by moving the
SQL generation to after the hook.

This changeset also includes a second call to `meta_query->parse_query_vars()`,
to ensure that modifications to metadata-related query vars (such as `meta_key`
and `meta_value`) performed in `pre_get_comments` callbacks have the expected
effect on the comment query.

Fixes #32762.
Built from https://develop.svn.wordpress.org/trunk@32911


git-svn-id: http://core.svn.wordpress.org/trunk@32882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 14:36:27 +00:00
Boone Gorges
03be8647c5 Fix PHP notice in WP_Tax_Query::get_sql_for_clause().
Previously, the `$where` variable was not initialized, so that when an invalid
'operator' was passed, PHP would complain that `$where` was undefined.

Props dlh.
Fixes #32756.
Built from https://develop.svn.wordpress.org/trunk@32910


git-svn-id: http://core.svn.wordpress.org/trunk@32881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-23 12:44:27 +00:00
Scott Taylor
b30b08fd92 Refresh attachment links in the media modal are unneeded since bringing the image editor into it in [27445].
Props rommelxcastro.
Fixes #32550.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:33:26 +00:00
Scott Taylor
8c7e1b8ac0 In wp.media.view.UploaderStatus.filename(), don't truncate the filename.
Props helen.
Fixes #31216.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:26:26 +00:00
Scott Taylor
994881d211 Add a label to the content field in the Text Widget for screen readers.
Props afercia.
Fixes #32736.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:22:26 +00:00
Scott Taylor
744cc75cd1 Sanitize the class passed to wp_list_bookmarks() and allow passing an array.
Props ryan, obenland.
Fixes #23150.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 20:55:28 +00:00
Scott Taylor
00de0e6341 In unregister_setting(), search for $option_name in a segment of $new_whitelist_options keyed by $option_group.
Props nofearinc.
Fixes #26479.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 20:51:26 +00:00
Scott Taylor
d6c644d8df After [32884], update the default value for comment_shortcuts.
Props dlh, rachelbaker, DrewAPicture.
Fixes #31588.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 20:44:26 +00:00
Scott Taylor
b8f49cebee List table views: fix missing current class for "All" when logged in as an author.
Props afercia.
Fixes #32015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 20:39:27 +00:00
Helen Hou-Sandí
5a07e4bba4 Add "Scheduled" to post states.
props rclations.
fixes #32131.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 16:07:26 +00:00
Sergey Biryukov
4332d8dfc0 Avoid a PHP notice in WP_Press_This::get_suggested_content() after [32828].
props kraftbj.
fixes #32751.
Built from https://develop.svn.wordpress.org/trunk@32901


git-svn-id: http://core.svn.wordpress.org/trunk@32872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 15:20:28 +00:00
Andrew Ozz
baa8e833ff Fix typo/white space in the docs.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@32900


git-svn-id: http://core.svn.wordpress.org/trunk@32871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:08:28 +00:00
Andrew Ozz
e4758f42e5 Update the TinyMCE initialization:
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@32899


git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Boone Gorges
a680859400 Pass stylesheet URL as an argument to 'style_loader_tag' filter.
This change brings the filter's signature in line with 'script_loader_tag'.

Props nicholas_io.
Fixes #32660.
Built from https://develop.svn.wordpress.org/trunk@32898


git-svn-id: http://core.svn.wordpress.org/trunk@32869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 19:35:26 +00:00
Dominik Schilling
4423739c65 Use 3-digit x.x.x style for 4.3.0 @since versions.
see #32335, #32430.
Built from https://develop.svn.wordpress.org/trunk@32897


git-svn-id: http://core.svn.wordpress.org/trunk@32868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 11:41:26 +00:00
Andrew Ozz
b9a4fefb08 Update convert_chars():
- Stop trying to remove `<title>` and `<category>` meta tags. They have not been used for many many years.
- Replacement of `<br>` with `<br />` and `<hr>` with `<hr />` is not needed for HTML 5.0. Also, these tags are formatted like that by the visual editor.
- Replace invalid HTML entities that might be pasted in the Text editor on save instead of on display.
Fixes #32335.
Built from https://develop.svn.wordpress.org/trunk@32896


git-svn-id: http://core.svn.wordpress.org/trunk@32867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 00:59:26 +00:00
Dominik Schilling
095dfe5386 Customizer: Fix live preview for menu item titles.
Show also a default label for menu items without a label which are assigned to a menu. This is currently only supported in the Customizer, see #24146 for nav menus screen.

see #32576.
Built from https://develop.svn.wordpress.org/trunk@32895


git-svn-id: http://core.svn.wordpress.org/trunk@32866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 22:33:26 +00:00
Andrew Ozz
c13cb27c14 Fix error when dropping files for uploading on the editor before the media modal is initialized.
Props rommelxcastro, sebastiantiede. Fixes #32527.
Built from https://develop.svn.wordpress.org/trunk@32894


git-svn-id: http://core.svn.wordpress.org/trunk@32865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 21:08:26 +00:00
Dominik Schilling
759bcdbad1 Customizer: Escape original title of menu items.
see #32576.
Built from https://develop.svn.wordpress.org/trunk@32893


git-svn-id: http://core.svn.wordpress.org/trunk@32864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:55:25 +00:00
Dominik Schilling
f127478bde Customizer: Improve handling of posts with no title.
Use the `#%d (no title)` string as a fallback which is already used on the nav menus screen.
Add a translator comment to all occurrences of the `#%d (no title)` string.

see #32576.
Built from https://develop.svn.wordpress.org/trunk@32892


git-svn-id: http://core.svn.wordpress.org/trunk@32863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:50:26 +00:00
Dominik Schilling
baeadbb6fb Customizer: Accessibility improvements for menu item searches.
* Add a description and an `aria-describedby` attribute to inform users this is a "live" search.
* Announce the number of search results via `wp.a11y.speak`.
* Use `aria-busy` attribute to stop screen readers announcing content while the "loading more results" is running.
* Increase the search debounce wait interval to 500ms to be consistent with other live searches.
* If a search fails don't call `wp.a11y.speak` with an undefined variable.

props afercia.
see #32720.
Built from https://develop.svn.wordpress.org/trunk@32891


git-svn-id: http://core.svn.wordpress.org/trunk@32862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:22:25 +00:00
Dominik Schilling
4a13015c98 Customizer: Don't add a menu item twice when using the keyboard.
Buttons don't need keyboard events, they natively support keyboard interaction and they just need a click event.

fixes #32665.
Built from https://develop.svn.wordpress.org/trunk@32890


git-svn-id: http://core.svn.wordpress.org/trunk@32861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:01:25 +00:00
Dominik Schilling
2e8245ba0e Customizer: Use valid markup for menu items.
Replace `<d(l|t)>` with `<div>` for `.menu-item-bar` and `.menu-item-handle`.

see #32724, #32721, #31817.
Built from https://develop.svn.wordpress.org/trunk@32889


git-svn-id: http://core.svn.wordpress.org/trunk@32860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 18:47:27 +00:00
Dominik Schilling
1d953f8258 Customizer: Make labels of the menu item reorder buttons translatable.
see #32576.
Built from https://develop.svn.wordpress.org/trunk@32888


git-svn-id: http://core.svn.wordpress.org/trunk@32859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 18:40:25 +00:00
Dominik Schilling
8fe9d04bf9 Customizer: Replace wrong usage of _x() with translator comments.
see #32576.
Built from https://develop.svn.wordpress.org/trunk@32887


git-svn-id: http://core.svn.wordpress.org/trunk@32858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 18:33:26 +00:00
Dominik Schilling
5c2d8c6b07 Customizer: Rename label for custom links to "Custom Links", see [31748].
props paulwilde
fixes #32732.
Built from https://develop.svn.wordpress.org/trunk@32886


git-svn-id: http://core.svn.wordpress.org/trunk@32857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 18:29:26 +00:00
Dominik Schilling
4fdc99d2d1 Customizer: Decode HTML entities in the label property of WP_Customize_Media_Control.
fixes #31631.
Built from https://develop.svn.wordpress.org/trunk@32885


git-svn-id: http://core.svn.wordpress.org/trunk@32856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 18:15:26 +00:00
Drew Jaynes
1077b83a20 Update the DocBlock for wp_insert_post() to exclude now-defunct contact method arguments and clarify others.
Also clarifies information on available hooks and adds a changelog entry for when the contact method arguments were removed.

Props dlh, rachelbaker.
See #31588.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 02:53:27 +00:00
Andrew Ozz
9828f9056e Editor: add ARIA labels to the Quicktags buttons to improve accessibility.
Props afercia, azaozz. Fixes #31522.
Built from https://develop.svn.wordpress.org/trunk@32883


git-svn-id: http://core.svn.wordpress.org/trunk@32854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 02:16:25 +00:00
Drew Jaynes
e2c7542b68 Add a changelog entry to the DocBlock for language_attributes() noting that it was converted into a wrapper for get_language_attributes() in 4.3.
See [32868]. See #28180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 23:01:26 +00:00
Scott Taylor
a28f09a32c Correct inline doc for $public in register_post_status().
Props ericlewis.
Fixes #32061.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:35:25 +00:00
Scott Taylor
ada4394034 Use GPL-2.0+ for the value of license in package.json
Props netweb.
Fixes #32718.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:32:27 +00:00
Scott Taylor
92d67bf395 Use valid markup in Walker_Nav_Menu_Edit::start_el() - replace <d(l|t)> with <div> for .menu-item-bar and .menu-item-handle.
Props sagarjadhav.
Fixes #31817.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:22:26 +00:00
Scott Taylor
88743c7cd7 Add missing access modifiers in class-wp-customize-setting.php.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:08:26 +00:00
Scott Taylor
eb4cd4880b Add missing access modifier to WP_Customize_Sidebar_Section::json().
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:06:27 +00:00
Scott Taylor
55b2385cf5 Add missing access modifier to WP_Customize_Nav_Menus_Panel::wp_nav_menu_manage_columns().
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:05:25 +00:00
Scott Taylor
dd2ec86e87 Add missing access modifiers to WP_Customize_Nav_Menus.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:04:28 +00:00
Scott Taylor
5e994cd6a1 Customizer et al, use elseif in PHP, not else if.
This was corrected via brute force in [31090].

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:01:25 +00:00
Scott Taylor
a75961da89 Add access modifier to WP_Customize_Nav_Menu_Item_Control::json()
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:55:24 +00:00
Scott Taylor
24bae70080 Add access modifier to WP_Customize_Nav_Menu_Control::json()
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:54:25 +00:00
Scott Taylor
032ea5b132 Add access modifier to WP_Upgrader::clear_destination()
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:53:25 +00:00
Scott Taylor
23e02fafce Edit Post screen messages need to run preview URLs through the preview_post_link filter.
Props pareshradadiya.
Fixes #32191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:49:25 +00:00
Scott Taylor
86beb35f6d Use <button> instead of <a> for non-link links in Quick Edit.
Props afercia.
Fixes #32213.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:42:27 +00:00
Scott Taylor
38037c8d62 Add get_language_attributes(), which is then used by (...drum roll...) language_attributes().
Props johnbillion, posykrat, PeterRKnight.
Fixes #28180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:36:28 +00:00
Scott Taylor
0c866cfa79 Check is_callable() in do_shortcode_tag(), not add_shortcode().
Add a `_doing_it_wrong()` in `do_shortcode_tag()` when `is_callable()` is `false`.

Props aaroncampbell.
See #32445.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:33:25 +00:00