Commit Graph

27691 Commits

Author SHA1 Message Date
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
Drew Jaynes (DrewAPicture) e94fef0168 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@29868 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-10 17:13:52 +00:00
Boone Gorges bce6d64d59 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29867 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 18:11:17 +00:00
Drew Jaynes (DrewAPicture) cfac76a2cc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@29866 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 15:40:53 +00:00
Boone Gorges adbed947d8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29865 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 03:15:50 +00:00
Dion Hulse 8ff133f232 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


git-svn-id: https://develop.svn.wordpress.org/trunk@29864 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 03:00:16 +00:00
Boone Gorges 568b43f242 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29863 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 02:48:47 +00:00
Boone Gorges 01c529e062 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29862 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 02:31:35 +00:00
Dion Hulse c8b53c2d1a 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


git-svn-id: https://develop.svn.wordpress.org/trunk@29861 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 01:10:25 +00:00
Boone Gorges 5e7be10860 Reset post types and taxonomies before each unit test.
Registering a post type or taxonomy during a unit test causes modifications to
global variables. If the test fails to clean up these globals - either by
neglecting to call _unregister_post_type()/_unregister_taxonomy() at all or by
failing before getting a chance to do so - tests that run later in the suite
can fail, leading to much gnashing of teeth. Wiping all taxonomies and
restoring to the defaults before each test ensures that we always start with a
clean slate.

Fixes #29827.

git-svn-id: https://develop.svn.wordpress.org/trunk@29860 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 00:57:26 +00:00
Boone Gorges 91a3b376de 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29859 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-09 00:57:16 +00:00
Aaron Jorbin 636e35877e .jshintrc is a json file and .editorconfig should treat it like a json file
props netweb
fixes #29884


git-svn-id: https://develop.svn.wordpress.org/trunk@29858 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 19:26:50 +00:00
Aaron Jorbin 3bfa930580 Change assertEqual to assertEqualSets since the order that travis-ci creates posts isn't consistent
see #29718



git-svn-id: https://develop.svn.wordpress.org/trunk@29857 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 19:21:30 +00:00
Dominik Schilling (ocean90) e9be4237ba 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@29856 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 19:04:05 +00:00
Konstantin Kovshenin 061fe13c9f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@29855 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 15:11:14 +00:00
Konstantin Kovshenin 6eea081457 New `remove()` method and some unit tests for the `WP_Error` class.
props stephenharris.
fixes #28092.


git-svn-id: https://develop.svn.wordpress.org/trunk@29854 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 07:11:09 +00:00
Dion Hulse eb39c8f75d 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


git-svn-id: https://develop.svn.wordpress.org/trunk@29853 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 06:43:14 +00:00
Dion Hulse 45cd55bfc4 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


git-svn-id: https://develop.svn.wordpress.org/trunk@29852 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 06:14:58 +00:00
Dion Hulse 4ae1397f96 Correctly support Schemeless URLs in WP_HTTP::make_absolute_url() by respecting the 'host' field if present in the relative url.
Fixes #29886


git-svn-id: https://develop.svn.wordpress.org/trunk@29851 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 05:57:15 +00:00
Dion Hulse e4268adfde 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


git-svn-id: https://develop.svn.wordpress.org/trunk@29850 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 05:37:56 +00:00
Dion Hulse 60b8ed120a Always cast the 'code' server response to an int, this provides consistency between both of the HTTP transports.
Previously cURL would return an int and Streams a numeric string.
Fixes #28887


git-svn-id: https://develop.svn.wordpress.org/trunk@29849 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 05:20:01 +00:00
Dion Hulse 2ed0d6cae0 Return the correct server response for the 'message' response field from the server.
Previously this would use the generic message corresponding to the response code, which isn't always accurate. Since we're already parsing the headers, we can simply return that directly (This also has the benefit that it's the same code for both Streams and Curl header handling).
Fixes #28919


git-svn-id: https://develop.svn.wordpress.org/trunk@29848 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-08 05:18:22 +00:00
Dominik Schilling (ocean90) 539d55e068 Update jQuery UI to 1.11.1.
Because jQUI's build process no longer provides individual minified files we need some additional changes:
* Rename all files, remove the "jquery.ui." prefix. Add old files to `$_old_files`.
* Add and use non-minified files in /src.
* Add grunt task to minify jQuery UI files.
* (Non-minified files will not be shipped.)

Changelogs:
* http://jqueryui.com/changelog/1.11.0/
* http://jqueryui.com/changelog/1.11.1/

props Fab1en, ocean90.
fixes #29833.

git-svn-id: https://develop.svn.wordpress.org/trunk@29847 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-07 15:27:56 +00:00
Sergey Biryukov 564598f068 Add aria-describedby attributes to comment_form().
props joedolson, bramd.
fixes #24148.

git-svn-id: https://develop.svn.wordpress.org/trunk@29846 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 22:10:08 +00:00
Boone Gorges e79c2e0c9e In get_terms(), select term taxonomy count for all values of 'fields'.
Not having the count caused queries with 'fields' values of 'id=>name' and
'id=>slug' to return incorrect results when querying a hierarchical taxonomy
with 'hide_empty=true'.

Includes unit tests for get_terms() when using various combinations of 'fields',
'hide_empty', and 'hierarchical' arguments.

Props technical_mastermind.
Fixes #29859.

git-svn-id: https://develop.svn.wordpress.org/trunk@29845 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 22:04:11 +00:00
Aaron Jorbin 3fa30bdd37 PHP 5.6 test failures shouldn't be allowed.
PHP 5.6 was released on 28 August 2014 and thus tests on it should be on the same level as all of our other PHP tests pass.

Fixes #29682
Props netweb



git-svn-id: https://develop.svn.wordpress.org/trunk@29844 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 20:00:54 +00:00
Drew Jaynes (DrewAPicture) d8ba2cf553 Add inline documentation for `WP_User_Query` default arguments in the form of a hash notation.
Adds documentation pointers from the class-level doc for `WP_User_Query`, as well as the `get_users()` doc.

Props tschutter.
Fixes #29846.


git-svn-id: https://develop.svn.wordpress.org/trunk@29843 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 15:35:49 +00:00
Sergey Biryukov 63760f6a3f Bundled themes: Add an alt attribute with the site title for header images linked to the home page.
props rianrietveld.
fixes #15926.

git-svn-id: https://develop.svn.wordpress.org/trunk@29842 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 12:43:55 +00:00
Andrew Ozz 107d754683 Add default z-index to the admin menu, see #29806
git-svn-id: https://develop.svn.wordpress.org/trunk@29841 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-06 01:59:46 +00:00
Sergey Biryukov 937d5cdd11 Translate some previously untranslated _doing_it_wrong() messages.
props georgestephanis.
fixes #25614.

git-svn-id: https://develop.svn.wordpress.org/trunk@29840 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-05 21:05:54 +00:00
Sergey Biryukov 65a0f4933a Network Admin: Properly check if the theme is active on the main site to avoid deleting it via bulk actions.
props ocean90.
fixes #29861.

git-svn-id: https://develop.svn.wordpress.org/trunk@29839 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-05 20:36:11 +00:00
Sergey Biryukov 37f96ce3e6 Fix misleading documentation in customize-loader.js.
props ericlewis.
fixes #29866.

git-svn-id: https://develop.svn.wordpress.org/trunk@29838 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-05 18:39:12 +00:00
Sergey Biryukov 4ba75673d8 Update @param docs for wp_get_attachment_image().
see #29869.

git-svn-id: https://develop.svn.wordpress.org/trunk@29837 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-05 17:51:42 +00:00