Commit Graph

641 Commits

Author SHA1 Message Date
Drew Jaynes
3a3e133aaf Docs: Clarify that the $post parameters for the get_the_modified_date and get_the_modified_time filters can also be of type null.
Props dlh.
Fixes #40845.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:50:40 +00:00
Drew Jaynes
82ed0bdd11 Docs: Improve description wording for get_template_part() in regard to overloading by child themes.
Also, update the summary to use a third-person singular verb.

Props ixmati.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:56:40 +00:00
Peter Wilson
03f483215d Emoji: Add Emoji 5 support.
Updates Twemoji to 2.3.0 to include Emoji 5 support.

The pride flag test is replaced with a test for the English flag, a five character sub-devision locale. The UN flag test is retained as the most recent two character locale.

An Emoji 5 "bearded person" replaces both Emoji 4 tests.

Fixes #40858.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 07:18:45 +00:00
Andrea Fercia
2cbd9cf75e Themes: Improve the theme Custom Logo accessibility.
Uses the Site title as fallback value for the Custom Logo alt attribute when the original alt attribute is empty.

Props sami.keijonen, joedolson, sstoqnov, nobremarcos, gma992, LiamMcArthur, jjcomack.
Fixes #38768.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 20:29:42 +00:00
Peter Wilson
746edb23f2 Emoji: Update Twemoji to version 2.2.5
Updates Twemoji and adds a second Emoji 4 test to include a shrugging man. Emoji 4 is being implemented gradually, while some browsers now support the female technologist, the indifferent shrugging man is breaking things with his presence.

Props peterwilsoncc, pento for code review.
Fixes #40615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 04:26:41 +00:00
Andrew Ozz
dd0d110520 TinyMCE: update to 4.6.0. Has many new features and bug fixes, changelog: https://www.tinymce.com/docs/changelog/#version460-may42017.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40583


git-svn-id: http://core.svn.wordpress.org/trunk@40453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:32:46 +00:00
Andrew Ozz
d0e4448257 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 02:38:44 +00:00
Sergey Biryukov
e18640f4a7 Docs: Correct @return type for calendar_week_mod().
Props dingo_bastard.
Fixes #40077.
Built from https://develop.svn.wordpress.org/trunk@40254


git-svn-id: http://core.svn.wordpress.org/trunk@40176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-09 14:02:55 +00:00
John Blackbourn
80a839de13 Docs: Misc corrections and additions to inline documentation.
See #39130
Props keesiemeijer

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


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

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


git-svn-id: http://core.svn.wordpress.org/trunk@39578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:21:44 +00:00
John Blackbourn
c2d709e9d6 I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
John Blackbourn
fa5b5199e8 Editor: Correct the docblock for the wp_default_editor filter.
Props dimadin
See #38327

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


git-svn-id: http://core.svn.wordpress.org/trunk@39079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:56 +00:00
John Blackbourn
5c7aa3c5b8 Editor: Correct the description of the parameter passed to the wp_default_editor filter.
Props goto10
Fixes #38327

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


git-svn-id: http://core.svn.wordpress.org/trunk@39016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-01 19:56:30 +00:00
Weston Ruter
afe90360b5 Customize: Prevent absent site icon link from outputting an empty string as href in customizer; use /favicon.ico as fallback.
An empty string causes some browsers to use the current URL as the `href`. When using `history.replaceState()` Chrome will re-fetch the favicon with each call, meaning that `customize.php` gets hit with wasted requests which tax the server.

Fixes #38377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 04:47:29 +00:00
Sergey Biryukov
aa3b4f911d Remove an obsolete 1 == $total check in paginate_links().
`$total` cannot be a negative number since [4276].

Props jdgrimes.
Fixes #38421.
Built from https://develop.svn.wordpress.org/trunk@38857


git-svn-id: http://core.svn.wordpress.org/trunk@38800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:46:29 +00:00
Aaron Jorbin
82911b1756 Cache API: introduce wp_cache_get_last_changed to improve DRY
One thing fairly common to the cache groups is a block of code to look to see when the cache was last changed, and if there isn't one, to set it for the current microtime(). It appears in 8 different places in core. This adds a new helper `wp_cache_get_last_changed` to DRY things up a bit.

Since `wp-includes/cache.php` isn't guaranteed to be loaded, this new function is in `wp-includes/functions.php`

Props spacedmonkey, desrosj.
Fixes #37464.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 02:54:34 +00:00
Pascal Birchler
deda5d9796 Resource Hints: Allow passing custom attributes to resource hints.
[37920] introduced resource hints that allow browsers to prefetch specific pages or render them in the background. With this change, the `as`, `crossorigin`, `pr`, and `type` attributes can be passed in addition to the URLs/hosts.

Props peterwilsoncc, swissspidy.
Fixes #38121.
Built from https://develop.svn.wordpress.org/trunk@38826


git-svn-id: http://core.svn.wordpress.org/trunk@38769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 09:29:30 +00:00
Jeremy Felt
295e48baa9 Multisite: Maintain switched state in site icon/logo functions.
Adjusts `get_custom_logo()`, `get_site_icon_url()`, and `has_custom_logo()` so that when called in a switched state, the original switched stack is not adjusted.

Props achbed, flixos90.
Fixes #38253.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-13 22:28:28 +00:00
Peter Wilson
ffb703c002 Emoji: Update Emoji CDN filter default for resource hints.
Updates the default value for the filter `emoji_svg_url` used in `wp_resource_hints()` to match the default used for the filter in `_print_emoji_detection_script()`.

See [38717], #38724.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 04:24:31 +00:00
Pascal Birchler
bca93619a5 Editor: Improve documentation for user_can_richedit().
Clarifies the various global variables used in the function.

Props gma992.
Fixes #37321.
Built from https://develop.svn.wordpress.org/trunk@38707


git-svn-id: http://core.svn.wordpress.org/trunk@38650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:55:27 +00:00
Sergey Biryukov
a5f62988f5 Docs: Correct default value for next_text in paginate_links().
Props truongwp.
Fixes #38212.
Built from https://develop.svn.wordpress.org/trunk@38701


git-svn-id: http://core.svn.wordpress.org/trunk@38644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-02 19:10:28 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Sergey Biryukov
616eb41287 Docs: Move term_description() reference from filter docblock to get_the_archive_description() function docblock.
Props dlh.
See #37259.
Built from https://develop.svn.wordpress.org/trunk@38495


git-svn-id: http://core.svn.wordpress.org/trunk@38436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 12:32:28 +00:00
Sergey Biryukov
7aa79d3705 Template: After [38486], actually use the $description variable in get_the_archive_description().
Props dlh.
Fixes #37259.
Built from https://develop.svn.wordpress.org/trunk@38493


git-svn-id: http://core.svn.wordpress.org/trunk@38434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 11:47:30 +00:00
Sergey Biryukov
bfe8ba91b6 Template: In get_the_archive_description(), add support for author archives.
Props henry.wright.
Fixes #37259.
Built from https://develop.svn.wordpress.org/trunk@38486


git-svn-id: http://core.svn.wordpress.org/trunk@38427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 23:01:29 +00:00
Sergey Biryukov
b4aaf3925d Login and Registration: Change login label to Username or Email Address for clarity.
Props GaryJ.
Fixes #37871.
Built from https://develop.svn.wordpress.org/trunk@38477


git-svn-id: http://core.svn.wordpress.org/trunk@38418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 18:51:28 +00:00
Scott Taylor
a3ffebce30 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 16:31:29 +00:00
Scott Taylor
0eebbed6b2 General: revert [38467], wp_is_IE() should not exist.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 15:22:31 +00:00
Scott Taylor
021e23e70b General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:42:33 +00:00
Scott Taylor
9383bf8f74 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 05:49:37 +00:00
Sergey Biryukov
c2b62878aa Script Loader: Close the <link> tag in wp_resource_hints().
Props Chaos Engine.
Fixes #37800 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38443


git-svn-id: http://core.svn.wordpress.org/trunk@38384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 11:20:43 +00:00
John Blackbourn
27770f200c Themes: Correct the type for the $name parameter of the get_header, get_footer, get_sidebar, and get_template_part_{$slug} hooks.
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 20:42:30 +00:00
Scott Taylor
390ceba6c7 Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 22:32:37 +00:00
Dion Hulse
0e31a46161 Bootstrap: Revert [38399] as it's broken /build/ and subsequently core.svn.wordpress.org.
The generated classmaps reference `/src/` files and operates in the assumption that the base directory is one level above `wp-settings.php`, which it isn't after our build processes are run.

See #36335

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


git-svn-id: http://core.svn.wordpress.org/trunk@38343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 14:37:32 +00:00
Scott Taylor
6a529648cf Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.
* `wp-admin` and `wp-includes` are scanned for classes to autoload
* Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see `composer.json`: `autoload.exclude-from-classmap`
* `wp-vendor/autoload_52.php` is included at the top of `wp-settings.php` - no changes need to be made to unit tests to include the autoloader
* An avalanche of `require()` and `require_once()` calls that loaded class files have been removed from the codebase.

The following files have been added to `svn:ignore` - they are not 5.2-compatible and fail during pre-commit:
* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

We favor these files instead:
* src/wp-vendor/autoload_52.php
* src/wp-vendor/composer/autoload_real_52.php
* src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run `composer install` or `composer update` from the project root to update the autoloader.

The future is now.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 09:15:29 +00:00
Dominik Schilling
25338b6f02 Script Loader: Fix protocol-relative URLs for the preconnect relation type.
`wp_resource_hints()` parses the URL for the `preconnect` and `dns-prefetch` relation types to ensure correct values for both. While protocol-relative URLs are supported for `dns-prefetch`, the double slash was lost for `preconnect`.

Props swissspidy, peterwilsoncc.
Props azaozz for review.
Fixes #37652.
Built from https://develop.svn.wordpress.org/trunk@38255


git-svn-id: http://core.svn.wordpress.org/trunk@38196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 18:35:30 +00:00
Dominik Schilling
672cf2766e Script Loader: Ignore deregistered dependencies in wp_dependencies_unique_hosts().
Prevents a PHP warning when a handle of a deregistered dependency is still in the queue.

Fixes #37502.
Built from https://develop.svn.wordpress.org/trunk@38174


git-svn-id: http://core.svn.wordpress.org/trunk@38115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:25:28 +00:00
Peter Wilson
b65bb2525e Script Loader: Clarify documentation of wp_resource_hints hook.
Specify that the `wp_resource_hints` hook is firing for a single relation type.

Props: dimadin for initial patch.
See #37458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 10:36:28 +00:00
Sergey Biryukov
c578b90b96 Docs: Fix typo in wp_title() description.
Props ixkaito.
Fixes #37442.
Built from https://develop.svn.wordpress.org/trunk@38135


git-svn-id: http://core.svn.wordpress.org/trunk@38076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 10:45:29 +00:00
Dominik Schilling
7b0355b559 Script Loader: Use dns-prefetch for the Emoji CDN.
* `preconnect` will be potentially pretty heavy on the CDN. With the Unicode 9.0 emoji update, almost all browsers will trigger the `preconnect`.
* `preconnect` only opens one connection, but `s.w.org` is HTTP/1.1, so the browser will use the preconnected connection for the first emoji, then it has to open new connections for subsequent emoji.

Also use the same URL as we use for the `emoji_svg_url` filter. This will print the hint for the correct CDN in case someone uses a custom CDN.

Props peterwilsoncc.
Fixes #37387.
Built from https://develop.svn.wordpress.org/trunk@38122


git-svn-id: http://core.svn.wordpress.org/trunk@38063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 18:19:29 +00:00
Drew Jaynes
6cc13f0c54 Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 1/2.

See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:57:32 +00:00
Peter Wilson
a693987b91 Script Loader: Limit resource hinting to enqueued assets.
Externally hosted script and style dependencies trigger `dns-prefetch` hinting only when enqueued. This removed a bug in which hinting was added on registration.

Renames the function `wp_resource_hints_scripts_styles` to `wp_dependencies_unique_hosts` as the function provides the hosts, not the hinting.

Props swissspidy.
Fixes #37385.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 02:35:31 +00:00
Dominik Schilling
e5f967ca99 Resource Hints: Remove schemes from dns-prefetch resource hint outputs.
"wordpress.org", "!http://wordpress.org", and "!https://wordpress.org" should all have the same DNS lookup.
Also, replace `\r\n` with `\n` and ensure that invalid URLs are skipped.

Props niallkennedy, peterwilsoncc.
Fixes #37240.
Built from https://develop.svn.wordpress.org/trunk@38036


git-svn-id: http://core.svn.wordpress.org/trunk@37977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 11:32:28 +00:00
Drew Jaynes
31f150080a Docs: Standardize references to "meta box" or "meta boxes" as two distinct words throughout core documentation per the core spelling guide.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 00:56:28 +00:00
Sergey Biryukov
139387b7e5 Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew.
Fixes #36495.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Dominik Schilling
6c10cda818 Script Loader: Use wp_parse_url() to fix URL parsing failures for PHP < 5.4.7.
See [37920].
See #34292.
Built from https://develop.svn.wordpress.org/trunk@37922


git-svn-id: http://core.svn.wordpress.org/trunk@37863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 21:05:28 +00:00
Dominik Schilling
6d7a70e2ce Script Loader: Introduce an API to register resource hints.
Resource hints allow browsers to prefetch specific pages or render them in the background to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background.

By default, `wp_resource_hints()` prints hints for "s.w.org" (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts.
Use the `wp_resource_hints` filter to add custom domains and URLs for `dns-prefetch`, `preconnect`, `prefetch` or `prerender`.

Props voldemortensen, swissspidy.
Fixes #34292.
Built from https://develop.svn.wordpress.org/trunk@37920


git-svn-id: http://core.svn.wordpress.org/trunk@37861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 19:36:28 +00:00
Jeremy Felt
6f3f00ea97 Multisite: Change WP_Network id property to an integer.
For consistency and developer sanity.

Props flixos90.
Fixes #37050.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-26 14:26:29 +00:00
Drew Jaynes
2eae9d3f46 Docs: Clarify documentation for wp_logout_url() and wp_login_url() and corresponding hooks to highlight whether HTML-encoded or un-encoded values should be expected.
The return from `wp_logout_url()` is HTML-encoded due to its value passing through `wp_nonce_url()` and thus `esc_html()`. Adversely `wp_login_url()` passes through no such escaping and therefore should not be expected to return an HTML-encoded value.

Props akibjorklund for the initial patch.
Fixes #34352.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-20 08:48:28 +00:00
Peter Wilson
3b5bb5e067 Posts: Add $post parameter to modified date and time functions.
Unifies the APIs for getting a post's modified date or time with getting a post's date or time.

Adds the `$post` parameter to the functions `get_the_modified_date` and `get_the_modified_time`.

Adds the `$post` parameter to the filters `get_the_modified_date` and `get_the_modified_time`.

Props Soean, lukecavanagh.
Fixes #37059.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 05:12:28 +00:00
Peter Wilson
47d26cd9fb DOCS: Replace HTTP links with HTTPS.
Replaces unsecure links in documentation and translator comments with their secure versions.

Props johnpgreen, netweb

Fixes #36993

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


git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Dominik Schilling
00056f8d71 Template: Pass $blog_id to the get_custom_logo filter.
Props achbed, juanfra.
Fixes #36639.
Built from https://develop.svn.wordpress.org/trunk@37645


git-svn-id: http://core.svn.wordpress.org/trunk@37611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-06 21:24:27 +00:00
Drew Jaynes
bef05b469b Docs: Standardize DocBlock summaries for hooks that serve to "print" something to use third-person singular verbs.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 16:05:27 +00:00
Drew Jaynes
9549a46d7c Docs: Apply inline @see tags to hooks referenced in DocBlocks in wp-includes/general-template.php.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 18:57:28 +00:00
Dominik Schilling
fa6346e409 Template: In wp_get_archives() use add_query_arg() instead of sprintf() to build the archive URL.
Props tloureiro.
Fixes #36414.
Built from https://develop.svn.wordpress.org/trunk@37530


git-svn-id: http://core.svn.wordpress.org/trunk@37498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 10:23:30 +00:00
Drew Jaynes
0f39ebdb77 Docs: Standardize filter docs in wp-includes/general-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:26:53 +00:00
Drew Jaynes
f52a8cb1fa Docs: Remove/replace invalid inline @link tags in DocBlocks in wp-includes/*.
Fixes #36910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 17:39:28 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Drew Jaynes
fe3b007fdd Docs: Remove inline @see tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Drew Jaynes
3e2e0c52e6 Docs: Clarify the return descriptions for get_the_time(), get_post_time(), and get_post_modified_time() to specify when an integer in the form of a Unix timestamp should be expected.
See [30674]. See #30989.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-20 15:55:28 +00:00
Konstantin Obenland
db47a4913c Template: Remove $size reference from get_custom_logo().
Argument was removed in [37077] in favor of `with` and `height` arguments.

Props ocean90.
Fixes #36327.


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


git-svn-id: http://core.svn.wordpress.org/trunk@37102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 17:20:27 +00:00
Sergey Biryukov
48c366c1f4 Remove several one-time variables from wp_get_archives(), added in [24] and [190].
Props pbearne for initial patch.
Fixes #36243.
Built from https://develop.svn.wordpress.org/trunk@37005


git-svn-id: http://core.svn.wordpress.org/trunk@36972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-16 10:20:27 +00:00
Sergey Biryukov
1a5694fc0f Docs: Update default $size value for get_custom_logo filter after [36950].
Props wido.
See #33755.
Built from https://develop.svn.wordpress.org/trunk@36975


git-svn-id: http://core.svn.wordpress.org/trunk@36943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-13 09:14:28 +00:00
Konstantin Obenland
ff3babeb53 Template: Explicitly set full as the default custom logo size.
See #33755.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 19:03:26 +00:00
Konstantin Obenland
3e82e111e1 Tests: Introduce multisite unit tests.
Makes sure custom logo functions work for other sites within a network.
Fixes a bug in `get_custom_logo()` where the correct logo was returned, but
linked to the wrong site.

H/t ocean90.
See #33755, #36086.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 18:57:26 +00:00
Drew Jaynes
d94b2fb3ef Docs: Improve the 4.5.0 changelog entry in the hook doc for the get_archives_link filter, introduced in [36418].
See #35573. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:47:26 +00:00
Drew Jaynes
643df239b1 Docs: Improve the $blog_id parameter description in the DocBlock for the_custom_logo(), introduced in [36698].
See #33755. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:46:27 +00:00
Drew Jaynes
965985dd23 Docs: Improve the $blog_id parameter description in the DocBlock for get_custom_logo(), introduced in [36698].
See #33755. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:45:25 +00:00
Drew Jaynes
b04826bfe0 Docs: Improve inline documentation for has_custom_logo(), introduced in [36698].
See #33755. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:44:25 +00:00
Aaron Jorbin
1972aa2a2a Add grunt prerelease task
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557

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


git-svn-id: http://core.svn.wordpress.org/trunk@36898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 05:37:27 +00:00
Konstantin Obenland
147d6d7d6c Customize: Site logos are custom logos.
Brings the nomenclature closer to custom headers and backgrounds.

See https://wordpress.slack.com/archives/core/p1456955151003150
See #35945. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 19:56:26 +00:00
Dominik Schilling
56d28131dc I18N: Don't use the locale for the HTML language attribute.
Locales are codes to identify a language in WordPress which can be different from the specification for language tags, see https://www.w3.org/International/articles/language-tags/.
An example is `de_DE_formal` or `nl_NL_formal` where the subtag `formal` isn't officially supported.

To give translators the possibility to specify the language tag of their language introduce a string `html_lang_attribute` which can be translated into the language tag which conforms to the specification.

Props SergeyBiryukov.
Fixes #33511.
Built from https://develop.svn.wordpress.org/trunk@36802


git-svn-id: http://core.svn.wordpress.org/trunk@36769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-02 16:10:28 +00:00
Konstantin Obenland
237f6a0e58 Customize: Introduce Logo support for themes.
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/

Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland. 
See #33755.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 22:10:26 +00:00
Drew Jaynes
0fc00feec3 Embeds: Introduce embed templates into the template hierarchy via theme-compat.
Splits wp-includes/embed-template.php, introduced in 4.4, into five new templates that can be individually overridden by themes:

* embed.php
* embed-404.php
* embed-content.php
* header-embed.php
* footer-embed.php

Also introduces a new template tag for outputting the site title, `the_embed_site_title()`.

The five new templates live in theme-compat, allowing for graceful fallbacks should themes prefer not to override any or all of them.

Props swissspidy, imath, ocean90, DrewAPicture.
See #34561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 20:57:26 +00:00
Aaron Jorbin
e4dc3d1232 Make Custom Taxonomy Feeds Auto-discoverable
This helps improve the parity between custom taxonomies and built in taxonomies. It is one small step to #makeCustomTaxonomyFeedsGreatAgain.

Fixes #23677
Props mdgl, stevenkword


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


git-svn-id: http://core.svn.wordpress.org/trunk@36638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 02:36:25 +00:00
Dominik Schilling
13f76b11d1 Template: Update label for the username field in wp_login_form() after [36617].
See #9568.
Built from https://develop.svn.wordpress.org/trunk@36620


git-svn-id: http://core.svn.wordpress.org/trunk@36587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:38:27 +00:00
Andrea Fercia
30866ceb5d Accessibility: Improve color contrast updating any #999 gray used for text or icons to a darker gray.
Fixes #35660.
Built from https://develop.svn.wordpress.org/trunk@36587


git-svn-id: http://core.svn.wordpress.org/trunk@36554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:44:27 +00:00
Dominik Schilling
8a52014638 In wp_title() fix a 7 year old typo.
Props joelerr.
Fixes #34879.
Built from https://develop.svn.wordpress.org/trunk@36540


git-svn-id: http://core.svn.wordpress.org/trunk@36507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 22:28:26 +00:00
Boone Gorges
4b4978ecbd Pass additional params to 'get_archive_links' filter.
Props sebastian.pisula.
Fixes #35573.
Built from https://develop.svn.wordpress.org/trunk@36418


git-svn-id: http://core.svn.wordpress.org/trunk@36385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 04:46:26 +00:00
Drew Jaynes
196271e5b4 Docs: List out possible values for the $show parameter in the description for get_bloginfo().
Fixes #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:22:25 +00:00
Drew Jaynes
90b4ee93b3 Docs: Improve documentation for bloginfo() including cross-reference info for the $show parameter passed through to get_bloginfo().
See #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:17:28 +00:00
Andrea Fercia
1f9c29d98f Accessibility: remove the title attribute from the get_search_form() HTML5 search field.
It was added in [23801] as a workaround for issues with very old browser/screen reader combos (Jaws7/IE6).
No more necessary today. Reduces redundancy and noise for screen reader users.

See #16539.
Fixes #33952.
Built from https://develop.svn.wordpress.org/trunk@36222


git-svn-id: http://core.svn.wordpress.org/trunk@36189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 19:01:26 +00:00
Konstantin Obenland
a9dab28f63 Template: Always display the site title on the front page.
Limits using the page title to the blog page when the site has a static front page,
bringing it N’Sync with `wp_title()`.

Props peterwilsoncc.
Fixes #34962.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-04 17:16:27 +00:00
Sergey Biryukov
20594e4ecc Docs: Improve documentation for wp_admin_css_color().
Props kiranpotphode.
Fixes #34857.
Built from https://develop.svn.wordpress.org/trunk@36107


git-svn-id: http://core.svn.wordpress.org/trunk@36072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-27 16:32:29 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
John Blackbourn
d4eb85569b Login: Revert [34213] and [35897]. It has become apparent that there is a need for a separate function (and corresponding filter) which allows for the login form action URL to differ from the URL used to access the login form, so that plugins or implementations which change the login URL do not need to worry about handling the form submission at the same URL.
For now, we'll revert to the pre-4.4 behaviour of hard-coding the login form action URL as `wp-login.php` and look at implementing a separate function and corresponding filter in 4.5.

Props KrissieV, salcode, JPry
Fixes #34925
See #35103

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


git-svn-id: http://core.svn.wordpress.org/trunk@36007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 03:23:29 +00:00
Pascal Birchler
2981d66990 Login: After [34213], use the login_post scheme again for login forms.
See #34925.
Built from https://develop.svn.wordpress.org/trunk@35897


git-svn-id: http://core.svn.wordpress.org/trunk@35861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-13 14:03:26 +00:00
Sergey Biryukov
56a31f392b Docs: Remove @todo entry from get_archives_link(), as all optional arguments are now documented.
See #34856.
Built from https://develop.svn.wordpress.org/trunk@35887


git-svn-id: http://core.svn.wordpress.org/trunk@35851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 15:55:27 +00:00
Sergey Biryukov
3da5165287 Docs: Document optional parameters in get_archives_link().
Props kiranpotphode.
Fixes #34856.
Built from https://develop.svn.wordpress.org/trunk@35886


git-svn-id: http://core.svn.wordpress.org/trunk@35850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 15:52:27 +00:00
Konstantin Obenland
595ade87f9 Template: Use template-loader.php as cononical source of truth for conditional ordering.
Reverts [35700] which didn't account for author archives without posts.
Determination of the correct title is now based on the same order of
conditionals that template loader uses to select the right template.

H/t ocean90.
Fixes #34516.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-19 17:09:26 +00:00
Konstantin Obenland
b875cd1b72 Template: Get the author name directly from $authordata.
Since [25574] `$authordata` gets set up in `WP::register_globals()` - no need
to take a detour over the queried object.

Props greenshady for initial patch.
Fixes #34516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-19 00:06:25 +00:00
Konstantin Obenland
e1901c38c1 Template: Un-deprecate wp_title().
Before it can be deprecated we should identify alternative usages and define
a path forward for them.

See [35294], #31078.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 23:50:25 +00:00
Jeremy Felt
f3c2c7350c Site Icon: Wrap site icon retrieval with switch_to_blog() as needed.
When the site icon for another site is requested, retrieving its ID via `get_blog_option()` is not enough. `switch_to_blog()` is used to set proper context when required.

Adds multsite tests for `has_site_icon()`.

Props imath.
Fixes #34312.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-08 02:04:27 +00:00
Jeremy Felt
d1c09d96bf Site Icon: Use new wp_get_attachment_image_url() to retrieve URL.
`wp_get_attachment_image_url()` is a nice replacement for `wp_get_attachment_image_src()` here after its introduction in 4.4.

Props imath.
See #34312.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-08 01:59:26 +00:00
Sergey Biryukov
cde183f029 Editor: After [33927], make sure user_can_richedit() returns true for Microsoft Edge.
Props usermrpapa.
Fixes #34431.
Built from https://develop.svn.wordpress.org/trunk@35384


git-svn-id: http://core.svn.wordpress.org/trunk@35348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:13:24 +00:00
Sergey Biryukov
269a296bb4 Site Icon: Introduce get_site_icon_url filter for the icon URL.
Remove `oembed_site_icon_url` filter added in [34903].

Props swissspidy.
Fixes #34411.
Built from https://develop.svn.wordpress.org/trunk@35379


git-svn-id: http://core.svn.wordpress.org/trunk@35343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-23 21:17:24 +00:00
Drew Jaynes
aef5b20ee3 Docs: Add documentation in the form of a hash notation for default arguments accepted by wp_login_form().
Props ramiy for the initial patch.
Fixes #34364.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 15:38:26 +00:00
Drew Jaynes
0715dc8a4f Docs: Adjust syntax in the hook doc summaries for the document_title_separator and document_title_parts filters, introduced in [35294].
See #31078. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 18:37:54 +00:00
Drew Jaynes
7c538033dd Docs: Fix indentation and improve usefulness of inline comments surrounding the if/elseif conditions for assigning document titles in wp_get_document_title().
See #31078. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 18:32:00 +00:00
Drew Jaynes
0ea90a9174 Docs: Update the hook doc for the pre_get_document_title filter to explain ''what'' value is filterable rather than ''why'' the value is filterable :-)
The hook was introduced in [35294].

See #31078. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 18:14:24 +00:00