Commit Graph

34313 Commits

Author SHA1 Message Date
Drew Jaynes
d11f7ed391 Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37518 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:49:05 +00:00
Drew Jaynes
422cdb28a1 Docs: Standardize filter docs in wp-includes/l10n.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37517 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:47:37 +00:00
Drew Jaynes
4fd2c46d89 Docs: Standardize filter docs in wp-includes/feed.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37516 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:46:29 +00:00
Drew Jaynes
0e34dac34a Docs: Standardize filter docs in wp-includes/formatting.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37515 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:44:38 +00:00
Drew Jaynes
57794c02d8 Docs: Standardize filter docs in wp-includes/class-http.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37514 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:42:48 +00:00
Drew Jaynes
872e55281b Docs: Standardize filter docs in wp-includes/embed.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37513 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:41:51 +00:00
Drew Jaynes
53a58c6933 Docs: Standardize filter docs in wp-includes/comment.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37512 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:40:47 +00:00
Drew Jaynes
1dc4b17e93 Docs: Standardize filter docs in wp-includes/ms-functions.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37511 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:39:17 +00:00
Drew Jaynes
39908cb2bb Docs: Standardize filter docs in wp-includes/functions.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37510 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:35:24 +00:00
Drew Jaynes
f70d94a8e6 Docs: Standardize filter docs in wp-includes/query.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37509 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:34:42 +00:00
Drew Jaynes
e66f4fc503 Docs: Standardize filter docs in wp-includes/pluggable.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37508 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:34:03 +00:00
Drew Jaynes
a003f843e8 Docs: Standardize filter docs in wp-includes/option.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37507 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:33:13 +00:00
Drew Jaynes
5c56dc4035 Docs: Standardize filter docs in wp-includes/taxonomy.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37506 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:31:56 +00:00
Drew Jaynes
b9f3c04720 Docs: Standardize filter docs in wp-includes/media.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37505 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:31:20 +00:00
Drew Jaynes
516fbd33b7 Docs: Standardize filter docs in wp-includes/post.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37504 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:30:23 +00:00
Drew Jaynes
e16029e958 Docs: Standardize filter docs in wp-includes/user.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37503 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:29:11 +00:00
Drew Jaynes
72acee3818 Docs: Standardize filter docs in wp-includes/post-thumbnail-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37502 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:28:11 +00:00
Drew Jaynes
421522e8b8 Docs: Standardize filter docs in wp-includes/post-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37501 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:27:48 +00:00
Drew Jaynes
d3ef49c8c7 Docs: Standardize filter docs in wp-includes/nav-menu-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37500 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:27:06 +00:00
Drew Jaynes
64ac60b8d3 Docs: Standardize filter docs in wp-includes/link-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37499 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:26:44 +00:00
Drew Jaynes
14ca371c1c Docs: Standardize filter docs in wp-includes/general-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37498 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:25:45 +00:00
Drew Jaynes
dcd01f597a Docs: Standardize filter docs in wp-includes/comment-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37497 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:25:17 +00:00
Drew Jaynes
74d96b738f Docs: Standardize filter docs in wp-includes/category-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37496 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:24:47 +00:00
Drew Jaynes
23ecafeae9 Docs: Standardize filter docs in wp-includes/author-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37495 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:24:23 +00:00
Drew Jaynes
0c72120925 Docs: Standardize filter docs in wp-includes/bookmark-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37494 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:23:31 +00:00
Drew Jaynes
d4df7a92d8 Docs: Standardize filter docs in wp-includes/theme.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37493 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:17:38 +00:00
Drew Jaynes
c49afe285c Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37492 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:14:19 +00:00
Drew Jaynes
5a96c219bf Docs: Standardize filter docs in the Customizer classes to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37491 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:09:59 +00:00
Drew Jaynes
0aa4ec76ab Docs: Standardize hook docs in wp-includes/rest-api/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37490 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:07:31 +00:00
Drew Jaynes
8fe11fa642 Docs: Standardize hook docs in wp-includes/widgets/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37489 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:05:54 +00:00
Drew Jaynes
1cd420af5e Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37488 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:00:23 +00:00
Drew Jaynes
520ed6b725 Docs: Remove/replace invalid inline @link tags in DocBlocks in wp-includes/*.
Fixes #36910.


git-svn-id: https://develop.svn.wordpress.org/trunk@37487 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 17:39:00 +00:00
Drew Jaynes
8a87c7c423 Docs: Remove several invalid inline @link tags from the DocBlock for wp_list_categories().
See #36910.


git-svn-id: https://develop.svn.wordpress.org/trunk@37486 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 17:23:13 +00:00
Drew Jaynes
b537c97778 Docs: Remove/replace invalid inline @link tags from DocBlocks in wp-admin/includes/*.
See #36910.


git-svn-id: https://develop.svn.wordpress.org/trunk@37485 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 17:21:48 +00:00
Drew Jaynes
1d6fff7f66 Docs: Fix some parameter alignment and backtick-escaping in two DocBlocks in wp-admin/includes/media.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37484 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 17:17:11 +00:00
Drew Jaynes
ca67aa233d Docs: Remove invalid inline @link tags from docs in wp-admin/includes/media.php.
See #36910.


git-svn-id: https://develop.svn.wordpress.org/trunk@37483 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 17:09:16 +00:00
Boone Gorges
f76abb73c9 Improve @return documentation for WP_Comment_Query::get_comments().
Props barryceelen.
Fixes #36896.

git-svn-id: https://develop.svn.wordpress.org/trunk@37482 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 16:20:48 +00:00
Boone Gorges
3e3b09c8ea In get_page_by_path(), values fetched from cache should obey $output param.
Introduced in [37479].

Props spacedmonkey.
Fixes #36711.

git-svn-id: https://develop.svn.wordpress.org/trunk@37481 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 16:18:22 +00:00
Boone Gorges
56a3d4bb65 Move get_the_terms() tests to their own file.
See #36814.


git-svn-id: https://develop.svn.wordpress.org/trunk@37480 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-21 17:56:40 +00:00
Boone Gorges
1a39a00dfd Cache queries in get_page_by_path().
Props spacedmonkey.
Fixes #36711.

git-svn-id: https://develop.svn.wordpress.org/trunk@37479 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-21 17:26:55 +00:00
Boone Gorges
70fece5c7e Tests: Improve tests for get_page_by_path().
* Move existing test into its own file.
* Add tests that cover most pieces of functionality.

See #36711.

git-svn-id: https://develop.svn.wordpress.org/trunk@37478 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-21 02:40:56 +00:00
Jeremy Felt
381930974c Multisite: Introduce WP_Site_Query
Provides a consistent way to query `$wpdb->blogs` for `WP_Site` objects based on domain, path, site ID, network ID, and more.

Introduces and uses `update_site_cache()` and `_prime_site_caches()` to maintain a cached list of `WP_Site` objects for use in multiple queries.

Props spacedmonkey, flixos90, DrewAPicture, jeremyfelt, ocean90.
See #35791.


git-svn-id: https://develop.svn.wordpress.org/trunk@37477 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 22:03:52 +00:00
Weston Ruter
c7ff79df64 Customize: Add setting validation model and control notifications to augment setting sanitization.
When a setting is invalid, not only will it be blocked from being saved but all other settings will be blocked as well. This ensures that Customizer saves aren't partial but are more transactional. User will be displayed the error in a notification so that they can fix and re-attempt saving.

PHP changes:

* Introduces `WP_Customize_Setting::validate()`, `WP_Customize_Setting::$validate_callback`, and the `customize_validate_{$setting_id}` filter.
* Introduces `WP_Customize_Manager::validate_setting_values()` to do validation (and sanitization) for the setting values supplied, returning a list of `WP_Error` instances for invalid settings.
* Attempting to save settings that are invalid will result in the save being blocked entirely, with the errors being sent in the `customize_save_response`. Modifies `WP_Customize_Manager::save()` to check all settings for validity issues prior to calling their `save` methods.
* Introduces `WP_Customize_Setting::json()` for parity with the other Customizer classes. This includes exporting of the `type`.
* Modifies `WP_Customize_Manager::post_value()` to apply `validate` after `sanitize`, and if validation fails, to return the `$default`.
* Introduces `customize_save_validation_before` action which fires right before the validation checks are made prior to saving.

JS changes:

* Introduces `wp.customize.Notification` in JS which to represent `WP_Error` instances returned from the server when setting validation fails.
* Introduces `wp.customize.Setting.prototype.notifications`.
* Introduces `wp.customize.Control.prototype.notifications`, which are synced with a control's settings' notifications.
* Introduces `wp.customize.Control.prototype.renderNotifications()` to re-render a control's notifications in its notification area. This is called automatically when the notifications collection changes.
* Introduces `wp.customize.settingConstructor`, allowing custom setting types to be used in the same way that custom controls, panels, and sections can be made.
* Injects a notification area into existing controls which is populated in response to the control's `notifications` collection changing. A custom control can customize the placement of the notification area by overriding the new `getNotificationsContainerElement` method.
* When a save fails due to setting invalidity, the invalidity errors will be added to the settings to then populate in the controls' notification areas, and the first such invalid control will be focused.

Props westonruter, celloexpressions, mrahmadawais.
See #35210.
See #30937.
Fixes #34893.


git-svn-id: https://develop.svn.wordpress.org/trunk@37476 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 21:09:40 +00:00
Jeremy Felt
757c0767f7 Multisite: Wrap the main bootstrap process in a function
Introduce `ms_load_current_site_and_network`. This is used by core during the multisite bootstrap process to populate the `$current_site` and `$current_blog` globals based on a requested domain and path.

Return values from this function inform `ms-settings.php` as to whether a page view should continue, `ms_not_installed()` should fire, or a redirect to a new location should occur.

This was previously a procedural block in `ms-settings.php`. Wrapping this code and providing specific return values allows us to write tests that do not rely on the manual and repeated inclusion of `ms-settings.php`.

This should not be used by plugins or themes. Please.

See #34941.


git-svn-id: https://develop.svn.wordpress.org/trunk@37475 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 20:56:54 +00:00
Boone Gorges
91f18f3d45 During password reset, user-submitted login/email should be stripslashed.
This prevents errors when an email address contains an apostrophe. See [29966]
for similar treatment of a related problem.

Props dcavins.
Fixes #36322.

git-svn-id: https://develop.svn.wordpress.org/trunk@37474 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 19:20:44 +00:00
Peter Wilson
e7c3dda9e9 Docs: Correct @since tag for Emoji SVG filters
See [37471]

Fixes #36525


git-svn-id: https://develop.svn.wordpress.org/trunk@37473 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 06:14:03 +00:00
Aaron Jorbin
82d0c1f523 Update jQuery Migrate to 1.4.1
http://blog.jquery.com/2016/05/19/jquery-migrate-1-4-1-released-and-the-path-to-jquery-3-0/

Unquoted selectors for attribute selectors should function once again (and output a warning so that plugins and themes using them can update).

Fixes #36892



git-svn-id: https://develop.svn.wordpress.org/trunk@37472 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 06:10:43 +00:00
Peter Wilson
761dde5ee9 Emoji: Use SVG in supported browsers
Use SVG images in supporting browsers, otherwise fall back to PNG images. Add the filters `emoji_svg_url` and `emoji_svg_ext`.

Introduces unit tests to check the Emoji CDN filters.

Fixes #36525


git-svn-id: https://develop.svn.wordpress.org/trunk@37471 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 06:02:55 +00:00
Gary Pendergast
8a779ede82 Tests: Fix an incorrect @ticket header included in [37469].
See #36122.



git-svn-id: https://develop.svn.wordpress.org/trunk@37470 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 05:29:50 +00:00
Gary Pendergast
6d963d60c6 Emoji: Allow emoji in blogname and blogdescription on utf8 installs.
When the options table is set to `utf8` instead of `utf8mb4`, emoji will be stripped from the blog name and description when they're saved. Instead of stripping them, they can be encode as HTML entities.

Fixes #36122.



git-svn-id: https://develop.svn.wordpress.org/trunk@37469 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 04:53:40 +00:00