Commit Graph

8370 Commits

Author SHA1 Message Date
Drew Jaynes
0d1c1381b3 Docs: _pad_term_counts() takes an array of objects passed by reference, not term IDs.
Props wpsmith.
Fixes #34174.


git-svn-id: https://develop.svn.wordpress.org/trunk@34884 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 22:38:47 +00:00
Weston Ruter
346ebe0993 Customizer: Ensure that wp.customize.Widgets.savedWidgetIds is defined up front.
In 4.3 the widget controls were fully initialized up front along with the sidebar controls. The sidebar control depended (unnecessarily) on the widget control to ensure that `wp.customize.Widgets.savedWidgetIds` was defined. So after [34563] there could be a situation where the widgets are added/removed from a sidebar before their controls are initialized (if the sidebar section is never expanded), resulting in an error attempting to get a property off of an undefined value. So this change does the right thing and defines `savedWidgetIds` up front.

Also changes the `savedWidgetIds` variable type from an array to an object, to match how it is used as a dictionary lookup.

See #33901.


git-svn-id: https://develop.svn.wordpress.org/trunk@34883 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:58:48 +00:00
Jeremy Felt
4bec1448f3 Registration: Remove the last remaining Lucida Grande from WordPress.
Defer to default styling provided by the theme (and browser) in `wp-activate.php` and remove the `font-family` and `color` from the provided internal stylesheet.

Previously, [17327] and [18406].

Fixes #34145.


git-svn-id: https://develop.svn.wordpress.org/trunk@34882 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:55:39 +00:00
Konstantin Obenland
cb4554b3df Posts: Add post class for password protected posts.
Up until now password protected posts would only get a identifying class when
the password was still required. This adds a class for the case when that
requirement has been met.

For the other visibility types we already have `status-publish`
and `status-private`.

Props mdgl, F4rkie, wonderboymusic for initial patches.
Fixes #21899.



git-svn-id: https://develop.svn.wordpress.org/trunk@34881 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:53:20 +00:00
Aaron Jorbin
351beec384 Revert [34875] due to unintentional breaking change
WordPress.org was taken down due to as Otto42 describes:

The previous version of this function added the query piece for the meta key = blog_id.capabilities, regardless of whether or not a role was requested. This limits the users returned to those with some defined role on this particular multisite instance.

See #22212




git-svn-id: https://develop.svn.wordpress.org/trunk@34880 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 20:57:35 +00:00
Sergey Biryukov
b86e47d915 Transients: Clarify the expiration_of_site_transient_$transient filter description.
See #21330.

git-svn-id: https://develop.svn.wordpress.org/trunk@34878 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 18:10:17 +00:00
Dominik Schilling (ocean90)
4099310ff5 Transients: Rename filters added in [34865].
* `expiration_pre_set_transient_$transient` => `expiration_of_transient_$transient`
* `expiration_pre_set_site_transient_$transient` => `expiration_of_site_transient_$transient`

Fix hook docs.

Props chriscct7.
Fixes #21330.

git-svn-id: https://develop.svn.wordpress.org/trunk@34877 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:58:19 +00:00
Drew Jaynes
843cdf1f73 Docs: Update an inline comment in wp_get_attachment_image_sizes(), which came in as part of the Responsive Images merge in [34855].
Props joemcgill.
See #33641.


git-svn-id: https://develop.svn.wordpress.org/trunk@34876 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:46:30 +00:00
Boone Gorges
1949734cf3 Improve role-related arguments in WP_User_Query.
* 'role' now accepts an array or comma-separated list of role names. When passing multiple values for 'role', `WP_User_Query` will only match users that have all of the specified roles.
* 'role__in' accepts an array of role names, and allow the filtering of matched users to those with at least one of the specified roles.
* 'role__not_in' accepts an array of role names, and allows the filtering of matched users to those who have none of the specified roles.

Props swissspidy, mordauk, barrykooij, sirbrillig.
Fixes #22212.

git-svn-id: https://develop.svn.wordpress.org/trunk@34875 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:39:23 +00:00
Dominik Schilling (ocean90)
1e06e917af MS Themes List Table: Fix inverted logic for displaying the "No items" message.
Fixes #25464.

git-svn-id: https://develop.svn.wordpress.org/trunk@34873 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:34:54 +00:00
Drew Jaynes
be303910e9 Template: Introduce a new class_form argument in comment_form(), allowing customization of the form class attribute.
The static 'comment-form' class was originally added to `comment_form()` in [24525]. This new argument should provide needed flexibility in styling the comment form further.

Props flixos90.
Fixes #34170. See #23851.


git-svn-id: https://develop.svn.wordpress.org/trunk@34871 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:16:09 +00:00
Dominik Schilling (ocean90)
81fed4b639 Script Loader: Update version of json2.js after [34863].
See #26913.

git-svn-id: https://develop.svn.wordpress.org/trunk@34869 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 15:51:50 +00:00
Helen Hou-Sandi
b1b51495f3 Shortcodes: Pass the name as context for shortcode_atts_{$shortcode}.
props mattheu.
fixes #34167.


git-svn-id: https://develop.svn.wordpress.org/trunk@34868 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:33:27 +00:00
Scott Taylor
719f51b19d Setup/Config: some dirname( ABSPATH ) file lookups should have errors suppressed due to possibility of open_basedir restrictions on hosts.
Props chriscct7, misterunknown.
Fixes #29680.


git-svn-id: https://develop.svn.wordpress.org/trunk@34867 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:19:17 +00:00
Scott Taylor
bb2c59c3a8 Media: in wp_read_video|audio_metadata(), set GETID3_TEMP_DIR to get_temp_dir() if it is not defined. This is a workaround for when safe_mode is enabled pre-PHP 5.3.
Props chriscct7, tomsommer.
Fixes #26265.


git-svn-id: https://develop.svn.wordpress.org/trunk@34866 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:13:49 +00:00
Scott Taylor
b054b952bc Transients, add filters for $expiration:
* `'expiration_pre_set_site_transient_' . $transient`
* `'expiration_pre_set_transient_' . $transient`
 
Props chriscct7, wpsmith, nacin.
Fixes #21330.


git-svn-id: https://develop.svn.wordpress.org/trunk@34865 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:10:00 +00:00
Scott Taylor
f8b7bba8f6 WP Mail: replace logic that was mimicking strtotime() with strtotime(). Without this, the date parsing wasn't accounting for half-hour and quarter-hour timezones.
Props neoscrib, solarissmoke.
Fixes #16993.


git-svn-id: https://develop.svn.wordpress.org/trunk@34864 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:06:26 +00:00
Scott Taylor
d257aeb9a3 External Libraries: update json2.js to the 2015-05-03 version. Crockford does not tag releases: https://github.com/douglascrockford/JSON-js/commits/master
Props mgibbs189, chriscct7.
Fixes #26913.


git-svn-id: https://develop.svn.wordpress.org/trunk@34863 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 14:01:52 +00:00
Scott Taylor
79a907edf3 Scripts: in WP_Scripts::set_group(), the args prop of the _WP_Dependency instance defaults to null - check that it is set before comparing.
Props tivnet, chriscct7.
Fixes #25462.


git-svn-id: https://develop.svn.wordpress.org/trunk@34862 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 13:53:19 +00:00
Scott Taylor
d71eb86075 Admin Menu: remove duplicated separators, and use strpos() (instead of strcmp()) when determining if the separator CSS class is present.
Props rilwis, chriscct7.
Fixes #24104.


git-svn-id: https://develop.svn.wordpress.org/trunk@34861 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 13:45:24 +00:00
Scott Taylor
02804492e3 XML-RPC: allow wp_xmlrpc_server::wp_getPosts() to receive s as a filter.
Props chriscct7.
Fixes #25406.


git-svn-id: https://develop.svn.wordpress.org/trunk@34860 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 13:40:09 +00:00
Drew Jaynes
afe594bb7c Users: Empty sanitized usernames should be considered invalid when passed through validate_username().
Adds tests.

Props gwinhlopez for the initial patch.
Props mordauk, chriscct7.
Fixes #24618.


git-svn-id: https://develop.svn.wordpress.org/trunk@34856 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 05:34:47 +00:00
Scott Taylor
fabd554bb2 Merge the Responsive Images feature plugin into core, initial commit. See: https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/
New functions in `media.php`:
* `wp_get_attachment_image_srcset_array()` - Returns an array of image candidate string data used to build a `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_srcset()` - Returns the `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_sizes()` - Returns the `sizes` value for an attachment given an `$attachement_id` and `$size` and optional arguments used to alter its output.
* `wp_make_content_images_responsive()` - A display filter for adding `srcset` and `sizes` to images embedded in content.
* `wp_img_add_srcset_and_sizes()` - A utility function used by `wp_make_content_images_responsive()` to add `srcset` and `sizes` to a single `<img>` element.

Modifies existing core functions:
* Modify `wp_get_attachment_image()` so the HTML returned for an image includes `srcset` and `sizes`.
* Modify `get_media_embedded_in_content()` (sup, 3.6 leftover) by adding `<img>` to the list of accepted tags that can be matched in content. This is used in `wp_make_content_images_responsive()` to find all of the images embedded in content before passing them off to `wp_img_add_srcset_and_sizes()`.

Tests:
* Add a new factory method to `WP_UnitTest_Factory_For_Attachment` named `create_upload_object()`
* Adds unit tests
* Updates unit tests

Props joemcgill, tevko, jaspermdegroot, mdmcginn, barryceelen, peterwilsoncc, fsylum, wonderboymusic, chriscoyier, benjaminpick, jrfnl, #12kingkool68, janhenckens, ryanmarkel, side777, ryelle, wturrell, micahmills, mattbagwell, coliff, DrewAPicture.
See #33641.


git-svn-id: https://develop.svn.wordpress.org/trunk@34855 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 04:58:21 +00:00
Drew Jaynes
fe383af11a Multisite: Introduce get_subdirectory_reserved_names(), which returns a filterable list of reserved subdirectory site names.
The function encapsulates the existing `subdirectory_reserved_names` filter and reduces the maintenance burden of keeping the value of (currently) two instances of the same hook in sync.

See #33615.


git-svn-id: https://develop.svn.wordpress.org/trunk@34854 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 04:34:03 +00:00
Scott Taylor
a409a72e94 Multisite: in wpmu_validate_blog_signup(), pass embed to the array passed to subdirectory_reserved_names.
See #32522.


git-svn-id: https://develop.svn.wordpress.org/trunk@34853 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 04:04:24 +00:00
Scott Taylor
3eb876d7e9 Embeds: move some functions from media.php to a new file, embed-functions.php, via svn cp
See #32522.


git-svn-id: https://develop.svn.wordpress.org/trunk@34851 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 03:58:42 +00:00
Scott Taylor
9fe13be519 oEmbed: add embed to $subdirectory_reserved_names.
Props jeremyfelt.
See #32522.


git-svn-id: https://develop.svn.wordpress.org/trunk@34850 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 03:44:25 +00:00
Scott Taylor
5d0718497c REST API: add a utility function, mysql_to_rfc3339() to functions.php
Background:
6d0ad766ca

Props rmmcue.
See #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34846 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 03:18:45 +00:00
Scott Taylor
d2bb4d6745 REST API: add JsonSerializable() compatibility interface for PHP <5.4 to compat.php
Props rmmcue.
See #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34845 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 02:55:43 +00:00
Scott Taylor
51b4e75afb REST API: add json_last_error_msg() compatibility function for PHP <5.5 to compat.php
Props rmmcue.
See #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34844 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 02:44:16 +00:00
Drew Jaynes
1aaa0aa607 Docs: Adjust the line wrap indentation on the $link parameter description for the wp_post_revision_title_expanded hook, introduced in [34842].
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34843 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 01:29:04 +00:00
Helen Hou-Sandi
8baf0e0737 Revisions: Add a wp_post_revision_title_expanded filter.
This allows for content to be added to revision lists, such as in the revisions metabox.

fixes #9681.


git-svn-id: https://develop.svn.wordpress.org/trunk@34842 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 00:58:17 +00:00
Dominik Schilling (ocean90)
95fc47be4f Image Editor: Merge two error strings.
Props pavelevap.
See #22623.

git-svn-id: https://develop.svn.wordpress.org/trunk@34841 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 22:39:37 +00:00
Jeremy Felt
87232d4f61 MS: Pass context to get_header() and get_footer() in activation/signup.
Fixes #21712.


git-svn-id: https://develop.svn.wordpress.org/trunk@34840 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 22:35:20 +00:00
Dominik Schilling (ocean90)
f79a9d4ca2 Media List Table: Remove the date display in column_parent().
It should be the time at which the post was written, but it was never because of the missing `$parent` argument.

Fixes #33238.

git-svn-id: https://develop.svn.wordpress.org/trunk@34839 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 22:24:41 +00:00
Weston Ruter
84e475dd80 Customizer: Ensure WP_Customize_Setting::update() returns boolean value.
Adds unit tests for `WP_Customize_Setting::save()` (and `WP_Customize_Setting::update()`), along with the actions `customize_update_{$type}`, and `customize_save_{$id_base}` which they trigger.

Fixes #34140.


git-svn-id: https://develop.svn.wordpress.org/trunk@34838 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 21:57:32 +00:00
John Blackbourn
d8c9450179 Correct pagination when viewing the 'Mine' link on the post listing screen.
Fixes #19609
Props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@34837 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 21:35:18 +00:00
John Blackbourn
e710e49fe0 Include post__in as a value available to the orderby parameter in the docs for WP_Query::parse_query().
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@34836 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 20:57:14 +00:00
Weston Ruter
a743e47af8 Customizer: Reset horizontal scroll position when finished dragging a nav menu item.
Props karinedo, austinginder, adamsilverstein, tyxla.
Fixes #33367.


git-svn-id: https://develop.svn.wordpress.org/trunk@34834 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 20:45:57 +00:00
Helen Hou-Sandi
3cde6d29c7 Permalinks: Slightly lengthen the truncated slug for display.
This brings it closer to the width of the input so there is less jumping around of buttons. We can afford the space now that other buttons in the space are typically no longer there.

fixes #18306.


git-svn-id: https://develop.svn.wordpress.org/trunk@34833 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 19:28:19 +00:00
Drew Jaynes
3e29193b98 Revisions: Also pass the $revision post object to the wp_prepare_revision_for_js filter, introduced in [34541].
Props helen.
Fixes #28627.


git-svn-id: https://develop.svn.wordpress.org/trunk@34832 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:32:38 +00:00
Drew Jaynes
d95423c091 Docs: Document the $revision_data parameter passed to the wp_prepare_revision_for_js filter with a hash notation.
The hook was introduced in [34541].

See #28627.


git-svn-id: https://develop.svn.wordpress.org/trunk@34831 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:02:41 +00:00
Weston Ruter
32b604e984 Customizer: Fix moving focus to available nav menu items search.
Fixes regression introduced in [34219].

Props tyxla.
See #33360.
Fixes #34125 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@34829 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:26:59 +00:00
Boone Gorges
578134d4ff Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.

git-svn-id: https://develop.svn.wordpress.org/trunk@34828 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:05:26 +00:00
Drew Jaynes
d67c6d2ade Docs: Add a missing DocBlock summary for wp_list_widget_controls_dynamic_sidebar().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34827 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:05:53 +00:00
Drew Jaynes
39af3ca810 Docs: Add missing DocBlock summaries for five functions in wp-admin/includes/template-functions.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34826 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:02:20 +00:00
Drew Jaynes
4e86eb7cd4 Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34825 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:54:56 +00:00
Drew Jaynes
960526cdbc Docs: Add missing summaries for functions in wp-admin/includes/misc.php.
Also restructures the summary for `update_home_siteurl()`.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34824 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:51:08 +00:00
Drew Jaynes
e9e26c5726 Docs: Add missing DocBlock summaries for a multitude of functions in wp-admin/includes/media.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34823 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:43:49 +00:00
Drew Jaynes
61cd633892 Docs: Add missing method summaries for the deprecated WP_User_Search class, including prepare_query(), query(), prepare_vars_for_template_usage(), do_paging(), and get_results().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34822 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:34:47 +00:00