Sergey Biryukov
78b02ec722
Use more descriptive names for register_post_type()
and register_taxonomy()
tests with too long and too short names.
...
see #31134 , #31135 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31457 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 23:33:56 +00:00
Sergey Biryukov
b52cb0346e
Toolbar: Remove title attributes from 'About WordPress', 'Add New', and 'My Account' items.
...
props afercia.
fixes #31324 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31456 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 20:19:09 +00:00
Sergey Biryukov
35ae49f843
Toolbar: Add a label for search field on front-end.
...
props afercia.
fixes #31323 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31455 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 19:20:53 +00:00
Lance Willett
fc35ef690b
Bundled themes: remove URLs from reset credits. Closes #30764 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@31454 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 18:01:30 +00:00
Lance Willett
27ed2ce07c
Bundled themes: replace array_shift()
with current()
for performance.
...
Props SergeyBiryukov, fixes #31260 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31453 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 17:51:22 +00:00
Boone Gorges
487d65ad78
Provide a secondary sort order for wp_get_archives()
when type=postbypost
.
...
Sorting by post_date alone can cause indeterminacy problems on different
versions of MySQL when post_date ties need to be broken. Using `ID` as a
secondary sort ensures that the order is always determinate.
Props herbmillerjr for an initial patch.
Fixes #30480 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31452 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 16:59:51 +00:00
Boone Gorges
0efce8c89c
Improve documentation for return value of wp_list_pluck()
.
...
`wp_list_pluck()` will preserve the original array keys if no `$index_key`
parameter is provided. This changeset updates the documentation accordingly.
Props adamsilverstein.
Fixes #31316 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31451 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 16:51:55 +00:00
John Blackbourn
f4d6d4e66b
Return a WP_Error
if an empty name is provided when registering a post type.
...
Fixes #31134
Props tyxla, MikeHansenMe
git-svn-id: https://develop.svn.wordpress.org/trunk@31450 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 16:42:36 +00:00
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