Commit Graph

729 Commits

Author SHA1 Message Date
Gary Pendergast dcdfd7f412 Docs: Fix the last handful of incorrect `@since 5.0.0` docblock tags.
Props peterwilsoncc.
Fixes #45543.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 06:46:50 +00:00
desrosj 34c4ce3c81 Docs: Update inaccurate `return` descriptions.
In the `@return` tag description for `get_post_modified_time()`, `get_the_time()`, and `get_post_time()`, the `$d` parameter is incorrectly referred to as `$id`.

Props behzod.
Fixes #45323.
Built from https://develop.svn.wordpress.org/trunk@44592


git-svn-id: http://core.svn.wordpress.org/trunk@44423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 02:08:49 +00:00
Gary Pendergast 4f861b9548 Coding Standards: Fix the `Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace` violations.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:40:50 +00:00
Gary Pendergast 6d5cd6842a Coding Standards: Document intentional `case` block fall-throughs.
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:26:50 +00:00
desrosj 4818f7e3f7 Administration: Update default fallback color for SVG icons.
Currently, when an SVG is used as a menu icon, the color is inconsistent with the other, default dashicons and the contrast ratio does not meet the minimum requirement for accessibility.

This updates the base color for the default `fresh` color scheme to ensure consistency and proper contrast.

Props swift, dschalk.
Fixes #44209.
Built from https://develop.svn.wordpress.org/trunk@44353


git-svn-id: http://core.svn.wordpress.org/trunk@44183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 19:01:48 +00:00
Jeremy Felt f93e24ca8e REST API: Render response in user locale with `?_locale=user`.
Introduces new `determine_locale()` function for deciding the proper locale to use for a response. Default value is `get_user_locale()` in the admin, and `get_locale()` on the frontend. Because REST API requests are considered frontend requests, `?_locale=user` can be used to render the response in the user's locale.

Also updates `wp-login.php?wp_lang` implementation to benefit from this abstraction.

Merges [43776] from the 5.0 branch to trunk.

Props flixos90, mnelson4, swissspidy, TimothyBlynJacobs.
Fixes #44758.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 01:32:39 +00:00
desrosj cf6e69ee9f General: Extract the code editor settings from `wp_enqueue_code_editor()`.
They're now returned by a new function, `wp_get_code_editor_settings()`, so they can be reused by the block editor.

Props pento.

Merges [43761] to trunk.

Fixes #45127.
Built from https://develop.svn.wordpress.org/trunk@44121


git-svn-id: http://core.svn.wordpress.org/trunk@43951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:24:33 +00:00
Peter Wilson 481e5f4b36 Multisite: Improve messaging for previously activated users.
Ensure activation of a site is not attempted multiple times and users are shown the correct message if they follow the link a second time.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 00:23:24 +00:00
Sergey Biryukov dafee9fae6 Date/Time: Make `get_the_date()` call `get_post_time()` for consistency with `get_the_time()`.
Props Rarst.
Fixes #44490.
Built from https://develop.svn.wordpress.org/trunk@43591


git-svn-id: http://core.svn.wordpress.org/trunk@43420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-30 08:50:24 +00:00
John Blackbourn 47d32decd6 Docs: Correct and improve various inline documentation.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@43411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-27 14:28:26 +00:00
Gary Pendergast 56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast 0db068da94 Emoji: Update Twemoji to version 11.0.
{U+01F9B9}

Props kraftbj,
Fixes #44339.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:42:55 +00:00
Dominik Schilling 31a4369366 Template: Make sure the version string is correctly escaped for use in attributes.
Built from https://develop.svn.wordpress.org/trunk@42893


git-svn-id: http://core.svn.wordpress.org/trunk@42723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 14:59:31 +00:00
Dominik Schilling 5c291d49de Pinking shears.
See #41057.
Built from https://develop.svn.wordpress.org/trunk@42843


git-svn-id: http://core.svn.wordpress.org/trunk@42673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:23:33 +00:00
Sergey Biryukov 4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
Sergey Biryukov b0ddd7ca43 Docs: Add description for `register_admin_color_schemes()`.
Props terriann, danieltj.
Fixes #42779.
Built from https://develop.svn.wordpress.org/trunk@42765


git-svn-id: http://core.svn.wordpress.org/trunk@42595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 03:28:31 +00:00
Sergey Biryukov 0a97d79899 Comments: Avoid a PHP notice in `paginate_comments_links()` if `type` argument is set to array.
The function is a wrapper for `paginate_links()`, which returns an array if requested.

Props anantajitjg.
Fixes #43299.
Built from https://develop.svn.wordpress.org/trunk@42703


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

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


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

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


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


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

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

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


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


git-svn-id: http://core.svn.wordpress.org/trunk@42358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 14:43:31 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
John Blackbourn 3713ac5ebc Hardening: Add escaping to the language attributes used on `html` elements.
Built from https://develop.svn.wordpress.org/trunk@42259


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

See #41057.


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


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

Props ocean90, afercia

Fixes #42242

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


git-svn-id: http://core.svn.wordpress.org/trunk@42049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:04:46 +00:00
Weston Ruter 226263bfec Code Editor: Define default `gutters` and toggle lint markers based on changes to `lint` option.
Explicitly define `gutters` in base `defaultSettings` to improve merges of multiple calls to `wp_enqueue_code_editor()`.

Props westonruter, georgestephanis for testing.
Amends [41974].
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 16:35:54 +00:00
Weston Ruter 0343b1a2c8 Code Editor: Keep linting and its error reporting configured when `lint` option is changed dynamically.
Also explicitly disable `lint` option for SCSS and LESS.

See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 19:55:46 +00:00
Sergey Biryukov e29c2f560b Template: Introduce `readonly()` form helper to complement the `disabled()` helper added in [13658].
Props soulseekah.
Fixes #16886.
Built from https://develop.svn.wordpress.org/trunk@41728


git-svn-id: http://core.svn.wordpress.org/trunk@41562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 13:19:48 +00:00
Weston Ruter f0b5c39bde Customize: Introduce extensible code editor Customizer control for CodeMirror.
* Adds `WP_Customize_Code_Editor_Control` and `wp.customize.CodeEditorControl()`.
* Control respects user preference for syntax highlighting, showing a textarea when user opts out.
* Code editor control takes the ad hoc code for Additional CSS and makes it reusable and extensible, for Additional CSS in core and plugins to use (such as Jetpack).
* Replace `settings` arg in `wp_enqueue_code_editor()` with separate args for `codemirror`, `csslint`, `jshint`, and `htmlhint`.
* Prefix `codemirror` script and style handles with `wp-` to prevent collisions, as also the object is exported as `wp.CodeMirror` in JS.
* Reduce indent size in Customizer code editor instances and Custom HTML widget to use tab size of 2 instead of 4 to save on space.

See #12423, #38707, #35395.
Fixes #41897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-21 23:04:45 +00:00
Weston Ruter 90bedf8f9d Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion.
* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892.
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.

Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707.
Fixes #12423, #39892.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-13 06:08:47 +00:00
Andrea Fercia 6fc55cad3a Allow usage of `aria-current` in `paginate_links()`.
The `aria-current` attribute is a simple, effective way to help assistive
technology users orientate themselves within a list of items.

Props GrahamArmfield, palmiak.
Fixes #40833.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-11 14:29:44 +00:00
John Blackbourn 41f71598f7 Formatting: Introduce `get_the_post_type_description()` to allow post type archive descriptions to be formatted the same as author and term archives.
Props henry.wright

Fixes #40040

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


git-svn-id: http://core.svn.wordpress.org/trunk@41072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 23:01:44 +00:00
John Blackbourn 1d71fa865c Login and Registration: Correctly encode the redirect location URL when it's passed as a query parameter to the lost password URL.
Props adhun

Fixes #40728

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


git-svn-id: http://core.svn.wordpress.org/trunk@40961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 01:06:42 +00:00
Drew Jaynes 5fa2de51ef General: Ensure `$description` gets initialized in `get_the_archive_description()` if the post type archive conditional is true and the description isn't set.
Props henrywright.
See #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:23:41 +00:00
Drew Jaynes d6f7788935 Remove an unnecessary initialization of `$description` due to the else condition in `get_the_archive_description()`.
See [40976]. See #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:19:41 +00:00
Drew Jaynes f6b5c794bf General: Add support for the post type archive description to `get_the_archive_description()`, and thereby also `the_archive_description()`.
Props henrywright.
Fixes #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:15:46 +00:00
Sergey Biryukov d08982bdbc Docs: Remove inaccurate parts of `get_header`, `get_footer`, and `get_sidebar` hooks documentation.
These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.

Props desrosj.
Fixes #40892.
Built from https://develop.svn.wordpress.org/trunk@40955


git-svn-id: http://core.svn.wordpress.org/trunk@40805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 20:56:42 +00:00
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
Konstantin Obenland c69e96422b Themes: Improve document title output.
Introduces more flexibility in filtering all parts of the document title,the
separator, and a way to short-circuit title generation. Plugins can now also
check for theme support and reliably filter the entire output. See #18548.
Deprecates `wp_title()`.

Fixes #31078.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 16:21:25 +00:00
Sergey Biryukov 426944c744 Replace `get_bloginfo( 'wpurl' )` with `site_url()` in `rsd_link()`.
Ensure the correct scheme is used for the `application/rsd+xml` link URL.

Props johnbillion.
See #34280.
Built from https://develop.svn.wordpress.org/trunk@35105


git-svn-id: http://core.svn.wordpress.org/trunk@35070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 01:49:26 +00:00
John Blackbourn 00388a1dbf Add missing `@since` params and update the docs for `site_icon_url()` and `has_site_icon()`.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@35055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 23:28:24 +00:00
Drew Jaynes 61115eac58 Docs: Improve documentation for `get_site_icon_url()`, introduced in [32994].
Adds a missing `@since` version, fixes optional parameter syntax, adds default values, and fixes the return description.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:38:24 +00:00
John Blackbourn 939ef7887e `shttp` is not a protocol.
See #27115

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


git-svn-id: http://core.svn.wordpress.org/trunk@34749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:48:26 +00:00
John Blackbourn 815635548a Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115

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


git-svn-id: http://core.svn.wordpress.org/trunk@34748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:46:28 +00:00
Drew Jaynes 1d86c9c1ed Docs: Move the hook doc to once again directly precede the hook line for the `getarchives_where` filter following [34686].
See #21596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 06:39:25 +00:00
Scott Taylor eeb539e90f Allow `wp_get_archives()` to accept `post_type` as an arg.
Adds unit test.

Fixes #21596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 05:11:24 +00:00
Scott Taylor ffb8ae1a63 Date/Time: Add unit tests for `the_date()`.
Props jubstuff.
Fixes #33750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 03:34:24 +00:00
Scott Taylor a2914473cc Calendar Widget: remove the `title` attribute for days and replace with `aria-label`. Spruce up some of this nasty code. Delete unnecessary bits.
Props wonderboymusic, elusiveunit, 5um17. 
Fixes #30297.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-23 23:57:27 +00:00
Scott Taylor 84da11d918 Pass `false` as the 2nd argument to `class_exists()` to disable autoloading and to not cause problems for those who define `__autoload()`.
Fixes #20523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Scott Taylor 518404a166 Site Icon: for consistency, make all 4 HTML tags in `wp_site_icon()` self-closing.
Props Corphi.
Fixes #33930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 19:07:27 +00:00