Commit Graph

14688 Commits

Author SHA1 Message Date
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
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
Dion Hulse
88b635245a 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

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


git-svn-id: http://core.svn.wordpress.org/trunk@29612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 05:21:19 +00:00
Dion Hulse
88ceaba2d2 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

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


git-svn-id: http://core.svn.wordpress.org/trunk@29611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-08 05:19:20 +00:00
Dominik Schilling
04edb0a1d6 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.
Built from https://develop.svn.wordpress.org/trunk@29847


git-svn-id: http://core.svn.wordpress.org/trunk@29610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-07 15:28:24 +00:00
Sergey Biryukov
965b6d54b6 Add aria-describedby attributes to comment_form().
props joedolson, bramd.
fixes #24148.
Built from https://develop.svn.wordpress.org/trunk@29846


git-svn-id: http://core.svn.wordpress.org/trunk@29609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-06 22:11:15 +00:00
Boone Gorges
0c64fe335a 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.
Built from https://develop.svn.wordpress.org/trunk@29845


git-svn-id: http://core.svn.wordpress.org/trunk@29608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-06 22:05:18 +00:00
Drew Jaynes
8ec2d2a151 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-06 15:36:17 +00:00
Andrew Ozz
a57e99eca8 Add default z-index to the admin menu, see #29806
Built from https://develop.svn.wordpress.org/trunk@29841


git-svn-id: http://core.svn.wordpress.org/trunk@29605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-06 02:00:16 +00:00
Sergey Biryukov
bf856e3a62 Translate some previously untranslated _doing_it_wrong() messages.
props georgestephanis.
fixes #25614.
Built from https://develop.svn.wordpress.org/trunk@29840


git-svn-id: http://core.svn.wordpress.org/trunk@29604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 21:06:15 +00:00
Sergey Biryukov
b269a9c5d9 Fix misleading documentation in customize-loader.js.
props ericlewis.
fixes #29866.
Built from https://develop.svn.wordpress.org/trunk@29838


git-svn-id: http://core.svn.wordpress.org/trunk@29602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 18:40:15 +00:00
Sergey Biryukov
45062d7f5c Update @param docs for wp_get_attachment_image().
see #29869.
Built from https://develop.svn.wordpress.org/trunk@29837


git-svn-id: http://core.svn.wordpress.org/trunk@29601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 17:52:15 +00:00
Sergey Biryukov
d769e29279 Pass the requested size to 'wp_get_attachment_image_attributes' filter.
props mattheu.
fixes #29869.
Built from https://develop.svn.wordpress.org/trunk@29836


git-svn-id: http://core.svn.wordpress.org/trunk@29600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 17:50:16 +00:00
Andrew Ozz
f98106769d Pin the admin menu on scrolling similarly to how the side metaboxes are pinned on the Edit Post screen, first run. See #29806.
Built from https://develop.svn.wordpress.org/trunk@29835


git-svn-id: http://core.svn.wordpress.org/trunk@29599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-05 03:09:20 +00:00
Sergey Biryukov
221db8fd8d Fix setting default quality in WP_Image_Editor.
props markoheijnen.
fixes #29856 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29834


git-svn-id: http://core.svn.wordpress.org/trunk@29598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-04 13:12:15 +00:00
Scott Taylor
b98f03669c Allow PSDs (Photoshop documents) to be uploaded.
Props michalzuber, ccprice.
Fixes #28805.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-03 19:52:17 +00:00
Scott Taylor
821f9f40ec For attachment-compat fields, show a spinner while wp.media.model.Attachment.saveCompat() is firing.
Fixes #27028.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-03 18:43:20 +00:00
Sergey Biryukov
7dde12f0ba Avoid a PHP notice in list_plugin_updates() if plugins_api() returned a WP_Error object.
fixes #29583.
Built from https://develop.svn.wordpress.org/trunk@29825


git-svn-id: http://core.svn.wordpress.org/trunk@29590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-03 00:02:14 +00:00
Sergey Biryukov
6d0f2dcf11 Make link construction in get_comment_reply_link() and get_post_reply_link() more readable.
see #16433.
Built from https://develop.svn.wordpress.org/trunk@29823


git-svn-id: http://core.svn.wordpress.org/trunk@29589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 20:45:16 +00:00
Sergey Biryukov
70c88e59b1 Add an aria-label attribute with commenter's name to get_comment_reply_link().
props joedolson, merty, andrewryno.
fixes #16433.
Built from https://develop.svn.wordpress.org/trunk@29822


git-svn-id: http://core.svn.wordpress.org/trunk@29588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 20:41:16 +00:00
Boone Gorges
2dad79f6c5 Always sanitize user_nicename in wp_insert_user().
Previously, a 'user_nicename' parameter passed into the function was
unsanitized. This could result in a mismatch between the sanitized nicename
generated automatically at user creation, resulting in broken author archive
permalinks.

Props joemcgill.

Fixes #29696.
Built from https://develop.svn.wordpress.org/trunk@29819


git-svn-id: http://core.svn.wordpress.org/trunk@29585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 18:54:17 +00:00
Scott Taylor
fd4e3023d6 In wp_delete_attachment(): account for orphan sizes by looping over the sizes stored in metadata, instead of relying on the current sizes stored in $_wp_additional_image_sizes.
Props JoshuaAbenazer, desrosj, markoheijnen.
Fixes #24518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 15:32:16 +00:00
Scott Taylor
067feb9691 Remember when we added the style attribute to playlists? Fix dark.
Props karpstrucking.
Fixes #29530.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 05:28:16 +00:00
Scott Taylor
d8c913b3f9 Add the date filter from media grid to the media modal.
Props janhenckens, wonderboymusic.
Fixes #28990.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 04:32:16 +00:00
Scott Taylor
202ede7696 After [29811], combine 2 if statements.
Built from https://develop.svn.wordpress.org/trunk@29812


git-svn-id: http://core.svn.wordpress.org/trunk@29578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 04:16:17 +00:00
Scott Taylor
b885885b67 Media Grid/List Table parity: when MEDIA_TRASH is true and trash is the current filter for the grid, add a second bulk action button: "Delete Selected"
Fixes #29742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 04:13:16 +00:00
Sergey Biryukov
0797823c55 Add a class attribute for submit button in comment form.
props bainternet.
fixes #20446.
Built from https://develop.svn.wordpress.org/trunk@29809


git-svn-id: http://core.svn.wordpress.org/trunk@29575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 01:44:15 +00:00
Boone Gorges
7d8322aa65 WP_Comment_Query: comment__in, comment__not_in, post__in, post__not_in.
Props nofearinc, mordauk, boonebgorges

Fixes #25386
Built from https://develop.svn.wordpress.org/trunk@29808


git-svn-id: http://core.svn.wordpress.org/trunk@29574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 01:41:16 +00:00
Scott Taylor
258496edb6 In the wp_new_blog_notification() email template, include the login url.
Props obenland, georgestephanis.
Fixes #21089.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 01:28:16 +00:00
Sergey Biryukov
6ee7e6061a Add classes to form containers on taxonomy screens.
props jarednova.
fixes #28196.
Built from https://develop.svn.wordpress.org/trunk@29803


git-svn-id: http://core.svn.wordpress.org/trunk@29570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 00:29:16 +00:00
Scott Taylor
ebe813ca54 Add a namespace to the click handler registration for .insert-media in media-editor.js: click.add-media-button.
This is a stopgap to allow devs to override the default behavior.

Fixes #23096.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-01 19:08:16 +00:00
Scott Taylor
d2c99a5646 Add a default filter to title_save_pre: trim, because extra whitespace.
Props nikolov.tmw, avryl.
Fixes #19904.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-01 18:58:16 +00:00
Sergey Biryukov
3f1fcc7d71 Version bump.
Built from https://develop.svn.wordpress.org/trunk@29800


git-svn-id: http://core.svn.wordpress.org/trunk@29567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-01 14:59:19 +00:00