Commit Graph

27309 Commits

Author SHA1 Message Date
Dominik Schilling
bf16aac8e1 Comments: Don't print an empty HTML markup when comment_reply_link() returns no link.
props obenland.
fixes #29895.
Built from https://develop.svn.wordpress.org/trunk@29908


git-svn-id: http://core.svn.wordpress.org/trunk@29662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 21:56:19 +00:00
Dominik Schilling
b89c915ed6 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.
Built from https://develop.svn.wordpress.org/trunk@29907


git-svn-id: http://core.svn.wordpress.org/trunk@29661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 18:26:17 +00:00
Dominik Schilling
4020eacd8b Customizer: Only POST dirty settings to preview to improve performance.
props westonruter.
fixes #29983.
Built from https://develop.svn.wordpress.org/trunk@29905


git-svn-id: http://core.svn.wordpress.org/trunk@29660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 17:50:18 +00:00
Dominik Schilling
1ab3190ddc Theme install: Remove unused strings.
fixes #29488.
Built from https://develop.svn.wordpress.org/trunk@29904


git-svn-id: http://core.svn.wordpress.org/trunk@29659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 17:22:18 +00:00
Dominik Schilling
61819a36ea 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.
Built from https://develop.svn.wordpress.org/trunk@29903


git-svn-id: http://core.svn.wordpress.org/trunk@29658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 17:21:19 +00:00
Boone Gorges
af6beda45b 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.
Built from https://develop.svn.wordpress.org/trunk@29902


git-svn-id: http://core.svn.wordpress.org/trunk@29657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 16:40:18 +00:00
Boone Gorges
295f5fc9de 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.
Built from https://develop.svn.wordpress.org/trunk@29901


git-svn-id: http://core.svn.wordpress.org/trunk@29656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 15:43:19 +00:00
Sergey Biryukov
16a55620c3 Twenty Fifteen: Update some more bundled theme references after [29895].
see #29799.
Built from https://develop.svn.wordpress.org/trunk@29900


git-svn-id: http://core.svn.wordpress.org/trunk@29655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 14:35:18 +00:00
Sergey Biryukov
320ee24a55 Add line breaks at the end of network setup rules to avoid unintended merging with a subsequent line.
props socki03.
fixes #29945.
Built from https://develop.svn.wordpress.org/trunk@29899


git-svn-id: http://core.svn.wordpress.org/trunk@29654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 14:13:20 +00:00
Andrew Ozz
f19ad10571 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
Built from https://develop.svn.wordpress.org/trunk@29898


git-svn-id: http://core.svn.wordpress.org/trunk@29653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 06:05:18 +00:00
Andrew Ozz
ca92ca385e Twenty Fifteen: clean up skip-link-focus-fix.js, see #29799
Built from https://develop.svn.wordpress.org/trunk@29897


git-svn-id: http://core.svn.wordpress.org/trunk@29652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 05:49:19 +00:00
Boone Gorges
09fbcfc1ad 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.
Built from https://develop.svn.wordpress.org/trunk@29896


git-svn-id: http://core.svn.wordpress.org/trunk@29651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 00:54:21 +00:00
Andrew Nacin
be7825789d Set Twenty Fifteen as the new default theme. see #29799.
Built from https://develop.svn.wordpress.org/trunk@29895


git-svn-id: http://core.svn.wordpress.org/trunk@29650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:58:19 +00:00
Andrew Nacin
e2041b8fbb 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.

Built from https://develop.svn.wordpress.org/trunk@29893


git-svn-id: http://core.svn.wordpress.org/trunk@29649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:48:19 +00:00
Ian Stewart
affa411402 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


Built from https://develop.svn.wordpress.org/trunk@29892


git-svn-id: http://core.svn.wordpress.org/trunk@29648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:28:18 +00:00
Boone Gorges
0143196338 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.
Built from https://develop.svn.wordpress.org/trunk@29891


git-svn-id: http://core.svn.wordpress.org/trunk@29647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 04:03:19 +00:00
Boone Gorges
d64b1ed955 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.
Built from https://develop.svn.wordpress.org/trunk@29890


git-svn-id: http://core.svn.wordpress.org/trunk@29646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 02:17:18 +00:00
Andrew Ozz
3ef60bf29b Quicktags: fix strict check for instance['0'], props afercia, fixes #29767
Built from https://develop.svn.wordpress.org/trunk@29889


git-svn-id: http://core.svn.wordpress.org/trunk@29645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 01:26:18 +00:00
Boone Gorges
54708e3e6d 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.
Built from https://develop.svn.wordpress.org/trunk@29888


git-svn-id: http://core.svn.wordpress.org/trunk@29644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 00:19:18 +00:00
Boone Gorges
d1d9915f07 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.
Built from https://develop.svn.wordpress.org/trunk@29887


git-svn-id: http://core.svn.wordpress.org/trunk@29643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-13 22:03:18 +00:00
Andrew Ozz
c3b2243a98 Editor-expand: reset the editor height after the window is resized. Fixes #29952 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29886


git-svn-id: http://core.svn.wordpress.org/trunk@29642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-13 21:15:19 +00:00
Boone Gorges
dbfaf60506 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.
Built from https://develop.svn.wordpress.org/trunk@29885


git-svn-id: http://core.svn.wordpress.org/trunk@29641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-13 00:18:18 +00:00
Andrew Ozz
f1c169f2ac 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.
Built from https://develop.svn.wordpress.org/trunk@29884


git-svn-id: http://core.svn.wordpress.org/trunk@29640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 23:12:19 +00:00
Andrew Ozz
912ffccdf6 TinyMCE: fix the 'wpgallery' plugin to use a placeholder for galleries when either the 'wpview' plugin or wp.mce is not loaded. Fixes #28756
Built from https://develop.svn.wordpress.org/trunk@29883


git-svn-id: http://core.svn.wordpress.org/trunk@29639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 18:13:20 +00:00
Sergey Biryukov
e5d518abee Avoid PHP notices if 'plugin' is not set for tab=plugin-information.
props avryl.
fixes #29936.
Built from https://develop.svn.wordpress.org/trunk@29882


git-svn-id: http://core.svn.wordpress.org/trunk@29638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 13:06:19 +00:00
Jeremy Felt
3a8676278d 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

Built from https://develop.svn.wordpress.org/trunk@29880


git-svn-id: http://core.svn.wordpress.org/trunk@29637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 01:11:18 +00:00
Andrew Ozz
0fbefeaaf9 Fix support for the hide option in wpColorPicker, props tollmanz, fixes #29632
Built from https://develop.svn.wordpress.org/trunk@29879


git-svn-id: http://core.svn.wordpress.org/trunk@29636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 00:51:18 +00:00
Andrew Ozz
f6d0b7ff33 Quicktags: remove accesskey attributes the buttons and don't add empty title attributes, fixes #29358
Built from https://develop.svn.wordpress.org/trunk@29878


git-svn-id: http://core.svn.wordpress.org/trunk@29635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 00:47:19 +00:00
Jeremy Felt
1ffba4abc4 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

Built from https://develop.svn.wordpress.org/trunk@29877


git-svn-id: http://core.svn.wordpress.org/trunk@29634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 00:22:18 +00:00
Andrew Ozz
7f2f3dcb5d Media modal: fix reordering of the thumbnails while creating or editing a gallery, props avryl, fixes #29606 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29876


git-svn-id: http://core.svn.wordpress.org/trunk@29633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 23:24:23 +00:00
Sergey Biryukov
20cfcbf86d Fix whitespace issues in [29781]. Remove a redundant comment.
props miqrogroove.
see #29557.
Built from https://develop.svn.wordpress.org/trunk@29873


git-svn-id: http://core.svn.wordpress.org/trunk@29632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:33:18 +00:00
Sergey Biryukov
471dc2022f Add missing label to comment type filter dropdown.
props afercia.
fixes #29922.
Built from https://develop.svn.wordpress.org/trunk@29872


git-svn-id: http://core.svn.wordpress.org/trunk@29631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:26:18 +00:00
Sergey Biryukov
f013b7e64b Remove "View" prefix from category filter dropdowns, for consistency with [27626].
props afercia.
see #29921.
Built from https://develop.svn.wordpress.org/trunk@29871


git-svn-id: http://core.svn.wordpress.org/trunk@29630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:23:18 +00:00
Sergey Biryukov
2c0947eeee Add missing labels to category filter dropdowns.
props afercia.
fixes #29921.
Built from https://develop.svn.wordpress.org/trunk@29870


git-svn-id: http://core.svn.wordpress.org/trunk@29629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:21:19 +00:00
Drew Jaynes
cdf9456b79 Clarify inline documentation for the _is_valid_nav_menu_item() and wp_get_nav_menu_items() in wp-includes/nav-menu.php.
Props morganestes for the initial patch.
Fixes #29914.

Built from https://develop.svn.wordpress.org/trunk@29868


git-svn-id: http://core.svn.wordpress.org/trunk@29628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-10 17:14:19 +00:00
Boone Gorges
d088de7195 Return an error when adding a term to a non-existent parent.
Parallels the logic of wp_insert_term(), introduced in [29196].

Props jesin.
Fixes #29614.
Built from https://develop.svn.wordpress.org/trunk@29867


git-svn-id: http://core.svn.wordpress.org/trunk@29627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 18:12:20 +00:00
Drew Jaynes
a724b435d8 Add more complete inline documentation for get_term_link().
Adds more complete parameter descriptions for the `$term` and `$taxonomy` parameters. 

Props amruta123.b for the initial patch.
Fixes #29901.

Built from https://develop.svn.wordpress.org/trunk@29866


git-svn-id: http://core.svn.wordpress.org/trunk@29626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 15:41:18 +00:00
Boone Gorges
587599c54f Don't bail out of term_exists() when term sanitizes to an empty string.
This change brings return values for failures of this sort in line with other
failed lookups in term_exists(): a null value is now returned in all cases
where the queried term is not found.

Adds unit test for the sanitization issue. Modifies existing unit test to
reflect the change in return value for empty term strings.

Props boonebgorges, georgestephanis.
Fixes #29589.
Built from https://develop.svn.wordpress.org/trunk@29865


git-svn-id: http://core.svn.wordpress.org/trunk@29625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 03:16:18 +00:00
Dion Hulse
659a6b3838 Add some unit tests for WP_HTTP::parse_url() to cover the <PHP 5.4.7 compatibility alterations.
These unit tests cover the expected vehaviour of certain combinations of URL's, but makes no attempt to test invalid URL structures, as PHP's behavious for invalid URL's is undefined (Some will be treated as paths, others fail, and it varies between PHP 5.4.7+ and <5.4.7).
This change also makes WP_HTTP::parse_url() protected in order to allow unit testing.
See #28001, #29886

Built from https://develop.svn.wordpress.org/trunk@29864


git-svn-id: http://core.svn.wordpress.org/trunk@29624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 03:01:18 +00:00
Boone Gorges
61317341eb Fix term_exists() for parent = 0.
Passing a 0 (or '0') as the 'parent' param of term_exists() should limit
results to terms with no parent.

Adds unit test.

Fixes #29851.
Built from https://develop.svn.wordpress.org/trunk@29863


git-svn-id: http://core.svn.wordpress.org/trunk@29623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 02:49:18 +00:00
Boone Gorges
3ceee6cd24 Improve 'alias_of' handling in wp_insert_term() and wp_update_term().
Using get_term_by() rather than direct SQL queries to fetch the alias term
fixes a number of issues:

* Object cache for aliased term is properly cleared after update.
* If the aliased term is in the object cache, it's served from there, saving a database query.
* Duplicate 'edit_terms' and 'edited_terms' hooks can be removed.
* Fix a PHP notice when the 'alias_of' term is not found.
* Prevent the incorrect creation of a new term group for the primary term when the 'alias_of' term is not found.

Adds unit tests for 'alias_of' functionality in both functions.

Fixes #29848.
Built from https://develop.svn.wordpress.org/trunk@29862


git-svn-id: http://core.svn.wordpress.org/trunk@29622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 02:32:19 +00:00
Dion Hulse
dbb6750bb2 Handle deficiencies in PHP's parse_url in older versions of PHP (<5.4.7) in WP_HTTP::make_absolute_url().
In older versions of PHP:
- parse_url() will fail to parse a url where the scheme break (://) is present in a relative URL's path
- parse_url() will include the hostname of a schemeless URL in the path component

This handles those two types of URL's by correcting the response from parse_url().

Fixes #28001, #29886

Built from https://develop.svn.wordpress.org/trunk@29861


git-svn-id: http://core.svn.wordpress.org/trunk@29621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 01:11:18 +00:00
Boone Gorges
17631e3b8e Explicitly declare hierarchical=false for post_tag in create_initial_taxonomies().
In certain edge cases, such as during the automated test suite,
create_initial_taxonomies() can be called in a situation where a non-default
permastruct setting has been saved outside of wp-admin. This causes the
'hierarchical' setting for the post_tag taxonomy to remain unset, leading to
PHP notices in get_term_link().

See #29827.
Built from https://develop.svn.wordpress.org/trunk@29859


git-svn-id: http://core.svn.wordpress.org/trunk@29620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-09 00:58:20 +00:00
Dominik Schilling
57c41263d7 Language packs: Remove translations when deleting a theme or a plugin.
This is for translation files in WP_LANG_DIR which are installed through a language pack.
Change `wp_get_installed_translations()` to only return a translation if the .mo file also exists.

fixes #29860.
Built from https://develop.svn.wordpress.org/trunk@29856


git-svn-id: http://core.svn.wordpress.org/trunk@29619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 19:05:20 +00:00
Konstantin Kovshenin
5f17e0952d Use the primary meta_query clause when parsing orderby in WP_Query.
When using legacy `meta_key`, `meta_value`, etc. arguments in `WP_Query`,
they're converted into the first clause of a `meta_query`. By using that
clause instead of the original arguments, we make sure that behavior is
consistent between the two available formats.

props boonebgorges.
fixes #16814.

Built from https://develop.svn.wordpress.org/trunk@29855


git-svn-id: http://core.svn.wordpress.org/trunk@29618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 15:12:20 +00:00
Konstantin Kovshenin
2b88252b38 New remove() method and some unit tests for the WP_Error class.
props stephenharris.
fixes #28092.

Built from https://develop.svn.wordpress.org/trunk@29854


git-svn-id: http://core.svn.wordpress.org/trunk@29617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 07:12:18 +00:00
Dion Hulse
98ff88518a Avoid a PHP Notice when requesting a url without a path component (http://example.com) in the Streams HTTP component.
Props barrykooij for inital patch; Fixes #27668

Built from https://develop.svn.wordpress.org/trunk@29853


git-svn-id: http://core.svn.wordpress.org/trunk@29616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 06:44:19 +00:00
Dion Hulse
f09c515ad9 When making a HTTP request to a non-standard port, include the port in the Host header for the Streams HTTP transport. This bring parity to the cURL transport and respects the HTTP RFC.
Props kamelkev for the initial patch; Fixes #28982

Built from https://develop.svn.wordpress.org/trunk@29852


git-svn-id: http://core.svn.wordpress.org/trunk@29615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 06:15:18 +00:00
Dion Hulse
78f4cd2c58 Correctly support Schemeless URLs in WP_HTTP::make_absolute_url() by respecting the 'host' field if present in the relative url.
Fixes #29886

Built from https://develop.svn.wordpress.org/trunk@29851


git-svn-id: http://core.svn.wordpress.org/trunk@29614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 05:58:19 +00:00
Dion Hulse
9962cefbec Correctly handle url's containing url's in WP_HTTP::make_absolute_url().
A valid relative URL could be mistaken for an absolute url if it contained a :// in any position of the url.
Fixes #28001

Built from https://develop.svn.wordpress.org/trunk@29850


git-svn-id: http://core.svn.wordpress.org/trunk@29613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 05:38:18 +00:00