Commit Graph

2742 Commits

Author SHA1 Message Date
Weston Ruter 1c04006909 Customize: Move control's fallback selection of default content template to `renderContent` method to align with sections and panels.
* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41935 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 03:03:19 +00:00
Sergey Biryukov 66f9609763 Build/Test Tools: Clean up `$_REQUEST` and `$GLOBALS` after modifying them in `_test_list_hierarchical_page()`.
Props birgire.
Fixes #42044.

git-svn-id: https://develop.svn.wordpress.org/trunk@41929 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 21:47:39 +00:00
Sergey Biryukov dcb6ef8aa4 Date/Time: Use delta comparison in `get_gmt_from_date()` tests to avoid race conditions.
Props keesiemeijer.
Fixes #38815.

git-svn-id: https://develop.svn.wordpress.org/trunk@41920 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 19:41:46 +00:00
Konstantin Obenland 043609bca4 Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.


git-svn-id: https://develop.svn.wordpress.org/trunk@41899 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:50:34 +00:00
Weston Ruter 92f9610907 Customize: Remove incorrect test assertions for the `post_date` of customization drafts.
Amends [41887].
See #42220.


git-svn-id: https://develop.svn.wordpress.org/trunk@41892 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 02:40:27 +00:00
Weston Ruter ce7a93c235 Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.

Props westonruter, melchoyce.
See #39896, #39752, #34923.
Fixes #42220.


git-svn-id: https://develop.svn.wordpress.org/trunk@41887 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-17 20:14:56 +00:00
Felix Arntz ad1d11f88d Multisite: Revert [41698] and [41743].
In order for `get_site_by()` to be truly beneficial, caching in `WP_Site_Query` needs to be improved to account for common use-cases and have them be invalidated less aggressively.

See #40180, #40228, #42091.


git-svn-id: https://develop.svn.wordpress.org/trunk@41884 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 22:34:07 +00:00
Felix Arntz 363445adcb Multisite: Revert [41719].
While `get_site_by()` makes sense as a more explicit and less complex replacement for `get_blog_details()`, it is not ready yet in terms of caching, where it currently falls short of the older function under specific circumstances.

See #40180, #40228.


git-svn-id: https://develop.svn.wordpress.org/trunk@41883 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 22:28:52 +00:00
Boone Gorges f9dc276353 Don't force distinct term queries when specifying `number` and `object_ids`.
This reverts [41377], which caused performance problems on sites with a large
number of terms.

See #41796.


git-svn-id: https://develop.svn.wordpress.org/trunk@41880 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:34:29 +00:00
Sergey Biryukov a722bac3ed Build/Test Tools: Pass correct `$message` argument to `WP_UnitTestCase::setExpectedException()` in `Tests_Ajax_CompressionTest::test_logged_out()` and `Tests_Ajax_TagSearch::test_no_results()`.
PHPUnit 6.4.1 and earlier versions ignored the `'0'` value, causing the issue to go unnoticed.

Fixes #42232.

git-svn-id: https://develop.svn.wordpress.org/trunk@41870 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 04:05:29 +00:00
Felix Arntz 4d6c257cf9 Multisite: Take `WP_Network::$blog_id` into account in `get_main_site_id()`.
When the `WP_Network::$blog_id` property is set manually, for example in the multisite bootstrap process, `get_main_site_id()` should use that value instead of running its own logic. The main logic for the function was therefore moved into the internal `WP_Network::get_main_site_id()` method, which is now being accessed by the function through the magic property handling for `WP_Network::$blog_id` (and its equivalent `WP_Network::$site_id`).

Props spacedmonkey, jeremyfelt.
Fixes #41936.


git-svn-id: https://develop.svn.wordpress.org/trunk@41861 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-14 22:41:15 +00:00
Weston Ruter b822b04f7e Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
See #41871.


git-svn-id: https://develop.svn.wordpress.org/trunk@41858 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 19:42:40 +00:00
Weston Ruter faeac43629 Code Editor: Add unit tests for `wp_enqueue_code_editor()` and `WP_Widget_Custom_HTML`.
Props ryotsun.
See #12423.
Fixes #41871.


git-svn-id: https://develop.svn.wordpress.org/trunk@41855 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 17:57:38 +00:00
Boone Gorges 5c8c480d22 Bump 'posts' query cache incrementor when modifying postmeta.
This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.

Props spacedmonkey.
Fixes #40669.

git-svn-id: https://develop.svn.wordpress.org/trunk@41849 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 15:19:30 +00:00
Boone Gorges 6ce4e413ce Invalidate comment query cache when modifying comment meta.
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.

Props spacedmonkey.
See #40669.

git-svn-id: https://develop.svn.wordpress.org/trunk@41848 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 14:58:58 +00:00
Gary Pendergast 5fac6cc075 Build/Test Tools: Revert [41784].
[41784] was a workaround for a bug in PHPUnit 6.4. PHPUnit 6.4.1 has since been released, which includes a fix for this.

Fixes #42124.



git-svn-id: https://develop.svn.wordpress.org/trunk@41841 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:27:22 +00:00
Weston Ruter bb63758be8 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.


git-svn-id: https://develop.svn.wordpress.org/trunk@41839 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:00:15 +00:00
Weston Ruter 6abe575a2a Customize: Introduce `WP_Customize_Manager::trash_changeset_post()` to reduce duplication and ensure proper changeset trashing logic.
Trashing a changeset via `wp_trash_post()` does not have the desired result since it mutates `post_content` (via Kses) and the `post_name` (even though it is a UUID).

Props dlh.
See #39896, #42030.
Fixes #42175.


git-svn-id: https://develop.svn.wordpress.org/trunk@41824 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:41:14 +00:00
Gary Pendergast 0e5b75b8be Database: When parsing the host, leave the port and socket as `null` if they're not defined.
This fixes a change in behaviour introduced by [41629].

The host is set to an empty string when it isn't defined, this continues existing behaviour. In particular, the mysqli library treats a `null` host as being the same as `localhost`, which is not always the intended behaviour.

Props birgire, markjaquith, pento.
Fixes #41722.



git-svn-id: https://develop.svn.wordpress.org/trunk@41820 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 00:09:47 +00:00
Gary Pendergast 6411029d0d Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2.
On newer versions of MySQL, an error was being thrown when creating a table with an index that we wanted to be silently truncated.

To avoid this, the test now tries to use a newer InnoDB file format where available, and skips the test when that happens.

Props pento, danielbachhuber, straussd.
Fixes #41716.



git-svn-id: https://develop.svn.wordpress.org/trunk@41818 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 23:45:35 +00:00
Konstantin Obenland b02beaf298 Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.

Fixes #42121.


git-svn-id: https://develop.svn.wordpress.org/trunk@41811 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 17:07:31 +00:00
Boone Gorges 911c380a83 Taxonomy: Don't discard keys when merging queried terms from different taxonomies.
For values of `fields` like `id=>parent`, the keys of the array must be
maintained as part of the query results.

Introduced as part of #40496. See [38667], [40513].

Props miyauchi, dany2217, pcarvalho.
Fixes #41293.

git-svn-id: https://develop.svn.wordpress.org/trunk@41809 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 16:45:01 +00:00
Gary Pendergast 33a0ff50b7 File Editor: Add support for more than one sub-directory level.
The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.

Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes #6531.



git-svn-id: https://develop.svn.wordpress.org/trunk@41806 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 05:33:57 +00:00
Weston Ruter 6f4866bada Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* Prevent autoloading an existing draft/future changeset when theme not active.
* Add missing notifications container to Themes panel.
* Remove deactivation of themes panel when selected status is not publish.
* Show notification in Themes panel when themes cannot be previewed and disable preview buttons.
* Reject installTheme call when theme preview not available.
* Return promise from installTheme and eliminate use of global events in favor of promises.

Props westonruter, melchoyce, zoonini.
See #37661, #39896.
Fixes #42126.



git-svn-id: https://develop.svn.wordpress.org/trunk@41788 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-07 05:59:45 +00:00
Sergey Biryukov c02645bf13 Rewrite: In `url_to_postid()`, bail early if the URL does not belong to the site.
Props ivankristianto, swissspidy, jkhongusc, SergeyBiryukov.
Fixes #39373.

git-svn-id: https://develop.svn.wordpress.org/trunk@41786 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 23:28:38 +00:00
Sergey Biryukov 3c72ff101f Build/Test Tools: In `Tests_Image_Functions::test_load_directory()`, check the expected internal type instead of using `assertNotInternalType()`, which causes an error with PHPUnit 6.4.0.
Props joemcgill.
Fixes #42124.

git-svn-id: https://develop.svn.wordpress.org/trunk@41784 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 18:21:16 +00:00
Weston Ruter a0b6749534 Customize: Fix QUnit tests after failures introduced in [41768].
Props bpayton.
Fixes #40104.


git-svn-id: https://develop.svn.wordpress.org/trunk@41773 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:22:09 +00:00
Weston Ruter fb28cd4663 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.


git-svn-id: https://develop.svn.wordpress.org/trunk@41768 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:21:22 +00:00
Sergey Biryukov cfe1b4476b Menus: Introduce `wp_get_nav_menu_name()` to retrieve the name of a navigation menu as set in the admin.
Props markoheijnen, christophherr, SpencerFinnell, wojtek.szkutnik, sagarprajapati, welcher, SergeyBiryukov.
Fixes #13910.

git-svn-id: https://develop.svn.wordpress.org/trunk@41766 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 01:37:39 +00:00
K. Adam White 8cda3a2f55 REST API: Support ordering response collection by listed slugs.
Adds an "include_slug" orderby value for REST API collections to permit returning a collection filtered by slugs in the same order in which those slugs are specified.
Previously, the order of slugs provided with the ?slug query parameter had no effect on the order of the returned records.

Props wonderboymusic, ocean90, boonebgorges.
Fixes #40826.



git-svn-id: https://develop.svn.wordpress.org/trunk@41760 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:36:43 +00:00
Konstantin Obenland 75ce48ef70 Widgets: Allow oEmbeds in video widget.
Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41759 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:21:27 +00:00
K. Adam White 64a36e4119 REST API: Support objects in settings schema.
Enables register_setting to accept an object as its schema value, allowing settings to accept non-scalar values through the REST API.
This whitelists the added type in the settings controller, and passes properties from argument registration into the validation functions.

Props joehoyle.
See #38583.



git-svn-id: https://develop.svn.wordpress.org/trunk@41758 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:18:44 +00:00
Adam Silverstein a500586603 Revert "Add `wp.hooks` - JavaScript actions and filters."
Revert `wp.hooks` for now as we continue to refine and test. 

Reverts [41375].


git-svn-id: https://develop.svn.wordpress.org/trunk@41751 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 20:24:52 +00:00
westonruter 0cc238c7c7 Customize: Allow controls to be created with pre-instantiated `Setting` object(s), or even with plain `Value` object(s).
* Allow passing settings in keyed object (e.g. `settings: { default: 'id' }  ), or as an array (e.g. `settings: [ 'id' ]`) with first being default; again, `Setting`/`Value` objects may be supplied instead of IDs.
* Allow a single setting to be supplied with just a single `setting` param, either a string or a `Setting`/`Value` object.
* Update `changeset_status` and `scheduled_changeset_date` to be added dynamically with JS and simply passing of `api.state()` instances as `setting`.
* Introduce a `data-customize-setting-key-link` attribute which, unlike `data-customize-setting-link`, allows passing the setting key (e.g. `default`) as opposed to the setting ID.
* Allow `WP_Customize_Control::get_link()` to return `data-customize-setting-key-link` when setting is not registered.
* Eliminate `default_value` from `WP_Customize_Date_Time_Control` since now comes from supplied `Value`.
* Export status choices as `wp.customize.settings.changeset.statusChoices`.
* Export date and time formats as `wp.customize.settings.dateFormat` and `wp.customize.settings.timeFormat` respectively.

Props westonruter, sayedwp.
See #39896, #30738, #30741, #42083.
Fixes #37964, #36167.


git-svn-id: https://develop.svn.wordpress.org/trunk@41750 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 20:01:12 +00:00
Mike Schroder 0cf7fbf654 Media: Store video creation date in meta.
When able to be parsed, store the created date for a video file from meta,
since this is useful separately from the dates on the file itself.

Introduces `wp_get_media_creation_timestamp()` to read the timestamp from
getID3 and a `wp_read_video_metadata` filter analogous to
`wp_read_image_metadata`.

Fixes #35218.
Props stevegrunwell, joemcgill, desrosj, blobfolio, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@41746 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 19:31:51 +00:00
K. Adam White e4df8c04b1 REST API: Add _fields parameter to selectively include fields in response JSON.
Allows REST API consumers to specify the specific fields needed in their application code, whitelisting those fields and omitting all others from the returned JSON response object.
This permits applications that only need for example the ID and title of posts to avoid having to transfer the entire rendered post content over the wire alongside the desired fields.
While this whitelisting has no affect on the queries run when preparing the response, it can yield significant reductions in the bandwidth required to transfer a response payload for simple applications.

Props adamsilverstein, TimothyBlynJacobs, svrooij.
Fixes #38131.



git-svn-id: https://develop.svn.wordpress.org/trunk@41744 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 18:44:41 +00:00
K. Adam White dd92141f54 REST API: Return 409 status when attempting to create an existing term.
Fixes an issue where submitting a well-formed request to create a term inappropriately returns a 500 error status if that term already exists.
HTTP 5xx error codes should be reserved for unexpected server errors, so "409 Conflict" is a more appropriate response.

Props alibasheer, guzzilar, shooper.
Fixes #41370.



git-svn-id: https://develop.svn.wordpress.org/trunk@41737 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 16:23:33 +00:00
Joe McGill 59c0329461 Customizer: Minimize duplicate header crops in the media library.
This adds `Custom_Image_Header::get_previous_crop()`, which finds any
previously cropped headers created from the same base image and replaces
that attachment rather than creating a new attachment.

After updating a crop, the replaced images is also removed from the list
of previous header images in the Customizer.

See #21819.


git-svn-id: https://develop.svn.wordpress.org/trunk@41732 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 14:58:07 +00:00
John Blackbourn 952e98c217 I18N: Improvements to the tests for plural forms.
* Move the `create_function()` code into a file that's only loaded, and into a test that's only run, on PHP <= 7.2 to avoid deprecated warnings in 7.2+.
* Convert the test skipping into a failure if the GlotPress locale file cannot be downloaded.
* Ensure `test_exceptions` fails if an exception is not thrown.
* Docs improvements

See #41562, #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41730 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 13:26:15 +00:00
Joe Hoyle 6b533ba2b0 REST API: Support for objects in schema validation and sanitization.
When registering routes developers can now define their complex objects in the schema and benefit from the automatic validation and sanitization in the REST API. This also paves the way for support for complex object registration via register_meta and register_setting.

See #38583.
Props TimothyBlynJacobs5.

git-svn-id: https://develop.svn.wordpress.org/trunk@41727 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 08:26:44 +00:00
Weston Ruter 3f1de03834 Customize: Improve usability of Customize JS API.
* Eliminate need to pass both ID and instance in calls to `Values#add()` for panels, sections, controls, settings, partials, and notifications.
* Eliminate need to supply `content` param when constructing a `Control`.
* Unwrap the `options.params` object passed in constructors to just pass a flat `options`. (Back-compat is maintained.)
* Add support for `templateId` param for `Control` to override which template is used for the content.
* Remove unused `previewer` being supplied in `Control` instances.
* Rename `classes` to `containerClasses` on `Notification`.
* Automatically supply `instanceNumber` to improve stable sorting.
* Use `api.Notifications` for notifications in settings instead of `api.Value`.

See #30741.
Fixes #42083.


git-svn-id: https://develop.svn.wordpress.org/trunk@41726 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 06:47:37 +00:00
Gary Pendergast 1eba2e5e3e Tests: Some tests in [41722] were using newer PHPUnit features.
`test_cache` used PHPUnit's object mocking to test some internal behaviour in `Plural_Forms`, but made use of the `willReturn()` method, which was introduced in PHPUnit 4.0 as shorthand for `will($this->returnValue())`. Fixed by switching to the longer form.

Several tests used the `@expectedException` directive to catch generic `Exception` exceptions, which was added in PHPUnit 3.7. Fixed by changing to an explicit `try` / `catch` test.

See #41562.



git-svn-id: https://develop.svn.wordpress.org/trunk@41725 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 04:10:47 +00:00
Joe McGill fa43ebdefd Media: Use max-width for default captions.
This alters the HTML output of the image caption shortcode to use
`max-width` instead of `width` to improve compatibility with
flexible layouts.

Props aaronrutley, desrosj.
Fixes #33981.


git-svn-id: https://develop.svn.wordpress.org/trunk@41724 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 02:49:19 +00:00
Gary Pendergast f3a52234ea I18N: Introduce the `Plural_Forms` class.
Historically, we've evaluated the plural forms for each language using `create_function()`. This is being deprecated in PHP 7.2, so needs to be replaced.

The `Plural_Forms` class parses the `Plural-Forms` header from the PO file, and internally caches the result of all subsequent plural form tests, allowing it to match the performance of the existing code.

Props rmccue.
Fixes #41562.



git-svn-id: https://develop.svn.wordpress.org/trunk@41722 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 01:29:59 +00:00
Weston Ruter e965140cc9 Customize: Let `establish_loaded_changeset` query changesets from any author not just current user when determining which changeset to autoload in non-branching mode.
See #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41720 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 00:00:47 +00:00
Felix Arntz 43a34c9167 Multisite: Improve `get_blog_details()` by using `get_site_by()`.
`get_site_by()` is now the preferred way to retrieve a site object by lookup for identifying data. By using a coherent structure and `get_sites()` internally, it has several advantages over the direct database queries and complex code in `get_blog_details()`. Therefore `get_blog_details()` is now a wrapper for `get_site_by()`, providing backward compatibility fixes where necessary.

Unit tests have been adjusted to account for the `blog-details` and `blog-lookup` cache groups, which are no longer needed.

Props spacedmonkey, jeremyfelt, flixos90.
Fixes #40228.


git-svn-id: https://develop.svn.wordpress.org/trunk@41719 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 19:40:01 +00:00
Felix Arntz 0c1c78bf09 Multisite: Establish `clean_blog_cache()` as a replacement for `refresh_blog_details()`.
Going forward, `clean_blog_cache()` is recommended to be used instead of `refresh_blog_details()`. It has been adjusted to match the functionality of the latter, with the exception that it always requires a site ID or object to be passed. The `refresh_blog_details` action has been deprecated in favor of the `clean_site_cache` action. The function itself is not formally deprecated at this point, but will likely be in the near future.

Props spacedmonkey.
Fixes #40201.


git-svn-id: https://develop.svn.wordpress.org/trunk@41716 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 18:40:32 +00:00
Felix Arntz 2e051261f3 Multisite: Add specific tests for `clean_blog_cache()` and `refresh_blog_details()`.
See #40201.


git-svn-id: https://develop.svn.wordpress.org/trunk@41715 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 18:20:37 +00:00
John Blackbourn 35363c99b1 Embeds: Remove the external oEmbed tests for YouTube.
These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

See #42076, #32714, #23149


git-svn-id: https://develop.svn.wordpress.org/trunk@41712 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 16:51:25 +00:00
John Blackbourn 23b1296432 Login and Registration: Add unit tests for `wp_auth_check()`.
Props pbearne, birgire

Fixes #41860


git-svn-id: https://develop.svn.wordpress.org/trunk@41710 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 16:01:16 +00:00