Commit Graph

4394 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Boone Gorges
56c82e534f Avoid redundant table joins in WP_Tax_Query.
IN clauses that are connected by OR require only a single table join. To avoid
extraneous joins, keep track of generated table aliases, and let sibling
clauses piggy-back on those aliases when possible.

Introduces WP_Tax_Query::sanitize_relation() to reduce some repeated code.

Adds unit tests to verify the JOIN consolidation, and integration tests for
cases where JOINS are being combined.

Props boonebgorges, otto42, jakub.tyrcha.
Fixes #18105.

git-svn-id: https://develop.svn.wordpress.org/trunk@29902 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 16:39:19 +00:00
Boone Gorges
c995866623 Support nested tax query syntax in redirect_canonical().
The proper place to look for a list of queried terms is in the flat
queried_terms array, not in tax_query->queries.

See #29738.

git-svn-id: https://develop.svn.wordpress.org/trunk@29901 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 15:42:45 +00:00
Sergey Biryukov
cd19612e1f Twenty Fifteen: Update some more bundled theme references after [29895].
see #29799.

git-svn-id: https://develop.svn.wordpress.org/trunk@29900 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 14:34:44 +00:00
Sergey Biryukov
862c82c18f Add line breaks at the end of network setup rules to avoid unintended merging with a subsequent line.
props socki03.
fixes #29945.

git-svn-id: https://develop.svn.wordpress.org/trunk@29899 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 14:12:13 +00:00
Andrew Ozz
801ce09508 Admin menu:
- Fix pinning after resizing the window.
- Merge the two DOM ready callbacks in common.js
- Fix the submenus position adjustment on focus.
See #29806

git-svn-id: https://develop.svn.wordpress.org/trunk@29898 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 06:04:15 +00:00
Andrew Ozz
2b93139fc9 Twenty Fifteen: clean up skip-link-focus-fix.js, see #29799
git-svn-id: https://develop.svn.wordpress.org/trunk@29897 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 05:48:05 +00:00
Boone Gorges
2796b6969f Support 'EXISTS' and 'NOT EXISTS' in WP_Tax_Query.
These new values for the 'operator' parameter make it possible to filter items
that have no term from a given taxonomy, or any term from a given taxonomy.

Includes unit tests.

Fixes #29181.

git-svn-id: https://develop.svn.wordpress.org/trunk@29896 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-15 00:53:22 +00:00
Andrew Nacin
209a4c6a86 Set Twenty Fifteen as the new default theme. see #29799.
git-svn-id: https://develop.svn.wordpress.org/trunk@29895 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 19:57:13 +00:00
Andrew Nacin
9966625f84 Twenty Fifteen: JSHint fixes.
* Define global variables set by wp_localize_script().
 * Remove currently unused $ variable.
 * Use dot notation when appropriate.
 * Update Gruntfile.js to ignore the html5 shiv.
see #29799.


git-svn-id: https://develop.svn.wordpress.org/trunk@29893 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 19:47:11 +00:00
Ian Stewart
af4fdd7f81 Importing Twenty Fifteen, first pass at our new default theme for 2015, set for 4.1.
It's good for posts, it's good for pages, it might be good for you. Development will occur in trunk. Have at it.

Props matt, iandstewart, iamtakashi, obenland, cainm, kristastevens, karmatosed, chellycat, lancewillett, kwight, davidakennedy. See #29799



git-svn-id: https://develop.svn.wordpress.org/trunk@29892 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 19:27:23 +00:00
Boone Gorges
6d94c2e30d Introduce support for nested queries in WP_Tax_Query.
Previously, tax query arguments could be joined by a single AND or OR relation.
Now, these queries can be arbitrarily nested, allowing clauses to be linked
together with multiple relations.

In a few places, WP_Query runs through a list of clauses in a tax_query in order
to set certain query vars for backward compatibility. The necessary changes have
been made to WP_Query to support this feature with the new complex structure of
tax_query. Unit tests are included for these backward compatibility fixes.

Unit tests for the new nesting syntax are included.

Props boonebgorges.
Fixes #29718. See #29738.

git-svn-id: https://develop.svn.wordpress.org/trunk@29891 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 04:02:41 +00:00
Boone Gorges
40dc982a30 Use only LEFT JOINs when a meta_query contains a NOT EXISTS clause.
Mixing LEFT and INNER JOIN in these cases results in posts with no metadata
being improperly excluded from results.

Props johnrom.
Fixes #29062.

git-svn-id: https://develop.svn.wordpress.org/trunk@29890 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 02:16:28 +00:00
Andrew Ozz
e7d3a9a26c Quicktags: fix strict check for instance['0'], props afercia, fixes #29767
git-svn-id: https://develop.svn.wordpress.org/trunk@29889 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 01:25:32 +00:00
Boone Gorges
0b05366c6f Introduce support for nested queries in WP_Meta_Query.
Previously, meta query arguments could be joined by a single AND or OR relation.
Now, these queries can be arbitrarily nested, allowing clauses to be linked
together with multiple relations.

Adds unit tests for the new nesting syntax. Modifies a few existing unit tests
that were overly specific for the old SQL syntax. Backward compatibility with
existing syntax is fully maintained.

Props boonebgorges, DrewAPicture.
See #29642.

git-svn-id: https://develop.svn.wordpress.org/trunk@29887 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-13 22:02:18 +00:00
Andrew Ozz
f97a5aee3a Editor-expand: reset the editor height after the window is resized. Fixes #29952 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@29886 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-13 21:14:50 +00:00
Andrew Ozz
c4bf1bd17f Quicktags: move focusing the editor after inserting content to the end of the code blocks. Fixes a bug in Chrome where both the textarea and the window may auto-scroll to unexpected position on clicking a Quicktags button. Part props avryl, fixes #29944 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@29884 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 23:11:33 +00:00
Andrew Ozz
63634ff1bb TinyMCE: fix the 'wpgallery' plugin to use a placeholder for galleries when either the 'wpview' plugin or wp.mce is not loaded. Fixes #28756
git-svn-id: https://develop.svn.wordpress.org/trunk@29883 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 18:12:58 +00:00
Sergey Biryukov
9f8e03c390 Avoid PHP notices if 'plugin' is not set for tab=plugin-information.
props avryl.
fixes #29936.

git-svn-id: https://develop.svn.wordpress.org/trunk@29882 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 13:05:55 +00:00