K. Adam White
181d77f04e
REST API: Only cast scalar types to string when comparing new & old meta values.
...
Newly-supported array and object meta types should not be cast to strings.
Props TimothyBlynJacobs, caercam.
Fixes #47928 .
Built from https://develop.svn.wordpress.org/trunk@45903
git-svn-id: http://core.svn.wordpress.org/trunk@45714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 03:08:55 +00:00
Sergey Biryukov
e3d4e81ca0
Date/Time: Correct delta comparison in `test_should_return_wp_timestamp()`.
...
See #25768 .
Built from https://develop.svn.wordpress.org/trunk@45902
git-svn-id: http://core.svn.wordpress.org/trunk@45713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 02:20:54 +00:00
Sergey Biryukov
12aa694ee5
Date/Time: Introduce `wp_date()` to retrieve the date in localized format.
...
Convert `date_i18n()` into a wrapper for `wp_date()`.
`wp_date()` is intended as a replacement for `date_i18n()` without legacy quirks in it. It accepts a true Unix timestamp (not summed with timezone offset) and an arbitrary timezone.
Props Rarst, mboynes, MikeHansenMe, rmccue, nacin.
Fixes #28636 .
Built from https://develop.svn.wordpress.org/trunk@45901
git-svn-id: http://core.svn.wordpress.org/trunk@45712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-28 00:52:56 +00:00
Sergey Biryukov
61d5337aca
Date/Time: Remove the last remaining `current_time( 'timestamp' )` instance in `wp_post_revision_title_expanded()`.
...
Timestamps don't carry any timezone information, using `$revision->post_modified_gmt` simplifies the logic.
Props Rarst.
See #40657 .
Built from https://develop.svn.wordpress.org/trunk@45900
git-svn-id: http://core.svn.wordpress.org/trunk@45711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 21:55:56 +00:00
Sergey Biryukov
6a7baa24a6
Docs: Clarify that `$name` and `$value` parameters of `set_user_setting()` can contain hyphens.
...
Props tmatsuur.
Fixes #47938 .
Built from https://develop.svn.wordpress.org/trunk@45899
git-svn-id: http://core.svn.wordpress.org/trunk@45710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 01:17:55 +00:00
Sergey Biryukov
8750097e4b
Docs: Remove a clarification from `do_robots()` description that doesn't really clarify anything.
...
See #47110 .
Built from https://develop.svn.wordpress.org/trunk@45898
git-svn-id: http://core.svn.wordpress.org/trunk@45709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-27 00:17:56 +00:00
Sergey Biryukov
cc21760163
Twenty Nineteen: Make sure center-aligned images in columns do not break beyond the column boundaries.
...
Props kjellr.
Fixes #47937 .
Built from https://develop.svn.wordpress.org/trunk@45897
git-svn-id: http://core.svn.wordpress.org/trunk@45708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 19:01:55 +00:00
Sergey Biryukov
9dc2a432b1
Twenty Nineteen: Update `style-rtl.css` after [45773].
...
See #47850 .
Built from https://develop.svn.wordpress.org/trunk@45896
git-svn-id: http://core.svn.wordpress.org/trunk@45707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 19:00:58 +00:00
Sergey Biryukov
baffd21844
Docs: Reference `WP_Term_Query::__construct()` in `wp_list_categories()` DocBlock for additional accepted arguments.
...
Clarify that `wp_dropdown_categories()` always returns a string, regardless of the `echo` parameter.
See #47896 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45895
git-svn-id: http://core.svn.wordpress.org/trunk@45706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 17:00:55 +00:00
Boone Gorges
d1ac7170dc
Taxonomy: Standardize docs for `wp_list_categories()`.
...
Many of the parameters historically documented on this function are merely
passed through to `get_categories()` and its underlying functions. In order to
avoid unnecessary duplication of function arguments, we remove documentation of
these parameters, and replace it with reference to the wrapped functions.
Parameters that receive special treatment or are otherwise changed before
being passed through continue to be documented as part of `wp_list_categories()`.
Props audrasjb, itowhid06, birgire.
Fixes #47896 .
Built from https://develop.svn.wordpress.org/trunk@45894
git-svn-id: http://core.svn.wordpress.org/trunk@45705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 15:24:55 +00:00
Boone Gorges
e0c83d76d1
Taxonomy: Fix unique-slug check for terms with parents.
...
`wp_unique_term_slug()` appends numeric suffixes when the requested slug is
already in use by a sibling term. Changes introduced in [32837] inadvertently
caused this suffixing to be skipped in cases where the requested slug is
suffixed with the parent slug, so that it became possible to have two terms
`childslug-parentslug` underneath to the same `parentslug`. We fix this
regression by ensuring that the numeric-suffix routine runs in all cases.
Props yashar_hv, saskak, dlh.
Fixes #46431 .
Built from https://develop.svn.wordpress.org/trunk@45893
git-svn-id: http://core.svn.wordpress.org/trunk@45704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-26 15:19:56 +00:00
Andrew Ozz
c5fed47367
Docs: Improve and update the description of `multi_resize()` to explain changes and expected use.
...
See #40439 .
Built from https://develop.svn.wordpress.org/trunk@45892
git-svn-id: http://core.svn.wordpress.org/trunk@45703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 22:21:58 +00:00
Sergey Biryukov
b1847ef3e2
Menus: In `wp_setup_nav_menu_item()` and `Walker_Nav_Menu_Edit::start_el()`, check if the post or term associated with the menu item still exists to avoid a PHP notice.
...
If the associated post or term no longer exists, mark the menu item as invalid.
Props mehulkaklotar, kamrankhorsandi, cristiano.zanca, SergeyBiryukov.
Fixes #31703 .
Built from https://develop.svn.wordpress.org/trunk@45891
git-svn-id: http://core.svn.wordpress.org/trunk@45702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 21:32:59 +00:00
Sergey Biryukov
fe0b22cd67
Users: Adjust [45806] to make sure `$all_userids` is always defined.
...
Props kbrownkd.
Fixes #47936 .
Built from https://develop.svn.wordpress.org/trunk@45890
git-svn-id: http://core.svn.wordpress.org/trunk@45701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 20:03:57 +00:00
Sergey Biryukov
c896a0911e
Site Health: Add timezone to Site Health Info page.
...
Props justinahinon, sharaz, artisticasad, Rarst.
Fixes #47842 .
Built from https://develop.svn.wordpress.org/trunk@45889
git-svn-id: http://core.svn.wordpress.org/trunk@45700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-24 19:37:57 +00:00
Boone Gorges
17d32ebc8f
Taxonomy: Ensure consistency of `hide_empty` in term queries when `taxonomy` is excluded.
...
When querying for terms in hierarchical categories using `hide_empty=true`,
results have historically included parent terms which are themselves
unattached to any objects (are "empty") but which have non-empty descendent
terms. Because this process involves walking the descendant tree, we avoid it
when we detect that the queried taxonomies are not hierarchical. (This
behavior was introduced in [5525].)
When the `taxonomy` parameter of `get_terms()` was made optional - see #35495 ,
[36614] - it affected the mechanism for avoiding unneccessary tree walks,
since there may not be any explicitly declared taxonomies to run through
`is_taxonomy_hierarchical()`. As a result, term queries excluding `taxonomy`
did not check descendants, and empty parents with non-empty children were not
included in `hide_empty` results.
We correct the behavior by crawling term descendants when the `taxonomy`
argument is absent, which means that we're querying for terms in all taxonomies.
Props smerriman.
Fixes #37728 .
Built from https://develop.svn.wordpress.org/trunk@45888
git-svn-id: http://core.svn.wordpress.org/trunk@45699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 16:05:56 +00:00
Sergey Biryukov
9672302e04
Date/Time: Rewrite and simplify `get_gmt_from_date()`, `get_date_from_gmt()`, and `iso8601_to_datetime()` using `wp_timezone()`.
...
Improve unit test coverage.
Props Rarst, goodevilgenius.
Fixes #31809 .
Built from https://develop.svn.wordpress.org/trunk@45887
git-svn-id: http://core.svn.wordpress.org/trunk@45698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 11:03:56 +00:00
Sergey Biryukov
1aaf11947e
Date/Time: Simplify the date comparing logic in `WP_Community_Events::trim_events()`.
...
The Events API returns event date without timezone information, so trying to parse it into a timestamp and compare to a WP timestamp is pointless.
Props Rarst.
Fixes #47463 .
Built from https://develop.svn.wordpress.org/trunk@45886
git-svn-id: http://core.svn.wordpress.org/trunk@45697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 02:15:55 +00:00
Gary Pendergast
601f5f7376
Build Tools: Pass the LOCAL_DIR environment variable through to the phpunit Docker container.
...
This allows code running inside the container to know whether it's supposed to be running in `build` or `src`.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45885
git-svn-id: http://core.svn.wordpress.org/trunk@45696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:56:56 +00:00
Sergey Biryukov
6330f10b7d
Date/Time: Revert unintended changes from [45882].
...
Props TimothyBlynJacobs.
See #25768 .
Built from https://develop.svn.wordpress.org/trunk@45884
git-svn-id: http://core.svn.wordpress.org/trunk@45695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:16:53 +00:00
Sergey Biryukov
6e555f0c77
Date/Time: Introduce `current_datetime()` for better time operations.
...
Returning a `DateTimeImmutable` representation of the current moment in time, this allows for a more flexible and reliable use than `current_time()` provides.
Props Rarst.
Fixes #47464 .
Built from https://develop.svn.wordpress.org/trunk@45883
git-svn-id: http://core.svn.wordpress.org/trunk@45694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 01:12:55 +00:00
Sergey Biryukov
6f8e50c7f0
Date/Time: Rewrite and simplify `date_i18n()` using `wp_timezone()` to address multiple issues with certain date formats and timezones, while preserving some extra handling for legacy use cases.
...
Improve unit test coverage.
Props Rarst, remcotolsma, raubvogel.
Fixes #25768 .
Built from https://develop.svn.wordpress.org/trunk@45882
git-svn-id: http://core.svn.wordpress.org/trunk@45693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-23 00:57:56 +00:00
desrosj
e7c8b21e71
Coding Standards: Dynamic hooks should be named using interpolation not concatenation.
...
Props arena, desrosj.
Fixes #47052 .
Built from https://develop.svn.wordpress.org/trunk@45881
git-svn-id: http://core.svn.wordpress.org/trunk@45692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 19:08:55 +00:00
Sergey Biryukov
d309715a95
Coding Standards: Add missing `break` for the default case in `wp_privacy_anonymize_data()`.
...
Props itowhid06.
Fixes #47921 .
Built from https://develop.svn.wordpress.org/trunk@45877
git-svn-id: http://core.svn.wordpress.org/trunk@45688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 14:50:55 +00:00
Sergey Biryukov
8d919b09d4
Date/Time: Use `wp_timezone()` in `WP_Date_Query::build_mysql_datetime()` to address timezone issues.
...
Improve unit test coverage.
Props Rarst, Biranit, birgire, jave.web, SergeyBiryukov.
Fixes #41782 .
Built from https://develop.svn.wordpress.org/trunk@45876
git-svn-id: http://core.svn.wordpress.org/trunk@45687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 03:11:55 +00:00
Gary Pendergast
1f8563d8e7
Build Tools: Don't use git for package installs.
...
While NPM supports installing packages from git locations, this requires `git` to be in the path, which won't necessarily be true, particularly on Windows.
We can download the release versions for these packages, instead.
Fixes #47916 .
Built from https://develop.svn.wordpress.org/trunk@45875
git-svn-id: http://core.svn.wordpress.org/trunk@45686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 02:29:54 +00:00
Sergey Biryukov
ad7b2949ba
Users: Adjust [45708] to make sure `wp_update_user()` does not issue a `WP_Error` if a single site was previously set up as Multisite and there's still a `spam` field in the user table.
...
Add a unit test.
Props azaozz, SergeyBiryukov.
Fixes #45747 .
Built from https://develop.svn.wordpress.org/trunk@45874
git-svn-id: http://core.svn.wordpress.org/trunk@45685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 01:53:55 +00:00
Sergey Biryukov
f6fc8025c4
Administration: Adjust [45814] to address a backward compatibility issue for plugins passing multiple CSS classes to `add_settings_error()`.
...
Only add the `notice-` prefix for `error`, `success`, `warning`, `info` CSS classes, keep other classes as is.
Add unit tests for `settings_errors()`.
Props afercia, SergeyBiryukov.
Fixes #44941 .
Built from https://develop.svn.wordpress.org/trunk@45873
git-svn-id: http://core.svn.wordpress.org/trunk@45684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 00:22:56 +00:00
Sergey Biryukov
36b4debdb4
Docs: Correct type for the `$deprecated` argument of `get_terms()`.
...
Props itowhid06.
Fixes #47915 .
Built from https://develop.svn.wordpress.org/trunk@45872
git-svn-id: http://core.svn.wordpress.org/trunk@45683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 16:27:55 +00:00
Sergey Biryukov
3d12c4b6d8
Docs: Fix typo in `_wp_make_subsizes()` DocBlock.
...
Props itowhid06.
Fixes #47913 . See #40439 .
Built from https://develop.svn.wordpress.org/trunk@45871
git-svn-id: http://core.svn.wordpress.org/trunk@45682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 16:23:56 +00:00
Sergey Biryukov
f8fb93cd0d
Customizer: Trim whitespace from custom link URLs.
...
This complements a similar fix for the Menus screen in [45655].
Props donmhico, audrasjb.
Fixes #47888 . See #47723 .
Built from https://develop.svn.wordpress.org/trunk@45869
git-svn-id: http://core.svn.wordpress.org/trunk@45680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-21 00:27:57 +00:00
Sergey Biryukov
6b9ab1c5c5
Docs: Update `@since` tag for new JS functions and variables introduced in [45572].
...
Props garrett-eclipse.
See #47145 .
Built from https://develop.svn.wordpress.org/trunk@45867
git-svn-id: http://core.svn.wordpress.org/trunk@45678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 22:54:55 +00:00
Sergey Biryukov
40d4037fa6
Twenty Seventeen: Fix tabs vs. spaces in [45764].
...
See #47414 .
Built from https://develop.svn.wordpress.org/trunk@45863
git-svn-id: http://core.svn.wordpress.org/trunk@45674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 19:12:50 +00:00
Sergey Biryukov
18d991bfc0
Twenty Eleven: Fix tabs vs. spaces in [45763].
...
See #47414 .
Built from https://develop.svn.wordpress.org/trunk@45862
git-svn-id: http://core.svn.wordpress.org/trunk@45673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 19:11:55 +00:00
Sergey Biryukov
561e17c1a4
Twenty Seventeen: Adjust [45764] to conform to CSS Coding Standards.
...
See #47414 .
Built from https://develop.svn.wordpress.org/trunk@45861
git-svn-id: http://core.svn.wordpress.org/trunk@45672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 19:07:49 +00:00
Sergey Biryukov
4a8c0b1498
Twenty Eleven: Adjust [45763] to conform to CSS Coding Standards.
...
See #47414 .
Built from https://develop.svn.wordpress.org/trunk@45860
git-svn-id: http://core.svn.wordpress.org/trunk@45671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 19:06:54 +00:00
Sergey Biryukov
9793494a2c
Tests: Remove `$wpdb` global reference from `test_wp_insert_user_with_empty_data()`.
...
See #47902 .
Built from https://develop.svn.wordpress.org/trunk@45859
git-svn-id: http://core.svn.wordpress.org/trunk@45670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 17:28:56 +00:00
Sergey Biryukov
022de7321e
Users: In `wp_insert_user()`, account for the `wp_pre_insert_user_data` filter returning empty data.
...
Props juliobox, SergeyBiryukov.
Fixes #47902 .
Built from https://develop.svn.wordpress.org/trunk@45858
git-svn-id: http://core.svn.wordpress.org/trunk@45669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 17:26:55 +00:00
Sergey Biryukov
bdb1811935
Date/Time: Fix race conditions in `current_time()` tests.
...
* Restore default timezone before performing assertions to avoid affecting other tests in case of failure.
* Use delta comparison for timestamps to avoid race conditions.
Props SergeyBiryukov, desrosj.
Fixes #45821 .
Built from https://develop.svn.wordpress.org/trunk@45857
git-svn-id: http://core.svn.wordpress.org/trunk@45668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-20 01:35:56 +00:00
Sergey Biryukov
349e9f56c1
Date/Time: Use PHP `DateTime` class API in `current_time()`.
...
Only use the legacy WP timestamp approach (a sum of timestamp and timezone offset) for `timestamp` and `U` formats without the `$gmt` flag.
Otherwise, make sure the function returns correct local time for any format.
Props Rarst, jdgrimes.
Fixes #40653 .
Built from https://develop.svn.wordpress.org/trunk@45856
git-svn-id: http://core.svn.wordpress.org/trunk@45667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 21:07:50 +00:00
Sergey Biryukov
26f8b67e35
Coding Standards: Use long array syntax in `Tests_WP_Timezone::timezone_offset_provider()`.
...
Per https://make.wordpress.org/core/2019/07/12/php-coding-standards-changes/ , arrays must be declared using long array syntax for clarity.
See #24730 .
Built from https://develop.svn.wordpress.org/trunk@45855
git-svn-id: http://core.svn.wordpress.org/trunk@45666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 21:06:55 +00:00
Sergey Biryukov
46ca606114
Coding Standards: Use `KB_IN_BYTES` in `get_file_data()`.
...
See #22405 , #47632 .
Built from https://develop.svn.wordpress.org/trunk@45854
git-svn-id: http://core.svn.wordpress.org/trunk@45665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 20:10:55 +00:00
Sergey Biryukov
4896dc64ee
Date/Time: Introduce `wp_timezone_string()` and `wp_timezone()` for unified timezone retrieval.
...
* `wp_timezone_string()` retrieves the timezone from current settings as a string. Uses the `timezone_string` option to get a proper timezone if available, otherwise falls back to an offset.
* `wp_timezone()` retrieves the timezone from current settings as a `DateTimeZone` object. Timezone can be based on a PHP timezone string or a `±HH:MM` offset.
Props Rarst, remcotolsma, johnjamesjacoby, rmccue.
Fixes #24730 .
Built from https://develop.svn.wordpress.org/trunk@45853
git-svn-id: http://core.svn.wordpress.org/trunk@45664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 19:08:59 +00:00
Sergey Biryukov
82af4ad1c0
Coding Standards: Fix WPCS violations in [45851].
...
See #25347 .
Built from https://develop.svn.wordpress.org/trunk@45852
git-svn-id: http://core.svn.wordpress.org/trunk@45663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 16:35:56 +00:00
Sergey Biryukov
a58eaa9424
Date/Time: In `wp_insert_post()`, when checking the post date to set `future` or `publish` status, use string comparison to work around far future dates (year 2038+) on 32-bit systems.
...
Props Rarst, nofearinc.
Fixes #25347 .
Built from https://develop.svn.wordpress.org/trunk@45851
git-svn-id: http://core.svn.wordpress.org/trunk@45662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 15:50:56 +00:00
Sergey Biryukov
3541c5d74c
Date/Time: In `WP_Date_Query::__construct()`, return early if `$date_query` is empty or not an array.
...
Props vishalkakadiya.
Fixes #47392 .
Built from https://develop.svn.wordpress.org/trunk@45850
git-svn-id: http://core.svn.wordpress.org/trunk@45661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 15:17:56 +00:00
Gary Pendergast
7a92316fd8
Tests: Add an xdebug group for tests that require xdebug.
...
These tests are now also run as their own part of the Travis build, to ensure performance of other tests isn't affected by the presence of xdebug.
Fixes #40532 .
Built from https://develop.svn.wordpress.org/trunk@45827
git-svn-id: http://core.svn.wordpress.org/trunk@45638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-19 02:18:56 +00:00
Tammie Lister
a760ef9022
Multisite: Remove truncation to allow clearers identification of longer site names
...
Previously the sites were truncated which meant longer names but with ending identifications were unable to be seen as different. This shows the full site name to allow easier understanding.
Props tferry, melinedo, afercia, jeremyfelt
Fixes: 47112
Built from https://develop.svn.wordpress.org/trunk@45826
git-svn-id: http://core.svn.wordpress.org/trunk@45637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-18 12:31:00 +00:00
Sergey Biryukov
d9954ed4cb
Privacy: Add descriptions for sections in a personal data export file.
...
Props garrett-eclipse, Venutius, karmatosed.
Fixes #45491 .
Built from https://develop.svn.wordpress.org/trunk@45825
git-svn-id: http://core.svn.wordpress.org/trunk@45636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-18 02:07:57 +00:00
Sergey Biryukov
53f5b172ab
Plugins: Adjust margin for plugin headings on "Add Plugins" screen to avoid overlapping with "Network Activate" button.
...
Props justinahinon, chetan200891.
Fixes #47600 .
Built from https://develop.svn.wordpress.org/trunk@45824
git-svn-id: http://core.svn.wordpress.org/trunk@45635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-17 14:33:56 +00:00
Sergey Biryukov
cde194a21e
Pings/Trackbacks: In `wp_xmlrpc_server::pingback_ping()`, strip inline JS and CSS while trying to figure out the pingback context.
...
Props david.binda.
Fixes #47283 .
Built from https://develop.svn.wordpress.org/trunk@45823
git-svn-id: http://core.svn.wordpress.org/trunk@45634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-17 13:59:55 +00:00
Sergey Biryukov
aa8e2ff3ba
Docs: Improve documentation for `wp_set_auth_cookie()` and related functions.
...
Props arafat, SergeyBiryukov.
Fixes #47886 .
Built from https://develop.svn.wordpress.org/trunk@45822
git-svn-id: http://core.svn.wordpress.org/trunk@45633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-17 13:23:55 +00:00
John Blackbourn
3796b7da13
Docs: Add a missing return type.
...
See #47110
Built from https://develop.svn.wordpress.org/trunk@45821
git-svn-id: http://core.svn.wordpress.org/trunk@45632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 19:35:58 +00:00
K. Adam White
ca070acae3
Add @ticket annotations for [45812].
...
Props birgire.
See #43709 .
Built from https://develop.svn.wordpress.org/trunk@45820
git-svn-id: http://core.svn.wordpress.org/trunk@45631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 03:33:55 +00:00
Gary Pendergast
ea64ea7c96
Build Tools: Improve `local-env` start behaviour under Docker Toolbox.
...
Docker Toolbox requires port forwarding to be configured, but generates error when trying to forward a port that's already been taken.
This change removes clashing port forwarding rules before adding our own.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45819
git-svn-id: http://core.svn.wordpress.org/trunk@45630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 01:40:54 +00:00
Sergey Biryukov
be6bbe4b5d
Administration: Replace legacy `updated` message type in `add_settings_error()` calls with `success`.
...
See #44640 .
Built from https://develop.svn.wordpress.org/trunk@45818
git-svn-id: http://core.svn.wordpress.org/trunk@45629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 00:39:55 +00:00
Sergey Biryukov
3f1186166d
Taxonomy: In `feed_links_extra()` and `get_the_archive_title()`, make sure the queried taxonomy term exists before accessing its properties.
...
Props donmhico, truchot, zaantar.
Fixes #46420 .
Built from https://develop.svn.wordpress.org/trunk@45817
git-svn-id: http://core.svn.wordpress.org/trunk@45628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 00:24:54 +00:00
Sergey Biryukov
06d264d032
Coding Standards: In `wlwmanifest_link()`, use concatenation instead of commas for `echo`, for consistency with `rsd_link()` and the rest of core.
...
See #47632 .
Built from https://develop.svn.wordpress.org/trunk@45816
git-svn-id: http://core.svn.wordpress.org/trunk@45627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 00:21:56 +00:00
K. Adam White
34bc7ab089
REST API: Add @ticket annotation to test from [45813].
...
Props birgire.
See #42209 .
Built from https://develop.svn.wordpress.org/trunk@45815
git-svn-id: http://core.svn.wordpress.org/trunk@45626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 23:09:54 +00:00
Sergey Biryukov
e5deae5e78
Administration: In `add_settings_error()`, add `warning` and `info` as possible values for message type.
...
Account for these new values in `settings_errors()`, resulting in `notice-warning` and `notice-info` CSS classes.
Map legacy `error` and `updated` CSS classes to `notice-error` and `notice-success`.
Props donmhico, toddhalfpenny, flixos90, desrosj, javorszky, SergeyBiryukov.
Fixes #44640 , #44941 .
Built from https://develop.svn.wordpress.org/trunk@45814
git-svn-id: http://core.svn.wordpress.org/trunk@45625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 23:01:55 +00:00
K. Adam White
7eed5eff61
REST API: Always return post types list in taxonomies endpoint response as an array.
...
Prevents a non-sequential post type array such as [ 0 => 'post', 2 => 'page' ] from being improperly converted to an object in the taxonomy endpoint's response JSON.
Props TimothyBlynJacobs, birgire, spectacula.
Fixes #42209 .
Built from https://develop.svn.wordpress.org/trunk@45813
git-svn-id: http://core.svn.wordpress.org/trunk@45624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 22:12:55 +00:00
K. Adam White
00cb4c7dbd
REST API: Prevent deletion of post revisions.
...
Allowing the client to delete revisions breaks the "audit trail" functionality. This is not allowed in WordPress and shouldn't be allowed through the API.
While not recommended, a plugin may opt-in to the previous behavior by setting a custom 'delete_post' capability for the revisions post type.
Props dlh, danielbachhuber, TimothyBlynJacobs, azaozz, kadamwhite.
Fixes #43709 .
Built from https://develop.svn.wordpress.org/trunk@45812
git-svn-id: http://core.svn.wordpress.org/trunk@45623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 22:01:55 +00:00
K. Adam White
5dbb64d0dd
REST API: Cache results of get_item_schema on controller instances for performance.
...
Caches the output of get_item_schema() to avoid redundant recomputation of translatable strings and other computed values. This method is called many times per item in each REST request, and the results of the method should not vary between calls.
Additional schema fields are not cached.
Props kadamwhite, joehoyle, TimothyBlynJacobs.
Fixes #47871 .
Built from https://develop.svn.wordpress.org/trunk@45811
git-svn-id: http://core.svn.wordpress.org/trunk@45622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 21:09:55 +00:00
K. Adam White
dbfa0c7ed4
REST API: Clarify arguments passed to rest route get & update callbacks.
...
Update doc block argument definitions to clarify that the REST API always passes an array to the `get_callback` and always passes an entity object to the `update_callback`.
Props TimothyBlynJacobs, salzano.
Fixes #44432 .
Built from https://develop.svn.wordpress.org/trunk@45810
git-svn-id: http://core.svn.wordpress.org/trunk@45621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 20:04:55 +00:00
K. Adam White
8dcc10693f
REST API: Do not send response body if status is 204 or body is null.
...
Status code 204 should indicate no response body is sent. Previously, a "null" string was sent, which MacOS Safari would try to parse as JSON and thereby fail to complete the request.
Props TimothyBlynJacobs, andizer, matthias.thiel.
Fixes #43691 .
Built from https://develop.svn.wordpress.org/trunk@45809
git-svn-id: http://core.svn.wordpress.org/trunk@45620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 19:56:55 +00:00
K. Adam White
b75420443c
REST API: Add test class file incorrectly omitted from [45807].
...
Props @TimothyBlynJacobs.
See #43392 .
Built from https://develop.svn.wordpress.org/trunk@45808
git-svn-id: http://core.svn.wordpress.org/trunk@45619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 17:21:55 +00:00
K. Adam White
5b318f1dda
REST API: Support 'object' and 'array' types in register_meta() schemas.
...
Extends meta registration to support complex schema values, mirroring the functionality in the settings controller.
Error when trying to modify a meta key containing schema-nonconformant data.
Props @TimothyBlynJacobs, @birgire, @mnelson4, @flixos90.
Fixes #43392 .
Built from https://develop.svn.wordpress.org/trunk@45807
git-svn-id: http://core.svn.wordpress.org/trunk@45618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 17:17:55 +00:00
Sergey Biryukov
ab0b860db9
Users: When deleting users, exclude the current user from the content existence check.
...
The current user cannot be deleted, so the check is redundant in that context and should only be done for other users.
Props mt8.biz, SergeyBiryukov.
Fixes #47851 .
Built from https://develop.svn.wordpress.org/trunk@45806
git-svn-id: http://core.svn.wordpress.org/trunk@45617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 13:06:55 +00:00
Gary Pendergast
7169586254
Schema: Add an index to `wp_options.autoload`.
...
Most sites will be unaffected by this change, but those with a large number of rows in `wp_options`, only a small number of which have `autoload` set, will see a significant performance improvement.
Sites with a large number of rows in `wp_options`, with many of them having `autoload` set will unfortunately see a performance penalty on top of the already very slow queries they're running, but this should be the minority of cases.
Props DanBUK.
Fixes #24044 .
Built from https://develop.svn.wordpress.org/trunk@45805
git-svn-id: http://core.svn.wordpress.org/trunk@45616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 07:13:55 +00:00
Sergey Biryukov
98ffc642a9
Networks and Sites: Trim site domain when creating a new site on Add New Site screen before further validation.
...
Props dharmin16, jeremyfelt, aubreypwd.
Fixes #44808 .
Built from https://develop.svn.wordpress.org/trunk@45804
git-svn-id: http://core.svn.wordpress.org/trunk@45615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 01:21:55 +00:00
Sergey Biryukov
d85ba82d8e
Docs: Add missing `@since` tag for `WP_Site_Health::has_late_cron()`.
...
See #47223 .
Built from https://develop.svn.wordpress.org/trunk@45803
git-svn-id: http://core.svn.wordpress.org/trunk@45614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:42:55 +00:00
Peter Wilson
1d7ae02376
Site Health Check: New tests file missed in [45801].
...
Built from https://develop.svn.wordpress.org/trunk@45802
git-svn-id: http://core.svn.wordpress.org/trunk@45613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:37:56 +00:00
Peter Wilson
a56256d158
Site Health Check: Increase time allowance for cron checks.
...
Introduces `WP_Site_Health::has_late_cron()` for late wp-cron jobs and extends the time allowance before a job is considered missed.
In a standard configuration using loopback requests, a job is considered late once past due and missed over five minutes past due.
Late and missed time frames are extended if `DISABLE_WP_CRON` is defined as `true` to allow for crontab tasks running less frequently. A job is considered late once it's 15 minutes past due and missed over one hour past due.
A file for site health unit tests has been introduced with tests for cron in critical, late and missed states.
Props rockfire, afragen, peterwilsoncc.
Fixes #47223 .
Built from https://develop.svn.wordpress.org/trunk@45801
git-svn-id: http://core.svn.wordpress.org/trunk@45612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:35:55 +00:00
Gary Pendergast
b8c5530131
Build Tools: Change the PHPUnit Docker image's working directory to match the other images.
...
Also, pass the `WP_MULTISITE` environment variable along to the container.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45800
git-svn-id: http://core.svn.wordpress.org/trunk@45611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:34:57 +00:00
Gary Pendergast
b473b2241e
Build Tools: Run `composer` commands in a Docker container on Travis.
...
This tidies up the `.travis.yml` file a little more.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45799
git-svn-id: http://core.svn.wordpress.org/trunk@45610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 23:12:55 +00:00
Sergey Biryukov
cc8e05df39
Widgets: Allow for short-circuiting widget output in `the_widget()` using the `widget_display_callback` filter, for consistency with output via a registered sidebar.
...
Props MarcGuay, donmhico.
Fixes #34226 .
Built from https://develop.svn.wordpress.org/trunk@45798
git-svn-id: http://core.svn.wordpress.org/trunk@45609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 23:03:55 +00:00
Sergey Biryukov
0e1343ee2b
Docs: Correct type for `query_var` argument of `register_taxonomy()`.
...
Props juiiee8487, audrasjb.
Fixes #47877 .
Built from https://develop.svn.wordpress.org/trunk@45797
git-svn-id: http://core.svn.wordpress.org/trunk@45608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 17:47:55 +00:00
Sergey Biryukov
c03a0bea8d
Posts, Post Types: In `wp_trim_words()` make sure the `$num_words` parameter is always an integer, as documented, to avoid a PHP warning.
...
Props donmhico, pikamander2.
Fixes #47867 .
Built from https://develop.svn.wordpress.org/trunk@45796
git-svn-id: http://core.svn.wordpress.org/trunk@45607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 17:18:55 +00:00
Sergey Biryukov
ae4087bca6
Users: Make `wp_list_authors()` unit tests more readable.
...
See #23498 .
Built from https://develop.svn.wordpress.org/trunk@45795
git-svn-id: http://core.svn.wordpress.org/trunk@45606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 15:36:57 +00:00
Sergey Biryukov
d6faa62338
Networks and Sites: Improve documentation and variable naming in `switch_to_blog()` and `restore_current_blog()`.
...
In `switch_to_blog()`:
* Rename `$blog_id` to `$prev_blog_id` for clarity.
* Rename `$new_blog` to `$new_blog_id` for consistency.
* Pass `$prev_blog_id` as a second parameter to `switch_blog` action, instead of the duplicated `$new_blog_id`. This only clarifies documentation and does not affect functionality, since the values are equal in the context where the DocBlock is located.
In `restore_current_blog()`:
* Rename `$blog` to `$new_blog_id` for clarity.
* Rename `$blog_id` to `$prev_blog_id` for clarity.
Props ChriCo, jeremyfelt, SergeyBiryukov.
Fixes #45594 .
Built from https://develop.svn.wordpress.org/trunk@45794
git-svn-id: http://core.svn.wordpress.org/trunk@45605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 14:29:56 +00:00
Sergey Biryukov
428a738f1d
Plugins: Adjust the pause before running plugin search AJAX request on "Add Plugins" screen to allow more time for using browser's autocomplete.
...
Props donmhico, apermo.
Fixes #46021 .
Built from https://develop.svn.wordpress.org/trunk@45793
git-svn-id: http://core.svn.wordpress.org/trunk@45604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 02:02:56 +00:00
Sergey Biryukov
3ce3927dc1
Coding Standards: Fix JSHint error in [45790].
...
See #41545 .
Built from https://develop.svn.wordpress.org/trunk@45792
git-svn-id: http://core.svn.wordpress.org/trunk@45603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-14 00:02:55 +00:00
Sergey Biryukov
4cf729f5a9
Site Health: Simplify the language in Status Health Info page introduction, add a link to Status page.
...
Props birgire, mukesh27, subrataemfluence, leogermani.
Fixes #46946 .
Built from https://develop.svn.wordpress.org/trunk@45791
git-svn-id: http://core.svn.wordpress.org/trunk@45602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 23:35:56 +00:00
Adam Silverstein
3e605d3852
Comments: enable typing cmd/ctrl-enter to submit comment forms.
...
Add a key handler on the comment form that detects the cmd/ctrl-enter key press and submits the comment form.
Props xyfi, Lindstromer, helen, splitti.
Fixes #41545 .
Built from https://develop.svn.wordpress.org/trunk@45790
git-svn-id: http://core.svn.wordpress.org/trunk@45601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 21:26:56 +00:00
Andrew Ozz
400ed5add0
Remove trailing white space in upgrade.php.
...
See #46349 .
Built from https://develop.svn.wordpress.org/trunk@45789
git-svn-id: http://core.svn.wordpress.org/trunk@45600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 19:53:55 +00:00
Andrew Ozz
197b4a829b
Admin email verification:
...
- Add the `admin_email_lifespan` option when installing. Fixes a bug where the verification screen is shown right after installation.
- Reset the same option when upgrading and the user doing the DB upgrade is not an admin. This will ensure the email verification is shown next time an admin logs in.
- Use `site_url()` instead of `network_site_url()` for the form action. The latter seems needed only for password reset.
See #46349 .
Built from https://develop.svn.wordpress.org/trunk@45788
git-svn-id: http://core.svn.wordpress.org/trunk@45599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 17:40:55 +00:00
Peter Wilson
dc2e7e716f
Comments: Include post permalink in comment reply link.
...
Include the post's permalink when generating reply links in `get_comment_reply_link()` to account for comments displayed on index and archive pages.
This reapplies [32786] which was inadvertently reverted in [42360].
Props justinahinon, donmhico.
See #33383 .
Fixes #47174 .
Built from https://develop.svn.wordpress.org/trunk@45787
git-svn-id: http://core.svn.wordpress.org/trunk@45598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 05:09:56 +00:00
K. Adam White
aa90dc4e8c
Docs: Clarify custom-fields support requirement for viewing custom post meta in REST API.
...
Fixes #47866 .
Built from https://develop.svn.wordpress.org/trunk@45786
git-svn-id: http://core.svn.wordpress.org/trunk@45597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 01:51:56 +00:00
Gary Pendergast
28ad3662fc
Build Tools: Remove the old `docker-compose.yml` file, now no longer used.
...
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45785
git-svn-id: http://core.svn.wordpress.org/trunk@45596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-12 09:22:55 +00:00
Gary Pendergast
20f833426a
Build Tools: Add the `docker-compose.yml` file, missed in [45783].
...
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45784
git-svn-id: http://core.svn.wordpress.org/trunk@45595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-12 09:21:56 +00:00
Gary Pendergast
74d03c4692
Build Tools: Miscellaneous `local-env` improvements.
...
- Move the functionality for controlling `local-env` out of `package.json`, into JS scripts.
- Merge the `docker-compose` config files, and move it to the root directory. This allows `docker-compose.override.yml` to work for local overrides.
- Fix nginx redirecting to port 80 under some circumstances.
- `npm run env:install` now creates `wp-tests.config.php` for you.
- Cleaned up a bunch of cruft in `.travis.yml`.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45783
git-svn-id: http://core.svn.wordpress.org/trunk@45594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-12 08:29:55 +00:00
Sergey Biryukov
99f4ff2578
Site Health: Add database charset and collation information to debug info.
...
Props sharaz, Clorith, SergeyBiryukov.
Fixes #47828 .
Built from https://develop.svn.wordpress.org/trunk@45782
git-svn-id: http://core.svn.wordpress.org/trunk@45593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-12 01:54:57 +00:00
Sergey Biryukov
e6a4b884f5
Docs: Improve documentation for various feed link functions and filters.
...
Props atachibana, SergeyBiryukov.
Fixes #47862 .
Built from https://develop.svn.wordpress.org/trunk@45781
git-svn-id: http://core.svn.wordpress.org/trunk@45592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-11 17:21:57 +00:00
Sergey Biryukov
b7e7a5321b
Docs: Improve documentation for `get_last_updated()`.
...
Props atachibana.
Fixes #47861 .
Built from https://develop.svn.wordpress.org/trunk@45780
git-svn-id: http://core.svn.wordpress.org/trunk@45591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-11 16:18:57 +00:00
Sergey Biryukov
80d153fb70
Docs: Improve documentation for `get_page_by_title()`.
...
Props atachibana.
Fixes #47860 .
Built from https://develop.svn.wordpress.org/trunk@45779
git-svn-id: http://core.svn.wordpress.org/trunk@45590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-11 12:42:56 +00:00
Sergey Biryukov
64290005f5
Docs: Document the `show_split_view` argument for `wp_text_diff()`.
...
Convert `$args` array documentation to hash notation.
Props riddhiehta02, jeremyfelt, SergeyBiryukov.
Fixes #47224 .
Built from https://develop.svn.wordpress.org/trunk@45778
git-svn-id: http://core.svn.wordpress.org/trunk@45589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-10 22:28:54 +00:00
whyisjake
1a9812d9b4
Widgets: Replace http with https in the link placeholder widget image
...
The existing placeholder can make the user think that they must use http. We should encourage the use of https.
Also, the block editor uses https for its placeholders. Let's add some consistency.
Props Chaton666, audrasjb, mukesh27.
Fixes #46320 .
Built from https://develop.svn.wordpress.org/trunk@45777
git-svn-id: http://core.svn.wordpress.org/trunk@45588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 17:06:55 +00:00
Sergey Biryukov
6e060079ae
Twenty Sixteen: Correct HelpHub URL in `readme.txt`.
...
See #47771 .
Built from https://develop.svn.wordpress.org/trunk@45776
git-svn-id: http://core.svn.wordpress.org/trunk@45587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 13:53:56 +00:00
Sergey Biryukov
092872c3fc
Twenty Nineteen: Add missing `Installation` section to `readme.txt`, for consistency with other themes.
...
See #47857 .
Built from https://develop.svn.wordpress.org/trunk@45775
git-svn-id: http://core.svn.wordpress.org/trunk@45586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 13:42:57 +00:00
Sergey Biryukov
aaea839402
Twenty Nineteen: Add missing copyright information.
...
Props poena, kjellr.
Fixes #47857 .
Built from https://develop.svn.wordpress.org/trunk@45774
git-svn-id: http://core.svn.wordpress.org/trunk@45585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 13:36:58 +00:00
Sergey Biryukov
441a3c97e0
Twenty Nineteen: Correct license URI.
...
Props munyagu, shital-patel.
Fixes #47850 .
Built from https://develop.svn.wordpress.org/trunk@45773
git-svn-id: http://core.svn.wordpress.org/trunk@45584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 02:57:59 +00:00
Gary Pendergast
12aa773802
Feeds: Introduce the `get_self_link()` function.
...
Corresponds to the `self_link()` template function.
This matches other feed template functions, using one function to get the value, and a different function to echo it.
Props jojotjebaby, mobeen-abdullah, donmhico, audrasjb, dshanske.
Fixes #44838 .
Built from https://develop.svn.wordpress.org/trunk@45772
git-svn-id: http://core.svn.wordpress.org/trunk@45583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-09 01:31:56 +00:00
Sergey Biryukov
2aa8ce5bc5
REST API: In `get_rest_url()`, check if `$_SERVER['SERVER_NAME']` is set to avoid a PHP warning in CLI context.
...
Props paulschreiber.
Fixes #47854 .
Built from https://develop.svn.wordpress.org/trunk@45771
git-svn-id: http://core.svn.wordpress.org/trunk@45582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-08 20:20:55 +00:00
Sergey Biryukov
6041a08347
Bootstrap/Load: Change "Insufficient Requirements" `wp_die()` heading to "Requirements Not Met", which is more appropriate for the context it's used in.
...
Props yoavf.
Fixes #47575 .
Built from https://develop.svn.wordpress.org/trunk@45770
git-svn-id: http://core.svn.wordpress.org/trunk@45581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-08 12:54:56 +00:00
Gary Pendergast
638bae9392
Emoji: Upgrade Twemoji to 12.1.2.
...
This upgrade adds support for the transgender flag: 🏳️⚧️
There's some additional housekeeping in this commit:
- Twemoji recently rearranged their repository and package, so `Gruntfile.js` needed tweaking to allow for that.
- As only new files were added in this Twemoji release, the CDN version didn't need updating.
Fixes #47852 .
Built from https://develop.svn.wordpress.org/trunk@45769
git-svn-id: http://core.svn.wordpress.org/trunk@45580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-08 04:05:55 +00:00
Sergey Biryukov
83187125e4
Bundled Themes: Audit and update version numbers passed to `wp_enqueue_script()` to ensure proper cache busting.
...
Props dswebsme, ianbelanger, justinahinon.
Fixes #46981 .
Built from https://develop.svn.wordpress.org/trunk@45768
git-svn-id: http://core.svn.wordpress.org/trunk@45579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-08 01:29:58 +00:00
Sergey Biryukov
e0563013ed
Bundled Themes: Audit and update version numbers passed to `wp_enqueue_style()` to ensure proper cache busting.
...
Props dswebsme, ianbelanger, desrosj.
Fixes #46979 .
Built from https://develop.svn.wordpress.org/trunk@45767
git-svn-id: http://core.svn.wordpress.org/trunk@45578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-08 01:25:58 +00:00
Sergey Biryukov
c965d2e097
Administration: Show a warning in Reading Settings when a Privacy Policy page is accidentally set as a Homepage or Posts page.
...
Props garrett-eclipse, subrataemfluence.
Fixes #46831 .
Built from https://develop.svn.wordpress.org/trunk@45766
git-svn-id: http://core.svn.wordpress.org/trunk@45577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 23:03:54 +00:00
Aaron Jorbin
b8fd2b631b
Bump grunt-patch-wordpress to 2.0.0
...
Fixes #47845
Props pento, kadamwhite, netweb, jorbin
Built from https://develop.svn.wordpress.org/trunk@45765
git-svn-id: http://core.svn.wordpress.org/trunk@45576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 15:09:57 +00:00
Sergey Biryukov
aa4ab3acdc
Twenty Seventeen: Correct height for a Button block without text.
...
Props ianbelanger, laurelfulford, nayana123.
Fixes #47414 .
Built from https://develop.svn.wordpress.org/trunk@45764
git-svn-id: http://core.svn.wordpress.org/trunk@45575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:57:54 +00:00
Sergey Biryukov
64202a7ca3
Twenty Eleven: Correct height for a Button block without text.
...
Props ianbelanger, laurelfulford, nayana123.
See #47414 .
Built from https://develop.svn.wordpress.org/trunk@45763
git-svn-id: http://core.svn.wordpress.org/trunk@45574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:56:57 +00:00
Gary Pendergast
d5d58a90f9
Build Tools: Switch all Travis PHPUnit jobs over to Docker-based PHP.
...
Additionally, there are a handful of related minor changes in this commit:
- `.travis.yml` has been tidied up a little.
- [45745] was incorrectly marking Travis jobs as passed when some PHPUnit runs failed.
- Add the `LOCAL_PHP_MEMCACHED` environment variable, for enabling Memcached.
- Add the `env:pull` NPM script, for refreshing Docker images.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45762
git-svn-id: http://core.svn.wordpress.org/trunk@45573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:55:57 +00:00
Sergey Biryukov
de099aec14
Twenty Nineteen: Revise Latest Posts block styles to support post content options.
...
Props kjellr, ianbelanger.
Fixes #47340 .
Built from https://develop.svn.wordpress.org/trunk@45761
git-svn-id: http://core.svn.wordpress.org/trunk@45572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:48:57 +00:00
Sergey Biryukov
72b11e3322
Twenty Nineteen: Remove duplicate `height` and `width` attributes from SVG icons.
...
The attributes are added via `TwentyNineteen_SVG_Icons::get_svg()`, there's no need to have them separately in SVG sources.
Props mukesh27, albertomake.
Fixes #47128 .
Built from https://develop.svn.wordpress.org/trunk@45760
git-svn-id: http://core.svn.wordpress.org/trunk@45571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:41:54 +00:00
Sergey Biryukov
32afb6f7c7
Coding Standards: Use strict comparison in `wp-admin/edit.php`.
...
Props davidbaumwald.
Fixes #47201 .
Built from https://develop.svn.wordpress.org/trunk@45759
git-svn-id: http://core.svn.wordpress.org/trunk@45570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 11:40:55 +00:00
Andrew Ozz
52c53ae6f8
Remove trailing white space in upgrade.php after [45757].
...
See #46349 .
Built from https://develop.svn.wordpress.org/trunk@45758
git-svn-id: http://core.svn.wordpress.org/trunk@45569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 01:01:57 +00:00
Andrew Ozz
fff56d219f
Add admin email verification screen. Shown every six months after an admin has logged in.
...
Also includes WPCS fixes for wp-login.php.
Props andraganescu, boemedia, lessbloat, azaozz.
See #46349 .
Built from https://develop.svn.wordpress.org/trunk@45757
git-svn-id: http://core.svn.wordpress.org/trunk@45568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 00:04:56 +00:00
Sergey Biryukov
e081194455
Administration: Correct "Quick Edit" link height in list tables for consistency with other action links.
...
Props jobthomas, burhandodhy.
Fixes #47815 .
Built from https://develop.svn.wordpress.org/trunk@45756
git-svn-id: http://core.svn.wordpress.org/trunk@45567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 22:20:58 +00:00
Sergey Biryukov
e4f1204e04
Coding Standards: Fix WPCS violation in [45754].
...
See #46570 .
Built from https://develop.svn.wordpress.org/trunk@45755
git-svn-id: http://core.svn.wordpress.org/trunk@45566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 18:10:59 +00:00
Sergey Biryukov
282dfee8e0
General: Correctly detect large floats in `is_serialized()`.
...
Props killerbishop, donmhico, hoythan.
Fixes #46570 .
Built from https://develop.svn.wordpress.org/trunk@45754
git-svn-id: http://core.svn.wordpress.org/trunk@45565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 13:55:57 +00:00
Sergey Biryukov
d5fc1647c0
Feeds: Escape `&` characters in `atom_site_icon()` for XML, for consistency with `rss2_site_icon()`.
...
Props abhijitrakas, shawfactor.
Fixes #47482 .
Built from https://develop.svn.wordpress.org/trunk@45753
git-svn-id: http://core.svn.wordpress.org/trunk@45564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 13:15:56 +00:00
Sergey Biryukov
2ac34c799b
Coding Standards: Use strict comparison in `wp-admin/options-reading.php`.
...
Props subrataemfluence.
Fixes #46834 .
Built from https://develop.svn.wordpress.org/trunk@45752
git-svn-id: http://core.svn.wordpress.org/trunk@45563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 12:52:56 +00:00
Sergey Biryukov
ad9d8c7d58
Plugins: Use `include_once` for `wp-admin/includes/plugin-install.php` in `WP_Plugin_Install_List_Table::prepare_items()`.
...
This brings consistency with the other instances where the file is included, and allows for reusing its functions in custom code.
Props engelen, desrosj.
Fixes #38874 .
Built from https://develop.svn.wordpress.org/trunk@45751
git-svn-id: http://core.svn.wordpress.org/trunk@45562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 11:07:55 +00:00
Sergey Biryukov
c1a252da8e
Site Health: Use correct variable when checking PHP requirements for a plugin update in `WP_Plugins_List_Table::single_row()`.
...
Props diddledan, sharaz, vaishalipanchal.
Fixes #47835 .
Built from https://develop.svn.wordpress.org/trunk@45750
git-svn-id: http://core.svn.wordpress.org/trunk@45561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 10:58:56 +00:00
Sergey Biryukov
bec2aa0ef7
Docs: Correct `@type` annotation for `WP_Http_Curl` properties.
...
Props diddledan.
Fixes #46860 .
Built from https://develop.svn.wordpress.org/trunk@45749
git-svn-id: http://core.svn.wordpress.org/trunk@45560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 08:12:56 +00:00
Sergey Biryukov
bbf84bccf7
Docs: Correct `@type` annotation for `WP_HTTP_Cookie::$expires`.
...
Props diddledan.
Fixes #46859 .
Built from https://develop.svn.wordpress.org/trunk@45748
git-svn-id: http://core.svn.wordpress.org/trunk@45559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:56:56 +00:00
Sergey Biryukov
f7b8423b12
Upgrade/Install: Make sure `translate_level_to_role()` always returns a value.
...
Props diddledan.
Fixes #46848 .
Built from https://develop.svn.wordpress.org/trunk@45747
git-svn-id: http://core.svn.wordpress.org/trunk@45558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:48:58 +00:00
Sergey Biryukov
69bbdc4022
Posts, Post Types: Update, not delete the `page_for_posts` option in `_reset_front_page_settings_for_post()` when a linked page is deleted or trashed.
...
Props diddledan.
Fixes #46850 .
Built from https://develop.svn.wordpress.org/trunk@45746
git-svn-id: http://core.svn.wordpress.org/trunk@45557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:44:55 +00:00
Gary Pendergast
41dc3e8d39
Build Tools: Add a WordPress Development Environment.
...
This commit adds the first iteration of a Docker-based config for setting up a local WordPress development environment.
Props pento, noisysocks, mcsf, pbearne, isabel_brison.
See #47767 .
Built from https://develop.svn.wordpress.org/trunk@45745
git-svn-id: http://core.svn.wordpress.org/trunk@45556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:10:56 +00:00
Sergey Biryukov
545157d30d
Posts, Post Types: Revert unintended change from [45742].
...
See #46503 .
Built from https://develop.svn.wordpress.org/trunk@45744
git-svn-id: http://core.svn.wordpress.org/trunk@45555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 14:44:55 +00:00
Sergey Biryukov
e8cd892ba4
Administration: Display a warning at the top of "All Settings" screen.
...
Props zodiac1978, donmhico, pixolin.
Fixes #47718 .
Built from https://develop.svn.wordpress.org/trunk@45743
git-svn-id: http://core.svn.wordpress.org/trunk@45554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 13:03:55 +00:00
Sergey Biryukov
9967a3e030
Docs: Add missing description for `$post` global.
...
Props immeet94.
Fixes #46503 . See #47110 .
Built from https://develop.svn.wordpress.org/trunk@45742
git-svn-id: http://core.svn.wordpress.org/trunk@45553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 12:28:56 +00:00
Sergey Biryukov
0cf1235477
Docs: Remove incorrect `@return` tags in `comment_reply_link()` and `post_reply_link()` DocBlocks.
...
Props atachibana.
Fixes #47826 .
Built from https://develop.svn.wordpress.org/trunk@45741
git-svn-id: http://core.svn.wordpress.org/trunk@45552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 02:20:55 +00:00
Sergey Biryukov
6da93732e7
Docs: Add missing description for `$current_screen` global.
...
Props mukesh27.
Fixes #45604 . See #47110 .
Built from https://develop.svn.wordpress.org/trunk@45740
git-svn-id: http://core.svn.wordpress.org/trunk@45551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 02:03:55 +00:00
Sergey Biryukov
7f7480cb2a
Docs: Add missing description for `$wp_query` and `$wp_the_query` globals.
...
Props mukesh27.
See #45604 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45739
git-svn-id: http://core.svn.wordpress.org/trunk@45550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:59:56 +00:00
Sergey Biryukov
77a31e6875
Docs: Add missing description for `$wp_locale_switcher` global.
...
See #45604 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45738
git-svn-id: http://core.svn.wordpress.org/trunk@45549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:47:55 +00:00
Sergey Biryukov
e0311b76c7
Docs: Add missing description for `$wp_locale` global.
...
Props mukesh27.
See #45604 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45737
git-svn-id: http://core.svn.wordpress.org/trunk@45548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:46:55 +00:00
Sergey Biryukov
ea606165a5
Docs: Add missing description for `$wp` global.
...
See #45604 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45736
git-svn-id: http://core.svn.wordpress.org/trunk@45547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:28:55 +00:00
Sergey Biryukov
b1e34ccc1f
Docs: Add missing description for `$wp_rewrite` global.
...
See #45604 , #47110 .
Built from https://develop.svn.wordpress.org/trunk@45735
git-svn-id: http://core.svn.wordpress.org/trunk@45546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:19:56 +00:00
Sergey Biryukov
29b072e706
Docs: Add missing description for `$wpdb`, `$wp_db_version`, and `$wp_current_db_version` globals.
...
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604 .
Built from https://develop.svn.wordpress.org/trunk@45734
git-svn-id: http://core.svn.wordpress.org/trunk@45545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:12:56 +00:00
Sergey Biryukov
702ee129ad
Docs: Fix typo in a comment in `WP_Site_Health::get_test_theme_version()`.
...
See #47110 .
Built from https://develop.svn.wordpress.org/trunk@45733
git-svn-id: http://core.svn.wordpress.org/trunk@45544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:48:56 +00:00
Sergey Biryukov
fd83290995
Site Health: If `WP_DEFAULT_THEME` doesn't exist, use `WP_Theme::get_core_default_theme()` as a fallback.
...
Props ajayghaghretiya1, juliobox, SergeyBiryukov.
Fixes #47299 .
Built from https://develop.svn.wordpress.org/trunk@45732
git-svn-id: http://core.svn.wordpress.org/trunk@45543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:02:55 +00:00
Sergey Biryukov
7dbc4d28e5
Script Loader: Send a 400 Bad Request status code in `load-scripts.php` and `load-styles.php` if the required `load[]` parameter is not set.
...
Props compilenix.
Fixes #44108 .
Built from https://develop.svn.wordpress.org/trunk@45731
git-svn-id: http://core.svn.wordpress.org/trunk@45542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 22:17:57 +00:00
Aaron Jorbin
c377191858
PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax
...
PHP used to allow both square brackets and curly braces to be used interchangeably for accessing array elements and string offsets. The curly bracket syntax is only allowed in a limited set of cases and can be confusing for people not used to it.
PHP 7.4 will deprecate the curly brace syntax for accessing array elements and string offsets and it is expected that support will be completely removed in PHP 8.0.
Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
See #47751 .
Props jrf.
Built from https://develop.svn.wordpress.org/trunk@45730
git-svn-id: http://core.svn.wordpress.org/trunk@45541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 20:21:55 +00:00
Andrea Fercia
b853e21bf9
Accessibility: Improve the differences between revisions.
...
Color alone is not sufficient to visually communicate differences.
- adds `plus` and `minus` icons to the changed lines
- adds visually hidden text: `Added`, `Deleted`, and `Unchanged` to clarify the differences to assistive technologies users
Props birgire, audrasjb, kjellr, adamsilverstein.
Fixes #43532 .
Built from https://develop.svn.wordpress.org/trunk@45729
git-svn-id: http://core.svn.wordpress.org/trunk@45540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 15:46:54 +00:00
Andrea Fercia
cbd6b7b5bc
Accessibility: Remove title attributes from the Meta widget.
...
- removes the `Powered by WordPress, state-of-the-art semantic personal publishing platform.` title attribute
- removes the title attribute from the abbreviations: contrary to a common belief, title attributes on abbreviations are only available to a minority of users, see https://developer.paciellogroup.com/blog/2019/03/short-note-the-abbreviation-appreciation-society/
- changes the term `RSS` to `feed`, as `RSS` is a technical term not all users are supposed to be familiar with
- improves the `widget_meta_poweredby` filter documentation
Props nishitlangaliya, chetan200891, audrasjb.
See #46980 , #24766 .
Fixes #46978 .
Built from https://develop.svn.wordpress.org/trunk@45728
git-svn-id: http://core.svn.wordpress.org/trunk@45539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 13:28:57 +00:00
Andrea Fercia
7b45746001
Menus: Fix the Custom Links text fallback.
...
When adding a Custom Link and leaving the "Link Text" field empty, WordPress used to set a default fallback text: "Menu Item".
The changes in [36379] broke this behavior making the fallback text: ` (Pending)`, with a leading space.
Pending major refactoring of the Menus page (which is going to use a block-based user interface) this change just restores the original behavior by adding the fallback text to the related AJAX response.
Props christophherr, Fencer04, thakkarhardik, backermann1978, audrasjb.
Fixes #38415 .
Built from https://develop.svn.wordpress.org/trunk@45727
git-svn-id: http://core.svn.wordpress.org/trunk@45538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 12:19:56 +00:00
Andrea Fercia
2d60076e77
Accessibility: Improve the way emojis are announced by screen readers.
...
Adds an ARIA `role="img"` to the emojis markup in the front end. While the ARIA role is technically redundant, it helps Safari and VoiceOver to properly announce the emojis as "image". Without the role, they announce a generic "group" role.
Tested with Safari 12.1.1 / VoiceOver 9.
Props pento.
See #37486 .
Built from https://develop.svn.wordpress.org/trunk@45726
git-svn-id: http://core.svn.wordpress.org/trunk@45537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 11:53:56 +00:00
Andrea Fercia
9228eeb47b
Accessibility: Fix the `alt` attribute of the Gallery images within the Classic Editor.
...
Passes the images `alt` attribute value to the Gallery template used within the Classic Editor.
Props yarnboy, wpboss.
Fixes #47687 .
Built from https://develop.svn.wordpress.org/trunk@45725
git-svn-id: http://core.svn.wordpress.org/trunk@45536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 11:36:53 +00:00
Sergey Biryukov
76f482de43
Posts, Post Types: Check the result of `wp_update_post()` in `wp_trash_post()` and `wp_untrash_post()`.
...
Props abhijitrakas, manzoorwani.jk, siliconforks.
Fixes #47773 .
Built from https://develop.svn.wordpress.org/trunk@45724
git-svn-id: http://core.svn.wordpress.org/trunk@45535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 03:47:54 +00:00