Commit Graph

29320 Commits

Author SHA1 Message Date
John Blackbourn
22fc19e06d Return a WP_Error if an empty name is provided when registering a taxonomy.
Fixes #31135
Props tyxla, MikeHansenMe


git-svn-id: https://develop.svn.wordpress.org/trunk@31449 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 16:26:37 +00:00
Sergey Biryukov
83d5751a33 Use get_admin_url() to get the correct My Sites URL without calling switch_to_blog() directly.
props ocean90.
see #31314.

git-svn-id: https://develop.svn.wordpress.org/trunk@31448 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 12:52:10 +00:00
Sergey Biryukov
bde2a220d9 Avoid a PHP notice in wp_install_language_form() and wp_dropdown_languages() if the language doesn't have a ISO 639-1 code.
props barrykooij.
fixes #31319.

git-svn-id: https://develop.svn.wordpress.org/trunk@31447 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 11:22:38 +00:00
Sergey Biryukov
997b9733c9 Use correct default values for some admin template functions.
props ipm-frommen.
fixes #31308.

git-svn-id: https://develop.svn.wordpress.org/trunk@31446 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 06:50:49 +00:00
Jeremy Felt
2002097f6f Create the My Sites URL in the context of a user's primary site.
Switch to the user's primary (or active) site before creating the My Sites URL. This previously linked to the current site's dashboard, even if a user was not a member of that site.

Props simonwheatley for the initial patch.

Fixes #31314.


git-svn-id: https://develop.svn.wordpress.org/trunk@31445 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 06:29:57 +00:00
Sergey Biryukov
5ec46121cd Rename unused argument and remove obsolete global in iframe_header().
props ipm-frommen.
fixes #31309.

git-svn-id: https://develop.svn.wordpress.org/trunk@31443 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 05:30:53 +00:00
Sergey Biryukov
5f360a12a7 _list_meta_row() should always return a string.
props ipm-frommen.
fixes #31310.

git-svn-id: https://develop.svn.wordpress.org/trunk@31442 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:21:47 +00:00
Sergey Biryukov
e3728870fb Correct parameter types for Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade().
props ipm-frommen.
fixes #31312.

git-svn-id: https://develop.svn.wordpress.org/trunk@31441 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:18:45 +00:00
Sergey Biryukov
100e1e4b20 Terminate JS statements in two admin files.
props ipm-frommen.
fixes #31311.

git-svn-id: https://develop.svn.wordpress.org/trunk@31440 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:08:33 +00:00
Boone Gorges
ab10e5fe71 Add tests for some of WP_Query's sticky post logic.
See #27282.

git-svn-id: https://develop.svn.wordpress.org/trunk@31439 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 02:24:57 +00:00
Helen Hou-Sandi
8e1df9dab2 Posts list table: Add a filter to disable the months dropdown.
It was previously possible to prevent it from displaying by filtering everything out from the results, but if one really doesn't want it, they should be able to short-circuit before the query even runs.

props norcross, SergeyBiryukov.
fixes #30254.


git-svn-id: https://develop.svn.wordpress.org/trunk@31438 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-12 18:37:06 +00:00
Dion Hulse
afef491a75 Avoid a PHP Warning when add_args is passed as false to paginate_links().
Props boonebgorges for the unit test.
See #30831 [31203].


git-svn-id: https://develop.svn.wordpress.org/trunk@31432 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-12 01:38:26 +00:00
Dion Hulse
d17168583d Prevent IE9 and lower displaying the download file dialogue when attempting to upload using the html4 Plupload handler.
The HTML4 Plupload handler uses a hidden iframe to POST the upload form,
Unfortunately Internet Explorer 9 doesn't support the `application/json` 
content-type which `wp_send_json_success()` and requires `text/html` instead.

This partially reverts [30354], keeping the better error messages.

Fixes #31037 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31429 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-12 01:14:47 +00:00
Dominik Schilling (ocean90)
ea44136764 Customizer: Don't focus new widgets if they are added programmatically.
props westonruter.
fixes #31295.

git-svn-id: https://develop.svn.wordpress.org/trunk@31428 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 23:31:20 +00:00
Dominik Schilling (ocean90)
a4eb4880b4 Escape Customizer links in the admin menu. Fix usage of add_query_arg().
props iseulde.
fixes #30952.

git-svn-id: https://develop.svn.wordpress.org/trunk@31427 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:47:44 +00:00
Dominik Schilling (ocean90)
d4c47d6364 Fix failing Tests_Dependencies_jQuery::test_wp_script_is_dep_enqueued test.
[31370] has broken the test because the Customizer test enqueues some scripts. Unset `$GLOBALS['wp_scripts']` on tearDown() so other tests will start with zero enqueued scripts.

see #30936.
fixes #31302.

git-svn-id: https://develop.svn.wordpress.org/trunk@31426 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:44:20 +00:00
Dominik Schilling (ocean90)
0b1463c6f4 Update grunt-cssjanus to 0.2.4, we no longer need the fork.
Upstream changes:
* https://github.com/cssjanus/cssjanus/compare/v1.0.2...v1.1.2
* https://github.com/cssjanus/grunt-cssjanus/compare/v0.2.2...v0.2.4

fixes #30997.

git-svn-id: https://develop.svn.wordpress.org/trunk@31425 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:27:53 +00:00
Helen Hou-Sandi
fbdb7685fa Admin menu: Ensure top level menu item keeps hover color when hovering over or focusing on the submenu.
props stevehickeydesign, melchoyce.
fixes #31275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31424 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:24:49 +00:00
Scott Taylor
a93805f6bb Use RegEx instead of DOMDocument when protecting <pre> tags in WP_oEmbed::_strip_newlines(). It is incredibly difficult to maintain character encoding and whitespace when parsing via DOMDocument.
See #31214.


git-svn-id: https://develop.svn.wordpress.org/trunk@31423 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:17:27 +00:00
Helen Hou-Sandi
d00ef0f076 Update the default admin color scheme for more unity and refinement.
This removes the red channel from blues and cools the grays a bit for a more cohesive and purposeful color scheme.

props hugobaeta.
fixes #31234.


git-svn-id: https://develop.svn.wordpress.org/trunk@31422 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:17:02 +00:00
Dominik Schilling (ocean90)
4463917f68 Customizer: Restore showing a login form inside the previewer if an user is logged out.
Broken since [31370].

props westonruter.
see #31294.

git-svn-id: https://develop.svn.wordpress.org/trunk@31421 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 22:12:47 +00:00
Dominik Schilling (ocean90)
1ddd9cad9b Widgets: Add return param for widgets admin page to the "Manage in Customizer" link.
props tywayne.
fixes #30888.

git-svn-id: https://develop.svn.wordpress.org/trunk@31420 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 20:56:21 +00:00
Dominik Schilling (ocean90)
0f5458ec6d Customizer: Improve [31252] to show the move-widget buttons only if there is more than one *rendered* sidebar.
fixes #30690.

git-svn-id: https://develop.svn.wordpress.org/trunk@31419 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 20:44:19 +00:00
Boone Gorges
ed639b408a Split shared taxonomy terms on term update.
When updating an existing taxonomy term that shares its `term_id` with
another term, we generate a new row in `wp_terms` and associate the updated
term_taxonomy_id with the new term. This separates the terms, such that
updating the name of one term does not change the name of any others.

In cases where a plugin or theme stores term IDs in the database, term splitting
can cause backward compatibility issues. The current changeset introduces
two utilities to aid developers with the transition. The `'split_shared_term'`
action fires when the split takes place, and should be used to catch changes in
term_id. In cases where `'split_shared_term'` cannot be used, the
`wp_get_split_term()` function gives developers access to data about terms
that have previously been split. Documentation for these functions, with
examples, can be found in the Plugin Developer Handbook. WordPress itself
stores term IDs in this way in two places; `_wp_check_split_default_terms()`
and `_wp_check_split_terms_in_menus()` are hooked to `'split_shared_term'` to
perform the necessary cleanup.

See [30241] for a previous attempt at the split. It was reverted in [30585]
for 4.1.0.

Props boonebgorges, mboynes.
See #5809.

git-svn-id: https://develop.svn.wordpress.org/trunk@31418 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 19:41:54 +00:00
John Blackbourn
66548dcb82 Introduce a logout_redirect filter so the redirect destination can be changed when a user logs out. Parameters:
* string  $redirect_to           The redirect destination URL.
 * string  $requested_redirect_to The requested redirect destination URL passed as a parameter.
 * WP_User $user                  The WP_User object for the user that's logging out. 

Fixes #27617
Props SergeyBiryukov, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@31417 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 19:18:19 +00:00
Scott Taylor
4fb31473e8 After [31415], make sure str_replace() only occurs once for each matched tag to avoid overwriting until <pre>s.
See #31214.


git-svn-id: https://develop.svn.wordpress.org/trunk@31416 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 19:14:09 +00:00
Scott Taylor
18610ef0ad Protect <pre> tags when parsing oEmbed responses in WP_oEmbed::_strip_newlines() in DOMDocument is available.
Fixes #31214.


git-svn-id: https://develop.svn.wordpress.org/trunk@31415 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 19:10:46 +00:00
John Blackbourn
b384c8cf25 Add $expiration as a parameter to the pre_set_transient_{$transient} filter.
Props mgibbs189
Fixes #30576


git-svn-id: https://develop.svn.wordpress.org/trunk@31414 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 17:11:18 +00:00
Scott Taylor
4f8c251c45 oEmbed discovery fails on encoded link URLs: decode HTML chars in the HTML-encoded URLs that are returned.
Props cweiske.
Fixes #31213.


git-svn-id: https://develop.svn.wordpress.org/trunk@31413 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 16:12:48 +00:00
Sergey Biryukov
5d35c181dc Add .comment-reply-login class to get_post_reply_link(), for consistency with get_comment_reply_link().
props johnjamesjacoby.
fixes #31298.

git-svn-id: https://develop.svn.wordpress.org/trunk@31412 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 16:10:54 +00:00
Sergey Biryukov
0fdfb101db Use require_once() to prevent a fatal error if _wp_admin_bar_init() is called twice.
props danielbachhuber.
fixes #31287.

git-svn-id: https://develop.svn.wordpress.org/trunk@31411 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 15:58:22 +00:00
Gary Pendergast
e2c7cd4677 Shiny Updates: Replace $.post() calls with wp.ajax.post(), and clean up a bunch of the now unnecessary code.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31409 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 05:05:13 +00:00
Sergey Biryukov
757fd2c1e4 Always pass back the custom classes get_post_class() was called with, even if the post was not found.
props F J Kaiser, Bueltge.
fixes #22271.

git-svn-id: https://develop.svn.wordpress.org/trunk@31408 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 03:59:06 +00:00
Scott Taylor
2c12dc0ce3 oEmbed discovery fails on XHTML head links, adjust the regex to not match /.
Props cweiske.
Fixes #31212.


git-svn-id: https://develop.svn.wordpress.org/trunk@31407 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 23:36:51 +00:00
Scott Taylor
296078b422 Use Math.round() instead of Math.floor() when determining page of attachments to query in wp.media.model.Query.sync.
This was causing an infinite loop of AJAX requests - so.... good catch!

Props Veritaserum.
Fixes #31116.


git-svn-id: https://develop.svn.wordpress.org/trunk@31406 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 22:53:34 +00:00
Scott Taylor
267f68c0d6 Remove unused media JS files.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31405 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 22:44:09 +00:00
Sergey Biryukov
d0c0ba43eb Remove redundant string with a typo introduced in [25481].
see #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31404 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:52:38 +00:00
Sergey Biryukov
edeb3f3ae3 Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu.
fixes #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31403 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:46:50 +00:00
Sergey Biryukov
c8a361712b Switch to a string placeholder, as number_format_i18n() returns a string.
see #26553.

git-svn-id: https://develop.svn.wordpress.org/trunk@31402 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 05:44:21 +00:00
Sergey Biryukov
74ad70419e Use _n() in comments_popup_link() when setting the default string to display if there are more than one comment.
see #26553.

git-svn-id: https://develop.svn.wordpress.org/trunk@31401 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 02:50:58 +00:00
Sergey Biryukov
b931f924a7 Update body class when switching between admin color schemes.
props valendesigns.
fixes #30488.

git-svn-id: https://develop.svn.wordpress.org/trunk@31400 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 02:22:49 +00:00
Sergey Biryukov
3baf443ae5 Set svn:eol-style for [31373].
see #28510.

git-svn-id: https://develop.svn.wordpress.org/trunk@31399 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 02:12:59 +00:00
Scott Taylor
ce08972f6b Export the proper class in media/views/image-details.js
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31393 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 23:46:00 +00:00
Boone Gorges
d4fbf04671 Don't parse empty 'tax_input' keys in edit_post().
This fixes a bug introduced in [31359] where saving a tax_input that contained
only whitespace would result in a random tag being erroneously added to the
post.

See #30615.

git-svn-id: https://develop.svn.wordpress.org/trunk@31392 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:53:40 +00:00
Gary Pendergast
350cfba6c8 WPDB: When checking to see if we can use utf8mb4, we also need to make sure PHP's MySQL client library is capable of using utf8mb4.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31391 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:27:43 +00:00
John Blackbourn
fa36ce3810 Revert [30696] pending further investigation.
See #31011, #13071


git-svn-id: https://develop.svn.wordpress.org/trunk@31390 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 21:49:18 +00:00
Aaron Jorbin
5abd98618d Add translator comments for new strings.
These strings were added in [31388].

Props ocean90.
Fixes 26553.



git-svn-id: https://develop.svn.wordpress.org/trunk@31389 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 20:14:19 +00:00
Aaron Jorbin
cf09359d34 Use screen reader text instead of a title attribute in comments_popup_link
To better understand screen reader text, check out https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/

Screen Reader text improves the user experience for screen reader users. It provides additional context for links, document forms and other pieces of a page that may exist visually, but are lost when looking only at the html of a site.  This does change the output of comments_popup_link if you don't pass in values for $zero, $one, $more or $none. Theme authors can and should style <code>.screen-reader-text</code> in ways that are recommended in the above article to hide it visually.

Props joedolson
Fixes #26553





git-svn-id: https://develop.svn.wordpress.org/trunk@31388 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 19:26:56 +00:00
Scott Taylor
d5888fbc13 After [31386], this needs to happen in audio-video.manifest.js.
See #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31387 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:44:32 +00:00
Scott Taylor
7ea1eb7e94 Avoid an IE8 JS error when removing a MediaElement player.
Props afercia.
Fixes #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31386 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:42:33 +00:00