Commit Graph

27707 Commits

Author SHA1 Message Date
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
Ian Stewart
136436e9f1 Twenty Fifteen: readable comment details in the dark colour scheme.
Props NikV, fixes #29970.



git-svn-id: https://develop.svn.wordpress.org/trunk@29930 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 22:00:23 +00:00
Andrew Ozz
8348a50194 Editor-expand:
- Better calculation for the caret position when auto-scrolling while typing.
- Fix auto-scrolling for non-WebKit browsers when the caret is above the top of the editor.
Fixes #29954

git-svn-id: https://develop.svn.wordpress.org/trunk@29929 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 21:31:00 +00:00
Ian Stewart
f3bcbc8ada Twenty Fifteen: document the site-branding class in header.php.
Props NikV, fixes #29961.



git-svn-id: https://develop.svn.wordpress.org/trunk@29928 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 20:51:11 +00:00
Ian Stewart
722005655c Twenty Fifteen: make sure we don't see borders through transparent linked images.
Props iamtakashi, fixes #29963.



git-svn-id: https://develop.svn.wordpress.org/trunk@29927 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 20:47:35 +00:00
Ian Stewart
019998e325 Twenty Fifteen: Removes flashing of background behind fixed position elements when scrolling in mobile and desktop Safari.
Props iamtakashi, fixes #29973 and #29987.


git-svn-id: https://develop.svn.wordpress.org/trunk@29926 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 20:34:10 +00:00
Boone Gorges
a3da10deb0 Throw notices when invalid date values are passed to WP_Date_Query.
`_doing_it_wrong()` notices are now generated when passing out-of-range values
(`month=13`) or invalid dates (`2014-02-29`).

Includes unit tests.

Props ChriCo.
Fixes #25834.

git-svn-id: https://develop.svn.wordpress.org/trunk@29925 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 20:11:13 +00:00
Dominik Schilling (ocean90)
3d6d32d9e6 Themes: Make it possible to delete broken themes.
props ideag, obenland.
fixes #28165.

git-svn-id: https://develop.svn.wordpress.org/trunk@29924 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:45:26 +00:00
Boone Gorges
a3e0c08f2f Introduce nested query support to WP_Date_Query.
This enhancement makes it possible to filter post, comment, and other queries
by date in ways that are arbitrarily complex, using mixed AND and OR relations.

Includes unit tests for the new syntax. In a few places, the existing unit
tests were slightly too strict (such as when checking the exact syntax of a SQL
string); these existing tests have been narrowed.

Props boonebgorges.
Fixes #29822.

git-svn-id: https://develop.svn.wordpress.org/trunk@29923 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:33:24 +00:00
Ian Stewart
c845692fb4 Twenty Fifteen: indented nested lists in comments.
Props pauldewouters, iamtakashi, fixes #29981.



git-svn-id: https://develop.svn.wordpress.org/trunk@29922 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:31:09 +00:00
Ian Stewart
ed5e22d2f7 Twenty Fifteen: correct margin for pagination.
Props kwight; fixes #29964.



git-svn-id: https://develop.svn.wordpress.org/trunk@29921 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:15:33 +00:00
Dominik Schilling (ocean90)
f3eb0eacc6 Update jQuery UI to 1.11.2.
Changelog: http://jqueryui.com/changelog/1.11.2/

see #29833.

git-svn-id: https://develop.svn.wordpress.org/trunk@29920 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:01:44 +00:00
Ian Stewart
935bc467b5 Twenty Fifteen: add print styles.
Props iamtakashi, closes #29967



git-svn-id: https://develop.svn.wordpress.org/trunk@29919 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 19:01:18 +00:00
Ian Stewart
4eb5c81721 Twenty Fifteen: correct font fallback for Noto Serif in editor styles; Props Manoz69; Fixes #29984
git-svn-id: https://develop.svn.wordpress.org/trunk@29918 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 18:39:06 +00:00
Scott Taylor
bd70f47d46 In wp.Uploader, when uploader:ready is triggered, set ready to true on the instance. This allows media workflows to check for an existing uploaded instance when opening.
Without this check, workflows might wait for `uploader:ready`, which could already have been fired. This would result in an unresponsive editor dropzone.

Fixes #29689.


git-svn-id: https://develop.svn.wordpress.org/trunk@29917 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 05:53:15 +00:00
Jeremy Felt
f0b35fe7d5 Split and organize multisite unit tests
* Move `ms.php` to `multisite.php`
* Create `multisite.php` under directories `option/` and `user/` to better match existing structure.
* Create a `multisite/` directory containing `bootstrap.php`, `site.php`, and `network.php` for very multisite specific testing.
* Add unit test groups ms-site, ms-user, ms-option, ms-network, and ms-bootstrap.

Fixes #29896


git-svn-id: https://develop.svn.wordpress.org/trunk@29916 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 05:06:22 +00:00
Scott Taylor
0d58d32462 Cache get_term_by() calls:
* Add a helper function, `wp_get_last_changed()`, to retrieve a last-modified timestamp by cache group
* When caching a term, also make cache entries for slug and name via `slug:{$term_id}` and `name:{$term_id}` keys in the `$taxonomy:$last_changed` bucket that reference the term_id
* In `clean_term_cache()` and `update_term_cache()`, respect `$_wp_suspend_cache_invalidation`
* Original term cache entries maintain BC

Adds unit tests.

Props wonderboymusic, tollmanz, boonebgorges.
Fixes #21760.


git-svn-id: https://develop.svn.wordpress.org/trunk@29915 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 04:44:13 +00:00
Scott Taylor
076c7e8902 Add a 6th (!) attribute to wp_get_attachment_link() to allow aria-describedby to be added to gallery output.
Props joedolson, DrewAPicture, rianrietveld.
Fixes #27402.


git-svn-id: https://develop.svn.wordpress.org/trunk@29914 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 04:27:07 +00:00
Scott Taylor
248fc182b8 Fix Tests_Paginate_Links tests by properly setting up / tearing down permalink structure.
Props jorbin.
Fixes #29636.


git-svn-id: https://develop.svn.wordpress.org/trunk@29913 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 04:22:16 +00:00
Boone Gorges
e36cac6794 Check that search value is scalar before parsing.
Prevents PHP notices when non-scalar values are passed.

Includes unit tests.

Props tivnet.
Fixes #29736.

git-svn-id: https://develop.svn.wordpress.org/trunk@29912 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 03:31:27 +00:00
Andrew Ozz
136bba8cfd Twenty Fifteen, editor-style.css: revert the font-size back to 19px and margin back to 83px, merge the two body selectors (don't seem needed), remove redundant rtl rules and fix body.rtl selector. See #29799
git-svn-id: https://develop.svn.wordpress.org/trunk@29911 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 00:26:20 +00:00
Andrew Ozz
350439b05f Twenty Fifteen: no rem in editor-style.css for now, see #29799
git-svn-id: https://develop.svn.wordpress.org/trunk@29910 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 22:47:38 +00:00
Andrew Ozz
44e3ddfe7d Twenty Fifteen: make font-size/line-height in editor-style.css the same as in style.css. Remove margins from the editor body, interferes with autoresize in some browsers and is overriden in the default styles. See #29799
git-svn-id: https://develop.svn.wordpress.org/trunk@29909 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 22:36:27 +00:00
Dominik Schilling (ocean90)
5d7e30e7d9 Comments: Don't print an empty HTML markup when comment_reply_link() returns no link.
props obenland.
fixes #29895.

git-svn-id: https://develop.svn.wordpress.org/trunk@29908 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 21:55:31 +00:00
Dominik Schilling (ocean90)
e6d26285cc Customizer: Don't trigger a change event if two unchanged object values are equal, second pass.
Make Underscore.js a dependency for `customize-base` and use `_.isEqual()` to compare the values.
(Underscore.js was already enqueued via wp-util.js for Widgets.)

props westonruter.
fixes #26061.

git-svn-id: https://develop.svn.wordpress.org/trunk@29907 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 18:25:43 +00:00
Boone Gorges
d4239b67da Fix test_build_mysql_datetime_datetime_non_array().
The expected value was being incorrectly built.

git-svn-id: https://develop.svn.wordpress.org/trunk@29906 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 17:52:05 +00:00
Dominik Schilling (ocean90)
83b0f3f681 Customizer: Only POST dirty settings to preview to improve performance.
props westonruter.
fixes #29983.

git-svn-id: https://develop.svn.wordpress.org/trunk@29905 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 17:49:36 +00:00
Dominik Schilling (ocean90)
5829ccba9b Theme install: Remove unused strings.
fixes #29488.

git-svn-id: https://develop.svn.wordpress.org/trunk@29904 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 17:21:43 +00:00
Dominik Schilling (ocean90)
ab128698ad Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific.
Also capitalize "Customizer".
See also https://make.wordpress.org/core/2014/07/08/customizer-improvements-in-4-0/.

props studionashvegas, tareq1988.
fixes #29947.

git-svn-id: https://develop.svn.wordpress.org/trunk@29903 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 17:20:34 +00:00