Sergey Biryukov
bee0136037
Plugins: Update review filter links in Details modal.
...
Props darko-a7, afercia.
Fixes #43016 . See #meta3379.
Built from https://develop.svn.wordpress.org/trunk@42459
git-svn-id: http://core.svn.wordpress.org/trunk@42288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 00:15:46 +00:00
Sergey Biryukov
589395347a
Widgets: When checking for errors in Custom HTML widget, pass correct value to toggleClass()
for Save button.
...
`toggleClass()` expects a boolean as a second argument, not an integer.
Props iCaleb.
Fixes #42867 .
Built from https://develop.svn.wordpress.org/trunk@42457
git-svn-id: http://core.svn.wordpress.org/trunk@42286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 23:47:47 +00:00
Sergey Biryukov
0d23b38fd3
Media: Add small-audio.flac
for a unit test added in [42451].
...
See #42225 .
Built from https://develop.svn.wordpress.org/trunk@42453
git-svn-id: http://core.svn.wordpress.org/trunk@42283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:33:47 +00:00
Sergey Biryukov
13e40181eb
Media: Add flac
to the list of allowed file types.
...
Props blobfolio.
Fixes #42225 .
Built from https://develop.svn.wordpress.org/trunk@42451
git-svn-id: http://core.svn.wordpress.org/trunk@42281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:17:47 +00:00
Sergey Biryukov
35653f0432
Media: Bring consistency to getimagesize()
error suppression.
...
Props chasewg, joemcgill, jeremyfelt.
Fixes #42480 .
Built from https://develop.svn.wordpress.org/trunk@42449
git-svn-id: http://core.svn.wordpress.org/trunk@42279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:44:47 +00:00
Sergey Biryukov
9cb44f5f2f
Themes: Improve line wrapping in feature filter on Theme Install screen and in the Customizer.
...
Props chetan200891 for initial patch.
Fixes #42871 .
Built from https://develop.svn.wordpress.org/trunk@42447
git-svn-id: http://core.svn.wordpress.org/trunk@42277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:27:53 +00:00
Andrew Ozz
1fb6a63449
TinyMCE: on the toolbar drop-downs apply overflow style on the actual element with text.
...
Props abdullahramzan, azaozz.
Fixes #43090 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42446
git-svn-id: http://core.svn.wordpress.org/trunk@42276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 09:51:48 +00:00
Andrea Fercia
3fb8eee9fc
Accessibility: Media: Improve the usage of a few label elements in the media templates.
...
Label elements should only be used for labelable elements.
- `Uploaded By` and `Uploaded To` aren't form controls and shouldn't be associated with labels
- changes the labels for media source, alternate sources, poster image, and tracks to solve a layout issue and explicitly associate the labels to their form fields (previously, the labels were wrapping also the Remove buttons)
Props Presskopp, afercia.
Fixes #38759 , #40468 .
Built from https://develop.svn.wordpress.org/trunk@42444
git-svn-id: http://core.svn.wordpress.org/trunk@42274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-14 16:39:47 +00:00
Andrea Fercia
239da4c1e6
Plugins: Fix the plugin details modal in the install plugin search tab after [41356].
...
Fixes #43082
Built from https://develop.svn.wordpress.org/trunk@42443
git-svn-id: http://core.svn.wordpress.org/trunk@42273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-13 18:53:51 +00:00
Peter Wilson
a492541c35
Formatting: Do not run formatting and texturization on author bios.
...
Removes the formatting and texturization added to author bios in #40040 due to back-compatibility concerns.
Reverts [41172], [41173].
Props 0x6f0, rabmalin for review.
Fixes #42578 .
Built from https://develop.svn.wordpress.org/trunk@42441
git-svn-id: http://core.svn.wordpress.org/trunk@42271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-13 01:11:49 +00:00
Andrea Fercia
9c3344197d
Accessibility: use aria-current
for the paginated post links output by wp_link_pages()
.
...
Continues the introduction in core of the aria-current attribute after [41683], [41359], and [41371].
- changes the `wp_link_pages()` (see the `nextpage` quicktag) output to use an `aria-current` attribute on the current item
- adds `post-nav-links` and `post-page-numbers` CSS classes to help themes style these links
- updates the related tests
Props antonioeatgoat, alexstine.
Fixes #41859 .
Built from https://develop.svn.wordpress.org/trunk@42440
git-svn-id: http://core.svn.wordpress.org/trunk@42270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:17:51 +00:00
Sergey Biryukov
351d71d7ea
Twenty Seventeen: Remove unnecessary comment in front-page.php
.
...
Props hardik-amipara, poena.
Fixes #42820 .
Built from https://develop.svn.wordpress.org/trunk@42437
git-svn-id: http://core.svn.wordpress.org/trunk@42267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:01:51 +00:00
atimmer
6310ad30d0
Docs: Improve JS Docs for controllers/customize-image-cropper.js
.
...
Props manuelaugustin, bramheijmink, andizer, ireneyoast.
Fixes #43020 .
Built from https://develop.svn.wordpress.org/trunk@42435
git-svn-id: http://core.svn.wordpress.org/trunk@42265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-11 14:32:52 +00:00
Dion Hulse
1d59873ace
Upgrade: When deleting old files, if deletion fails attempt to empty the file instead.
...
Props joemcgill, dd32.
Fixes #42963 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42433
git-svn-id: http://core.svn.wordpress.org/trunk@42263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 06:10:47 +00:00
Dion Hulse
cdfa5adc43
Streams: When checking in wp_is_stream()
escape the stream wrapper names for PCRE to avoid PHP warnings when invalid stream wrappers are registered.
...
Fixes #43054 .
Built from https://develop.svn.wordpress.org/trunk@42432
git-svn-id: http://core.svn.wordpress.org/trunk@42262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 02:50:46 +00:00
Mike Schroder
7bfc60864f
Media: Skip test_remove_orientation_data_on_rotate
if missing deps.
...
The `test_remove_orientation_data_on_rotate()` test was failing on systems that did not have the `exif` extension available.
Skips test when the `exif_read_data()` function does not exist.
Props danielbachhuber, desrosj.
Fixes #42447 .
Built from https://develop.svn.wordpress.org/trunk@42431
git-svn-id: http://core.svn.wordpress.org/trunk@42261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 01:17:51 +00:00
Andrew Ozz
4a3faae0e8
Editor: ensure there is a selection before getting the caret position. Fixes a bug in Firefox when there is no selection for a hidden element.
...
Props johnschulz, azaozz.
Fixes #43012 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42430
git-svn-id: http://core.svn.wordpress.org/trunk@42260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-08 20:20:53 +00:00
Gary Pendergast
fbb1f9162b
Formatting: Fix capital_P_dangit() not capital P-ing, dangit.
...
Unfortunately, in my overzealous desire to fix all the un-capitalised Ps, [42343] capitalled some Ps that intentionally should not be capitals.
This commit fixes the incorrectly capitalling of Ps, as well as including unit tests and PHPCS instructions to ensure we never capitulate to capitalisationing them again.
Props superdav42.
Fixes #43040 .
Fixes #43041 .
Built from https://develop.svn.wordpress.org/trunk@42429
git-svn-id: http://core.svn.wordpress.org/trunk@42259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-08 10:36:51 +00:00
atimmer
d1c58e7850
Docs: Improve JSDoc for js/media-upload.js
.
...
Props terwdan, diedeexterkate, andizer, ireneyoast.
Fixes #42956 .
Built from https://develop.svn.wordpress.org/trunk@42426
git-svn-id: http://core.svn.wordpress.org/trunk@42257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-04 14:37:49 +00:00
Andrea Fercia
4e5215deec
Editor: Link suggestions: add fallback title for posts with no title.
...
Fixes #42664 .
Built from https://develop.svn.wordpress.org/trunk@42425
git-svn-id: http://core.svn.wordpress.org/trunk@42256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-02 18:11:52 +00:00
Rachel Baker
502dcd51a4
General: Update copyright year to 2018 in license.txt.
...
Fixes #43007 .
Built from https://develop.svn.wordpress.org/trunk@42424
git-svn-id: http://core.svn.wordpress.org/trunk@42255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-01 03:17:48 +00:00
Rachel Baker
2eca52eaa4
REST API: Adjust unit testes to expect a 401 status code in error responses from permission callbacks when user is not authenticated.
...
Missed in [42421].
Fixes #42828 .
Built from https://develop.svn.wordpress.org/trunk@42423
git-svn-id: http://core.svn.wordpress.org/trunk@42254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-01 02:31:46 +00:00
Rachel Baker
a787006298
REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch()
.
...
Use the `rest_authorization_required_code()` function to return a 401 status code when a permission callback fails due to a user not being logged in.
Props jaswrks.
Fixes #42828 .
Built from https://develop.svn.wordpress.org/trunk@42421
git-svn-id: http://core.svn.wordpress.org/trunk@42252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-30 20:37:47 +00:00
Rachel Baker
386a5c397f
Comments: Introduce filter for the arguments for the comment query in the comments list table.
...
Add `comments_list_table_query_args` filter to the Comments List Table.
Props soulseekah, birgire.
Fixes #42997 .
Built from https://develop.svn.wordpress.org/trunk@42420
git-svn-id: http://core.svn.wordpress.org/trunk@42251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-29 18:21:52 +00:00
Dion Hulse
02d04f2b5c
WP: Don't attempt to convert multiple-nested arrays to a string in WP->parse_request().
...
See #14330 .
Fixes #42752 .
Built from https://develop.svn.wordpress.org/trunk@42419
git-svn-id: http://core.svn.wordpress.org/trunk@42250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-22 03:18:47 +00:00
Boone Gorges
699025a785
Taxonomy: Restore deprecated argument to term_description()
signature.
...
This ensures that the parameter can't be reused for something else
in the future.
Props jorbin.
Fixes #42605 .
Built from https://develop.svn.wordpress.org/trunk@42417
git-svn-id: http://core.svn.wordpress.org/trunk@42248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-22 02:48:51 +00:00
atimmer
02b86b8418
Docs: Improve JSDoc for customize-preview-widgets.js
.
...
Props ireneyoast, andizer, robinvandervliet, boblinthorst.
Fixes #42954 .
Built from https://develop.svn.wordpress.org/trunk@42416
git-svn-id: http://core.svn.wordpress.org/trunk@42247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 15:12:49 +00:00
atimmer
f296e2cbbc
Docs: Improve JSDoc for media/views/attachments.js
.
...
Props maartenleenders, herregroen, jipmoors, ireneyoast.
Fixes #42832 .
Built from https://develop.svn.wordpress.org/trunk@42415
git-svn-id: http://core.svn.wordpress.org/trunk@42246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 14:27:52 +00:00
Sergey Biryukov
7dfcb33d4d
Docs: Remove erroneous zero-width space before URL in fetch_feed()
DocBlock.
...
Props coffee2code.
Fixes #42951 . See #meta3212.
Built from https://develop.svn.wordpress.org/trunk@42414
git-svn-id: http://core.svn.wordpress.org/trunk@42245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 02:40:54 +00:00
Dion Hulse
1caa918dbc
i18n: Don't use esc_attr_e()
on a variable.
...
Props yoavf.
Fuxes #42935 .
Built from https://develop.svn.wordpress.org/trunk@42413
git-svn-id: http://core.svn.wordpress.org/trunk@42244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-20 05:35:50 +00:00
John Blackbourn
a5e2908bbd
Docs: Improve the function and parameter descriptions for do_meta_boxes()
.
...
See #42505
Built from https://develop.svn.wordpress.org/trunk@42412
git-svn-id: http://core.svn.wordpress.org/trunk@42243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-19 15:03:52 +00:00
atimmer
f6a37e7d39
Docs: Remove @summary
tags from JSDoc.
...
As decided in the JavaScript core chat. With a few reasons:
* It is visually cleaner when reading the source.
* This bring the JavaScript documentation closer to the PHP documentation.
The only disadvantage is that the JSDoc parser doesn't split out the summary and the description in the new format. We've decided to solve this when building the JavaScript documentation parser.
Props herregroen.
Fixes #42901 .
Built from https://develop.svn.wordpress.org/trunk@42411
git-svn-id: http://core.svn.wordpress.org/trunk@42240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 14:14:53 +00:00
atimmer
65b715c991
Docs: Improve JSDoc for js/media/controllers/edit-image.js
.
...
Amends r42392 - includes the built media files.
Built from https://develop.svn.wordpress.org/trunk@42410
git-svn-id: http://core.svn.wordpress.org/trunk@42239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 11:20:47 +00:00
Sergey Biryukov
df07690883
Canonical: After [42408], remove sprintf()
call for consistency with Location
header.
...
See #42313 .
Built from https://develop.svn.wordpress.org/trunk@42409
git-svn-id: http://core.svn.wordpress.org/trunk@42238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 01:11:47 +00:00
Sergey Biryukov
0bc86bc220
Canonical: Introduce x_redirect_by
filter that allows applications to identify themselves via X-Redirect-By
header when they're doing a redirect.
...
Props joostdevalk.
Fixes #42313 .
Built from https://develop.svn.wordpress.org/trunk@42408
git-svn-id: http://core.svn.wordpress.org/trunk@42237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 01:04:52 +00:00
John Blackbourn
cb53982d1f
Media: Pass the attachment ID to the intermediate_image_sizes_advanced
filter.
...
Props drywallbmb, robbie505
Fixes 42745
Built from https://develop.svn.wordpress.org/trunk@42407
git-svn-id: http://core.svn.wordpress.org/trunk@42236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:47:47 +00:00
John Blackbourn
3ee38c0a05
Login and Registration: Instruct the browser to disable autocapitalisation for the user login field on the login screen.
...
Props drywallbmb
Fixes #42886
Built from https://develop.svn.wordpress.org/trunk@42406
git-svn-id: http://core.svn.wordpress.org/trunk@42235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:41:48 +00:00
John Blackbourn
e123166a3a
Build/Test Tools: Instruct Git and Subversion to ignore Composer's vendor
directory.
...
Props netweb
Fixes #42909
Built from https://develop.svn.wordpress.org/trunk@42405
git-svn-id: http://core.svn.wordpress.org/trunk@42234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:38:53 +00:00
Adam Silverstein
d82e2b02be
Media: improve flows for cropping on attachment details screen.
...
On the "Attachment Details" screen:
* The crop button is always 'enabled'.
* Clicking the crop button with no selection selects the entire image.
* Clicking the crop button with the entire image selected doesn't do anything.
* Clicking the crop button with a selection crops as expected.
Props sonjanyc, afercia, mikeschroder.
Fixes #30155 .
Built from https://develop.svn.wordpress.org/trunk@42404
git-svn-id: http://core.svn.wordpress.org/trunk@42233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 22:03:50 +00:00
atimmer
1f707de9dd
Docs: Improve wp-admin JSDoc structural data globally.
...
JSDoc takes it structural data from `@namespace`, `@lends` and `@memberOf`. This change fixes these tags for all JavaScript files in the wp-admin folder.
* Add jsdoc configuration to parse wp-admin/js files. Use `jsdoc -c jsdoc.conf.json` to generate JSDoc.
* Define all used namespaces using `@namespace`.
* Define each usage of the extend function as a prototype assignment using `@lends`.
* Add `@alias` if JSDoc cannot detect the correct name automatically.
This has previously been corrected for all `wp-includes` JavaScript files: [41351].
Props herregroen.
Fixes #42485 .
Built from https://develop.svn.wordpress.org/trunk@42403
git-svn-id: http://core.svn.wordpress.org/trunk@42232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 13:42:46 +00:00
Boone Gorges
36498bd601
Improve performance of wp_list_pages()
tests.
...
The changeset also removes the use of hardcoded post/author IDs.
Props frank-klein.
Fixes #42903 .
Built from https://develop.svn.wordpress.org/trunk@42402
git-svn-id: http://core.svn.wordpress.org/trunk@42231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 11:15:46 +00:00
Gary Pendergast
6da54f0d9b
Canonical URLs: Redirect to the correct URL when the post date changes.
...
When a post slug is changed, we store a copy of the old slug, so that we can redirect visitors visiting the old URL to the new URL.
In the same way, this stores a copy of the old date, when the post date changes, so we can redirect visitors to the new URL.
Props nickmomrik.
Fixes #15397 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42401
git-svn-id: http://core.svn.wordpress.org/trunk@42230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 08:31:47 +00:00
Sergey Biryukov
7c77266b9b
Docs: Remove extra dot from some @since
tags.
...
Props hardik-amipara.
Fixes #42899 .
Built from https://develop.svn.wordpress.org/trunk@42400
git-svn-id: http://core.svn.wordpress.org/trunk@42229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 05:16:47 +00:00
Sergey Biryukov
a3f69ffaa3
Docs: Add missing @staticvar
entries in wp-includes/l10n.php
.
...
Props birgire.
Fixes #42800 .
Built from https://develop.svn.wordpress.org/trunk@42399
git-svn-id: http://core.svn.wordpress.org/trunk@42228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 05:08:51 +00:00
Sergey Biryukov
ff89ce1879
Posts: Rename $ID
to $post
in get_post_mime_type()
and get_post_status()
for consistency with other functions.
...
See #42797 .
Built from https://develop.svn.wordpress.org/trunk@42398
git-svn-id: http://core.svn.wordpress.org/trunk@42227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 01:03:47 +00:00
Sergey Biryukov
0d09b75c4b
Docs: Add missing parameter description in wp_get_post_parent_id()
function DocBlock.
...
Rename `$post_ID` to `$post` for consistency with other functions.
Add unit tests for `wp_get_post_parent_id()`.
Props keesiemeijer.
Fixes #42797 .
Built from https://develop.svn.wordpress.org/trunk@42397
git-svn-id: http://core.svn.wordpress.org/trunk@42226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 01:02:48 +00:00
Sergey Biryukov
faa04cf9b3
Docs: Add @since
version for WP_Customize_Widgets::filter_dynamic_sidebar_params()
.
...
Props keesiemeijer.
Fixes #42894 .
Built from https://develop.svn.wordpress.org/trunk@42396
git-svn-id: http://core.svn.wordpress.org/trunk@42225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:35:47 +00:00
Sergey Biryukov
835bec6282
Docs: Add @since
version for WP_Locale_Switcher::init()
.
...
Props keesiemeijer.
Fixes #42798 .
Built from https://develop.svn.wordpress.org/trunk@42395
git-svn-id: http://core.svn.wordpress.org/trunk@42224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:32:46 +00:00
Sergey Biryukov
986e46d2c0
Docs: Add missing @since
tags for add menu page functions.
...
Props keesiemeijer.
Fixes #42882 .
Built from https://develop.svn.wordpress.org/trunk@42394
git-svn-id: http://core.svn.wordpress.org/trunk@42223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:15:52 +00:00
atimmer
f544da9b38
Docs: Improve JS Docs for wp-admin/js/dashboard.js
.
...
Props jipmoors, andizer, ireneyoast, boblinthorst.
Fixes #42831 .
Built from https://develop.svn.wordpress.org/trunk@42393
git-svn-id: http://core.svn.wordpress.org/trunk@42222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-14 14:11:51 +00:00
atimmer
a846a553a1
Docs: Improve JS Docs for js/media/controllers/edit-image.js
.
...
Props jjcomack, nicollle, andizer.
Fixes #42680 .
Built from https://develop.svn.wordpress.org/trunk@42392
git-svn-id: http://core.svn.wordpress.org/trunk@42221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 14:10:52 +00:00
Weston Ruter
fe2fda8cc2
Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode.
...
See #40854 .
Amends [41985].
Props aduth.
Fixes #42416 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42390
git-svn-id: http://core.svn.wordpress.org/trunk@42219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 05:17:48 +00:00
atimmer
1a357d3758
Docs: Improve JS Docs for wp-includes/js/heartbeat.js
.
...
Most of the documentation was already present. This change achieves the following:
* Fixes the formatting for most doc blocks.
* Adds `@since` tags to all functions.
* Makes sure the heartbeat public methods are correctly added to the `wp.heartbeat` namespace.
Props andizer, jjcomack, carolinegeven.
Fixes #42675 .
Built from https://develop.svn.wordpress.org/trunk@42389
git-svn-id: http://core.svn.wordpress.org/trunk@42218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 14:33:54 +00:00
Dion Hulse
04efa7e7ea
WPDB: Always use mysqli
when available.
...
This change makes WordPress use `mysqli` on PHP <5.5 when available, instead of only in PHP 5.5+ and development installs.
WPDB includes a fallback to `mysql` in the event that the database connection fails with `mysqli` so incompatibilities should be few and far between.
Fixes #42812 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42388
git-svn-id: http://core.svn.wordpress.org/trunk@42217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 05:43:48 +00:00
Dion Hulse
6322887487
Filesystem: Allow wp_normalise_path()
to handle PHP stream wrappers such as php://
correctly.
...
Props calin, dd32.
Fixes #42837 .
Built from https://develop.svn.wordpress.org/trunk@42387
git-svn-id: http://core.svn.wordpress.org/trunk@42216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 04:16:47 +00:00
Konstantin Obenland
d6ffe16606
Twenty Ten: Use global img contraint for captions
...
Fixes an incompatibility with the way caption width is set since 4.9, where the caption element would cover the whole content width.
Props slilley, Clorith, hardeepasrani.
Fixes #42604 .
Built from https://develop.svn.wordpress.org/trunk@42386
git-svn-id: http://core.svn.wordpress.org/trunk@42215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 23:32:46 +00:00
atimmer
46cbfc405f
Docs: Improve JS Docs for custom-header.js
.
...
The `custom-header.js` file is only used on the `wp-admin/themes.php?page=custom-header` page. As that page is no longer linked from the UI the functions in the file are marked deprecated.
Props nicollle, jipmoors, diedeexterkate.
Fixes #42678 .
Built from https://develop.svn.wordpress.org/trunk@42385
git-svn-id: http://core.svn.wordpress.org/trunk@42214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 16:27:51 +00:00
Dion Hulse
078b842c60
Docs: Correct some typos in the docs for wp_ajax_get_community_events()
.
...
Props Presskopp.
Fixes #42861 .
Built from https://develop.svn.wordpress.org/trunk@42384
git-svn-id: http://core.svn.wordpress.org/trunk@42213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 08:49:48 +00:00
Dion Hulse
ea74239f90
Posts: When using wp_update_post()
on a attachment
post_type item, pass the $wp_error
parameter through to wp_insert_attachment()
.
...
Props MyThemeShop.
Fixes #41513 .
Built from https://develop.svn.wordpress.org/trunk@42383
git-svn-id: http://core.svn.wordpress.org/trunk@42212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 06:37:50 +00:00
John Blackbourn
24a94c55ae
Build/Test tools: Switch to PHPUnit's expectOutputString()
method instead of manually using output buffers for output assertions.
...
Props birgire
Fixes #42098
Built from https://develop.svn.wordpress.org/trunk@42382
git-svn-id: http://core.svn.wordpress.org/trunk@42211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-10 00:31:46 +00:00
John Blackbourn
a985a50526
Build/Test tools: Remove unnecessary PHP functionality tests from the test suite.
...
Props Frank Klein
Fixes #42277
Built from https://develop.svn.wordpress.org/trunk@42381
git-svn-id: http://core.svn.wordpress.org/trunk@42210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-09 23:09:48 +00:00
John Blackbourn
ee51200c50
Role/Capability: When checking capabilities before setting a post slug, ensure the correct post type capabilities are used.
...
Previously, only the `publish_posts` capability was checked. Now, the correct meta or primitive capability for the post type is used where appropriate.
Props peterwilsoncc
Fixes #42464
Built from https://develop.svn.wordpress.org/trunk@42380
git-svn-id: http://core.svn.wordpress.org/trunk@42209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-09 22:51:54 +00:00
John Blackbourn
dbd8923458
Build/Test tools: Add inline documentation to undocumented methods in the WP_UnitTestCase
class.
...
Props Frank Klein
Fixes #42731
Built from https://develop.svn.wordpress.org/trunk@42379
git-svn-id: http://core.svn.wordpress.org/trunk@42208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-08 21:01:51 +00:00
Sergey Biryukov
7ec3bfe1ce
Permalinks: Remove unnecesary temporary variable in get_permalink()
.
...
Props JPry, danimalbrown.
Fixes #41981 .
Built from https://develop.svn.wordpress.org/trunk@42378
git-svn-id: http://core.svn.wordpress.org/trunk@42207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 14:50:46 +00:00
Sergey Biryukov
823ec0859a
Docs: Correct @staticvar
entry for wp_rand()
.
...
Props chetan200891, birgire.
Fixes #42796 .
Built from https://develop.svn.wordpress.org/trunk@42377
git-svn-id: http://core.svn.wordpress.org/trunk@42206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 13:53:47 +00:00
Sergey Biryukov
0354c3e2f1
Docs: Add missing @return
entry for WP_Comment_Query::get_comment_ids()
.
...
Props chetan200891, birgire.
Fixes #42795 .
Built from https://develop.svn.wordpress.org/trunk@42376
git-svn-id: http://core.svn.wordpress.org/trunk@42205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 13:47:52 +00:00
Konstantin Obenland
856e7917e8
Widgets: Always try restoring widget assignments
...
For code-historic reasons, restoring widget assignments would not be attempted if there were no sidebars to map.
Restoring previous assignments is something unrelated to sidebar mappings however, so now it will be attempted on every theme switch.
See #42719 .
Built from https://develop.svn.wordpress.org/trunk@42374
git-svn-id: http://core.svn.wordpress.org/trunk@42203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 02:20:52 +00:00
Drew Jaynes
f4faaa53c7
Docs: Improve the usefulness of docs for wp_generate_password()
by noting the use of wp_rand() vs rand()
or mt_rand()
.
...
Props webdevmattcrom.
Fixes #42782 .
Built from https://develop.svn.wordpress.org/trunk@42373
git-svn-id: http://core.svn.wordpress.org/trunk@42202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 22:40:47 +00:00
Boone Gorges
39c7daf7db
category_description()
should be taxonomy-agnostic.
...
This change reinstates the previous de facto behavior of `category_description()`.
See [40979], [42364]. Because `term_description()` no longer passes `$taxonomy` to
`get_term_field()`, the parameter is no longer needed and has been deprecated.
Fixes #42605 . See #42771 .
Built from https://develop.svn.wordpress.org/trunk@42368
git-svn-id: http://core.svn.wordpress.org/trunk@42197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:49:46 +00:00
Boone Gorges
bc769416d8
get_the_category_by_ID()
should be taxonomy-agnostic.
...
Prior to 4.9, this function was accidentally taxonomy-agnostic in most cases.
The fix in [40979] caused a regression in this function. For backward
compatibility, we make it explicit that the query is by ID only.
See #42771 .
Built from https://develop.svn.wordpress.org/trunk@42367
git-svn-id: http://core.svn.wordpress.org/trunk@42196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:03:48 +00:00
Boone Gorges
1abbaa0f74
Fix regression in get_tag_link()
since 4.9.
...
See [42364] for description of the problem.
Because `get_category_link()` is now totally taxonomy-agnostic, `get_tag_link()`
can become a simple wrapper.
Props juiiee8487, markjaquith.
See #42771 .
Built from https://develop.svn.wordpress.org/trunk@42366
git-svn-id: http://core.svn.wordpress.org/trunk@42195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:52:48 +00:00
Boone Gorges
438f7a0701
Fix incorrect test names from [42364].
...
See #42771 .
Built from https://develop.svn.wordpress.org/trunk@42365
git-svn-id: http://core.svn.wordpress.org/trunk@42194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:47:49 +00:00
Boone Gorges
d8215873a2
Don't do a strict taxonomy check in get_category_link()
.
...
Prior to version 4.9, a quirk in the implementation of `get_term()` caused
`get_category_link( 123 )` to fetch the taxonomy archive link for term 123
even if 123 is not in the 'category' taxonomy. The quirk was fixed in [40979];
see #40671 . This bugfix introduced a regression for theme authors who were
expecting the old behavior.
By lifting the 'category' restriction, we allow the template function to work
in the old way.
Fixes #42717 . See #42771 .
Built from https://develop.svn.wordpress.org/trunk@42364
git-svn-id: http://core.svn.wordpress.org/trunk@42193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:39:45 +00:00
Konstantin Obenland
ff25787995
Widgets: Don't try mapping empty sidebars.
...
Fixes a bug where the mapping logic would try mapping empty sidebars, resulting in PHP warnings.
Props ionvv, chetan200891 for initial patch.
Fixes #42603 .
Built from https://develop.svn.wordpress.org/trunk@42362
git-svn-id: http://core.svn.wordpress.org/trunk@42191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:12:48 +00:00
Sergey Biryukov
4048a63b01
Docs: Add missing description for $weekday_name
parameter and @return
entry in WP_Locale::get_weekday_initial()
.
...
Props keesiemeijer, 1naveengiri.
Fixes #42793 .
Built from https://develop.svn.wordpress.org/trunk@42361
git-svn-id: http://core.svn.wordpress.org/trunk@42190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 15:59:54 +00:00
Peter Wilson
f617a2d6d9
Comments: Modernise JavaScript for comment reply links.
...
Update the comment reply JavaScript to be unobtrusive and use events rather than inline `onclick` attributes.
Along with bringing the code into the 2010s this prevents an edge-case in which `addComment.moveForm()` could be called before the JavaScript has loaded.
Props peterwilsoncc, bradparbs.
Fixes #31590 .
Built from https://develop.svn.wordpress.org/trunk@42360
git-svn-id: http://core.svn.wordpress.org/trunk@42189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 22:37:45 +00:00
Joe Hoyle
389283f5bd
REST API: Include permalink_structure in the settings route.
...
There are situations where the REST API client wants to be able to read and set the permalink_structure option. Though this doesn’t fix the use case of front-end rendered unauthenticated websites, it still has utility as a setting in it’s own right.
Props aduth.
See #41014 .
Built from https://develop.svn.wordpress.org/trunk@42359
git-svn-id: http://core.svn.wordpress.org/trunk@42188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 22:29:45 +00:00
Aaron Jorbin
c857299cd2
GENERAL: Update recommended PHP version to 7.2.
...
Props otto42, johnbillion, rachelbaker, jorbin.
Fixes 42789.
Built from https://develop.svn.wordpress.org/trunk@42358
git-svn-id: http://core.svn.wordpress.org/trunk@42187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 21:58:46 +00:00
Aaron Jorbin
73aca50ff0
CODING STANDARDS: Fix single/double quotation mark
...
Broken in [42351].
Unprops adamsilverstein.
Fixes 42679.
Built from https://develop.svn.wordpress.org/trunk@42357
git-svn-id: http://core.svn.wordpress.org/trunk@42186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 21:19:48 +00:00
Joe Hoyle
12c03d7aa8
REST API: Fix permissions error message in post statuses controller.
...
The permissions error message when a request tries to fetch post statuses unauthenticated is incorrect. It was a copy/paste from elsewhere, as indicated by the use of "in this post type" where this is no post type referenced.
Props schlessera.
Fixes #42303 .
Built from https://develop.svn.wordpress.org/trunk@42356
git-svn-id: http://core.svn.wordpress.org/trunk@42185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 20:49:47 +00:00
Aaron Jorbin
e4e0aa27a5
Docs: Add description for is_day().
...
Props webdevmattcrom.
Fixes #42784 .
Built from https://develop.svn.wordpress.org/trunk@42355
git-svn-id: http://core.svn.wordpress.org/trunk@42184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 20:42:47 +00:00
Rachel Baker
0e656c1a10
REST API: Correct HTTP status code in error for requests to create a duplicate term.
...
The 409 error code is intended for situations where it is expected that the user will resolve the conflict and resubmit the same request. We use 400 error codes for other routes when a duplicate request is made. The 400 status code tells the user they need to modify their request for it to be successful.
Props shooper.
Fixes #42781 . See #41370 .
Built from https://develop.svn.wordpress.org/trunk@42354
git-svn-id: http://core.svn.wordpress.org/trunk@42183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 19:09:49 +00:00
Adam Silverstein
9ff1fb5af1
Docs: Improve JSDocs for cropper.js.
...
Ammends r42352 - include the built media files.
Built from https://develop.svn.wordpress.org/trunk@42353
git-svn-id: http://core.svn.wordpress.org/trunk@42182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:56:46 +00:00
Adam Silverstein
56f0da1f45
Docs: Improve JSDocs for cropper.js.
...
Props manuelaugustin, bramheijmink.
Fixes #42677 .
Built from https://develop.svn.wordpress.org/trunk@42352
git-svn-id: http://core.svn.wordpress.org/trunk@42181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:47:46 +00:00
Adam Silverstein
5b4c7c4fab
Docs: Improve JSDocs for common.js.
...
Props andizer, rensw90, benvaassen, jipmoors, ireneyoast and nicollle.
Fixes 42679.
Built from https://develop.svn.wordpress.org/trunk@42351
git-svn-id: http://core.svn.wordpress.org/trunk@42180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:12:41 +00:00
Rachel Baker
01eeeb80fd
REST API: Add existing term_id to the error data object when attempting to create a duplicate term.
...
Props shooper, coleh.
Fixes #42597 . See #41370 .
Built from https://develop.svn.wordpress.org/trunk@42350
git-svn-id: http://core.svn.wordpress.org/trunk@42179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:11:53 +00:00
Drew Jaynes
36b3f1707c
Hooks: Standardize naming of dynamic hooks using values derived from superglobals to use interpolation vs concatenation.
...
This is a continuation of the work that happened in [38307] for #37748 .
Props ramiy.
Fixes #42698 .
Built from https://develop.svn.wordpress.org/trunk@42349
git-svn-id: http://core.svn.wordpress.org/trunk@42178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 11:36:50 +00:00
Sergey Biryukov
216441356a
Twenty Seventeen: Correct the number of recent posts in a comment in template-parts/page/content-front-page-panels.php
.
...
Props skostadinov, marcelo2605.
Fixes #42621 .
Built from https://develop.svn.wordpress.org/trunk@42348
git-svn-id: http://core.svn.wordpress.org/trunk@42177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:47:52 +00:00
Sergey Biryukov
82e5b30939
Twenty Seventeen: Use consistent wording when referring to the front page in inline docs.
...
Props chetan200891.
Fixes #42666 .
Built from https://develop.svn.wordpress.org/trunk@42347
git-svn-id: http://core.svn.wordpress.org/trunk@42176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:44:47 +00:00
Gary Pendergast
ea5c584222
Coding Standards: Add the phpcs.xml.dist
file.
...
See #41057 .
Built from https://develop.svn.wordpress.org/trunk@42346
git-svn-id: http://core.svn.wordpress.org/trunk@42175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:41:47 +00:00
Sergey Biryukov
3c4df552ca
Docs: Correct $attachment
parameter type for wp_prepare_attachment_for_js
filter.
...
Props danielbachhuber.
Fixes #42449 .
Built from https://develop.svn.wordpress.org/trunk@42345
git-svn-id: http://core.svn.wordpress.org/trunk@42174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:30:47 +00:00
Gary Pendergast
aaf99e6913
Code is Poetry.
...
WordPress' code just... wasn't.
This is now dealt with.
Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057 .
Built from https://develop.svn.wordpress.org/trunk@42343
git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Gary Pendergast
62be7ad218
Tests: Fix a couple of weirdly formatted comments.
...
See #41057 .
Built from https://develop.svn.wordpress.org/trunk@42342
git-svn-id: http://core.svn.wordpress.org/trunk@42171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 16:23:53 +00:00
John Blackbourn
67d03a98c2
Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html
capability.
...
Built from https://develop.svn.wordpress.org/trunk@42261
git-svn-id: http://core.svn.wordpress.org/trunk@42090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:00:48 +00:00
John Blackbourn
f1de7e42df
Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
...
Built from https://develop.svn.wordpress.org/trunk@42260
git-svn-id: http://core.svn.wordpress.org/trunk@42089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:56:48 +00:00
John Blackbourn
3713ac5ebc
Hardening: Add escaping to the language attributes used on html
elements.
...
Built from https://develop.svn.wordpress.org/trunk@42259
git-svn-id: http://core.svn.wordpress.org/trunk@42088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:55:47 +00:00
John Blackbourn
eaf1cfdc1f
Hardening: Use a properly generated hash for the newbloguser
key instead of a determinate substring.
...
Built from https://develop.svn.wordpress.org/trunk@42258
git-svn-id: http://core.svn.wordpress.org/trunk@42087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:52:50 +00:00
Sergey Biryukov
ca6f54cfce
Users: After [42256], remove unnecessary double quotes around first_name
and last_name
properties.
...
See #42713 .
Built from https://develop.svn.wordpress.org/trunk@42257
git-svn-id: http://core.svn.wordpress.org/trunk@42086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:28:53 +00:00
Dion Hulse
05d60f74ed
Users: Display partial names in the user listing tables.
...
This allows showing a name when only the first or last name is provided.
Props shital-patel, antipole.
Fixes #42713 .
Built from https://develop.svn.wordpress.org/trunk@42256
git-svn-id: http://core.svn.wordpress.org/trunk@42085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 03:41:46 +00:00
Drew Jaynes
b17405c3fe
General: Add complete test coverage for WP_Error
.
...
See #42742 .
Built from https://develop.svn.wordpress.org/trunk@42255
git-svn-id: http://core.svn.wordpress.org/trunk@42084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 02:19:48 +00:00