Commit Graph

780 Commits

Author SHA1 Message Date
John Blackbourn
52679edbff Docs: Add examples of possible names for various hooks whose name contains a dynamic portion.
This provides greater discoverability of such hooks in search results on the Code Reference site as well as increased clarity when reading the source.

See #50734, #52628

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


git-svn-id: http://core.svn.wordpress.org/trunk@50118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-07 12:32:09 +00:00
ryelle
fed21a9863 Administration: Standardize colors used in CSS to a single palette.
This is part of a larger project in cleaning up core's admin CSS. This collapses all colors used in the CSS to one of 12 blues, greens, reds, and yellows, 13 grays, pure black, and pure white. The colors are perceptually uniform from light to dark, half of each range has a 4.5 or higher contrast against white, the other half has a 4.5 or higher contrast against black.

Standardizing on this set of colors will help contributors make consistent, accessible design decisions. The full color palette can be seen here: https://codepen.io/ryelle/full/WNGVEjw

Props notlaura, danfarrow, kburgoine, drw158, audrasjb, Joen, hedgefield, ibdz, melchoyce.
See #49999.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-26 18:54:59 +00:00
Felix Arntz
3716c8c20f Robots: Introduce Robots API.
This changeset introduces a filter-based Robots API, providing central control over the `robots` meta tag.

* Introduces `wp_robots()` function which should be called anywhere a `robots` meta tag should be included.
* Introduces `wp_robots` filter which allows adding or modifying directives for the `robots` meta tag. The `wp_robots()` function is entirely filter-based, i.e. if no filter is added to `wp_robots`, no directives will be present, and therefore the entire `robots` meta tag will be omitted.
* Introduces the following `wp_robots` filter functions which replace similar existing functions that were manually rendering a `robots` meta tag:
    * `wp_robots_noindex()` replaces `noindex()`, which has been deprecated.
    * `wp_robots_no_robots()` replaces `wp_no_robots()`, which has been deprecated.
    * `wp_robots_sensitive_page()` replaces `wp_sensitive_page_meta()`, which has been deprecated. Its rendering of the `referrer` meta tag has been moved to another new function `wp_strict_cross_origin_referrer()`.

Migration to the new functions is straightforward. For example, a call to `add_action( 'wp_head', 'wp_no_robots' )` should be replaced with `add_filter( 'wp_robots', 'wp_robots_no_robots' )`.

Plugins and themes that render their own `robots` meta tags are encouraged to switch to rely on the `wp_robots` filter in order to use the central management layer now provided by WordPress core.

Props adamsilverstein, flixos90, timothyblynjacobs, westonruter.
See #51511.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-21 01:37:00 +00:00
Sergey Biryukov
f5bd63d352 Docs: Link to the parent function for accepted arguments in some filters for HTML output.
See #51800.
Built from https://develop.svn.wordpress.org/trunk@49977


git-svn-id: http://core.svn.wordpress.org/trunk@49678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-18 12:28:07 +00:00
Sergey Biryukov
b5953b551e Posts, Post Types: Introduce a filter paginate_links() output.
Props sabernhardt, audrasjb, re.ardestani.
Fixes #44018.
Built from https://develop.svn.wordpress.org/trunk@49976


git-svn-id: http://core.svn.wordpress.org/trunk@49677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-18 12:07:07 +00:00
Sergey Biryukov
47c146ac27 Accessibility: Customize: Add an empty alt attribute to the <img> tag used as a hidden placeholder in the Customizer preview when no logo is chosen.
Per accessibility best practices, it is recommended that all HTML `<img>` elements have an `alt` attribute. Any decorative images should have an empty `alt` attribute (`alt=""`).

Props laxman-prajapati, sabernhardt, audrasjb.
Fixes #51846.
Built from https://develop.svn.wordpress.org/trunk@49949


git-svn-id: http://core.svn.wordpress.org/trunk@49648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-08 16:55:07 +00:00
John Blackbourn
170ca32007 Docs: Various docblock corrections and improvements.
See #50768

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


git-svn-id: http://core.svn.wordpress.org/trunk@49335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-14 16:35:06 +00:00
Sergey Biryukov
e569358678 General: Ensure that filtered arguments in get_search_form() contain all required default values.
Props kellybleck, davidbaumwald, whyisjake, SergeyBiryukov.
Fixes #51645.
Built from https://develop.svn.wordpress.org/trunk@49355


git-svn-id: http://core.svn.wordpress.org/trunk@49115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-28 16:57:08 +00:00
Sergey Biryukov
0e3147c40e Coding Standards: Replace alias PHP functions with the canonical names.
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces all uses of the following:
* `join()` with `implode()`
* `sizeof()` with `count()`
* `is_writeable()` with `is_writable()`
* `doubleval()` with a `(float)` cast

In part, this is a follow-up to #47746.

Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49193


git-svn-id: http://core.svn.wordpress.org/trunk@48955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 17:27:06 +00:00
Sergey Biryukov
897f004a9c General: Replace older-style PHP type conversion functions with type casts.
This improves performance, readability, and consistency throughout core.

* `intval()` → `(int)`
* `strval()` → `(string)`
* `floatval()` → `(float)`

Props ayeshrajans.
Fixes #42918.
Built from https://develop.svn.wordpress.org/trunk@49108


git-svn-id: http://core.svn.wordpress.org/trunk@48870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 21:15:13 +00:00
Sergey Biryukov
dc7bda9620 Docs: Add brackets to function names in some @see tags, for consistency.
Props ravipatel, davidbaumwald.
Fixes #51441.
Built from https://develop.svn.wordpress.org/trunk@49092


git-svn-id: http://core.svn.wordpress.org/trunk@48854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-05 14:03:02 +00:00
Sergey Biryukov
0418dad234 Docs: Synchronize the description of the $format parameter in various date/time functions for posts and comments.
See #50768.
Built from https://develop.svn.wordpress.org/trunk@48929


git-svn-id: http://core.svn.wordpress.org/trunk@48691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-01 00:43:06 +00:00
Sergey Biryukov
d3abb209e1 Date/Time: In get_the_date() and related functions, pass the original, unmodified $format value to the filters.
Additionally, simplify the `$format` argument checks for consistency with similar checks in `get_the_modified_date()` and `get_the_modified_time()`.

Follow-up to [48912].

Props Rarst.
See #51184.
Built from https://develop.svn.wordpress.org/trunk@48918


git-svn-id: http://core.svn.wordpress.org/trunk@48680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 18:30:05 +00:00
Sergey Biryukov
aec28121b3 Date/Time: Make sure get_the_date() and related functions return correct time if the format was specified as false.
Technically, the `$format` argument should always be a string, but passing `false` used to work before [47808], so this restores backward compatibility.

The list of affected functions:
* `get_the_date()`
* `get_the_time()`
* `get_comment_date()`
* `get_comment_time()`

Props wittich, Rarst, akabarikalpesh, SergeyBiryukov.
Fixes #51184.
Built from https://develop.svn.wordpress.org/trunk@48912


git-svn-id: http://core.svn.wordpress.org/trunk@48674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 15:58:04 +00:00
desrosj
a861ce1b5f Media: Disable lazy-loading for custom logos by default.
Custom site logos are most commonly displayed above the fold, so lazy-loading is unnecessary.

Props demetris, khag7, johnbillion, rebasaurus, audrasjb.
Fixes #50933.
Built from https://develop.svn.wordpress.org/trunk@48870


git-svn-id: http://core.svn.wordpress.org/trunk@48632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 01:07:11 +00:00
Sergey Biryukov
ebf80f8e01 Docs: Update documentation for get_custom_logo() and the_custom_logo() to mention the unlink-homepage-logo theme feature.
Follow-up to [48039], [48283], [48749], [48757], [48758].

Props sabernhardt.
Fixes #51075.
Built from https://develop.svn.wordpress.org/trunk@48832


git-svn-id: http://core.svn.wordpress.org/trunk@48594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-20 10:41:06 +00:00
Sergey Biryukov
26cf7ec46d Docs: Add a @since note to get_the_archive_title() about the title part being wrapped in a <span> element.
Follow-up to [48294].

Props justinahinon, audrasjb.
Fixes #51050.
Built from https://develop.svn.wordpress.org/trunk@48814


git-svn-id: http://core.svn.wordpress.org/trunk@48576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 12:05:09 +00:00
Sergey Biryukov
df6e548b14 Accessibility: Themes: Only unlink custom logo on the home page if the theme declares support for that.
To accommodate for the change, the `custom-logo` theme feature now accepts the `unlink-homepage-logo` parameter.

If and when the logo is linked on the home page, the link has the `aria-current` attribute for better accessibility.

Follow-up to [48039], [48283].

Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes #37011.
Built from https://develop.svn.wordpress.org/trunk@48749


git-svn-id: http://core.svn.wordpress.org/trunk@48511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 15:26:03 +00:00
Sergey Biryukov
404b1a4238 Login and Registration: Correct the logic for determining the path to wp-login.php in wp_lostpassword_url().
Follow-up to [48672], [48673].

See #39311.
Built from https://develop.svn.wordpress.org/trunk@48674


git-svn-id: http://core.svn.wordpress.org/trunk@48436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:44:06 +00:00
Sergey Biryukov
466a057422 Login and Registration: Only call get_blog_details() in wp_lostpassword_url() on Multisite.
The function does not exist on single site.

Follow-up to [48672].

See #39311.
Built from https://develop.svn.wordpress.org/trunk@48673


git-svn-id: http://core.svn.wordpress.org/trunk@48435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:40:05 +00:00
Sergey Biryukov
31702738d6 Login and Registration: Link to the correct site after activating a user on a Multisite install in subdirectory mode.
Props pkarjala, Mista-Flo, tmoore41, Ipstenu, ksoares, mukesh27, whyisjake.
Fixes #39311.
Built from https://develop.svn.wordpress.org/trunk@48672


git-svn-id: http://core.svn.wordpress.org/trunk@48434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:20:06 +00:00
John Blackbourn
1fbcdb2213 Docs: Various corrections to inline docblocks.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48573


git-svn-id: http://core.svn.wordpress.org/trunk@48335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:48:06 +00:00
desrosj
b6b2f2ac3f Administration: Ensure SVG icons in admin menus are correctly colored.
Props ryelle.
Fixes #50555.
Built from https://develop.svn.wordpress.org/trunk@48542


git-svn-id: http://core.svn.wordpress.org/trunk@48304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:10:06 +00:00
Sergey Biryukov
6fc76c162d Widgets: Correct the logic for displaying the after_widget parameter of the Archives widget.
Follow-up to [48349].

Props mukesh27, joyously.
Fixes #50609.
Built from https://develop.svn.wordpress.org/trunk@48409


git-svn-id: http://core.svn.wordpress.org/trunk@48178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 13:28:03 +00:00
Sergey Biryukov
4518255c93 Themes: Allow template loading functions to pass additional arguments to the template via the $args parameter.
This affects:
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
* `locate_template()`
* `load_template()`

Note: `get_search_form()` already passes additional arguments to the template as of [44956].

Props enrico.sorcinelli, sc0ttkclark, scribu, nacin, wonderboymusic, GeertDD, beatpanda, amaschas, mintindeed, ysalame, caiocrcosta, bigdawggi, julianm, eddiemoya, shawnz, sayedwp, shamai, mboynes, mihai2u, guidobras, Mte90, apedog, stuffradio, overclokk, johnbillion, joyously, afercia, audrasjb, justlevine, SergeyBiryukov.
See #21676.
Built from https://develop.svn.wordpress.org/trunk@48370


git-svn-id: http://core.svn.wordpress.org/trunk@48139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 11:01:59 +00:00
Dominik Schilling
40a660461e Administration: Make all color schemes available when running from /src.
To run WordPress from /src you have to use the `--dev` flag which also builds the color scheme stylesheets thus the restriction is no longer required.

See #44492.
Fixes #50558.
Built from https://develop.svn.wordpress.org/trunk@48311


git-svn-id: http://core.svn.wordpress.org/trunk@48080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:40:02 +00:00
Dominik Schilling
df320b33c2 Themes: Introduce get_the_archive_title_prefix filter for changing the prefix used for archive titles.
In `get_the_archive_title()` split the internal `$title` variable into `$title` and `$prefix`. By using the new `get_the_archive_title_prefix` filter the prefix can now wrapped with custom elements or removed completely by using

{{{
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );
}}}

Also, wrap the title part with a `span` element and pass the original title and prefix to the existing `get_the_archive_title` filter, allowing further customization to the archive titles.

Props Kaira, milindmore22, shireling, grapplerulrich, audrasjb, desrosj, Confridin, ramiy, ocean90.
Fixes #31237.
Fixes #38545.
Built from https://develop.svn.wordpress.org/trunk@48294


git-svn-id: http://core.svn.wordpress.org/trunk@48063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 14:45:01 +00:00
Andrea Fercia
83c7b67c32 Accessibility: Themes: Use a default empty alt attribute for the non-linked custom logo on the home page.
After [48039] it became clear that the non-linked custom logo on the home page needs an empty alt attribute, as in most of the cases the logo is decorative and doesn't need its purpose to be described.

This change outputs an empty alt attribute by default for the custom logo on the home page. If necessary, it is possible to use the new 'get_custom_logo_image_attributes' filter to manipulate the default attributes for the logo image and set an alt attribute.

Props FlorianBrinkmann, Soean, sabernhardt, audrasjb, SergeyBiryukov, samful, knutsp.
See #36640.
Fixes #37011.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 12:58:07 +00:00
youknowriad
bbe8f41de2 Color schemes: Add new modern color scheme option.
This PR adds a new color scheme option, which uses a high luminosity blue spot color, almost-black menu, and pure white for menu items. 
This helps increase contrast, and bring more consistency with some of the higher contrast colors used in the block editor.

Props joen, ibdz, shaunandrews.
Fixes #50504.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 14:55:05 +00:00
Sergey Biryukov
ec571bdcf6 Docs: Spell "falsey" in a consistent way.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48275


git-svn-id: http://core.svn.wordpress.org/trunk@48044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 11:30:02 +00:00
Sergey Biryukov
cd0349b301 Themes: Add a return value to theme functions calling locate_template():
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`

These functions now return false if the template file could not be found, to allow for easier debugging.

Props tferry, sphakka, johnbillion, pento, davidbinda, desrosj, birgire, garrett-eclipse, williampatton, davidbaumwald, SergeyBiryukov.
Fixes #40969.
Built from https://develop.svn.wordpress.org/trunk@48209


git-svn-id: http://core.svn.wordpress.org/trunk@47978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-28 23:10:04 +00:00
Sergey Biryukov
3336009e34 Docs: Replace "html" and "xhtml" instances in DocBlocks and comments with "HTML" and "XHTML".
This ensures consistent capitalization where appropriate.

Props navidos, desrosj.
Fixes #50473.
Built from https://develop.svn.wordpress.org/trunk@48199


git-svn-id: http://core.svn.wordpress.org/trunk@47968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-28 14:02:06 +00:00
Sergey Biryukov
58ad216087 Docs: Improve documentation for optional parameters per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48197


git-svn-id: http://core.svn.wordpress.org/trunk@47966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-28 11:49:02 +00:00
Sergey Biryukov
be16bb9fba Docs: Remove extra spaces from @param tags.
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48110


git-svn-id: http://core.svn.wordpress.org/trunk@47879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:58:10 +00:00
John Blackbourn
1a77bb81d8 Docs: Remove unnecessary variables names from @return tags.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48100


git-svn-id: http://core.svn.wordpress.org/trunk@47869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-19 22:55:12 +00:00
Sergey Biryukov
1f06606aa7 Customize: Introduce get_custom_logo_image_attributes filter for the list of custom logo image attributes.
Props achbed, dlh, westonruter.
Fixes #36640.
Built from https://develop.svn.wordpress.org/trunk@48057


git-svn-id: http://core.svn.wordpress.org/trunk@47824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-16 11:49:08 +00:00
desrosj
4cdd79af25 Emoji: Upgrade Twemoji to version 13.0.0.
🥸

Props kraftbj, desrosj, otto42.
Fixes #50148.
Built from https://develop.svn.wordpress.org/trunk@48048


git-svn-id: http://core.svn.wordpress.org/trunk@47815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-15 18:04:26 +00:00
Sergey Biryukov
01eb2907a7 Accessibility: Themes: Don't link to the home page in get_custom_logo() when it's displayed on the home page.
Props Soean, audrasjb, sabernhardt, FlorianBrinkmann, rianrietveld, afercia, joedolson, samful, knutsp, SergeyBiryukov.
See #37011.
Built from https://develop.svn.wordpress.org/trunk@48039


git-svn-id: http://core.svn.wordpress.org/trunk@47806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-14 10:02:11 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
856e1a27b8 Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core.

Includes minor code layout fixes for better readability.

Follow-up to [47550].

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47557


git-svn-id: http://core.svn.wordpress.org/trunk@47332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 15:43:10 +00:00
Sergey Biryukov
38676936ba Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov
dacd7a55ea Toolbar: Move the logic for rendering the admin bar on wp_footer to wp_admin_bar_render().
Clarify in the function documentation that it is now called on `wp_body_open` action first, with `wp_footer` as a fallback.

Follow-up to [47221].

Fixes #47053.
Built from https://develop.svn.wordpress.org/trunk@47455


git-svn-id: http://core.svn.wordpress.org/trunk@47242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-14 16:01:08 +00:00
John Blackbourn
aed09845b2 Feeds: Remove an unreachable condition when generating archive feed links.
Props donmhico, pbiron

Fixes #48427
Built from https://develop.svn.wordpress.org/trunk@47406


git-svn-id: http://core.svn.wordpress.org/trunk@47193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-02 18:52:04 +00:00
John Blackbourn
056dad9c2c Docs: Use more specific types in parameter descriptions in place of mixed.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@47397


git-svn-id: http://core.svn.wordpress.org/trunk@47184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-01 10:38:07 +00:00
Sergey Biryukov
1a9b7f8737 General: Introduce HTML classes in get_calendar() for easier CSS targeting:
* `.wp-calendar-table` for the `<table>` element.
* `.wp-calendar-nav` for the navigation wrapper.
* `.wp-calendar-nav-prev` for the previous month link.
* `.wp-calendar-nav-next` for the next month link.

Replace `#prev` and `#next` HTML IDs with `.wp-calendar-nav-prev` and `.wp-calendar-nav-next` classes.

Props sabernhardt, BackuPs, audrasjb, jorbin.
Fixes #39763.
Built from https://develop.svn.wordpress.org/trunk@47374


git-svn-id: http://core.svn.wordpress.org/trunk@47161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-25 20:30:07 +00:00
Sergey Biryukov
306d804d86 Theme Editor: Disable CodeMirror CSS linting.
Being a good idea in theory, in practice it does not always work reliably, may not recognize newer CSS properties, and sometimes displays phantom errors with no particular error message.

A plugin can re-enable CSS linting via the `wp_code_editor_settings` filter.

Props skypressatx, ThemeZee, johnbillion, ianbelanger, ZanderZ, starvoters1, raoulunger, prashantvatsh, SergeyBiryukov.
Fixes #44471.
Built from https://develop.svn.wordpress.org/trunk@47305


git-svn-id: http://core.svn.wordpress.org/trunk@47105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-18 15:51:08 +00:00
Sergey Biryukov
6b2c63031c Coding Standards: Rename $d parameter in various date/time functions to $format for clarity.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47287


git-svn-id: http://core.svn.wordpress.org/trunk@47087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-14 00:07:07 +00:00
Sergey Biryukov
32edd58e4c Docs: Add descriptions for some globals:
* `$wp_version`
* `$wp_local_package`
* `$required_php_version`
* `$required_mysql_version`

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47230


git-svn-id: http://core.svn.wordpress.org/trunk@47030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-10 03:30:06 +00:00
Aaron Jorbin
b21985f139 General: Fix HTML for get_calendar()
The <tfoot> element was allowed to precede the <tbody> element in HTML 5. However, that was changed in HTML 5.1 and <tfoot> must now follow <tbody>.

This removes the tfooot and instead uses a nav element for navigation between months.

Fixes: #39763
Props: isabel_brison, Harry Milatz, audrasjb, abhijitrakas, SergeyBiryukov

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


git-svn-id: http://core.svn.wordpress.org/trunk@47023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 20:44:04 +00:00
joedolson
1dbe25bc0a Toolbar: Load toolbar in wp_body_open when available.
For accessibility, the visual appearance and source order should match. Moving the toolbar to load in the new hook `wp_body_open` (5.2) fixes a long-standing source order problem.

Props jankimoradiya, afercia, SergeyBiryukov, audrasjb, ocean90, xkon, dinhtungdu.
Fixes #47053.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 18:26:08 +00:00
Sergey Biryukov
641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
Sergey Biryukov
803feb30dd Docs: Improve description for the $editor_id parameter of wp_editor() and _WP_Editors::editor().
The restictions mentioned for the parameter value should be consistenct.

Props pbiron, SergeyBiryukov.
Fixes #49384.
Built from https://develop.svn.wordpress.org/trunk@47210


git-svn-id: http://core.svn.wordpress.org/trunk@47010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-07 23:30:05 +00:00
Sergey Biryukov
47ed56f38f Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
f34eef4437 Docs: Expand @return value description for wp_loginout(), wp_register(), get_calendar().
See #48303.
Built from https://develop.svn.wordpress.org/trunk@47104


git-svn-id: http://core.svn.wordpress.org/trunk@46904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 00:57:03 +00:00
Sergey Biryukov
dd79e6e107 Docs: Correct DocBlock formatting for filters accepting the $parsed_args parameter.
Follow-up to [45667].

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47096


git-svn-id: http://core.svn.wordpress.org/trunk@46896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-21 15:41:04 +00:00
Sergey Biryukov
dd4d98a368 Docs: In various @return tags, list the expected type first, instead of false.
Follow-up to [46696].

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47060


git-svn-id: http://core.svn.wordpress.org/trunk@46860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-11 18:32:05 +00:00
John Blackbourn
f93ee2ca76 Docs: Increase the specificity of various docblock parameter types and return types.
See #48303
Built from https://develop.svn.wordpress.org/trunk@46823


git-svn-id: http://core.svn.wordpress.org/trunk@46623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-06 22:43:04 +00:00
Sergey Biryukov
f67b1a6385 Customize: Remove the deprecated -precomposed suffix from apple-touch-icon link in wp_site_icon().
Props mukto90, khag7.
Fixes #48555.
Built from https://develop.svn.wordpress.org/trunk@46698


git-svn-id: http://core.svn.wordpress.org/trunk@46498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-11 10:00:01 +00:00
John Blackbourn
f545bb3f63 Docs: Improve documentation of known return types, plus other docs fixes.
See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-05 21:23:02 +00:00
John Blackbourn
be91e3e1b9 Docs: Correct some more invalid inline docs.
See https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#summary-formerly-short-description

See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-31 21:20:02 +00:00
John Blackbourn
3caaa40fc6 Docs: Switch more docs over to typed array notation, plus some fixes.
See #48303, #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@46393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-26 21:09:04 +00:00
Sergey Biryukov
75c183c248 Date/Time: Make sure get_post_time() keeps UTC time on timezone change.
Add `$source` parameter to `get_post_datetime()` to instantiate from local or UTC time in database.

Props Rarst, david.binda.
Reviewed by azaozz, SergeyBiryukov.
Fixes #48384.
Built from https://develop.svn.wordpress.org/trunk@46580


git-svn-id: http://core.svn.wordpress.org/trunk@46377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-25 13:08:05 +00:00
desrosj
894e133d0c Build/Test Tools: Introduce automated PHP compatibility checking.
This change introduces a new Composer script, `compat` that will scan the codebase for (detectable) potential PHP compatibility issues using the `PHP_CodeSniffer` and a custom ruleset based off of the `PHPCompayibilityWP` ruleset (`phpcompat.xml.dist`).

The command will be run as a separate job within each Travis build. While many compatibility issues and false positives have already been corrected in this commit and other Trac tickets, there are still some remaining. For that reason, the job is allowed to fail while the remainder of the potential compatibility issues are investigated and addressed. After those are resolved, the job should be set as required to pass to help prevent new compatibility issues from being introduced.

Props desrosj, jrf, all PHPCompatibilityWP and PHPCompatibility contributors.
Fixes #46152.
Built from https://develop.svn.wordpress.org/trunk@46290


git-svn-id: http://core.svn.wordpress.org/trunk@46102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-25 13:47:58 +00:00
Andrea Fercia
095805b5e6 Accessibility: Add aria-current to the Archives, Categories, and Recent Posts widgets output.
The `aria-current` attribute is a simple, effective, way to help assistive technology users orientate themselves within a list of items.

Continues the introduction in core of the `aria-current` attribute after [41359] and following changes.

Props audrasjb, melchoyce.
Fixes #47094.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-18 12:25:56 +00:00
Sergey Biryukov
b2a384461e Date/Time: Introduce get_post_datetime() to retrieve post published or modified time as a DateTimeImmutable object instance.
Introduce `get_post_timestamp()` to retrieve post published or modified time as a Unix timestamp.

Use `get_post_datetime()` in `get_post_time()` and `get_post_modified_time()` to return correct GMT time if default timezone is changed from UTC.

Props Rarst, johnregan3.
Fixes #25002.
Built from https://develop.svn.wordpress.org/trunk@46154


git-svn-id: http://core.svn.wordpress.org/trunk@45966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 11:14:54 +00:00
Sergey Biryukov
4d1761c881 Coding Standards: Fix WPCS issue in [46088].
See #47110.
Built from https://develop.svn.wordpress.org/trunk@46089


git-svn-id: http://core.svn.wordpress.org/trunk@45901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 20:01:54 +00:00
Sergey Biryukov
dcb08f0637 Docs: Fix placement of some duplicate hook references.
Hook documentation should be on the line directly above the line containing the `do_action()` or `apply_filters()` call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.
Built from https://develop.svn.wordpress.org/trunk@46088


git-svn-id: http://core.svn.wordpress.org/trunk@45900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:23:55 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Peter Wilson
b55ca66759 #43590: Use robots meta tag to better discourage search engines.
This changes the "discourage search engines" option to output a `noindex, nofollow` robots meta tag. `Disallow: /` is removed from the `robots.txt` to allow search engines to discover they are requested not to index the site.

Disallowing search engines from accessing a site in the `robots.txt` file can result in search engines listing a site with a fragment (a listing without content).

Props donmhico, jonoaldersonwp.
Fixes #43590.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-02 02:27:55 +00:00
Sergey Biryukov
16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +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
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
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
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
18bd01985b Coding Standards: Rename $r variable used with wp_parse_args() to $parsed_args for clarity.
Props freewebmentor.
Fixes #45059.
Built from https://develop.svn.wordpress.org/trunk@45667


git-svn-id: http://core.svn.wordpress.org/trunk@45478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 00:48:58 +00:00
Gary Pendergast
4803fc405e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 23:42:58 +00:00
Gary Pendergast
55af0f0d0a Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations.
See #47632


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


git-svn-id: http://core.svn.wordpress.org/trunk@45391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:01:57 +00:00
Sergey Biryukov
c77e771c84 Date/Time: Replace all instances of date() with gmdate().
Use of `date()` in core depends on PHP timezone set to UTC and not changed by third party code (which cannot be guaranteed).

`gmdate()` is functionally equivalent, but is not affected by PHP timezone setting: it's always UTC, which is the exact behavior the core needs.

Props nielsdeblaauw, Rarst.
Fixes #46438. See #44491.
Built from https://develop.svn.wordpress.org/trunk@45424


git-svn-id: http://core.svn.wordpress.org/trunk@45235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 00:12:54 +00:00
Sergey Biryukov
eecfa3b4ed Docs: Correct description for $seplocation parameter of wp_title().
Props mukesh27, vladlu.
Fixes #47370.
Built from https://develop.svn.wordpress.org/trunk@45406


git-svn-id: http://core.svn.wordpress.org/trunk@45217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 22:59:52 +00:00
Sergey Biryukov
e3bb526606 Login and Registration: Pass the action to site_url() in wp_logout_url() and wp_lostpassword_url():
* Make `site_url` filter in `wp_logout_url()` aware of the `logout` action.
* Make `network_site_url` filter in `wp_lostpassword_url()` aware of the `lostpassword` action.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 01:33:52 +00:00
Sergey Biryukov
0cc6547e43 Docs: Adjust get_post_modified_time filter DocBlock for consistency with get_post_time.
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45380


git-svn-id: http://core.svn.wordpress.org/trunk@45191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-23 00:41:51 +00:00
Sergey Biryukov
3c16bdc538 Date/Time: Return early from the_weekday() and the_weekday_date() if we're not in the loop.
Restore `$previousweekday` global usage in `the_weekday_date()`, so it could still be used simultaneously with `the_date()`.

Partially reverts [45378].
See #47354.
Built from https://develop.svn.wordpress.org/trunk@45379


git-svn-id: http://core.svn.wordpress.org/trunk@45190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-23 00:38:52 +00:00
Sergey Biryukov
ed08643734 Date/Time: Bring some consistency to the_date() and the_weekday_date():
* Make `the_date()` always apply the the filter and return a value.
* Use `is_new_day()` in `the_weekday_date()`.
* Add a unit test for `the_weekday_date()`.

Fixes #47354.
Built from https://develop.svn.wordpress.org/trunk@45378


git-svn-id: http://core.svn.wordpress.org/trunk@45189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-22 21:58:50 +00:00
Sergey Biryukov
0b66be9cd7 Docs: Improve documentation for the_date() and the_weekday_date().
Correct type for `$currentday` and `$previousday` globals.

See #47354, #47110.
Built from https://develop.svn.wordpress.org/trunk@45377


git-svn-id: http://core.svn.wordpress.org/trunk@45188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-22 21:48:52 +00:00
Sergey Biryukov
e06afa8a80 Accessibility: In back-compat code added for get_search_form() in [44956], when checking the (previously boolean) $args value, account for non-strict comparison.
Props dkarfa, sachyya-sachet.
Fixes #47177. See #42057.
Built from https://develop.svn.wordpress.org/trunk@45340


git-svn-id: http://core.svn.wordpress.org/trunk@45151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 02:22:53 +00:00
Gary Pendergast
a125989772 Emoji: Update Twemoji to version 12.0.0.
Props pento, superpoincare.
Fixes #46404, #46805.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 05:22:51 +00:00
John Blackbourn
94e4da6aec Themes: Introduce a generic action that's fired when a template part is loaded.
This action allows debugging mechanisms to perform greater introspection into which template parts are loaded for any given request. It also exposes the array of candidate template part file names for each template part instance.

Props pcfreak30, jdeeburke

Fixes #41575

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


git-svn-id: http://core.svn.wordpress.org/trunk@44868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 21:13:54 +00:00
Adam Silverstein
418afaa938 Bundled Theme: trigger a new wp_body_open action immediately after the opening body tag.
* Enables inserting (asynchronous) JavaScript right after the opening `body` tag.
* Add a `wp_body_open` helper function that triggers the `wp_body_open` action.
* Call `wp_body_open` in core themes immediately after the opening `body` tag.

Props joostdevalk, valendesigns, nacin, saracup, jorbin, mikeschinkel, jonnybojangles, lgedeon, Willscrlt, Denis-de-Bernardy, lexiqueen, sky_76, welcher, westonruter, ramiy, joyously.
Fixes #12563.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 21:59:52 +00:00
Sergey Biryukov
d4d906c4d5 Themes: Remove itemprop="url" from get_custom_logo() output.
Making incorrect assumptions about microdata used in a theme results in invalid markup.

The attribute can still be added using the `get_custom_logo` or `wp_get_attachment_image_attributes` filter, but it should not be added by default.

Props henry.wright, tfrommen, afercia, markcallen, zodiac1978.
Fixes #37305.
Built from https://develop.svn.wordpress.org/trunk@45028


git-svn-id: http://core.svn.wordpress.org/trunk@44837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 12:16:53 +00:00
Sergey Biryukov
eb5c0abc00 Accessibility: Add ability to pass an ARIA label for the <form> element returned by get_search_form().
This allows screen readers to properly announce each search landmark region independently.

Introduce `search_form_args` filter for the arguments used when generating the search form.

Props afercia, williampatton.
Fixes #42057.
Built from https://develop.svn.wordpress.org/trunk@44956


git-svn-id: http://core.svn.wordpress.org/trunk@44787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 09:20:59 +00:00
Sergey Biryukov
2922b9b1b4 Docs: Add a @since tag for the new $selected parameter of get_archives_link().
See #40662.
Built from https://develop.svn.wordpress.org/trunk@44898


git-svn-id: http://core.svn.wordpress.org/trunk@44729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 19:37:51 +00:00
Sergey Biryukov
bba488f2b7 Widgets: Pre-select currently viewed archive in the Archives dropdown widget, for consistency with the Categories widget.
Props robobot3000, audrasjb, afercia, Themonic.
Fixes #40662.
Built from https://develop.svn.wordpress.org/trunk@44897


git-svn-id: http://core.svn.wordpress.org/trunk@44728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 19:31:49 +00:00
Sergey Biryukov
5658305b1c Date/Time: Reduce explicit local current_time( 'timestamp' ) usage in favor of native PHP functions.
Timestamps don't carry any timezone information, using the intended format directly simplifies the logic and makes the code less confusing.

Props Rarst, jdgrimes.
See #40657.
Built from https://develop.svn.wordpress.org/trunk@44809


git-svn-id: http://core.svn.wordpress.org/trunk@44641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:12:51 +00:00
desrosj
2d1d80f4c5 Themes: Revert returning the value of locate_template() in functions that call it.
Because the names of the `get_header()`, `get_footer()`, `get_sidebar()`, and `get_template_part()` functions indicate that a value is returned, some plugins and themes already have `echo get_template_part()` in their codebase. Adding a return value to these functions using the approach in [44678] will cause the two unintended side effects of unexpected content being sent to the browser, and accidental path disclosure.

Reverts [44678].

Props davidbinda.
See #40969.
Built from https://develop.svn.wordpress.org/trunk@44725


git-svn-id: http://core.svn.wordpress.org/trunk@44556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-06 18:37:51 +00:00
Gary Pendergast
57c293e2d7 Themes: Return the value of locate_template() in functions that call it.
The `get_header()`, `get_footer()`, `get_sidebar()`, and `get_template_part()` functions all call `locate_template()` as their final action, which returns the name of the template being loaded. Returning this value helps handle problems with templates being loaded.

Props tferry.
Fixes #40969.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:00:50 +00:00
Gary Pendergast
0ee053758e Emoji: Upgrade Twemoji to 11.2.0.
This upgrade includes general improvements to the style of a variety of emoji.

Full changelog: https://github.com/twitter/twemoji/compare/v11.0.0...v11.2.0

Props desrosj, pento.
Fixes #45133.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 01:42:50 +00:00
Gary Pendergast
e96ea8eab6 Docs: Partial revert of [44636].
Unrelated changes in `wp-includes/general-template.php` were accidentally committed.

See #44502.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 07:57:52 +00:00