Commit Graph

27867 Commits

Author SHA1 Message Date
Boone Gorges
df5e0a00b8 Clean up cache invalidation suspension global in unit tests.
This fixes a test that was introduced in [30073] which was polluting later
tests.

See #21760.

git-svn-id: https://develop.svn.wordpress.org/trunk@30112 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 04:14:53 +00:00
Drew Jaynes (DrewAPicture)
325c0622c9 Update the changelogs for the comment hook parameters added in [30092].
Parameters were added to the `get_comment_author`, `comment_author`, `get_comment_author_email`, `author_email`, `comment_email`, `get_comment_author_link`, `get_comment_author_IP`, `get_comment_author_url`, `comment_url`, `get_comment_excerpt`, `comment_excerpt`, `get_comment_ID`, and `get_comment_type` filters.

Fixes #22380.


git-svn-id: https://develop.svn.wordpress.org/trunk@30111 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 03:51:28 +00:00
Drew Jaynes (DrewAPicture)
dfe2224b5c Update the changelog for WP_Comment_Query::query() to reflect two more new arguments added in [30096].
[30096] introduced the `type__in` and `type__not_in` arguments. See #30111 for documentation on those new arguments.

Fixes #12668.


git-svn-id: https://develop.svn.wordpress.org/trunk@30110 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 03:05:29 +00:00
Drew Jaynes (DrewAPicture)
b2ec3c4303 Update the changelog for get_approved_comments() to reflect that the function was refactored to leverage WP_Comment_Query in [30098].
Also updates the `$args` parameter description with a reference to see `WP_Comment_Query` for argument information.

See #12668.


git-svn-id: https://develop.svn.wordpress.org/trunk@30109 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 02:50:16 +00:00
Boone Gorges
6a7443671b Clean up get_term_by() caching.
* Fix cache key/group modification that was missed in [30073].
* Update unit tests to reflect new key/group format.

Props tollmanz.
Fixes #21760.

git-svn-id: https://develop.svn.wordpress.org/trunk@30108 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 02:49:51 +00:00
Boone Gorges
cf1d77c101 In get_terms(), do not override 'hierarchical' and 'pad_counts' when 'parent' is present.
The previous behavior resulted in descendant terms being improperly excluded
from the results when passing a 'parent', even when 'hierarchical' had been
set to true.

The patch also adds unit tests that demonstrate the various interactions
between the 'child_of', 'parent', and 'hierarchical' parameters of `get_terms()`.

Props landakram.
Fixes #29815.

git-svn-id: https://develop.svn.wordpress.org/trunk@30107 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 02:11:56 +00:00
Jeremy Felt
2988aa8ba7 Expand tests around wpmu_delete_blog()
* Test cache after a site is deleted or flagged as deleted.
* Test tables after a site is deleted or flagged as deleted.
* Test tables and cache after the main site is deleted.
* Test site count after a site is deleted or flagged as deleted.

See #30080


git-svn-id: https://develop.svn.wordpress.org/trunk@30106 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 01:59:02 +00:00
Drew Jaynes (DrewAPicture)
3cc10d77a0 Remove redundant and erroneous @uses tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.


git-svn-id: https://develop.svn.wordpress.org/trunk@30105 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 01:04:55 +00:00
Dominik Schilling (ocean90)
e999d15f44 Customizer: Fix missing newly added widgets in the preview after [29905].
props westonruter.
fixes #29983.

git-svn-id: https://develop.svn.wordpress.org/trunk@30104 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:56:53 +00:00
Ian Stewart
3f36fb3a30 Twenty Fifteen: back compat checks in Twenty Fifteen are breaking the customizer, leaving them in for now, but commented out.
See #30137.


git-svn-id: https://develop.svn.wordpress.org/trunk@30103 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:51:11 +00:00
Dominik Schilling (ocean90)
90182015e7 Improve/introduce Customizer JavaScript models for Controls, Sections, and Panels.
* Introduce models for panels and sections.
* Introduce API to expand and focus a control, section or panel.
* Allow deep-linking to panels, sections, and controls inside of the Customizer.
* Clean up `accordion.js`, removing all Customizer-specific logic.
* Add initial unit tests for `wp.customize.Class` in `customize-base.js`.

https://make.wordpress.org/core/2014/10/27/toward-a-complete-javascript-api-for-the-customizer/ provides an overview of how to use the JavaScript API.

props westonruter, celloexpressions, ryankienstra.
see #28032, #28579, #28580, #28650, #28709, #29758.
fixes #29529.



git-svn-id: https://develop.svn.wordpress.org/trunk@30102 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:50:21 +00:00
Mark Jaquith
037e00fb15 Fix weird HiDPI screen rendering issue with theme install preview toolbar
fixes #28898
props ocean90

git-svn-id: https://develop.svn.wordpress.org/trunk@30101 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:35:27 +00:00
Dominik Schilling (ocean90)
15af3fdaa8 Improve body class for page templates.
* Convert slash to dash too.
* Add sub-folder name as a separate body class.
* New classes are additional classes, old syntax will persists for BC.

With this `/page-templates/full-width.php` will produce `page-template`, `page-template-page-templates`, `page-template-full-width` and `page-template-page-templatesfull-width-php`.

props obenland, Caspie, donutz.
fixes #23470.

git-svn-id: https://develop.svn.wordpress.org/trunk@30100 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:19:08 +00:00
Ian Stewart
f6544f237a Twenty Fifteen: avoid errors by preventing Twenty Fifteen from being activated in old versions of WordPress
Props iamtakashi, fixes #30137.



git-svn-id: https://develop.svn.wordpress.org/trunk@30099 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:13:14 +00:00
Boone Gorges
f9e32aef2d Use WP_Comment_Query to query comments in get_approved_comments().
Props dancameron.
See #12668.

git-svn-id: https://develop.svn.wordpress.org/trunk@30098 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 21:57:07 +00:00
Ian Stewart
192e1aac62 Twenty Fifteen: leading the way with support for title-tag
Props obenland, fixes #30146.



git-svn-id: https://develop.svn.wordpress.org/trunk@30097 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 21:55:24 +00:00
Boone Gorges
bd795a3d16 Better flexibility for 'type' in WP_Comment_Query.
* Add support for an array of values in 'type'.
* Introduce `type__in` parameter. This duplicates 'type' but is added for better consistency with other query classes.
* Introduce `type__not_in`.

Among other things, these changes will make it easier for plugin authors to
manage the appearance of custom comment types in various WP interfaces.

Props dancameron, mordauk.
See #12668.

git-svn-id: https://develop.svn.wordpress.org/trunk@30096 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 21:49:08 +00:00
John Blackbourn
6fcb1bf817 Add a hidden submit button to the Appearance -> Header screen so keyboard users can submit the form correctly when a default image provided by the theme is in use.
Fixes #20880.
Props kovshenin, joedolson.


git-svn-id: https://develop.svn.wordpress.org/trunk@30095 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 21:40:58 +00:00
Konstantin Kovshenin
6debe759a6 Use a nested meta query when querying by role in WP_User_Query.
If a user query includes a meta query together with a role argument,
nest the original meta query and append the role meta query with an
AND relationship.

fixes #23849, #27026.


git-svn-id: https://develop.svn.wordpress.org/trunk@30094 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 21:40:04 +00:00
Boone Gorges
555d7347f9 Support an empty string passed as a status in WP_Comment_Query.
The changes in [30084] broke backward compatibility with interfaces that
manually passed an empty string for the value of 'status', such as on
wp-admin/edit-comments.php.

Fixes #29612.

git-svn-id: https://develop.svn.wordpress.org/trunk@30093 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 19:50:31 +00:00
Peter Westwood
ed19e5a1f3 Comment Template Tags: Improve the availability of context information in comment template tag filters.
Fixes #22380 props momo360modena, tareq1988.


git-svn-id: https://develop.svn.wordpress.org/trunk@30092 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 19:07:00 +00:00
John Blackbourn
32d38fc080 Introduce some actions and filters which aid plugins in revisioning post meta.
* `wp_save_post_revision_post_has_changed` filter which can be used to determine if a post has been changed, and therefore if a revision should be created for a post.
 * `wp_get_revision_ui_diff` filter which can be used to filter the fields displayed in the post revision diff UI.
 * `wp_creating_autosave` action which is fired just before an autosave is created.

See #20564.
Props mattheu, adamsilverstein.


git-svn-id: https://develop.svn.wordpress.org/trunk@30091 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 19:01:15 +00:00
John Blackbourn
1767706fc2 Revert [28610] in order to avoid infinite redirect loops on reverse proxies which proxy from HTTPS to HTTP. This will be revisited at some point, possibly as an option via a filter.
Fixes #28610.


git-svn-id: https://develop.svn.wordpress.org/trunk@30090 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 18:36:41 +00:00
Mark Jaquith
7f0f887357 Increase both mystery and humanism
git-svn-id: https://develop.svn.wordpress.org/trunk@30089 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 03:19:45 +00:00
Boone Gorges
c3a3fc5a79 Introduce 'pre_delete_term' hook.
Props cmmarslender.
Fixes #30127.

git-svn-id: https://develop.svn.wordpress.org/trunk@30088 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 02:43:33 +00:00
John Blackbourn
d62320bff5 Correct some logic to populate the defaultValue variable when data.defaultValue begins with a hash symbol.
Props antpb
Fixes #30125


git-svn-id: https://develop.svn.wordpress.org/trunk@30087 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 02:42:35 +00:00
Boone Gorges
e36f06a87f Be more specific in documentation of 'slug' param for get_terms().
Props jfarthing84.
Fixes #23636.

git-svn-id: https://develop.svn.wordpress.org/trunk@30086 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 02:34:56 +00:00
Boone Gorges
114c1f32ba Improve global variable setting in setup_postdata().
`setup_postdata()` is responsible for setting a number of global variables
that are used for post pagination (`$pages`, `$page`, `$nextpage`) and the
generation of post excerpts (`$more`). These variables should be sensitive to
the currently running instance of `WP_Query` - rather than the main query -
so that these features work properly inside of secondary `WP_Query` loops.

This changeset moves the logic of `setup_postdata()` into a method on `WP_Query`,
and converts `setup_postdata()` to a wrapper.

Props boonebgorges, wonderboymusic.
See #25349.
Fixes #9256, #20904.

git-svn-id: https://develop.svn.wordpress.org/trunk@30085 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 02:31:37 +00:00
Boone Gorges
7c4aada4a6 Support multiple 'status' values in WP_Comment_Query.
This change required turning the SQL concatenation into the generation of an
array, for greater flexibility.

Props karpstrucking, ebinnion.
Fixes #29612.

git-svn-id: https://develop.svn.wordpress.org/trunk@30084 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 02:21:10 +00:00
Scott Taylor
5569f01459 Allow developers to override the settings.success callback for MediaElement players.
Props nofearinc.
Fixes #30029.


git-svn-id: https://develop.svn.wordpress.org/trunk@30083 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 01:20:03 +00:00
Scott Taylor
e6bbbb3db9 Don't hardcode height for videos - this was a workaround for MediaElement internals causing problems. Responsive videos now work properly and don't cause extra whitespace.
Fixes MediaElement by hand in the interim: https://github.com/johndyer/mediaelement/pull/1337
Video playlists were completely broken by this.

Fixes #30078.



git-svn-id: https://develop.svn.wordpress.org/trunk@30082 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 00:46:15 +00:00
Lance Willett
acbf0229cf Twenty Fifteen: only escape HTML attribute output with esc_attr(). See #30133, props ocean90.
git-svn-id: https://develop.svn.wordpress.org/trunk@30081 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 23:07:32 +00:00
Boone Gorges
66e02d639e Remove call to wp_get_last_changed() from unit tests.
This function was removed in [30073].

See #21760.

git-svn-id: https://develop.svn.wordpress.org/trunk@30080 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 22:02:59 +00:00
Aaron Jorbin
233946b852 Update images based on grunt imagemin
The new version of imagemin that was added in r30059 condenses some images more.

see #30141



git-svn-id: https://develop.svn.wordpress.org/trunk@30079 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 22:01:12 +00:00
Mark Jaquith
42456d35fd Docs and code standards cleanup for [30055] (wp_json_encode() & friends)
fixes #28786
props TobiasBg

git-svn-id: https://develop.svn.wordpress.org/trunk@30078 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:28:34 +00:00
Boone Gorges
0cbc8098d2 Update inline docs for [30052].
Fixes #23261.

git-svn-id: https://develop.svn.wordpress.org/trunk@30077 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:25:30 +00:00
Scott Taylor
45a635d8c2 In _wp_handle_upload(), if test_upload is set to false in the array of dangerous overrides that the function allows, the only thing that happens when an upload fails is more potential breakage.
`$test_uploaded_file` lets is know if `$file['tmp_name']` exists, which allows to exit with an error, instead of continuing to attempt to move the file.

`$test_upload` override is now a noop.

Fixes #28208.


git-svn-id: https://develop.svn.wordpress.org/trunk@30076 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:16:06 +00:00
Mark Jaquith
52151956ea Define JSON_PRETTY_PRINT so it can be used with wp_json_encode()
* `JSON_PRETTY_PRINT` was introduced in PHP 5.4
* Now you can use it with lower PHP versions, without a notice

fixes #30139
see #28786

git-svn-id: https://develop.svn.wordpress.org/trunk@30075 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:12:10 +00:00
John Blackbourn
efb9cd0cc5 Introduce a new means of outputting a <title> tag in the theme head. Requires a theme to add support by calling add_theme_support( 'title-tag' ). This is the first step in adding a more robust means of generating and outputting the title tag.
See #18548.
Props obenland, chrisbliss18, joostdevalk.



git-svn-id: https://develop.svn.wordpress.org/trunk@30074 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:11:11 +00:00
Scott Taylor
1e8635fcea Adjust caching for get_term_by() calls:
* Remove md5 hashes for term name cache keys
* Remove the namespace for the keys for `names` and `slugs` and add them to the group names
* Remove `wp_get_last_changed()`, which @nacin hated
 
Props tollmanz.
Fixes #21760.


git-svn-id: https://develop.svn.wordpress.org/trunk@30073 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:04:52 +00:00
iandstewart
e5275dcedb Twenty Fifteen: Use a heading heirarchy to provide a better navigation experience when using screenreading software.
Props davidakennedy, rianrietveld, iamtakashi, afercia, davidakennedy, fixes #30065.


git-svn-id: https://develop.svn.wordpress.org/trunk@30072 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 21:02:02 +00:00
Jeremy Felt
d80d1c2ffe Introduce wp_is_trusted_network()
A first step to establish concepts around trusted and untrusted networks.

* Will always return false as default.
* Will one day have a filter.

Fixes #30145


git-svn-id: https://develop.svn.wordpress.org/trunk@30071 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:55:39 +00:00
Aaron Jorbin
7ca2e674cd Autoprefix box sizing
Results are from running grunt autoprefix.  Needed for FF before 29 and Safari before 5.1.

fixes #27553



git-svn-id: https://develop.svn.wordpress.org/trunk@30070 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:47:30 +00:00
Aaron Jorbin
c9dfc6bebb Don't cascade autoprefixer output
Autoprefixer changed the default for cascade from false to true. Our css coding standards do not include the cascade for browser prefixes.
Introduced in r30067

see #30141



git-svn-id: https://develop.svn.wordpress.org/trunk@30069 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:44:33 +00:00
Scott Taylor
74ed2089b4 The gallery shortcode used to accept a SQL chunk for the value of the orderby attribute. The reason? get_posts() used to be called in the shortcode handler with a query-string blob of arguments passed to it. To mitigate breakage, sanitize_sql_orderby() was created in [7592].
`sanitize_sql_orderby()` expects a comma to be present when multiple `orderby` values were passed. The correct syntax for multiple fields is space-delimited. Since [29027], comma-separated values would never be parsed correctly when passed to `WP_Query->parse_orderby()`.

`sanitize_sql_orderby()` is used nowhere else in core, save for the `playlist` shortcode - I only added it there because I was mimic'ing the `gallery` logic. The function call can be removed from both shortcode handlers.
 
See #6476.
Fixes #23873.


git-svn-id: https://develop.svn.wordpress.org/trunk@30068 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:42:20 +00:00
Aaron Jorbin
489da6a815 Update grunt-autoprefixer to 1.0.1
Upstream changes https://github.com/nDmitry/grunt-autoprefixer/compare/v0.8.2...v1.0.1

see #30141


git-svn-id: https://develop.svn.wordpress.org/trunk@30067 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 20:16:32 +00:00
Aaron Jorbin
d6f0d2c273 Update grunt-contrib-uglify to 0.6.0
Upstream changes https://github.com/gruntjs/grunt-contrib-uglify/compare/v0.5.0...v0.6.0

see #30141


git-svn-id: https://develop.svn.wordpress.org/trunk@30066 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 19:49:26 +00:00
John Blackbourn
f08525846a Introduce some new template functions for navigation:
* `get_the_post_navigation()` and `the_post_navigation()` for navigation to the next and previous post.
 * `get_the_posts_navigation() and `the_posts_navigation()` for navigation to the next and previous page of posts.
 * `get_the_pagination()` and `the_pagination()` for paginated navigation between pages of posts. Uses `paginate_links()`.

This reduces the need for themes to define their own sets of navigation functions.

Fixes #29808.
Props obenland.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@30065 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 19:38:41 +00:00
Scott Taylor
159423cef9 Add audio, video, and track to $allowedposttags (KSES).
Props jwenerd, wonderboymusic. 
Fixes #29826.


git-svn-id: https://develop.svn.wordpress.org/trunk@30064 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 19:35:17 +00:00
Aaron Jorbin
2285c9195d Update grunt-contrib-copy to 0.7.0
Upstream changes https://github.com/gruntjs/grunt-contrib-copy/compare/v0.5.0...v0.7.0

see #30141


git-svn-id: https://develop.svn.wordpress.org/trunk@30063 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-28 19:34:41 +00:00