Commit Graph

34547 Commits

Author SHA1 Message Date
Drew Jaynes f78e4becba Docs: Improve the formatting and usefulness of information in the DocBlock for `sanitize_text_field()`.
Also adds missing parameter and return descriptions.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37852 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-23 05:23:47 +00:00
Rachel Baker eadd8d0948 Utils: Update `wp.template` to match parameter changes to `_.template` in Underscore 1.8.3.
Removes passing a `null` value for the back-compat only `data` parameter to `_.template`.

Props jnylen0.
Fixes #36695. 



git-svn-id: https://develop.svn.wordpress.org/trunk@37851 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-23 02:29:15 +00:00
Jeremy Felt 5640b2b02c Multisite: Move call of `get_blog_details()` inside `ms_site_check()`.
This allows the `ms_site_check` filter or `is_super_admin()` check to return `true` before `get_blog_details()` is used.

Props danielbachhuber.
Fixes #37118.


git-svn-id: https://develop.svn.wordpress.org/trunk@37850 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-22 21:33:20 +00:00
Drew Jaynes 6b35519559 Docs: Add some missing changelog entries to the DocBlock for `add_theme_support()`.
Part props sirjonathan.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37849 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-22 14:24:28 +00:00
Drew Jaynes e2705a8718 Docs: Correct the `$request` parameter datatype in the hook doc for the `posts_request` filter.
It's a string, not an array.

Props coffee2code.
Fixes #37142.


git-svn-id: https://develop.svn.wordpress.org/trunk@37848 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 22:21:55 +00:00
Drew Jaynes 75351068df Bump version number for nightly builds.
git-svn-id: https://develop.svn.wordpress.org/trunk@37847 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 22:06:28 +00:00
Nikolay Bachiyski 8b0e466232 Admin: escape URL-encoded permalinks
git-svn-id: https://develop.svn.wordpress.org/trunk@37801 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 14:45:54 +00:00
Rachel Baker f28d567989 Revisions: Change the capability needed to view revision diffs to `edit_post`.
git-svn-id: https://develop.svn.wordpress.org/trunk@37779 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 14:19:26 +00:00
Nikolay Bachiyski 6e9a0fb948 Admin: Escape attachment name in case it contains special characters
git-svn-id: https://develop.svn.wordpress.org/trunk@37774 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 14:18:27 +00:00
Joe McGill 93cae978dd Media: Improve handling of extensionless filenames.
This ensures files retain a filename after sanitization.

Fixes 37111.

git-svn-id: https://develop.svn.wordpress.org/trunk@37756 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 13:43:59 +00:00
Joe McGill b428df51e5 Media: Restore keyboard navigation of the media grid.
This changes the binding of event listeners in the Attachments Browser
to use `on` instead of `listenTo` for the `attachment:keydown:arrow` and
`attachment:details:shift-tab` events. The existing listeners broke
when we upgraded Backbone in [36546].

Props adamsilverstein.
Fixes #36900.

git-svn-id: https://develop.svn.wordpress.org/trunk@37755 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-21 13:34:19 +00:00
Drew Jaynes ce565d2fb2 Docs: Clarify documentation for `wp_logout_url()` and `wp_login_url()` and corresponding hooks to highlight whether HTML-encoded or un-encoded values should be expected.
The return from `wp_logout_url()` is HTML-encoded due to its value passing through `wp_nonce_url()` and thus `esc_html()`. Adversely `wp_login_url()` passes through no such escaping and therefore should not be expected to return an HTML-encoded value.

Props akibjorklund for the initial patch.
Fixes #34352.


git-svn-id: https://develop.svn.wordpress.org/trunk@37753 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-20 08:47:20 +00:00
Drew Jaynes 01bfb1342b Docs: Improve the summaries and return descriptions for `get_registered_nav_menus()` and `get_nav_menu_locations()`.
Props rabmalin for the initial patch.
Fixes #37106.


git-svn-id: https://develop.svn.wordpress.org/trunk@37752 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-20 08:25:16 +00:00
Andrew Ozz 6304560fb7 Editor, link checker:
- Add white outline for contrast on darker backgrounds.
- Change red colour in toolbar.

Props iseulde. Props rockwell15 for the initial patch.
See #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@37751 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-19 13:00:30 +00:00
Pascal Birchler 6bf5465f67 Menus: Fix `_wp_expand_nav_menu_post_data()` for PHP 5.2.
[37748] introduced `_wp_expand_nav_menu_post_data()` together with an `array_replace_recursive()` compatibility function for PHP 5.2.
Even though that compat function is tried and tested in other projects like BuddyPress, we need to add additional `isset()` checks in order to avoid 'Undefined index' notices in our case.

See #36590.

git-svn-id: https://develop.svn.wordpress.org/trunk@37750 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-19 12:50:15 +00:00
Andrew Ozz 7e53f5e404 Grunt: when running `precommit` use regex to check which files have been modified.
Fixes #36528.

git-svn-id: https://develop.svn.wordpress.org/trunk@37749 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-19 12:31:15 +00:00
Pascal Birchler 3f050f87c3 Menus: Support nested array variables in POST data when saving menus.
[36510] allowed larger menus to be created in the Edit Menu screen by JSON-encoding the entire form into a single input field. However, it did not correctly handle nested arrays.

This introduces a new `_wp_expand_nav_menu_post_data()` helper function to handle this POST data which uses `array_replace_recursive()` internally. Since the latter is only available on PHP 5.3+, we add a compatibility function to ensure PHP 5.2 support.

Props ericlewis, neverything, swissspidy.
Fixes #36590 for trunk. See #14134.

git-svn-id: https://develop.svn.wordpress.org/trunk@37748 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-19 12:24:23 +00:00
Pascal Birchler d40f2eed2c Permalinks: Validate custom permalink structures.
Custom permalink structures require at least one valid structure tag, e.g. `%postname%`. If none is included, it would leave users with broken permalinks.
Let's make sure this won't happen by validating the permalink structure.

Adds unit tests.

Props rockwell15 for initial patch.
Fixes #35936.

git-svn-id: https://develop.svn.wordpress.org/trunk@37747 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-19 12:01:11 +00:00
Pascal Birchler db843d80ab L10n: Add unit tests for the `override_load_textdomain` filter.
Fixes #36398.

git-svn-id: https://develop.svn.wordpress.org/trunk@37746 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-18 10:09:26 +00:00
Pascal Birchler c3394e2c93 Embeds: Improve height calculation for slow loading images.
When the featured image takes longer to load, the browser might not know its exact dimensions yet and therefore sends an incorrect document height to the embedding site.

By sending the document's height again after the featured image has been loaded, we ensure that the iframe doesn't get cut off.

Fixes #35657.

git-svn-id: https://develop.svn.wordpress.org/trunk@37745 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-18 09:59:54 +00:00
Pascal Birchler ddd6c2d94d Embeds: Remove support for Google Video.
While the service has been retired for years, it now has completely stopped working. Thus there is no reason to keep it.

Props Viper007Bond.
Fixes #36304.

git-svn-id: https://develop.svn.wordpress.org/trunk@37744 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-18 09:46:17 +00:00
Rachel Baker cf783103fc Comments: Wrap or unwrap the List Table comment_date as comment status changes via Ajax.
Introduced in [36521].

Fixes #36742.
Props imath, adamsilverstein.

git-svn-id: https://develop.svn.wordpress.org/trunk@37743 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 21:47:58 +00:00
Andrea Fercia 090ecc34f9 Accessibility: Theme Installer, make the "Upload Theme" button... a button.
UI controls that "do something" on a page shouldn't be links. This link behaves
like a toggle to expand the uploader panel and should be a `button` element with
an aria-expanded attribute. Also:

- improves consistency with the Plugin uploader
- keeps the themes list visible when the uploader is open
- displays a notice when JavaScript is off
- adds some `hide-if-no-js` CSS classes
- removes the `themes.router.navigate()` "upload" route: seems unnecessary and breaks history

Fixes #35457.

git-svn-id: https://develop.svn.wordpress.org/trunk@37742 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 20:46:08 +00:00
Andrew Ozz faf7576562 Editor: after inserting a link detect if the URL is broken, first run.
Props iseulde, azaozz.
See #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@37741 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 20:40:04 +00:00
Helen Hou-Sandi 265fabc1c4 Use numeric font weights instead of keywords.
When Open Sans was in use, the `300`, `400`, and `600` weights were loaded. `400` is the equivalent of `normal`; however, `bold` is equivalent to `700`, not `600`. With the move to system fonts, we need to be specific rather than relying on the lack of a `700` weight. Not all system fonts include a `600` weight; in those instances, they will use the `bold`/`700` weight.

The WordPress CSS Coding Standards have been updated accordingly.

props coderste.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@37740 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 18:36:03 +00:00
Drew Jaynes bfdf00cb83 Docs: Add a missing summary and `@since` version to the DocBlock for `WP_MS_Sites_List_Table::prepare_items()`.
Also adds a changelog entry for 4.6.0 noting the changeover to `get_sites()`.

Fixes #36675. See #21837, #24833 and #33185.


git-svn-id: https://develop.svn.wordpress.org/trunk@37739 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 16:05:43 +00:00
Peter Wilson 54f1c097a6 Posts: Add `$post` parameter to modified date and time functions.
Unifies the APIs for getting a post's modified date or time with getting a post's date or time.

Adds the `$post` parameter to the functions `get_the_modified_date` and `get_the_modified_time`.

Adds the `$post` parameter to the filters `get_the_modified_date` and `get_the_modified_time`.

Props Soean, lukecavanagh.
Fixes #37059.


git-svn-id: https://develop.svn.wordpress.org/trunk@37738 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 05:11:29 +00:00
Andrew Ozz 0f319917c4 Autosave: improve the notice when the sessionStorage autosave is different than the content.
- Make it higher priority than the server autosave.
- Change it so the editors undo and redo can be used.
- Replace the restore link with a button.
- Add better explanation/help.

See #37025.

git-svn-id: https://develop.svn.wordpress.org/trunk@37737 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 03:01:32 +00:00
Jeremy Felt 96d7eadb0c Multisite: Use `WP_Site_Query` to power `WP_MS_Sites_List_Table`.
`WP_Site_Query` provides for a cleaner `prepare_items()` method. It significantly improves the search experience in the sites list table:

* In a subdomain configuration, domain and path are searched for a provided terms.
* In a subdirectory configuration, path is searched for a provided term.
* The full domain is searched in a subdomain configuration rather than the portion not matching the network's domain.
* Terms are searched as `%term%` by default. Adding `*` in the middle of a term will search `%te%rm%`.

Props flixos90, Fab1en.
Fixes #33185, #24833, #21837, #36675.


git-svn-id: https://develop.svn.wordpress.org/trunk@37736 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 00:02:05 +00:00
Jeremy Felt 3d56328372 Multisite: Add search column support to `WP_Site_Query`.
`domain` and/or `path` can be used to specify which column(s) should be searched.

See #35791.


git-svn-id: https://develop.svn.wordpress.org/trunk@37735 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 23:08:30 +00:00
Andrea Fercia 0cda9e306c Accessibility: Remove the ARIA roles from the `wp.a11y.speak()` live regions.
When Firefox repaints some elements, NVDA may announce "alert" even when there's
no actual message dispatched to the live region. The NVDA implementation differs
from other screen readers and is currently under discussion. To avoid a subpar
user experience better to remove the roles since they're basically redundant.

Fixes #36289.

git-svn-id: https://develop.svn.wordpress.org/trunk@37734 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 21:50:39 +00:00
Aaron Jorbin 174925b7a9 Output node and npm versions on travis
In order to make local debugging of travis easier, output the npm and node versions when travis runs


git-svn-id: https://develop.svn.wordpress.org/trunk@37730 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 17:27:22 +00:00
Pascal Birchler 931440e375 Embeds: Enforce a valid post ID when embedding a post from the current site.
Otherwise `wp_filter_pre_oembed_result()` could erroneously return the HTML of the current post instead of the intended result.

Props kraftbj.
See #36767.

git-svn-id: https://develop.svn.wordpress.org/trunk@37729 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 17:17:32 +00:00
Dominik Schilling (ocean90) eefd425f66 Media: Use the correct variable for the file object.
See #14244.

git-svn-id: https://develop.svn.wordpress.org/trunk@37728 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 16:14:25 +00:00
Dominik Schilling (ocean90) 41823be421 Media: Pass allowed file extensions to Plupload.
Plupload's `mime_types` filter (http://www.plupload.com/docs/Options#filters.mime_types) allows us to inform a user about an unsupported file before the file gets uploaded.

Props polevaultweb.
Fixes #14244.

git-svn-id: https://develop.svn.wordpress.org/trunk@37727 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 15:38:12 +00:00
Rachel Baker 7a4e523b5e REST API: Include X-Robots-Tag: noindex header in REST API responses to prevent endpoints from being indexed by search engines.
Prevent duplicate content issues with search engines and REST API endpoint response data.

Fixes #36390.
Props m_uysl for the initial patch.

git-svn-id: https://develop.svn.wordpress.org/trunk@37726 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 14:58:28 +00:00
Dominik Schilling (ocean90) f50f50cd0b Customize: Separate preview and actions in the site icon control.
Reverts [37456] to allow users to remove/change a site icon even if the attachment has corrupt/missing data about sizes.

Fixes #36749.

git-svn-id: https://develop.svn.wordpress.org/trunk@37724 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 09:44:21 +00:00
Dominik Schilling (ocean90) 62bd8ecdd7 External Libraries: Update Backbone to version 1.3.3.
Changelog: https://cdn.rawgit.com/jashkenas/backbone/1.3.3/index.html#changelog
Diff: https://github.com/jashkenas/backbone/compare/1.2.3...1.3.3

Includes a unit test to ensure that the minified version doesn't include `sourceMappingURL`.

Props adamsilverstein.
Fixes #37099.

git-svn-id: https://develop.svn.wordpress.org/trunk@37723 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 09:26:06 +00:00
Andrew Ozz 70afec2875 Media: properly refresh the position of the Plupload shim so it moves over the Select Files button or off the screen. Fixes selecting files in MS Edge on the Media grid and Media -> Add New screens.
Fixes #37039.

git-svn-id: https://develop.svn.wordpress.org/trunk@37722 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 04:53:42 +00:00
Boone Gorges e1cfb25e79 Query: `set_found_posts()` must run immediately after main query.
If not run immediately after, the `SELECT FOUND_ROWS()` query might refer to
a different query, such as the one used to populate the post cache for a split
query.

Introduced in [37692].

Fixes #36687.

git-svn-id: https://develop.svn.wordpress.org/trunk@37721 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-16 02:00:02 +00:00
Sergey Biryukov b1f3926bcb Embeds: In `WP_oEmbed::get_provider()` and `WP_oEmbed::get_html()`, parse the `$args` string to an array, as we treat it as an array later.
See #37071.

git-svn-id: https://develop.svn.wordpress.org/trunk@37720 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 18:51:32 +00:00
Sergey Biryukov 983d5c94e8 Plugins: Normalize `WP_PLUGIN_DIR` in the test added in [37332], otherwise it fails on Windows.
See #29154.

git-svn-id: https://develop.svn.wordpress.org/trunk@37719 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 18:30:32 +00:00
Sergey Biryukov 25a27bff7d I18N: Revert the test added in [37716], as it causes errors when running the full suite.
See #36790.

git-svn-id: https://develop.svn.wordpress.org/trunk@37718 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 18:04:31 +00:00
Sergey Biryukov 89304a579f I18N: Adjust the regex in `wp_maybe_decline_date()` to handle word boundaries correctly.
Props semil.
Fixes #36790.

git-svn-id: https://develop.svn.wordpress.org/trunk@37717 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 17:44:45 +00:00
Sergey Biryukov 6a5305e0b1 I18N: Add a unit test for `wp_maybe_decline_date()`.
See #36790.

git-svn-id: https://develop.svn.wordpress.org/trunk@37716 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 17:40:23 +00:00
Konstantin Obenland 86af710a3d Twenty Ten: Revert pot changes after update test.
Introduced in [37714].



git-svn-id: https://develop.svn.wordpress.org/trunk@37715 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 16:45:27 +00:00
Konstantin Obenland 4dd1d9bef9 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.



git-svn-id: https://develop.svn.wordpress.org/trunk@37714 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 16:36:07 +00:00
Rachel Baker 1d115078eb Comments: Do not flag a comment as a duplicate if the `comment_author_email` is provided but not a match.
This reduces the strictness of the duplicate check a little, but does prevent false duplicates for emoji or +1 comments by authors with matching names. The current logic was introduced all the way back in [2894].

Fixes #37093.

git-svn-id: https://develop.svn.wordpress.org/trunk@37713 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 14:50:38 +00:00
Boone Gorges ade41fc2cf Query: After [37692], don't skip `set_found_posts()` when no posts are found.
The 'found_posts' filter must continue to run for plugins manipulating post
results via filter.

Props dd32.
Fixes #36687.

git-svn-id: https://develop.svn.wordpress.org/trunk@37712 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 12:32:25 +00:00
Pascal Birchler 3c34040bf2 Fix tests after [37708].
See #36767.

git-svn-id: https://develop.svn.wordpress.org/trunk@37710 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 11:54:28 +00:00