Commit Graph

9838 Commits

Author SHA1 Message Date
Rachel Baker cdce9d5dac REST API: Allow comments to be created setting the user_agent parameter.
As of WordPress 4.3 the `wp_new_comment()` function has been updated to allow the comment_agent value to be set when a comment is created. The comments API endpoint now allows the comment author's user agent to be set when creating a comment.
Also, the `readonly` property on the `author_user_agent` parameter in the schema was removed.

Props rabmalin for the initial patch.
Fixes #38425.
Built from https://develop.svn.wordpress.org/trunk@38864


git-svn-id: http://core.svn.wordpress.org/trunk@38807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 18:28:32 +00:00
Dominik Schilling 6c8508023f Revert [38859] due to an incomplete implementation.
See https://core.trac.wordpress.org/ticket/37128#comment:27.
See #37128.
Built from https://develop.svn.wordpress.org/trunk@38863


git-svn-id: http://core.svn.wordpress.org/trunk@38806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 17:01:32 +00:00
Weston Ruter 2e173f9e44 Customize: Revert part of [38859] which caused sections to get deactivated in the customizer.
See #37128.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 16:17:41 +00:00
John Blackbourn e099b4d947 Role/Capability: Add tests for the `exist` user capability.
See #38236

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


git-svn-id: http://core.svn.wordpress.org/trunk@38804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 14:12:32 +00:00
John Blackbourn 16ccab2ef9 Role/Capability: Improve the test which asserts that a user can edit their own profile.
All users can edit their own profile, as this ability is not linked to an explicit capability. Technically, it should map to the `exist` capability, which will be addressed at a later date.

See #31518 

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


git-svn-id: http://core.svn.wordpress.org/trunk@38803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 13:47:33 +00:00
Pascal Birchler f54558e75b General: Introduce a `wp_list_sort()` helper function.
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.
Built from https://develop.svn.wordpress.org/trunk@38859


git-svn-id: http://core.svn.wordpress.org/trunk@38802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 11:12:51 +00:00
Gary Pendergast 7d9563801a Tests: Use a minimal theme for tests.
New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.

This change also removes the old workarounds for default themes.

Fixes #31550.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 11:03:39 +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
Pascal Birchler badf0925a8 I18N: Improve "Site Language" label for per-user language selection.
Renames the label to "Language" and adds an explanation of the feature to the help tab.

Props johnbillion, jorbin.
Fixes #38344.
Built from https://develop.svn.wordpress.org/trunk@38856


git-svn-id: http://core.svn.wordpress.org/trunk@38799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:41:51 +00:00
Pascal Birchler f88c248a52 Themes: After [38788], further improve the update button when there's no update package.
Prevents running shiny install when no package exists.


Fixes #37774.
Built from https://develop.svn.wordpress.org/trunk@38855


git-svn-id: http://core.svn.wordpress.org/trunk@38798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:36:46 +00:00
Pascal Birchler 11a13f147b List Tables: Do not show filter button when there are no filter options available.
Props juhise, dipesh.kakadiya, swissspidy.
Fixes #37407.
Built from https://develop.svn.wordpress.org/trunk@38854


git-svn-id: http://core.svn.wordpress.org/trunk@38797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:33:54 +00:00
Weston Ruter 4ba392975a Customize: Add sticky headers for panels and sections.
Includes autoprefixing of CSS.

Props delawski, celloexpressions.
See #35186.
Fixes #34343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 06:37:30 +00:00
Gary Pendergast 16f0c6877e Pings: Allow ping functions to accept `WP_Post` objects as well as post IDs.
This removes the use of several `global $wpdb` instances, as well as bringing the ping functions into line with other post-related functions, which will accept a post ID or `WP_Post` object.

Props dshanke.
Fixes #38202.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 06:00:31 +00:00
Gary Pendergast 2e04d2a192 Tests: Prevent Twenty Seventeen from interfering with Customizer ajax tests.
Missed in [38850].

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 05:51:30 +00:00
Gary Pendergast 802736514b Tests: Prevent Twenty Seventeen from interfering with Customizer tests.
This was previously fixed in [38837], but it wasn't really the correct answer, to fix it in the theme. So, [38837] is reverted in this commit, and the Twenty Seventeen actions causing problems are unhooked before tests are run.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 05:28:31 +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
Aaron Jorbin 56dfed874f Build/Test Tools: Allow Minimal Builds
Builds can hang or get very slow on copy when you have alot of files. Alot of files can suddenly appear when you are developing new themes or plugins. Often, it's nice to have a minimal build, especially if you are preparing a commit.

This adds a new flag `--minimal-copy` that can be added to any task which does a copy. These tasks include build, test, and copy. This flag will cause no plugins to be copied and only the twenty series of default themes to be copied. Everything else remains the same.

Fixes #38423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 22:24:40 +00:00
David A. Kennedy 8cfe2973d3 Twenty Seventeen: Replace inline control structure to improve code readability
Props vrundakansara, aaroncampbell.

Fixes #38384.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 22:18:29 +00:00
David A. Kennedy 89b20fcf8f Twenty Fifteen, Twenty Seventeen: Add documentation to filters in themes.
Documents a missing one Twenty Fifteen and all four missing ones in Twenty Seventeen.

Props brainstormforce.

Fixes #38382.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 20:34:31 +00:00
Boone Gorges 3dc7e8a97c Comments: Fix description for `reverse_top_level` argument in `wp_list_comments()`.
It's a boolean, not a string. Introduced in [25567].

Props bcole808.
Fixes #38371.
Built from https://develop.svn.wordpress.org/trunk@38845


git-svn-id: http://core.svn.wordpress.org/trunk@38788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:59:29 +00:00
Boone Gorges bcc26664ed Query: Allow the prefix used for search term exclusion to be filtered.
[38792] allowed `WP_Query`'s hyphen-as-exclusion-prefix feature to be
disabled via filter. A more general solution is to allow the prefix to
be filtered; returning an empty value from a filter callback works to
disable the feature.

Props dlh.
Fixes #38099.
Built from https://develop.svn.wordpress.org/trunk@38844


git-svn-id: http://core.svn.wordpress.org/trunk@38787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:42:29 +00:00
Boone Gorges 2265f1a07e Tests: Skip `strip_invalid_text()` test for big5 charset on MariaDB.
MariaDB doesn't support the tested configuration.

Props ocean90.
Fixes #33171.
Built from https://develop.svn.wordpress.org/trunk@38843


git-svn-id: http://core.svn.wordpress.org/trunk@38786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:30:31 +00:00
Gary Pendergast 89544cc03d Tests: Fix ajax tests that fail when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 10:48:40 +00:00
Gary Pendergast bf5d081fe4 Twenty Seventeen: Remove some whitespace accidentally introduced in [38837].
See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:27:32 +00:00
John Blackbourn 7696a3a8c6 oEmbed: Remove the oEmbed provider unit tests.
This reverts [38454] along with its follow-up commits, [38512], [38514], and [38692]. These tests are currently not pass
ing, and maybe they never will. The tests are in a group which does not run by default without a flag, making them quest
ionably useful.

We can re-visit this at a later date.

See #32360

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


git-svn-id: http://core.svn.wordpress.org/trunk@38783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:16:30 +00:00
Gary Pendergast 0e0af249be Themes: Twenty Seventeen is now the default theme.
It's party time!

Fixes #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:13:29 +00:00
Gary Pendergast 2ac1c4cc92 Tests: Fix tests that don't pass when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:07:29 +00:00
Gary Pendergast 35186cff65 Twenty Seventeen: Fix a PHP warning on fresh installs.
When setting the `transport` parameter on Customizer settings, we need to ensure the setting exists, particularly on new sites.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:04:31 +00:00
Gary Pendergast e51531a425 Build: Ignore JSHint errors in Twenty Seventeen's third party libraries.
`html5.js` and `jquery.scrollTo.js` are external libraries, so don't need to be checked by JSHint.

Props kadamwhite.
Fixes #38376.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:44:30 +00:00
Rachel Baker 6b46336251 REST API: Fix comment option leak causing another test failure.
Set the 'comment_whitelist' option back to the default when tearing down wpAllowComment tests.

See #38373.
Built from https://develop.svn.wordpress.org/trunk@38835


git-svn-id: http://core.svn.wordpress.org/trunk@38778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:25:29 +00:00
Rachel Baker 6a94e72369 REST API: Fix test failures.
- Fix leak in setup_notify_comment() test help by removing the comment_flood_filter.
- Correct uses of $term_taxonomy_id -> $term_id in Category and Tags routing.
- Temporarily remove the metadata tests for canola.jpg as that file does not have an exifdata.  Will need to update the test.

Props jorbin, rmccue, nacin
See #38373.
Built from https://develop.svn.wordpress.org/trunk@38834


git-svn-id: http://core.svn.wordpress.org/trunk@38777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:13:29 +00:00
David A. Kennedy 7fbb094586 Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen

Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.

See #38372.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 04:12:31 +00:00
Rachel Baker e4a7c0a397 REST API: Introduce the Content API endpoints.
REST API endpoints for your WordPress content. These endpoints provide machine-readable external access to your WordPress site with a clear, standards-driven interface, allowing new and innovative apps for interacting with your site. These endpoints support all of the following:
- Posts: Read and write access to all post data, for all types of post-based data, including pages and media.
- Comments: Read and write access to all comment data. This includes pingbacks and trackbacks.
- Terms: Read and write access to all term data.
- Users: Read and write access to all user data. This includes public access to some data for post authors.
- Meta: Read and write access to metadata for posts, comments, terms, and users, on an opt-in basis from plugins.
- Settings: Read and write access to settings, on an opt-in basis from plugins and core. This enables API management of key site content values that are technically stored in options, such as site title and byline.

Love your REST API, WordPress!  The infrastructure says, "Let's do lunch!" but the content API endpoints say, "You're paying!"

Props rmccue, rachelbaker, danielbachhuber, joehoyle, adamsilverstein, afurculita, ahmadawais, airesvsg, alisspers, antisilent, apokalyptik, artoliukkonen, attitude, boonebgorges, bradyvercher, brianhogg, caseypatrickdriscoll, chopinbach, chredd, christianesperar, chrisvanpatten, claudiolabarbera, claudiosmweb, cmmarslender, codebykat, coderkevin, codfish, codonnell822, daggerhart, danielpunkass, davidbhayes, delphinus, desrosj, dimadin, dotancohen, DrewAPicture, Dudo1985, duncanjbrown, eherman24, eivhyl, eliorivero, elyobo, en-alis, ericandrewlewis, ericpedia, evansobkowicz, fjarrett, frozzare, georgestephanis, greatislander, guavaworks, hideokamoto, hkdobrev, hubdotcom, hurtige, iandunn, ircrash, ironpaperweight, iseulde, Japh, jaredcobb, JDGrimes, jdolan, jdoubleu, jeremyfelt, jimt, jjeaton, jmusal, jnylen0, johanmynhardt, johnbillion, jonathanbardo, jorbin, joshkadis, JPry, jshreve, jtsternberg, JustinSainton, kacperszurek, kadamwhite, kalenjohnson, kellbot, kjbenk, kokarn, krogsgard, kuchenundkakao, kuldipem, kwight, lgedeon, lukepettway, mantismamita, markoheijnen, matrixik, mattheu, mauteri, maxcutler, mayukojpn, michael-arestad, miyauchi, mjbanks, modemlooper, mrbobbybryant, NateWr, nathanrice, netweb, NikV, nullvariable, oskosk, oso96_2000, oxymoron, pcfreak30, pento, peterwilsoncc, Pezzab, phh, pippinsplugins, pjgalbraith, pkevan, pollyplummer, pushred, quasel, QWp6t, schlessera, schrapel, Shelob9, shprink, simonlampen, Soean, solal, tapsboy, tfrommen, tharsheblows, thenbrent, tierra, tlovett1, tnegri, tobych, Toddses, toro_unit, traversal, vanillalounge, vishalkakadiya, wanecek, web2style, webbgaraget, websupporter, westonruter, whyisjake, wonderboymusic, wpsmith, xknown, zyphonic.
Fixes #38373.
Built from https://develop.svn.wordpress.org/trunk@38832


git-svn-id: http://core.svn.wordpress.org/trunk@38775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 02:55:32 +00:00
John Blackbourn f5a3446e4d Customize: Improve the labelling of background and header images in the list mode of the media library.
Props deltafactory, coreymcollins, desrosj
Fixes #22857

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


git-svn-id: http://core.svn.wordpress.org/trunk@38774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 23:03:31 +00:00
Weston Ruter 8abba71d47 Customize: Fix unit tests when `twentyfifteen` is `WP_DEFAULT_THEME` instead of `twentysixteen`.
Use an inactive core theme for previewing theme switch instead of assuming `twentysixteen` is installed and active and `twentyfifteen` is not.

See #30937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 19:39:31 +00:00
Weston Ruter 1ccd9e7a6c Customize: Introduce custom CSS for extending theme styles.
* Custom CSS is associated with a given theme and is displayed in an inline `style` element at the `wp_head` hook after the `wp_print_styles` is called so that it overrides any enqueued stylesheets.
* A `wp_get_custom_css()` function is used for accessing the CSS associated with the current theme (or another theme) and a `wp_get_custom_css` filter for manipulating it.
* CSS is managed in customizer via a new "Additional CSS" section with a single `textarea` control. 
* `WP_Customize_Section::$description_hidden` is introduced for hiding extended descriptions in customizer sections behind a help toggle as done with panels.
* CSS is stored in a `custom_css` post type with the theme (stylesheet) slug as the `post_name`.
* `WP_Customize_Custom_CSS_Setting` is introduced to handle validation of CSS, previewing, and persisting the CSS to the `custom_css` post type.
* The `custom_css` setting is tied to a new `unfiltered_css` capability which maps to `unfiltered_html` by default.
* Escaping the message in the notification template is removed to allow markup (`code` tags) to be rendered.

See https://make.wordpress.org/core/2016/10/11/feature-proposal-better-theme-customizations-via-custom-css-with-live-previews/

Props johnregan3, celloexpressions, folletto, westonruter.
Fixes #35395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 18:15:31 +00:00
Sergey Biryukov ec5782bed5 Docs: Fix typo in `in_category()` description.
Props Kenshino, mbootsman.
Fixes #38363.
Built from https://develop.svn.wordpress.org/trunk@38828


git-svn-id: http://core.svn.wordpress.org/trunk@38771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 13:46:44 +00:00
Pascal Birchler e4d7dd2b8a Upgrade/Install: Refresh update counts after page load.
By enqueuing the updates script in the footer and passing the number of available updates to it after page load, the update bubbles will be more accurate.

Props ocean90, swissspidy.
Fixes #13071.
Built from https://develop.svn.wordpress.org/trunk@38827


git-svn-id: http://core.svn.wordpress.org/trunk@38770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 10:27:29 +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
Pascal Birchler 39433ad092 Dashboard: Do not show 'Popular Plugin' UI if `DISALLOW_FILE_MODS` is set.
Props Mte90.
Fixes #37436.
Built from https://develop.svn.wordpress.org/trunk@38825


git-svn-id: http://core.svn.wordpress.org/trunk@38768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 08:44:30 +00:00
Jeremy Felt 64886517b9 Multisite: Replace `get_blog_details()` with `get_site()` in network admin screens.
Props iamfriendly.
See #37102.
Fixes #38349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 06:08:28 +00:00
Jeremy Felt f2ad579440 Multisite: Replace `get_blog_details()` in `wp-admin/my-sites.php` with `get_site()`.
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 06:02:29 +00:00
Jeremy Felt 325c7411fc Multisite: Replace `get_blog_details()` in `/wp-admin/ms-delete-site.php` with `get_site()`.
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38347.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:54:29 +00:00
Jeremy Felt 7eece8b106 Multisite: Replace `get_blog_details()` usage in `wpmu_delete_blog()` with `get_site()`.
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:50:28 +00:00
Jeremy Felt be6e98426b Multisite: Replace `get_blog_details()` in `WP_Importer::set_blog()` with `get_site()`.
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:45:31 +00:00
Jeremy Felt 4d44eeadd6 Multisite: Use correct types in `get_sites()` during network upgrade.
`spam`, `deleted`, and `archived` query args should be integers, not strings.

Props ocean90.
See #37823.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:11:28 +00:00
Jeremy Felt 432d90050b Multisite: Add `$network_id` parameter to hooks in `delete_network_option()`.
Props flixos90.
Fixes #38322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:02:29 +00:00
Jeremy Felt eb382b29ae Multisite: Add `$network_id` parameter to hooks in `update_network_option()`.
Props flixos90.
Fixes #38321.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:00:29 +00:00
Jeremy Felt 213a0a2477 Multisite: Add $network_id parameter to hooks in `add_network_option()`.
Props flixos90.
Fixes #38320.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:56:28 +00:00
Jeremy Felt df6675d1ec Multisite: Add `$network_id` parameter to filters in `get_network_option()`.
Props flixos90.
Fixes #38319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:54:29 +00:00
Jeremy Felt 1560fbcbc5 Multisite: Use `get_network()` and `get_current_network_id()` for current network data.
`get_network()` falls back to the current network when called without any arguments. Between this and `get_current_network_id()`, we can replace almost all instances of the global `$current_site` and all instances of `get_current_site()`.

This effectively deprecates `get_current_site()`, something that we'll do in a future ticket.

Props flixos90.
Fixes #37414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:47:30 +00:00
Weston Ruter 1c3b96537f Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context.

For details, see https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/

Fixes #37661, #34843.
Props celloexpressions, folletto, westonruter, karmatosed, afercia.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:20:29 +00:00
Joe McGill 8ed022b568 Media: Remove `alt` fallbacks to improve accessibility.
This removes the fallbacks in `wp_get_attachment_image()` and in
`wp.media.string.props` which attempt to generate an `alt` value
from the image caption or title if an `alt` attribute isn't explicitly
set.

This allows for image HTML to be generated that contains an empty `alt`
value, i.e., `alt=""` which is much preferable for screen readers than
reading redundant content in the case of a caption, or when reading the
image title, which is often generated from the filename and not helpful
as `alt` text.

Props odie2, joedolson, rianrietveld, afercia, iamjolly, joemcgill.
Fixes #34635.
Built from https://develop.svn.wordpress.org/trunk@38812


git-svn-id: http://core.svn.wordpress.org/trunk@38755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:06:28 +00:00
Weston Ruter e8bd9645df Customize: Split out link `click.preview` and form `submit.preview` event handlers from anonymous functions into named methods on `wp.customize.Preview` for extensibility.
See #30937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 02:06:30 +00:00
Weston Ruter f1ba1918c9 Customize: Implement customized state persistence with changesets.
Includes infrastructure developed in the Customize Snapshots feature plugin.

See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/

Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin.
See #28721.
See #31089.
Fixes #30937.
Fixes #31517.
Fixes #30028.
Fixes #23225.
Fixes #34142.
Fixes #36485.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-18 20:05:31 +00:00
Gary Pendergast f6d85de626 Charset: Allow `_canonical_charset()` to handle mixed-case strings.
Add improved unit tests, and collect existing unit tests together.

Props pbearne.
Fixes #38337.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 23:54:30 +00:00
Andrew Ozz f76fa00288 TinyMCE wplink:
- Remove the calls to getBookmark() and moveToBookmark() in IE. This is handled automatically when blurring and focusing the editor.
- When inserting a link, move it out of the caret position element. If not, it may be removed with that element on clean-up before save.

Fixes #38335.
Built from https://develop.svn.wordpress.org/trunk@38808


git-svn-id: http://core.svn.wordpress.org/trunk@38751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 20:01:31 +00:00
Weston Ruter 11cb0c06a7 Customize: Skip triggering initial click on pages section for available nav menu items if already open.
Fixes race condition if user opens Pages section before the ajax request to load items finishes.

Props ryankienstra, celloexpressions.
Fixes #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 16:23:28 +00:00
Aaron Jorbin 969e4255a9 REST API: Include `Vary: Origin` in cors headers
`vary: origin` is a W3 CORS implementation recommendation( https://www.w3.org/TR/cors/#resource-implementation ). It's used by default in frameworks such as hapi and Laravel-cors. Overall, it helps sites siting behind a cache such as varnish.

Fixes #38060.
Props procodewp, pdufour for research.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 16:11:30 +00:00
Pascal Birchler 1e54943b0f Docs: Improve documentation for `install_plugin_install_status()`.
Props clarionwpdeveloper, sudar.
Fixes #36912.
Built from https://develop.svn.wordpress.org/trunk@38805


git-svn-id: http://core.svn.wordpress.org/trunk@38748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 08:30:29 +00:00
Pascal Birchler ffdef38f5b Date/Time: Remove some legacy logic in `date_i18n()`.
Since there's no difference between using `date()` and `gmdate()` in WordPress, we can simply use the former in `date_i18n()` to reduce its complexity.

Adds tests.

Props jdgrimes for initial patch.
Fixes #37910.
Built from https://develop.svn.wordpress.org/trunk@38804


git-svn-id: http://core.svn.wordpress.org/trunk@38747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 08:10:30 +00:00
Andrew Ozz 4996d05355 TinyMCE:
- When editing pages, add body class with the page template, or `page-template-default`.
- Change the page template class when the users select another template, similarly to changing the post type class for posts.

Props webmandesign.
Fixes #37599.
Built from https://develop.svn.wordpress.org/trunk@38803


git-svn-id: http://core.svn.wordpress.org/trunk@38746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 01:10:28 +00:00
John Blackbourn 374a079746 Role/Capability: Disregard the order of capabilities when testing that single site and multisite capability tests match.
See #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 23:36:28 +00:00
Andrew Ozz c388eeca8d TinyMCE: restore the monospace font in textareas in the TinyMCE UI. Make it same as in the Text editor.
Fixes #38125.
Built from https://develop.svn.wordpress.org/trunk@38801


git-svn-id: http://core.svn.wordpress.org/trunk@38744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 22:51:28 +00:00
Andrea Fercia 7be7d396f1 Editor: Add a role `button` to the Tags meta box tag cloud links.
For better accessibility, the tag cloud links in the Tags meta box should be
reported to assistive technologies as buttons. They don't navigate to a new
resource, instead they perform an action.

Fixes #38318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 20:09:28 +00:00
Andrea Fercia 8aef143d80 Menus: Fix the posts-categories quick search.
On the Menus screen, events that trigger the posts-categories search need to be
delegated. This "boxes" may get dynamically rebuilt so events directly attached
to the search input field need to be delegated.

Fixes #38324.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 20:03:29 +00:00
Sergey Biryukov 4a95bfa4c2 Docs: In `get_pages()` and `wp_list_pages()`, note that `post_status` argument can also be an array.
Adjust the alignment of default argument values for better readability.

Props birgire, desrosj.
Fixes #38136.
Built from https://develop.svn.wordpress.org/trunk@38798


git-svn-id: http://core.svn.wordpress.org/trunk@38741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 01:10:31 +00:00
Andrew Ozz d91da52588 Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Andrew Ozz e2e22580db TinyMCE:
- Prevent applying Indent and Outdent while an image with a caption is selected. It doesn't do anything and breaks the caption elements.
- Keep all of the text when a caption `<dl>` was somehow changed.

Fixes #38313.
Built from https://develop.svn.wordpress.org/trunk@38796


git-svn-id: http://core.svn.wordpress.org/trunk@38739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:38:28 +00:00
Andrea Fercia da4da31af1 Administration: Better consistency for the Media, Add Plugins, and Add Themes toolbars.
Fixes the Add Themes toolbar padding. Standardizes the placeholders to no title
case and three trailing dots. Expands the Media search placeholder in
"Search media items..." for consistency with the Plugins and Themes toolbars.

Props mikeviele, jamesacero, mattking5000, koenschipper, dungengronovius.

Fixes #38010.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:33:28 +00:00
Weston Ruter 07b97c1d57 Customize: Move Pages below Custom Links in available nav menu items panel.
Props ryankienstra, celloexpressions.
See #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:21:28 +00:00
Andrew Ozz 2f45415c73 Media modal: make it possible to reorder images by dragging on devices with both touch screen and mouse support.
Props adamsilverstein.
Fixes #31652.
Built from https://develop.svn.wordpress.org/trunk@38793


git-svn-id: http://core.svn.wordpress.org/trunk@38736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 20:29:28 +00:00
Boone Gorges 9783a3df6b Query: Allow the hyphen-prefix-for-search-exclusion feature to be disabled by filter.
WordPress 4.4 introduced "hyphen exclusion" for search terms, so that
"foo -bar" would return posts containing "foo" AND not containing "bar".
The new filter 'wp_query_use_hyphen_for_exclusion' allows developers
to disable this feature when it's known that their content will contain
semantically important leading hyphens.

Props chriseverson, choongsavvii.
Fixes #38099.
Built from https://develop.svn.wordpress.org/trunk@38792


git-svn-id: http://core.svn.wordpress.org/trunk@38735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 20:06:28 +00:00
Rachel Baker 8cbb988196 Pings/Trackbacks: Add new `pre_trackback_post` action before a trackback is added to a post.
Props dshanske, rachelbaker.
Fixes #37007.
Built from https://develop.svn.wordpress.org/trunk@38791


git-svn-id: http://core.svn.wordpress.org/trunk@38734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 19:39:28 +00:00
Rachel Baker a6f0fb6d2a REST API: Support sites with index-style permalinks in `get_rest_url()`.
Support the index-style permalinks (http://example.com/index.php/postName) when registering the REST API rewrite rules and within the `get_rest_url()` function. This allows sites that do not have mod_rewrite support to have almost pretty urls and have access to their REST API endpoints.

Props kraftbj.
Fixes #38182.
Built from https://develop.svn.wordpress.org/trunk@38790


git-svn-id: http://core.svn.wordpress.org/trunk@38733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 19:30:29 +00:00
John Blackbourn afff60c378 Themes: Improve the inline documentation for the `get_*_template()` functions by providing examples instead of verbose explanations.
Fixes #38249
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 14:20:29 +00:00
Pascal Birchler a60ac4684b Themes: Do not show an update button if there's no update package.
This updates the list view to match the existing behaviour in the single theme modal.

Props tristangemus for initial patch.
Fixes #37774.
Built from https://develop.svn.wordpress.org/trunk@38788


git-svn-id: http://core.svn.wordpress.org/trunk@38731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 13:33:29 +00:00
John Blackbourn dec7dd74ea Users: Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name.
Props procodewp, choongsavvii
Fixes #38234

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


git-svn-id: http://core.svn.wordpress.org/trunk@38730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 12:05: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
Gary Pendergast 456f8015b7 KSES: Deprecate `wp_kses_js_entities()`.
This function was originally introduced to fix an XSS attack in Netscape 4, which never affected any other browsers, or later versions of Netscape.

I'm willing to go out on a limb, and say that we've officially dropped security support for Netscape 4.

Props dmsnell, desrosj.
Fixes #33848.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-13 22:25:31 +00:00
Boone Gorges acd764a1d3 Taxonomy: Cache results of term count queries.
Fixes #38295.
Built from https://develop.svn.wordpress.org/trunk@38784


git-svn-id: http://core.svn.wordpress.org/trunk@38727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 15:30:31 +00:00
Boone Gorges 9935b60e72 Comments: When checking comments, returned error object should include HTTP status code.
The status code in the `WP_Error` `data` array is needed to send
headers in wp-comments-post.php, and was erroneously not included in
[38778].

Props needle, websupporter.
Fixes #36901.
Built from https://develop.svn.wordpress.org/trunk@38783


git-svn-id: http://core.svn.wordpress.org/trunk@38726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 13:50:30 +00:00
Andrew Ozz 5f5c85c510 TinyMCE: prevent iOS Safari from expanding the iframe width beyond the container width.
Fixes #38289.
Built from https://develop.svn.wordpress.org/trunk@38782


git-svn-id: http://core.svn.wordpress.org/trunk@38725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 03:36:30 +00:00
Jeremy Felt a9290f631b Multisite: Clarify that `get_site_by_path()` does not return exact matches.
Props stevenlinx.
Fixes #38152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 01:10:29 +00:00
Andrew Ozz 61c95f84f6 TinyMCE: update the `charmap` plugin to the latest dev. version. Fixes problems with inserting white space characters.
Fixes #37936.
Built from https://develop.svn.wordpress.org/trunk@38780


git-svn-id: http://core.svn.wordpress.org/trunk@38723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 23:56:31 +00:00
Boone Gorges 220c0589da Taxonomy: Specify taxonomy when populating cached object terms.
[38776] introduced a call to `get_term()` using only the term ID. This
causes problems in cases where shared terms have not been split. Since
we have the taxonomy available, there's no harm in passing it along to
`get_term()`.

Props dd32.
See #37291.
Built from https://develop.svn.wordpress.org/trunk@38779


git-svn-id: http://core.svn.wordpress.org/trunk@38722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 04:06:28 +00:00
Boone Gorges 0bdfa2ab1e Comments: Abstract `die()` calls from comment submission routine.
Since 4.4, comment submission has been mostly abstracted into a function,
rather than being processed inline in wp-comments-post.php. This change
made it easier to write automated tests against the bulk of the comment
submission process. `wp_allow_comment()` remained untestable, however:
when a comment failed one of its checks (flooding, duplicates, etc),
`die()` or `wp_die()` would be called directly. This shortcoming posed
problems for any application attempting to use WP's comment verification
functions in an abstract way - from PHPUnit to the REST API.

The current changeset introduces a new parameter, `$avoid_die`, to the
`wp_new_comment()` stack. When set to `true`, `wp_new_comment()` and
`wp_allow_comment()` will return `WP_Error` objects when a comment check
fails. When set to `false` - the default, for backward compatibility -
a failed check will result in a `die()` or `wp_die()`, as appropriate.

Prior to this changeset, default comment flood checks took place in the
function `check_comment_flood_db()`, which was hooked to the
'check_comment_flood' action. This design allowed the default comment
flood routine to be bypassed or replaced using `remove_action()`.
In order to maintain backward compatibility with this usage, while
simultaneously converting the comment flood logic into something that
returns a value rather than calling `die()` directly,
`check_comment_flood_db()` has been changed into a wrapper function for
a call to `add_filter()`; this, in turn, adds the *actual* comment flood
check to a new filter, 'wp_is_comment_flood'. Note that direct calls
to `check_comment_flood_db()` will no longer do anything in isolation.

Props websupporter, rachelbaker.
Fixes #36901.
Built from https://develop.svn.wordpress.org/trunk@38778


git-svn-id: http://core.svn.wordpress.org/trunk@38721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 03:43:28 +00:00
Dion Hulse f40c2a62a6 Taxonomy: Avoid a fatal error in `the_tags()` in the event that `get_the_term_list()` returns a WP_Error.
Props michalzuber.
See #37291.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 03:27:31 +00:00
Boone Gorges e97ab5362b Taxonomy: Better error handling when fetching object terms from cache.
Since [37573], `get_object_term_cache()` has expected term IDs to be
stored in the taxonomy relationship cache. The function would then
reach directly into the 'terms' cache to fetch the data corresponding
to a given term, before returning a `WP_Term` object. This caused
problems when, for one reason or another, term data was cached
inconsistently:

* If the 'terms' cache is empty for a given term ID, despite the earlier call to `_prime_term_caches()`, `get_term()` would return an error object.
* If the array of cached term IDs contains an invalid ID, `get_term()` would return an error object.

We avoid these errors by no longer touching the 'terms' cache directly,
but running term IDs through `get_term()` and allowing that function to
reference the cache (and database, as needed). If `get_term()` returns
an error object for any of the cached term IDs, `get_object_term_cache()`
will return that error object alone. This change ensures that upstream
functions, like `get_the_terms()`, return `WP_Error` objects in a
predictable fashion.

Props dd32, michalzuber.
Fixes #37291.
Built from https://develop.svn.wordpress.org/trunk@38776


git-svn-id: http://core.svn.wordpress.org/trunk@38719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 01:56:29 +00:00
Gary Pendergast 7c1cb69e7a XML-RPC: Re-add a `global $wpdb` missed in [38768].
See #37699.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 01:43:31 +00:00
Andrew Ozz af8eaef148 TinyMCE: add support for custom dashicon for wp.mce.View.setLoader().
Props procodewp.
Fixes #37900.
Built from https://develop.svn.wordpress.org/trunk@38774


git-svn-id: http://core.svn.wordpress.org/trunk@38717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 00:56:29 +00:00
Andrew Ozz cb966db094 TiinyMCE: update to 4.4.3, changelog: https://www.tinymce.com/docs/changelog/#version443-september12016
Fixes #38081, #38245, #37507, #37808 and #38000.
Built from https://develop.svn.wordpress.org/trunk@38773


git-svn-id: http://core.svn.wordpress.org/trunk@38716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 00:10:32 +00:00
Andrew Ozz c69916d57d Editor: do not send the request for releasing the post lock on unload when post_ID or active_post_lock is missing.
Props dlh, adamsilverstein.
Fixes #38271.
Built from https://develop.svn.wordpress.org/trunk@38772


git-svn-id: http://core.svn.wordpress.org/trunk@38715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 22:42:30 +00:00
Rachel Baker 84de4937b1 REST API: Remove reference to the plugin in infrastructure activation test.
Also adds class exists checks for WP_REST_Request and WP_REST_Response.

Props kraftbj.
Fixes #38279.
Built from https://develop.svn.wordpress.org/trunk@38771


git-svn-id: http://core.svn.wordpress.org/trunk@38714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 21:51:08 +00:00
Andrea Fercia 1905ea030a Accessibility: Improve the UI controls to move the Menu items.
On the Menus screen, the links to move menu items behave like buttons: they
perform an action so they should be real buttons to be correctly reported to
assistive technologies. Since they're logically grouped controls, they should
also be wrapped in a `<fieldset>` element for better semantics and accessibility.

Props Cheffheid.
Fixes #35578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 16:26:12 +00:00
John Blackbourn 35e1f5faa5 Role/Capability: Add tests for all user roles that check custom capabilities that do not have any form of handling (eg. in a `map_meta_cap` filter).
See #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 14:40:30 +00:00
Gary Pendergast af69f4ab1a General: Restore usage of `$wpdb`, instead of `$this->db`.
Hiding the `$wpdb` global behind a property decreases the readability of the code, as well as causing irrelevant output when dumping an object.

Reverts [38275], [38278], [38279], [38280], [38387].
See #37699.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 06:38:31 +00:00
Weston Ruter 2064e34833 Customize: Show Pages section first and pre-expanded in list of available nav menu items.
Props ryankienstra, westonruter.
Fixes #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 23:41:30 +00:00
Weston Ruter d6f9cb01d9 Customize: Improve message displayed in widgets panel when there are no widget areas currently displayed in the preview.
Props karmatosed, westonruter.
Fixes #36922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 21:09:31 +00:00
Weston Ruter 28795e8dc2 Customize: Ensure `customize_validate_{$setting->id}` filters apply on input post values for `WP_Customize_Setting` subclasses that neglect to apply the filter themselves.
Fixes #37638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 20:08:32 +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
John Blackbourn 45edc9ec57 Build/Test Tools: Continue eliminating randomness in tests.
See [38762]
See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:30:29 +00:00
John Blackbourn 72ccdfd70b Build/Test Tools: Begin eliminating unnecessary randomness in tests.
Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).

See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:12:31 +00:00
John Blackbourn 0b0868efc3 Build/Test Tools: Revert [38759]. PHPUnit's `@requires` syntax was introduced in PHPUnit 3.7, but the tests for PHP 5.2 use PHPUnit 3.6 because it's the latest version that supports PHP 5.2.
Fixes #38256

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


git-svn-id: http://core.svn.wordpress.org/trunk@38704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 22:43:31 +00:00
John Blackbourn 282864e2fc Media: Correct the hostname used in the `wp_get_attachment_metadata()` test.
See #36246

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


git-svn-id: http://core.svn.wordpress.org/trunk@38703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 12:05:30 +00:00
John Blackbourn 615b70b45f Build/Test Tools: Make use of PHPUnit's `@requires` notation.
Fixes #38256

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


git-svn-id: http://core.svn.wordpress.org/trunk@38702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:20:29 +00:00
John Blackbourn ebe86537ce HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests.
See #30017

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


git-svn-id: http://core.svn.wordpress.org/trunk@38701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:03:29 +00:00
John Blackbourn e82de0c7fb HTTP API: Convert the POST redirect test to use a dataProvider in order for its speed to be more accurately measured.
See #38237

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


git-svn-id: http://core.svn.wordpress.org/trunk@38700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 00:30:30 +00:00
Andrew Ozz 470c5a1f2a TinyMCE: Allow pasting in image captions. Remove blocks and insert `<br>` tags instead, also remove elements that would break the caption like other images, video, audio, etc.
See #36211.
Built from https://develop.svn.wordpress.org/trunk@38756


git-svn-id: http://core.svn.wordpress.org/trunk@38699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:41:29 +00:00
John Blackbourn c0f1a49575 Themes: Remove `paged.php` from the theme template hierarchy.
The position of this template within the hierarchy is of so little use that zero themes in the WordPress.org theme directory make use of it. It's second only to `index.php` in the hierarchy, meaning that any archive template such as `category.php` or `archive.php` will be chosen before it.

Fixes #38162
Props ryankienstra for initial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@38698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:03:31 +00:00
Dominik Schilling 5fd943f49c Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.
Built from https://develop.svn.wordpress.org/trunk@38754


git-svn-id: http://core.svn.wordpress.org/trunk@38697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:56:29 +00:00
Dominik Schilling 859498efd3 Taxonomy: On `wp-admin/term.php`, don't show a 'Back to' link which links to the current page.
Fixes #37573.
Built from https://develop.svn.wordpress.org/trunk@38753


git-svn-id: http://core.svn.wordpress.org/trunk@38696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:13:28 +00:00
Dominik Schilling 32516036db Taxonomy: Remove `paged` argument from referer and add it only if current page is greater than 1.
Props swissspidy.
See #38194.
Built from https://develop.svn.wordpress.org/trunk@38752


git-svn-id: http://core.svn.wordpress.org/trunk@38695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:06:28 +00:00
Aaron Jorbin a8802232ec Make sure rewrite rules are not written until `wp_loaded` has fired
If a plugin attempts to change the rewrite rules to early, other plugins may have their rules inadvertently discarded. Additionally, some function such as `url_to_post_id` cause a rewrite rule lookup that could cause this accidental flushing. This forces the flushing to only occur once `wp_loaded` has been fired.

Fixes #37892.
Props Chouby.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:44:28 +00:00
Dominik Schilling 0dcd49e6fc Taxonomy: Don't drop term order and current page when bulk deleting terms.
* Removes special handling for `edit-tags.php` which is no longer required because of `term.php`. Related: [34202] and [36308].
* Sets `$referer` to `$_SERVER['REQUEST_URI']` because `wp_get_referer()` returns false if `$_SERVER['REQUEST_URI'] === $_REQUEST['_wp_http_referer']`.
* Sets `paged` always to `$pagenum` which is the value of `$wp_list_table->get_pagenum();`. This avoids an additional redirect when you delete an item which was previously on the last page.

Fixes #38194.
Built from https://develop.svn.wordpress.org/trunk@38750


git-svn-id: http://core.svn.wordpress.org/trunk@38693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:39:29 +00:00
Dominik Schilling ae2ff33c91 Docs: Improve formatting of filter docs added in [38689].
Fixes #35590.
Built from https://develop.svn.wordpress.org/trunk@38749


git-svn-id: http://core.svn.wordpress.org/trunk@38692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:24:28 +00:00
Dominik Schilling fc79800fc5 Comments: Pass `$comment` to the `comment_max_links_url` filter.
Props rachelbaker.
Fixes #37955.
Built from https://develop.svn.wordpress.org/trunk@38748


git-svn-id: http://core.svn.wordpress.org/trunk@38691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 18:32:29 +00:00
Pascal Birchler ef8f9168b6 Taxonomy: Introduce `WP_Taxonomy` and use it in `register_taxonomy()` and `unregister_taxonomy()`.
This changes the global `$wp_taxonomies` to an array of `WP_Taxonomy ` objects. `WP_Taxonomy ` includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of `WP_Taxonomy`. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.
Built from https://develop.svn.wordpress.org/trunk@38747


git-svn-id: http://core.svn.wordpress.org/trunk@38690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:12:29 +00:00
Pascal Birchler 561c136b8f Docs: Document global variables used by `get_the_content()`.
Props goranseric, morganestes.
Fixes #37173.
Built from https://develop.svn.wordpress.org/trunk@38746


git-svn-id: http://core.svn.wordpress.org/trunk@38689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:00:29 +00:00
Pascal Birchler 319d885ea0 Plugins: Correctly display the current plugin in the plugin editor.
When editing a plugin file, show the correct plugin as being edited in the dropdown with the correct activation status.

Props aniketpant, dd32, DrewAPicture, jayarjo, MattyRob, mt8.biz, solarissmoke, swissspidy, WraithKenny.
Fixes #24122, #17552.
Built from https://develop.svn.wordpress.org/trunk@38745


git-svn-id: http://core.svn.wordpress.org/trunk@38688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:58:28 +00:00
Pascal Birchler ff411ed5f4 Menus: Do not show trashed posts in nav menus.
Trashed posts cannot be accessed by site visitors and thus should not be visible on the front end. By marking menu items of trashed posts as invalid, they are excluded from the output.

Props solarissmoke, swissspidy.
Fixes #19038.
Built from https://develop.svn.wordpress.org/trunk@38744


git-svn-id: http://core.svn.wordpress.org/trunk@38687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:50:29 +00:00
Pascal Birchler d7c994d1bf Upgrade/Install: Show correct time of last checked update.
Props PieWP for initial patch.
Fixes #37554.
Built from https://develop.svn.wordpress.org/trunk@38743


git-svn-id: http://core.svn.wordpress.org/trunk@38686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:37:31 +00:00
Weston Ruter 2f52e4db9b Customize: Add workaround for Safari bug causing preview frame to be unscrollable via `mousewheel` after a refresh.
Props westonruter, tristangemus.
Fixes #38149.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 20:17:29 +00:00
Rachel Baker 6cab59e945 Trackbacks: Allow the error message strings passed to `trackback_response()` to be translatable.
Localize the error messages in wp-trackback.php.

Props websupporter.
Fixes #38214.
Built from https://develop.svn.wordpress.org/trunk@38741


git-svn-id: http://core.svn.wordpress.org/trunk@38684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 18:09:29 +00:00
Rachel Baker 4ca1385b60 Comments: Account for the `comment_order` option in `get_page_of_comment()`.
Use the value of the `comment_order` setting to determine the date_query key to pass to `WP_Comment_Query`.
Fixes a bug where sites that had comments ordered "newest" first would have the incorrect page number returned.

Props tyxla, boonebgorges.
Fixes #31101.
Built from https://develop.svn.wordpress.org/trunk@38740


git-svn-id: http://core.svn.wordpress.org/trunk@38683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 17:42:29 +00:00
Helen Hou-Sandí e4bfe48ebc Login: Don't rely on `wp_is_mobile()` for functionality.
Making behavior changes based on some broad definition of what mobile is rarely, if ever, makes sense. Each bit of functionality should be more clearly targeted, whether that's for screen size, performance, or some kind of touch capability.

props akibjorklund.
see #33704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 15:52:30 +00:00
Rachel Baker 0438d27410 Comments: Improve check for previous comments for authenticated users in `check_comment()`.
When the 'comment_whitelist' option is enabled and the commenter is an authenticated user, query for the existence of an approved comment with a matching `user_id`.  This allows authenticated users that have changed their email address to bypass having their comment held for moderation.

Props voldemortensen, rachelbaker.
Fixes #28603.
Built from https://develop.svn.wordpress.org/trunk@38738


git-svn-id: http://core.svn.wordpress.org/trunk@38681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 15:51:31 +00:00
Boone Gorges 35be5138e9 Docs: Improvements to `register_taxonomy()` docblock.
* Fix spelling and whitespace.
* Remove `$label` argument documentation. This argument hasn't worked since [14614], despite the documentation added in [14619].

Props bobbingwide.
Fixes #38007.
Built from https://develop.svn.wordpress.org/trunk@38737


git-svn-id: http://core.svn.wordpress.org/trunk@38680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 01:30:30 +00:00
Dion Hulse a71c15f0c8 Updates: Remove the 'Download' button on the Updates screen.
Props swissspidy.
Fixes #36811.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 01:06:31 +00:00
Helen Hou-Sandí 10323e5e22 Taxonomy: Remove the popular tag cloud from `edit-tags.php`.
Sorting by count (which wasn't possible at the time the tag cloud was introduced) is more effective, though we should likely make count sort by `DESC` initially rather than `ASC`.

props ramiy.
fixes #36964.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 21:26:31 +00:00
Joe McGill eed325bbc2 Media: Improve docs for `image_send_to_editor` filter.
This updates inline docs for the `image_send_to_editor` filter to better
describe when it is fired.

Props adamsilverstein.
Fixes #34823.
Built from https://develop.svn.wordpress.org/trunk@38734


git-svn-id: http://core.svn.wordpress.org/trunk@38677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 19:57:28 +00:00
Joe McGill 173f9b6f22 Media: Better handling of JOINs when searching filenames.
Following [38625], any media searches that already included JOINs,
e.g., `tax_queries`, would get trampled when we joined the post meta
table to search for filenames. This preserves existing JOINs and
also only applies the `_filter_query_attachment_filenames()` filter
when a search query is being performed.

Props flixos90, joemcgill.
Fixes #22744.
Built from https://develop.svn.wordpress.org/trunk@38733


git-svn-id: http://core.svn.wordpress.org/trunk@38676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 19:51:30 +00:00
John Blackbourn 0383319aef Role/capability: Add more complete capability and role assertions to existing user capability tests. Also reuses one more user account fixtures.
Fixes #38236
See #38235

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


git-svn-id: http://core.svn.wordpress.org/trunk@38675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 17:18:28 +00:00
John Blackbourn 7869eaa0c6 Role/Capability: Reuse some user account fixtures in the user capability tests.
See #38235

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


git-svn-id: http://core.svn.wordpress.org/trunk@38674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 16:57:30 +00:00
Dion Hulse 93f7f904ec HTTP: Document that the return value of `wp_remote_retrieve_headers()` changed from a simple array to an object which implements ArrayAccess.
Props mrahmadawais, sudar, swissspidy.
Fixes #37722

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


git-svn-id: http://core.svn.wordpress.org/trunk@38673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 03:51:28 +00:00
Dion Hulse b83a62217e Plugins: Display 'Less Than 10' active installs of a plugin rather than '0+' active installs.
Props ovann86.
Fixes #37509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 03:33:29 +00:00
Dion Hulse d317fa487f HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.
Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests.
Fixes #37992 allowing for connecting to SSL resources on ports other than 443.
Fixes #37991 by not sending default ports in the `Host:` header.
Fixes #37839 to match and decode Chunked responses correctly.
Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-05 03:24:37 +00:00
Peter Wilson 7a52a3aac7 HTTP API: Simplify `wp_parse_url()` to ensure consistent results.
[38694] revealed some URL formats were been parsed incorrectly, including those used by Google Fonts. This change simplifies the function to use placeholder values which cause PHP's parsing to behave consistently.

Props jrf, peterwilsoncc.
Fixes #36356.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 20:33:29 +00:00
Andrea Fercia 86ad7855be Accessibility: Remove target=_blank from the help tab links on several admin screens.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 20:27:33 +00:00
Gary Pendergast 62a43623a4 Emoji: Update some failing unit tests.
The changes in [38717] weren't reflected in the associated unit tests.

See #38113.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 10:38:30 +00:00
Andrea Fercia 2eda436430 Accessibility: Remove target=_blank from the Users and Widgets screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38217. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:10:31 +00:00
Andrea Fercia d65a038ca3 Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:08:29 +00:00
Andrea Fercia 902cb70328 Accessibility: Remove target=_blank from the Network screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38159. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:03:31 +00:00
Andrea Fercia f5b1f4ceba Accessibility: Remove target=_blank from the Settings screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38143. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 06:59:29 +00:00
Andrea Fercia 25a882fc08 Accessibility: Remove target=_blank from the old custom background/header help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38141. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 06:57:30 +00:00
Andrea Fercia dc560984ba Accessibility: Remove target=_blank from the comment/edit-comments help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38140. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 06:54:30 +00:00
Gary Pendergast 84aebb9896 Emoji: Add support for the upcoming Emoji 4 release.
Emoji 4 adds 32 new professions, (with variations for gender and skin tone), and updates 33 existing character for male and female variations.

Fixes #38113 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 03:24:30 +00:00
Boone Gorges c4d3f20870 Docs: Improve description for `term_exists()` `$term` param.
Props Kenshino.
Fixes #37224.
Built from https://develop.svn.wordpress.org/trunk@38716


git-svn-id: http://core.svn.wordpress.org/trunk@38659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 02:29:29 +00:00
Boone Gorges e96c617c03 Query: Add nicename and login params to user query.
New parameters are: `login`, `login__in`, `login__not_in`, `nicename`,
`nicename__in`, `nicename__not_in`.

`login__in` and `nicename__in` are also now valid values for the
'orderby' parameter.

Props ryanplas.
Fixes #36624.
Built from https://develop.svn.wordpress.org/trunk@38715


git-svn-id: http://core.svn.wordpress.org/trunk@38658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 02:27:29 +00:00
Sergey Biryukov 63d73b30a8 Unit Tests: Remove unused variable in `Tests_oEmbed::dataShouldNotMatchOembedRegex()`.
Props jrf.
See #38187.
Built from https://develop.svn.wordpress.org/trunk@38714


git-svn-id: http://core.svn.wordpress.org/trunk@38657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 00:51:28 +00:00
Gary Pendergast 2d76b94be8 Shortcodes: Add a `do_shortcode_tag` filter.
The addition of the `pre_do_shortcode_tag` in [38506] allows plugins to short-circuit the shortcode execution process, which is particularly helpful for caching expensive shortcodes.

The `do_shortcode_tag` is the corresponding part of that system - when a shortcode hasn't been executed previously, there needs to be a clean method of populating the cache.

Props flixos90.
Fixes #32790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 00:39:37 +00:00
Konstantin Obenland 0e2e239734 Tests: Add newly introduced theme to theme list.
Introduced in [38710].

See #37924.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 18:45:30 +00:00
Konstantin Obenland e0669dc255 wpLists: Pass the current element to `process()` to properly register event handlers.
Fixes a bug where new categories couldn't be added from the post edit screen.
Introduced in [38599].

Props dlh.
Fixes #38174.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 18:39:30 +00:00
Konstantin Obenland 6335e08ab2 Themes: Account for uppercase chars when managing themes.
Fixes a bug where the UI wasn't updated after deleting/updating a theme.

Also introduces unit tests for theme management ajax handlers. For now they're
focused on `wp_ajax_update_theme()` but they can include tests for other
handlers as well.

Props chrisjean for initial patch.
Fixes #37924.
 

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


git-svn-id: http://core.svn.wordpress.org/trunk@38653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 18:13:31 +00:00
Andrea Fercia 6a2d446d9c Customize: Improve the widgets and menu items search.
- adds a "search" icon into the search fields
- adds a hidden description for the widget search field, targeted by `aria-describedby`
- adds the "clear-results" button to the widgets search
- removes the `change` and `search` events bound on the widget search, for these "live searches" WordPress should standardize on `input` (+ `keyup` when needed)
- adds property and function to keep track and update the number of the widgets search results
- the widgets search results are now announced via `wp.a11y.speak()`
- adds a visible and audible message when there are no widgets search results
- moves some CSS to `customize-controls.css`

Props ryankienstra, melchoyce, afercia.
Fixes #36908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 16:28:31 +00:00
Pascal Birchler ba22977b29 Toolbar: Be more strict about adding a 'View Posts' link to the toolbar.
After [38634], this adjusts the behaviour to remove redundancy by not displaying the link if the latest posts are shown on the front page. In that scenario, the 'Visit Site' link already points to the latest posts.

Fixes #34113.
Built from https://develop.svn.wordpress.org/trunk@38708


git-svn-id: http://core.svn.wordpress.org/trunk@38651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 08:38:29 +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
Pascal Birchler 555d9f3025 Plugins: Fix odd typo introduced in [38703].
`even` should of course be `event`.

See #37973.
Built from https://develop.svn.wordpress.org/trunk@38706


git-svn-id: http://core.svn.wordpress.org/trunk@38649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:07:29 +00:00
Pascal Birchler 4a88d55054 I18N: Introduce a user-specific language setting.
By enabling the user to select their preferred locale when editing the profile, we allow for greater personalization of the WordPress admin and therefore a better user experience.

The back end will be displayed in the user's individual locale while the locale used on the front end equals the one set for the whole site. If the user didn't specify a locale, the site's locale will be used as a fallback. The new `locale` property of the `WP_User` class can be used to retrieve the user's locale setting.

Props ocean90, ipm-frommen, swissspidy.
Fixes #29783.
Built from https://develop.svn.wordpress.org/trunk@38705


git-svn-id: http://core.svn.wordpress.org/trunk@38648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:04:29 +00:00
Pascal Birchler bd03add624 Import: Fix plugin activation link after installing an importer on multisite.
When installing the importer via Ajax, the activation link should be the same as if the page were reloaded.

Props joelcj91 for initial patch.
Fixes #37943.
Built from https://develop.svn.wordpress.org/trunk@38704


git-svn-id: http://core.svn.wordpress.org/trunk@38647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 06:42:29 +00:00
Pascal Birchler b570b4b18c Plugins: Fix checkbox selection when searching for installed plugins.
Since the plugin search works via Ajax, the JavaScript events need to delegated in order for the checkboxes to work properly.

Props afercia.
Fixes #37973.
Built from https://develop.svn.wordpress.org/trunk@38703


git-svn-id: http://core.svn.wordpress.org/trunk@38646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 06:37:30 +00:00
Weston Ruter f424977028 Menus: Restore checkboxes in post type search which were lost in [38584].
The `$args` variable was being overridden instead of extended, therefore causing the `walker` to be dropped.

Fixes #33742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 02:35:28 +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 5ab4753564 Accessibility: Editor, Publish meta box: remove a stray label and redundant CSS.
Also, adds a `role="button"` attribute to the "Edit" links.

Props iseulde.
Fixes #28411.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-02 14:38:31 +00:00
Peter Wilson 3c814b5468 Meta: Improve ID casting when getting, updating or deleting meta data.
Blindly casting IDs to absolute integers in `get_metadata_by_mid()`, `update_metadata_by_mid()` and `delete_metadata_by_mid()` can cause unexpected behaviour when a floating or negative number is passed.

Fixes #37746.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-01 06:28:30 +00:00
John Blackbourn b84023ea33 Taxonomy: Introduce more fine grained capabilities for managing taxonomy terms.
This introduces the singular `edit_term`, `delete_term`, and `assign_term` meta capabilities for terms, and switches the base capability name for tags from `manage_categories` to `manage_post_tags` and the corresponding `edit_post_tags`, `delete_post_tags`, and `assign_post_tags`.

All of these capabilities ultimately map to `manage_categories` so by default there is no change in the behaviour of the capabilities for categories, tags, or custom taxonomies. The `map_meta_cap` filter and the `capabilities` argument when registering a taxonomy now allow for control over editing, deleting, and assigning individual terms, as well as a separation of capabilities for tags from those of categories.

Fixes #35614
Props johnjamesjacoby for feedback

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


git-svn-id: http://core.svn.wordpress.org/trunk@38641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:40:28 +00:00
John Blackbourn 16674f715f Role/Capability: Introduce tests that assert the primitive and meta capability tests test the correct capabilities.
Fixes #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:12:28 +00:00
John Blackbourn 8ee12405a5 Role/Capability: Correct some meta capabilities that were incorrectly listed as primitive capabilities in the role and capability tests.
See #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:11:28 +00:00
John Blackbourn 52cf3d3d0f Role/Capability: Add explicit cases to `map_meta_cap()` for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.
Fixes #38201

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


git-svn-id: http://core.svn.wordpress.org/trunk@38638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 22:06:28 +00:00
John Blackbourn a51267269b HTTP API: Add a `$component` parameter to `wp_parse_url()` to give it parity with PHP's `parse_url()` function.
Fixes #36356
Props jrf

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


git-svn-id: http://core.svn.wordpress.org/trunk@38637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 21:47:28 +00:00
Dominik Schilling b154ab767e Embeds: Add oEmbed support for User, List and Like Twitter timelines.
Props earnjam.
Fixes #38003.
Built from https://develop.svn.wordpress.org/trunk@38693


git-svn-id: http://core.svn.wordpress.org/trunk@38636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 21:42:28 +00:00
Dominik Schilling 9d73dfdc56 Embeds: Update the oEmbed provider test suite.
* Dailymotion: Use an URL for an existing video.
* Facebook: Remove URLs which don't exist and update provider map for [38691].

See #32360.
Built from https://develop.svn.wordpress.org/trunk@38692


git-svn-id: http://core.svn.wordpress.org/trunk@38635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 21:02:28 +00:00
Dominik Schilling 2e4748c544 Embeds: Add support for embedding Facebook photos of a user/page.
See #34737.
Built from https://develop.svn.wordpress.org/trunk@38691


git-svn-id: http://core.svn.wordpress.org/trunk@38634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 20:40:28 +00:00
Joe Hoyle ee97e3deb1 Options: Add Unit tests for register_setting.
Test `register_setting` with old and new style of arguments.

Props rmccue.
Fixes #37885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 20:24:28 +00:00
Joe Hoyle d72da116be REST API: Add filters to allow creating REST API middleware plugins.
Introduce two new filters: `rest_request_before_callbacks` and `rest_request_after_callbacks` to
assist REST API middleware plugins to perform pre-callback and cleanup hooks such as `switch_to_blog()`
or caching implementations.

Props jnylen0.
Fixes #35590.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 20:12:28 +00:00
Aaron Jorbin 36219c4f95 Build/Test: Bump Autoprefixer to 6.5.0
Also includes a new prefixed value.

Changes:
6.5 “Einigkeit und Recht und Freiheit”
- Add defaults keyword to browsers requirements.
- Fix CSS Grid Layout support.
- Fix align-self cleaning.

6.4.1
- Fix node cloning after some PostCSS plugins.

6.4 “Hic et ubique terrarum”
- Add :any-link selector support.
- Add text-decoration-skip support.
- Add transition: duration property support.
- Fix -webkit- prefix for backface-visibility.
- Fix rad unit support in gradients (by 刘祺).
- Fix transition support in Opera 12.
- Removed Safari TP Grid prefixes support.

6.3.7
- Fix rare Cannot read property 'constructor' of null issue.

6.3.6
- Add Safari TP prefix support for Grid Layout.

6.3.5
- Fix duplicate prefixes for -ms-interpolation-mode.

6.3.4
- Show users coverage for selected browsers in info().

28.0
- Happy Birthday @nacin

See #38199



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


git-svn-id: http://core.svn.wordpress.org/trunk@38631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 17:34:33 +00:00
Ryan McCue 7cd7c828cc Options: Move register_setting() from wp-admin to wp-includes.
With [38635], register_setting is now a more generic setting registration function and is usable outside of the admin.

See #37885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 15:53:29 +00:00
Dominik Schilling 30573dc7b2 Add 'urn' to the list of URI protocols whitelisted by default.
Props geekysoft, jorbin.
Fixes #37300.
Built from https://develop.svn.wordpress.org/trunk@38686


git-svn-id: http://core.svn.wordpress.org/trunk@38629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 13:15:28 +00:00
Dominik Schilling ad613ca119 Add test for each whitelisted URI protocol in `wp_allowed_protocols()`.
Move test from [25301] to the new file.

Fixes #38198.
Built from https://develop.svn.wordpress.org/trunk@38685


git-svn-id: http://core.svn.wordpress.org/trunk@38628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 13:12:28 +00:00
Sergey Biryukov 31f0fd5a54 Embeds: Escape periods in oEmbed regex.
Props jrf.
Fixes #38187.
Built from https://develop.svn.wordpress.org/trunk@38684


git-svn-id: http://core.svn.wordpress.org/trunk@38627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 11:25:30 +00:00
Jeremy Felt 01e0a645cc Admin Bar: Remove unused ID `ab-awaiting-mod` from comment count.
This selector has been unused since [19516]. The (now) more appropriate `.awaiting-mod` is used instead.

Props Presskopp.
Fixes #37901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 05:02:27 +00:00
Jeremy Felt 1e9f495a18 Multisite: Use `get_sites()` in `get_blogs_of_user()`.
Previously, we looped through all of the site IDs found via user meta and ran `get_blog_details()` for each site. Now, we can pass all of the site IDs at once to `get_sites()` and receive full `WP_Site` objects.

To avoid possible issues with return type, sites are still processed into a standard object that also has a `userblog_id` property attached. Nothing is changed for non-multisite configurations.

Props flixos90.
Fixes #37061.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 04:35:27 +00:00
Jeremy Felt 5c038aefb3 Multisite: Ensure a consistent `WP_Site` return from `get_site_by_path()`.
It is possible to short circuit `get_site_by_path()` using the `pre_get_site_by_path` filter. When this happens and a standard site object is provided, we can make sure it is upgraded to a proper `WP_Site` object before passing it on.

Props flixos90.
Fixes #37053.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 04:10:27 +00:00
Jeremy Felt 0dc18d3ffb Multisite: Use `get_sites()` in network upgrade.
Use `get_sites()` to generate the same query that was previously performed manually.

Props spacedmonkey, flixos90.
Fixes #37823.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:51:30 +00:00
Boone Gorges 0aca312697 Tests: Move `get_the_excerpt()` tests to their own file.
See #36934. Fixes #38196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:24:29 +00:00
Boone Gorges cb68ce1fc4 Tests: Reset post-related globals after each test.
Globals like `$pages` were leaking between tests, resulting in various
bits of weirdness.

Globals will kill WordPress. Globals are killing WordPress.

See #38196.
Built from https://develop.svn.wordpress.org/trunk@38678


git-svn-id: http://core.svn.wordpress.org/trunk@38621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-30 03:16:29 +00:00
Dominik Schilling 324748a854 Taxonomy: Use `WP_Term_Query` in `get_term_by()`.
`WP_Term_Query` already supports querying terms by 'slug', 'name', and 'term_taxonomy_id'. Its additional arguments allow us to generate nearly the same SQL queries as before.
This change has one yuge benefit: the term queries are now cached. 

Add tests to increase coverage of `get_term_by()`.

Props spacedmonkey, boonebgorges, johnjamesjacoby, pento, ocean90.
Fixes #21760.
Built from https://develop.svn.wordpress.org/trunk@38677


git-svn-id: http://core.svn.wordpress.org/trunk@38620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 22:36:30 +00:00
Ryan McCue e53b79b726 Options: Add missing since for register_setting argument.
[38635] added support for extra arguments on registration, but was not documented.

See #37885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 21:12:27 +00:00
Sergey Biryukov 6c2d92c19f Docs: Correct 'Since' version number for Cloudup in `oembed_providers` filter description.
Props jrf.
Fixes #38188.
Built from https://develop.svn.wordpress.org/trunk@38675


git-svn-id: http://core.svn.wordpress.org/trunk@38618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 17:13:29 +00:00
Rachel Baker bf21f3f62f Comments: Introduce the `wp_update_comment_data` filter.
Filters the comment data immediately before it is updated in the database. 

Props frankiet, dshanske, DrewAPicture.
Fixes #36302.
Built from https://develop.svn.wordpress.org/trunk@38674


git-svn-id: http://core.svn.wordpress.org/trunk@38617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 13:47:31 +00:00
Joe McGill 498040b809 Media: Use `wp_basename()` to create attachment titles from filenames.
In [38294], `pathinfo()` was used with the `PATHINFO_BASENAME` constant to
get the basename of the file to be used as an attachment title, which depends
on PHP locale and can cause issues with UTF-8 characters. This uses
`wp_basename()` instead, which is a more i18n-friendly version of `basename()`.

Props SergeyBiryukov.
Fixes #37608, #37989.
Built from https://develop.svn.wordpress.org/trunk@38673


git-svn-id: http://core.svn.wordpress.org/trunk@38616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-29 01:21:31 +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
Aaron Jorbin 232be98c0e Pings/Trackbacks: Add filter argument to fetching of pingbacks_url in `X-pingback` header
It is possible to delegate pingback processing to a service function outside of WordPress itself. All other calls in default themes (and likely other themes) uses `bloginfo` which automatically adds the filter argument of "display".  This adds consistency.

Props dshanske.
Fixes #34633.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:28:30 +00:00
Pascal Birchler cfa32db674 Docs: Improve parameter description for `wp_parse_args()`.
Props dimadin for initial patch.
Fixes #38167.
Built from https://develop.svn.wordpress.org/trunk@38670


git-svn-id: http://core.svn.wordpress.org/trunk@38613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 08:41:29 +00:00
Boone Gorges 0d01992968 Set default value of 'max_depth' in `get_comment_reply_link()`.
Introduced in [8878].

Props d4z_c0nf.
Fixes #38170.
Built from https://develop.svn.wordpress.org/trunk@38669


git-svn-id: http://core.svn.wordpress.org/trunk@38612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 04:20:55 +00:00
Weston Ruter 9a9af068e5 Customize: Fix focusing on controls for widgets and nav menu items after [38648].
Shift-click on nav menu items was not expanding the nav menu section, and shift-clicking on widgets would not always result in focus being added to an element in the control's container.

See #34391.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 04:20:29 +00:00
Boone Gorges 3b6314e032 Taxonomy: Use `WP_Term_Query` when querying for object terms.
The new 'object_ids' parameter for `WP_Term_Query` allows queries for
terms that "belong to" a given object. This change makes it possible
to use `WP_Term_Query` inside of `wp_get_object_terms()`, rather than
assembling a SQL query.

The refactor has a couple of benefits:
* Less redundancy.
* Better consistency in accepted arguments between the term query functions. See #31105.
* Less redundancy.
* Object term queries are now cached. The `get_object_term_cache()` cache remains, and will be a somewhat less fragile secondary cache in front of the query cache (which is subject to frequent invalidation).
* Less redundancy.

A small breaking change: Previously, if a non-hierarchical taxonomy had
terms that had a non-zero 'parent' (perhaps because of a direct SQL
query), `wp_get_object_terms()` would respect the 'parent' argument.
This is in contrast to `WP_Term_Query` and `get_terms()`, which have
always rejected 'parent' queries for non-hierarchical taxonomies. For
consistency, the behavior of `get_terms()` is being applied across the
board: passing 'parent' for a non-hierarchical taxonomy will result in
an empty result set (since the cached taxonomy hierarchy will be empty).

Props flixos90, boonebgorges.
See #37198.
Built from https://develop.svn.wordpress.org/trunk@38667


git-svn-id: http://core.svn.wordpress.org/trunk@38610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 03:55:33 +00:00
Sergey Biryukov ee109482db Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38666


git-svn-id: http://core.svn.wordpress.org/trunk@38609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 00:17:28 +00:00
Sergey Biryukov ddd0456020 Text Changes: Unify two permission error messages in `wp-admin/network/site-users.php`.
Props ramiy.
Fixes #38178. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38665


git-svn-id: http://core.svn.wordpress.org/trunk@38608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 23:52:28 +00:00
Jeremy Felt 1084773c1c Multisite: Use `get_home_url()` instead of `get_blogaddress_by_id()` in `wp-activate.php`.
`get_home_url()` is a better fit for the "View your site" link and can be properly filtered. This is the last remaining use of `get_blogaddress_by_id()` in core.

Props boboudreau, spacedmonkey.
Fixes #26855.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 21:36:28 +00:00
Dominik Schilling 8cb4991bcf Toolbar: Split tests added in [38660] and add a multisite specific test.
See #37949.
Built from https://develop.svn.wordpress.org/trunk@38663


git-svn-id: http://core.svn.wordpress.org/trunk@38606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 20:11:28 +00:00
Jeremy Felt 7d6c7b441d Multsite: Flush output buffer after `readfile()` in `ms-files.php`.
Props fuscata, MikeLittle for testing, iamfriendly for testing.
Fixes #14730.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 20:05:28 +00:00
Dominik Schilling d3b9431ab9 Toolbar: Don't run the test from [38660] for multisite.
See #37949.
Built from https://develop.svn.wordpress.org/trunk@38661


git-svn-id: http://core.svn.wordpress.org/trunk@38604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 19:38:27 +00:00
Dominik Schilling 7627255d7e Toolbar: Update links to the about page if current user can't access the dashboard of the current site.
Add missing focus styling for menu items with an icon.

Fixes #37949.
Built from https://develop.svn.wordpress.org/trunk@38660


git-svn-id: http://core.svn.wordpress.org/trunk@38603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 19:01:29 +00:00
Jeremy Felt b5d68be194 Multisite: Use `get_sites()` instead of a database lookup in `get_id_from_blogname()`.
Because queries generated via `get_sites()` are cached, we can remove the `get_id_from_blogname` cache key.

Props flixos90.
Fixes #38175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 18:18:28 +00:00
Jeremy Felt 7fe5b6d182 Multisite: Handle `get_id_from_blogname()` lookups when the network domain has `www.`.
Previously, if a network's domain started with `www.` in a subdomain configuration, a slug lookup with `get_id_from_blogname()` would not match an existing site. A similar lookup in a subdirectory configuration would work fine.

This strips `www.` from the network's domain in a subdomain configuration during the lookup and returns the site as expected.

Adds tests which would previously fail in a subdomain configuration, but now pass in both configurations.

Props igmoweb, flixos90.
Fixes #34450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 17:57:30 +00:00
Jeremy Felt 3d19ab1ce2 Multisite: Remove redundant `is_multisite()` checks in network admin templates.
`wp-admin/network/admin.php` is required by all of the individual network templates and begins with an `is_multisite()` check of its own. Because of this, we can remove the 26 other checks in the individual templates.

Props flixos90.
Fixes #37447.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 15:39:29 +00:00
Jeremy Felt 03dd15bf7f Multisite: Replace `die()` with `wp_die()` in site users list table.
`wp_die()` is available and appropriate when checking capabilities while processing list table actions.

Props imath.
Fixes 38151.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-27 15:27:30 +00:00
Dominik Schilling 4a6f90db58 Multisite: Allow to set the site language of a new site to English.
An empty string in `WPLANG` is used to define the site language as `en_US`. The `! empty()` check didn't catch this case so that `wpmu_create_blog()` fell back to the network setting.

Fixes #36918.
Built from https://develop.svn.wordpress.org/trunk@38655


git-svn-id: http://core.svn.wordpress.org/trunk@38598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 18:39:32 +00:00
John Blackbourn a1ef815d04 Built/Test Tools: Unify the way the permastructure is set when used in conjunction with re-registering the initial taxonomies. This ensure that rewrite rules for taxonomies are consistently available.
Fixes #35452

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


git-svn-id: http://core.svn.wordpress.org/trunk@38597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 17:02:29 +00:00
John Blackbourn 61ff4980a4 Administration: Remove the `input` qualifier for the `.regular-text` class rule. This allows for other elements such as textareas to be styled with the same width as regular text inputs.
Fixes #20928
Props curdin

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


git-svn-id: http://core.svn.wordpress.org/trunk@38596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-26 16:46:33 +00:00
Andrea Fercia c3ad2eee78 Accessibility: Handle focus when closing the media modal.
When closing the media modal, by default focus should be moved back to the UI
control that was clicked to open the modal. The only exception is when inserting
images into the Visual or Text editor.

Fixes #38142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 21:33:31 +00:00
Boone Gorges 13f243747f Allow 'role' parameters to be passed to `wp_dropdown_users()`.
`wp_dropdown_users()` contains a whitelist of function params that are
passed through to `get_users()`. `role`, `role__in`, and `role__not_in`
have now been added to this whitelist.

Props sillybean.
Fixes #38135.
Built from https://develop.svn.wordpress.org/trunk@38651


git-svn-id: http://core.svn.wordpress.org/trunk@38594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 17:45:28 +00:00
Boone Gorges 0d1d1c4d06 Pass comment ID to `get_page_of_comment` filter.
Introduced in [34808].

Props zhildzik.
Fixes #38155.
Built from https://develop.svn.wordpress.org/trunk@38650


git-svn-id: http://core.svn.wordpress.org/trunk@38593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 17:33:32 +00:00
Weston Ruter 76681c40e3 Customize: Opt to disable IE8 support via conditional comments instead of using unreliable `Array.prototype.indexOf` feature detection.
Deprecate/remove `WP_Customize_Manager::customize_preview_html5()` and remove `document.head` polyfill, both of which were only in place for IE8 support.

Props ryankienstra, westonruter.
Fixes #38021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 04:35:32 +00:00
Weston Ruter 9fe024cd3f Customize: Re-architect and harden panel/section UI logic.
Removes contents for sections and panels from being logically nested (in the DOM) in order to eliminate many issues related to using `margin-top` hacks. The element containing the link to expand the content element for panels and sections is now a sibling element to its content element: the content is removed from being nested at initialization. The content element is now available in a `contentContainer` property whereas the head element (containing the link to open the construct) is in a `headContainer` property. The existing `container` property is now a jQuery collection that contains both of these elements. Since the head element is no longer in an ancestor element to the `content` element, the `aria-owns` property is now used to maintain the relationship between the `headContainer` and the `contentContainer`. These changes are also accompanied by an improvement to the animation performance for the sliding panes.

Props delawski, celloexpressions.
Fixes #34391.
Fixes #34344.
Fixes #35947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 22:23:30 +00:00
Eric Lewis d27606936b Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 20:33:30 +00:00
Sergey Biryukov c3ad13e72e I18N: Add support for Serbian crossed D in `remove_accents()`.
Props Krstarica for the report.
Fixes #38078.
Built from https://develop.svn.wordpress.org/trunk@38646


git-svn-id: http://core.svn.wordpress.org/trunk@38589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 00:07:29 +00:00
Sergey Biryukov bae2b337f0 Docs: Add `home` and `commentpaged` as accepted values for `user_trailingslashit` filter.
Props sebastian.pisula.
Fixes #37734.
Built from https://develop.svn.wordpress.org/trunk@38645


git-svn-id: http://core.svn.wordpress.org/trunk@38588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 22:54:29 +00:00
Sergey Biryukov bb0cec0bfe Docs: Add documentation for `wp-admin/js/inline-edit-tax.js`.
Props atimmer, boblinthorst.
Fixes #37571.
Built from https://develop.svn.wordpress.org/trunk@38644


git-svn-id: http://core.svn.wordpress.org/trunk@38587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:50:28 +00:00
Sergey Biryukov 78138cd2c7 Docs: Add documentation for `wp-admin/js/postbox.js`.
Props atimmer, andizer.
Fixes #37365.
Built from https://develop.svn.wordpress.org/trunk@38643


git-svn-id: http://core.svn.wordpress.org/trunk@38586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 18:47:31 +00:00
Andrea Fercia b558fbec6f Accessibility: Fix the Customizer available menu items toggles focus for Safari and VoiceOver.
In rare circumstances, for example buttons with icons and no visible text,
`user-select: none;` may trigger a bug that happens only when using Safari and
VoiceOver and doesn't allow focusable elements to receive focus correctly.
Worth reminding `user-select: none;` is a non-standard property and should be
used with care especially now that `::selection` is almost universally supported.

Fixes #37589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 14:59:30 +00:00
Sergey Biryukov d790e246d5 Docs: Correct `@see` entry for `clean_url()`.
Props rabmalin.
Fixes #38126.
Built from https://develop.svn.wordpress.org/trunk@38641


git-svn-id: http://core.svn.wordpress.org/trunk@38584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-22 09:40:31 +00:00
Andrea Fercia 88c7224355 Accessibility: Add Themes Feature Filter form improvements.
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from [27963]
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected

Fixes #38086.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:54:28 +00:00
Dominik Schilling 1babe4b968 Comments: Revert [38298].
Instead use the correct comparison operator which was changed in [38297].

Fixes #37416.
Built from https://develop.svn.wordpress.org/trunk@38639


git-svn-id: http://core.svn.wordpress.org/trunk@38582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:38:28 +00:00
Andrea Fercia d885e3cfb0 Administration: Fix the main background color for the Light color scheme.
Props trepmal.
Fixes #38004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 17:36:31 +00:00
Sergey Biryukov fd091e7ced Editor: Improve `post.js` documentation.
Props jipmoors, boblinthorst.
Fixes #38118.
Built from https://develop.svn.wordpress.org/trunk@38637


git-svn-id: http://core.svn.wordpress.org/trunk@38580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-21 08:57:30 +00:00
Jeremy Felt 58f107fa95 Multisite: Revert [38388].
Restore `get_current_site()` to a multisite only function. Providing this in single site may be a possibility in the future, but should have a dedicated ticket and discussion.

See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 21:39:29 +00:00
Joe Hoyle 2ec9f4b369 Options: Build out register_setting like register_meta.
`register_setting` can now be passed an array arguments to specify meta-data about the setting,
much like using the `register_meta` API. Of note, it will now accept a `show_in_rest` arg to
hint the inclusion of the setting in the REST API. `get_registered_settings()` is available
as a utility to get all registered settings.

Props rmccue, aaroncampbell.
Fixes #37885.



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


git-svn-id: http://core.svn.wordpress.org/trunk@38578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 20:52:28 +00:00
Pascal Birchler 8fe586ad57 Toolbar: Add a 'View Posts' link to the toolbar when on the post listing screen.
This adds a new link to visit the post type archive if the post type supports it. Also introduces a new `view_items` label to `get_post_type_labels()`.

Props paulwilde, akibjorklund, swissspidy.
Fixes #34113.
Built from https://develop.svn.wordpress.org/trunk@38634


git-svn-id: http://core.svn.wordpress.org/trunk@38577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 20:02:28 +00:00
Dominik Schilling 7cbecfa33e Multisite: Show always domain and path when deleting a site.
Add a missing translators comment.

Props ian.edington.
Fixes #37309.
Built from https://develop.svn.wordpress.org/trunk@38633


git-svn-id: http://core.svn.wordpress.org/trunk@38576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 19:55:29 +00:00
Jeremy Felt 63664c1282 Multisite: Use `get_networks()` in `get_main_network_id()`.
The manual query for the main network ID can now be replaced with a cached `get_networks()` query. This allows us to eliminate the `primary_network_id` cache key entirely.

Props spacedmonkey.
Fixes #37218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 18:47:27 +00:00
Jeremy Felt 02c8bd1909 Multisite: Provide `$join` as a possible SQL clause to the `sites_clauses` filter.
Previously, `compact()` provided a non existent `$join` and could cause confusion for anyone attempting to extend `WP_Site_Query` with their own tables. This aligns with the current behavior in `WP_Network_Query`.

Props johnjamesjacoby.
Fixes #37922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 17:49:28 +00:00
Jeremy Felt 1adca14cd7 Multisite: Add annotations for extended `WP_Site` properties.
Props ryanplas.
Fixes #37932.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 17:22:29 +00:00
Sergey Biryukov 3c5204f9f4 Docs: Correct the description of `{$taxonomy}_term_new_form_tag` hook, making it more consistent with other `*_form_tag` hooks.
Props BjornW.
Fixes #38104.
Built from https://develop.svn.wordpress.org/trunk@38629


git-svn-id: http://core.svn.wordpress.org/trunk@38572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 13:33:29 +00:00
Dominik Schilling f05c688ec7 Customize: Add `wp-util` as a dependency for `customize-controls`.
Fixes #38107.
Built from https://develop.svn.wordpress.org/trunk@38628


git-svn-id: http://core.svn.wordpress.org/trunk@38571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 13:24:31 +00:00
Weston Ruter 4c4271a691 Customize: Remove IE8 access to customizer to discontinue support.
Uses feature detection for `Array.prototype.indexOf` since it is not implemented in IE8.

Props ryankienstra.
See #38021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 04:02:31 +00:00
Joe McGill 0a906543af Media: Align input and button heights in attachment details.
This tweaks the padding of the text inputs in image settings boxes on
image edit screens to match the height of the scale button.

Props eliorivero.
Fixes #37806.
Built from https://develop.svn.wordpress.org/trunk@38626


git-svn-id: http://core.svn.wordpress.org/trunk@38569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 02:18:30 +00:00
Joe McGill 8f36a570cb Media: Make media library searchable by filename.
This applies a new private function, `_filter_query_attachment_filenames()`,
to the `post_clauses` filter hook during `wp_ajax_query_attachments()` and
`wp_edit_attachments_query_vars()` to include `_wp_attached_file` post meta
in search queries performed from the media library or in a `WP_Media_List_Table`.

Props wonderboymusic, DrewAPicture, joemcgill, swissspidy.
Fixes #22744.
Built from https://develop.svn.wordpress.org/trunk@38625


git-svn-id: http://core.svn.wordpress.org/trunk@38568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 01:45:31 +00:00
Weston Ruter d84c343cc6 Customize: Let `static_front_page` section be contextually active based on whether there are any published pages.
If there are no pages when the customizer is opened, the `static_front_page` section will be hidden. As soon as a page is created in the customizer session, the `static_front_page` section will be revealed. Previously the section would not be registered if there were no pages. Page stubs created via nav menus will appear in the `dropdown-pages` controls for `page_for_posts` and `page_on_front`, and such page stubs will thus cause the `static_front_page` section to appear. Plugins that facilitate page creation in the customizer by filtering `get_pages` will also cause the section to appear.

See #34923.
Fixes #38013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-20 00:47:30 +00:00
Sergey Biryukov 94ff5710ce Docs: Correct two references to plugins in the `$args` parameter description for `themes_api()`.
Props hideokamoto.
Fixes #37939.
Built from https://develop.svn.wordpress.org/trunk@38623


git-svn-id: http://core.svn.wordpress.org/trunk@38566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-19 16:46:30 +00:00
Sergey Biryukov 05a947c05a Docs: Correct a comment and `@return` entry in `WP_Upgrader::create_lock()`.
Props markshep.
Fixes #38089.
Built from https://develop.svn.wordpress.org/trunk@38622


git-svn-id: http://core.svn.wordpress.org/trunk@38565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 20:16:29 +00:00
Boone Gorges 65bc3d39e6 Pass taxonomy name to actions in term-relationship CRUD functions.
Props Takahashi_Fumiki.
Fixes #38006.
Built from https://develop.svn.wordpress.org/trunk@38621


git-svn-id: http://core.svn.wordpress.org/trunk@38564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 18:53:30 +00:00
Sergey Biryukov 788c3680f9 XML-RPC: Avoid a PHP notice in `::pingback_ping()` if page title was not found.
Props RedSand.
Fixes #36727.
Built from https://develop.svn.wordpress.org/trunk@38620


git-svn-id: http://core.svn.wordpress.org/trunk@38563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 14:26:29 +00:00
John Blackbourn 34a7bc4e67 Upgrade/Install: Automatically log users in after installation.
This change means that after entering their site's settings upon installation, users are immediately logged in and redirected to the admin dashboard, instead of being presented with the 'Success!' screen and then being asked to log in. This reduces friction and reduces the number of steps for installation.

Fixes #34084

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


git-svn-id: http://core.svn.wordpress.org/trunk@38562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-18 11:42:30 +00:00
Weston Ruter 037a236e42 Customize: Ensure nav menu items lacking a label use the title from the original object.
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.

Fixes #38015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 21:50:30 +00:00
Andrea Fercia ea69657b59 Plugins: style the primary action link in the non-js "Installing Plugin" page.
Props curdin, ericlewis, melchoyce, karmatosed.
Fixes #36430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 16:23:27 +00:00
Andrea Fercia 576bdf9f8c Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.
The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.

- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box

Props karmatosed, hugobaeta, monikarao, afercia.
Fixes #37969, #37018. See #37448, #37138, #27314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 15:39:30 +00:00
Aaron Campbell 405def3da4 Media: Improved media titles when created from filename.
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.

Props joemcgill.
Fixes #37989.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-17 05:42:31 +00:00
Pascal Birchler 15df6d24eb Menus: Use strict comparison for the condition added in [38612].
See #37846.
Built from https://develop.svn.wordpress.org/trunk@38613


git-svn-id: http://core.svn.wordpress.org/trunk@38556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:56:29 +00:00
Pascal Birchler a0ce261a24 Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein.
Fixes #37846.
Built from https://develop.svn.wordpress.org/trunk@38612


git-svn-id: http://core.svn.wordpress.org/trunk@38555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 16:10:31 +00:00
Sergey Biryukov 0bae73682b I18N: Correct context for Next/Previous strings in `get_the_posts_pagination()`.
Props FlorianBrinkmann.
Fixes #37952.
Built from https://develop.svn.wordpress.org/trunk@38611


git-svn-id: http://core.svn.wordpress.org/trunk@38554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-15 09:20:29 +00:00
Sergey Biryukov d4d8ae2422 Docs: Use a third-person singular verb for `register_post_type_args` filter added in [34242].
See #37770.
Built from https://develop.svn.wordpress.org/trunk@38610


git-svn-id: http://core.svn.wordpress.org/trunk@38553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:58:29 +00:00
Sergey Biryukov f348f9a59c Docs: Use a third-person singular verb for `{$type}_template_hierarchy` filter added in [38385].
See #14310.
Built from https://develop.svn.wordpress.org/trunk@38609


git-svn-id: http://core.svn.wordpress.org/trunk@38552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:54:30 +00:00
Sergey Biryukov 9c6da56cc7 Docs: Use a third-person singular verb for `smilies` filter added in [38504].
See #35905.
Built from https://develop.svn.wordpress.org/trunk@38608


git-svn-id: http://core.svn.wordpress.org/trunk@38551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:53:29 +00:00
Sergey Biryukov 7196188459 Docs: Use a third-person singular verb for `wp_doing_ajax` filter added in [38334].
See #25669.
Built from https://develop.svn.wordpress.org/trunk@38607


git-svn-id: http://core.svn.wordpress.org/trunk@38550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:51:28 +00:00
Sergey Biryukov b6397b4fda Docs: Use a third-person singular verb in the DocBlock summary for `get_theme_file_uri()`, `get_parent_theme_file_uri()`, `get_theme_file_path()`, and `get_parent_theme_file_path()`, introduced in [38578].
See #18302.
Built from https://develop.svn.wordpress.org/trunk@38606


git-svn-id: http://core.svn.wordpress.org/trunk@38549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:48:28 +00:00
Sergey Biryukov 4d7e41653e Docs: Use a third-person singular verb for `theme_file_uri`, `parent_theme_file_uri`, `theme_file_path`, and `parent_theme_file_path` filters added in [38578].
See #18302.
Built from https://develop.svn.wordpress.org/trunk@38605


git-svn-id: http://core.svn.wordpress.org/trunk@38548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:45:29 +00:00
Sergey Biryukov 4058b11ccd Docs: Add a `@since` entry for the `post_password_required` filter introduced in [38603].
Use a third-person singular verb for the filter description.

See #38056.
Built from https://develop.svn.wordpress.org/trunk@38604


git-svn-id: http://core.svn.wordpress.org/trunk@38547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:37:29 +00:00
Aaron Jorbin d31057a009 Posts: Add filter to allow overriding `post_password_required` return
Post Passwords are incredibly inflexible. One Password per site at a time and other limitations that can't really be changed without a backwards compatibility break.  This adds the ability for sites to change the password behavior such as doing per post passwords or allowing multiple passwords to be set in a browser. The possibilities are YUGE.

Additionally, it allows for a behavior other than returning a html form when a password is needed. This is important for non website use cases (such as in a restful API).

Fixes #38056. See #16483.
Props rmccue.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 21:28:30 +00:00
Helen Hou-Sandí dd6da701b2 Customizer: Better hover/focus state for section titles and available widgets.
The 4px border pattern is found in a number of places across the admin, including plugins, notices, and Press This.

props celloexpressions, folletto, hugobaeta.
see #29158.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 16:15:29 +00:00
Joe Hoyle 794dd5d8cb REST API: Enable sanitize_callback to return WP_Error.
Give developers the opportunity to reject incoming data without using the validation callback. It also enables us to do sanitization and validation in one function in instances where this could be useful.

Props websupporter, rmccue.
Fixes #37560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-14 15:50:29 +00:00
Sergey Biryukov d7f840a211 XML-RPC: Check the minimum number of arguments in `::wp_getUsersBlogs()` and `::blogger_getUsersBlogs()`.
Props kitchin for initial patch.
Fixes #29750.
Built from https://develop.svn.wordpress.org/trunk@38600


git-svn-id: http://core.svn.wordpress.org/trunk@38543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 23:17:28 +00:00
Konstantin Obenland 320fe3a2b6 Make wpList easier to contribute to.
Uses more semantic variable names and adds function and inline documentation.

Props rommelxcastro for parallel work in #34917.
Fixes #36264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 22:24:30 +00:00
Sergey Biryukov 84cf528449 Media: Adjust `test_video_shortcode_body()` after [38597].
See #38040.
Built from https://develop.svn.wordpress.org/trunk@38598


git-svn-id: http://core.svn.wordpress.org/trunk@38541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 14:09:29 +00:00
Sergey Biryukov 893f9487d4 Media: Remove an extra space in `style` attribute in `wp_video_shortcode()` after [30082].
Props danielpietrasik.
Fixes #38040.
Built from https://develop.svn.wordpress.org/trunk@38597


git-svn-id: http://core.svn.wordpress.org/trunk@38540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:45:31 +00:00
Sergey Biryukov b434cda3a6 Docs: Synchronize docblocks for `WP_Site_Query::__construct()` and `get_sites()` after the changes in [37735], [38008], [38103], and [38336].
Props MaximeCulea.
Fixes #38039.
Built from https://develop.svn.wordpress.org/trunk@38596


git-svn-id: http://core.svn.wordpress.org/trunk@38539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:20:35 +00:00
Sergey Biryukov 1cdb4b52af Docs: Correct description for `domain` and `path` arguments in `WP_Network_Query::__construct()`.
See #32504.
Built from https://develop.svn.wordpress.org/trunk@38595


git-svn-id: http://core.svn.wordpress.org/trunk@38538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 13:10:32 +00:00
Gary Pendergast 3e08cf2b66 Formatting: Update `autop()` to match `wpautop()`.
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match.

Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly.

Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`.
See #4857.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 06:03:31 +00:00
Gary Pendergast e1d553e20a Docs: Fix an outdated comment.
[38592] changed the functionality of `wpautop()`, but didn't update the associated comment to match.

Fixes #4857.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-13 04:01:30 +00:00
Gary Pendergast 109ffb9390 Formatting: Add an extra line break before block elements in `wpautop()`.
`wpautop()` considers double line breaks to be the separator between block level HTML elements. By adding two line breaks before a block element, this allows us to process the text before a block element correctly.

Fixes #4857.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 07:06:30 +00:00
Gary Pendergast a18b133c01 Database: Normalise index names in `dbDelta()`.
When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL.

Fixes #34874.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 05:09:30 +00:00
Gary Pendergast 65fa220a08 Database: Increase the size of `wp_posts.post_password` to 255 characters.
Longer passwords and passphrases are much more common than when post passwords were introduced all those eons ago, so let's increase the length of the `post_password` field from 20 to 255 characters.

The password will continue to be stored in plaintext, as the ability for the post author to view the password is a commonly used feature.

Trivia: this was the last 3 digit Trac ticket to be closed.

Props skippy, nazgul, iandunn, adamsilverstein, pento.
Fixes #881.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 02:28:30 +00:00
Gary Pendergast 4dcb7a0fa9 Bootstrap: Use `dirname()` when loading `class-wp-hook.php` from `plugin.php`.
To allow `plugin.php` to be loaded before the rest of WordPress is loaded, it cannot rely on WordPress constants, such as `ABSPATH` and `WPINC`.

Instead, we can assume that `class-wp-hook.php` will be in the same directory as `plugin.php`, so `dirname( __FILE__ )` will give us the correct path to load from.

Props pento, dd32.
Fixes #37707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-12 01:50:30 +00:00
Weston Ruter 4156988a3c Docs: Fix phpdoc and jsdoc typos introduced in [38584] and [38587], respectively.
See #33742.
See #20714.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-11 18:46:30 +00:00
Weston Ruter edf170c943 Customize: Implement previewing of form submissions which use the GET method.
This finally allows the search results template to navigated to in the customizer preview.

Fixes #20714.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-11 05:05:30 +00:00
Boone Gorges 132f3d0d19 Query: Eliminate unnecessary `wp_list_filter()` call in `get_queried_object()`.
The refactor in [30711] swapped out the old `queries` property for the
new `queried_terms`, but should also have gotten rid of the now-
superfluous `wp_list_filter()` call.

Fixes #37962.
Built from https://develop.svn.wordpress.org/trunk@38586


git-svn-id: http://core.svn.wordpress.org/trunk@38529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 19:49:29 +00:00
Boone Gorges 163d59f8e1 Query: Avoid PHP notice in `get_queried_object()` when query contains `NOT EXISTS` tax query.
Props johnjamesjacoby.
See #37962.
Built from https://develop.svn.wordpress.org/trunk@38585


git-svn-id: http://core.svn.wordpress.org/trunk@38528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 19:37:38 +00:00
Weston Ruter 84f9592f88 Menus: Prevent non-published posts/pages from being returned in search results for adding as nav menu items.
Re-use the same query vars in searching as when listing posts. Aligns with behavior of nav menus in customizer.

Fixes #33742.
Props welcher, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 04:59:31 +00:00
John Blackbourn e482549183 Themes: Add the non-encoded form of the queried item slug to the template hierarchy when the slug contains non-ASCII characters.
This affects category, tag, and custom taxonomy archives, and single posts, pages, and custom post types.

Fixes #37655

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


git-svn-id: http://core.svn.wordpress.org/trunk@38526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 00:48:28 +00:00
Gary Pendergast f54dafc2b7 Tests: Use `add_filter()` when it's available.
The `tests_add_filter()` helper function directly manipulates the `$wp_filter` global, instead of using `add_filter()`. We can use `add_filter()` when it's available, and fall back to manipulating `$wp_filter` when it isn't, relying on the `$wp_filter` bootstrap code at the top of `plugin.php` to handle conversion.

Props boonebgorges, dd32 and pento: WordPress Thought Leadership Triumvirate.
Fixes #17817.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-09 00:34:31 +00:00
Gary Pendergast 2dee7cdffc Database: Fall back to `utf8` when `utf8mb4` isn't supported.
Sometimes, `DB_CHARSET` will be set to `utf8mb4`, even if the current setup doesn't support `utf8mb4`. After [38442], this can cause significant character set failures, causing the connection to fall back to `latin1`.

Instead of doing this, we now check that the connection supports `utf8mb4` before trying to use it, and fall back to `utf8` when we need to.

Fixes #37982 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 23:49:30 +00:00
John Blackbourn e6e6cbf21f Taxonomy: Revert accidental changes introduced in [38578].
See #18302

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


git-svn-id: http://core.svn.wordpress.org/trunk@38522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 22:58:28 +00:00
John Blackbourn c0bb9c2562 Themes: Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes.
The most useful function this introduces is `get_theme_file_uri()`, which returns the URL to the specified file in the child theme if it exists, and falls back to the URL to the specified file in the parent theme. This allows parent themes to reference files (including enqueuing CSS and JavaScript files) that can be overridden by the child theme simply by existing.

This change also introduces `get_theme_file_path()`, which is the file path equivalent of `get_theme_file_uri()`.

Finally, `get_parent_theme_file_uri()` and `get_parent_theme_file_path()` are also introduced, which allow a theme to specifically reference a file URL or file path in the parent theme. These can be used as replacements for `get_template_directory_uri()` and `get_template_directory()` respectively, for consistency.

Props johnbillion, georgestephanis, gma992.
Fixes #18302

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


git-svn-id: http://core.svn.wordpress.org/trunk@38521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 22:54:32 +00:00
Weston Ruter c1a0ed8540 Customize: Prevent widget previewing logic from building invalid jQuery selectors when sidebars are registered without a class name in `before_widget`.
Fixes #37993.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 15:45:31 +00:00
John Blackbourn 3afaf2147c Formatting: Don't send an HTTP status code in `wp_send_json()` by default. This avoids clobbering an HTTP status code that may have been set prior to calling this function.
Props westonruter
See #35666

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


git-svn-id: http://core.svn.wordpress.org/trunk@38519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 13:45:34 +00:00
Peter Wilson 06c51c0042 Menus: Fix notices thrown by classes extending `Walker_Nav_Menu`.
Methods in `Walker_Nav_Menu` can be called with multiple, incompatible `$args` objects so an `insset()` check is required to avoid throwing notices.

Introduced in [38523].

Fixes #35206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 07:06:30 +00:00
Peter Wilson 6cdab630cd Menus: Improve documentation of new `$item_spacing` argument.
Adds `@since` tags for and improves description of the new `$item_spacing` argument added to `wp_nav_menu()`, `wp_list_pages()`, and `wp_page_menu()` in [38523].

Props johnbillion for copy.
See #35206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 05:32:03 +00:00
Drew Jaynes f5db425059 Docs: Fix minor formatting for inline docs in `WP_Hook` following its introduction in [38571].
See #17817.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 04:17:30 +00:00
Aaron Jorbin 7e811d7120 Permalinks: Ensure Pending Review Posts permalink posts link to the draft
[34670] made the displayed permalink clickable. For posts that were pending review, the permalink wasn't being properly generated so the link wouldn't go to the preview.

Props knutsp, enshrined.
Fixes #37423.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 04:05:31 +00:00
Gary Pendergast 5a632be944 Hooks: Add the new class `WP_Hook`, and modify hook handling to make use of it.
Filters and actions have been the basis of WordPress' plugin functionality since time immemorial, they've always been a reliable method for acting upon the current state of WordPress, and will continue to be so.

Over the years, however, edge cases have cropped up. Particularly when it comes to recursively executing hooks, or a hook adding and removing itself, the existing implementation struggled to keep up with more complex use cases.

And so, we introduce `WP_Hook`. By changing `$wp_filter` from an array of arrays, to an array of objects, we reduce the complexity of the hook handling code, as the processing code (see `::apply_filters()`) only needs to be aware of itself, rather than the state of all hooks. At the same time, we're able te handle more complex use cases, as the object can more easily keep track of its own state than an array ever could.

Props jbrinley for the original architecture and design of this patch.
Props SergeyBiryukov, cheeserolls, Denis-de-Bernardy, leewillis77, wonderboymusic, nacin, jorbin, DrewAPicture, ocean90, dougwollison, khag7, pento, noplanman and aaroncampbell for their testing, suggestions, contributions, patch maintenance, cajoling and patience as we got through this.
Fixes #17817.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-08 03:55:31 +00:00
John Blackbourn 8bec516c18 Menus: Correct the docblocks for `Walker_Nav_Menu`, `wp_nav_menu()`, and `walk_nav_menu_tree()`.
This corrects the parameter type for the `$args` and `$item` parameters passed throughout these functions, class methods, and hooks.

See #24587
See #35206
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 16:15:30 +00:00
Jeremy Felt c9e60dab17 Media: Sanitize upload filename.
Built from https://develop.svn.wordpress.org/trunk@38538


git-svn-id: http://core.svn.wordpress.org/trunk@38481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 13:55:36 +00:00
Andrea Fercia 4a06a09310 Widgets: Make the Delete/Remove links red.
For consistency and accessibility, all the UI controls that perform destructive
actions should be red.

Props monikarao, lukecavanagh, patilswapnilv, ibachal.
See #35622.
Fixes #37016.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-07 09:52:30 +00:00
Pascal Birchler 18a8cf475b Revert [38401] after [38480].
See #36335.
Built from https://develop.svn.wordpress.org/trunk@38535


git-svn-id: http://core.svn.wordpress.org/trunk@38476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-06 18:13:35 +00:00
Pascal Birchler 54720a14d8 Upgrade/Install: Sanitize file name in `File_Upload_Upgrader`.
Built from https://develop.svn.wordpress.org/trunk@38524


git-svn-id: http://core.svn.wordpress.org/trunk@38465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-06 17:26:31 +00:00
Peter Wilson 4131900722 Menus: Add white space option to `wp_nav_menu()` and `wp_list_pages()`.
Adds an `item_spacing` option to the arguments array for the functions `wp_nav_menu()`, `wp_list_pages()`, and `wp_page_menu()`. `item_spacing` is a boolean accepting either `preserve` or `discard`.

Previously, certain CSS choices could result in a site's layout changing if `wp_nav_menu()` fell back to the default `wp_list_pages()` due to differences in the whitespace within the HTML. The new argument ensures a function outputs consistant HTML while maintaining backward compatibility.

Fixes #35206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-06 09:06:31 +00:00
John Blackbourn cfe941cd6f Role/Capability: Correct the multisite cap tests after [38521].
See #35614
See #32394

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


git-svn-id: http://core.svn.wordpress.org/trunk@38463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-05 12:09:30 +00:00
John Blackbourn 9cf899d6f9 Role/Capability: Split meta and primitive capabilities in the helper functions in the roles and capability tests so primitive capability tests can be made more accurate.
See #35614
See #32394

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


git-svn-id: http://core.svn.wordpress.org/trunk@38462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-05 11:00:32 +00:00
Andrea Fercia 3c1d571cd7 Accessibility: Improve the Customizer and Theme Installer initial focus.
The Customizer and Theme Installer open in full overlays that need to receive 
focus. Also, keyboard navigation should be constrained within the overlays. Using
CSS `visibility` to hide all the content except the overlays, makes them the only
available and focusable content and allows browsers to handle focus natively.

See #29158.
Fixes #33228, #27705.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-04 21:51:31 +00:00
Sergey Biryukov 2bb27252f9 Script Loader: Correct default value for `$src` in `wp_enqueue_script()` and `wp_enqueue_style()`.
Props Frank Klein for initial patch.
See #37770.
Built from https://develop.svn.wordpress.org/trunk@38519


git-svn-id: http://core.svn.wordpress.org/trunk@38460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-04 04:09:28 +00:00
Drew Jaynes f0bb2bc3c0 Docs: Update the `$message` parameter for `_default_wp_die_handler()` to notate that it can also accept a `WP_Error` object.
Additionally, update the `$message` parameter description in the DocBlock for `wp_die()` to make it explicitly clear messages derived from a passed `WP_Error` object will only be evaluated if not performing an Ajax or XML-RPC request (as both default handlers completely ignore `WP_Error` object messages).

See #37770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-04 03:41:31 +00:00
Sergey Biryukov 59b186febd Upload: Correct encoding issue in `swfupload.js`, introduced in [29479].
See #29199.
Built from https://develop.svn.wordpress.org/trunk@38517


git-svn-id: http://core.svn.wordpress.org/trunk@38458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-03 15:02:36 +00:00
John Blackbourn d098687501 Taxonomy: Introduce some taxonomy capability tests in preparation for introducing more fine grained capabilities for terms.
See #35614

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


git-svn-id: http://core.svn.wordpress.org/trunk@38457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-03 02:15:36 +00:00
Jeremy Felt 58bca49227 Multisite: Deprecate `wp_get_network()`.
`wp_get_network()` was converted into a wrapper for `get_network()` in 4.6.0 and can now be deprecated.

This moves `wp_get_network()` to the bottom of `ms-load.php` as `ms-deprecated.php` is not available early enough.

Props PieWP, flixos90.
Fixes #37553.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 23:48:31 +00:00
John Blackbourn a3b581ce64 Embeds: Clarify some assertion failure messages and correct a test URL for Twitter timelines.
See #32360

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


git-svn-id: http://core.svn.wordpress.org/trunk@38455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 22:53:30 +00:00
Weston Ruter 91f583c9af Customize: Fix php warning due to `WP_Customize_Manager::prepare_setting_validity_for_js()` incorrectly assuming that `WP_Error` will only ever have arrays in its `$error_data`.
* Eliminates the server mutating the a `WP_Error`'s `$error_data` to merge-in a `$from_server` flag (since it may not be an array to begin with). Instead it defers to the client to add a `fromServer` param on any `Notification` instances created from server-sent errors.
* Ensures that notifications will be re-rendered if a notification's `message` changes but the `data` and `type` remain the same.
* Adds explicit support for the `Notification` class to have a `setting` property, ensuring that the property is set whereas previously it was dropped.

Fixes #37890.
Props westonruter, dlh.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 22:35:44 +00:00
John Blackbourn 2559ade0ae Embeds: Update the oEmbed provider test suite.
* Remove the manual flag for HTTPS support and replace it with a simple check on the URL format.
* Ensure `testOembedTestsCoverAllProviders()` actually fails when a new provider is added without a corresponding test.

See #32360

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


git-svn-id: http://core.svn.wordpress.org/trunk@38453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 21:36:44 +00:00
Aaron Jorbin dd983343d3 Formatting: Allow KSES custom elements with hyphens
The W3C Custom Elements spec (http://www.w3.org/TR/custom-elements/#concepts) allows you to use your own custom DOM elements/tags. One of the main requirements is that the tag name "must contain a U+002D HYPHEN-MINUS character". This adjusts KSES to allow it.

Fixes #34105.
Props batmoo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 04:16:28 +00:00
Sergey Biryukov e318b5bf1d I18N: Add translator comments for XML-RPC strings with placeholders.
See #37792.
Built from https://develop.svn.wordpress.org/trunk@38510


git-svn-id: http://core.svn.wordpress.org/trunk@38451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 04:13:28 +00:00
Aaron Jorbin 7a8f0f10ad Text Changes: Improve Error messages in XML-RPC
Three changes to the error message strings:
 * add some missing periods.
 * merge similar translation strings.
 * remove the "Something wrong happened" suffix.

Fixes #37792.
Props ramiy.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 03:57:28 +00:00
Aaron Jorbin 17f21e28f9 Toolbar: Add unit tests for edit links.
When there is no post ID, there should be no edit link. This adds unit tests for it.

Fixes #22247.
Props akibjorklund.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 03:51:29 +00:00
Gary Pendergast 0cff37abf5 Database: Find the correct table names in `DELETE` queries with table aliases
Previously, `wpdb::get_table_from_query()` would not find the correct table name in the query `DELETE a FROM table a`, due to not recognising the table alias immediately after the `DELETE` as correct syntax.

Fixes #37660.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 00:19:28 +00:00
Gary Pendergast 75c1875587 Shortcodes: Add the `pre_do_shortcode_tag` filter.
This filter allows the shortcode generation process to be short-circuited, so expensive short codes can be cached and returned immediately.

Props ideag.
Fixes #37906.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 00:10:28 +00:00
Sergey Biryukov 8682603166 Docs: Correct `@since` entry for the `smilies` filter added in [38504].
See #35905.
Built from https://develop.svn.wordpress.org/trunk@38505


git-svn-id: http://core.svn.wordpress.org/trunk@38446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 00:08:30 +00:00
Gary Pendergast cce2ffaed5 Smilies: Add the `smilies` filter.
This new filter allows the smilies array to be modified with a filter, instead of having to directly access the global.

Props mte90, jorbin.
Fixes #35905.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-02 00:00:30 +00:00
Andrea Fercia c01c23c4f7 Accessibility: Make links in the Customizer underlined by default.
Links within lines or blocks of text should always be underlined since they can't
rely on color alone to be distinguished from the surrounding text. Exceptions
can be handled on a case-by-case basis.

Props Presskopp for the initial patch.
Fixes #37527.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 22:02:30 +00:00
Aaron Jorbin 22e6d59c67 Administration: Use a bool when when a bool is called for
The third parameter of `date_i18n` is a bool.  Currently, it's a weak check, otherwise the call showing the universal time on the "General Settings" screen would be messed up. Use an actual bool so we call our own functions correctly.

Fixes #37634.
Props fronaldaraujo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 18:34:28 +00:00
Aaron Jorbin 93ad7eab80 Administration: Use #fff instead of `white`
Cleans up a few places where the CSS coding standards were not being followed.

Fixes #37576.
Props Presskopp, johnpgreen, netweb


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


git-svn-id: http://core.svn.wordpress.org/trunk@38442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 18:14:31 +00:00
Boone Gorges 77a3cc733e Query: 'orderby=include' should support comma-separated lists.
[30052] assumed that 'include' would be an array.

Props TimothyBlynJacobs.
Fixes #37904.
Built from https://develop.svn.wordpress.org/trunk@38500


git-svn-id: http://core.svn.wordpress.org/trunk@38441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 16:51:30 +00:00
Gary Pendergast 4babadb704 Bootstrap: `class-wp-locale.php` needs to be `require_once()`-ed.
After [38364], the inclusion of `class-wp-locale.php` was changed from a `require_once()` to a `require()`. This caused problems for anything that called `load_text_domain_early()` prior to the `require()` but didn't bail, as it was now being `require()`-ed a second time.

With the use of `require_once()`, it doesn't really matter where it's loaded, so it has been moved next to the related `l10n.php` load.

See #37827.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 12:36: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 2b5d7555b4 Users: After [33766], don't reset the password when clicking "Show Password" and then "Cancel" on Add New User screen.
Props smerriman for reporting.
Fixes #37902. See #33419.
Built from https://develop.svn.wordpress.org/trunk@38494


git-svn-id: http://core.svn.wordpress.org/trunk@38435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 12:24:29 +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
Weston Ruter 94e8a9cfa0 Customize: Introduce `paneVisible` state and ensure pane is visible when a construct is expanded (or focused).
Fixes issue whereby a user would see nothing happen if the pane is collapsed while they shift-click to edit an element in the preview.

Props curdin, celloexpressions, westonruter.
See #27403.
Fixes #36678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 05:55:27 +00:00
Dion Hulse 227a80eba3 Query: Use `AND` in a SQL query rather than `&&`.
This appears to have been the only instance of `&&` being used in SQL, so for consistency lets remove it.

Props scrappy@hub.org.
Fixes #37903.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 05:11:31 +00:00
John Blackbourn 69c152cee7 Taxonomy: Correct the function description for `wp_ajax_add_link_category()`.
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:49:29 +00:00
John Blackbourn 01c3ae084b Taxonomy: Update various docs for parameters which are now `WP_Term` objects.
See #37770
See #14162

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


git-svn-id: http://core.svn.wordpress.org/trunk@38430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-01 00:40:29 +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 a4f8854a46 Taxonomy: Introduce `wp_insert_term_data` and `wp_update_term_data` filters for altering term data before it is inserted/updated in the database.
Props atimmer, SergeyBiryukov.
Fixes #22293.
Built from https://develop.svn.wordpress.org/trunk@38484


git-svn-id: http://core.svn.wordpress.org/trunk@38425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 21:41:27 +00:00
Andrea Fercia c451e71d42 Text Changes: Improve the timezone setting description in General Settings.
Makes more clear users can set either a city or a UTC timezone offset.

Props GrantDerepas, andrew.p.
Fixes #34789.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 21:37:27 +00:00
John Blackbourn 14e40fd20c Role/Capability: Add two missing meta capabilities to the caps tests.
See #32394

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


git-svn-id: http://core.svn.wordpress.org/trunk@38423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 21:34:30 +00:00
Sergey Biryukov a2582f50cc Users: Pass `$profileuser` parameter to `user_profile_picture_description` filter on "Edit User" screen.
Props turtlepod, deremohan.
Fixes #37379.
Built from https://develop.svn.wordpress.org/trunk@38481


git-svn-id: http://core.svn.wordpress.org/trunk@38422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 21:13:32 +00:00
Scott Taylor f1631f4e03 Bootstrap: goodnight sweet prince.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 20:36:30 +00:00
Weston Ruter 03adca4299 Customize: Fix i18n by re-using the `add_new_item` post type label instead of using a post type name in a generic string.
Props afercia, westonruter.
See #34923.
Fixes #37895.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 19:15:28 +00:00
Weston Ruter bce5ea9494 Customize: Use new `$status_code` parameter for `wp_send_json_error()` instead of calling `status_header()` separately.
Props johnbillion.
See #35666.
Fixes #37897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 19:01:28 +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
Sergey Biryukov fe12301ca9 Help/About: Remove an outdated help sentence on "My Sites" screen.
Props johnjamesjacoby.
Fixes #37896.
Built from https://develop.svn.wordpress.org/trunk@38474


git-svn-id: http://core.svn.wordpress.org/trunk@38415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 17:44:29 +00:00
Scott Taylor af71985625 Query: r38356, you were not long for this world.
Fixes #37830.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 16:53:29 +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 7e8d7f8a81 General: revert [38386], `functions.php` was probably too tempting for some people to not load by itself.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 15:24: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 69e7fe3c5b Press This: don't check for already-hoisted global in `press-this.php`.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:29:28 +00:00
Scott Taylor 0419d1e318 Press This: in `wp_ajax_press_this_save_post()` and `wp_ajax_press_this_add_category()`, don't check for a global instance. `WP_Press_This` is a Controller, but not really a Singleton. This also keeps it from being a pluggable class, which it is right now.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:25:29 +00:00
Weston Ruter 9546303342 Customize: Improve handling of active state for dynamically-created controls/sections/panels.
When a customizer construct (panel, section, control) is not added in PHP, the JS has interpreted this to mean that a given construct should be deactivated (because it is gone). This is problematic for dynamically-created constructs in JS, as it has meant that the construct would also have to be created in PHP to ensure the `active` callback is called, or else a hack would be required to add a `construct.active.validate = function() { return true };` to forcibly prevent the construct from getting deactivated. 

These workarounds can be eliminated by treating constructs differently when they are created dynamically in JS (after page load) as opposed to being created statically in PHP (on the server). Namely, if a construct is dynamically-created then its absence in a preview refresh should not signal that the construct should be deactivated. Rather, a dynamic construct should only have its activation state toggled if it has a corresponding construct created in PHP when the preview refreshes to explicitly indicate its `active` state. Otherwise, the management of the `active` state for a construct created in JS should also be the responsibility of client-side code.

Props westonruter, sayedwp.
Fixes #37270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:22:23 +00:00
Scott Taylor 153ba4a832 Query: in `wp_old_slug_redirect()`, use `get_query_var()` instead of importing and touching the global `$wp_query` directly.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:21:41 +00:00
Scott Taylor 1dc37b77ef Press This: in `get_shortcut_link()`, just check a class constant on `WP_Press_This` instead of instantiating the object and reading an instance prop.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:08:00 +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
Scott Taylor cabb4a03c8 Multisite: use `get_current_site()` instead of `$GLOBALS['current_site']` (stop yelling!) in a few remaining spots.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 05:04:29 +00:00
Scott Taylor e5225324a2 Multisite: use `get_current_blog_id()` where applicable, in lieu of plucking the `$blog_id` global from outer space.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 04:55:54 +00:00
John Blackbourn 049c36d11f HTTP API: Revert changes to `wp_parse_url()` while PHP 5.2 errors are investigated.
See #36356

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


git-svn-id: http://core.svn.wordpress.org/trunk@38397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 00:24:31 +00:00
Scott Taylor 5d94d97b29 List Tables: AJAX actions for List Tables do not need to declare `global $wp_list_table`. List tables on admin screens are in global scope, and they contain hooks that don't pass the the list table as context, hence using globals there so that functions can import them. That problem does not exist in the AJAX actions, which are virtually impossible to hook into as is.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 20:07:29 +00:00
Scott Taylor 800fb85d1e OEmbed: add unit tests. `@group external-oembed` is not run by default.
Props johnbillion, wonderboymusic.
See #32360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 18:55:28 +00:00
John Blackbourn d412234bc1 HTTP API: Separate the test for `wp_parse_url()` with `-1` as its component into a separate test, so the remaining tests can use strict type checking. This helps avoid gotches with the potentially empty values (ie. `null`) that we're testing for.
See #36356

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


git-svn-id: http://core.svn.wordpress.org/trunk@38394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 18:31:30 +00:00
John Blackbourn fad4b94bab HTTP API: The tests for `wp_parse_url()` can't be strict on type because this causes the tests to fail on PHP 5.2 which, bizarrely, returns the results of `parse_url()` (when called with a `$component` parameter) in a different order to later PHP versions.
Fixes #36356

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


git-svn-id: http://core.svn.wordpress.org/trunk@38393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:49:29 +00:00
John Blackbourn 3a9cc4bf11 Posts, Post Types: Introduce a missing private query var that should have been introduced as part of #15459.
This private query var allows the hierarchical page query on the Pages listing screen to query for `wp_posts.ID, wp_posts.post_parent` instead of `wp_posts.*`. This introduces large memory and time savings when the site contains a large number of Pages. Combined with the processing time savings introduced in [31730] this makes the Pages listing screen considerably more performant.

Fixes #34982
Props rodrigosprimo

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


git-svn-id: http://core.svn.wordpress.org/trunk@38392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:40:30 +00:00
John Blackbourn ebe159a4bc HTTP API: Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449].
Fixes #36356

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


git-svn-id: http://core.svn.wordpress.org/trunk@38391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 17:16:30 +00:00
John Blackbourn 4fd9ad1ce2 HTTP API: Add a `$component` parameter to `wp_parse_url()` to give it parity with PHP's `parse_url()` function.
Fixes #36356
Props jrf

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


git-svn-id: http://core.svn.wordpress.org/trunk@38390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 16:36:28 +00:00
Andrea Fercia 99be6ffd3c Accessibility: Hide the "No activity yet" smiley from assistive technologies.
Fixes #37511.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 16:14:30 +00:00
Pascal Birchler 4753f6e127 Script Loader: Properly adjust tests missed in [38443].
See #37800.
Built from https://develop.svn.wordpress.org/trunk@38447


git-svn-id: http://core.svn.wordpress.org/trunk@38388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 14:51:28 +00:00
Boone Gorges 3a4169d7ab Comments: Don't do direct SQL query when fetching decendants.
The SQL query was built using the clauses compiled when querying for
top-level comments. But in cases where the top-level comment query
results are already in the cache, the SQL clauses are not built, and
so are unavailable for `fill_descendants()`. Instead, we call
`get_comments()`, using modified versions of the parameters passed
to the main `WP_Comment_Query` class.

Props Akeif, Rarst for testing.
Fixes #37696.
Built from https://develop.svn.wordpress.org/trunk@38446


git-svn-id: http://core.svn.wordpress.org/trunk@38387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 14:48:29 +00:00
Boone Gorges 28cc6cb368 Tests: Require `Basic_Object` and `Basic_Subclass` files earlier in call stack.
This ensures compatibility with third-party tools using these classes
in their test suites, after [38285].

Props DylanAuty, Frank Klein, TimothyBlynJacobs.
Fixes #37523.
Built from https://develop.svn.wordpress.org/trunk@38445


git-svn-id: http://core.svn.wordpress.org/trunk@38386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 14:33:28 +00:00
Boone Gorges ded1bb5625 Tests: Add docblocks for `Basic_Object` and `Basic_Subclass` classes.
Props DylanAuty.
See #37523.
Built from https://develop.svn.wordpress.org/trunk@38444


git-svn-id: http://core.svn.wordpress.org/trunk@38385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 14:32:32 +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
Gary Pendergast dd9aaba852 Database: Don't force an unsupported character set that previously would've silently failed.
[37320] corrected some behaviour in how PHP and MySQL character sets are matched up. This was correct, but had the side effect of causing some incorrectly configured sites to start failing.

Prior to [37320], if `DB_CHARSET` was set to `utf8mb4`, but the PHP version didn't support `utf8mb4`, it would fall back to the default character set - usually `latin1`. After [37320], the `SET NAMES` query would force MySQL to treat the connection character set as `utf8mb4`, even if PHP wasn't able to understand it.

By checking if `mysqli_set_charset()` succeeded, we can simulate the old behaviour, while maintaining the fix in [37320].

Props danielkanchev fo helping to diagnose this issue.
Fixes #37689 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 07:38:32 +00:00
Gary Pendergast bd084204c1 Database: Ensure that variables are defined correctly.
There were some cases where some local variables in `wpdb::init_charset()` could be undefined when they were used.

Props Frozzare.
Fixes #37683 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 07:14:41 +00:00
Scott Taylor 3f51e08ac6 i18n: after r38364, check that `global $wp_locale` is an instance of `WP_Locale` before calling `->is_rtle()` in `is_rtl()`.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 05:57:41 +00:00
Boone Gorges d793020f1e Remove unnecessary uniqueness check in `get_attachment_taxonomies()`.
Running the taxonomy array through `array_unique()` is unnecessary
when the function returns objects, because the associative keys already
ensure uniqueness.

This also fixes a bug when running `get_attachment_taxonomies()` in
HHVM, which doesn't like casting objects to strings for the purposes
of `array_unique()`.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-30 03:07:34 +00:00
Weston Ruter abd9cdc07b Customize: Allow users to more seamlessly create page-based nav menus during customization.
Introduces the ability to create stubs for the various post types to add to a given menu. This eliminates the need to leave the customizer to first create the post in the admin and then return to managing menus. Only the title of the newly-created post can be supplied; the post content will be blank and will need to be provided in the normal edit post screen outside the customizer, unless a plugin enables a post editing in the customizer experience. When a post is created and added to a nav menu in the customizer, the newly created post that is added to a menu is given the `auto-draft` status, and if the changes are not published, the `auto-draft` post will be automatically deleted within 7 days via `wp_delete_auto_drafts()`. However, if the customizer changes are saved, then these nav menu item `auto-draft` post stubs will be transitioned to `publish`.

Includes portions of code from the Customize Posts <https://github.com/xwp/wp-customize-posts> and Front-end Editor <https://github.com/iseulde/wp-front-end-editor> plugins.

For more information, see https://make.wordpress.org/core/2016/06/16/feature-proposal-content-authorship-in-menus-with-live-preview/

Props celloexpressions, westonruter, valendesigns, afercia, melchoyce, mapk, iseulde, mrahmadawais.
Fixes #34923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 22:59:28 +00:00
Andrea Fercia 42c4653c9a Accessibility: Improve the file upload inputs styling.
Though browsers implement `cursor: pointer` on this kind of controls a bit 
inconsistently, the `pointer` cursor styling makes more clear the button and
label are actionable controls.

Props Ankit K Gupta.
Fixes #35552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 21:08:29 +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
Joe McGill 0569c6219e Post Thumbnails: Prevent post thumbnail previews from spilling into other images.
After [38118], when previewing a page with a secondary loop, all post
thumbnails would be filtered to display the post thumbnail for the
page being previewed. This ensures `_wp_preview_post_thumbnail_filter()`
is only applied if the `$post_id` of the post meta being filtered is
equal to the post or page being previewed.

Props swisspidy, joemcgill.
Fixes #37697.
Built from https://develop.svn.wordpress.org/trunk@38433


git-svn-id: http://core.svn.wordpress.org/trunk@38374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 12:25:29 +00:00
John Blackbourn a96f20f9b5 Comments: Add support for all HTTP protocol versions when returning a 405 from `wp-comments-post.php`.
Fixes #37863
Props tnash

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


git-svn-id: http://core.svn.wordpress.org/trunk@38373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 12:00:32 +00:00
Dion Hulse 56bc1dc194 Bootstrap: Check that `ini_get_all()` exists before calling it, allows us to work around hosts who disable the function for "security purposes".
Fixes #37680 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 02:59:30 +00:00
Dion Hulse 30270d851f HTTP: Accept non-string values in cookies, fixing a regression since 4.5.
Props swissspidy.
Fixes #37768 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 02:42:45 +00:00
Dion Hulse e45ebb28f2 HTTP: Handle an edgecase within the URI parsing library included in Requests, where if a double slash exists at the start of the path the URL is passed to cURL malformed.
Props flixos90 for initial patch.
Fixes #37733 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-29 02:33:34 +00:00
John Blackbourn b3faafc632 Themes: Correct the list of possible values for the dynamic portion of the `{$type}_template_hierarchy` and `{$type}_template` filters.
See #14310

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


git-svn-id: http://core.svn.wordpress.org/trunk@38369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 23:57:49 +00:00
Andrew Ozz 2b0e81c595 TinyMCE: change the default font for the `vi` locale to the same stack as `he_IL`.
Props nmt90 for reporting and testing this.
Fixes #37755 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38427


git-svn-id: http://core.svn.wordpress.org/trunk@38368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:52:41 +00:00
Andrew Ozz bbc12c3dbe Editor: fix jumpiness on pressing backspace and delete in the Text editor.
Fixes #37690 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38426


git-svn-id: http://core.svn.wordpress.org/trunk@38367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:40:31 +00:00
Ella Iseulde Van Dorpe b67367b6f8 Editor: Use Beacon API over sync request
See https://www.w3.org/TR/beacon/ for more information.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:29:30 +00:00
John Blackbourn dbdc1c28b1 I18N: Correct various instances of incorrect usage of `esc_attr_e()`.
Fixes #37457
Props henry.wright, afercia

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


git-svn-id: http://core.svn.wordpress.org/trunk@38365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:06:30 +00:00
John Blackbourn a7c3974cdc Upgrade/Install: Don't display PHP errors during installation.
If a user is installing WordPress for the first time and has set `WP_DEBUG` to true, a PHP error during installation makes for a visually jarring experience.

Fixes #37358

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


git-svn-id: http://core.svn.wordpress.org/trunk@38364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:50:29 +00:00
John Blackbourn 348c50b2a8 Formatting: Add a parameter to `wp_send_json_error()`, `wp_send_json_success()`, and `wp_send_json()` for specifying the HTTP response code.
Defaults to `200` in all cases, but can be used, for example, to return a `403` when using `wp_send_json_error()`.

Fixes #35666
Props stephenharris

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


git-svn-id: http://core.svn.wordpress.org/trunk@38363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:42:28 +00:00
John Blackbourn a1d61a95e1 Security: Return a `403` instead of a `200` HTTP status when `check_ajax_referer()` fails.
This is, unfortunately, untestable in the current test suite, even in the AJAX tests.

Fixes #36362

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


git-svn-id: http://core.svn.wordpress.org/trunk@38362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:31:30 +00:00
John Blackbourn b85e322e35 Security: Trigger a `_doing_it_wrong()` when `check_ajax_referer()` is called without its first parameter. This brings it inline with `check_admin_referer()`.
Fixes #36361

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


git-svn-id: http://core.svn.wordpress.org/trunk@38361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 17:15:28 +00:00
John Blackbourn 6b3a3713fd Themes: Introduce tests for the theme template hierarchy.
See #14310

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


git-svn-id: http://core.svn.wordpress.org/trunk@38360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 16:19:28 +00:00
John Blackbourn d346835bfb Themes: Update filter names in the inline documentation for the `get_*_template()` functions.
See #14310, #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 16:15:30 +00:00
John Blackbourn 5985804f1f Permalinks: Correct an invalid peramstructure tag in a test.
Fixes #37858

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


git-svn-id: http://core.svn.wordpress.org/trunk@38358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 12:53:29 +00:00
Pascal Birchler a09d7f3615 Bootstrap: Fix failing external HTTP tests after [38411].
When testing the transports, the transport name needs to be capitalized for the class name to be correct (`WP_Http_Curl` vs. `WP_Http_curl` ).

See #36335.
Built from https://develop.svn.wordpress.org/trunk@38416


git-svn-id: http://core.svn.wordpress.org/trunk@38357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 10:34:30 +00:00
Pascal Birchler ac83e26875 Upgrade/Install: After [37687], fix the number of params passed to the upgrade hooks.
`wp_version_check()`, `wp_update_plugins()` and `wp_update_themes()` are all originally hooked to the `upgrader_process_complete` action with zero arguments passed to them. Zero arguments should be passed when re-adding them after translation updates, otherwise the sky will fall.

Props ionutst, gitlost.
Fixes #37731.
Built from https://develop.svn.wordpress.org/trunk@38415


git-svn-id: http://core.svn.wordpress.org/trunk@38356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 10:04:30 +00:00
Scott Taylor f96fff3c9d Admin: allow `WP_Screen` to be checked via autoload in `convert_to_screen()`.
Props kraftbj.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 02:25:27 +00:00
John Blackbourn 17db8134c4 Query: Add and improve tests for query conditionals on the front page and home page.
See #37851

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


git-svn-id: http://core.svn.wordpress.org/trunk@38354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 02:02:32 +00:00
Scott Taylor 2a9b372471 Script Loader: autoload in `load-{scripts|styles}.php`.
Props JohnPBloch.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 00:07:33 +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
Scott Taylor 1798d34f73 Bootstrap: run `composer install` after r38409.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 19:09:30 +00:00
Scott Taylor 4bf37e5555 Bootstrap: move `composer.{json|lock}` into `src`.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 19:06:31 +00:00
John Blackbourn e0a0be9579 Media: Add a `$wp_error` parameter to `wp_insert_attachment()` to give it parity with `wp_insert_post()`.
Fixes #37813
Props grapplerulrich, mrahmadawais

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


git-svn-id: http://core.svn.wordpress.org/trunk@38349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 17:25:29 +00:00
John Blackbourn d194f60a5c Build/Test tools: Ensure the `Tests_Query_Conditionals` tests set up the environment correctly before re-registering initial taxonomies.
Fixes #37851

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


git-svn-id: http://core.svn.wordpress.org/trunk@38348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 17:03:33 +00:00
John Blackbourn 9070bb3ace Users: Correct the documentation for the `wp_dropdown_users_args` filter description and its parameters.
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 16:54:31 +00:00
John Blackbourn 4739cc0075 Build/Test Tools: Add support for `is_front_page()` to `assertQueryTrue()` and assert that all the tested conditions are supported by the method.
Fixes #37849

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


git-svn-id: http://core.svn.wordpress.org/trunk@38346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 15:28:28 +00:00
Dion Hulse ec83ce1a0c i18n: Retire another remaining `wp-includes/locale.php` require, and instead load the required `WP_Locale` class directly.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 15:13:33 +00:00
John Blackbourn 71e8e8368a Themes: Remove failing tests introduced in [38390].
See #14310

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


git-svn-id: http://core.svn.wordpress.org/trunk@38344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 14:53:38 +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
Pascal Birchler 8b5fc84e63 After [38399], update the `.gitignore` file accordingly.
The following files have been added to `svn:ignore` already as they are not compatible with PHP 5.2:

* 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

See #36335.
Built from https://develop.svn.wordpress.org/trunk@38401


git-svn-id: http://core.svn.wordpress.org/trunk@38342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 11:29:28 +00:00
Peter Wilson 62717837b5 Unit tests: Enforce $args object in `wp_nav_menu()` & `Walker_Nav_Menu`.
WordPress always* passes $args to filters as an array of arugments. A exception is made in `wp_nav_menu()` and the associated walker where these are passed to filters as an object, this has been the case for seven years (since [13368]).

These new tests enforce the use of an object in these filters to ensure backward compatibility is maintained.

See #24587.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 11:28:30 +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
Scott Taylor cb74a4401b Unit Tests:
* Automatically delete objects that we were created during `wpSetUpBeforeClass` - posts, comments, terms (except 1), and user (except 1)
* The amount of leftover data between tests was breathtaking - use the new function: `_delete_all_data()`
* Commit database transactions for all `TestCase`s, not just those that implement `wpSetUpBeforeClass` and `wpTearDownAfterClass`
* The tests run 10-20 seconds faster now

See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 08:36:31 +00:00
Scott Taylor 85d63f2af5 Press This: the file for the `WP_Press_This` class should not produce side effects. Similar to what we did in r38355 for `WP_Site_Icon`, drop the instances of `global` instantiation for `$wp_press_this` via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 06:07:29 +00:00
Weston Ruter e6ed174135 Customize: Circumvent the customizer attempting to preview links to static assets (such as uploaded images).
The customizer's preview POST requests to static assets result in 405 Method Not Allowed responses.

Fixes #37828.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 06:05:29 +00:00
Scott Taylor e05a033bcb Bootstrap: exclude more files from the `autoloader.classmap` in `composer.json`.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 05:40:29 +00:00
Scott Taylor 599d45019f Bootstrap: add `composer.lock` and `src/wp-vendor` files. Nothing is using this code yet, just going through the motions. Ignore the files in `src/wp-vendor/composer` that will explode in PHP 5.2.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 03:49:28 +00:00
Scott Taylor bb16c53108 Bootstrap: run `composer require xrstf/composer-php52` to get the updated suggested version. Change the `vendor-dir` to `wp-vendor`.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 03:36:29 +00:00
Scott Taylor 06aa510d56 List Tables: move `_WP_List_Table_Compat` into its own file.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 22:23:29 +00:00
Scott Taylor 99aef2df30 Bootstrap: exclude some files from the Composer autoload setup via `exclude-from-classmap`.
See #36335.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 22:21:31 +00:00
John Blackbourn 3c6dd1d00d Themes: Begin introducing unit tests for the expected theme template hierarchy. More to come.
See #14310

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


git-svn-id: http://core.svn.wordpress.org/trunk@38331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 22:20:28 +00:00
Scott Taylor c99df3a708 XML-RPC: break up `class-IXR.php` into individual class files.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 22:08:33 +00:00
Scott Taylor 08233c6aff Multisite: move `get_current_site()` to `load.php` so that it can be used in more places, instead of importing `global $current_site`.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 21:35:30 +00:00
Scott Taylor 35bdc07eac Roles: set a property, `$db`, on `WP_Roles` to reduce global imports.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 21:16:59 +00:00
Scott Taylor b9f516e55e Bootstrap: load `option.php` in `wp-settings.php`, not in `functions.php`.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 21:11:29 +00:00
John Blackbourn 9e1542b9ec Themes: Make the template hierarchy for a given template type filterable.
This introduces a `{$type}_template_hierarchy` filter that allows the hierarchy of candidate template filenames for a given template type to be filtered.

This allows the hierarchy to be added to or altered completely without resorting to re-building the hierarchy from scratch within the `template_include` filter, which is common and prone to conflicts between plugins and prone to getting out of sync with core's hierarchy.

Fixes #14310

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


git-svn-id: http://core.svn.wordpress.org/trunk@38326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 21:03:27 +00:00
Scott Taylor 29959d0448 Bootstrap: add a `composer.json` file to the project. No code relies on it (yet), and no `vendor` dir is checked in (yet). No autoloader is being used (yet). Taking this first step will hopefully encourage the perfectionists of our world to scrutinize each line.
To fiddle around with what it does, run `composer install` from the project root. If you do not have Composer installed:
https://getcomposer.org/doc/00-intro.md#locally

tl;dr for Mac/Homebrew users: `brew install composer`

Classes from `wp-includes` and `wp-admin` are eligible for autoloading via `autoload.classmap`. Through a tornado of recent commits, many unsuitable files have been transitioned into a more acceptable state for autoloading: 1 file per class, no side effects.

The file bootstrap in `wp-settings.php` can transition into `autoload.files`. This will be done with care and attention.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 21:00:29 +00:00
Scott Taylor 525bb21513 Unit Tests: after r38303, replace usage of `global $_wp_additional_image_sizes` with `wp_get_additional_image_sizes()`.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 20:51:43 +00:00
John Blackbourn 3644bc160f Build/Test Tools: Remove many unnecessary calls to `rand_str()` which can, in theory, fail at random. Static strings are much more appropriate.
See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 20:22:43 +00:00
Boone Gorges 0b81d79c86 Don't improperly cast IDs when fetching post, user, or term objects.
Blindly casting passed IDs to integers can generate false positives
when the ID is cast to `1`.

Props deeptiboddapati.
Fixes #37738.
Built from https://develop.svn.wordpress.org/trunk@38381


git-svn-id: http://core.svn.wordpress.org/trunk@38322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 19:09:27 +00:00
Scott Taylor 11216c7069 FTP: ensure that there is only one class named `ftp`, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:47:29 +00:00
Scott Taylor b1c6049be4 Upgrade/Install: `wp-admin/includes/class-wp-upgrader-skins.php` is unused, remove it. All of the same includes are loaded in `class-wp-upgrader.php`.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:25:30 +00:00
John Blackbourn 32d5e7f31d Role/Capability: Only users who can manage options should be able to trash/delete the page for posts or the front page, as they are the only users who can restore it or subsequently alter the "Front page displays" setting.
Fixes #37580
Props JakePT

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


git-svn-id: http://core.svn.wordpress.org/trunk@38319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:23:31 +00:00
Boone Gorges 3d593c5fc1 Eliminate unnecessary variable in `WP_Term_Query`.
Props ocean90.
Fixes #37544.
Built from https://develop.svn.wordpress.org/trunk@38377


git-svn-id: http://core.svn.wordpress.org/trunk@38318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:12:26 +00:00
Scott Taylor b3d474a6dc Load: move `WP_MatchesMapRegex` into its own file.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:11:39 +00:00
Scott Taylor b2c394a330 Script Loader: move `_WP_Dependency` into its own file.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 18:06:39 +00:00
Scott Taylor 76c7864367 Load: remove `class-feed.php` (There is no class named `Feed` or `WP_Feed`, it just loads other classes) and, instead, move the `require` calls to the only place they are ever included: inside `fetch_feed()`. This simplifies the include path.
Tested with this feed in a widget: `http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml`.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:53:30 +00:00
Scott Taylor 524effb58f Load: remove `session.php` and, instead, move the 2 `require` calls to `wp-settings.php`. This simplifies the include path.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:45:17 +00:00
Boone Gorges 51a2235c19 Use shared fixture in `comment_exists()` tests.
Props Frank Klein.
Fixes #37842.
Built from https://develop.svn.wordpress.org/trunk@38372


git-svn-id: http://core.svn.wordpress.org/trunk@38313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:42:50 +00:00
Scott Taylor 481123661c Load: load `class-phpass.php` (`PasswordHash` class) early in `wp-settings.php`, instead of `require_once()`'ing it in several places.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 17:40:35 +00:00
John Blackbourn f189b72b22 Docs: Alignment after [38369].
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 16:51:28 +00:00
John Blackbourn 94c8ca0f2e Docs: Correct various documentation around `object` and `stdClass` types.
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 16:49:45 +00:00
John Blackbourn f53cc848e4 Embeds: Add a missing regex delimiter for Facebook URLs.
See #34737

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


git-svn-id: http://core.svn.wordpress.org/trunk@38309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 12:17:28 +00:00
John Blackbourn 07c31a5437 Embeds: Add support for embedding Facebook posts and videos via oEmbed.
Fixes #34737
Props pento, GaryJ

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


git-svn-id: http://core.svn.wordpress.org/trunk@38308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 11:57:30 +00:00
John Blackbourn a71d445b80 Embeds: Many of our oEmbed providers now default to HTTPS embeds, redirect to the HTTPS oEmbed endpoint, or have complete support for HTTPS even if they don't default to HTTPS.
This change defaults to using HTTPS endpoints for oEmbeds for those providers that have full HTTPS support and don't redirect back to HTTP when clicking through from the embed. It covers:

* Vimeo
* SmugMug
* Scribd
* WordPress.tv
* SoundCloud
* Meetup
* issuu
* Mixcloud
* TED

See #28507

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


git-svn-id: http://core.svn.wordpress.org/trunk@38307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 11:25:29 +00:00
John Blackbourn c7884d542e Embeds: Always use the HTTPS endpoint for YouTube embeds. The `scheme` parameter is no longer required as all YouTube assets now use HTTPS.
See #36274, #28507
Props zsusag, tollmanz

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


git-svn-id: http://core.svn.wordpress.org/trunk@38306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 10:39:32 +00:00
Scott Taylor 6d87157eb9 i18n: move `is_rtl()` to `l10n.php` (which loads way earlier). Load `WP_Locale` file in `wp-settings.php`. Retire `wp-includes/locale.php` - it only loaded the class and the one function, `is_rtl()`. If someone loaded this file for fun somewhere else, it would be a fatal error.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 10:20:29 +00:00
Scott Taylor 4d17b67eed Load: move `is_wp_error()` to `load.php` so that `WP_Error` is in a file by itself.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:58:28 +00:00
Scott Taylor b144d69ba0 Embed: `wp-settings.php` loads `class-wp-embed.php`, which currently produces side effects. Move the `global` instantiation to `wp-settings.php`. `WP_Embed` is then in a file by itself.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:53:28 +00:00
Scott Taylor ff59281441 OEmbed: move `_wp_oembed_get_object()` to `embed.php`, where all of the other embed functions live. `WP_oEmbed` is then in a file by itself. Load `class-oembed.php` in `wp-settings.php` and remove extraneous include calls.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:49:28 +00:00
Scott Taylor ac6c22c392 L10N: improve accuracy of docs.
Props johnbillion.
Fixes #37585.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:38:28 +00:00
Scott Taylor 6a43b84454 Formatting: for a performance boost in `remove_accents()`, convert `chr()` calls to string literals.
Props gitlost.
Fixes #37643.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:35:27 +00:00
Scott Taylor a9386ea7c1 Editor: improve `word-count.js` documentation.
Props jipmoors, andizer.
Fixes #37718.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:25:27 +00:00
Scott Taylor 76926fa763 Cron: clarify descriptions for Cron API functions.
Props johnbillion.
Fixes #37769.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-26 09:22:30 +00:00
Scott Taylor faccc617fb Query: collapse several of the `is_*` methods using `__call()`. Add `@method` annotations.
Fixes #37830.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 19:42:43 +00:00
Scott Taylor 9ce58d9d86 Site Icon: There is no good reason for `class-wp-site-icon.php` to drop a global instance of itself whenever the file is loaded. The lone use of the `global` instance of `WP_Site_Icon` is in an AJAX action that provides virtually no way to override - the file is loaded immediately before the `global` is used.
Let us remove the `$wp_site_icon` global. I will fall on the sword if this comes back to bite us (waiting with bated breath).

See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 19:09:35 +00:00
Scott Taylor ed0da659bc Feed: move 'WP_Feed_Cache', 'WP_Feed_Cache_Transient', `WP_SimplePie_File` and `WP_SimplePie_Sanitize_KSES` into their own files via `svn cp`. If we move forard with autoloading, `class-feed.php` is useless. We could even remove it now, and just load these new files in `wp-settings.php`. That can be decided post-mortem. `class-feed.php` is an interesting name: there is no `Feed` or `WP_Feed` class.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 18:18:39 +00:00
Scott Taylor 3d26e3513e Session: move `WP_Session_Tokens` and `WP_User_Meta_Session_Tokens` into their own files via `svn cp`. If we move forard with autoloading, `session.php` is useless. We could even remove it now, and just load these new files in `wp-settings.php`. That can be decided post-mortem.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 17:44:31 +00:00
Scott Taylor 6620e0b3cc Diff: move `WP_Text_Diff_Renderer_inline` (behold that lowercase "i") and `WP_Text_Diff_Renderer_Table` into their own files via `svn cp`.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 17:37:30 +00:00
Scott Taylor d5f28fdad8 Query: move `WP_Query` into its own file via `svn cp`.
See #37827.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 17:20:38 +00:00
Drew Jaynes f07f1b126e Docs: Add a missing parenthesis in an example in the DocBlock for `wp_redirect()`.
Props shayanys.
See #37770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 07:36:31 +00:00
Andrew Ozz 15edc78f6f TinyMCE: fix toolbars alignment in RTL.
Fixes #37760 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38349


git-svn-id: http://core.svn.wordpress.org/trunk@38290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 01:20:30 +00:00
Sergey Biryukov 2cc42e5dbb Docs: Improve the docs for `the_title()` and make them more consistent with `the_title_attribute()`.
Props ixkaito, swissspidy.
Fixes #37732.
Built from https://develop.svn.wordpress.org/trunk@38348


git-svn-id: http://core.svn.wordpress.org/trunk@38289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-24 15:59:29 +00:00
Sergey Biryukov b79713c1b0 Administration: Underline links in the admin footer for better accessibility.
Props Presskopp.
Fixes #37529.
Built from https://develop.svn.wordpress.org/trunk@38347


git-svn-id: http://core.svn.wordpress.org/trunk@38288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-24 15:43:31 +00:00
Sergey Biryukov d611efe5b1 I18N: Add translator comments for strings in `wp-includes/functions.wp-scripts.php`.
Props ramiy.
Fixes #37803.
Built from https://develop.svn.wordpress.org/trunk@38345


git-svn-id: http://core.svn.wordpress.org/trunk@38286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:53:27 +00:00
Sergey Biryukov d64e4beb67 I18N: Add translator comments for strings in `wp-includes/functions.php`.
Props ramiy.
Fixes #37802.
Built from https://develop.svn.wordpress.org/trunk@38344


git-svn-id: http://core.svn.wordpress.org/trunk@38285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:48:28 +00:00
Sergey Biryukov 51e1539ab7 I18N: Add translator comments for strings in `wp-includes/deprecated.php`.
Props ramiy.
Fixes #37797.
Built from https://develop.svn.wordpress.org/trunk@38343


git-svn-id: http://core.svn.wordpress.org/trunk@38284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:36:28 +00:00
Sergey Biryukov eb9cc0c13e I18N: Add translator comments for strings in `wp-includes/class-walker-comment.php`.
Merge two similar strings.

Props ramiy.
Fixes #37796.
Built from https://develop.svn.wordpress.org/trunk@38342


git-svn-id: http://core.svn.wordpress.org/trunk@38283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:33:28 +00:00
Sergey Biryukov 420b733958 I18N: Add translator comments for strings in `wp-includes/author-template.php`.
Props ramiy.
Fixes #37795.
Built from https://develop.svn.wordpress.org/trunk@38341


git-svn-id: http://core.svn.wordpress.org/trunk@38282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:18:29 +00:00
Sergey Biryukov ce4c0d67dc I18N: Add translator comments for strings in `wp-includes/admin-bar.php`.
Props ramiy.
Fixes #37794.
Built from https://develop.svn.wordpress.org/trunk@38340


git-svn-id: http://core.svn.wordpress.org/trunk@38281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 23:05:31 +00:00
Scott Taylor bd816e5182 Taxonomy: in `get_terms()`, do not assume that legacy args are being passed when the only params are top-level `meta_*` values. Add keys in `WP_Term_Query::__construct()`.
Adds unit tests.

Props flixos90, boonebgorges.
Fixes #37568.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:45:28 +00:00
Scott Taylor af1fb6b8d2 Query: use correct description in the docblock for `$number` in `WP_Comment_Query`, `WP_Network_Query`, and `WP_Site_Query`.
Props flixos90.
Fixes #37621.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:41:29 +00:00
Scott Taylor d6145020ae Cache: in `WP_Object_Cache`, `$cache_misses` is public, but `$cache_hits` is private. They should both be `public`, because they're useful for debugging purposes.
Props danielbachhuber.
Fixes #37726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:38:29 +00:00
Scott Taylor b7812bd416 AJAX: add a new function, `wp_doing_ajax()`, which can replace... (wait for it...) `DOING_AJAX` checks via the constant.
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:33:30 +00:00
Scott Taylor 6f9f3b0c56 Media: remove `function_exists()` call for `ini_get()` in `_load_image_to_edit_path()`.
Props dd32.
Fixes #37681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:24:30 +00:00
Sergey Biryukov 0955ea66da WP Mail: If post-by-email functionality is disabled, `wp-mail.php` should return a `403 Forbidden` status code instead if `500 Internal Server Error`.
Props Presskopp, tomdxw.
Fixes #37572.
Built from https://develop.svn.wordpress.org/trunk@38332


git-svn-id: http://core.svn.wordpress.org/trunk@38273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:02:39 +00:00
Boone Gorges 6ccd3f4795 Tests: Fix incorrect variable name from [38330].
See #37630.
Built from https://develop.svn.wordpress.org/trunk@38331


git-svn-id: http://core.svn.wordpress.org/trunk@38272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 13:49:33 +00:00
Boone Gorges 70077ce076 Tests: Attachment `create()` method should match signature of other `create()` methods.
Legacy argument format continues to be accepted.

Props bcole808.
See #37630.
Built from https://develop.svn.wordpress.org/trunk@38330


git-svn-id: http://core.svn.wordpress.org/trunk@38271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 13:43:41 +00:00
Sergey Biryukov ec8f0281fa I18N: Remove unnecessary context for two strings on "Add New User" screen.
Props ramiy.
Fixes #37784.
Built from https://develop.svn.wordpress.org/trunk@38329


git-svn-id: http://core.svn.wordpress.org/trunk@38270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 12:54:31 +00:00
Andrew Ozz 08d59c211c TinyMCE: make sure the temporary id is removed when using the default image dialog and inserting an external image.
Props fomenkoandrey for reporting and testing.
Fixes #37467.
Built from https://develop.svn.wordpress.org/trunk@38328


git-svn-id: http://core.svn.wordpress.org/trunk@38269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 04:43:31 +00:00
Sergey Biryukov 35e3d7e37f I18N: Remove unnecessary context in `wp_post_revision_title_expanded()`.
Props ramiy.
Fixes #37781.
Built from https://develop.svn.wordpress.org/trunk@38327


git-svn-id: http://core.svn.wordpress.org/trunk@38268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 01:46:31 +00:00
Sergey Biryukov 64dac53d70 I18N: Use a consistent context for "Add New" submenu strings in admin bar (Toolbar).
Props ramiy.
Fixes #37780.
Built from https://develop.svn.wordpress.org/trunk@38326


git-svn-id: http://core.svn.wordpress.org/trunk@38267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 01:42:32 +00:00
Sergey Biryukov 92343be1f4 I18N: Allow for WordPress Plugin/Theme Directory URLs to be localized.
Props ramiy.
Fixes #37501.
Built from https://develop.svn.wordpress.org/trunk@38325


git-svn-id: http://core.svn.wordpress.org/trunk@38266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 01:19:39 +00:00
Sergey Biryukov 372a19a435 I18N: Replace unnecessary context with translator comments in `wp_post_revision_title()` and `wp_post_revision_title_expanded()`.
Props ramiy.
Fixes #37778.
Built from https://develop.svn.wordpress.org/trunk@38324


git-svn-id: http://core.svn.wordpress.org/trunk@38265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 00:35:28 +00:00
Sergey Biryukov fee26cf741 I18N: Replace unnecessary context with a translator comment for `%s Sites` string in `network_step1()`.
Props ramiy.
Fixes #37777.
Built from https://develop.svn.wordpress.org/trunk@38323


git-svn-id: http://core.svn.wordpress.org/trunk@38264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 00:17:27 +00:00
Sergey Biryukov 96bdd4737c I18N: Replace unnecessary context with a translator comment for `%s KB` string on Network Settings screen.
Props ramiy.
Fixes #37496.
Built from https://develop.svn.wordpress.org/trunk@38322


git-svn-id: http://core.svn.wordpress.org/trunk@38263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 00:11:28 +00:00
Sergey Biryukov c86199ddb2 Embeds: In `get_oembed_endpoint_url()`, avoid inadvertent stomping of the `$format` parameter passed to `oembed_endpoint_url` filter.
Props danhgilmore.
Fixes #37751.
Built from https://develop.svn.wordpress.org/trunk@38321


git-svn-id: http://core.svn.wordpress.org/trunk@38262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 00:05:30 +00:00
Sergey Biryukov 44aac380f4 I18N: Add translator comments for `Edit Site: %s` string in network admin.
Props ramiy.
Fixes #37776.
Built from https://develop.svn.wordpress.org/trunk@38320


git-svn-id: http://core.svn.wordpress.org/trunk@38261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 23:53:31 +00:00
Scott Taylor b55b6a03f4 Users: after [38317], use a `@property` annotation, instead of a `public` field.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 22:15:29 +00:00
Scott Taylor 1119536085 Widgets: `$option_name` and `$alt_option_name` have been used as members ever since `WP_Widget` became an object in 2.8, but never declared.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:51:28 +00:00
Scott Taylor 7466118616 Users: `$user_level` has been publicly-accessed on instances of `WP_User` since version 2.0, but is has never been declared.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:41:28 +00:00
Scott Taylor d3312bc278 Locale: declare the `$month_genitive` field on `WP_Locale`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:33:28 +00:00
Scott Taylor b0fa9aac6b HTTP: in `WP_HTTP_Response`, the `@param` declarations for `$status` and `$headers` were swapped. Let us correct this.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:28:27 +00:00
Scott Taylor ca70683001 Database: `WP_Network`, `WP_Network_Query`, and `WP_Site_Query` call `wpdb::_escape()`, thus requiring it to be `public`. It previously had no access modifier. `_` at the beginning of a method, believe it or not, does not enforce visibility constraints.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:10:28 +00:00
Scott Taylor dcb0261664 Comments: in `wp_handle_comment_submission()`, `$_wp_unfiltered_html_comment` is passed as part of `$comment_data`, but is not used locally.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:04:28 +00:00
Scott Taylor 3755823702 Taxonomy: remove unnecessary `break` in `WP_Term::__get()`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 21:00:30 +00:00
Scott Taylor 5025f72fd3 Nav Menus: remove unnecessary variable assignment in `wp_nav_menu_item_post_type_meta_box()`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 20:58:28 +00:00
Scott Taylor 778d794e4f REST API: remove unnecessary variable assignments in `rest_handle_options_request()`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 20:56:28 +00:00
Scott Taylor a017516291 Media: remove unnecessary variable assignment in `gallery_shortcode()`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 20:53:29 +00:00
Scott Taylor 7b30193bb7 General: remove variable set needlessly in `wp_check_jsonp_callback()`.
See #37771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 20:51:30 +00:00
Drew Jaynes 22adda2aa0 Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names.

Props ramiy.
See #37748.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 18:25:31 +00:00
Sergey Biryukov 02939c03e5 Common CSS: Allow for `.nav-tab-wrapper` class to be used on elements other than `h3` to increase flexibility for custom settings pages.
Props ramiy, afercia.
Fixes #37257.
Built from https://develop.svn.wordpress.org/trunk@38306


git-svn-id: http://core.svn.wordpress.org/trunk@38247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 16:33:30 +00:00
Sergey Biryukov 26d7a5607b Multisite: Fix copy/paste issue in `id` attribute for a dismissible message on Sites screen.
Props imath.
Fixes #37764.
Built from https://develop.svn.wordpress.org/trunk@38305


git-svn-id: http://core.svn.wordpress.org/trunk@38246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 14:22:31 +00:00
Scott Taylor cd6d2bae92 Login: `retrieve_password()` does not need to import 2 globals that it does not use.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 04:48:28 +00:00
Scott Taylor d31456b615 Media: add a function, `wp_get_additional_image_sizes()`, that wraps the retrieval of the global `$_wp_additional_image_sizes`. Removes 6 global imports.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 04:37:28 +00:00
Scott Taylor b34dea908f Media: fix unit test after [38296].
https://en.wikipedia.org/wiki/Coupling_(computer_programming)#Disadvantages

Fixes #36246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 04:17:34 +00:00
Weston Ruter ee44093211 Customize: Ensure a newly-added custom link nav menu item has the appropriate CSS class names.
For nav menu items of the `custom` type, their `object` should also be set to `custom`, so that the `menu-item-custom` class name will be added.

Props vishalkakadiya.
Fixes #37575.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 03:12:32 +00:00
Weston Ruter 57740f3c91 Docs: Update jsdoc in `customize-nav-menus.js` to remove references to Menu Customizer plugin.
Also fix `@param` for `updateAssignedLocationsInSectionTitle`.

Props gma992, westonruter.
Fixes #37520.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 00:56:27 +00:00
Weston Ruter 44c499329a Docs: Update outdated phpdoc for `WP_Customize_Manager::validate_setting_values()` to reflect changes in [37942].
Props dlh.
See #37247.
Fixes #37759.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 00:41:31 +00:00
Scott Taylor 4bdd4edb77 Comments: in `WP_Comment_Query::fill_descendants()`, `continue` if there is an empty array in the loop.
See #37416, [38297].

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


git-svn-id: http://core.svn.wordpress.org/trunk@38239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-21 06:43:29 +00:00
Scott Taylor f02f4ac762 Comments: in `WP_Comment_Query::fill_descendants()`, compute `count()` in the first `for` expression so that it does not run on each iteration.
Props vishalkakadiya, deremohan.
Fixes #37416.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-21 06:25:29 +00:00
Scott Taylor b8bfcb0d64 Media: use `wp_get_attachment_metadata()` instead of `get_post_meta()` where appropriate.
Adds unit test.

Props JorritSchippers.
Fixes #36246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-21 06:15:30 +00:00
Scott Taylor 76540c6010 Media: `wp_get_attachment_link()` fails to output text for non-images if the attachment post doesn't have a title and `$text` (argument #5) was not passed to the func. In this case, use the filename.
Props Jonnyauk, henry.wright.
Fixes #37343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 23:45:28 +00:00
Scott Taylor 7ac88c02fa Media: when calling `pathinfo()`, also pass a `PATHINFO_*` constant to avoid array notices for unset keys.
Props JaworskiMatt.
Fixes #37608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 23:36:28 +00:00
Scott Taylor d73964aab6 Media: Add some docs to `media-gallery.js` RIP.
Props jipmoors.
Fixes #37717.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 22:59:29 +00:00
Boone Gorges 344c88d39f Allow attachment taxonomies to be fetched as objects.
By adding the `$output` parameter to `get_attachment_taxonomies()`, the
function signature matches that of `get_object_taxonomies()`. The change
also allows for more consistent behavior when passing `output=objects`
to `get_object_taxonomies()` for the 'attachment' object type, since
the `$output` parameter is now passed through the function stack.

Props codemovement.pk.
See #37368.
Built from https://develop.svn.wordpress.org/trunk@38292


git-svn-id: http://core.svn.wordpress.org/trunk@38233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 17:35:31 +00:00
Boone Gorges 188c568204 Introduce tests for `get_attachment_taxonomies()`.
See #37368.
Built from https://develop.svn.wordpress.org/trunk@38291


git-svn-id: http://core.svn.wordpress.org/trunk@38232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 17:25:30 +00:00
Boone Gorges ece461fbc3 Introduce tests for `get_object_taxonomies()`.
See #37368.
Built from https://develop.svn.wordpress.org/trunk@38290


git-svn-id: http://core.svn.wordpress.org/trunk@38231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 17:01:31 +00:00
Sergey Biryukov 597c067b67 Docs: Correct usage examples for `wpdb::prepare()`, which should not be called statically.
Props TJNowell.
Fixes #37744.
Built from https://develop.svn.wordpress.org/trunk@38289


git-svn-id: http://core.svn.wordpress.org/trunk@38230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 13:17:30 +00:00
Boone Gorges d30a6a988a Query: Non-scalar and negative values for 'p' should always result in a 404.
Previously, the 'p' query var was being run through `absint()`, which
caused unexpected results.

Props Akeif, kouratoras.
Fixes #33372.
Built from https://develop.svn.wordpress.org/trunk@38288


git-svn-id: http://core.svn.wordpress.org/trunk@38229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 02:32:30 +00:00
Boone Gorges 54fe38c7cc Mail: Don't set Sender field when setting From.
[38058] changed `wp_mail()` so that it used PHPMailer's `setFrom()`
method rather than setting the From and FromName headers directly. See
behavior of setting the `Sender` field. This causes `mail` to be
called with the `-f` flag, which causes outgoing email to fail on some
server environments.

Props Clorith, iandunn, DrewAPicture.
Fixes #37736.
Built from https://develop.svn.wordpress.org/trunk@38286


git-svn-id: http://core.svn.wordpress.org/trunk@38227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-20 02:17:38 +00:00
Boone Gorges 53ef9de125 Tests: Move some utility classes to their own files.
Props Frank Klein.
Fixes #37523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-19 15:45:29 +00:00
Sergey Biryukov 83bed74a2f Docs: Fix typo in `load_plugin_textdomain()` parameter description.
Props tivnet.
See #37318.
Built from https://develop.svn.wordpress.org/trunk@38284


git-svn-id: http://core.svn.wordpress.org/trunk@38225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-19 14:29:30 +00:00
Boone Gorges 0da0aae4b0 Add wordpress-importer tests demonstrating slashed data behavior.
See #21007.
Built from https://develop.svn.wordpress.org/trunk@38283


git-svn-id: http://core.svn.wordpress.org/trunk@38224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-19 13:27:30 +00:00
Aaron Jorbin a138374ec8 Bootstrap/Load: Include Plugin API via `require_once`
Currently, auto-prepended files need to directly modify the globals in order to add filters and actions. This is a bad idea. Globals are bad. You should never directly interact with the Plugin globals.

Fixes #37707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-19 04:10:30 +00:00
Aaron Jorbin 18f14ad752 Fix jshint of Gruntfile.js
Introduced in [38276]

See #37720.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 20:05:30 +00:00
Scott Taylor 3357ca23e6 Query: use composition for `$db` in `WP_Date_Query`, removes need to import `global $wpdb` in multiple methods.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 19:48:34 +00:00
Scott Taylor 9b393cea42 Query: use composition for `$db` in `WP_Query`, removes need to import `global $wpdb` in multiple methods.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 19:39:29 +00:00
Scott Taylor c606046d73 Unit Tests: skip checking the value in `Tests_User:test_user_properties` for `db`. Casting to `array` is not the most elegant thing here, and various versions of PHP key protected/private fields differently when objects are cast.
See [38275], #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 19:38:29 +00:00
Boone Gorges 2b7d7f4833 In `is_object_in_term()`, return error object rather than caching it.
This change prevents an error object from being stored in the cache,
and prevents notices from being thrown when plucking term IDs to put
into the relationship cache.

See #32044, #36814.

Props rpayne7264.
Fixes #37721.
Built from https://develop.svn.wordpress.org/trunk@38277


git-svn-id: http://core.svn.wordpress.org/trunk@38218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 19:15:32 +00:00
Aaron Jorbin 6836de32d1 External Libraries: Update Minified version of jquery.masonry.js
WordPress maintains the minified version of jquery.masonry.js since there is no official build, however it has been excluded from grunt's minification process. This adds a minification task to grunt, adds it to the precommit hook for JS, minifies the file, and bumps the version on jquery.masonry.min.js. The change to the non minified version was introduced in [38261].

Fixes #37720.  See #37666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 18:55:30 +00:00
Scott Taylor e7ffad7fac Query: add a `protected` field, `$db`, (composition, as it were) to `WP_*_Query` classes to hold the value for the database abstraction, instead of importing the `global $wpdb` into every method that uses it. Reduces the number of global imports by 32.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 18:21:31 +00:00
Dion Hulse 1dd3ed4bd5 Requests: Update to Requests master (fb5b517) which corrects a logic inversion in the cURL transport checks.
Previously if a host had only disabled one of `curl_init()` or `curl_exec()` it wouldn't get detected correctly by Requests, which caused cURL warnings for users on an affecte dhost.

Fixes #37700 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 03:48:31 +00:00
Aaron Jorbin 2bd32687b3 Build/Test Tools: Ensure PHP 7.1 is tested on Travis.
PHP 7.1 is the next version of PHP and WordPress should support it with the first major version after 7.1 launches. This will facilitate testing. Failures on 7.1 won't necessitate builds failing while 7.1 is still in beta.

Fixes #37625.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-17 20:47:30 +00:00
John Blackbourn 594b88661a Permalinks: Correct the documentation for the `get_sample_permalink` filter, and improve the documentation for the `get_sample_permalink()` function.
Props sebastian.pisula for the original patch
Fixes #37682

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


git-svn-id: http://core.svn.wordpress.org/trunk@38213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-17 18:30:30 +00:00
Dominik Schilling 14cbd0e730 About Page: Add release video and move images to CDN.
Props jerrysarcastic, rosso99, petya, hugobaeta, jerrysarcastic.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38267


git-svn-id: http://core.svn.wordpress.org/trunk@38208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-16 17:58:30 +00:00
Dominik Schilling 75d4429926 Post Thumbnails: Restore thumbnail support for media files.
* Allow to add/remove a featured image to `attachment:audio` and `attachment:video` post types, see [27657].
* Change conditionals to check for theme OR post type support.
* Add tests for #12922.

Broken in [37658].

Props flixos90, joemcgill, DrewAPicture, wonderboymusic.
See #12922.
Fixes #37658.
Built from https://develop.svn.wordpress.org/trunk@38263


git-svn-id: http://core.svn.wordpress.org/trunk@38204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-15 19:16:31 +00:00
Aaron Jorbin 9c526c8a24 External Libraries: Update Masonry shim to prevent error using isAnimated option
The isAnimated option throws an error and causes Masonry to stop functioning. Masonry.prototype.options is no longer defined in 3.3.2, this.options is and does the same. Masonry was updated to 3.3.2 in [37891].

Reported upstream: https://github.com/desandro/masonry-v2-3-shim/pull/1

Props stephenharris, ocean90, azaozz for testing and second sign off.
See #37666, #32802.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-15 18:20:30 +00:00
Dominik Schilling 2ccd9b46dd About Page: Enhance responsive images.
* Add `srcset` and `sizes` to the mobile image for streamlined updates.
* Modify the order of image candidate strings in each `srcset` to address a bug in iOS8 where the first candidate will always be selected when using `w` descriptors, see #35030.

Props joemcgill.
Fixes #37246.
Built from https://develop.svn.wordpress.org/trunk@38257


git-svn-id: http://core.svn.wordpress.org/trunk@38198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 19:28: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
Drew Jaynes 1691196110 Docs: Add a period missed in an argument description in [38253] for #36338.
Built from https://develop.svn.wordpress.org/trunk@38254


git-svn-id: http://core.svn.wordpress.org/trunk@38195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 17:44:28 +00:00
Drew Jaynes 51810b926a Docs: Add documentation for all arguments accepted by `export_wp()`.
Props theMikeD for the initial patch.
Fixes #36338.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 17:43:28 +00:00
Aaron Jorbin 7e14c27bb9 Bootstrap/Load: Revert Plugin Global restoration around `advance-cache.php`.
First added in [37588] and later modified in [38224], the idea was to ensure that filters/actions added before `advance-cache.php` would not disappear if `advance-cache.php` overloaded the filters/actions with code such as `$wp_filter = array()`. This is an edge case and one that there is no documented case of existing.

This restores the behavior from WordPress 4.5 and before. It is strongly encouraged that developers using `advance-cache.php` to use the Plugins API that is available before the loading of `advance-cache.php` rather than directly interacting with any of the globals.

Props azaozz, jorbin, dd32 for review, pento for review, westi for investigation, ipstenu for research.
See #36819.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-13 16:00:33 +00:00
Sergey Biryukov f25445a378 Users: Merge two duplicate strings introduced in [37940].
Props dimadin.
Fixes #37644.
Built from https://develop.svn.wordpress.org/trunk@38250


git-svn-id: http://core.svn.wordpress.org/trunk@38191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-12 14:12:32 +00:00
Dominik Schilling 3a0771b986 About Page: Fix punctuation errors in two strings.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38248


git-svn-id: http://core.svn.wordpress.org/trunk@38189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-11 20:51:46 +00:00
Dominik Schilling eb02dac3e7 About Page: Third pass for 4.6.
* Adjust strings.
* Make strings translatable.
* Improve margin between copy and images.

Props Ipstenu, SergeyBiryukov, Presskopp, jeremyfelt, afragen, helen, Clorith, macmanx, DrewAPicture, voldemortensen, jorbin, MattyRob, ocean90.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38244


git-svn-id: http://core.svn.wordpress.org/trunk@38185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 23:33:30 +00:00
Dominik Schilling 0d2106e2eb Upgrader: Rename `class-wp-automatic-upgrader.php` to `class-wp-automatic-updater.php`.
The class is named `WP_Automatic_Updater` not `WP_Automatic_Upgrader` like all the other upgrader classes. 

Introduced in [37409].
See #37628.
Built from https://develop.svn.wordpress.org/trunk@38242


git-svn-id: http://core.svn.wordpress.org/trunk@38183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 19:51:29 +00:00
Andrew Ozz 0d4320fcbc Update/Install error messages: do not escape from the template, escape the error message string before inserting it.
Props swissspidy, ocean90.
Fixes #37623 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38240


git-svn-id: http://core.svn.wordpress.org/trunk@38181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 19:03:31 +00:00
Sergey Biryukov df97f83cb6 Docs: Replace some more HTTP links with HTTPS.
Props johnpgreen.
Fixes #37622. See #36993.
Built from https://develop.svn.wordpress.org/trunk@38239


git-svn-id: http://core.svn.wordpress.org/trunk@38180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-10 16:10:31 +00:00
Drew Jaynes 7643afd97c Update/Install: Provide basic back-compat styling for the `.update-message` CSS class in the plugins list table.
This change restores only the margin and padding styles for the `.update-message` class when used by plugins in the context of adding arbitrary rows to the list table. The inline-update colors and icon styles were not restored, expressly with a wide variety of plugin use-cases in mind.

Props ovann86, rahulsprajapati, ocean90, DrewAPicture.
Props helen for review.
See #37504.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 22:45:40 +00:00
Dominik Schilling 771fc167b6 Media: In `_wp_handle_upload()` use `call_user_func_array()` to call the upload error handler.
The default error handler `wp_handle_upload_error()` expects a reference for the first parameter but `call_user_func()` doesn't pass parameters by reference. The current code didn't produce any issues until now. PHP 7.0.9 (and PHP 7.1) is now stricter and prevents calling the error handler with a warning:
> PHP Warning:  Parameter 1 to wp_handle_upload_error() expected to be a reference, value given.

To restore the error handler `_wp_handle_upload()` now uses `call_user_func_array()`.

Props jbrinley.
Props jorbin for review.
Fixes #37570.
Built from https://develop.svn.wordpress.org/trunk@38235


git-svn-id: http://core.svn.wordpress.org/trunk@38176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 21:54:30 +00:00
Dominik Schilling 5d9f94693e About Page: Update video for streamlined updates and add `srcset`/`sizes` attributes for the static images.
Props hugobaeta, joemcgill.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38234


git-svn-id: http://core.svn.wordpress.org/trunk@38175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 19:26:30 +00:00
Jeremy Felt eaffe99260 Multisite: Remove unnecessary reference parameters.
There is no advantage to passing parameters by reference to `get_site()`, `get_network()`, and `update_site_cache()`.

Props flixos90, ocean90 for review.
See #37615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 18:12:31 +00:00
Sergey Biryukov 822db9ce1d Embeds: Fix copy/paste error in `WP_oEmbed::_add_provider_early()` description.
Props ivantedja.
Fixes #37602.
Built from https://develop.svn.wordpress.org/trunk@38230


git-svn-id: http://core.svn.wordpress.org/trunk@38171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 14:10:30 +00:00
Gary Pendergast 210e23a63d Multisite: Improve performance of the upgrade page on large networks.
The query to select the next 5 blogs to upgrade was ordered by `registered`, which isn't indexed. This causes the query to table scan, which will be slow on networks with many blogs.

The query only needs to be ordered by something that won't change, so ordering by `blog_id` is a good replacement. `blog_id` is indexed, and it's the only column being returned, so MySQL is able to optimize for a fast index read.

Props fliespl.
Fixes #37612.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 11:39:36 +00:00
Dominik Schilling cb131d8d5f Updates: Add visual feedback when deleting themes/plugins.
This corrects the selector for the delete link in `wp.updates.deletePlugin()` so the text can be changed to 'Deleting…'. `wp.updates.deleteTheme()` already worked on wp-admin/themes.php but not on wp-admin/network/themes.php because the network screen is similar to the plugins list table, this is now fixed too.
The `credential-modal-cancel` handler has been updated to support canceled delete jobs.

Props swissspidy.
Props jorbin for review.
Fixes #37603.
Built from https://develop.svn.wordpress.org/trunk@38227


git-svn-id: http://core.svn.wordpress.org/trunk@38168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 10:39:32 +00:00
Dominik Schilling 9970c6ca5a Dashboard: Don't escape widget titles in screen reader text.
Introduced in [37972]. The title for the Quick Draft widget contains HTML to provide a JS/no-JS version.

Props SergeyBiryukov for review.
See #37595.
Fixes #37594.
Built from https://develop.svn.wordpress.org/trunk@38225


git-svn-id: http://core.svn.wordpress.org/trunk@38166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 09:07:30 +00:00
Gary Pendergast 4ac3feaa64 Boostrap/Load: Improve forward compatiblity of plugin global backup methods.
[37588] added methods to backup the plugin globals, for ensuring that advanced cache drop-ins don't overwrite hooks that've been added earlier in the load process.

The method for restoring the plugin globals wasn't compatible with the implementation of `WP_Hook` in #17817. `WP_Hook` implements `ArrayAccess`, so `_restore_plugin_globals()` was treating it as an array, and inadvertantly overwriting the `WP_Hook` object with a plain array.

To avoid having to re-write this code as part of #17817, we now use `add_filter()` to restore any hooks that were added by cache drop-ins, which `WP_Hook` correctly supports.

Props pento, jorbin.
See #36819.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 01:45:29 +00:00
Aaron Jorbin b3b32f22a1 Updates: Improve experience for Bulk Actions when FTP is dismissed.
Before this change, when a bulk update was canceled due dismissing the FTP credentials modal, part of the actions didn't get canceled.  This meant the "There is a new version of…” notices become blank and the updates you had checked became unchecked.  Now, the notices remain and you are essentially returned to the screen you had before. Strings are also updated to improve ARIA usage.

Fixes #37563.
Props ocean90, swissspidy, obenland, afercia.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-09 01:14:28 +00:00
Aaron Jorbin b86f7a832b Updates: Standardize JS Custom Event Names
Custom JS events are triggered on the document in order for plugins to have something to hook into.  The standard began in #31819 is dash separated and begins with `wp` to signify the namespace, followed by the subject of our action ( "theme", "plugin", etc.) followed by the action and an optional indicator of status ( "install-success", "deleting" ).

This brings some of the theme hooks in line with the standard.  As of now, all plugin actions in `src/wp-admin/js/updates.js` have an equal corresponding theme action.

Fixes #37598.
See #37512, #37216, #31819.
Props olarmarius, ocean90.



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


git-svn-id: http://core.svn.wordpress.org/trunk@38159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-08 22:49:28 +00:00
Jeremy Felt b45adc74df Multisite: Use `get_current_blog_id()` in `get_site()` for current site.
The global `$current_blog` is not switched in `switch_to_blog()` and can
not be used to properly retrieve current switched site information.

See #37607.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-08 22:33:28 +00:00
Boone Gorges 0ddbc2c99f Improve category check in `redirect_canonical()` when permastruct contains category slug.
[37262] changed a check in `redirect_canonical()` so that it checked
categories in the object cache rather than querying the database. However,
the check was based on the identity of `WP_Term` objects, which in
certain cases can be augmented by the main WP query routine, causing
failures of the `in_array()` check. This caused unnecessary redirects
for URLs where `is_single()` is true, but the URL is different from the
post permalink, such as the `embed` endpoint.

`has_term()` also checks the cache, but does not sufer from this bug.

Props cmillerdev.
Fixes #36602.
Built from https://develop.svn.wordpress.org/trunk@38216


git-svn-id: http://core.svn.wordpress.org/trunk@38157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-08 18:49:28 +00:00
Dominik Schilling e9fb6e42be About Page: Use a better version of the mp4 video.
The previous version had the wrong colors. Also remove ogv from the list, it has the wrong colors too and all current browsers support either the mp4 or webm format.

See #37246.
Built from https://develop.svn.wordpress.org/trunk@38215


git-svn-id: http://core.svn.wordpress.org/trunk@38156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-08 16:02:32 +00:00
Dominik Schilling 55c3fa0cb0 About Page: Second pass for 4.6.
* Update images for native fonts and editor features.
* Add video animation with image fallback for update feature. 
* Rename "Simplified Disaster Recovery" to "Content Recovery".
* Fix broken layout on credits and freedoms pages.

Props hugobaeta, SergeyBiryukov, ocean90.
Fixes #37590.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38213


git-svn-id: http://core.svn.wordpress.org/trunk@38154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-07 12:48:30 +00:00
Scott Taylor 0598f0bc4b Taxononmy: set `WP_Term_Query::terms` when returning terms from the cache in `WP_Term_Query::get_terms()`.
See #37591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-07 04:48:29 +00:00
Scott Taylor e78197c461 Taxononmy: add unit that shows that `WP_Term_Query` is broken when the query is read from the cache.
See #37591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-07 04:43:30 +00:00
Dominik Schilling 1cef5f60f9 Update/Install: Remove the `.notice-error` class before adding classes for the update process.
Prevents displaying an update message with error styling.

Props obenland.
Props SergeyBiryukov for review.
Fixes #37550.
Built from https://develop.svn.wordpress.org/trunk@38209


git-svn-id: http://core.svn.wordpress.org/trunk@38150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 22:57:29 +00:00
Dominik Schilling 427f4b625d Customize: Increase the target size of the 'Edit Menu' button.
Props celloexpressions.
Props afercia, helen for review.
Fixes #36795.
Built from https://develop.svn.wordpress.org/trunk@38207


git-svn-id: http://core.svn.wordpress.org/trunk@38148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 22:38:29 +00:00
Dominik Schilling 572a9cb488 Update/Install: Replace "error" and "-1" failure messages with a more meaningful one.
* "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'.
* "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'.
* Escape the message in `wp-updates-admin-notice` because the response may include HTML.
* Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable.

Props azaozz for review.
Fixes #37583.
Built from https://develop.svn.wordpress.org/trunk@38205


git-svn-id: http://core.svn.wordpress.org/trunk@38146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 19:28:30 +00:00
Andrew Nacin 4ff8257cb4 MediaElement: Remove translated string from a plugin WP doesn't bundle.
fixes #37394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-05 04:44:35 +00:00
John Blackbourn ab052361a3 Docs: Correct and clarify various `@since` docs.
Fixes #37562

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


git-svn-id: http://core.svn.wordpress.org/trunk@38142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:54:31 +00:00
Dominik Schilling 58d772a02f Upgrade/Install: Make some install/update failures more verbose.
An upgrader class is used in conjunction with an upgrader skin class. A skin class handles the logging for an upgrade and informs a user about the progress and failures.
The current Ajax install/update handlers are using the `Automatic_Upgrader_Skin` class because during an Ajax request no output is intended. The difference between Ajax updates and automatic updates is that you will see the full log (usually by email) while Ajax updates focus only on success or failure. For that `Automatic_Upgrader_Skin` has one disadvantage: It doesn't provide a way to retrieve failure messages which were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the `error()` and `feedback()` methods to intercept all errors, which can be a `WP_Error` object or a string.

This updates all four Ajax handler for installing/updating themes/plugins to use the new skin. They now also check the skin for any intercepted errors and pass them on to the user.

Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
Fixes #37531.
Built from https://develop.svn.wordpress.org/trunk@38199


git-svn-id: http://core.svn.wordpress.org/trunk@38140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:18:30 +00:00
John Blackbourn dc3d64ed9c I18N: Correct the documented return types of `get_translations_for_domain()`.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@38139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 22:13:29 +00:00
Dominik Schilling c9c2377b1d Plugins: Also update `aria-label`s when a plugin update fails.
Previously the label was stuck at "Updating…".

Props afercia, ocean90.
Props DrewAPicture for review.
Fixes #37556.
Built from https://develop.svn.wordpress.org/trunk@38196


git-svn-id: http://core.svn.wordpress.org/trunk@38137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 21:06:38 +00:00
Dominik Schilling ea6e749c71 Emoji: Update the Twemoji loader to include the rainbow flag.
[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.

Props pento.
See #37543.
Fixes #37566.
Built from https://develop.svn.wordpress.org/trunk@38194


git-svn-id: http://core.svn.wordpress.org/trunk@38135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 20:51:31 +00:00
Sergey Biryukov 6182c9f805 Formatting: In `remove_accents()`, correct replacements for:
* Latin small letter n preceded by apostrophe
* Latin capital letter Eng
* Latin small letter Eng

Props gitlost.
Fixes #37564.
Built from https://develop.svn.wordpress.org/trunk@38193


git-svn-id: http://core.svn.wordpress.org/trunk@38134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 13:56:29 +00:00
Dion Hulse 2d860ae3d6 Requests: Merge handling for custom HTTP methods.
This merges the latest changes to Requests from upstream to add support for custom HTTP methods.
See 1b5ffd8501

Props Ipstenu, ocean90.
Fixes #37503 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-04 07:14:31 +00:00
Dominik Schilling 7ff940d217 Customize: Make the menu edit button look like a link.
The button was introduced in [37901] to allow users switching to the selected menu for further edits. A link makes it more clear that the user is taken away from the current view.
This also adds an aria label and makes the button label more verbose, 'Edit Menu'.

Props afercia.
Props helen for review.
Fixes #36795.
Built from https://develop.svn.wordpress.org/trunk@38189


git-svn-id: http://core.svn.wordpress.org/trunk@38130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:45:30 +00:00
Aaron Jorbin 4d71eb8423 Updates: Clean up debug statements.
Removing some `console.error` calls leftover from development and wrapping the `console.log` call in a check to ensure `console.log` exists.

Fixes #37514.
Props ocean90, obenland


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


git-svn-id: http://core.svn.wordpress.org/trunk@38127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:28:39 +00:00
Aaron Jorbin 94ac1499cf Updates: Improve bulk update failure notice
When doing a bulk update, if there are failures the user needs to know about that. This makes it clearer that you can click on the notification to see more details, especially for screen reader users.

Fixes #37510.
Props  juhise, Ankit K Gupta, afercia, jorbin, ocean90. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@38126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 22:24:35 +00:00
Dominik Schilling ada44f2e13 About Page: First pass for 4.6 with strings (not yet translatable) and images (not CDN).
Props macmanx, jorbin, hugobaeta, DrewAPicture, peterwilsoncc, iamfriendly, rahulsprajapati, vishalkakadiya, petya, celloexpressions, westonruter, mikeschroder, zetaraffix, mapk, boonebgorges, adamsilverstein, jeremyfelt, rosso99, karmatosed, swissspidy, michael-arestad, ramiy, ocean90.
See #37246.
Built from https://develop.svn.wordpress.org/trunk@38183


git-svn-id: http://core.svn.wordpress.org/trunk@38124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 19:54:48 +00:00
Boone Gorges a2f34d9ee0 In `WP_Term_Query`, accept a string value for `taxonomy`.
Props endocreative.
Props ocean90 for review.
Fixes #37545.
Built from https://develop.svn.wordpress.org/trunk@38181


git-svn-id: http://core.svn.wordpress.org/trunk@38122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 13:51:30 +00:00
Gary Pendergast c6b0f5438a Emoji: Add support for the Rainbow and Pirate flag emoji.
Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development.

Props ocean90 for the code review.

See #37543.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-03 00:11:32 +00:00
Helen Hou-Sandí c914411a30 Trunk is now 4.7-alpha.
Built from https://develop.svn.wordpress.org/trunk@38178


git-svn-id: http://core.svn.wordpress.org/trunk@38119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-02 13:45:30 +00:00
Aaron Jorbin 472e0d1978 Upgrade/Install: Trigger additional JS events in shiny updates
Events for updating exist, but they lack context. This adds args so that plugins can detec t what plugin/theme is being installed.  Additionally, events for bulk actions, deleting and that and install is starting didn't exist, so this adds them.

Fixes #37512.
Props DavidAnderson, and ocean90, swissspidy for review.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:57:28 +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
Dominik Schilling e64c675fc5 HTTP API: Set `$use_authentication` property of `Requests_Proxy_HTTP` to true when proxy authentication is required.
Props francescobagnoli for initial patch.
Fixes #37494.
Built from https://develop.svn.wordpress.org/trunk@38173


git-svn-id: http://core.svn.wordpress.org/trunk@38114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:20:29 +00:00
Dominik Schilling 1abd5f0be7 Plugins: Use `install_plugins_upload` action to print the upload form.
Since [37221] the upload form is added to every plugin install screen via `install_plugins_upload()`. Previously the form was added through the `install_plugins_upload` (alias of `install_plugins_$tab`) action which allowed plugin authors to replace the form. This restores the previous behaviour.

* Add the form only to non-upload plugin install screens.
* Replace `install_plugins_upload()` with the `install_plugins_upload` and `install_plugins_pre_upload` actions.
* Remove `$upload_tab_class` and add a CSS class for the current tab to `.wrap`
* Adjust CSS selectors and toggle the whole container to support upload without an `upload-plugin` class.

Props DavidAnderson, ocean90.
Fixes #37495.
Built from https://develop.svn.wordpress.org/trunk@38172


git-svn-id: http://core.svn.wordpress.org/trunk@38113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 18:11:29 +00:00
Dominik Schilling f6e5d8db6c Bundled Themes: Bump versions and update theme tags.
* Twenty Ten 2.2
* Twenty Eleven 2.5
* Twenty Twelve 2.1
* Twenty Thirteen 2.0
* Twenty Fourteen 1.8
* Twenty Fifteen 1.6

Props davidakennedy.
Fixes #37426.
Built from https://develop.svn.wordpress.org/trunk@38171


git-svn-id: http://core.svn.wordpress.org/trunk@38112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-31 16:37:32 +00:00
Dominik Schilling ba12f4e95f Post WordPress 4.6 RC 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@38170


git-svn-id: http://core.svn.wordpress.org/trunk@38111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 19:02:30 +00:00
Dominik Schilling da0661adc1 WordPress 4.6 RC 1.
Built from https://develop.svn.wordpress.org/trunk@38169


git-svn-id: http://core.svn.wordpress.org/trunk@38110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 18:30:21 +00:00
Dominik Schilling 3105764efd Plugins: Move capability checks further up in `wp_ajax_update_plugin()` and `wp_ajax_delete_plugin()`.
Add tests for both Ajax handlers.

Props Yorick Koster, swissspidy.
Fixes #37490.
Built from https://develop.svn.wordpress.org/trunk@38168


git-svn-id: http://core.svn.wordpress.org/trunk@38109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 17:44:41 +00:00
Dominik Schilling e4abc1ecbf Filesystem API: Output buffering for `request_filesystem_credentials()` should wrap the function directly.
Previously `ob_end_clean()` was only called when the previous condition was successful which led to unexpected results when another output buffering was involved, like PHPUnit's.

Fixes #37488.
Built from https://develop.svn.wordpress.org/trunk@38167


git-svn-id: http://core.svn.wordpress.org/trunk@38108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 17:11:56 +00:00
Weston Ruter 9ee1823d91 Customize: Prevent customize-preview-widgets JS errors in preview if a sidebar is registered with empty before_widget/after_widget params.
Selective refresh will not be available for widgets when they lack these params, so previewing will fallback to full page refreshes. Sidebars registered as such should be rare so this accounts for an edge case.

Fixes #37478.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 16:27:30 +00:00
Dominik Schilling 7e49f103be HTTP API: All non-GET/HEAD requests should put the arguments in the form body.
Requests defaults to _GET/query for HEAD/GET/DELETE and _POST/body for POST/PUT/OPTIONS/PATCH. For backward compatibility `WP_HTTP` needs to force `data_format` to 'body' for all non-GET/HEAD requests.

Props dd32.
Fixes #37456.
Built from https://develop.svn.wordpress.org/trunk@38165


git-svn-id: http://core.svn.wordpress.org/trunk@38106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 15:52:28 +00:00
Dominik Schilling b2607f8d78 HTTP API: Normalize cookies before passing them to Requests.
Requests has its own cookie object in form of `Requests_Cookie`. Therefore we have to convert `WP_Http_Cookie` objects to `Requests_Cookie`.
This introduces `WP_Http_Cookie::get_attributes()` to retrieve cookie attributes of a `WP_Http_Cookie` object and `WP_Http::normalize_cookies()` to convert the cookie objects.

Fixes #37437.
Built from https://develop.svn.wordpress.org/trunk@38164


git-svn-id: http://core.svn.wordpress.org/trunk@38105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 15:32:27 +00:00
Dominik Schilling 962f107035 HTTP API: Bump version of Requests to 1.7.
See #33055.
Built from https://develop.svn.wordpress.org/trunk@38163


git-svn-id: http://core.svn.wordpress.org/trunk@38104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 14:55:28 +00:00
Sergey Biryukov ccf7a5ef24 I18N: After [38077], merge two duplicate strings in `wp_insert_term()` and `wp_update_term()`.
Props ramiy.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38162


git-svn-id: http://core.svn.wordpress.org/trunk@38103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 10:43:27 +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
Andrew Ozz 37018fded6 TinyMCE: fix the calculation for the inline toolbar vertical position.
Fixes #37481.
Built from https://develop.svn.wordpress.org/trunk@38160


git-svn-id: http://core.svn.wordpress.org/trunk@38101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-27 02:59:31 +00:00
Andrew Ozz 5bccb0020d TinyMCE, inline link:
- Remove proxying through WordPress to test if an URL exists.
- Fix and enhance the regex that tests if the URL is well formed.

Fixes #36638.
Built from https://develop.svn.wordpress.org/trunk@38159


git-svn-id: http://core.svn.wordpress.org/trunk@38100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 23:24:28 +00:00
Andrew Ozz 101545cbb5 TinyMCE, wpView:
- Add the `wpview-wrap` class and pass third param to the getNodes() callback for back-compat.
- Attach the mutation observer that resizes a view iframe inside the iframe to minimize memory use/leaks.
- Remove the `wp-mce-view-unbind` event. It has never been particularly reliable and now it doesn't fire when the user deletes a view by typing or pasting over it.
- Restore changing of a view iframe body classes when the editor body classes change.

Props iseulde, azaozz.
Fixes #36434.
Built from https://develop.svn.wordpress.org/trunk@38158


git-svn-id: http://core.svn.wordpress.org/trunk@38099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 23:13:28 +00:00
Andrew Ozz 59c1e02c84 TinyMCE, wpView: bail early when the iframe node is not attached to the DOM. We can't load any HTML in it as here is no `iframe.contentWindow` in these cases.
See #36434.
Built from https://develop.svn.wordpress.org/trunk@38157


git-svn-id: http://core.svn.wordpress.org/trunk@38098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 22:06:28 +00:00
Andrew Ozz b86015e78b TinyMCE: fix selecting an image on touch in iOS Safari for TinyMCE 4.4.1.
Fixes #37427.
Built from https://develop.svn.wordpress.org/trunk@38156


git-svn-id: http://core.svn.wordpress.org/trunk@38097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 21:51:27 +00:00
Andrew Ozz fd29d3e3a3 TinyMCE: upgrade to 4.4.1, changelog: https://www.tinymce.com/docs/changelog/#version441-july262016.
See #37427.
Fixes #37476.
Built from https://develop.svn.wordpress.org/trunk@38155


git-svn-id: http://core.svn.wordpress.org/trunk@38096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 21:47:28 +00:00
Dominik Schilling de5a513027 Plugins: Use `history.pushState()` to customize the URL during searches.
`history.pushState()` requires an event handler for `popstate` which doesn't exist (yet).

Props rahulsprajapati for initial patch.
Fixes #37233.
Built from https://develop.svn.wordpress.org/trunk@38154


git-svn-id: http://core.svn.wordpress.org/trunk@38095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 20:01:28 +00:00
Helen Hou-Sandí 8f6517c275 System fonts: Adjust the smaller tabs so they appear as tabs.
The tab effect comes from overlapping the border of the box below. Only applies to OSX; testing did not reveal adverse effects in other OSes.

props ocean90.
see #36753.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 16:46:29 +00:00
Helen Hou-Sandí 6d28c85bc7 System fonts: Don't quote single-word font names, per our coding standards.
props ocean90, netweb.
see #36753.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 16:39:30 +00:00
Dominik Schilling d7253ca244 Filesystem API: Prevent an endless self-calling loop in `wp_tempnam()`.
Under certain conditions upgrades on Windows may fail because `wp_tempnam()` gets called in a loop.
This can happen when `wp_tempnam()` is called with `\.maintenance` for the `$filename` parameter. The function strips the extension, in this case `.maintenance`, which results in an empty filename. Because it's empty, `wp_tempnam()` calls itself with `dirname( '\.maintenance' )`. On *nix systems this would be `"/"` which allows `wp_tempnam()` to fall back on `time()`. But on Windows it's `"\"`.

This change adds the backslash to the list of characters which allow `wp_tempnam()` to fall back on `time()`.

See [32322], [31936].
Fixes #33999.
Built from https://develop.svn.wordpress.org/trunk@38151


git-svn-id: http://core.svn.wordpress.org/trunk@38092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 15:28:29 +00:00
Sergey Biryukov 9631611e92 I18N: Add a translator comment for two MediaElement.js strings added in [38089].
Props ideag.
See #37453, #37394.
Built from https://develop.svn.wordpress.org/trunk@38150


git-svn-id: http://core.svn.wordpress.org/trunk@38091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 14:16:29 +00:00
Sergey Biryukov fdc07533f5 Plugins: Add a missing space between classes on `<td>` element for custom columns of the Plugins list table.
Props crstauf.
Fixes #37460.
Built from https://develop.svn.wordpress.org/trunk@38149


git-svn-id: http://core.svn.wordpress.org/trunk@38090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 13:28:28 +00:00
Sergey Biryukov 18601e4b5a Docs: In `wp_schedule_single_event()`, add a note about scheduling an event to occur within 10 minutes of another event with the same action hook.
Props medariox.
Fixes #37455.
Built from https://develop.svn.wordpress.org/trunk@38148


git-svn-id: http://core.svn.wordpress.org/trunk@38089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-25 12:23:30 +00:00
Sergey Biryukov a7a8585640 Posts, Post Types: Remove a redundant `function_exists( 'mb_strlen' )` check in `get_sample_permalink_html()`.
`mb_strlen()` is always available since [32114].

See #30633.
Built from https://develop.svn.wordpress.org/trunk@38147


git-svn-id: http://core.svn.wordpress.org/trunk@38088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 13:08:44 +00:00
Dominik Schilling 51671afc0a List Table: Improve `WP_Plugins_List_Table::search_box()` which was added in [38033].
* Update DocBlock to use third-person singular verb and to include a period at the end.
* Use `submit_button()` for the submit button.
* Escape the ID attribute.
* Apply the same to `WP_List_Table::search_box()`.

See #37230.
Built from https://develop.svn.wordpress.org/trunk@38146


git-svn-id: http://core.svn.wordpress.org/trunk@38087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 11:00:36 +00:00
Sergey Biryukov db9ec644f5 Permalinks: In `get_page_uri()`, don't prepend a parent page slug if it's empty.
Props inderpreet99, SergeyBiryukov.
Fixes #36174.
Built from https://develop.svn.wordpress.org/trunk@38145


git-svn-id: http://core.svn.wordpress.org/trunk@38086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 10:05:49 +00:00
Sergey Biryukov 2a4a8c0861 Unit Tests: Add a `@ticket` reference for `test_get_page_uri_without_argument()`.
See #26284.
Built from https://develop.svn.wordpress.org/trunk@38144


git-svn-id: http://core.svn.wordpress.org/trunk@38085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 08:55:27 +00:00
Sergey Biryukov 452e32f2df Unit Tests: Move `get_page_uri()` tests to `post/getPageUri.php`, added in [37345].
See #26284.
Built from https://develop.svn.wordpress.org/trunk@38143


git-svn-id: http://core.svn.wordpress.org/trunk@38084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-23 08:53:28 +00:00
Sergey Biryukov 995dc513a4 Docs: Update the description of the `$box` argument of `wp_nav_menu_item_taxonomy_meta_box()` for consistency with [38129].
Missed in [38130].

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38142


git-svn-id: http://core.svn.wordpress.org/trunk@38083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 16:50:28 +00:00
Dominik Schilling 50ca05f8cd Plugins: Make search field placeholder translatable.
See #37230.
Built from https://develop.svn.wordpress.org/trunk@38141


git-svn-id: http://core.svn.wordpress.org/trunk@38082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 14:51:28 +00:00
Dominik Schilling c61d62675a Docs: Fix typo in hook description for `customize_save_validation_before`.
See #37318.
Built from https://develop.svn.wordpress.org/trunk@38140


git-svn-id: http://core.svn.wordpress.org/trunk@38081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 13:51:28 +00:00
Dominik Schilling 06c71ee6ec Docs: Fix minor formatting issue for a comment added in [38113].
See #32171.
Built from https://develop.svn.wordpress.org/trunk@38139


git-svn-id: http://core.svn.wordpress.org/trunk@38080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 13:46:28 +00:00
Dominik Schilling 3a3828c396 Filesystem API: Change the default value for the `$context` parameter of `get_filesystem_method()` and `request_filesystem_credentials()` to an empty string.
`$context` is a full path to the directory that is tested for being writable. A path shouldn't be a boolean value.
This also updates `WP_Upgrader_Skin::request_filesystem_credentials()` and `Automatic_Upgrader_Skin::request_filesystem_credentials()` and adds missing docs.

Props DrewAPicture, ocean90.
Fixes #37412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 12:10:27 +00:00
Dominik Schilling eb0ee24750 Post Thumbnails: Remove an unused nonce in `_wp_post_thumbnail_html()`.
See #12922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 11:44:28 +00:00
Dominik Schilling c4dfc0adba Media: Remove global import for `$content_width` in `_wp_post_thumbnail_html()`.
`$content_width` is unused since [35023].

See #28512.
Built from https://develop.svn.wordpress.org/trunk@38136


git-svn-id: http://core.svn.wordpress.org/trunk@38077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 11:40: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 a20e16d3c6 Docs: Change type of `WP_Upgrader_Skin::$result` to 'string|bool|WP_Error'.
`$result` can be `true` too, see `Language_Pack_Upgrader::bulk_upgrade()`.

See #32246.
Built from https://develop.svn.wordpress.org/trunk@38134


git-svn-id: http://core.svn.wordpress.org/trunk@38075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-22 10:43:29 +00:00
Sergey Biryukov 2cbe10e79c Database: Replace incorrect use of `E_USER_NOTICE` in `wpdb::_real_escape()` with the version number where the message was added.
Props andizer.
Fixes #36403.
Built from https://develop.svn.wordpress.org/trunk@38133


git-svn-id: http://core.svn.wordpress.org/trunk@38074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 22:45:28 +00:00
Sergey Biryukov db523ad623 Editor: Improve styling of "Add Media" button on mobile and make it more consistent with media buttons added by plugins.
Props FolioVision.
Fixes #36999.
Built from https://develop.svn.wordpress.org/trunk@38132


git-svn-id: http://core.svn.wordpress.org/trunk@38073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 21:54:32 +00:00
Sergey Biryukov 0a9bfead1c Docs: In meta box functions, clarify that "Meta box ID" refers to the `id` attribute of the meta box and not a numeric ID.
Fixes #37211.
Built from https://develop.svn.wordpress.org/trunk@38131


git-svn-id: http://core.svn.wordpress.org/trunk@38072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:24:28 +00:00
Sergey Biryukov 97fd7d829f Menus: In `wp_nav_menu_item_taxonomy_meta_box()`:
* Rename the `$taxonomy` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_categories_meta_box()` and other meta box functions.

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38130


git-svn-id: http://core.svn.wordpress.org/trunk@38071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:21:28 +00:00
Sergey Biryukov 5fd308db50 Menus: In `wp_nav_menu_item_post_type_meta_box()`:
* Rename the `$post_type` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_format_meta_box()` and other meta box functions.
* Correct type and description for the third argument of `nav_menu_items_{$post_type_name}_recent` filter.

See #37211.
Built from https://develop.svn.wordpress.org/trunk@38129


git-svn-id: http://core.svn.wordpress.org/trunk@38070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 19:19:29 +00:00
Sergey Biryukov 550bc85e06 Docs: Correct and expand the docs for the `$taxonomy` argument of `wp_nav_menu_item_taxonomy_meta_box()`.
Props mehulkaklotar for initial patch.
See #37211.
Built from https://develop.svn.wordpress.org/trunk@38128


git-svn-id: http://core.svn.wordpress.org/trunk@38069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 18:01:29 +00:00
Sergey Biryukov 6bcbeb858d Docs: Correct and expand the docs for the `$post_type` argument of `wp_nav_menu_item_post_type_meta_box()`.
Props mehulkaklotar for initial patch.
See #37211.
Built from https://develop.svn.wordpress.org/trunk@38127


git-svn-id: http://core.svn.wordpress.org/trunk@38068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 18:00:32 +00:00
Andrew Ozz 04319a7898 TinyMCE, link check:
- Use `wp.a11y.speak()` to announce bad URLs.
- Do not add a title to the link toolbar.
- Better error message.

Props afercia, azaozz.
See #36638.
Built from https://develop.svn.wordpress.org/trunk@38126


git-svn-id: http://core.svn.wordpress.org/trunk@38067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 03:42:34 +00:00
Drew Jaynes e6267dcf19 Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 2/2.

Fixes #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 19:33:30 +00:00
Dominik Schilling 68756af049 Post WordPress 4.6 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@38124


git-svn-id: http://core.svn.wordpress.org/trunk@38065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 18:43:28 +00:00
Dominik Schilling c3f731a7cd WordPress 4.6 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@38123


git-svn-id: http://core.svn.wordpress.org/trunk@38064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 18:32:28 +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
Drew Jaynes 1ce9a3d800 Docs: Add missing inline documentation in `WP_HTTP_Requests_Response`.
* Adds a missing file header
* Adjusts class DocBlock
* Adds missing version and access information for all methods

See #37318, [37428] and #33055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:34:29 +00:00
Dominik Schilling 868804db15 Plugins: Improve Ajax search of new plugins.
Fixes a few accessibility issues, restores the "Search Results" tab and the search type selector, and improves compatibility with older browsers.

Props rahulsprajapati, swissspidy, adamsilverstein, ocean90
See #37233.
Built from https://develop.svn.wordpress.org/trunk@38119


git-svn-id: http://core.svn.wordpress.org/trunk@38060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:32:31 +00:00
Joe McGill 3dbba0fff3 Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the change.

This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to be
previewed by passing the `_thumbnail_id` as a query variable to the preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`, which
gets applied to `get_post_metadata` during the post preview process.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:24:28 +00:00
Sergey Biryukov c50056a1f2 Comments: Introduce the `cache_domain` argument for `WP_Comment_Query` to allow caching to a unique set of cache buckets.
See [18128] for `get_terms()` and [37572] for `WP_Term_Query`.

Props Chouby, rachelbaker.
Fixes #37419.
Built from https://develop.svn.wordpress.org/trunk@38117


git-svn-id: http://core.svn.wordpress.org/trunk@38058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 15:07:30 +00:00
Joe McGill efb315afb9 Media: Ensure empty `alt` attributes are set to blank strings.
This is a follow up to [38065] to ensure that `wp.html.string()` always
converts empty `alt` attributes to `alt=""` rather than returning HTML using
empty attribute notation, like `alt`. This allows screen readers to ignore
images with empty `alt` attributes, rather than reading out the URL string.

Additionally this completely removes the logic in `wp.html.string()` for
converting blank attributes to empty attribute notation since empty attribute
notation is generally meant to denote a boolean value, e.g.,
`checked` == `checked="checked"`, which doesn't apply in this context because
boolean attributes must be omitted in order to represent a `false` value.
See: https://www.w3.org/TR/html5/infrastructure.html#boolean-attributes

Props adamsilverstein, afineman, joemcgill.
Fixes #36735.
Built from https://develop.svn.wordpress.org/trunk@38116


git-svn-id: http://core.svn.wordpress.org/trunk@38057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 14:38:29 +00:00
Andrea Fercia 0a12bb2341 Accessibility: Ensure only text is sent to aria-live messages.
While messages passed to `wp.speak.a11y()` should preferably be meaningful,
short, and carefully crafted case by case, this will ensure any HTML tags will
be stripped out from the message string.

Props adamsilverstein.
Fixes #37382.
Built from https://develop.svn.wordpress.org/trunk@38115


git-svn-id: http://core.svn.wordpress.org/trunk@38056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 14:26:28 +00:00
Rachel Baker bc46a94a4d Tests: Include the `check_comment` function tests in the comment group.
Adds `@group comment` notation to the `Tests_Comment_CheckComment` class. Introduced in [32519].

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


git-svn-id: http://core.svn.wordpress.org/trunk@38055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 14:07:31 +00:00
Mike Schroder 1736b7b29c Media: Clean up prior image edits if `IMAGE_EDIT_OVERWRITE` is true.
When `IMAGE_EDIT_OVERWRITE` is set to true, edited image files are
supposed to be deleted when an image is restored to the original.

However, when an image was edited more than once, and then restored,
files created during previous edits were left behind.

Fixes this behavior by updating `wp_save_image()` to clean up
leftover images after each edit when `IMAGE_EDIT_OVERWRITE` is true.

Props bradt, chriscct7, joemcgill.
Fixes #32171.
Built from https://develop.svn.wordpress.org/trunk@38113


git-svn-id: http://core.svn.wordpress.org/trunk@38054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 07:35:28 +00:00
Drew Jaynes c64e599ae2 Docs: Add missing class, method, and property DocBlocks for feed classes.
Covers:

* `WP_Feed_Cache`
* `WP_Feed_Cache_Transient`
* `WP_SimplePie_File`
* `WP_SimplePie_Sanitize_KSES`

Props ramiy, stevenkword.
Fixes #36295.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 07:33:29 +00:00
Gary Pendergast 3830c3f0b3 Tools: Update `grunt-patch-wordpress` to 0.4.2.
This update fixes invalid patches being uploaded to Trac when the `diff-cmd` is set to `colordiff`.

Props jorbin.
Fixes #37410.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 06:49:38 +00:00
Andrew Ozz ba81f46c64 TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
Props afercia, azaozz.
Fixes #36863.
Built from https://develop.svn.wordpress.org/trunk@38110


git-svn-id: http://core.svn.wordpress.org/trunk@38051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 01:39:31 +00:00
Sergey Biryukov 6c7a60ffb4 Permalinks: In `wp_install_maybe_enable_pretty_permalinks()`:
* Use `get_page_by_path()` instead of a hardcoded ID, which may not always exist.
* Remove the "test against a random 404 page" part, which is no longer relevant after [34442].

Fixes #36628.
Built from https://develop.svn.wordpress.org/trunk@38109


git-svn-id: http://core.svn.wordpress.org/trunk@38050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 23:12:32 +00:00
Jeremy Felt 65ffc1ff42 Meta: Ensure `$wp_meta_keys` is an array in `get_registered_meta_keys()`.
Props vishalkakadiya.
Fixes #37415, See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 21:59:44 +00:00
Drew Jaynes 949bc7c7e3 Docs: Use the three-digit, x.x.x-style version in the DocBlock for the nested `lowercase_octets()` function.
See #32246. See #meta942.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 19:34:29 +00:00
Drew Jaynes f929f502fa Docs: Add a missing DocBlock for the `lowercase_octets()` function, which is nested within `redirect_canonical()`.
Will be skipped from parsing.

See #32246. See #meta942.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 19:32:32 +00:00
Drew Jaynes c415dd186b Readme: Link to the Plugin Developer Handbook on DevHub as the primary resource for information on extending WordPress.
The `Plugin API` article in the Codex is no longer actively maintained.

Props morganestes.
Fixes #37399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 17:34:44 +00:00
Sergey Biryukov 2443c89ee0 Docs: Clarify the `fields` argument description in `WP_Network_Query::__construct()`.
See #32504.
Built from https://develop.svn.wordpress.org/trunk@38104


git-svn-id: http://core.svn.wordpress.org/trunk@38045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 13:18:28 +00:00
Sergey Biryukov c277d565e5 Docs: Clarify the `fields` argument description in `WP_Site_Query::__construct()`.
Props ramiy.
See #35791.
Built from https://develop.svn.wordpress.org/trunk@38103


git-svn-id: http://core.svn.wordpress.org/trunk@38044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 13:15:28 +00:00
Sergey Biryukov a7c72c31cf Multisite: Correct default value for `orderby` in `WP_Network_Query::__construct()`.
Add a unit test.

See #32504.
Built from https://develop.svn.wordpress.org/trunk@38102


git-svn-id: http://core.svn.wordpress.org/trunk@38043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 13:10:29 +00:00
Dominik Schilling f645178391 Filesystem API: Ensure memory limit calculations by PclZip are using integers.
This prevents a warning in PHP trunk, see https://wiki.php.net/rfc/invalid_strings_in_arithmetic.

See #36435.
Built from https://develop.svn.wordpress.org/trunk@38101


git-svn-id: http://core.svn.wordpress.org/trunk@38042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 11:55:30 +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
Boone Gorges 01b9ca2292 Taxonomy: Improve back compat of values passed to 'terms_clauses' filter.
Prior to the introduction of `WP_Term_Query`, the 'orderby' clause
passed to the 'terms_clauses' filter was prefixed by `ORDER BY`. After
`WP_Term_Query`, this was not the case; `ORDER BY` was added after the
filter. As such, plugins filtering 'terms_clauses' and returning an
'orderby' clause beginning with `ORDER BY` resulted in invalid syntax
when `WP_Term_Query` prepended a second `ORDER BY` keyword to
the clause.

This changeset rearranges the way the 'orderby' clause is built so that
it will be passed to 'terms_clauses' in the previous format.

Fixes #37378.
Built from https://develop.svn.wordpress.org/trunk@38099


git-svn-id: http://core.svn.wordpress.org/trunk@38040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 02:13:28 +00:00
Rachel Baker 093b16dfcd Docs: Correct `comment_max_links_url` filter and `$url` param descriptions to communicate values are found links.
`$num_links` is the number of link matches found within the comment_content, and that is the value that can be modified with the `comment_max_links_url` filter.

Props pbearne.
Fixes #37319.
Built from https://develop.svn.wordpress.org/trunk@38098


git-svn-id: http://core.svn.wordpress.org/trunk@38039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-19 01:49:30 +00:00
Weston Ruter 11cb0cfe86 Docs: Correct type of `WP_Post_Type::$cap` from `array` to `object`.
Fixes typo introduced in r37890. The `WP_Post_Type::$cap` property is set to the return value of `get_post_type_capabilities()` which is an `object`.

See #36217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 22:52:29 +00:00
John Blackbourn 409fb0332e Role/Capability: Introduce capability tests for non-logged-in users.
Fixes #37405

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


git-svn-id: http://core.svn.wordpress.org/trunk@38037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 22:39:30 +00:00
Jeremy Felt 30851d1186 Meta: Remove object subtype handling from `register_meta()`.
Registration is now based solely on object type, which allows the code around this to be simplified significantly.

In the process of making this adjustment:

* `register_meta()`, `unregister_meta_key()`, `get_registered_metadata()`, and `registered_meta_key_exists()` no longer return `WP_Error` objects.
* The recently introduced `wp_object_type_exists()` function and the restriction on object type has been removed.

Note: No guarantee of uniqueness is made across object subtypes. Registered meta keys should be uniquely prefixed to avoid conflict.

Fixes #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 21:16:29 +00:00
Dominik Schilling d59bcc98df Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.
Props ruud@joyo.
See #34772.
Fixes #36942, #36943.
Built from https://develop.svn.wordpress.org/trunk@38094


git-svn-id: http://core.svn.wordpress.org/trunk@38035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 19:43:30 +00:00
Tammie Lister ee20f7606b Remove .pot files from Default Themes
Fixes #34884
Props davidakennedy

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


git-svn-id: http://core.svn.wordpress.org/trunk@38034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 14:33:31 +00:00
Dominik Schilling da88178148 Comments: Use `wp_strip_all_tags()` to strip HTML tags.
`wp_kses()` should only be used if you have a whitelist.

Props rachelbaker.
Fixes #37208.
Built from https://develop.svn.wordpress.org/trunk@38092


git-svn-id: http://core.svn.wordpress.org/trunk@38033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 14:04:31 +00:00
Dominik Schilling a320320ea0 Plugins: Use the correct admin screen when searching for plugins via Ajax.
Both list tables provide different actions based on where they are loaded, regular admin or network admin. Since there is only one Ajax handler for both screens we have to set the current screen before using the list tables.

Props swissspidy, ocean90.
Fixes #37373.
Built from https://develop.svn.wordpress.org/trunk@38091


git-svn-id: http://core.svn.wordpress.org/trunk@38032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 14:00:34 +00:00
Dominik Schilling ea38eaca7d Media: Add missing gettext to a string added in [38089].
See #37394.
Built from https://develop.svn.wordpress.org/trunk@38090


git-svn-id: http://core.svn.wordpress.org/trunk@38031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 12:39:29 +00:00
Dominik Schilling 478f8c16dc Media: Update list of translatable strings for MediaElement.js.
Fixes #37394.
Built from https://develop.svn.wordpress.org/trunk@38089


git-svn-id: http://core.svn.wordpress.org/trunk@38030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 11:30:28 +00:00
Dominik Schilling 20f0aeb0f7 External Libraries: Update MediaElement.js to 2.22.0.
Includes a fix for broken YouTube embeds which are embedded with the `[video]` shortcode. 

Changelog: https://github.com/johndyer/mediaelement/blob/2.22.0/changelog.md
Diff: https://github.com/johndyer/mediaelement/compare/2.21.1...2.22.0

Fixes #37363.
Built from https://develop.svn.wordpress.org/trunk@38088


git-svn-id: http://core.svn.wordpress.org/trunk@38029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 10:59:30 +00:00
Gary Pendergast 46ac7ac930 Emoji: Update to Unicode 9.0 emoji.
This includes a new test in the emoji loader, to see if the browser supports rendering Unicode 9.0 emoji, as well as an update to `twemoji.js`, to load Unicode 9.0 twemoji images.

The default CDN location for loading Twemoji images has changed, moving to a versioned subdirectory. This allows updates without needing to purge the CDN.

Fixes #37361.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 07:35:39 +00:00
Joe McGill 28a132dfee Media: Prevent `image_get_intermediate_size()` from returning cropped images.
When `$size` is passed to `image_get_intermediate_size()` as an array of width
and height values and an exact image size matching those values isn't available,
the function loops through the available attachment sizes and returns the
smallest image larger than the requested dimensions with the same aspect ratio.

The aspect ratio check is skipped for the 'thumbnail' size to provide a fallback
for small sizes when no other image option is available. This resulted in a poor
selection when the size requested was smaller than the 'thumbnail' dimensions
but a larger size matching the requested ratio existed.

This refactors the internals of `image_get_intermediate_size()` to ensure the
'thumbnail' size is only returned as a fallback to small sizes once all other
options have been considered, and makes the control flow easier to follow.

This also introduces a new helper function, `wp_image_matches_ratio()` for
testing whether the aspect ratios of two sets of dimensions match. This function
is also now used in `wp_calculate_image_srcset()` during the selection process.

Props flixos, joemcgill.
Fixes #34384, #34980.
Built from https://develop.svn.wordpress.org/trunk@38086


git-svn-id: http://core.svn.wordpress.org/trunk@38027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-18 02:14:29 +00:00
Sergey Biryukov eca1a22719 Multisite: Correct default values for `orderby` and `order` in `WP_Site_Query::__construct()`.
Add a unit test.

Props ramiy, SergeyBiryukov.
See #35791.
Built from https://develop.svn.wordpress.org/trunk@38085


git-svn-id: http://core.svn.wordpress.org/trunk@38026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 23:30:31 +00:00
Andrea Fercia bf24773fc6 Accessibility: Improve keyboard navigation on the themes browser modal window.
Improves the `containFocus()` function to always get the correct first and last
focusable elements, even when the theme browser shows the active theme details.
Also, when on the first and last theme, adds a `disabled` attribute on the
previous and next navigation buttons to make them not focusable.

Fixes #37383.
Built from https://develop.svn.wordpress.org/trunk@38084


git-svn-id: http://core.svn.wordpress.org/trunk@38025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 22:19:30 +00:00
Weston Ruter 36e46af382 Twenty Thirteen: Fix selective refresh of Masonry-laid out widgets by deferring initialization until DOM ready.
This ensures that the `wp.customize.selectiveRefresh` object will be available when in the Customizer preview.

Fixes #37390.
Props westonruter, celloexpressions.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 21:14:29 +00:00
Sergey Biryukov fd2d9ef63b I18N: Remove non-translatable link attributes from translatable strings in `wp_plugin_update_row()`, `wp_theme_update_row()`, and `get_theme_update_available()`.
The resulting strings are much easier to translate.

See #36048.
Built from https://develop.svn.wordpress.org/trunk@38082


git-svn-id: http://core.svn.wordpress.org/trunk@38023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 21:03:31 +00:00
Sergey Biryukov 2d19f94fac Text Changes: Change `Network deactivate %s` to upper case, for consistency with `Network Activate %s`.
See #37290.
Built from https://develop.svn.wordpress.org/trunk@38081


git-svn-id: http://core.svn.wordpress.org/trunk@38022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 17:04:32 +00:00
Sergey Biryukov 65ff895eca I18N: Combine duplicate "Menu Locations" and "Menu Options" strings.
Props ramiy.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38080


git-svn-id: http://core.svn.wordpress.org/trunk@38021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:47:39 +00:00
Sergey Biryukov d851a2cded Taxonomy: Correct `WP_Error` usage in `WP_Tax_Query::clean_query()` and `WP_Tax_Query::transform_query()`.
Fixes #37389.
Built from https://develop.svn.wordpress.org/trunk@38079


git-svn-id: http://core.svn.wordpress.org/trunk@38020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:33:30 +00:00
Sergey Biryukov 3fb7d586da Unit Tests: Account for the string changes in [38077].
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38078


git-svn-id: http://core.svn.wordpress.org/trunk@38019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:24:28 +00:00
Sergey Biryukov 7d421dbe42 Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.
See #18218, #32329.
Built from https://develop.svn.wordpress.org/trunk@38077


git-svn-id: http://core.svn.wordpress.org/trunk@38018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:15:34 +00:00
Sergey Biryukov 866bd39813 I18N: Combine two duplicate "Invalid post type" strings.
Props @ramiy.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38076


git-svn-id: http://core.svn.wordpress.org/trunk@38017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:05:31 +00:00
Dominik Schilling d5cb80dd7f Import: Enhance accessibility on the Import screen.
* Remove title attributes.
* Show "Install Now" and "Details" links if the importer isn't installed yet.
* Show a "Run Importer" link if the importer is installed. It also handles activation if the plugin isn't activated.
* Add `aria-label` attributes to each link.
* Unify the importer descriptions to make them independent from the plugin state. The API was changed in [meta3690].
* Adjust JavaScript callbacks for ajaxified importer installs.

Props afercia, swissspidy, ocean90.
See #24766.
Fixes #35191.
Built from https://develop.svn.wordpress.org/trunk@38075


git-svn-id: http://core.svn.wordpress.org/trunk@38016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 15:32:30 +00:00
Sergey Biryukov 48f9940cfc I18N: Change unnecessary uppercased words in `WP_Upgrader::generic_strings()` to lower case.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38074


git-svn-id: http://core.svn.wordpress.org/trunk@38015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 13:29:29 +00:00
Sergey Biryukov f429056194 I18N: Combine two duplicate "Unable to locate WordPress Theme directory" strings.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38073


git-svn-id: http://core.svn.wordpress.org/trunk@38014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 12:58:28 +00:00
Sergey Biryukov cbd59fdfd0 Text Changes: After [37297], replace two more instances of "WordPress.org Plugin Directory" with "WordPress Plugin Directory".
See #35938.
Built from https://develop.svn.wordpress.org/trunk@38072


git-svn-id: http://core.svn.wordpress.org/trunk@38013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 12:50:43 +00:00
Sergey Biryukov 0be3a84ad0 I18N: After [38057], consistently use a context for other instances of `Activate %s`, `Network Activate %s`, and `Delete %s` strings.
See #37290.
Built from https://develop.svn.wordpress.org/trunk@38071


git-svn-id: http://core.svn.wordpress.org/trunk@38012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 23:20:29 +00:00
Sergey Biryukov 50a39d4b1f I18N: Remove a stray translator comment added in [38057].
See #37290.
Built from https://develop.svn.wordpress.org/trunk@38070


git-svn-id: http://core.svn.wordpress.org/trunk@38011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 23:11:31 +00:00
Boone Gorges 40741408ec On term.php, use `$taxnow` when fetching currently edited term.
[36874] changed the `get_term()` call so that no `$taxonomy` parameter
was passed, as 4.4 made the parameter optional. This change made it
impossible to access a shared term that has not yet been splitr, since
passing an ambiguous `$term_id` to `get_term()` results in an error.
Restoring the `$taxonomy` parameter fixes the regression.

Props alleynoah, dlh.
Fixes #37205.
Built from https://develop.svn.wordpress.org/trunk@38069


git-svn-id: http://core.svn.wordpress.org/trunk@38010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 18:37:30 +00:00
Sergey Biryukov f5aab6e25d Docs: Correct `$post` parameter name and description for `wp_attachment_is()` and `wp_attachment_is_image()`.
Props flixos90.
Fixes #37377.
Built from https://develop.svn.wordpress.org/trunk@38068


git-svn-id: http://core.svn.wordpress.org/trunk@38009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 13:05:29 +00:00
Sergey Biryukov 5cce706f3d Permalinks: Rename `$usingpi` to `$using_index_permalinks` for clarity.
See #37380.
Built from https://develop.svn.wordpress.org/trunk@38067


git-svn-id: http://core.svn.wordpress.org/trunk@38008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 12:46:29 +00:00
Sergey Biryukov 07c9671cac Permalinks: After [37747], make sure `$usingpi`, `$writable`, and `$update_required` are defined before checking them on permalinks update.
Props Clorith.
Fixes #37380.
Built from https://develop.svn.wordpress.org/trunk@38066


git-svn-id: http://core.svn.wordpress.org/trunk@38007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-16 12:44:32 +00:00
Joe McGill c1e8f430f9 Media: Always add `alt` attributes to images inserted from URLs
Previously, when inserting an image from a URL, leaving the `alt`
field blank in the media modal would result in an image being
inserted into the editor without an `alt` attribute, rather than
an empty `alt`. This happened because the `props.type` would not
get set in `wp.media.string.props()` — because `attachment` is
undefined in this case — causing the image fallbacks to get
skipped.

This fixes the issue by explicitly setting `props.type` to 'image'
in `wp.media.string.image()` before filling out the rest of the
properties.

Props ambrosey, dabnpits.
Fixes #36735.
Built from https://develop.svn.wordpress.org/trunk@38065


git-svn-id: http://core.svn.wordpress.org/trunk@38006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-15 03:16:30 +00:00
Dominik Schilling a8ccd1ce23 Users: Update help text for `user-new.php` to remove reference to sending passwords via email.
Props anneschmidt.
Fixes #36763.
Built from https://develop.svn.wordpress.org/trunk@38064


git-svn-id: http://core.svn.wordpress.org/trunk@38005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-14 21:51:32 +00:00
John Blackbourn e54a72fc2f Canonical: Remove a duplicate test data entry.
Fixes #37370

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


git-svn-id: http://core.svn.wordpress.org/trunk@38004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-14 20:51:31 +00:00
Dominik Schilling 94d344829e Editor: Enqueue the `wp-embed` script to fix embed previews inside the media modal.
Props swissspidy.
Fixes #37334.
Built from https://develop.svn.wordpress.org/trunk@38062


git-svn-id: http://core.svn.wordpress.org/trunk@38003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-14 13:29:31 +00:00
Drew Jaynes d8a6dee52c Docs: Update a cross-reference in the DocBlock for `wp_register_plugin_realpath()` from `plugin_basename()` to `wp_normalize_path()`.
Props zuige.
Fixes #37357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 19:22:28 +00:00
Dominik Schilling 2dd43ea9b1 Post WordPress 4.6 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@38060


git-svn-id: http://core.svn.wordpress.org/trunk@38001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 18:58:28 +00:00
Dominik Schilling 0b2a1a0d81 WordPress 4.6 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@38059


git-svn-id: http://core.svn.wordpress.org/trunk@38000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 18:41:27 +00:00
Boone Gorges 905f4ec0f8 Mail: Improve handling of UTF-8 address headers.
Previously, `wp_mail()` implemented Reply-To as a generic header, using
PHPMailer's `addCustomHeader()`. As such, the email address portion of
the header was being incorrectly encoded when the name portion
contained UTF-8 characters. Switching to PHPMailer's more specific
`addReplyTo()` method fixes the issue.

For greater readability, the handling of all address-related headers
(To, CC, BCC, Reply-To) has been standardized.

Props szepe.viktor, iandunn, bpetty, stephenharris.
Fixes #21659.
Built from https://develop.svn.wordpress.org/trunk@38058


git-svn-id: http://core.svn.wordpress.org/trunk@37999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 18:04:28 +00:00
Dominik Schilling 98d03cb738 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.
Built from https://develop.svn.wordpress.org/trunk@38057


git-svn-id: http://core.svn.wordpress.org/trunk@37998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 17:32:29 +00:00
Drew Jaynes 4418b71645 Docs: Add an initial `@since` version to wp-includes/feed.php.
The file was introduced in 2.1.0 when it was moved from wp-includes/feed-functions.php in [3862].

See #32246. See #36295.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 17:04:28 +00:00
Drew Jaynes e3e4762b8f Docs: Update the default value for the optional `$args` parameter in `get_networks()` following [38042].
See #32504.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 16:04:29 +00:00
Dominik Schilling 67de1f07d3 HTTP API: Pass proxy settings to Requests.
`WP_HTTP_Proxy()` is used directly in `WP_Http_Curl()` and `WP_Http_Streams()`. Since `WP_Http::request()` doesn't use them anymore we have to move the proxy handling into `WP_Http::request()` so the proxy data can be passed to `Requests::request()`.

Props rmccue.
See #33055.
Fixes #37107.
Built from https://develop.svn.wordpress.org/trunk@38054


git-svn-id: http://core.svn.wordpress.org/trunk@37995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:51:28 +00:00
Dominik Schilling 5f862c626a HTTP API: Update Requests.
Fixes an issue where you couldn't set a `Requests_Proxy_HTTP` object as a proxy setting.

See https://github.com/rmccue/Requests/pull/223.
See #37107, #33055.
Built from https://develop.svn.wordpress.org/trunk@38053


git-svn-id: http://core.svn.wordpress.org/trunk@37994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:44:29 +00:00
Joe McGill 2ecdbf36cb Media: URL encode spaces in `srcset` attributes.
In some cases, images in the media library may contain spaces in
their filenames. This results in an invalid `srcset` attribute,
causing broken images on the front end. This change fixes the issue
by replacing spaces in URLs with URL encoded '%20' characters before
returning the `srcset` string.

Props underdude, joemcgill.
Fixes #36549.
Built from https://develop.svn.wordpress.org/trunk@38052


git-svn-id: http://core.svn.wordpress.org/trunk@37993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:24:55 +00:00
Drew Jaynes 60de6917fb Docs: Add and clarify changelog entries for elements that can now accept, use, or return `WP_Post_Type` objects.
Also adds a missing initial `@since` version for `wp_xmlrpc_server::_prepare_post_type()`.

See [37890]. See #36217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:24:28 +00:00
Dominik Schilling 456c9bea3d Comments: After [37743], prevent a JavaScript error when `wpAjax.parseAjaxResponse()` returns an error or true.
Props rachelbaker.
Fixes 36742.
Built from https://develop.svn.wordpress.org/trunk@38050


git-svn-id: http://core.svn.wordpress.org/trunk@37991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 15:03:28 +00:00
Dominik Schilling 349de667fa Remove `svn:executable` property from Requests and some other files.
Built from https://develop.svn.wordpress.org/trunk@38049


git-svn-id: http://core.svn.wordpress.org/trunk@37990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 14:39:28 +00:00
Rachel Baker 2040186a5d Comments: Include comment_content with html and without in blacklist_keys comparison.
After [38047], also include the comment_content with html in the preg_match against blacklist keys to match urls.

Props ocean90.
Fixes #37208.
Built from https://develop.svn.wordpress.org/trunk@38048


git-svn-id: http://core.svn.wordpress.org/trunk@37989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 14:05:29 +00:00
Rachel Baker 240e3ec683 Comments: Strip html tags from comment content before blacklist_keys comparison.
Use `wp_kses()` to clean comment_content for preg_match against the blacklist_keys. Also includes some initial unit tests for `wp_blacklist_check()`.
Previously, if a blacklisted key was used in comment_content split by an html tag the regex in `wp_blacklist_check()` would not find a match. Example: Where "springfield" was a blacklisted word, if the content of a comment included `spring<i>field</i>" `wp_blacklist_check()` would not return true.

Props cfinke.
Fixes #37208.
Built from https://develop.svn.wordpress.org/trunk@38047


git-svn-id: http://core.svn.wordpress.org/trunk@37988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 13:48:39 +00:00
Dominik Schilling c73c23c423 Resource Hints: Increase priority of `wp_resource_hints()` so hints get printed before scripts and styles.
Also run `wp_resource_hints()` on the login screen and in the customizer. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@37987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 12:54:28 +00:00
Dominik Schilling 834f0809fc WP Mail: Remove an unused variable.
Unused since [34864].

Props vishalkakadiya.
Fixes #37346.
Built from https://develop.svn.wordpress.org/trunk@38045


git-svn-id: http://core.svn.wordpress.org/trunk@37986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 12:37:29 +00:00
Dominik Schilling fb59d07c9b Database: Add unit test to test that a column type change for a table name with a hyphen is working after [37583].
Fixes #31679.
Built from https://develop.svn.wordpress.org/trunk@38044


git-svn-id: http://core.svn.wordpress.org/trunk@37985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 11:39:41 +00:00
John Blackbourn 7e7dfdea55 HTTP API: Remove duplicate documentation for the `http_api_debug` hook.
Fixes #37081

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


git-svn-id: http://core.svn.wordpress.org/trunk@37984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 10:23:43 +00:00
Jeremy Felt f3b3ece76a Multisite: Set default `$args` to an empty array in `get_networks()`.
The empty string was not incorrect. Using `array()` here instead makes things a bit more consistent by aligning with `get_sites()`, `get_users()`, and `get_terms()`.

See #32504.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 05:30:29 +00:00
Jeremy Felt da40e89d06 Meta: Ensure filters are backwards compatible for pre-4.6 style meta registration.
When using `register_meta()` with the function signature from 4.5 and earlier, the `auth_{$type}_meta_{$key}` and `sanitize_{$type}_meta_{$key}` filters are used. Any calls to `register_meta()` expecting this behavior should continue to work. The new filters, which take advantage of object subtypes, should not be added unless the proper `$args` array is passed.

See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 04:46:28 +00:00
Jeremy Felt d5e14166f3 Meta: Remove filters when meta is unregistered.
If auth and/or sanitize callbacks are specified in the arguments for
`register_meta()`, filters are added to handle these callbacks. These
should be removed when calling `unregister_meta_key()` to avoid
unintentional filtering.

See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-13 04:13:30 +00:00
Andrew Ozz 532e8f0204 TinyMCE: preserve `<script>` and `<style>` tags inside the editor.
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.

Props iseulde, azaozz.
Fixes #32923.
Built from https://develop.svn.wordpress.org/trunk@38039


git-svn-id: http://core.svn.wordpress.org/trunk@37980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 22:09:31 +00:00
John Blackbourn 3a7137a7a5 Meta: Add a missing `@since` param for `wp_object_type_exists()`.
See #35658

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


git-svn-id: http://core.svn.wordpress.org/trunk@37979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 13:21:29 +00:00
Dominik Schilling 97bf32c66a Text Changes: Unify/merge two more permission error messages.
Props ramiy.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@38037


git-svn-id: http://core.svn.wordpress.org/trunk@37978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 11:45:29 +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
Dominik Schilling f160f2afd1 Toolbar: Allow 0 as a value for the `tabindex` property of a menu item.
To enhance accessibility for items without a link you can now define `tabindex="0"`, which makes descendant dropdowns accessible.

Props joedolson, afercia, ocean90.
Fixes #32495.
Built from https://develop.svn.wordpress.org/trunk@38035


git-svn-id: http://core.svn.wordpress.org/trunk@37976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 11:18:30 +00:00
Andrew Ozz 70fa27a953 TinyMCE: update to 4.4.0, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. Includes two bugfixes for #36434.
Fixes #37327.
Built from https://develop.svn.wordpress.org/trunk@38034


git-svn-id: http://core.svn.wordpress.org/trunk@37975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-12 00:20:29 +00:00
Pascal Birchler e4eee7ef5c Plugins: Improve Ajax search of installed plugins.
Fixes a few accessibility issues, tweaks the design of the search form to match other Ajax search fields and improves compatibility with older browsers.

See #37230.
Built from https://develop.svn.wordpress.org/trunk@38033


git-svn-id: http://core.svn.wordpress.org/trunk@37974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-11 21:50:31 +00:00
Dominik Schilling f8e7680cd6 Multisite: Use `hash_equals()` when comparing hashes to mitigate timing attacks.
Fixes #37324.
Built from https://develop.svn.wordpress.org/trunk@38032


git-svn-id: http://core.svn.wordpress.org/trunk@37973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 19:43:28 +00:00
Dominik Schilling 02424959e4 Accessibility: Add `aria-button-if-js` class to links in the media list table that behave like buttons when JavaScript is on.
Props joedolson, afercia.
See #26504.
Fixes #36555.
Built from https://develop.svn.wordpress.org/trunk@38031


git-svn-id: http://core.svn.wordpress.org/trunk@37972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 19:31:31 +00:00
Drew Jaynes 844ae66820 Docs: The `$labels` property in `WP_Post_Type` is of type `object` as returned from `get_post_type_labels()`, not an array.
Props swissspidy.
See #36217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 17:41:30 +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
Drew Jaynes 6c7148943b Docs: Standardize capitalization of Ajax throughout core documentation per the core spelling guide.
Ajax, while considered an acronym for Asynchronous JavaScript and XML, is most commonly capitalized only in the first character.

Part props ocean90.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-10 00:51:30 +00:00
Drew Jaynes 4c029e870e Docs: Link the 4.6 changelog entry in the DocBlock for `register_meta()` to its corresponding dev note on make/core.
h/t ocean90.

See #35658. See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 16:50:35 +00:00
Tammie Lister 5bcc4e7b35 PHP 7 compatibility issues fixed in Twenty Thirteen and Twenty Fourteen
Props xknown
Fixes #37227
--This Line, and those below, will be ignored--

M    themes/twentyfourteen/functions.php
M    themes/twentythirteen/functions.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@37967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 15:11:33 +00:00
Dominik Schilling 559c6637bf Docs: Fix a typo in the DocBlock for `themes_api()`, `themes_api`, `plugins_api()`, and `plugins_api`.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@38025


git-svn-id: http://core.svn.wordpress.org/trunk@37966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 14:39:33 +00:00
Drew Jaynes 7eb6471461 Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 14:00:31 +00:00
Drew Jaynes a13164355f Docs: Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6
See #36618. See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 13:45:33 +00:00
Drew Jaynes 2ee0027bc1 Docs: Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6.
See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 13:23:30 +00:00
Drew Jaynes c009abcc98 Docs: Fix a typo in the hook doc description for the `enable_loading_advanced_cache_dropin` run-time filter.
See #34936. See #37318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 13:17:30 +00:00
Dominik Schilling 1036637afc Taxonomy: Remove an unnecessary double assignment in `WP_Term_Query::get_terms()`.
Props birgire.
Fixes #37254.
Built from https://develop.svn.wordpress.org/trunk@38020


git-svn-id: http://core.svn.wordpress.org/trunk@37961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 11:49:29 +00:00
Pascal Birchler aa4334cc50 Upgrade/Install: Do not remove event handlers when trying to update a theme.
Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.
Built from https://develop.svn.wordpress.org/trunk@38019


git-svn-id: http://core.svn.wordpress.org/trunk@37960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-09 11:43:43 +00:00
Drew Jaynes dac2988528 Docs: Fix a typo in an inline hook reference in the DocBlock for `comment_form()`.
Props ocean90.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 23:56:32 +00:00
Dominik Schilling 9b2f385b07 Bootstrap: Make `wp_is_ini_value_changeable()` compatible with PHP 5.2.6 - 5.2.17.
There is a bug in PHP 5.2.6 - 5.2.17 (https://bugs.php.net/bug.php?id=44936, https://3v4l.org/IL0A2) which changes the access level of a setting to 63 after `ini_set()` was called.
To continue comparing the access value against `INI_ALL` and `INI_USER` use the bit operator `& 7`:

* `1 & 7 === 1` (INI_USER)
* `2 & 7 === 2` (INI_PERDIR)
* `4 & 7 === 4` (INI_SYSTEM)
* `7 & 7 === 7` (INI_ALL)
* `63 & 7 === 7` (INI_ALL)

See [38015].
See #32075.
Built from https://develop.svn.wordpress.org/trunk@38017


git-svn-id: http://core.svn.wordpress.org/trunk@37958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 18:36:30 +00:00
Dominik Schilling 31d3147f4e Unit tests: Don't change the `memory_limit` setting during tests.
40M isn't enough and can lead to an "out of memory" error. Change `test_wp_raise_memory_limit()` to test that `wp_raise_memory_limit()` doesn't *lower* the memory limit.

See [38015].
See #32075.
Built from https://develop.svn.wordpress.org/trunk@38016


git-svn-id: http://core.svn.wordpress.org/trunk@37957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 18:17:41 +00:00
Dominik Schilling aa561e67a1 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.
Built from https://develop.svn.wordpress.org/trunk@38015


git-svn-id: http://core.svn.wordpress.org/trunk@37956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 14:37:30 +00:00
Sergey Biryukov d1cd600733 Docs: Fix typo in a comment in `Core_Upgrader::upgrade()`.
Props Zuige.
Fixes #37314.
Built from https://develop.svn.wordpress.org/trunk@38014


git-svn-id: http://core.svn.wordpress.org/trunk@37955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 13:19:30 +00:00
Dominik Schilling 682e028a5a Bootstrap: Clean up `wp_convert_hr_to_bytes()`.
* Don't return a value higher than `PHP_INT_MAX`.
* Add unit tests.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 12:54:28 +00:00
Dominik Schilling 5eae48b414 Boostrap: Move `wp_convert_hr_to_bytes()` to wp-includes/load.php.
`wp_convert_hr_to_bytes()` was previously defined in wp-includes/media.php because it's only used by `wp_max_upload_size()` in the same file.
Moving this function to load.php allows us to improve core's memory limit handling.

See #32075.
Built from https://develop.svn.wordpress.org/trunk@38012


git-svn-id: http://core.svn.wordpress.org/trunk@37953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 11:27:27 +00:00
Dominik Schilling 561018677f Constants: Move constants for data sizes before constants for memory limits.
This allows us to improve core's memory limit handling.

See #32075.
Built from https://develop.svn.wordpress.org/trunk@38011


git-svn-id: http://core.svn.wordpress.org/trunk@37952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 11:19:29 +00:00
Peter Wilson b9b69676d8 Embeds: Include locale stylesheets after default styles.
Fire `locale_stylesheet` action after the `wp_print_styles` action in the embeds header to match the order in `wp_head`.

Props swissspidy.
Fixes #36839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 06:07:33 +00:00
Rachel Baker c283b3c0c6 Revisions: Allow autosaves to be restored when revisions are disabled.
Fixes bug introduced in [23639] where autosaves are not restored if revisions are disabled.

Props adamsilverstein.
Fixes #36262.



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


git-svn-id: http://core.svn.wordpress.org/trunk@37950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 01:16:31 +00:00
Jeremy Felt 602f231a26 Docs: Correct the description of the `$network_id` in `WP_Site_Query`.
Passing 0 for `network_id` results in a query across all networks.

See #35791.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 20:36:30 +00:00
Jeremy Felt 771212f20a Multisite: Correct logic used to display an Edit User link after adding a user.
Previously, if a user was added with the checkbox for no confirmation selected and an error was then encountered in `wpmu_activate_signup()`, a fatal error would trigger because `$new_user` was a `WP_Error` object rather than a user.

Fixes #37223.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 17:48:29 +00:00
Jeremy Felt 24804144de Multisite: Add a nonce to the "Cancel" URL when changing a site's admin email.
Props scottbasgaard.
Fixes #36954.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 17:13:27 +00:00
Boone Gorges 397f08e7d3 Tests: Ensure that test for invalid user ID actually uses an invalid user ID.
This prevents false positives when the ID column's incrementor has exceeded the
hardcoded invalid ID.

Fixes #37308.
Built from https://develop.svn.wordpress.org/trunk@38005


git-svn-id: http://core.svn.wordpress.org/trunk@37946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 16:48:28 +00:00
Dominik Schilling 30420b7d19 Screen API: After [37972], ensure that `$box['args']` is an array before trying to access `__widget_basename`.
This prevents a PHP fatal error on the Nav Menus screen where `$args` is an object.

Props elrae.
Fixes #35021.
Built from https://develop.svn.wordpress.org/trunk@38004


git-svn-id: http://core.svn.wordpress.org/trunk@37945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 16:39:29 +00:00
Jeremy Felt 7b5cd0c021 Multisite: Don't store `max_num_pages` in `WP_Network_Query` query cache.
This value can be easily calculated with available data.

Props spacedmonkey.
Fixes #32504.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 15:52:28 +00:00
Jeremy Felt d11c9de613 Multisite: Don't store `max_num_pages` in `WP_Site_Query` query cache.
This value can be easily calculated with available data.

Props spacedmonkey.
Fixes #35791.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 15:32:29 +00:00
Boone Gorges c6d5f78241 Comments: Cache results of `SELECT FOUND_ROWS()` query.
When comment IDs are fetched from the cache rather than the database,
the subsequent `SELECT FOUND_ROWS()` query will not return the correct value.
To avoid unnecessary queries, we cache the results of the `found_comments`
query alongside the comment IDs.

Props spacedmonkey.
Fixes #37184.
Built from https://develop.svn.wordpress.org/trunk@38001


git-svn-id: http://core.svn.wordpress.org/trunk@37942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 14:27:38 +00:00
Dominik Schilling 1630c97795 Text Changes: Unify a few more permission error messages which were missed in [37914].
Props ramiy.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37999


git-svn-id: http://core.svn.wordpress.org/trunk@37940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 11:33:33 +00:00
Dominik Schilling 65eb29ad46 Import: Merge two similar strings.
Props ramiy.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37998


git-svn-id: http://core.svn.wordpress.org/trunk@37939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 10:53:28 +00:00
Sergey Biryukov 6953feb795 Unit Tests: Add description for `data_get_comments_number_text_declension()`.
See #13651.
Built from https://develop.svn.wordpress.org/trunk@37997


git-svn-id: http://core.svn.wordpress.org/trunk@37938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 10:45:43 +00:00
Jeremy Felt b69192f9ec Meta: Don't pass an empty `$meta_key` to `get_metadata()`.
This doesn't break anything, but also isn't necessary.

Props sc0ttkclark.
See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 00:18:27 +00:00
Jeremy Felt c243edf41a Meta: Introduce an initial set of tests for `register_meta()`.
Props sc0ttkclark, ericlewis.
See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-07 00:15:30 +00:00
Gary Pendergast a37d3051f4 Docs: Fix an incorrect `@since` comment.
See #36495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 23:49:30 +00:00
Dominik Schilling 53bd2cd015 Post WordPress 4.6 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@37993


git-svn-id: http://core.svn.wordpress.org/trunk@37934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 18:39:29 +00:00
Dominik Schilling 3e12e32829 WordPress 4.6 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@37992


git-svn-id: http://core.svn.wordpress.org/trunk@37933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 18:25:37 +00:00
Helen Hou-Sandí 5a2ffe61f6 Meta: Make registration error conditions return consistently.
In doing this, non-core object types are no longer forcibly blocked and are instead checked against `wp_object_type_exists()` which has a filterable return value. Still, filter that at your own risk.

props Faison for the initial patch.
see 35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 18:09:32 +00:00
Jeremy Felt dc57f35048 Meta: Ensure `$object_subtype` is available before use in `register_meta()`.
Props sc0ttkclark.
See #35658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 18:01:30 +00:00
Ryan McCue ff6a4875a8 HTTP API: Switch back to returning an array.
The array-compatibility object we started returning in r37428 unfortunately isn't enough like an array. In particular, `is_array()` checks fail, despite the object implementing ArrayAccess. Mea culpa.

This moves the WP_HTTP_Response object to a new http_response key in the array, and changes the value back to an actual array.

Fixes #37097.
See #33055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 17:51:30 +00:00
Dominik Schilling b9d99d3288 Embeds: Don't print the HTML for a featured image if a post has no featured image.
See [36693].
Fixes #37288.
Built from https://develop.svn.wordpress.org/trunk@37988


git-svn-id: http://core.svn.wordpress.org/trunk@37929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 17:08:31 +00:00
Sergey Biryukov d9b4f1e50b I18N: Introduce an on/off switch for locales where comment number needs to be declined.
When enabled, the switch would override the theme's pseudo-plural `'% Comments'` string with a correct form of `_n( '%s Comment', '%s Comments', $number )`.

Historically, `comments_popup_link()` and `get_comments_number_text()` did not support plural forms and used a pseudo-plural style instead, so some locales were forced to come up with workarounds to display the number of comments in their language correctly.

This change should make those functions more i18n-friendly.

Fixes #13651.
Built from https://develop.svn.wordpress.org/trunk@37987


git-svn-id: http://core.svn.wordpress.org/trunk@37928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 14:46:32 +00:00
Joe McGill 7e5885b874 Media: Don't use 'full' as array key in `wp_calculate_image_srcset()`.
In `wp_calculate_image_srcset()` we get an array of image sizes
associated with an attachment and then add the original image's
information to the array before processing the `srcset`. In doing
so, we set the original data to a `$image_sizes['full']` key, which
could stomp on any custom image sizes using `full` as a size name.

This avoid the issues by adding the original data without a named
key, which is never referenced anyway.

Props jaspermdegroot.
Fixes #36345.
Built from https://develop.svn.wordpress.org/trunk@37986


git-svn-id: http://core.svn.wordpress.org/trunk@37927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 14:05:29 +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 3c8c6fee4d Customize: Fix panel indentation in Firefox.
In Firefox on Windows the menus and widgets panel weren't fully visible due to a miscalculation of the width of a panel, caused by a visible scrollbar.

Props wpfo.
Fixes #34622.
Built from https://develop.svn.wordpress.org/trunk@37984


git-svn-id: http://core.svn.wordpress.org/trunk@37925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 11:32:27 +00:00
Dominik Schilling dc994f5db5 Plugins: In `plugin_basename()` sort plugin paths before resolving symlinks.
`arsort()` sorts the paths reverse-alphabetically while preserving the keys. It results in a longer path being listed before a shorter one with the same base directory(ies).

Props jdgrimes, ocean90.
Fixes #28441.
Built from https://develop.svn.wordpress.org/trunk@37983


git-svn-id: http://core.svn.wordpress.org/trunk@37924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 09:45:27 +00:00
Weston Ruter f1b7a9c77d Customize: Ensure that `WP_Customize_Setting::value()` can return a previewed value for aggregated multidimensionals.
Fixes #37294.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 05:59:28 +00:00
Weston Ruter 64a2d70a90 Customize: Ensure that `WP_Customize_Nav_Menu_Section` is able to represent a placeholder nav menu.
Placeholder nav menus (ones that have yet to be saved into the DB) have negative integer IDs.

Fixes #37293.
Props valendesigns, stubgo, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 05:33:30 +00:00
Dominik Schilling e88dda587d XML-RPC: Add unit test to verify IXR changes in [37244].
Props aaires.
Fixes #36586.
Built from https://develop.svn.wordpress.org/trunk@37980


git-svn-id: http://core.svn.wordpress.org/trunk@37921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 21:59:27 +00:00
Sergey Biryukov de1fab0b66 I18N: Adjust the regex in `wp_maybe_decline_date()` to avoid `\w` and `\b`, as they don't work with Unicode characters correctly in PHP 5.3.3 and earlier versions.
See [37975] for unit tests.

See #36790.
Built from https://develop.svn.wordpress.org/trunk@37979


git-svn-id: http://core.svn.wordpress.org/trunk@37920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 21:43:30 +00:00
Dominik Schilling bfe46464c5 Upgrade/Install: Change priority for theme/update update rows.
`wp_plugin_update_rows()` and `wp_theme_update_rows()` are using the site transients `update_plugins` and `update_themes` which are set by `wp_update_plugins()` and `wp_update_themes()`. Both functions are hooked into `load-plugins.php` and `load-themes.php`. Therefore the update rows need to be registered after the transients were populated.

See #13071.
Built from https://develop.svn.wordpress.org/trunk@37978


git-svn-id: http://core.svn.wordpress.org/trunk@37919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:46:29 +00:00
Dominik Schilling 51579c49a8 Embeds: After [37745], check if a featured image exists before attaching an event listener.
Props swissspidy.
Fixes #35657.
Built from https://develop.svn.wordpress.org/trunk@37977


git-svn-id: http://core.svn.wordpress.org/trunk@37918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:16:57 +00:00
Pascal Birchler 685cce51d2 Update/Install: Reject invalid messages in the Shiny Updates `postMessage` handler.
This prevents conflicts with third-party messages (e.g. sent by browser extensions). The updates script expects a specific JSON-encoded message and now bails early if it's not valid JSON.

Fixes #37125.
Built from https://develop.svn.wordpress.org/trunk@37976


git-svn-id: http://core.svn.wordpress.org/trunk@37917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:16:28 +00:00
Dominik Schilling a728528542 I18N: Add tests for `wp_maybe_decline_date()`.
Reverts [37718], `$wp_locale` needs to be cloned.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:09:28 +00:00
Pascal Birchler f2c4003dde Update/Install: Fix plugin updates from the details modal on the Dashboard.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the Dashboard. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Fixes #37131. See #37126.
Built from https://develop.svn.wordpress.org/trunk@37974


git-svn-id: http://core.svn.wordpress.org/trunk@37915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:37:28 +00:00
Pascal Birchler 600e511533 Update/Install: Fix plugin updates from the details modal on `update-core.php`.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the WordPress Updates screen. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Props Nikschavan.
Fixes #37126.
Built from https://develop.svn.wordpress.org/trunk@37973


git-svn-id: http://core.svn.wordpress.org/trunk@37914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:32:28 +00:00
Dominik Schilling 3d6fc45834 Dashboard: Don't add a "Configure" link to the toggle button.
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.

Props nicholas_io, swissspidy.
Fixes #35021.
Built from https://develop.svn.wordpress.org/trunk@37972


git-svn-id: http://core.svn.wordpress.org/trunk@37913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:22:29 +00:00
Pascal Birchler b55493e3e6 Update/Install: Correctly decrement the update count after translation updates.
After [37714], an error was unnecessarily being displayed in the JavaScript console when updating translations on `wp-admin/update-core.php`. Let's not throw an error in these cases.

Props afercia.
Fixes #37127.
Built from https://develop.svn.wordpress.org/trunk@37971


git-svn-id: http://core.svn.wordpress.org/trunk@37912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:18:27 +00:00
Pascal Birchler 848318aeb1 Update/Install: Trigger a JS event when updating a theme.
For plugins a `'wp-plugin-updating'` event is triggered, for themes there's now the `'wp-theme-updating'` equivalent.

Props DavidAnderson.
Fixes #37216.
Built from https://develop.svn.wordpress.org/trunk@37970


git-svn-id: http://core.svn.wordpress.org/trunk@37911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:09:28 +00:00
Pascal Birchler 066360f569 Update/Install: Trigger the correct event after installing an importer plugin.
This fixes a typo inside `wp.updates.installImporterSuccess()` as it's about installing an importer, not an installer.

Fixes #37273.
Built from https://develop.svn.wordpress.org/trunk@37969


git-svn-id: http://core.svn.wordpress.org/trunk@37910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:05:28 +00:00
Dominik Schilling c50abe823f Themes: After [37742], fix the color of the "Upload Theme" button to match other page title actions.
Props afercia.
Fixes #35457.
Built from https://develop.svn.wordpress.org/trunk@37968


git-svn-id: http://core.svn.wordpress.org/trunk@37909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 14:42:29 +00:00
Dominik Schilling bcf027eda1 Themes: Avoid announcing the theme search results too many times.
Props afercia.
Fixes #36848.
Built from https://develop.svn.wordpress.org/trunk@37967


git-svn-id: http://core.svn.wordpress.org/trunk@37908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 14:38:29 +00:00
Dominik Schilling de3b2db1e2 Media: Improve form validation errors handling when editing images.
* Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field.
* Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready.

Props afercia.
Fixes #36316.
Built from https://develop.svn.wordpress.org/trunk@37966


git-svn-id: http://core.svn.wordpress.org/trunk@37907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:37:29 +00:00
Dominik Schilling 4594006ca6 Plugins: Clean up `uninstall_plugins` option during database upgrade.
`register_uninstall_hook()` is designed to be given a function callback (or a static class variable), not an array/object instance. This got blocked in [16339] but the option itself was never cleaned up.

Props polevaultweb.
Fixes #31625.
Built from https://develop.svn.wordpress.org/trunk@37965


git-svn-id: http://core.svn.wordpress.org/trunk@37906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:28:29 +00:00
Dominik Schilling 56e463a38e Customize: Fix site icon preview in RTL.
* Set the direction of previews to LTR.
* Remove the ID attribute from the favicon preview in the customizer panel. The preview in the media modal uses the same ID which prevented updating the correct favicon preview.

Fixes #37286.
Built from https://develop.svn.wordpress.org/trunk@37964


git-svn-id: http://core.svn.wordpress.org/trunk@37905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 12:42:27 +00:00
Dominik Schilling 4e66d6a568 Customize: Add a RTL version of "browser.png" for the site icon preview.
Props sidati.
Fixes #37063.
Built from https://develop.svn.wordpress.org/trunk@37963


git-svn-id: http://core.svn.wordpress.org/trunk@37904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 11:32:29 +00:00
Dominik Schilling 9b893cd558 General: Return "O B" when passing 0 to `size_format()`.
Props swissspidy.
Fixes #36635.
Built from https://develop.svn.wordpress.org/trunk@37962


git-svn-id: http://core.svn.wordpress.org/trunk@37903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 10:36:30 +00:00
Pascal Birchler a5580012a3 Docs: Fix a typo across some function and hook docs.
s/filterss/filters.

See #32246.
Built from https://develop.svn.wordpress.org/trunk@37961


git-svn-id: http://core.svn.wordpress.org/trunk@37902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:45:29 +00:00
Sergey Biryukov 4a62825a05 Text Changes: Remove duplicate string, use the one we already have.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37960


git-svn-id: http://core.svn.wordpress.org/trunk@37901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:10:28 +00:00
Dominik Schilling 9ccd9b3a3e Network Admin: Replace "Options saved." notice with "Settings saved.".
"Settings saved." is already used on all other settings screens.

Fixes #37279.
Built from https://develop.svn.wordpress.org/trunk@37959


git-svn-id: http://core.svn.wordpress.org/trunk@37900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:01:27 +00:00
Sergey Biryukov 7caf951bbf Text Changes: Remove duplicate string, use the one we already have.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37958


git-svn-id: http://core.svn.wordpress.org/trunk@37899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:48:28 +00:00
Weston Ruter fed5a03c8f Customize: Prevent image controls with selected images smaller than pane width from being distorted through stretching to fit width.
Props celloexpressions.
Fixes #37277.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:45:28 +00:00
Sergey Biryukov 83cd70a5f6 Text Changes: Remove duplicate string, use the one we already have.
See #34521.
Built from https://develop.svn.wordpress.org/trunk@37956


git-svn-id: http://core.svn.wordpress.org/trunk@37897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:37:27 +00:00
Dominik Schilling 6f33a94487 Customize: Use the correct variable when referring to the media frame.
Props celloexpressions.
Fixes #36236.
Built from https://develop.svn.wordpress.org/trunk@37955


git-svn-id: http://core.svn.wordpress.org/trunk@37896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:45:28 +00:00
Dominik Schilling 54c92d656f Unit Tests: Change some `@group` annotations to `@ticket`.
Built from https://develop.svn.wordpress.org/trunk@37954


git-svn-id: http://core.svn.wordpress.org/trunk@37895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:25:27 +00:00