Commit Graph

23445 Commits

Author SHA1 Message Date
Sergey Biryukov
4d546a12cf I18N: Reference correct placeholder in a translator comment added in [30333].
See #30264.
Built from https://develop.svn.wordpress.org/trunk@39908


git-svn-id: http://core.svn.wordpress.org/trunk@39845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 08:07:43 +00:00
Sergey Biryukov
9ba7ab1cfc Users: Display the name of user being edited on Edit User screen.
Props seanchayes.
Fixes #28182.
Built from https://develop.svn.wordpress.org/trunk@39907


git-svn-id: http://core.svn.wordpress.org/trunk@39844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 07:14:39 +00:00
Sergey Biryukov
649d554294 Themes: Add a unit test for get_theme_feature_list() to make sure that the list of theme features pulled from the WordPress.org API returns the expected data structure.
Props iandunn.
Fixes #28121.
Built from https://develop.svn.wordpress.org/trunk@39906


git-svn-id: http://core.svn.wordpress.org/trunk@39843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 06:50:43 +00:00
Sergey Biryukov
6e3073c1eb Posts, Post Types: Increase the height of post slug input to prevent certain characters from being cut in Firefox on Windows.
Props Ankit K Gupta, Presskopp.
Fixes #28084.
Built from https://develop.svn.wordpress.org/trunk@39905


git-svn-id: http://core.svn.wordpress.org/trunk@39842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 04:03:43 +00:00
Andrew Ozz
35c91b7c0d TinyMCE: prevent the inline toolbar from appearing on partially selected wpview nodes. This can happen when HTML is initially loaded in the editor and wpview is the first node, or sometimes on repeatedly pasting the same wpview.
Props gitlost.
Fixes #38849.
Built from https://develop.svn.wordpress.org/trunk@39904


git-svn-id: http://core.svn.wordpress.org/trunk@39841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 03:00:43 +00:00
Andrew Ozz
45f3ee380c TinyMCE: when inserting a wpview, place the caret after is so the user can continue typing without interruption.
Props iseulde.
Fixes #39337.
Built from https://develop.svn.wordpress.org/trunk@39903


git-svn-id: http://core.svn.wordpress.org/trunk@39840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:41:40 +00:00
Andrew Ozz
90f441e1b4 TinyMCE: improve removal of spaces from empty paragraphs when loading HTML in the editor.
Fixes #39437.
Built from https://develop.svn.wordpress.org/trunk@39902


git-svn-id: http://core.svn.wordpress.org/trunk@39839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:06:41 +00:00
Sergey Biryukov
82e17902a9 Twenty Seventeen: Correct @param entries for twentyseventeen_custom_colors_css filter.
Props Soean.
Fixes #39575.
Built from https://develop.svn.wordpress.org/trunk@39901


git-svn-id: http://core.svn.wordpress.org/trunk@39838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 15:03:41 +00:00
Sergey Biryukov
b75023ee1a Docs: Add missing @param type for wp_cache_get_last_changed().
Props afzalmultani, Soean.
Fixes #39571.
Built from https://develop.svn.wordpress.org/trunk@39900


git-svn-id: http://core.svn.wordpress.org/trunk@39837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 14:16:44 +00:00
Sergey Biryukov
d2a6ea340e REST API: Update unit tests to account for the string changes in [39896].
See #39054.
Built from https://develop.svn.wordpress.org/trunk@39899


git-svn-id: http://core.svn.wordpress.org/trunk@39836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 05:15:42 +00:00
Sergey Biryukov
5d83b14893 Build/Test Tools: After [29858], update .jsintrc to use spaces, not tabs.
Props netweb.
Fixes #39359.
Built from https://develop.svn.wordpress.org/trunk@39898


git-svn-id: http://core.svn.wordpress.org/trunk@39835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:45:41 +00:00
Sergey Biryukov
2a7400c956 Administration: Improve tab character width in Plugins and Themes editor.
Props afercia.
Fixes #38684.
Built from https://develop.svn.wordpress.org/trunk@39897


git-svn-id: http://core.svn.wordpress.org/trunk@39834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:41:41 +00:00
Sergey Biryukov
b3c28838f7 REST API: Improve error messages for number relational validation.
Props jblz.
Fixes #39054.
Built from https://develop.svn.wordpress.org/trunk@39896


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


git-svn-id: http://core.svn.wordpress.org/trunk@39832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-13 04:19:39 +00:00
Sergey Biryukov
139a58b70a Twenty Seventeen: Remove extra asterisk from a translator comment so the comment could be parsed correctly.
Props swissspidy.
See #39116.
Built from https://develop.svn.wordpress.org/trunk@39894


git-svn-id: http://core.svn.wordpress.org/trunk@39831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 21:37:43 +00:00
Sergey Biryukov
36cb41145e Docs: In wp_set_object_terms(), add a note that passing an empty value as $terms argument will remove all related terms.
Props barryceelen.
Fixes #36690.
Built from https://develop.svn.wordpress.org/trunk@39893


git-svn-id: http://core.svn.wordpress.org/trunk@39830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:54:42 +00:00
Sergey Biryukov
a1319d63a0 Widgets: In unregister_sidebar(), rename the $name parameter to $sidebar_id for consistency with is_registered_sidebar().
Also correct the parameter type in `@param` entry.

Props Soean, tmatsuur.
Fixes #35147.
Built from https://develop.svn.wordpress.org/trunk@39892


git-svn-id: http://core.svn.wordpress.org/trunk@39829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:38:54 +00:00
Sergey Biryukov
11d81ecc7c Media: Use a consistent error message for file type errors on uploading.
Props pavelevap, jackreichert.
Fixes #33242.
Built from https://develop.svn.wordpress.org/trunk@39891


git-svn-id: http://core.svn.wordpress.org/trunk@39828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:29:43 +00:00
Sergey Biryukov
327a11ad65 Docs: Use a consistent description for $plugin parameter in various plugin API functions.
See #36333.
Built from https://develop.svn.wordpress.org/trunk@39890


git-svn-id: http://core.svn.wordpress.org/trunk@39827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:16:41 +00:00
Sergey Biryukov
a989f0b168 Docs: Improve the DocBlock for validate_plugin().
Props theMikeD.
Fixes #36333.
Built from https://develop.svn.wordpress.org/trunk@39889


git-svn-id: http://core.svn.wordpress.org/trunk@39826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 06:15:42 +00:00
Sergey Biryukov
8b9a3a08bf Docs: After [37083], change "HEX format" to "3- or 6-digit hexadecimal form" for clarity.
Props swissspidy, theMikeD.
Fixes #36336.
Built from https://develop.svn.wordpress.org/trunk@39888


git-svn-id: http://core.svn.wordpress.org/trunk@39825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 05:56:40 +00:00
Sergey Biryukov
351a3b6d69 Docs: Make $meta parameter description in multisite signup and registration functions more consistent.
See #38781.
Built from https://develop.svn.wordpress.org/trunk@39887


git-svn-id: http://core.svn.wordpress.org/trunk@39824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 05:21:41 +00:00
Sergey Biryukov
3f59be8c97 Users: In wpmu_signup_blog() and wpmu_signup_user(), pass unserialized signup meta data to after_signup_site and after_signup_user filters introduced in [34112], to match the documented value.
Props MaximeCulea.
Fixes #38781.
Built from https://develop.svn.wordpress.org/trunk@39886


git-svn-id: http://core.svn.wordpress.org/trunk@39823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:57:39 +00:00
Sergey Biryukov
a4f106ff9d I18N: Move "Site Language" setting above "Timezone".
This brings all locale-specific site settings closer together and prevents the language setting from being pushed down by unrelated settings added by plugins.

Props johnjamesjacoby.
Fixes #38562.
Built from https://develop.svn.wordpress.org/trunk@39885


git-svn-id: http://core.svn.wordpress.org/trunk@39822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:28:40 +00:00
Sergey Biryukov
32564f9332 Themes: Use curly braces for variables inside strings in `get_page_template() to explicitly specify the end of the variable name.
Props kuck1u.
Fixes #38625.
Built from https://develop.svn.wordpress.org/trunk@39884


git-svn-id: http://core.svn.wordpress.org/trunk@39821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-12 04:13:42 +00:00
Joe McGill
52897df8cd Media: Fix exif_imagetype check in wp_get_image_mime
This is a follow up to [39831].

Props gitlost.
See #11946.
Built from https://develop.svn.wordpress.org/trunk@39850


git-svn-id: http://core.svn.wordpress.org/trunk@39787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:36:39 +00:00
Joe McGill
0df85f5bab Tests: Replace broken codeispoetry.png file.
This also updates the test filename in
`WP_Test_REST_Attachments_Controller::test_create_item_default_filename_title()`
to accurately match the actual file name.
Built from https://develop.svn.wordpress.org/trunk@39848


git-svn-id: http://core.svn.wordpress.org/trunk@39786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 16:25:41 +00:00
Aaron Campbell
daf358983c REST API: Change which users are shown in the users endpoint.
Only show users that have authored a post of a post type that has `show_in_rest` set to true.

Props rachelbaker, jnylen0.
See #38878.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 14:14:42 +00:00
Joe McGill
8eff927823 Media: Improve image filetype checking.
This adds a new function `wp_get_image_mime()` which is used by
`wp_check_filetype_and_ext()` to validate image files using
`exif_imagetype()` if available instead of `getimagesize()`.

`getimagesize()` is less performant than `exif_imagetype()` and is
dependent on GD. If `exif_imagetype()` is not available, it falls back to
`getimagesize()` as before.

If `wp_check_filetype_and_ext()` can't validate the filetype, we now return
`false` for ext/MIME values.

See #11946.
Built from https://develop.svn.wordpress.org/trunk@39831


git-svn-id: http://core.svn.wordpress.org/trunk@39769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 13:08:44 +00:00
Dominik Schilling
c9ea1de144 Updates: Translate plugin data on the Updates screen.
Built from https://develop.svn.wordpress.org/trunk@39808


git-svn-id: http://core.svn.wordpress.org/trunk@39746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 10:37:48 +00:00
Dominik Schilling
ce7fb2934d Themes: Fix markup for theme name fallbacks.
Built from https://develop.svn.wordpress.org/trunk@39807


git-svn-id: http://core.svn.wordpress.org/trunk@39745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 10:34:44 +00:00
Jeremy Felt
cea9e2dc62 Multisite: Use wp_rand() in signup key creation.
Built from https://develop.svn.wordpress.org/trunk@39795


git-svn-id: http://core.svn.wordpress.org/trunk@39733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:30:42 +00:00
Jeremy Felt
061e878881 Mail: Disable wp-mail.php when mailserver_url is mail.example.com.
Built from https://develop.svn.wordpress.org/trunk@39772


git-svn-id: http://core.svn.wordpress.org/trunk@39710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 05:13:43 +00:00
Aaron Campbell
03e5c0314a Add nonce for widget accessibility mode.
Props vortfu.

See #23328.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:32:41 +00:00
Dion Hulse
5eb452d15b Update PHPMailer to 5.2.22.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.21...v5.2.22

Fixes #37210 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 01:23:41 +00:00
Sergey Biryukov
3fd9465cc1 Docs: Make @deprecated entry for wp_kses_js_entities(), deprecated in [38785], consistent with other entries.
Props stevenkword, teinertb.
Fixes #39541.
Built from https://develop.svn.wordpress.org/trunk@39758


git-svn-id: http://core.svn.wordpress.org/trunk@39696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 22:09:42 +00:00
Sergey Biryukov
c07571de67 Docs: Change @param type for $user_object in WP_Users_List_Table::single_row() from object to WP_User to be more accurate.
Props sebastian.pisula.
Fixes #39536.
Built from https://develop.svn.wordpress.org/trunk@39757


git-svn-id: http://core.svn.wordpress.org/trunk@39695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 12:45:44 +00:00
Sergey Biryukov
9234febe06 Posts, Post Types: Use an existing string for "Invalid post type" error message.
Props ramiy.
Fixes #39171.
Built from https://develop.svn.wordpress.org/trunk@39756


git-svn-id: http://core.svn.wordpress.org/trunk@39694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 02:40:42 +00:00
Sergey Biryukov
fd0564d2bc Docs: Remove incorrect @param tags for admin_print_footer_scripts-{$hook_suffix} and admin_footer-{$hook_suffix} dynamic actiona.
Remove `@global` tags as well as they are not suited to describe a function parameter and are documented in the description of the actions.

Props keesiemeijer.
Fixes #39527.
Built from https://develop.svn.wordpress.org/trunk@39755


git-svn-id: http://core.svn.wordpress.org/trunk@39693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-09 14:38:41 +00:00
Sergey Biryukov
fdc2b34124 Docs: Move install_global_terms() DocBlock after the function_exists() call.
Props keesiemeijer.
Fixes #39526.
Built from https://develop.svn.wordpress.org/trunk@39754


git-svn-id: http://core.svn.wordpress.org/trunk@39692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-09 14:31:44 +00:00
Sergey Biryukov
14454e3b0b Docs: Use correct closing tag in submit_field description in comment_form().
Props truongwp.
Fixes #39508.
Built from https://develop.svn.wordpress.org/trunk@39753


git-svn-id: http://core.svn.wordpress.org/trunk@39691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 14:51:44 +00:00
Sergey Biryukov
1d05544828 Twenty Seventeen: Expand a changelog entry added in [39742] with the new item name.
See #39489, [39575].
Built from https://develop.svn.wordpress.org/trunk@39752


git-svn-id: http://core.svn.wordpress.org/trunk@39690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 13:12:39 +00:00
Sergey Biryukov
03c6dc1002 Customize: Correct a comment in get_theme_starter_content() added in [39561].
The item name is `link_home`, not `home_link`.

See #39104.
Built from https://develop.svn.wordpress.org/trunk@39751


git-svn-id: http://core.svn.wordpress.org/trunk@39689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-07 13:11:41 +00:00
Tammie Lister
979152be92 Twenty Seventeen: add more details about filter and requires version
The required version should be 4.7 and also adds more information to changelog.

Props @ocean90 @Presskopp


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


git-svn-id: http://core.svn.wordpress.org/trunk@39684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:15:52 +00:00
Tammie Lister
b5908ad8c8 Twenty Seventeen: version bump and update changelog
Adds in changelog since last version and all the changes listed in readme.txt.
Bumps version numbers in style.css and readme.txt.

Props @ocean90


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


git-svn-id: http://core.svn.wordpress.org/trunk@39682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:14:38 +00:00
Sergey Biryukov
d054731b2b Docs: Add missing @since entry for Walker::unset_children().
Props chiragpatel.
Fixes #39506.
Built from https://develop.svn.wordpress.org/trunk@39741


git-svn-id: http://core.svn.wordpress.org/trunk@39681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:14:00 +00:00
Sergey Biryukov
6032bd6e32 Docs: Use 3-digit, x.x.x style semantic versioning for @since entries in wp-admin/js/image-edit.js.
See #38748.
Built from https://develop.svn.wordpress.org/trunk@39740


git-svn-id: http://core.svn.wordpress.org/trunk@39680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:13:20 +00:00
Sergey Biryukov
e8c65e0df1 Docs: Use 3-digit, x.x.x style semantic versioning for @since entries in wp-admin/js/word-count.js.
See #37718.
Built from https://develop.svn.wordpress.org/trunk@39739


git-svn-id: http://core.svn.wordpress.org/trunk@39679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:12:39 +00:00
Sergey Biryukov
e654c81f10 Docs: Add documentation for wp-admin/js/editor.js.
Props terwdan, ireneyoast.
Fixes #38933.
Built from https://develop.svn.wordpress.org/trunk@39738


git-svn-id: http://core.svn.wordpress.org/trunk@39678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:11:57 +00:00
Sergey Biryukov
008c1f7e60 Docs: Correct @access entries for WP_Locale::init() and WP_Locale::register_globals().
Props keesiemeijer.
Fixes #39504.
Built from https://develop.svn.wordpress.org/trunk@39737


git-svn-id: http://core.svn.wordpress.org/trunk@39677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:11:16 +00:00
Sergey Biryukov
64675a6a0b Docs: Add missing @since entries for WP_Theme class methods.
Props keesiemeijer.
Fixes #39503.
Built from https://develop.svn.wordpress.org/trunk@39736


git-svn-id: http://core.svn.wordpress.org/trunk@39676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:10:35 +00:00
Sergey Biryukov
b971410d2f Docs: Correct @access entry for WP_User::filter property.
Add missing `@since` entries for `WP_User::back_compat_keys` and `WP_User::init()`.

Props keesiemeijer, prosti.
Fixes #39502, #39278.
Built from https://develop.svn.wordpress.org/trunk@39735


git-svn-id: http://core.svn.wordpress.org/trunk@39675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:09:55 +00:00
Sergey Biryukov
ff749bc66c Docs: Correct @access entries and duplicate hook references in WP_Customize_Selective_Refresh.
Props keesiemeijer.
Fixes #39501.
Built from https://develop.svn.wordpress.org/trunk@39734


git-svn-id: http://core.svn.wordpress.org/trunk@39674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:09:13 +00:00
Sergey Biryukov
f6cd778c84 Twenty Seventeen: Correct @param entries for twentyseventeen_content_width, twentyseventeen_custom_colors_saturation and twentyseventeen_social_links_icons filters.
Props Jaydeep Rami, BharatKambariya.
Fixes #39488.
Built from https://develop.svn.wordpress.org/trunk@39733


git-svn-id: http://core.svn.wordpress.org/trunk@39673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:08:33 +00:00
Sergey Biryukov
2f50816f32 Twenty Seventeen: Correct @param entry for twentyseventeen_front_page_sections filter.
Props ketuchetan, priyankabehera155.
Fixes #39488.
Built from https://develop.svn.wordpress.org/trunk@39732


git-svn-id: http://core.svn.wordpress.org/trunk@39672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:07:52 +00:00
Dominik Schilling
2e81d3ed88 Twenty Seventeen: Introduce a theme-specific filter twentyseventeen_starter_content for customizing the starter content array.
Add some documentation to the default starter content.

Props sanket.parmar, celloexpressions.
Fixes #39109.
Built from https://develop.svn.wordpress.org/trunk@39720


git-svn-id: http://core.svn.wordpress.org/trunk@39660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:02:58 +00:00
Sergey Biryukov
93d4caaccd Docs: Add missing @param tag for show_post_locked_dialog filter.
Props keesiemeijer.
Fixes #39479.
Built from https://develop.svn.wordpress.org/trunk@39710


git-svn-id: http://core.svn.wordpress.org/trunk@39650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:59:04 +00:00
Sergey Biryukov
6e5d66c10e Docs: Move install_network() DocBlock after the function_exists() call.
Props keesiemeijer.
Fixes #39478.
Built from https://develop.svn.wordpress.org/trunk@39709


git-svn-id: http://core.svn.wordpress.org/trunk@39649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:58:23 +00:00
Sergey Biryukov
ead8c38f38 Docs: Add variable to @param entry for whitelist_options filter.
Props keesiemeijer.
Fixes #39477.
Built from https://develop.svn.wordpress.org/trunk@39708


git-svn-id: http://core.svn.wordpress.org/trunk@39648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 21:57:42 +00:00
Dion Hulse
9f381dbea6 Customizer: Don't query for postmeta for Custom CSS (for not-current-themes) and Customizer Changeset posts.
Props dlh.
Fixes #39194.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 08:12:42 +00:00
Dion Hulse
577a192ebd Mail: In PHPMailer 5.2.7 the case of the Send() method changed to send(), update our call for consistency with the library.
Props michalzuber.
Fixes #39469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 08:10:42 +00:00
Dion Hulse
8912d6b134 Updates: Properly define $filesystemForm to handle error in modals.
Ammends [39657].
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 07:24:43 +00:00
Weston Ruter
2ed703ed78 Customize: Ensure theme_mod-cache of custom_css lookup of -1 short-circuits a WP_Query from being made.
Props dlh.
See #35395.
Fixes #39259.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 07:13:42 +00:00
Dion Hulse
b5dbe61dab Upgrade: Fix the installation of TwentySeventeen upon upgrade from an early version.
This reverts part of [31124] which incorrectly caused `$old_wp_version` to equal the version of WordPress being upgraded to due to global variable access changes.

See #38551, #30799.
Fixes #39138 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 06:13:41 +00:00
Weston Ruter
5468850b10 Customize: Update customize.php URL with changeset_uuid param the instant a change is made instead of deferring until the changeset update request responds.
Props asalce.
Fixes #39227.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 05:18:43 +00:00
Weston Ruter
ea0f8b53f1 Customize: Remove extra left padding in core for site title and widgets in preview.
These styles should only be applied by theme stylesheets as needed.

Props sirbrillig.
Reverts parts of [39202] and [39233].
See #38651.
Fixes #39349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 04:33:43 +00:00
Ryan McCue
a676166a63 Upgrade/Install: Avoid creating nonce during installation.
When installing and using database-saved salts, wp_create_nonce() causes database errors as wp_salt() attempts to insert into the not-yet-created options table. Since authentication isn't available during installation, we can safely skip creating a nonce.

Props nullvariable, pento, dd32.
Fixes #39047.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 04:11:43 +00:00
Ryan McCue
952b6873e7 Feeds: Don't override the Content-Type header inside fetc_feed()
SimplePie can set the Content-Type header automatically with the correct charset for convenience, but we already force the charset to match the site's, making it redundant at best. At worst, SimplePie incorrectly overrides the content-type for non-HTML content (such as API requests).

Props dlh, stevenkword.
Fixes #39066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 03:06:42 +00:00
Adam Silverstein
c8a3496ebe REST API: Add error handling for fetch error in buildModelGetter of wp-api.js.
When a call to a model getter method fails, reject the returned deferred object. Enables better handling of fetch errors.

Props westonruter, adamsilverstein.
Fixes #39314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 03:03:42 +00:00
Andrew Ozz
e2166de4b0 Always add page-template-default class to the editor body when the template is not specified. This matches the behavior on the front-end.
Props timph (for the detailed bug report), azaozz.
Fixes #39368 for trunk.
Built from https://develop.svn.wordpress.org/trunk@39678


git-svn-id: http://core.svn.wordpress.org/trunk@39618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 01:53:43 +00:00
Weston Ruter
ef882e918e Customize: Prevent removal of underline upon hover/focus for nav menu deletion links.
Props monikarao.
Amends [38503].
See #37527.
Fixes #39444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 19:13:40 +00:00
Sergey Biryukov
7a83036227 Docs: Correct the DocBlock for get_header_video_url().
Props keesiemeijer.
Fixes #39468.
Built from https://develop.svn.wordpress.org/trunk@39676


git-svn-id: http://core.svn.wordpress.org/trunk@39616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:44:43 +00:00
Sergey Biryukov
64bb76d122 Docs: Correct @since and @access tags for WP_Term_Query::get_terms() and WP_Term_Query::parse_orderby_meta().
Props keesiemeijer.
Fixes #39467.
Built from https://develop.svn.wordpress.org/trunk@39675


git-svn-id: http://core.svn.wordpress.org/trunk@39615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:39:43 +00:00
Sergey Biryukov
868f642cc1 Docs: Correct @access tag for WP_Customize_Partial::id_data property.
Props keesiemeijer.
Fixes #39464.
Built from https://develop.svn.wordpress.org/trunk@39674


git-svn-id: http://core.svn.wordpress.org/trunk@39614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:36:41 +00:00
Sergey Biryukov
88d2bb035a Docs: Add missing @since and @access tags for WP_Widget_Form_Customize_Control::to_json() and ::render_content().
Props keesiemeijer.
Fixes #39463.
Built from https://develop.svn.wordpress.org/trunk@39673


git-svn-id: http://core.svn.wordpress.org/trunk@39613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:34:44 +00:00
Sergey Biryukov
625849cc60 Docs: Add missing @since and @access tags for WP_Date_Query::is_first_order_clause().
Props keesiemeijer.
#39462.
Built from https://develop.svn.wordpress.org/trunk@39672


git-svn-id: http://core.svn.wordpress.org/trunk@39612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:26:43 +00:00
Sergey Biryukov
fd78085a92 Docs: Correct rest_insert_* duplicate hook references in REST API.
Props keesiemeijer.
Fixes #39371.
Built from https://develop.svn.wordpress.org/trunk@39671


git-svn-id: http://core.svn.wordpress.org/trunk@39611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:23:40 +00:00
Sergey Biryukov
b737cce497 Docs: Add missing session_token_manager duplicate hook reference in wp-includes/class-wp-session-tokens.php.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39670


git-svn-id: http://core.svn.wordpress.org/trunk@39610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:22:42 +00:00
Sergey Biryukov
d16bdab87d Docs: Correct comment_email duplicate hook reference in wp-admin/includes/class-wp-comments-list-table.php.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39669


git-svn-id: http://core.svn.wordpress.org/trunk@39609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:21:41 +00:00
Sergey Biryukov
179a40d969 Docs: Add missing duplicate hook references in wp-admin/includes/ajax-actions.php.
Props keesiemeijer.
See #39371.
Built from https://develop.svn.wordpress.org/trunk@39668


git-svn-id: http://core.svn.wordpress.org/trunk@39608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:20:44 +00:00
Sergey Biryukov
f3a9d2bd9a I18N: Add post type context to "Featured Image" post labels.
Fixes #39458.
Built from https://develop.svn.wordpress.org/trunk@39667


git-svn-id: http://core.svn.wordpress.org/trunk@39607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 08:40:41 +00:00
Sergey Biryukov
962db75ace Posts, Post Types: Add a @since entry for archives post type label introduced in [35382].
See #16075.
Built from https://develop.svn.wordpress.org/trunk@39666


git-svn-id: http://core.svn.wordpress.org/trunk@39606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 08:21:43 +00:00
Dion Hulse
5eb2277dce Shortcodes: Clarify the docs for pre_do_shortcode_tag and do_shortcode_tag.
Props dhanendran.
Fixes #39294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-03 04:00:18 +00:00
Boone Gorges
324e79a506 Ignore the 'comment_order' setting when determining comment pagination.
[38740] incorrectly introduced logic that changed a comment's page when
'comment_order' was set to 'desc'. This is in violation of the design
of the comment pagination system: a comment's page is designed not to
change when 'comment_order' or 'default_comment_page' are changed.
See #31101.

Props rachelbaker.
Fixes #39280.
Built from https://develop.svn.wordpress.org/trunk@39663


git-svn-id: http://core.svn.wordpress.org/trunk@39603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 20:00:31 +00:00
Boone Gorges
5fc3bbbfd2 Don't double-escape terms payload in WP_Tax_Query::transform_query().
`terms` values are passed through `sanitize_term_field()` with the 'db'
flag, which add slashes. Because `terms` are subsequently run through
`esc_sql()`, these slashes must be removed. See [36348], which added
a similar step to sanitization in `get_terms()`.

Props bcworkz.
Fixes #39315.
Built from https://develop.svn.wordpress.org/trunk@39662


git-svn-id: http://core.svn.wordpress.org/trunk@39602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 19:40:19 +00:00
Rachel Baker
66551de94c REST API: Add missing assertions to the view and embed context response data for the Users Controller.
Adds tests for responses where `context != 'edit'` the following properties are not included in the response data:
- `email`
- `locale`
- `registered_date`

Props thepelkus, jnylen0.
Fixes #39399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 18:43:44 +00:00
Rachel Baker
5c5dbc95f4 General: Update copyright year to 2017 in license.txt.
Props Nikschavan.
Fixes #39433.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-02 17:58:42 +00:00
Dion Hulse
05f07e13d9 Updates: Show the Authentication key settings after selecting the SSH transport in both the modal, and also on the plugin/theme updates screen.
Props afercia.
Fixes #39057 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:44:41 +00:00
Dion Hulse
6066654967 Updates: Remove a stray " from a tag.
Props afercia.
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:42:42 +00:00
Dion Hulse
1a40f6b7ae Mail: Ensure that any phpmailerException exceptions generated by setFrom() are caught to avoid PHP Fatal errors.
This change avoids a PHP fatal error that can be encountered when the specified (or generated) source email is an invalid address, such as `wordpress@_`, it makes no effort to set a valid source, only avoid the fatal error.

See #25239 for correcting the email address.
Fixes #39360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 06:44:40 +00:00
Peter Wilson
25e462dbe7 Taxonomy: Redirect to current taxonomy when adding a term without AJAX.
Fixes a regression in which adding terms via a full page refresh, ie without AJAX, would always redirect to the tags taxonomy.

Props szaqal21.
Fixes #39328 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 03:11:42 +00:00
Rachel Baker
c6f8182eb0 REST API: Merge similiar error message strings in the Terms Controller.
Replaces the "doesn't" contraction with "does not" to be consistent with similar strings in `WP_Error` messages when a specified term or parent term is missing in `WP_REST_Terms_Controller`.

Props ramiy, ocean90.
Fixes #39176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 18:45:40 +00:00
Rachel Baker
158f302112 REST API: Add the supports property to the Post Type response object.
Includes a new `supports` property in the response object and schema for the `/types` endpoints for users with the `edit_posts` capability for the given post type. The `supports` property returns an object of the features the given post type *supports*.

Props timmydcrawford, tyxla.
Fixes #39033.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 17:28:45 +00:00
Dion Hulse
24767c76d3 Upgrade PHPMailer from 5.2.14 to 5.2.21.
The full list of changes is available here:
https://github.com/PHPMailer/PHPMailer/compare/v5.2.14...v5.2.21

Props sebastian.pisula, MattyRob, sfpt, dd32.
Fixes #37210 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-29 02:53:44 +00:00
Dion Hulse
4efebd4b71 Filesystem: Add return statement to WP_Filesystem_ftpsockets->rmdir
Props tymvie.
Fixes #39405.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-28 03:52:42 +00:00
Rachel Baker
df256f9fee REST API: Remove errant annotation from test_get_items_pagination_headers() method.
Removes the debugging group notation left in the `WP_Test_REST_Users_Controller` and `WP_Test_REST_Posts_Controller` classes pagination headers method. Introduced in [38832].

Props sanket.parmar.
Fixes #39398.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 18:04:43 +00:00
Rachel Baker
82c7fd2493 Comments: Fix placement of the wp_update_comment_data filter to safeguard filtered data from triggering a database error.
Introduced in [38674], the `wp_update_comment_data` filter took place after the `$data` was sliced and prepared for the database update statement. The location of the filter assumed the result of anyone applying it would not change the data type or make structural modifications or additions to the $data array. 😅

This moves the `wp_update_comment_data` filter to take place before the `$data` is sliced and prepared for the database update statement.

Props dshanske for initial patch.

Fixes #39380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 17:22:45 +00:00
John Blackbourn
80a839de13 Docs: Misc corrections and additions to inline documentation.
See #39130
Props keesiemeijer

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


git-svn-id: http://core.svn.wordpress.org/trunk@39579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:28:40 +00:00
John Blackbourn
d327c92e4b Docs: Add and correct @since docs for a variety of functions and methods.
Props keesiemeijer, chris_dev
Fixes #39343, #39357, #39344
See #39130

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


git-svn-id: http://core.svn.wordpress.org/trunk@39578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:21:44 +00:00
Boone Gorges
a3ea7ea2e9 Taxonomy: Eliminate redundant and inaccurate dupe check when creating categories from post.php.
The `term_exists()` check is not needed because of existing dupe
checks in `wp_insert_term()`. Furthermore, `term_exists()` conflates
term names and sanitized slugs, so incorrectly marks terms like
'C' and 'C+' as duplicates of one another.

Props garyc40, SergeyBiryukov, kovshenin, MikeHansenMe.
Fixes #16567.
Built from https://develop.svn.wordpress.org/trunk@39637


git-svn-id: http://core.svn.wordpress.org/trunk@39577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-23 03:11:40 +00:00
Boone Gorges
af885f45cf Query: Improve documentation for orderby=relevance in WP_Query.
Props dots.
Fixes #39336.
Built from https://develop.svn.wordpress.org/trunk@39636


git-svn-id: http://core.svn.wordpress.org/trunk@39576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-23 02:31:41 +00:00
David A. Kennedy
7a8e17d50a Twenty Seventeen: Fix incorrect $content_width value in theme
This addresses a major bug. Incorrectly setting the `$content_width` causes media embeds to end up with the wrong aspect ratio, among other issues. This fix uses `template_redirect`,  to ensure conditional theme tags can be used. It also defines a default value at `after_theme_setup` so that plugins have something to work with at `init`.

Props sstoqnov, laurelfulford, obenland.

Fixes #39272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-22 23:24:44 +00:00
Gary Pendergast
443bcb03bd Tests: Restore the database connection earlier when switching test groups.
When plugins don't disable the `backupGlobals` PHPUnit option in their own tests, `$wpdb` is backed up and restored between classes of tests. The serialisation process used for this broke the database connection. This previously wasn't a problem, as it was reconnecting before each test.

[38398] introduced some changes that required the connection to be available in `setUpBeforeClass()`, earlier than in was previously reconnecting. This didn't cause warnings in Core, but it did cause warnings for plugins that don't disable the `backupGlobals` option.

The database connection now reconnects in `setUpBeforeClass()`. This change also fixes a few Core tests that weren't calling `parent::setUpBeforeClass()` or `parent::tearDown()` correctly.

Fixes #39327.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-21 04:59:43 +00:00
Boone Gorges
3ef41856bb Taxonomy: Ensure that mods to query vars in pre_term_query callbacks have an effect.
Previously, it was possible to modify the `query_vars` array, but
the changes would be ignored after `pre_term_query` had finished
running.

Props jfarthing84.
Fixes #39354.
Built from https://develop.svn.wordpress.org/trunk@39625


git-svn-id: http://core.svn.wordpress.org/trunk@39565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-21 03:02:40 +00:00
David A. Kennedy
4177e37593 Twenty Seventeen: Hardens the logic for calling featured image in header.php
This change uses `get_queried_object_id()` here since the `$post` global may not be set before a call to `the_post()`.

Props westonruter.

Fixes #39302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 23:00:43 +00:00
David A. Kennedy
7d70dabf59 Twenty Seventeen: Ensure functions in customize-controls.js don't count on Customizer sections always being present
Before, the code assumed the `theme_options` section is always present, but it can be removed by plugins. This way, if it is, no JavaScript errors occur.

Props westonruter.

Fixes #39335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 22:17:40 +00:00
Weston Ruter
f7ba137f19 Customize: Fix visible edit shortcuts for wp_nav_menu() instances using the menu arg (such as in the Custom Menu widget) instead of the theme_location arg.
Also fix logic for `focus-control-for-setting` handler to focus on the first control (lowest `priority` value) associated with a given setting instead of the last control encountered when iterating over all controls, as this ensures the first control in a `nav_menu` section is focused rather than the last one.

Props westonruter, sirbrillig.
See #27403.
Fixes #39101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 22:05:43 +00:00
James Nylen
5b39869860 REST API: Improve the rest_*_collection_params filter docs and fix the terms filter.
The `rest_{$taxonomy}_collection_params` filter in 4.7 is incorrectly using
single quotes instead of double quotes, which means it is not working correctly
as a dynamic filter.  This fixes the quotes around the filter name, and also
updates the docblocks for the other 3 similar filters for better conformance to
the documentation standards.

Props shazahm1hotmailcom, JPry, jnylen0.
Fixes #39300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 01:37:40 +00:00
James Nylen
d515e20a1a REST API: Fix PHP warnings when get_theme_support( 'post-formats' ) is not an array.
If `add_theme_support( 'post-formats' )` is called with no additional
arguments, then `get_theme_support( 'post-formats' )` returns `true` rather
than an array of supported formats.  Avoid generating PHP warnings in this
situation.

Props dreamon11, ChopinBach.
Fixes #39293.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 00:56:44 +00:00
Ella Iseulde Van Dorpe
c7988f1f03 Editor: Let the Add New link disappear in DFW mode.
The link was moved outside the heading in [38983].

Fixes #39313 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-17 10:23:43 +00:00
David A. Kennedy
7ad554f955 Twenty Seventeen: Improves code readability and code standards in files
Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards.

Props sstoqnov.

Fixes #39152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 22:08:47 +00:00
Joe McGill
efb191c2ed Media: Allow PDF fallbacks filter to process custom sizes.
This fixes an oversight in [39246], which added a hook for filtering
the array of sizes used for PDF thumbnails, but failed to provide a way
for sizes added through `add_image_size()` to be processed.

Props gitlost.
Fixes #39231. See #38594.
Built from https://develop.svn.wordpress.org/trunk@39617


git-svn-id: http://core.svn.wordpress.org/trunk@39557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 20:30:42 +00:00
Weston Ruter
15ddaa269e Customize: Bump wp_custom_css_cb from running at wp_head priority 11 to 101 to ensure Custom CSS overrides other CSS.
Aligns `wp_head` action priority with Jetpack's Custom CSS.

Amends [38829].
See #35395, #38672.
Fixes #39270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 07:29:42 +00:00
Dion Hulse
1d342fcdc6 Feeds: Replace the RSS2 lastBuildDate date field with the r date specifier.
See #39141.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:42:40 +00:00
Dion Hulse
f794939ed3 Feeds: Do not translate the lastBuildDate field in RSS feeds.
Props stevenkword, dd32.
Fixes #39141

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


git-svn-id: http://core.svn.wordpress.org/trunk@39553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:39:41 +00:00
Dion Hulse
c92e916866 Media: Move a variable definition outside of conditionals to ensure it's always available.
This fixes cases where the URL to a PDF preview may be incorrectly calculated when no thumbnails were generated for the PDF (and avoids a PHP Notice at the same time).

Fixes #39250.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-16 06:21:41 +00:00
Adam Silverstein
bc7a03a33b WP-API: JavaScript client - fix setup of models used by wp.api.collections objects.
Correct setup for the `model` attribute of `wp.api.collections` objects. Set the collection model as a function that returns a new model of the underlying type, instead of setting it as the model prototype. Fixes an issue where models for fetched collections weren't set up properly and didn't have the expected mixin methods such as `getCategories` available.

Props jesseenterprises.
Fixes #39070.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-15 12:54:42 +00:00
Ella Iseulde Van Dorpe
4ec102c189 Editor: Remove target=_blank when unchecked in the link modal.
Fixes #39276 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 20:30:44 +00:00
John Blackbourn
4548b08236 General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org.

Props keesiemeijer
Fixes #39148

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


git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 04:18:42 +00:00
John Blackbourn
efa99585e3 Posts, Post Types: Ensure is_page_template() can only return true when viewing a singular post query.
Props natereist, dlh
Fixes #39211

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


git-svn-id: http://core.svn.wordpress.org/trunk@39539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 03:43:43 +00:00
James Nylen
505e135f4c REST API: Add support for filename search in media endpoint.
In [38625], the functionality to search for attachments by filename was added
via the `posts_clauses` filter and the `_filter_query_attachment_filenames()`
function.  This moves `_filter_query_attachment_filenames()` from
`wp-admin/includes/post.php` to `wp-includes/post.php` so that it can be
applied in the same manner in the REST API media endpoint.

Props jblz, tyxla.
Fixes #39092.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 14:09:42 +00:00
James Nylen
7cc41e47ac REST API: Allow sending an empty or no-op comment update.
In general, updates that don't actually change anything should succeed.
[39371] added tests for other object types, and this commit fixes empty updates
for comments and adds the missing test.

Fixes #38700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 13:53:45 +00:00
Gary Pendergast
7d9b5b14b5 Libraries: Update zxcvbn from version 1.0 to 4.4.1
This includes masses of bug fixes, as well as tweaks to how passwords are scored.

QUnit tests have been updated to reflect tha scoring changes.

Full changelog: https://github.com/dropbox/zxcvbn/compare/v1.0...v4.4.1

Fixes #31647.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 11:23:42 +00:00
James Nylen
d7ab7fdf5a REST API: Do not include the password argument when getting media items
Currently, `attachment` is the only post type exposed via the REST API that
does not support password protection, but it's possible for other post types to
remove password support.

Fixes #38977.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 03:51:44 +00:00
James Nylen
0b599cce41 REST API: Do not error on empty JSON body
It's fairly common for clients to send `Content-Type: application/json` with an
empty body.  While technically not valid JSON, we've historically supported
this behaviour, so it shouldn't cause an error.

Props JPry.
Fixes #39150.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 03:34:41 +00:00
Boone Gorges
aa644128d6 Taxonomy: Use get_term_link() instead of get_category_link() in get_term_parents_list().
`get_category_link()` is a wrapper for `get_term_link()`. Using the
unwrapped function makes more sense semantically (it's taxonomy-
agnostic) and it's also more parsimonious (the `WP_Error` check in
`get_category_link()` is redundant with similar checks just before
in `get_term_link()`).

Props keesiemeijer.
Fixes #17069.
Built from https://develop.svn.wordpress.org/trunk@39593


git-svn-id: http://core.svn.wordpress.org/trunk@39533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 02:57:41 +00:00
Ryan McCue
20aa5d7150 General: Correctly detect trailing newline when prepending.
We need to check that the final line is actually an artifact of explode(), not just an empty input string.

See #37082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 02:48:41 +00:00
Ryan McCue
fbc00b31ef General: Remove most uses of create_function()
create_function() is equivalent to eval(), and most of our uses can be refactored. This is simpler, more secure, and slightly more performant.

Props sgolemon.
Fixes #37082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 01:49:39 +00:00
Felix Arntz
6e2d9af8b6 Tests: Use wp_delete_user() during teardown to delete a single site's user.
Fixes failing tests for `get_dashboard_url()`.

Fixes #39065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 23:18:40 +00:00
Felix Arntz
d784b5552c Multisite: Replace is_super_admin() with manage_network in get_dashboard_url().
Unit tests for `get_dashboard_url()` have been added.

Props iaaxpage.
Fixes #39065. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 22:41:39 +00:00
Felix Arntz
f704fc808a Multisite: Handle capability check for removing oneself via map_meta_cap().
Site administrators should not be able to remove themselves from a site. This moves the enforcement of this rule from `wp-admin/users.php` to `remove_user_from_blog()` via the `remove_user` capability, which furthermore allows us to get rid of two additional clauses and their `is_super_admin()` checks in `wp-admin/users.php`. A unit test for the new behavior has been added.

Fixes #39063. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 21:42:42 +00:00
Konstantin Obenland
ee36cf9214 Themes: Add missing square bracket in jQuery selector.
Fixes a bug in Safari where the UI wasn't updated after deleting a theme due to
the incomplete selector.

Props Hristo Sg.
Fixes #39246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 09:32:41 +00:00
Weston Ruter
c9b863fc40 Customize: Prevent navigation in preview when clicking on child elements of preview links that have non-previewable URLs.
Fixes #39098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 08:09:41 +00:00
Dion Hulse
5edd9b03e7 Remove the WordPress version number from readme.html.
See #35554 

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


git-svn-id: http://core.svn.wordpress.org/trunk@39523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 08:01:39 +00:00
Weston Ruter
8a89a50c69 Customize: Prevent edit shortcut from losing event handler after selective refresh.
Props sirbrillig.
See #27403.
Fixes #39100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 07:52:43 +00:00
Dion Hulse
0a349c9641 PDF Images: Avoid a PHP Warning when attempting to process a file without an extension.
Props chandrapatel for initial patch.
Fixes #39195.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 06:19:41 +00:00
Dion Hulse
883689c816 Taxonomy: Restore the ability to use string-based $args in wp_get_object_terms().
Props tyxla.
Fixes #39215

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


git-svn-id: http://core.svn.wordpress.org/trunk@39518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 05:47:42 +00:00
Weston Ruter
826a0323a2 Build/Test Tools: Facilitate SVN and Git being co-located in the same directory.
Ignore .svn in .gitignore, and ignore .git in svn:ignore.

Fixes #39245.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 05:12:44 +00:00
Dion Hulse
bdf6087450 Bootstrap: Re-initialize any hooks added manually by object-cache.php.
Prior to 3.1 if a object cache dropin wanted to add actions, they needed to use `$wp_filter` directly.

Props jorbin.
Fixes #39132.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:29:42 +00:00
Peter Wilson
c21907ca1e Options: Prevent unnecessary SQL updates by update_option.
Previously an option containing an object would trigger an SQL `UPDATE` on all calls to `update_option`, even if the old and new values were identical. This was due to the old and new values having differing resource IDs.

This change compares the old and new values as serialized data to remove the resource ID from the comparison.

Props salcode, bradyvercher, peterwilsoncc.
Fixes #38903.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-11 21:43:43 +00:00
Rachel Baker
d054b9afba REST API: Allow schema sanitization_callback to be set to null to bypass fallback sanitization functions.
The logic in WP_REST_Request->sanitize_params() added in [39091] did not account for `null` or `false` being the sanitization_callback preventing overriding `rest_parse_request_arg()`. This fixes that oversight, allowing the built in sanitization function to be bypassed. See #38593.

Props kkoppenhaver, rachelbaker, jnylen0.
Fixes #39042.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-11 21:26:43 +00:00
Weston Ruter
9669c60397 Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control.
Fixes #39102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 23:47:41 +00:00
Weston Ruter
57830bf2be Customize: Deprecate page_home nav menu item starter content in favor of home_link; replace usage in Twenty Seventeen.
Props celloexpressions, westonruter.
Amends [38991].
See #38615, #38114.
Fixes #39104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 23:39:43 +00:00
Weston Ruter
a366e58135 Customize: Trim whitespace for URLs supplied for external_header_video to prevent esc_url_raw() from making them invalid.
Props tyxla.
See #38172.
Fixes #39125.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 07:00:45 +00:00
Weston Ruter
6527c24ab1 Customize: Prevent single quotes (apostrophes) in custom_css values from unexpectedly causing false positives for unbalanced character validation errors.
See #39218, #35395.
Fixes #39198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 06:45:42 +00:00
Weston Ruter
1b96e389c0 Customize: Fix inability to delete nav menus by preventing preview filters from being added during customize_save admin ajax request.
Also prevent setting `nav_menu_locations[...]` values to `NaN` which gets sent as `null`.

Amends [38810].
See #30937.
Fixes #39103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 06:30:46 +00:00
Weston Ruter
f1c383454b Customize: Prevent scrolling custom_css textarea to top when pressing tab.
Props tyxla, sstoqnov for testing, celloexpressions for testing.
See #38667.
Fixes #39134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:44:40 +00:00
John Blackbourn
5b15e8c11b Build/Test Tools: Remove some more randomness.
See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@39496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:02:41 +00:00
John Blackbourn
da5255777a Build/Test Tools: Reuse another fixture in the user capability tests.
See #38716

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


git-svn-id: http://core.svn.wordpress.org/trunk@39495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:36:41 +00:00
John Blackbourn
b5f7ab46dd Build/Test Tools: Remove commented out tests that have existed in an unimplemented state since the dawn of the test infrastructure.
See #38716

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


git-svn-id: http://core.svn.wordpress.org/trunk@39494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 23:12:41 +00:00