Commit Graph

6980 Commits

Author SHA1 Message Date
Ella Iseulde Van Dorpe
d17af5ff4b Fix unit tests after [36336]
Built from https://develop.svn.wordpress.org/trunk@36337


git-svn-id: http://core.svn.wordpress.org/trunk@36304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 23:38:25 +00:00
Ella Iseulde Van Dorpe
dea6197932 Emoji: adjust $wpsmiliestrans
Swap simple-smile.png with SLIGHTLY SMILING FACE
and frownie.png with SLIGHTLY FROWNING FACE

Fixes #31710.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 22:28:29 +00:00
Eric Lewis
435196fc40 Themes: Show an error message to logged-in users if a template file isn't loaded.
On the off-chance the active theme folder is renamed or deleted, a "white screen 
of death" was displayed to the user. Instead, the user is shown a useful error
screen displaying any errors the theme has (e.g. if the theme can't be found).

Props MikeHansenMe, SergeyBiryukov.
See #21931.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 17:29:27 +00:00
Andrea Fercia
82c596594b After [36333] correctly use esc_attr() instead of esc_attr__().
See #35313.
Built from https://develop.svn.wordpress.org/trunk@36334


git-svn-id: http://core.svn.wordpress.org/trunk@36301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 16:03:25 +00:00
Andrea Fercia
497de1d658 Accessibility: Remove title attributes from the Posts list table.
Fixes #35313.
Built from https://develop.svn.wordpress.org/trunk@36333


git-svn-id: http://core.svn.wordpress.org/trunk@36300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 15:47:26 +00:00
Rachel Baker
97e367483a Comments: Correct description of comment_author property in WP_Comment class.
The `comment_author` property is the comment author’s name, not an ID.

Props meitar.

Fixes #35464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 15:00:27 +00:00
Andrea Fercia
1183b06bc5 Accessibility: Remove title attributes from the Media Library list table.
Fixes #35136.
Built from https://develop.svn.wordpress.org/trunk@36331


git-svn-id: http://core.svn.wordpress.org/trunk@36298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 14:46:29 +00:00
Eric Lewis
fd99c1705e Docs: Nav menu location functions relate to nav menu locations, not nav menus.
Fixes #35471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 01:43:26 +00:00
Pascal Birchler
4e978a1ce6 Posts: Correctly pass $post to post_password_required() in get_the_excerpt().
Corrects the relevant test.

Props sebastian.pisula for initial patch.
Fixes #35486.
Built from https://develop.svn.wordpress.org/trunk@36329


git-svn-id: http://core.svn.wordpress.org/trunk@36296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-16 10:14:28 +00:00
Dominik Schilling
3b3ded01a0 Media: Update some attach/detach strings in the columns view.
* Show a "Media attachment reattached."/"Media attachment detached." message when only one attachment was attached/detached. 
* Use the string placeholder as `number_format_i18n()` returns a string.
* Add translator comments.
* Update help text to refer to the new dropdown menus.
* Add a more generic title to the attach modal.

Fixes #33237.
Built from https://develop.svn.wordpress.org/trunk@36328


git-svn-id: http://core.svn.wordpress.org/trunk@36295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 22:29:25 +00:00
Boone Gorges
b750ee042b Correct documentation for post_author param of WP_Comment_Query.
Props chriscct7.
Fixes #35481.
Built from https://develop.svn.wordpress.org/trunk@36327


git-svn-id: http://core.svn.wordpress.org/trunk@36294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:14:26 +00:00
Boone Gorges
4c91776f3b Respect all post-related filters in WP_Comment_Query.
The refactor of `WP_Comment_Query`'s SQL generation in [34542] introduced a bug
that caused only the last post-related filter to be respected in comment
queries. In other words, if querying for comments using params
`post_status=draft&post_author=3`, only the last-processed of these params
would be respected. The current changeset fixes the logic so that these clauses
don't overwrite each other.

Props chriscct7.
Fixes #35478.
Built from https://develop.svn.wordpress.org/trunk@36326


git-svn-id: http://core.svn.wordpress.org/trunk@36293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:10:51 +00:00
Rachel Baker
f407e3a473 Comments: Use TEXT column type in fallback for wp_get_comment_column_max_length().
Fixes #10377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:10:27 +00:00
Boone Gorges
d2dabdecf6 Respect custom pagination params when using wp_list_comments() in a query loop.
[36157] fixed a problem, introduced in 4.4, that caused custom pagination
parameters passed to `wp_list_comments()`. However, the fix introduced in that
changeset was limited to the `is_singular()` context, so that the bug remained
when `wp_list_comments()` is used within a non-singular `WP_Query` loop. We
fix this by removing the `is_singular()` check and using the more general
`get_the_ID()` to identify the correct post_id to use for the secondary
comment query.

Fixes #35402.
Built from https://develop.svn.wordpress.org/trunk@36324


git-svn-id: http://core.svn.wordpress.org/trunk@36291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:48:25 +00:00
Boone Gorges
d5bc0fe493 Populate term cache with proper clone of term objects.
[34999] modified the cache strategy for terms in the context of
`wp_get_object_terms()`. As part of these changes, the `object_id` property of
term objects had to be unset before being cached. To avoid modifying passed-by-
reference terms, `update_term_cache()` attempted to make a copy of the terms
passed to the function; however, it failed to use the `clone` keyword, and thus
only created a reference instead of a copy.

Props berengerzyla.
Fixes #35462.
Built from https://develop.svn.wordpress.org/trunk@36323


git-svn-id: http://core.svn.wordpress.org/trunk@36290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:35:26 +00:00
Pascal Birchler
e85f75f23f Comments: Remove unneeded $req variable in comments_template().
Props Latz.
Fixes #35473.
Built from https://develop.svn.wordpress.org/trunk@36322


git-svn-id: http://core.svn.wordpress.org/trunk@36289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:33:27 +00:00
Pascal Birchler
552ed65d3b Post: After [36319], add $post parameter to the get_the_excerpt filter.
Props sebastian.pisula.
Fixes #35474.
Built from https://develop.svn.wordpress.org/trunk@36321


git-svn-id: http://core.svn.wordpress.org/trunk@36288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:28:26 +00:00
Pascal Birchler
1bad16273e Add tests missed and announced in [36319].
See #27246.
Built from https://develop.svn.wordpress.org/trunk@36320


git-svn-id: http://core.svn.wordpress.org/trunk@36287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 14:50:30 +00:00
Pascal Birchler
10be93190e Posts: Add a $post parameter to get_the_excerpt().
This allows getting the excerpt for a specific post, similar to how most other template tags work.
A deprecation notice is thrown if a boolean value is passed, which is deprecated since 2.3 and has not been used for a long time.
Adds unit tests.

Fixes #27246.
Built from https://develop.svn.wordpress.org/trunk@36319


git-svn-id: http://core.svn.wordpress.org/trunk@36286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 14:47:26 +00:00
Pascal Birchler
19d4304565 Comments: Add a new pre_wp_update_comment_count_now filter.
This allows filtering a post's comment count before it is queried and updated in the database.

Props peterwilsoncc for initial patch.
Fixes #35060.
Built from https://develop.svn.wordpress.org/trunk@36318


git-svn-id: http://core.svn.wordpress.org/trunk@36285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 13:42:26 +00:00
Eric Lewis
ededb78efc Docs: Use "site" rather than "blog" in get_current_blog_id() docs.
Fixes #35415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 13:18:27 +00:00
Pascal Birchler
68f12521c8 Post Types: Introduce unregister_post_type().
This new function can be used to completely unregister non built-in post types.

Fixes #14761.
Built from https://develop.svn.wordpress.org/trunk@36316


git-svn-id: http://core.svn.wordpress.org/trunk@36283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 12:20:27 +00:00
Pascal Birchler
a6aa15a445 Build Tools: Append the timestamp to $wp_version instead of only the current date.
This ensures the `Etag` header added in [36312] changes for every build.

Fixes #28722.
Built from https://develop.svn.wordpress.org/trunk@36315


git-svn-id: http://core.svn.wordpress.org/trunk@36282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 11:54:26 +00:00
Dominik Schilling
c5e3716c11 Docs: Fix @return type for wp_get_current_user() after [36313].
See #19615.
Built from https://develop.svn.wordpress.org/trunk@36314


git-svn-id: http://core.svn.wordpress.org/trunk@36281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 11:16:26 +00:00
Pascal Birchler
9cd880d356 Users: Always return $current_user in wp_get_current_user(), never a boolean.
Fixes unit tests affected by [36311].

See #19615.
Built from https://develop.svn.wordpress.org/trunk@36313


git-svn-id: http://core.svn.wordpress.org/trunk@36280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:47:25 +00:00
Pascal Birchler
9ea68bc533 Script Loader: Add Etag: $wp_version header in load-scripts.php and load-styles.php.
This improves performance since browsers won't re-download the scripts and styles when there was no change in `$wp_version`.

Props sergej.mueller, dd32, swissspidy.
Fixes #28722.
Built from https://develop.svn.wordpress.org/trunk@36312


git-svn-id: http://core.svn.wordpress.org/trunk@36279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:23:25 +00:00
Pascal Birchler
283684b616 Users: Deprecate the get_currentuserinfo() pluggable function.
It encourages an ugly pattern like `global $userdata; get_currentuserinfo();` in plugins/themes. `wp_get_current_user()` should be used instead, e.g. `$current_user = wp_get_current_user();`.

Props scribu for initial patch.
Fixes #19615.
Built from https://develop.svn.wordpress.org/trunk@36311


git-svn-id: http://core.svn.wordpress.org/trunk@36278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:16:27 +00:00
Pascal Birchler
16142a461e Filesystem API: Add a filter to wp_unique_filename().
Props SergeyBiryukov, MikeHansenMe, johnbillion, swissspidy.
Fixes #19121.
Built from https://develop.svn.wordpress.org/trunk@36310


git-svn-id: http://core.svn.wordpress.org/trunk@36277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 09:39:26 +00:00
Pascal Birchler
6951e8d045 Taxonomy: Fix unit tests after [36308].
See #34988.
Built from https://develop.svn.wordpress.org/trunk@36309


git-svn-id: http://core.svn.wordpress.org/trunk@36276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 09:13:26 +00:00
Pascal Birchler
27fa2f65eb Taxonomy: Introduce wp-admin/term.php for editing single terms.
This is similar to `edit.php` -> `post.php` and `users.php` -> `user-edit.php` and fixes a bug where screen options for the list table were shown while editing a term.

Fixes #34988.
Built from https://develop.svn.wordpress.org/trunk@36308


git-svn-id: http://core.svn.wordpress.org/trunk@36275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 08:27:27 +00:00
Pascal Birchler
b0b13aff2f Embeds: Allow embedding static front pages and pages having a child page with an embed slug.
This makes `embed` a special slug that can't be used for new pages/posts. When `https://example.com/foo/embed/` is an existing page, embeds fall back to `https://example.com/foo/?embed=true`.
Adds unit tests.

Fixes #34971.
Built from https://develop.svn.wordpress.org/trunk@36307


git-svn-id: http://core.svn.wordpress.org/trunk@36274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 07:56:26 +00:00
Pascal Birchler
b9fd40a8cb Users: Decode special characters in password and email change notification emails.
Fixes #35283.
Built from https://develop.svn.wordpress.org/trunk@36306


git-svn-id: http://core.svn.wordpress.org/trunk@36273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 07:29:27 +00:00
Eric Lewis
207ba54fed In wp.Backbone.Subviews, extract subviews with proper Underscore.js functions.
Subviews are stored internally on the Subview manager as an object. The object 
is composed of key-value pairs where the key is a jQuery selector for a view,
and the value is an array of views that matching the selector.

To extract subviews, `_.flatten()` was used to collate the nested arrays of 
views into a single view. However, `_.flatten()` is not intended to be used 
for objects, and this unintended functionality breaks in newer versions of 
Underscore.js. 

Instead, we'll use `_.values()` to extract the arrays of views first, 
and then flatten the array of arrays.

Props adamsilverstein.
See #34350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 04:02:28 +00:00
Andrea Fercia
e41649c325 Accessibility: Improve focus handling on the Taxonomies Quick Edit.
Moves focus back to a proper place when saving or closing the form.

Fixes #35460.
Built from https://develop.svn.wordpress.org/trunk@36304


git-svn-id: http://core.svn.wordpress.org/trunk@36271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 23:03:26 +00:00
Andrea Fercia
c6ec579751 Accessibility: Improve focus handling and audible feedback on the Posts Quick-Bulk Edit.
Avoids a focus loss when saving or closing the form moving focus back to a proper place.
Uses `wp.a11y.speak()` to dispatch successful edits and error messages to screen readers.

Fixes #34756.
Built from https://develop.svn.wordpress.org/trunk@36303


git-svn-id: http://core.svn.wordpress.org/trunk@36270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 22:58:27 +00:00
Pascal Birchler
aaa11d6207 Allow searching for 0 throughout the admin.
Fixes #31025.
Built from https://develop.svn.wordpress.org/trunk@36302


git-svn-id: http://core.svn.wordpress.org/trunk@36269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:06:25 +00:00
Pascal Birchler
d4b30f47bf Plugins: Prevent a warning when searching in the plugins list table.
After [36182], plugin data contains compatibility info from the API, which is an array and cannot be searched.

Fixes #35461.
Built from https://develop.svn.wordpress.org/trunk@36301


git-svn-id: http://core.svn.wordpress.org/trunk@36268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:00:29 +00:00
Drew Jaynes
ca94aafb50 Docs: Add a changelog entry to the DocBlock for get_post_type_archive_link() denoting that posts support was added in 4.5.
See [36225]. See #19902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 17:56:27 +00:00
Drew Jaynes
383b9a44de Docs: Adjust formatting for an added-parameter changelog entry in the hook doc for the cron_request filter.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 17:30:28 +00:00
Andrea Fercia
2d76f3cb83 Accessibility: Remove title attributes from the Comments screen.
Fixes #35304.
Built from https://develop.svn.wordpress.org/trunk@36298


git-svn-id: http://core.svn.wordpress.org/trunk@36265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 16:04:27 +00:00
Pascal Birchler
ded3a1d72f Plugins: Make sure the 'Beta testing' tab is first in the plugin installer.
This makes feature plugins more discoverable for people running development builds.

Fixes #29631.
Built from https://develop.svn.wordpress.org/trunk@36297


git-svn-id: http://core.svn.wordpress.org/trunk@36264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 09:07:26 +00:00
Pascal Birchler
08693cd206 Administration: After [36295], mark postBoxL10n as a global to please JSHint.
See #26399.
Built from https://develop.svn.wordpress.org/trunk@36296


git-svn-id: http://core.svn.wordpress.org/trunk@36263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 08:40:26 +00:00
John Blackbourn
9ae1736d01 Administration: Add a "Drag boxes here" message to empty dashboard meta boxes so it's clear to users that it's possible to drag meta boxes into empty spaces.
Props xavortm
Fixes #26399

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


git-svn-id: http://core.svn.wordpress.org/trunk@36262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 04:13:26 +00:00
Joe Hoyle
0f9b770b6c Add response status code aliases on WP_Http for convenience.
These provide a more descriptive way to set response codes elsewhere,
so it's readable and less chance for the wrong response code to be
used such as 401 vs 403.

Props rmccue for the idea.
Fixes #35426.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 03:16:27 +00:00
John Blackbourn
55bbcf0391 Networks and Sites: Clarify the docblock for get_current_site() so it's clear that it returns the current network object, not anything to do with the current site. As a further exercise, the reader is invited to fix the nomenclature surrounding blogs, sites, and networks in WordPress.
Props ericlewis
Fixes #35414

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


git-svn-id: http://core.svn.wordpress.org/trunk@36260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 00:02:25 +00:00
John Blackbourn
d6228b95b0 I18N: Introduce tests for WP_Locale.
Props realloc, swissspidy
Fixes #34688

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


git-svn-id: http://core.svn.wordpress.org/trunk@36259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 23:50:26 +00:00
Andrea Fercia
7ab88221fa Customizer: Aggregate similar CSS rules.
Fixes #34333.
Built from https://develop.svn.wordpress.org/trunk@36291


git-svn-id: http://core.svn.wordpress.org/trunk@36258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 22:36:26 +00:00
John Blackbourn
045d7d3a18 I18N: Correct an argument description and return value for wp_dropdown_languages().
Props realloc
See #35294

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


git-svn-id: http://core.svn.wordpress.org/trunk@36257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 20:33:25 +00:00
John Blackbourn
e56457f7fe Taxonomy: Correct the accetped types for the taxonomy element in the arguments passed to wp_dropdown_categories().
Props grapplerulrich
Fixes #35446

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


git-svn-id: http://core.svn.wordpress.org/trunk@36256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 20:16:29 +00:00
Dominik Schilling
9cd5b76fbd jQuery: Replace $( document ).on( 'ready', fn ) with $( fn ).
The 'ready' event is deprecated since jQuery 1.8.

See https://github.com/jquery/jquery-migrate/blob/1.3.0/warnings.md#jqmigrate-ready-event-is-deprecated.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36288


git-svn-id: http://core.svn.wordpress.org/trunk@36255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 17:39:25 +00:00