Commit Graph

28035 Commits

Author SHA1 Message Date
Boone Gorges
11e0a527f7 Improve unit tests for 'status' param in WP_Comment_Query.
See #29612.

git-svn-id: https://develop.svn.wordpress.org/trunk@29980 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-21 13:40:33 +00:00
Boone Gorges
dc141fc510 Remove failing unit test for #27193.
This ticket was closed as invalid, so we no longer need this test.

git-svn-id: https://develop.svn.wordpress.org/trunk@29979 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-21 13:40:27 +00:00
Andrew Ozz
8288e31417 Admin menu:
- Fix scrolling the pinned menu with a mouse wheel.
- Fix pinning when the menu is only slightly taller than the viewport.
- Disable pinning on IE8, updating CSS top makes it jump when scrolling with a mouse wheel.
See #29806

git-svn-id: https://develop.svn.wordpress.org/trunk@29978 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-21 06:11:07 +00:00
Sergey Biryukov
4ea9070f8a Fix copy/paste errors in [27769].
props Corphi.
fixes #30054.

git-svn-id: https://develop.svn.wordpress.org/trunk@29977 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 21:34:51 +00:00
Ian Stewart
74f1fad31d Twenty Fifteen: updated styles for skip link.
Props afercia and iamtakashi, fixes #30043.



git-svn-id: https://develop.svn.wordpress.org/trunk@29976 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 19:38:41 +00:00
Ian Stewart
e9be393270 Twenty Fifteen: Adding in the twentyfifteen credits action.
Props iamtakashi, fixes #30051.



git-svn-id: https://develop.svn.wordpress.org/trunk@29975 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 19:20:48 +00:00
Ian Stewart
dd417a184c Twenty Fifteen: correct comment meta alignment when avatar display is turned off.
Props iamtakashi, fixes #30046.



git-svn-id: https://develop.svn.wordpress.org/trunk@29974 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 19:18:36 +00:00
Ian Stewart
7ce8654a92 Twenty Fifteen: correct button sizes.
Props iamtakashi, fixes #30045.



git-svn-id: https://develop.svn.wordpress.org/trunk@29973 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 19:15:24 +00:00
Ian Stewart
5630db8da3 Twenty Fifteen: beautify the header in IE 8.
Props afercia, fixes #30042.



git-svn-id: https://develop.svn.wordpress.org/trunk@29972 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 19:13:13 +00:00
Ian Stewart
efc50ba421 Twenty Fifteen: correct styles for color schemes
Props iamtakashi, fixes #29976.



git-svn-id: https://develop.svn.wordpress.org/trunk@29971 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 18:56:19 +00:00
Dion Hulse
f2b727f333 Filesystem: Fix the move() method of the SSH2 transport, which was using the SSH2 link rather than the SFTP link.
Props nobleclem. Fixes #29405


git-svn-id: https://develop.svn.wordpress.org/trunk@29970 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 07:45:52 +00:00
Dion Hulse
98c438048d Avoid a PHP Notice in the PemFTP Library by adding a missing function parameter. This parameter is unused by WordPress.
Props hugodelgado. Fixes #29628


git-svn-id: https://develop.svn.wordpress.org/trunk@29969 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 07:40:41 +00:00
Dion Hulse
5bcbdefd2e HTTP API: Support both the 'limit_response_size' and 'stream' parameters at the same time, allowing a partial file download.
Fixes #26726


git-svn-id: https://develop.svn.wordpress.org/trunk@29968 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-20 07:31:45 +00:00
Sergey Biryukov
79734b0677 Update expected results in wp_add_inline_style() unit tests after [29958].
props georgestephanis.
see #30032.

git-svn-id: https://develop.svn.wordpress.org/trunk@29967 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-19 21:23:32 +00:00
Boone Gorges
5bc62ad1e4 Allow apostrophes in email addresses when adding users via the Dashboard.
Email addresses entered in a number of interfaces were not being stripslashed
properly, with the result that the emails were not being recognized as valid.

Fixes #18039.

git-svn-id: https://develop.svn.wordpress.org/trunk@29966 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-19 20:29:33 +00:00
Boone Gorges
348c8958da Use the comment API rather than direct SQL queries in comments_template().
`comments_template()` is used by most themes to display a post's comments. It
shows all comments that have been approved, and also shows all pending comments
by the current visitor (as determined by the comment cookies). However, the
comments API previously had no way of querying for "all comments that are
either approved, or are unapproved but written by foo@example.com". The
workaround was a direct SQL query: uncached, not subject to the same filters as
other comment queries, and just generally icky.

The new `include_unapproved` parameter for `WP_Comment_Query` accepts an array
of user IDs or email addresses. Pending comments associated with users in this
array will be included in query results, regardless of the value of the 'status'
parameter. In `comments_template()`, we leap from direct SQL queries to
`get_comments()` plus `include_unapproved', striving to put right what once
went wrong.

Props boonebgorges, simonwheatley, hardy101, jesin.
Fixes #19623.

git-svn-id: https://develop.svn.wordpress.org/trunk@29965 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-19 19:38:16 +00:00
Boone Gorges
91733ae919 Make orderby=meta_value compatible with meta_query when relation=OR.
Passing orderby=meta_value and meta_key=foo to WP_Query should require that
each matched post have a meta value with the key 'foo'. To make this
requirement compatible with meta_query params that have the relation OR, we
nest the meta_query param, and join it using AND to a meta_query clause
generated from the meta_key/meta_compare/meta_type query vars.

Fixes #25538.

git-svn-id: https://develop.svn.wordpress.org/trunk@29964 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-19 18:53:55 +00:00
Sergey Biryukov
512ea93ae4 Live-update site title in toolbar when changing the corresponding field in General Settings.
props celloexpressions, avryl.
fixes #28682.

git-svn-id: https://develop.svn.wordpress.org/trunk@29963 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-19 09:12:11 +00:00
Sergey Biryukov
5ab446aab7 Move password hint text to a function. Add 'password_hint' filter.
props convissor.
fixes #21243.

git-svn-id: https://develop.svn.wordpress.org/trunk@29962 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 20:20:56 +00:00
Sergey Biryukov
ac90567ef1 Use proper functions for escaped translations.
pros jcastaneda.
fixes #30012.

git-svn-id: https://develop.svn.wordpress.org/trunk@29961 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 20:10:47 +00:00
Sergey Biryukov
0caa0b1dbf In wp.updates.decrementCount(), only display the count if it's a valid non-negative integer.
props jdgrimes.
fixes #29527.

git-svn-id: https://develop.svn.wordpress.org/trunk@29960 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 19:54:40 +00:00
Sergey Biryukov
d7955317f3 Theme install:
* Move the "based on" string below the rating to avoid wrapping to a second line.
* Reduce the gap between the theme screenshot and description.
* Fix Install button height on mobile.

props obenland, ocean90.
fixes #28148. see #29556.

git-svn-id: https://develop.svn.wordpress.org/trunk@29959 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 19:42:12 +00:00
Sergey Biryukov
a1b5440d4b wp_add_inline_style():
* Change the `wp-inline-style-$handle` class added in [29956] to `$handle-inline-css` for consistency with existing patterns.
* Add the ID attribute when concatenation is enabled as well.

props georgestephanis.
see #30032.

git-svn-id: https://develop.svn.wordpress.org/trunk@29958 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 19:03:11 +00:00
Sergey Biryukov
97b07876cb Themes: Make "Live Preview" the primary action and "Activate" secondary.
props celloexpressions.
fixes #26899.

git-svn-id: https://develop.svn.wordpress.org/trunk@29957 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 18:16:23 +00:00
Sergey Biryukov
112c98f71e Add ID attribute to style element from wp_add_inline_style().
props westonruter.
fixes #30032.

git-svn-id: https://develop.svn.wordpress.org/trunk@29956 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 17:57:23 +00:00
Sergey Biryukov
326aeeba56 Customizer: Use correct panel-back icon in RTL.
props TomHarrigan.
fixes #29946.

git-svn-id: https://develop.svn.wordpress.org/trunk@29955 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 15:34:33 +00:00
Boone Gorges
fd7d38ec3b Ensure that post types and taxonomies are reset between multisite tests.
This is a port of [29869] to multisite.xml.

See #29827.

git-svn-id: https://develop.svn.wordpress.org/trunk@29954 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 02:31:46 +00:00
Boone Gorges
17183e4e71 Remove redundant table alias check in WP_Meta_Query.
Also adds documentation for 'meta_query_find_compatible_table_alias' filter.

See #24093.

git-svn-id: https://develop.svn.wordpress.org/trunk@29953 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-18 02:21:33 +00:00
Sergey Biryukov
49c33927b5 Fix formatting in [29946].
props TobiasBg.
fixes #29925.

git-svn-id: https://develop.svn.wordpress.org/trunk@29952 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 22:14:49 +00:00
iandstewart
35c3756c2b Twenty Fifteen: Swap order of description and caption so the caption is underneath an image on image attachment pages.
Props iamtakashi, fixes #30020.



git-svn-id: https://develop.svn.wordpress.org/trunk@29951 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:35:01 +00:00
Dominik Schilling (ocean90)
061226df73 Customizer: Extract content markup for panels to its own method, WP_Customize_Panel::render_content().
This allows to override the behavior of a panel, or even to completely replace its contents with something other than controls or sections.

props celloexpressions.
fixes #29324.

git-svn-id: https://develop.svn.wordpress.org/trunk@29950 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:24:32 +00:00
Ian Stewart
3769ced570 Twenty Fifteen: centre gallery thumbnails
Props iamtakashi, fixes #30019



git-svn-id: https://develop.svn.wordpress.org/trunk@29949 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:22:25 +00:00
Dominik Schilling (ocean90)
12c39b7f4a Customizer: Introduce customize_preview_$setting->type action to handle multiple settings of the same type.
props celloexpressions.
fixes #29165.

git-svn-id: https://develop.svn.wordpress.org/trunk@29948 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:20:42 +00:00
Ian Stewart
c4a5809baf Twenty Fifteen: correct escaping to render HTML in no-content admin message.
Props dmchale, fixes #30011.


git-svn-id: https://develop.svn.wordpress.org/trunk@29947 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 21:15:39 +00:00
Aaron Jorbin
230313d25a Check if WP_DEFAULT_THEME starts with twenty before asserting it is in default theme array
This fixes an issue that if you change WP_DEFAULT_THEME and run core unit tests, the tests fail since your theme isn't one of the hard coded lists of default themes. We need to keep this test to make sure that we update the array of default themes for use in other tests.

If we ever change the naming convention for default themes, this will need to be updated.

props nacin for initial idea
fixes #29925



git-svn-id: https://develop.svn.wordpress.org/trunk@29946 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:59:23 +00:00
Boone Gorges
c2bea27bfd Invalidate cache for child terms when parent term is deleted.
Props socki03.
Fixes #29911.

git-svn-id: https://develop.svn.wordpress.org/trunk@29945 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:58:48 +00:00
Ian Stewart
297f2c78c5 Twenty Fifteen: Removing unused custom color controls.
Props cainm, fixes #29982 and #29959.



git-svn-id: https://develop.svn.wordpress.org/trunk@29944 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:51:46 +00:00
Aaron Jorbin
b5c0834bcb Run JSValidate on core themes JS
fixes #29968
props netweb


git-svn-id: https://develop.svn.wordpress.org/trunk@29943 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:37:07 +00:00
Ian Stewart
9902adca05 Twenty Fifteen: Fix hover and focus style for links in content with custom color schemes.
Props iamtakashi, fixes #29978.


git-svn-id: https://develop.svn.wordpress.org/trunk@29942 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:31:15 +00:00
Boone Gorges
4c544151b2 Bail from cleaning meta query clause when it's not an array.
Later isset() checks on string values were causing notices on PHP < 5.4.

Props jorbin.
See #29642.

git-svn-id: https://develop.svn.wordpress.org/trunk@29941 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:24:57 +00:00
Boone Gorges
1708a580fd Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins.
The logic used to generate clause SQL in `WP_Meta_Query` is somewhat arcane,
stemming mostly from an ongoing effort to eliminate costly table joins when
they are not necessary. By systematizing the process of looking for shareable
joins - as was done in `WP_Tax_Query` [29902] - it becomes possible to simplify
the construction of SQL queries in `get_sql_for_clause()`. Moreover, the
simplified logic is actually considerably better at identifying shareable
joins, such that certain uses of `WP_Meta_Query` will see joins reduced by 50%
or more.

Includes integration tests for a representative cross-section of the query
clause combinations that result in shared table aliases.

Props boonebgorges, sc0ttkclark.
See #24093.

git-svn-id: https://develop.svn.wordpress.org/trunk@29940 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 20:20:04 +00:00
Scott Taylor
be59c5009e wp_schedule_single_event() should not prevent scheduling a future duplicate event. It should only reject an event as a duplicate if there is already a similar event scheduled within 10 minutes of the given timestamp.
Adds unit tests, fixes existing cron test.

Props tellyworth.

See [9181], #6966.
Fixes #28213.


git-svn-id: https://develop.svn.wordpress.org/trunk@29939 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 19:16:26 +00:00
Boone Gorges
68d92cf23e Add @since annotation for 'user_registered' support in 'date_query_valid_columns' documentation.
Props DrewAPicture.
Fixes #27283.

git-svn-id: https://develop.svn.wordpress.org/trunk@29938 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 03:50:29 +00:00
Jeremy Felt
611a4aa969 Improve and reduce tests for get_blogs_of_user()
* Create half as many factory sites. See #30017
* Test the removal of a user from multiple sites.
* Expand tests to include second parameter for flagged sites.
* Remove duplicate test for deleted user.

Fixes #29996


git-svn-id: https://develop.svn.wordpress.org/trunk@29937 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 03:01:21 +00:00
Boone Gorges
00f7ae376a Better "inclusive" support for string values in WP_Date_Query.
The 'inclusive' parameter for WP_Date_Query determines whether non-precise
dates for 'before' and 'after' will be rounded up or down. Previously, this was
supported only when 'before' and 'after' were arrays; string-formatted dates
were run through strtotime(), which rounded them all down (inclusive in the
case of after, non-inclusive in the case of before). Now, we attempt to parse
formats that look like MySQL-formatted date strings, and apply inclusive logic
to them if we recognize them successfully.

Fixes #29908.
string values. Array values support the 'inclusive

git-svn-id: https://develop.svn.wordpress.org/trunk@29936 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 02:27:44 +00:00
Boone Gorges
aee4647da0 Comment/post author in/not_in for WP_Comment_Query.
Props nofearinc, chriscct7.
Fixes #29885.

git-svn-id: https://develop.svn.wordpress.org/trunk@29935 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 01:57:18 +00:00
Boone Gorges
64bc8466db Support date_query by user_registered in WP_User_Query.
Props ChriCo, nacin.
Fixes #27283.

git-svn-id: https://develop.svn.wordpress.org/trunk@29934 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 01:36:36 +00:00
Boone Gorges
42646e67b3 Use table aliases for columns in SQL generated by WP_Date_Query.
The use of non-aliased column names (eg 'post_date' instead of 'wp_posts.post_date')
in WP_Date_Query causes SQL notices and other failures when queries involve
table joins, such as date_query combined with tax_query or meta_query. This
changeset modifies WP_Date_Query::validate_column() to add the table alias when
it can be detected from the column name (ie, in the case of core columns).

A side effect of this change is that it is now possible to use WP_Date_Query
to build WHERE clauses across multiple tables, though there is currently no
core support for the automatic generation of the necessary JOIN clauses. See

Props ew_holmes, wonderboymusic, neoxx, Viper007Bond, boonebgorges.
Fixes #25775.

git-svn-id: https://develop.svn.wordpress.org/trunk@29933 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 01:19:03 +00:00
Boone Gorges
8692199bb5 Add expectedIncorrectUsage flags for unit tests that generate invalid dates.
Since [29925], passing an invalid date to WP_Date_Query will generate a
_doing_it_wrong() notice. The current changeset adds the
`@expectedIncorrectUsage` flag to those existing unit tests that generate
invalid dates, such as those that test canonical redirect and is_404()
conditionals.

Fixes #25834.

git-svn-id: https://develop.svn.wordpress.org/trunk@29932 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-17 00:40:06 +00:00
Boone Gorges
44bb383371 Remove invalid continue calls from WP_Tax_Query::get_sql_for_clause().
This was leftover code from the previous implementation, which used a `foreach()`
loop. See [29901].

Props nofearinc.
See #29738, #29718.

git-svn-id: https://develop.svn.wordpress.org/trunk@29931 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 22:06:46 +00:00