Commit Graph

27573 Commits

Author SHA1 Message Date
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
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
3640f40a12 Fix theme support unit test added in [27220].
The test assumed that the active theme either had no menu locations, or a subset of 'primary' and 'secondary'. see #26900.


git-svn-id: https://develop.svn.wordpress.org/trunk@29894 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 19:54:03 +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
1fcb79f008 Use assertEqualSets() for a few taxonomy-related tests.
assertEquals() was causing problems in environments where the tests take more
than one second to run, thereby causing results to be returned in the incorrect
order.

git-svn-id: https://develop.svn.wordpress.org/trunk@29888 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-14 00:18:28 +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
Boone Gorges
c10a0ae277 Don't create dummy data for each date query test.
The integration tests for using date_query in WP_Query require the creation of
dummy post data, much of which is common between a number of tests. However,
newer tests do not require as much data, so to reduce overhead we create the
data explicitly only when we need it, instead of in the setUp() method.

See #29781.

git-svn-id: https://develop.svn.wordpress.org/trunk@29885 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-13 00:17:12 +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
Jeremy Felt
7fc02a2abd Reset multisite unit tests global stack to original host after testing bootstrap
After using `_setup_host_request()` to test multiple domain and path combinations, use the same to set the global stack back to a domain of `WP_TESTS_DOMAIN` and path of `/`.

Fixes #29930


git-svn-id: https://develop.svn.wordpress.org/trunk@29881 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 01:41:43 +00:00
Jeremy Felt
bd0e6790a5 Do not send a welcome notification when noconfirmation has been flagged
When adding a new user to a site on the network, 2 emails are sent out - one for confirmation and one as a welcome. If the option for no confirmation is selected, neither should send.

props transom
Fixes #16235


git-svn-id: https://develop.svn.wordpress.org/trunk@29880 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 01:10:21 +00:00
Andrew Ozz
463ef0f0fd Fix support for the hide option in wpColorPicker, props tollmanz, fixes #29632
git-svn-id: https://develop.svn.wordpress.org/trunk@29879 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 00:50:54 +00:00
Andrew Ozz
30902e52a9 Quicktags: remove accesskey attributes the buttons and don't add empty title attributes, fixes #29358
git-svn-id: https://develop.svn.wordpress.org/trunk@29878 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 00:46:26 +00:00
Jeremy Felt
f12a68e7c6 Differentiate between invalid and missing admin emails when adding a new site
Check the emptiness of the admin email before using `sanitize_email()` and `is_email()` to determine if the address is valid.

Fixes #17890


git-svn-id: https://develop.svn.wordpress.org/trunk@29877 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-12 00:21:02 +00:00
Andrew Ozz
4d68c7c91a Media modal: fix reordering of the thumbnails while creating or editing a gallery, props avryl, fixes #29606 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@29876 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 23:23:44 +00:00
Boone Gorges
9c28ce9974 Improve unit test coverage for wp_update_term().
See #5809, #22023.

git-svn-id: https://develop.svn.wordpress.org/trunk@29875 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 04:36:44 +00:00
Sergey Biryukov
34a58febd8 Ensure themes don't have to call add_image_size() to be used in unit tests.
props mboynes.
fixes #29924.

git-svn-id: https://develop.svn.wordpress.org/trunk@29874 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 04:22:11 +00:00
Sergey Biryukov
31bed9ed11 Fix whitespace issues in [29781]. Remove a redundant comment.
props miqrogroove.
see #29557.

git-svn-id: https://develop.svn.wordpress.org/trunk@29873 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:32:15 +00:00
Sergey Biryukov
204e5dae21 Add missing label to comment type filter dropdown.
props afercia.
fixes #29922.

git-svn-id: https://develop.svn.wordpress.org/trunk@29872 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:25:17 +00:00
Sergey Biryukov
c50be6a735 Remove "View" prefix from category filter dropdowns, for consistency with [27626].
props afercia.
see #29921.

git-svn-id: https://develop.svn.wordpress.org/trunk@29871 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:22:08 +00:00
Sergey Biryukov
8d2f5d0cc5 Add missing labels to category filter dropdowns.
props afercia.
fixes #29921.

git-svn-id: https://develop.svn.wordpress.org/trunk@29870 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:20:05 +00:00
Boone Gorges
f7dbf962d7 Only reset taxonomies and post types between tests when running core tests.
A growing number of plugins and other WP-based projects use the core test
tools, such as WP_UnitTestCase, as the basis of their own tests and continuous
integration setups. At the same time, many of these third-party plugins use
custom post types and taxonomies, which are generally registered a single time
during a run of the tests: at 'init', before the testcases have run. Wiping out
these globals between tests will mess with these third-party builds.

Best practice for plugin developers is probably to clean up their own post types
and taxonomies and then reinitialize before each test. But, in the interest of
not breaking everyone's builds, the core test suite will not enforce this.

Fixes #29827.

git-svn-id: https://develop.svn.wordpress.org/trunk@29869 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-10 20:25:39 +00:00