Commit Graph

11115 Commits

Author SHA1 Message Date
Scott Taylor
c82c1b828b Script Loader: move _WP_Dependency into its own file.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38375 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 18:05:29 +00:00
Scott Taylor
aad8b9805e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38374 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 17:52:05 +00:00
wonderboymusic
223b79162c Load: remove session.php and, instead, move the 2 require calls to wp-settings.php. This simplifies the include path.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38373 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 17:43:03 +00:00
Scott Taylor
3a4811afb4 Load: load class-phpass.php (PasswordHash class) early in wp-settings.php, instead of require_once()'ing it in several places.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38371 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 17:39:37 +00:00
John Blackbourn
dac30944ff Docs: Alignment after [38369].
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38370 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 16:50:58 +00:00
John Blackbourn
87c1b26ee7 Docs: Correct various documentation around object and stdClass types.
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38369 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 16:48:17 +00:00
John Blackbourn
bc38f711cf Embeds: Add a missing regex delimiter for Facebook URLs.
See #34737


git-svn-id: https://develop.svn.wordpress.org/trunk@38368 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 12:16:56 +00:00
John Blackbourn
cb0048a6c5 Embeds: Add support for embedding Facebook posts and videos via oEmbed.
Fixes #34737
Props pento, GaryJ


git-svn-id: https://develop.svn.wordpress.org/trunk@38367 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 11:56:47 +00:00
John Blackbourn
d9b3ae759a 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


git-svn-id: https://develop.svn.wordpress.org/trunk@38366 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 11:24:38 +00:00
John Blackbourn
acc91a60e0 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


git-svn-id: https://develop.svn.wordpress.org/trunk@38365 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 10:38:05 +00:00
Scott Taylor
4de1595d47 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38364 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 10:19:26 +00:00
Scott Taylor
a048646021 Load: move is_wp_error() to load.php so that WP_Error is in a file by itself.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38363 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:57:47 +00:00
Scott Taylor
1b292c965a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38362 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:52:18 +00:00
Scott Taylor
1ff3356d22 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38361 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:48:32 +00:00
Scott Taylor
05cd65dd82 L10N: improve accuracy of docs.
Props johnbillion.
Fixes #37585.


git-svn-id: https://develop.svn.wordpress.org/trunk@38360 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:37:30 +00:00
Scott Taylor
8a667f3036 Formatting: for a performance boost in remove_accents(), convert chr() calls to string literals.
Props gitlost.
Fixes #37643.


git-svn-id: https://develop.svn.wordpress.org/trunk@38359 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:34:44 +00:00
Scott Taylor
62fe5001ba Editor: improve word-count.js documentation.
Props jipmoors, andizer.
Fixes #37718.


git-svn-id: https://develop.svn.wordpress.org/trunk@38358 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:24:34 +00:00
Scott Taylor
9bb9ea8185 Cron: clarify descriptions for Cron API functions.
Props johnbillion.
Fixes #37769.


git-svn-id: https://develop.svn.wordpress.org/trunk@38357 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:21:33 +00:00
Scott Taylor
b16dcd954d Query: collapse several of the is_* methods using __call(). Add @method annotations.
Fixes #37830.


git-svn-id: https://develop.svn.wordpress.org/trunk@38356 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 19:41:42 +00:00
Scott Taylor
a02d79cf73 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38355 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 19:08:38 +00:00
Scott Taylor
9e9cc9d07a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38354 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 18:18:01 +00:00
Scott Taylor
9c722d92cc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38353 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 17:43:41 +00:00
Scott Taylor
b71117fdc7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38352 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 17:36:22 +00:00
Scott Taylor
3638dd6716 Query: move WP_Query into its own file via svn cp.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38351 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 17:19:47 +00:00
Drew Jaynes
66ac1f40ed Docs: Add a missing parenthesis in an example in the DocBlock for wp_redirect().
Props shayanys.
See #37770.


git-svn-id: https://develop.svn.wordpress.org/trunk@38350 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 07:35:15 +00:00
Andrew Ozz
861bdc722f TinyMCE: fix toolbars alignment in RTL.
Fixes #37760 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@38349 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 01:19:24 +00:00
Sergey Biryukov
8d490e9d83 Docs: Improve the docs for the_title() and make them more consistent with the_title_attribute().
Props ixkaito, swissspidy.
Fixes #37732.

git-svn-id: https://develop.svn.wordpress.org/trunk@38348 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-24 15:59:00 +00:00
Sergey Biryukov
47e8c055ef Administration: Underline links in the admin footer for better accessibility.
Props Presskopp.
Fixes #37529.

git-svn-id: https://develop.svn.wordpress.org/trunk@38347 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-24 15:42:13 +00:00
Sergey Biryukov
80439d1c48 I18N: Add translator comments for strings in wp-includes/functions.wp-scripts.php.
Props ramiy.
Fixes #37803.

git-svn-id: https://develop.svn.wordpress.org/trunk@38345 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:52:31 +00:00
Sergey Biryukov
5ae7139efa I18N: Add translator comments for strings in wp-includes/functions.php.
Props ramiy.
Fixes #37802.

git-svn-id: https://develop.svn.wordpress.org/trunk@38344 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:47:28 +00:00
Sergey Biryukov
407f0aaa34 I18N: Add translator comments for strings in wp-includes/deprecated.php.
Props ramiy.
Fixes #37797.

git-svn-id: https://develop.svn.wordpress.org/trunk@38343 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:35:15 +00:00
Sergey Biryukov
75c975c5d1 I18N: Add translator comments for strings in wp-includes/class-walker-comment.php.
Merge two similar strings.

Props ramiy.
Fixes #37796.

git-svn-id: https://develop.svn.wordpress.org/trunk@38342 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:32:15 +00:00
Sergey Biryukov
364754b01b I18N: Add translator comments for strings in wp-includes/author-template.php.
Props ramiy.
Fixes #37795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38341 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:17:32 +00:00
Sergey Biryukov
bcc0fc20b3 I18N: Add translator comments for strings in wp-includes/admin-bar.php.
Props ramiy.
Fixes #37794.

git-svn-id: https://develop.svn.wordpress.org/trunk@38340 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:04:33 +00:00
Scott Taylor
5e1193272f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38337 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:44:19 +00:00
Scott Taylor
148b09a79e Query: use correct description in the docblock for $number in WP_Comment_Query, WP_Network_Query, and WP_Site_Query.
Props flixos90.
Fixes #37621.


git-svn-id: https://develop.svn.wordpress.org/trunk@38336 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:40:09 +00:00
Scott Taylor
da8597c76b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38335 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:37:31 +00:00
Scott Taylor
3aee745492 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38334 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:32:18 +00:00
Scott Taylor
b1de6df8b4 Media: remove function_exists() call for ini_get() in _load_image_to_edit_path().
Props dd32.
Fixes #37681.


git-svn-id: https://develop.svn.wordpress.org/trunk@38333 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:23:41 +00:00
Sergey Biryukov
c913fc4c23 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38332 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:01:16 +00:00
Sergey Biryukov
934ffcf5b1 I18N: Remove unnecessary context for two strings on "Add New User" screen.
Props ramiy.
Fixes #37784.

git-svn-id: https://develop.svn.wordpress.org/trunk@38329 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 12:53:54 +00:00
Andrew Ozz
d96cb127ee 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38328 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 04:42:58 +00:00
Sergey Biryukov
8d48e9a685 I18N: Remove unnecessary context in wp_post_revision_title_expanded().
Props ramiy.
Fixes #37781.

git-svn-id: https://develop.svn.wordpress.org/trunk@38327 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 01:45:04 +00:00
Sergey Biryukov
862b5a554f I18N: Use a consistent context for "Add New" submenu strings in admin bar (Toolbar).
Props ramiy.
Fixes #37780.

git-svn-id: https://develop.svn.wordpress.org/trunk@38326 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 01:41:16 +00:00
Sergey Biryukov
afd7e3b16d I18N: Allow for WordPress Plugin/Theme Directory URLs to be localized.
Props ramiy.
Fixes #37501.

git-svn-id: https://develop.svn.wordpress.org/trunk@38325 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 01:18:53 +00:00
Sergey Biryukov
3a35ca8bd6 I18N: Replace unnecessary context with translator comments in wp_post_revision_title() and wp_post_revision_title_expanded().
Props ramiy.
Fixes #37778.

git-svn-id: https://develop.svn.wordpress.org/trunk@38324 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:34:31 +00:00
Sergey Biryukov
e408cbe86d I18N: Replace unnecessary context with a translator comment for %s Sites string in network_step1().
Props ramiy.
Fixes #37777.

git-svn-id: https://develop.svn.wordpress.org/trunk@38323 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:16:43 +00:00
Sergey Biryukov
aca32f8771 I18N: Replace unnecessary context with a translator comment for %s KB string on Network Settings screen.
Props ramiy.
Fixes #37496.

git-svn-id: https://develop.svn.wordpress.org/trunk@38322 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:10:49 +00:00
Sergey Biryukov
03e402b2ec Embeds: In get_oembed_endpoint_url(), avoid inadvertent stomping of the $format parameter passed to oembed_endpoint_url filter.
Props danhgilmore.
Fixes #37751.

git-svn-id: https://develop.svn.wordpress.org/trunk@38321 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:04:46 +00:00
Sergey Biryukov
f2a91f6157 I18N: Add translator comments for Edit Site: %s string in network admin.
Props ramiy.
Fixes #37776.

git-svn-id: https://develop.svn.wordpress.org/trunk@38320 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 23:52:56 +00:00
Scott Taylor
653fe9aaa1 Users: after [38317], use a @property annotation, instead of a public field.
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38319 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 22:14:03 +00:00
Scott Taylor
e8ab847c74 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38318 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:50:44 +00:00
Scott Taylor
459f3aa9a3 Users: $user_level has been publicly-accessed on instances of WP_User since version 2.0, but is has never been declared.
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38317 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:40:35 +00:00
Scott Taylor
03aad23a01 Locale: declare the $month_genitive field on WP_Locale.
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38316 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:32:09 +00:00
Scott Taylor
6f19452077 HTTP: in WP_HTTP_Response, the @param declarations for $status and $headers were swapped. Let us correct this.
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38315 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:27:02 +00:00
Scott Taylor
670878cbaa 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38314 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:09:03 +00:00
Scott Taylor
6df9616ff6 Comments: in wp_handle_comment_submission(), $_wp_unfiltered_html_comment is passed as part of $comment_data, but is not used locally.
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38313 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 21:03:05 +00:00
Scott Taylor
d46de8b22b Taxonomy: remove unnecessary break in WP_Term::__get().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38312 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:59:35 +00:00
Scott Taylor
46d7304d4a Nav Menus: remove unnecessary variable assignment in wp_nav_menu_item_post_type_meta_box().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38311 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:57:41 +00:00
Scott Taylor
368e28243f REST API: remove unnecessary variable assignments in rest_handle_options_request().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38310 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:55:29 +00:00
Scott Taylor
0dcc38a1ef Media: remove unnecessary variable assignment in gallery_shortcode().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38309 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:52:44 +00:00
Scott Taylor
0774c039f4 General: remove variable set needlessly in wp_check_jsonp_callback().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38308 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:50:31 +00:00
Drew Jaynes
b4fca4a558 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38307 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 18:24:48 +00:00
Sergey Biryukov
f9491ed8f6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38306 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 16:32:11 +00:00
Sergey Biryukov
8673ec7459 Multisite: Fix copy/paste issue in id attribute for a dismissible message on Sites screen.
Props imath.
Fixes #37764.

git-svn-id: https://develop.svn.wordpress.org/trunk@38305 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 14:21:15 +00:00
Scott Taylor
92d8f4afdc Login: retrieve_password() does not need to import 2 globals that it does not use.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38304 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 04:47:19 +00:00
Scott Taylor
45cd115bf6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38303 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 04:36:42 +00:00
Weston Ruter
4c137392c8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38301 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 03:11:51 +00:00
Weston Ruter
99b6d24042 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38300 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 00:55:42 +00:00
Weston Ruter
3ffa745991 Docs: Update outdated phpdoc for WP_Customize_Manager::validate_setting_values() to reflect changes in [37942].
Props dlh.
See #37247.
Fixes #37759.


git-svn-id: https://develop.svn.wordpress.org/trunk@38299 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 00:40:15 +00:00
Scott Taylor
2e111412f9 Comments: in WP_Comment_Query::fill_descendants(), continue if there is an empty array in the loop.
See #37416, [38297].


git-svn-id: https://develop.svn.wordpress.org/trunk@38298 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-21 06:42:44 +00:00
Scott Taylor
f6fced867b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38297 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-21 06:24:18 +00:00
Scott Taylor
081e51d94b Media: use wp_get_attachment_metadata() instead of get_post_meta() where appropriate.
Adds unit test.

Props JorritSchippers.
Fixes #36246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38296 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-21 06:14:37 +00:00
Scott Taylor
c593c6fa95 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38295 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 23:44:07 +00:00
Scott Taylor
d911ef44dc Media: when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys.
Props JaworskiMatt.
Fixes #37608.


git-svn-id: https://develop.svn.wordpress.org/trunk@38294 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 23:35:50 +00:00
Scott Taylor
a26f7f7d28 Media: Add some docs to media-gallery.js RIP.
Props jipmoors.
Fixes #37717.


git-svn-id: https://develop.svn.wordpress.org/trunk@38293 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 22:58:34 +00:00
Boone Gorges
29a5d46701 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38292 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 17:34:13 +00:00
Sergey Biryukov
4bf8693357 Docs: Correct usage examples for wpdb::prepare(), which should not be called statically.
Props TJNowell.
Fixes #37744.

git-svn-id: https://develop.svn.wordpress.org/trunk@38289 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 13:16:33 +00:00
Boone Gorges
f05beeba8c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38288 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 02:31:31 +00:00
Boone Gorges
54b51f1a26 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38286 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 02:16:54 +00:00
Sergey Biryukov
f3425a50ac Docs: Fix typo in load_plugin_textdomain() parameter description.
Props tivnet.
See #37318.

git-svn-id: https://develop.svn.wordpress.org/trunk@38284 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-19 14:28:42 +00:00
Aaron Jorbin
6f44d8c2dd 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38282 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-19 04:09:55 +00:00
Scott Taylor
b786d481a9 Query: use composition for $db in WP_Date_Query, removes need to import global $wpdb in multiple methods.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38280 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 19:47:15 +00:00
Scott Taylor
bad7b66501 Query: use composition for $db in WP_Query, removes need to import global $wpdb in multiple methods.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38279 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 19:38:18 +00:00
Boone Gorges
83c7544ef8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38277 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 19:14:52 +00:00
Aaron Jorbin
e1590fff09 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38276 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 18:54:41 +00:00
Scott Taylor
4e55f2248b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38275 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 18:20:55 +00:00
Dion Hulse
1e15f01687 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38274 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-18 03:47:55 +00:00
John Blackbourn
e784e65d68 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


git-svn-id: https://develop.svn.wordpress.org/trunk@38272 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-17 18:29:47 +00:00
Dominik Schilling (ocean90)
a93c94c6b2 About Page: Add release video and move images to CDN.
Props jerrysarcastic, rosso99, petya, hugobaeta, jerrysarcastic.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38267 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-16 17:57:06 +00:00
Dominik Schilling
dd92169bfe 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38263 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-15 19:15:48 +00:00
Aaron Jorbin
40c9dcfa80 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38261 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-15 18:19:18 +00:00
Dominik Schilling
e8f182885a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38257 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 19:27:22 +00:00
Dominik Schilling
a0aba9dc44 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38255 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 18:34:12 +00:00
Drew Jaynes
19a85950ad Docs: Add a period missed in an argument description in [38253] for #36338.
git-svn-id: https://develop.svn.wordpress.org/trunk@38254 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:43:42 +00:00
Drew Jaynes
77aa4a8b72 Docs: Add documentation for all arguments accepted by export_wp().
Props theMikeD for the initial patch.
Fixes #36338.


git-svn-id: https://develop.svn.wordpress.org/trunk@38253 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:42:05 +00:00
Aaron Jorbin
17afb9c704 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38251 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 15:59:03 +00:00
Sergey Biryukov
363d8ad2a6 Users: Merge two duplicate strings introduced in [37940].
Props dimadin.
Fixes #37644.

git-svn-id: https://develop.svn.wordpress.org/trunk@38250 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-12 14:11:58 +00:00
Dominik Schilling
97c4e332b5 About Page: Fix punctuation errors in two strings.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38248 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-11 20:50:38 +00:00
Dominik Schilling
defc92a66e About Page: Third pass for 4.6.
* Adjust strings.
* Make strings translatable.
* Improve margin between copy and images.

Props Ipstenu, SergeyBiryukov, Presskopp, jeremyfelt, afragen, helen, Clorith, macmanx, DrewAPicture, voldemortensen, jorbin, MattyRob, ocean90.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38244 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 23:32:27 +00:00