Commit Graph

33908 Commits

Author SHA1 Message Date
Drew Jaynes
72e258bdd5 Docs: Standardize file header summary for wp-includes/class-wp-metadata-lazyloader.php.
See [36897]. See #35986.


git-svn-id: https://develop.svn.wordpress.org/trunk@36899 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 16:58:08 +00:00
Drew Jaynes
94ac53331d Docs: Improve inline documentation syntax throughout WP_Metadata_Lazyloader, introduced in [36566].
See #35816. See #35986.


git-svn-id: https://develop.svn.wordpress.org/trunk@36898 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 16:54:45 +00:00
Drew Jaynes
32f8a9b345 Docs: Add a missing file header to wp-includes/class-wp-metadata-lazyloader.php, introduced in [36566].
See #35816. See #35986.


git-svn-id: https://develop.svn.wordpress.org/trunk@36897 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 16:51:15 +00:00
Boone Gorges
79c92e605a Correct @return annotation for wp_set_object_terms() and related functions.
The return value is an array of term taxonomy IDs, not term IDs.

Fixes #36182.

git-svn-id: https://develop.svn.wordpress.org/trunk@36896 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 16:16:29 +00:00
Jeremy Felt
fce77dc7c6 Docs: Update the return type for get_active_blog_for_user()
This is now a `WP_Site` object.

See #32450.


git-svn-id: https://develop.svn.wordpress.org/trunk@36895 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 07:49:50 +00:00
Jeremy Felt
3968688877 Docs: Update param/return types for WP_Site in ms-blogs.php
* `get_blog_details()` now returns a `WP_Site` object.
* `clean_blog_cache()` is now called with a `WP_Site` object.

See #32450.


git-svn-id: https://develop.svn.wordpress.org/trunk@36894 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 07:41:34 +00:00
Jeremy Felt
65b2be5b8f Docs: Update the return type for get_current_site()
This is now a `WP_Network` object.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36893 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 07:27:56 +00:00
Weston Ruter
746fc0ea1f Customize: Remove unused JS variable to fix jshint error introduced in [36890].
See #36164.


git-svn-id: https://develop.svn.wordpress.org/trunk@36892 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 05:04:56 +00:00
Mike Schroder
134c22caab Media: Progressive enhancement for Imagick; add profiles to whitelist.
- Progressive enhancement for optional compression improvements and stripping meta.
- Whitelist IPTC and XMP profiles to maintain Copyright and Rights Usage Terms.
- Whitelist EXIF profile to maintain orientation information. If handled on upload in the future, it can be stripped as well.

Fixes #33642. See #28634.
Props joemcgill, juliobox, ahockley, markoheijnen, adamsilverstein, wonderboymusic, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@36891 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 04:43:40 +00:00
Weston Ruter
c2c1c3fd3a Customize: Remove selective refresh error message from appearing inline within the preview.
The error message will still be available in the developer console.

Removes part of [36586].
See #27355.
Fixes #36164.


git-svn-id: https://develop.svn.wordpress.org/trunk@36890 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 04:36:51 +00:00
Weston Ruter
dcbbeffc57 Customize: Fix regressions and harden implementation of selective refresh for nav menus.
* Request full refresh if there are nav menu instances that lack partials for a changed setting.
* Restore `WP_Customize_Nav_Menus::$preview_nav_menu_instance_args` and `WP_Customize_Nav_Menus::export_preview_data()` from 4.3, and keeping a tally of all `wp_nav_menu()` calls regardless of whether they can use selective refresh.
* Ensure that all instances of `wp_nav_menu()` are tallied, regardless of whether they are made during the initial preview call or during subsequent partial renderings. Export `nav_menu_instance_args` with each partial rendering response just as they are returned when rendering the preview as a whole.
* Fix issues with Custom Menu widget where nav menu items would fail to render when switching between menus when a menu lacked items to begin with.
* Make sure the fallback behavior is invoked when the partial is no longer associated with a menu.
* Do fallback behavior to refresh preview when all menu items are removed from a menu.

Follows [36586].
See #27355.
Fixes #35362.


git-svn-id: https://develop.svn.wordpress.org/trunk@36889 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 00:08:51 +00:00
Drew Jaynes
f07f2252fe Menus: Avoid a notice when outputting a description for an existing archive menu item for a post type that doesn't.
Props bradyvercher.
See [36859]. Fixes #35324.


git-svn-id: https://develop.svn.wordpress.org/trunk@36888 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 18:24:50 +00:00
Dominik Schilling (ocean90)
6a8cb09f86 Media: Change wording for media files which aren't attached.
The media library can contain files which aren't attached yet. When attaching a file you currently get "Media attachment reattached.", or the opposite "Media attachment detached.". That's redundant and can be inaccurate. It's also not easy to translate in some languages.

This change generalizes the strings to refer to a "media file" instead.

Props SergeyBiryukov, ocean90, netweb.
Fixes #36089.

git-svn-id: https://develop.svn.wordpress.org/trunk@36887 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 17:42:45 +00:00
Dominik Schilling (ocean90)
dfc6f47841 Update Random_Compat from 1.1.6 to 1.2.1.
Changes: https://github.com/paragonie/random_compat/compare/1.1.6...v1.2.1

See #35665.

git-svn-id: https://develop.svn.wordpress.org/trunk@36886 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 17:14:52 +00:00
Dominik Schilling (ocean90)
5064747619 Tests: Remove test_new_files_are_not_in_old_files_array() from [36843].
The test assumes that if a CSS file was added to `$_old_files` all three files (.css, .min.css, -rtl.min.css; it's actually missing the fourth case, -rtl.css) don't exist anymore. But this isn't always the case. The test is also incredible slow because it does three `file_exists()` checks for each file — the global contains 646 files currently.

It's important what we have in the /build directory and that's covered by `test_new_files_are_not_in_old_files_array_compiled()`.

Fixes #36083.

git-svn-id: https://develop.svn.wordpress.org/trunk@36885 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 16:44:25 +00:00
Dominik Schilling (ocean90)
7826b7b205 Script Loader: Enqueue the minified version of farbtastic if SCRIPT_DEBUG is false.
The files are available since [36341].

See #36083, #35229.

git-svn-id: https://develop.svn.wordpress.org/trunk@36884 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 16:03:35 +00:00
Dion Hulse
11082eea97 Tests: Remove debug from [36882].
git-svn-id: https://develop.svn.wordpress.org/trunk@36883 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 07:07:56 +00:00
Dion Hulse
adcb0b5a4a Tests: Merge the two different wp_normalize_path() tests.
See #35996, [36881].


git-svn-id: https://develop.svn.wordpress.org/trunk@36882 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 07:06:12 +00:00
Dion Hulse
8d9b0a9d22 Filesystem: Support Windows shares/DFS roots in wp_normalize_path().
Props rilwis for initial patch.
Fixes #35996.


git-svn-id: https://develop.svn.wordpress.org/trunk@36881 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 05:59:45 +00:00
Dion Hulse
d32216787e oEmbed: During discovery, only request the first 150kb of linked content to avoid timouts requesting larger documents.
Fixes #35979.


git-svn-id: https://develop.svn.wordpress.org/trunk@36880 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-08 05:57:13 +00:00
Andrea Fercia
137bcc1fca Accessibility: Remove the title attributes from the old Media UI.
Also, adds better indication and attributes for the required form fields.
Moves some styles to `deprecated-media.css`.

Props andg, afercia.
Fixes #34944.

git-svn-id: https://develop.svn.wordpress.org/trunk@36879 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 22:28:15 +00:00
Drew Jaynes
6012464446 Docs: Add a missing @since version to the DocBlock for wp_add_dashboard_widget().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36878 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 22:16:56 +00:00
Andrea Fercia
d92e10fbb1 Customizer: Improve the collapsed view when switching to the responsive view.
Props rittesh.patel, afercia.

Fixes #35220.

git-svn-id: https://develop.svn.wordpress.org/trunk@36877 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 22:04:29 +00:00
Pascal Birchler
bae3fb43a5 Embeds: Add support for embeds in the theme template hierarchy.
This allows themes to directly override the default template. The order in which the template is retrieved is as follows: `embed-$post_type-$post_format.php` -> `embed-$post_type.php` -> `embed.php`.

The `embed_template` filter gets replaced by the dynamic `{$type}_template` filter in `get_query_template()`.

Props ChriCo, swissspidy.
See #34561. Fixes #34278.

git-svn-id: https://develop.svn.wordpress.org/trunk@36876 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 19:33:01 +00:00
Konstantin Obenland
ae79b4f91f Bundled Themes: Prevent elements within fieldsets from overflowing in Webkit.
Fixes #35421.


git-svn-id: https://develop.svn.wordpress.org/trunk@36875 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 19:14:05 +00:00
Pascal Birchler
3a51ff4d2e Taxonomy: Improve backward compatibility on the wp-admin/term.php page.
Specifically, run `do_action( 'edit-tags.php' );` on this new term edit page introduced in [36308]. Changes the GET param back to `tag_ID` and properly sets the screen base in `WP_Screen`.

See #34988.

git-svn-id: https://develop.svn.wordpress.org/trunk@36874 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 12:55:04 +00:00
Pascal Birchler
afdf1c9ec1 Embeds: Adjust the iframe title attribute for improved accessibility.
Changes the title attribute from `Embedded WordPress Post` to `"Post name" — site title`.

Props ramiy.
Fixes #35804.

git-svn-id: https://develop.svn.wordpress.org/trunk@36873 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 09:59:02 +00:00
Dion Hulse
e9dbf32553 Setup config: Generate the default secret keys & salts from the local CSPRNG if available, falling back to the WordPress.org API and a backup psuedo random source.
Props diddledan.
Fixes #35290


git-svn-id: https://develop.svn.wordpress.org/trunk@36872 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-07 06:31:18 +00:00
Dominik Schilling (ocean90)
00e87b40c8 Dependencies: Improve group processing of script dependencies.
This is a follow-up to [36604].

When processing dependencies `$this->group` will be the minimum of the script's registered group and all preceding siblings. This is wrong because only a scripts ancestors in the dependency chain should affect where it is loaded. Effectively `$this->group` introduced a form of global state which potentially corrupted the group of dependencies. Sorting covers up this problem.
The issue in #35873 was that script were not moving their dependencies to a lower group when necessary.

The fix:
* In `WP_Dependencies::all_deps()` pass the new `$group` value to `WP_Dependencies::all_deps()`. Previously the wrong value was passed because the parent script could have moved with `WP_Scripts::set_group()`.
* In `WP_Scripts::all_deps()` pass the `$group` parameter to `WP_Dependencies::all_deps()` so it doesn't always use `false` for `$group`. Same for `WP_Styles::all_deps()`.

Props stephenharris, gitlost.
Fixes #35956.

git-svn-id: https://develop.svn.wordpress.org/trunk@36871 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 19:49:54 +00:00
Pascal Birchler
92bdac8474 HTTP: Avoid an undefined index notice in wp_http_validate_url().
Props perezlabs.
Fixes #34164.

git-svn-id: https://develop.svn.wordpress.org/trunk@36870 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 15:54:13 +00:00
Andrea Fercia
b723d3fb75 CSS: Rename the handle for deprecated-media.css after [36341].
The `media` handle is now used for `media.css` thus the stylesheet
for the old media UI needs a different handle name.

See #35229.

git-svn-id: https://develop.svn.wordpress.org/trunk@36869 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 15:37:25 +00:00
Sergey Biryukov
74da332c40 Docs: Add wp_add_dashboard_widget() parameter descriptions.
Props meitar for initial patch.
Fixes #36092.

git-svn-id: https://develop.svn.wordpress.org/trunk@36868 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 12:07:34 +00:00
Jeremy Felt
e3feb63e33 Multisite: Handle redirect to a user's subdomain properly during login
`wp-login.php` uses `wp_safe_redirect()` for all redirects, even those that do not involve unsafe data from the request or referer.

When a user of a subdomain site attempts to login to a network site they do not have access to, the host in the redirect URL is treated as unsafe by `wp_safe_redirect()` as it has no immediate awareness as to which hosts are valid on the network. On a subdirectoy network, everything works as expected because the host is the same.

In this specific block of `wp-login.php`, all URLs are generated by WordPress and we can use `wp_redirect()` to handle the redirects. Users authenticating via other network sites will now be redirected properly. Hosts passed via the `redirect_to` query var will continue to be handled by `wp_safe_redirect()`.

Fixes #30598.


git-svn-id: https://develop.svn.wordpress.org/trunk@36867 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 03:05:46 +00:00
Weston Ruter
52d50a6ce9 Customize: Fix image cropping when doing live preview of theme switches.
Ensure that the Customizer gets bootstrapped with the pre-activated `theme` supplied in the `custom-header-crop` admin ajax requests.

Props faishal, rittesh.patel.
Fixes #32783.


git-svn-id: https://develop.svn.wordpress.org/trunk@36866 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-06 01:44:53 +00:00
Aaron Jorbin
6d01e8650c Update grunt-contrib-cssmin ~0.14.0 → ~1.0.0
See #35104.


git-svn-id: https://develop.svn.wordpress.org/trunk@36865 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:36:36 +00:00
Aaron Jorbin
366dab5560 Update grunt-contrib-copy ~0.8.2 → ~1.0.0
See #35104.


git-svn-id: https://develop.svn.wordpress.org/trunk@36864 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:34:11 +00:00
Aaron Jorbin
a1d75ea8e4 Update grunt-contrib-concat ~0.5.1 → ~1.0.0
see #35104


git-svn-id: https://develop.svn.wordpress.org/trunk@36863 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:31:16 +00:00
Aaron Jorbin
9973cb2cc7 Update grunt-contrib-compress ~0.14.0 → ~1.1.0
See #35104


git-svn-id: https://develop.svn.wordpress.org/trunk@36862 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:24:23 +00:00
Aaron Jorbin
a0a26df25f Update grunt-contrib-clean from 0.6.0 → 1.0.0
see #35104


git-svn-id: https://develop.svn.wordpress.org/trunk@36861 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:18:39 +00:00
Aaron Jorbin
cf923b657f Update Autoprefixer to 6.3.3
See #35104


git-svn-id: https://develop.svn.wordpress.org/trunk@36860 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 23:15:52 +00:00
Aaron Jorbin
4af0645ae8 Ensure Description is respected in post type archive menu items.
Tested scenarios include: using the default (which is the post type description), Setting a custom description for that individual menu item, and setting a custom description that is blank. Introduced in r35382.

Props Toro_Unit, mayukojpn, extendwings, jorbin.
Fixes #35324. See #16075.



git-svn-id: https://develop.svn.wordpress.org/trunk@36859 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 22:56:31 +00:00
Dominik Schilling (ocean90)
e5556666cc Themes: Bring the device preview from [31195] to the theme install previewer.
Props celloexpressions.
Fixes #36017.

git-svn-id: https://develop.svn.wordpress.org/trunk@36858 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 22:06:57 +00:00
Andrew Ozz
25838b4c23 TinyMCE:
- Fix the icon for the native dialogs close button.
- Highlight the button on :focus.

See #36035.

git-svn-id: https://develop.svn.wordpress.org/trunk@36857 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 22:00:45 +00:00
Aaron Jorbin
57d8c6668a Fix License test
Broken in r36855

Fixes #35278



git-svn-id: https://develop.svn.wordpress.org/trunk@36856 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 20:21:23 +00:00
Aaron Jorbin
cdd3d5f318 Clarify Copyright year
Based on http://copyright.gov/title17/92chap4.html#401 and being more consistent with the rest of the document.

See also https://make.wordpress.org/themes/2014/07/08/proper-copyrightlicense-attribution-for-themes/

Fixes #35278


git-svn-id: https://develop.svn.wordpress.org/trunk@36855 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 20:13:35 +00:00
ericlewis
59c8ba7871 Build/Test Tools: Document PHP unit test classes.
Props boonebgorges.
Fixes #35494.


git-svn-id: https://develop.svn.wordpress.org/trunk@36854 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 19:47:41 +00:00
John Blackbourn
48959ec76e Posts, Post Types: Ensure that non-ASCII characters in attachment slugs aren't shown in urlencoded form in the sample permalink UI.
Fixes #35980


git-svn-id: https://develop.svn.wordpress.org/trunk@36853 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 03:55:33 +00:00
Eric Andrew Lewis
ae1c49027a Menus: Ensure theme location setting data is saved with a large menu.
[36510] introduced a fix to allow users to save large menus on the Edit Menu screen (70+ menu items). The form data is stored as JSON which is used to inject the `$_POST` variable in the form submission handler. This injection was not setting form items with named array elements properly (e.g. `menu-locations[primary]`), which did not save theme location data in a large form.

Props keraweb.
See #14134.


git-svn-id: https://develop.svn.wordpress.org/trunk@36852 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-05 00:46:45 +00:00
Weston Ruter
084772af80 Customize: Eliminate unnecessary WP_Customize_Site_Logo_Control in favor of re-using WP_Customize_Image_Control.
* Removes double `margin-bottom` from all the media controls.
* All media controls now send `{settingId}-attachment-data` messages to the preview when a media setting is updated so that the preview has access to the attachment data.
* Fixes receiving of `attachment-data` message for `custom_logo` which resulted in instant JS-applied preview not working. See #36096.

See #33755.
Fixes #35941.


git-svn-id: https://develop.svn.wordpress.org/trunk@36851 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-04 23:46:07 +00:00
Dominik Schilling (ocean90)
d9c9742527 I18N: Fix an invalid placeholder added in [36844].
See #36048.

git-svn-id: https://develop.svn.wordpress.org/trunk@36850 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-04 21:09:31 +00:00