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