Commit Graph

25321 Commits

Author SHA1 Message Date
Sergey Biryukov
903224cce4 Plugins: Use correct variable name in install_plugin_information().
Props afragen.
Fixes #43282. See #43192, #29274.
Built from https://develop.svn.wordpress.org/trunk@42686


git-svn-id: http://core.svn.wordpress.org/trunk@42514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 22:08:30 +00:00
Sergey Biryukov
b1f48870d7 Administration: Rename Appearance → Editor menu item to Theme Editor and Plugins → Editor to Plugin Editor for clarity.
Props xkon, karmatosed.
Fixes #43072.
Built from https://develop.svn.wordpress.org/trunk@42685


git-svn-id: http://core.svn.wordpress.org/trunk@42513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 08:43:32 +00:00
John Blackbourn
ee24b48106 Comments: Add a "Mine" link to the list of filters on the comment listing screen.
This filter shows comments made by the current user, and copies the same filter functionality that's available on the post listing screens.

Props Iceable

Fixes #42379

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


git-svn-id: http://core.svn.wordpress.org/trunk@42512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:46:31 +00:00
Drew Jaynes
1ae9491548 Docs: Fix a copy paste error in the DocBlock summary for wp_ssl_constants(), see [13062].
Props terriann.
Fixes #43272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:21:31 +00:00
John Blackbourn
b1ed10ab9a HTTP API: Add the URL as a paramter to various HTTP related filters.
Props paulschreiber, purnendu

Fixes #42186

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


git-svn-id: http://core.svn.wordpress.org/trunk@42510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:11:30 +00:00
John Blackbourn
427ae1692d Docs: Un-correct an incorrection correction.
See [42680]

See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:57:30 +00:00
John Blackbourn
763f34d117 Docs: Correct some secondary documentation for the https_local_ssl_verify and https_ssl_verify filters.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:48:29 +00:00
John Blackbourn
fc6ba86b80 Docs: First pass at switching some array parameter documentation to typed notation.
Props janak007

See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:26:31 +00:00
John Blackbourn
91464bce65 Docs: Add missing code formatting to various @since entries.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:55:31 +00:00
John Blackbourn
823cac40df Docs: Update the hook docs for update_bulk_theme_complete_actions.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:22:45 +00:00
John Blackbourn
332b9844a9 Posts, Post Types: Add a new add_inline_data action which allows extra fields to be added to the inline editing fields.
Props mensmaximus, NathanAtmoz

Fixes #36085

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


git-svn-id: http://core.svn.wordpress.org/trunk@42504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 15:55:32 +00:00
atimmer
8ad4538d0f Docs: Improve JSDoc for media/views/spinner.js.
Props avillegasn.
Fixes #43230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 14:32:33 +00:00
Sergey Biryukov
b9944def27 Posts, Post Types: Remove extra tabs around page_attributes_meta_box_template action in page_attributes_meta_box().
Props chetan200891.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42674


git-svn-id: http://core.svn.wordpress.org/trunk@42502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 11:24:32 +00:00
Sergey Biryukov
ef4f47d00f Customize: Avoid extra tabs in a textarea in WP_Customize_Control::render_content().
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42673


git-svn-id: http://core.svn.wordpress.org/trunk@42501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:59:30 +00:00
Sergey Biryukov
a5958a289b Upgrade/Install: Avoid extra line breaks in a textarea in wp-admin/setup-config.php.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42672


git-svn-id: http://core.svn.wordpress.org/trunk@42500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:59:00 +00:00
Sergey Biryukov
a65ce4e34b Options: Avoid extra tabs in a textarea in wp-admin/options.php.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42671


git-svn-id: http://core.svn.wordpress.org/trunk@42499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:58:31 +00:00
Sergey Biryukov
cceab04984 Comments: Avoid extra tabs in a textarea in WP_Comments_List_Table::column_comment().
Props chetan200891, jrf.
Fixes #43252.
Built from https://develop.svn.wordpress.org/trunk@42670


git-svn-id: http://core.svn.wordpress.org/trunk@42498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:57:32 +00:00
Helen Hou-Sandí
aaa28bba15 Options: Use strings in the test suite that follow community guidelines.
Also somewhat explain to future maintainers why this pairing of strings was chosen, besides this committer's musical preferences. Social opinions on cancer are fairly clear, as are commonly accepted definitions of profanity and family-friendly language.

Shout out to the close contender, which would have been particularly appropriate here: "You could be the king // But watch the queen conquer".

see #43207, #38176

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


git-svn-id: http://core.svn.wordpress.org/trunk@42495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:42:31 +00:00
John Blackbourn
1c2ef0f475 Build/Test Tools: Allow code coverage reports to be generated.
This corrects the attribute needed to allow PHPUnit to generate coverage reports, and also adds a blacklist of files and directories that are excluded from coverage reports.

Props schlessera, jipmoors

Fixes #43067, #43240

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


git-svn-id: http://core.svn.wordpress.org/trunk@42494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:21:30 +00:00
John Blackbourn
f7224ea635 Docs: Copy a helpful inline doc into the function header for visibility.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:13:30 +00:00
Aaron Jorbin
17589837d2 Options: Use most appropriate language in the test suite.
The test suite's opinion of cancer should be clear.

Reverts r42659.

See #43207, #38176



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


git-svn-id: http://core.svn.wordpress.org/trunk@42492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:59:31 +00:00
Boone Gorges
355b6e80da Improve parameter description for 'allow_empty_comments'.
Introduced in [42661].

Props swissspidy.
See #16979.
Built from https://develop.svn.wordpress.org/trunk@42662


git-svn-id: http://core.svn.wordpress.org/trunk@42491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:50:30 +00:00
Boone Gorges
6c11ac0c16 Comments: Introduce 'allow_empty_comment' filter.
This filter allows plugin authors to allow empty comments on a selective
basis during comment submission.

Props jpurdy647.
Fixes #16979.
Built from https://develop.svn.wordpress.org/trunk@42661


git-svn-id: http://core.svn.wordpress.org/trunk@42490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:09:30 +00:00
Drew Jaynes
39ce01d83a Docs: Fix a typo in the DocBlock description for get_bloginfo() illustrating the URL structure for RDF feeds.
Props ibachal.
See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 19:42:30 +00:00
John Blackbourn
982791db31 Options: Use more appropriate language in the test suite.
See #43207, #38176

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


git-svn-id: http://core.svn.wordpress.org/trunk@42488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 18:52:31 +00:00
Drew Jaynes
9dd9913ecd Docs: Document default arguments for wp_tag_cloud() in a hash notation, noting that full lists of additionally-supported arguments are already documented in get_terms() and wp_generate_tag_cloud().
Props birgire, johnbillion.
Fixes #42019.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 15:22:34 +00:00
Felix Arntz
f3eaddd2dc Options: Unhook default option filter when setting is unregistered.
Fixes #43207.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 14:49:32 +00:00
Dion Hulse
3517dc0b8b Updates: Partially revert [42584], as this branch of code should always be run after a core update check.
This code branch is responsible for running all autoupdates, including plugins and themes - which should run regardless of if there's a core autoupdate available.

This revert does not revert the `$timeout` changes, as these should still use cached data if it's available.
Ideally this should be decoupled from the core update check to allow background updates to operate even when the core update check is disabled or running more often than twice daily.

See #43103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 11:04:34 +00:00
Dion Hulse
0eb9e0c8d0 XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings.
Fixes #43216 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 02:56:32 +00:00
Peter Wilson
8f0ab2efb8 Taxonomy: Stop warming term meta cache unnecessarily.
Prevent several core function calls to `get_terms()` from warming the term meta cache.

Props peterwilsoncc, boonebgorges, jrf.
Fixes #43142.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 04:10:30 +00:00
Peter Wilson
0d39b35c11 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
John Blackbourn
a1eb261cd1 Canonical: Add $x_redirect_by parameter to wp_safe_redirect().
See [42633] and [42408].

Fixes #42313.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-04 16:05:32 +00:00
Drew Jaynes
f3ca5b5f47 Tests: Simplify @covers annotations for WP_Error test coverage. Also fix a typo in a test method name.
See #42742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 17:38:30 +00:00
Drew Jaynes
3544e0151d Tests: Fix two typos introduced for a get_term_field() test in [35270].
See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 17:11:30 +00:00
Andrea Fercia
8a664edcab Administration: Make the Screen Options available on small screens.
Previously, the Screen Options toggle and the related panel content 
were hidden on small screens, preventing access to important settings,
including the ability to toggle the meta boxes visibility.

Props chetan200891.
Fixes #40985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 16:58:30 +00:00
Sergey Biryukov
430a724a03 Help/About: Correct outdated media icons reference in help text on Edit Post screen.
Props thrijith, transl8or.
Fixes #42378.
Built from https://develop.svn.wordpress.org/trunk@42643


git-svn-id: http://core.svn.wordpress.org/trunk@42472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:58:30 +00:00
Sergey Biryukov
4951b2897e Media: Remove checkered background for icons in Attachment Details.
Props BandonRandon.
Fixes #42535. See #41948.
Built from https://develop.svn.wordpress.org/trunk@42642


git-svn-id: http://core.svn.wordpress.org/trunk@42471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:54:31 +00:00
Andrea Fercia
a7c89d5761 Administration: CSS coding standards: use double quotes for values that require quotes.
As per the WordPress CSS coding standards, CSS properties with values that require quotes must use double quotes.
Also fixes some indentation and spacing.

Fixes #43220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:19:32 +00:00
Sergey Biryukov
abdea23275 Docs: Convert $args array description for wp_get_themes() to a hash notation.
Props milana_cap.
Fixes #43213.
Built from https://develop.svn.wordpress.org/trunk@42640


git-svn-id: http://core.svn.wordpress.org/trunk@42469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 09:38:30 +00:00
Sergey Biryukov
f45e696e21 Media: Avoid a PHP warning in wp_calculate_image_srcset() if a plugin returns a non-array value via wp_calculate_image_srcset filter.
Props mrmadhat, codegrau.
Fixes #43201.
Built from https://develop.svn.wordpress.org/trunk@42639


git-svn-id: http://core.svn.wordpress.org/trunk@42468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 07:48:31 +00:00
Sergey Biryukov
2f54a93369 Posts, Post Types: Don't count pending comments in WP_Posts_List_Table::_display_rows() if the post type does not support comments.
Props seanchayes.
Fixes #43212.
Built from https://develop.svn.wordpress.org/trunk@42638


git-svn-id: http://core.svn.wordpress.org/trunk@42467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 07:38:32 +00:00
Sergey Biryukov
66e2c1ed87 Build Tools: Update SPDX License in package.json to adhere to SPDX v3.0 specification.
Props netweb.
Fixes #43032.
Built from https://develop.svn.wordpress.org/trunk@42637


git-svn-id: http://core.svn.wordpress.org/trunk@42466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:39:30 +00:00
Sergey Biryukov
e5adb49dbb Tests: Correct erroneous @covers and @use tags.
Props jipmoors.
Fixes #43203.
Built from https://develop.svn.wordpress.org/trunk@42636


git-svn-id: http://core.svn.wordpress.org/trunk@42465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:09:30 +00:00
Sergey Biryukov
7282155198 Tests: Improve tests for wp_get_post_parent_id() added in [42397].
Props frank-klein.
Fixes #42797.
Built from https://develop.svn.wordpress.org/trunk@42635


git-svn-id: http://core.svn.wordpress.org/trunk@42464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:03:31 +00:00
Sergey Biryukov
8393519ade Menus: Remove $_menu_item_sort_prop global reference from wp_get_nav_menu_items(), unused since [38928].
Props PieWP, welcher.
Fixes #40947.
Built from https://develop.svn.wordpress.org/trunk@42634


git-svn-id: http://core.svn.wordpress.org/trunk@42463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 15:42:31 +00:00
Sergey Biryukov
673ff22b2b Canonical: Add $x_redirect_by parameter to wp_redirect() that allows applications doing the redirect to identify themselves.
This complements the `x_redirect_by` filter added in [42408].

Props NathanAtmoz, johnbillion.
Fixes #42313.
Built from https://develop.svn.wordpress.org/trunk@42633


git-svn-id: http://core.svn.wordpress.org/trunk@42462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 15:06:35 +00:00
Dion Hulse
1e5629d1f1 Themes: Use api.wordpress.org/themes/info/1.2/ to query theme information.
See #43192.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:19:30 +00:00
Dion Hulse
7abfd84c75 Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information.
See #43192.
Fixes #29274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:17:33 +00:00
Sergey Biryukov
b170b60693 Docs: Correct erroneous class references in @see tags.
Props coffee2code.
Fixes #43158.
Built from https://develop.svn.wordpress.org/trunk@42630


git-svn-id: http://core.svn.wordpress.org/trunk@42459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 01:20:30 +00:00
Sergey Biryukov
76ad62d11e Code Editor: Add Ctrl/Cmd+F as aliases for persistent search for more intuitive behaviour.
Keep Alt+F as well for users who already expect that.

Props Desertsnowman.
See #42586.
Built from https://develop.svn.wordpress.org/trunk@42625


git-svn-id: http://core.svn.wordpress.org/trunk@42454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 22:22:30 +00:00
Andrea Fercia
d6a73ef110 Media: avoid page scrolling when opening the media modal.
Moves focus to a proper element within the media modal to avoid the underlying
page to scroll to the bottom. Removes the media modal `freeze` option.

Props andreiglingeanu, adamsilverstein.
Fixes 39859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 17:03:33 +00:00
Adam Silverstein
587da39a9e Remove unit tests for deprecated ajax tag search function.
Fixes unit tests failing since r42614.

Ammends [42614].
See #38922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 02:29:31 +00:00
Adam Silverstein
35a20d8f50 Remove unused var after r42614, fixing a jshint error.
Built from https://develop.svn.wordpress.org/trunk@42618


git-svn-id: http://core.svn.wordpress.org/trunk@42447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:34:59 +00:00
Weston Ruter
c2369bfad7 Widgets: Fix Text widget unit test which broke due to global scope not being cleaned.
Amends [42613].
See #42495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:34:30 +00:00
Adam Silverstein
39575cede2 Correct the version term_search_min_chars changed. Ammends r42614.
Built from https://develop.svn.wordpress.org/trunk@42616


git-svn-id: http://core.svn.wordpress.org/trunk@42445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:30:30 +00:00
Weston Ruter
c6013a2b87 Customize: Ensure customize_autosaved requests only use revision of logged-in user.
Props dlh, westonruter.
See #42433, #39896.
Fixes #42450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:21:30 +00:00
Adam Silverstein
86434ebca4 Taxonomy: Use REST API for ajax tag search.
Deprecate wp_ajax_ajax_tag_search and switch to using the REST API when searching tags in the tags meta box.

Props nacin, chriscct7, afercia, swissspidy, jnylen0, rmccue, ryelle.
Fixes #38922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:17:31 +00:00
Weston Ruter
1829a2ce27 Customize: Ensure media playlists get initialized after selective refresh; expose new wp.playlist.initialize() API.
In particular allows audio and video playlists to be added to the Text widget and previewed.

Props bpayton, westonruter.
See #40854.
Fixes #42495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 23:56:29 +00:00
Weston Ruter
b32df8f64e Customize: Ensure heartbeat keeps changeset locked when in branching mode.
Props dlh.
See #42024.
Fixes #42658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 23:05:31 +00:00
Weston Ruter
a8b77a1948 Customize: Include nav menu item for Home custom link in search results for "Home".
Props audrasjb, westonruter.
Fixes #42991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 22:10:33 +00:00
Gary Pendergast
7d9c47d536 Emoji: Tweak the generated emoji arrays to not cause coding standards errors.
Props netweb, jrf.
Fixes #43150.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-25 01:06:31 +00:00
Sergey Biryukov
1cda7b9667 Role/Capability: Make install_languages capability check less restrictive.
A user should still be able to have the capability, even when language packs cannot be automatically installed. The automatic installation part is separate from that now.

Props flixos90.
Fixes #42697.
Built from https://develop.svn.wordpress.org/trunk@42606


git-svn-id: http://core.svn.wordpress.org/trunk@42435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:42:30 +00:00
Sergey Biryukov
ea6f648401 Upgrade/Install: In postMessage events handler, check for message object existence before checking its action property.
Props manikmist09.
Fixes #43005.
Built from https://develop.svn.wordpress.org/trunk@42604


git-svn-id: http://core.svn.wordpress.org/trunk@42433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:31:30 +00:00
Peter Wilson
6bb7fcebf4 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Really, following [42598].

Fixes #42862 for trunk, really.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:02:30 +00:00
Sergey Biryukov
a1121f1def Media: Fix JSHint error after [42595].
See #42646.
Built from https://develop.svn.wordpress.org/trunk@42599


git-svn-id: http://core.svn.wordpress.org/trunk@42428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:51:31 +00:00
Peter Wilson
891c8255c3 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Replaces the fairy (male) browser support test with a woman in business suit levitating. While the things that make people different sometimes become less obvious this isn't always a problem, because the things that make you strange are the things that make you powerful.

Fixes #42862 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:47:30 +00:00
Sergey Biryukov
365c70d415 Media: Store and reuse image cropper ratio settings if available, instead of overwriting.
Props adamsilverstein.
Fixes #42646.
Built from https://develop.svn.wordpress.org/trunk@42595


git-svn-id: http://core.svn.wordpress.org/trunk@42424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:36:31 +00:00
Aaron Jorbin
4d89f4a20c Query: Improve tests for set_found_posts dealing with non arrays
Use a data provider and include tests for `false` and `''`.

Previous: [42581] [42585]

See #42860


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


git-svn-id: http://core.svn.wordpress.org/trunk@42423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 20:52:30 +00:00
Sergey Biryukov
c7b0073e92 Tests: Update emoji base URL in Tests_Formatting_Emoji after [42590].
See #42862.
Built from https://develop.svn.wordpress.org/trunk@42592


git-svn-id: http://core.svn.wordpress.org/trunk@42421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 17:26:30 +00:00
Sergey Biryukov
ee58ffcbe7 Emoji: Update emoji base URL in _print_emoji_detection_script() and wp_staticize_emoji().
Props pento.
Fixes #42862.
Built from https://develop.svn.wordpress.org/trunk@42590


git-svn-id: http://core.svn.wordpress.org/trunk@42419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 16:51:30 +00:00
Gary Pendergast
488df7c563 Docs: Correct some version numbers.
`wp_check_for_changed_dates()`, `_find_post_by_old_slug(), `_find_post_by_old_date()`, and the `old_slug_redirect_post_id` filter were intended to land in 4.9.2, but didn't quite make it. Instead, they'll be landing in 4.9.3.

See #15397.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 06:48:31 +00:00
Gary Pendergast
dcb0ebef21 Tests: Improve the old date redirect tests.
Props frank-klein.
See #15397.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 06:39:30 +00:00
Dion Hulse
02bc2c3186 Tests: Skip newly added tests from [42581] on PHP 5.2 as they require ReflectionMethod.
See #42860.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 04:21:31 +00:00
Dion Hulse
14068105f7 Updates: Only trigger Background Update processes from within the core update check when a core autoupdate is on offer.
This change reduces the number of API calls which WordPress makes to api.wordpress.org during release windows.

Previously the background updates would run upon every core update transient refresh, however now they'll only run if there's an update available.
The change also increases the cache period for plugin & theme checks when running via the cron, from never-cache to 2 hours, which should hopefully reduce the number of needless API calls.

Fixes #43103 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 04:17:30 +00:00
Sergey Biryukov
3429cfeabe Media: Introduce a custom error handler for MediaElement.js to display a download link if a FLV file cannot be rendered for any reason.
Props Clorith.
Fixes #42643.
Built from https://develop.svn.wordpress.org/trunk@42582


git-svn-id: http://core.svn.wordpress.org/trunk@42411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:51:30 +00:00
Aaron Jorbin
8a884f562a Query: Fix warning on counting non countable
Adds tests to continue the behavior for both null and strings.

See https://wiki.php.net/rfc/counting_non_countables for information on the PHP change.

Fixes #42860.
Props janak007 and ayeshrajans for initial patches.




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


git-svn-id: http://core.svn.wordpress.org/trunk@42410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:21:31 +00:00
Peter Wilson
09432d1aa6 Emoji: Update emoji regex for Twemoji to 2.4.0.
Build `src/wp-includes/formatting.php` following [42566].

Fixes #42862.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 21:12:31 +00:00
Andrew Ozz
84cdc05c58 TinyMCE: backport bug fixes to NotificationManager and WindowManager from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to MultiRange from 250675bb7b.
Props peterwilsoncc, azaozz.
Fixes #42722 for trunk, see #43012.
Built from https://develop.svn.wordpress.org/trunk@42576


git-svn-id: http://core.svn.wordpress.org/trunk@42405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 19:35:31 +00:00
Andrew Ozz
5878c6c83a Editor: when keeping the scroll position treat all shortcodes as preview-able. Otherwise in some cases the marker span can get stuck inside the shortcode and break the markup.
Props azaozz, lizkarkoski and othellobloke for testing.
Fixes #42908 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42574


git-svn-id: http://core.svn.wordpress.org/trunk@42403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 17:34:32 +00:00
Sergey Biryukov
d9d841b807 Media: Restore white background of the content area in media modal.
Props afercia, chetan200891.
Fixes #43088.
Built from https://develop.svn.wordpress.org/trunk@42572


git-svn-id: http://core.svn.wordpress.org/trunk@42401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 14:01:31 +00:00
Sergey Biryukov
e9599bc7b5 Email: Don't send notifications for site or network admin email address change to the default 'admin_email' value.
Props tigertech, MattyRob, seanchayes.
Fixes #42693.
Built from https://develop.svn.wordpress.org/trunk@42570


git-svn-id: http://core.svn.wordpress.org/trunk@42399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 13:45:32 +00:00
Sergey Biryukov
5cfda780d8 Customize: Correct "Add Items" button reference in help text shown after creating a new menu.
Props dlh, munyagu, rishishah.
Fixes #42565.
Built from https://develop.svn.wordpress.org/trunk@42568


git-svn-id: http://core.svn.wordpress.org/trunk@42397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 12:03:30 +00:00
Sergey Biryukov
d9a535ee13 Emoji: Update Twemoji to 2.4.0.
WordPress was already on 2.5.0, but Twemoji decided to break their versioning, so 2.4.0 is actually the latest release.

Fixes #42862.
Built from https://develop.svn.wordpress.org/trunk@42566


git-svn-id: http://core.svn.wordpress.org/trunk@42395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:49:30 +00:00
Sergey Biryukov
9a1066c90e Taxonomy: Don't display an empty edit link in taxonomy list table if the user doesn't have permissions to edit the term.
Props grapplerulrich.
Fixes #43146.
Built from https://develop.svn.wordpress.org/trunk@42565


git-svn-id: http://core.svn.wordpress.org/trunk@42394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:34:31 +00:00
Dion Hulse
fc42c062f1 WPDB: Use a PCRE syntax which supports PCRE compiled between 2003 and 2006.
This fixes a PHP Warning in `wpdb::parse_db_host()` when WordPress is used with (sometimes a modern) PHP that's compiled against an ancient PCRE version.

Fixes #43109 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 03:39:30 +00:00
Aaron Jorbin
9efeb545c0 Remove JSHint due to license compatibility
JSHint inherits a license from JSLint that includes the clause  "The Software shall be used for Good, not Evil." WordPress's license specifically allows grants the freedom to run the program, for any purpose. Please note, this is not an encouragement of evil. Rather than doing something evil, how about learning to love those around you. Instead of tweeting lies and saying people are "Not Good!", help your neighbor. In the words of Lin Manual Miranda, "Love is love is love is love is love is love is love is love, cannot be killed or swept aside." 

This replaces JSHint with esprima, a part of the larger jQuery project, and a custom wrapper for some basic error checking within codemirror.

The existing JSHint configuration is kept in place in case someone wants to use that, but they can only do so for Good.

Fixes #42850
Props netweb for a spelling fix on a comment.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 01:29:32 +00:00
Weston Ruter
2ec77391f6 Widgets: Ensure media is explicitly enqueued from Text widget in case Media widgets are unregistered.
Amends [41344].
See #40854.
Fixes #43125.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 19:25:31 +00:00
Weston Ruter
94d178dd31 Customize: Let default status for Customizer be draft if user does not have capability to publish.
Amends [41626].
Props sayedwp, westonruter.
See #30937.
Fixes #42686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 19:10:34 +00:00
Weston Ruter
183cda343a Customize: Prevent frontend previewing from causing a customization lock on the changeset.
Props dlh.
Amends [41839].
See #42024.
Fixes #42975.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:49:31 +00:00
Peter Wilson
0e94d99f64 REST API: Update the fixture data for wp-api.js tests following [42359].
Props danielbachhuber.
See #41014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:34:32 +00:00
Weston Ruter
87cae6e261 Customize: Use changeset-specific "locked" messages when branching is enabled.
Props dlh.
See #39896.
Fixes #42655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:28:31 +00:00
Weston Ruter
cd9f48b54f Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.
Props flixos90.
See #37661, #42184.
Fixes #42674.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:15:30 +00:00
Weston Ruter
fa460ab32f Widgets: Allow relative/partial URLs in Image Widget's link field.
Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 04:52:33 +00:00
Weston Ruter
11af5ae5cd Code Editor: Disable attr-value-double-quotes HTMLHint rule since too strict for user input.
Using single-quoted attribute values is not in any way invalid HTML.

Amends [41376].
Props sasiddiqui.
See #12423.
Fixes #42802.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-21 08:01:31 +00:00
Pascal Birchler
5ecd978e74 Formatting: Fix typo in inline documentation of _deep_replace().
Props ixkaito.
Fixes #43134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-20 13:32:32 +00:00
Andrew Ozz
365025fb62 Editor: change the test in user_can_richedit() to also detect when IE11 is in compatibility mode.
Props ndavison, azaozz.
Fixes #42503 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42529


git-svn-id: http://core.svn.wordpress.org/trunk@42358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 14:43:31 +00:00
atimmer
d268976255 Docs: Improve JSDoc for password-strength-meter.js.
Props herregroen, carolinegeven, ireneyoast, jjcomack.
Fixes #43066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 13:39:33 +00:00
Dion Hulse
44c89cac5a General: Allow wp_list_pluck() to operate on arrays of references without overwriting the referenced items.
Fixes #16895.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 05:18:31 +00:00
Dion Hulse
26a5d758d5 Tests: Remove redundant assertEquals() calls in listFilter tests.
As these tests are already validating that two arrays match, checking that the counts also match before is redundant and makes it harder to debug when the test fails.

See #16895

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


git-svn-id: http://core.svn.wordpress.org/trunk@42355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 05:15:34 +00:00
Sergey Biryukov
0eb2581c67 Media: In _wp_handle_upload(), check if the file was properly uploaded before checking its size.
Props achbed, dglingren.
Fixes #39522.
Built from https://develop.svn.wordpress.org/trunk@42525


git-svn-id: http://core.svn.wordpress.org/trunk@42354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 07:16:30 +00:00
Sergey Biryukov
3b73ac9eb3 Editor: Use explicit context instead of a trailing space for Edit string in TinyMCE plugins.
Props scottlee, ayubadiputra, NathanAtmoz.
Fixes #42543.
Built from https://develop.svn.wordpress.org/trunk@42523


git-svn-id: http://core.svn.wordpress.org/trunk@42352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 06:28:30 +00:00
Weston Ruter
443594dd00 Widgets: Prevent checkValidity from running on a form when widget is first adding to sidebar.
Amends [41352].
See #23120.
Fixes #43003 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 01:24:30 +00:00
Aaron Jorbin
8bd98be63d BUILD/TEST TOOLS: Report Travis test results to make/hosting PHPUnit test results
Send the core test results to make/hosting in order to improve the alerting.  See: https://github.com/WordPress/phpunit-test-reporter/issues/45

Fixes #43099
Props danielbachhuber


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


git-svn-id: http://core.svn.wordpress.org/trunk@42321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 20:29:31 +00:00
Andrea Fercia
fc51a83ed8 Plugins: Fix the plugin details modal "Close" button after [42443].
Props rinkuyadav999.
Fixes #43082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 17:15:32 +00:00
Pascal Birchler
e62806fcb8 Posts, Post Types: Add tests for get_post_type_labels().
These were accidentally omitted in [38157].

See #38157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 08:33:30 +00:00
Dion Hulse
82054452d2 Build: Bump the version of node used on Travis to match WordPress.org.
Props netweb, dd32.
See #35105

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


git-svn-id: http://core.svn.wordpress.org/trunk@42293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:36:30 +00:00
Dion Hulse
88135346c6 Build: Bump grunt-sass to v2.0.0 from v1.2.1 for Node 8.x support.
Changes: https://github.com/sindresorhus/grunt-sass/compare/v1.2.1...v2.0.0

Props netweb.
See #35105.
Fixes #43097.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:33:34 +00:00
Dion Hulse
3fe9cb61ee External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Fixes #42720 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:28:43 +00:00
Dion Hulse
ceaaed6604 Build: Use Node 8.x for trunk.
Props netweb.
See #35105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 03:58:49 +00:00
Dion Hulse
406ec082cc Build: Switch package.json to using tabs for indents.
Props netweb.
Fixes #43075.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 03:55:49 +00:00
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
John Blackbourn
d8a995fc15 Media: Further improvements to the handling of language codes that get passed to MediaElement.
This change means that only the leading portion of a locale code gets passed to MediaElement, removing problems that arise from locales such as `de_DE_formal` and `pt_PT_ao90`.

Props erich_k4wp, blobfolio, flixos90, ocean90, joemcgill, SergeyBiryukov.

Fixes #42574

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


git-svn-id: http://core.svn.wordpress.org/trunk@42080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 14:52:51 +00:00
Ryan McCue
9b68e59534 REST API: Ensure rest_url() consistently has leading slash.
`rest_url()` inconsistent addes slashes to the passed path depending on whether the site has pretty permalinks enabled. Apart from being inconsistent, this also caused the unit tests to fail when pretty permalinks are enabled.

Props frank-klein.
Fixes #42452. See #41451.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 07:10:46 +00:00
Gary Pendergast
882db52bdd General: Add inline PHPCS options to leave regex indentation.
We have a handful of super long regexen that are written over multiple lines, as a collection of strings concatenated together. Each string is indented appropriately for the regex, but PHPCS doesn't recognised this, so defaults to removing the extra whitespace.

Disabling the `Squiz.Strings.ConcatenationSpacing.PaddingFound` rule for these blocks stops the extra whitespace from being removed.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 04:24:57 +00:00
Dion Hulse
58a904e893 Theme Editor: Translate the URL to the Child Themes Codex page.
Props odysseygate, johnpgreen.
Fixes #42454.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:52:47 +00:00
Dion Hulse
271e08a26e Theme Editior: Base the nonce on a simpler combination of fields, for easier debugging & reading.
See #42609.
Fixes #42705.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:44:47 +00:00
Dion Hulse
daacc37405 Theme Editor: Validate files are editable based on their relative filenames, rather than full file path.
This fixes theme editing on Windows platforms where `validate_file()` will return `2` on a full file path.

Fixes #42609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:28:48 +00:00
Dion Hulse
28677d382d Theme/Plugin Editor: Remove the caching added in [41806] as it causes more problems than it fixes.
While caching here seemed like a good idea in theory, in practice the cache would be often stale causing development issues.
We exclude common folders (such as `node_modules`) from the scanning to avoid directories which are not useful to the end-user, so as long as those exclusion lists are held up this shouldn't cause too much of a degredation in the future.
We may consider adding caching here again in the future if it's determined that it is really needed.

Props precies, ibenic, mariovalney, schlessera, and all the others who commented on the ticket(s).
This partually reverts [41806].
See #6531.
Fixes #42573.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 02:59:47 +00:00
Gary Pendergast
c90cfa3b50 General: Fix some precision alignment formatting warnings.
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 23:57:55 +00:00
Dion Hulse
611c090b41 Docs: Update the documentation for get_post_meta() to clarify that $single has no effect when the $meta_key is not provided.
Props chetan200891, titodevera.
Fixes #42687.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 03:17:54 +00:00
Dion Hulse
b33967cd31 WPDB: Fix the parsing of sockets which contain colons within the socket name (used on some cloud providers).
Props natacado.
Fixes #42634 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 05:52:46 +00:00
Dion Hulse
5342b33a0b Template: Don't output an empty <ul> in the_meta() when a post only has protected metas.
Props campusboy1987, birgire.
Fixes #42629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 05:21:51 +00:00
Dion Hulse
4073743527 Filesystem: Use a more unique filename in wp_tempnam() and get_filesystem_method().
Using a filename which was generated from `time()` could cause two processes to try to use the same filename, causing unexpected behaviour.

Props jrchamp, bikecrazyy.
Fixes #42265.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 03:05:50 +00:00
Weston Ruter
e0b4933fdb Themes: Prevent JS error on Themes admin screen when only one theme is installed.
Amends [42029].
Props chetan200891, afercia.
See #42348.
Fixes #42673.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:29:46 +00:00
John Blackbourn
8c7bb9009c Users: Correct the value of the lang attribute in the admin area.
This corrects the value when the user's language is set to `English (United States)` but the site language is not.

Props ocean90, afercia

Fixes #42242

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


git-svn-id: http://core.svn.wordpress.org/trunk@42049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:04:46 +00:00
Gary Pendergast
871c6d2b45 Setup: Allow for wp-config-sample.php to be formatted according to coding standards.
When the setup process reads `wp-config-sample.php`, it assumes that there are no spaces inside the brackes of the `define()`s. Unfortunately, this doesn't match our coding standards, so will no longer work correctly once we start enforcing them.

This also improves coding standards of the generated `wp-config.php` file.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 05:23:50 +00:00
Gary Pendergast
a779284c00 General: Reformat inline if () statements inside HTML tags.
This pattern occurs a handful of times across the codebase:

`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`

Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 04:09:49 +00:00
John Blackbourn
850532fb01 Cron API: Improvements to docblocks for the event scheduling functions.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-22 15:16:47 +00:00
Dion Hulse
27116397c5 Upgrade: Fix updating plugins which include a numeric file/folder names.
The fix in [41821] caused numeric folder names to be reindexed to 0..n when in the root directory (for example, `my-plugin/24/`).

Props edo888.
See #41524.
Fixes #42628 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 04:15:47 +00:00
Boone Gorges
2322b40358 Introduce meta_box_sanitize_cb taxonomy argument.
The `meta_box_cb` argument was introduced in [25572] to allow plugin
authors to provide a custom callback for rendering their taxonomy's meta
box on the post edit screen. However, the routine used to handle the saving
of these custom taxonomy meta boxes was not customizable, but was instead
based simply on whether the taxonomy was hierarchicaly. See [13535].

The new `meta_box_sanitize_cb` argument defaults to the "tag" routine for
non-hierarchical taxonomies and the "category" routine for hierarchical ones,
thereby maintaining the current default behavior. Developers can override this
when the data passed from their `meta_box_cb` differs.

Props boonebgorges, ZaneMatthew, stephenharris.
Fixes #36514.
Built from https://develop.svn.wordpress.org/trunk@42211


git-svn-id: http://core.svn.wordpress.org/trunk@42040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 03:15:50 +00:00
Felix Arntz
d14a2988e7 Multisite: Fix broken update blog_versions query after [41661].
Props Mista-Flo, lenasterg.
Fixes #42641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 23:46:48 +00:00
Boone Gorges
d86fe35b7f Improve data types returned from empty hierarchical term queries.
When querying for 'count', ensure that 0 is returned. Otherwise,
ensure that it's an array.

Props xParham, birgire.
Fixes #42327.
Built from https://develop.svn.wordpress.org/trunk@42209


git-svn-id: http://core.svn.wordpress.org/trunk@42038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 22:46:47 +00:00
John Blackbourn
aed08a0f25 HTTP API: Add a WP_Http class constant for the HTTP status code 301.
Fixes #42490

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


git-svn-id: http://core.svn.wordpress.org/trunk@42037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:54:49 +00:00
John Blackbourn
6e39468def HTTP API: Add support for a description for HTTP status code 103.
Props Dhruvin

Fixes #42490

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


git-svn-id: http://core.svn.wordpress.org/trunk@42036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:35:48 +00:00
John Blackbourn
bb5621a084 General: Pass on the return value from wp_redirect() for wp_safe_redirect().
This brings the behaviour of the two functions in line with each other.

Props Drivingralle

Fixes 42108

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


git-svn-id: http://core.svn.wordpress.org/trunk@42035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:24:48 +00:00
Dion Hulse
71bdb1635b DB Repair: Only allow non-falsey values of WP_ALLOW_REPAIR to access the DB repair functionality.
This allows defining the constant as `false` to prevent access (rather than requiring the constant to be removed entirely).

Props tiagohillebrandt, munklefish.
See #11717.
Fixes #42622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 06:21:52 +00:00
John Blackbourn
4ef018df2b Docs: Correct the @since property for the page_attributes_misc_attributes action.
Props jeremyescott, jfarthing84

Fixes #42607

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


git-svn-id: http://core.svn.wordpress.org/trunk@42033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-19 11:52:52 +00:00
Felix Arntz
d9e4fc273d Multisite: Do not show edit links in network users table for users that cannot be edited.
Props ocean90.
Fixes #42552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 21:35:51 +00:00
Dion Hulse
24b1297fab Remove the svn:keywords property from files that don't need it.
See #42594

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


git-svn-id: http://core.svn.wordpress.org/trunk@42031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 03:01:47 +00:00
Dion Hulse
cf14a9432c Remove the svn:executable property from files that don't need it.
See #42594

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


git-svn-id: http://core.svn.wordpress.org/trunk@42030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 02:58:45 +00:00
Sergey Biryukov
1a5adcf722 Rewrite Rules: Correct the logic in extract_from_markers() after [41928].
Props stodorovic.
Fixes #42579. See #39920.
Built from https://develop.svn.wordpress.org/trunk@42199


git-svn-id: http://core.svn.wordpress.org/trunk@42029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-16 13:25:50 +00:00
Weston Ruter
5749295a59 Editor: Re-build tinymce.min.js after [42191].
See #42553.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 23:35:49 +00:00
Weston Ruter
5cab65edab Editor: Disable wp_keep_scroll_position in IE11 since buggy; fix matches polyfill conflict with ME.js by doing runtime feature detection in context window.
Props westonruter, SergeyBiryukov, Clorith for testing.
See #41962, #42029.
Fixes #42553 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:59:47 +00:00
Weston Ruter
f4e974057e File Editor: Eliminate gap inserted between code editor and heading in IE11 when CodeMirror initializes.
Props afercia, melchoyce, Clorith for testing, SergeyBiryukov for testing.
See #12423.
Fixes #42554 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:29:46 +00:00
Weston Ruter
9fabdfb212 Customize: Prevent themes panel from auto-expanding in IE11.
In IE11 the `input` event erroneously gets triggered initially without any user input.

Amends [41648].
See #37661.
Fixes #42556 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:12:53 +00:00
Weston Ruter
ee126d2567 Widgets: Set global $post to current queried object instead of nullifying when is_singular() while applying filters (and shortcodes) in Text widget and (via plugin) Custom HTML widget.
Also prevent `[gallery]` shortcode from dumping out every attachment on the site when a containing Text widget is shown on an archive template.

Props westonruter, bobbingwide, joemcgill for testing.
See #10457.
Fixes #42548, #42547 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 02:27:48 +00:00
Weston Ruter
9986ebdc0b Editor: Improve scrolling behavior and prevent autosave logic from causing dirty state when just switching between Visual and Text tabs.
Props pento.
See #41962, #42029.
Fixes #42530 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 00:21:48 +00:00
Weston Ruter
6c64136035 About Page: Fix issue with overlapping images and text on IE11 and Edge 15.
Props Clorith, ryelle, afercia, la-geek, SergeyBiryukov.
See #42514.
Fixes #42545.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 23:02:48 +00:00
Peter Wilson
fc0f64e1ef Editor: Cease adding paragraphs when switching editor tabs.
Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.

Props pento, adamsilverstein, aduth.
Fixes #42531.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:24:47 +00:00
Gary Pendergast
5dab6b6e61 Editor: When switching Editor tabs, don't scroll unnecessarily.
- When switching to the Text view, wait until after the Visual editor element has been hidden, before focussing the `<textarea>`.
- When switching to the Visual view, only scroll if the cursor is not visible on the current screen.

Fixes #42530.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:19:49 +00:00
Weston Ruter
54a2c0dd1f About: Fix jumping behavior for titles and columns when scrolling.
Props ryelle.
See #42087.
Fixes #42514, #42526.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:47:58 +00:00