Commit Graph

35054 Commits

Author SHA1 Message Date
Dominik Schilling
59b0096dfe Customize: Fix site icon preview in RTL.
* Set the direction of previews to LTR.
* Remove the ID attribute from the favicon preview in the customizer panel. The preview in the media modal uses the same ID which prevented updating the correct favicon preview.

Fixes #37286.

git-svn-id: https://develop.svn.wordpress.org/trunk@37964 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 12:41:38 +00:00
Dominik Schilling
9c4f1a3431 Customize: Add a RTL version of "browser.png" for the site icon preview.
Props sidati.
Fixes #37063.

git-svn-id: https://develop.svn.wordpress.org/trunk@37963 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 11:31:13 +00:00
Dominik Schilling
c259f4c35d General: Return "O B" when passing 0 to size_format().
Props swissspidy.
Fixes #36635.

git-svn-id: https://develop.svn.wordpress.org/trunk@37962 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 10:35:24 +00:00
Pascal Birchler
ce7b53fb3f Docs: Fix a typo across some function and hook docs.
s/filterss/filters.

See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@37961 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:44:10 +00:00
Sergey Biryukov
83e3bc084b Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37960 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:09:32 +00:00
Dominik Schilling
1752b073e0 Network Admin: Replace "Options saved." notice with "Settings saved.".
"Settings saved." is already used on all other settings screens.

Fixes #37279.

git-svn-id: https://develop.svn.wordpress.org/trunk@37959 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:00:38 +00:00
Sergey Biryukov
31497f69a1 Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37958 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:47:19 +00:00
Weston Ruter
097b3ad595 Customize: Prevent image controls with selected images smaller than pane width from being distorted through stretching to fit width.
Props celloexpressions.
Fixes #37277.


git-svn-id: https://develop.svn.wordpress.org/trunk@37957 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:44:49 +00:00
Sergey Biryukov
f4d197c534 Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37956 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:36:55 +00:00
Dominik Schilling
1d16d1f36d Customize: Use the correct variable when referring to the media frame.
Props celloexpressions.
Fixes #36236.

git-svn-id: https://develop.svn.wordpress.org/trunk@37955 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:44:30 +00:00
Dominik Schilling
1ae9f9c733 Unit Tests: Change some @group annotations to @ticket.
git-svn-id: https://develop.svn.wordpress.org/trunk@37954 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:24:52 +00:00
Dominik Schilling
2f90caa574 Nav Menus: In Walker_Nav_Menu_Edit::start_el() initialize $original_title with false.
Prevents displaying "Original:" without a title when adding a menu item without a title.

Props grapplerulrich, swissspidy.
Fixes #36729.

git-svn-id: https://develop.svn.wordpress.org/trunk@37953 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:15:48 +00:00
Sergey Biryukov
f7c680e84f Media: Avoid PHP notices when trying to show a parent post title of an orphaned post type.
Props littler.chicken.
See #37186.

git-svn-id: https://develop.svn.wordpress.org/trunk@37952 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:33:43 +00:00
Dominik Schilling
bc6e877446 Unit Tests: Remove @group foo annotation from Tests_WP_Resource_Hints::test_dns_prefetch_styles().
git-svn-id: https://develop.svn.wordpress.org/trunk@37951 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:28:25 +00:00
Dominik Schilling
f043ad7e02 Unit Tests: Remove an unused parameter from Tests_Ajax_DimComment::test_with_bad_id().
Prevents a "too few arguments" error in PHP 7.1.0.

Fixes #37271.

git-svn-id: https://develop.svn.wordpress.org/trunk@37950 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:07:21 +00:00
Sergey Biryukov
8ae60fd26c Docs: In wp_list_authors(), clarify that include and exclude arguments can also be an array.
Fix duplicated `exclude` argument description.

Props birgire.
Fixes #37239.

git-svn-id: https://develop.svn.wordpress.org/trunk@37949 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 14:33:03 +00:00
Sergey Biryukov
266ffe1f35 I18N: Make the translator comment added in [37858] more explicit and consistent with other similar instances.
See #37147.

git-svn-id: https://develop.svn.wordpress.org/trunk@37948 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 13:09:07 +00:00
Dominik Schilling
222ef34ff2 Themes: After [37287], remove deprecated feature category.
See #33407.

git-svn-id: https://develop.svn.wordpress.org/trunk@37947 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 10:00:23 +00:00
Dominik Schilling
9eb8e29357 Themes: After [37287], add deprecated theme features to the tag list in WP_Theme::translate_header().
Themes which are not yet updated can still have the old tags. This makes sure that these tags are still translated.

See #33407.

git-svn-id: https://develop.svn.wordpress.org/trunk@37946 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 09:57:37 +00:00
Dominik Schilling
ba80e82ffb Themes: Add "Custom Logo" to the list of WordPress theme features.
Props rabmalin.
See #33407.
Fixes #36744.

git-svn-id: https://develop.svn.wordpress.org/trunk@37945 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 09:34:38 +00:00
Gary Pendergast
b3a6124e3d General: Remove the Pragma header from responses.
`Pragma` is supposed to be a request header, but we've been including it in responses since the beginning of time.

This is a relic dating all the way back to b2, probably originally added because Internet Explorer version 5 and earlier didn't understand the `Cache-Control` header in responses, but they did (incorrectly) obey the `Pragma` header.

Internet Explorer 6 and 7 will obey the `Pragma` response header only if no other cache-related response headers are present (in our case, they are always present), and all other browsers ignore the `Pragma` response header.

Props geekysoft.
Fixes #37250.



git-svn-id: https://develop.svn.wordpress.org/trunk@37944 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 04:01:19 +00:00
Rachel Baker
855c081931 REST API: Reverse order of setting sanitization/validation, validating prior to sanitizing.
Fixes mistake in the current behavior, where the sanitization callback ran before the validation callback. Now the validation callback will run before the sanitization.

Props schlessera, rachelbaker.
See #37247.
Fixes #37192.




git-svn-id: https://develop.svn.wordpress.org/trunk@37943 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-02 23:02:45 +00:00
Weston Ruter
c8ebbb3e0d Customize: Reverse order of setting sanitization/validation, validating prior to sanitizing.
Reverses order where sanitization was being applied before validation originally in accordance with REST API logic.

Props westonruter, schlessera.
See #34893.
See #37192.
Fixes #37247.


git-svn-id: https://develop.svn.wordpress.org/trunk@37942 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-02 18:38:07 +00:00
Helen Hou-Sandi
e5e8889f78 Media: Only show parent post titles when the user can read said post.
fixes #37186.


git-svn-id: https://develop.svn.wordpress.org/trunk@37941 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-01 15:06:54 +00:00
Peter Wilson
f71ae5a0bb Users: Check zxcvbn is defined before calling.
Prevents JavaScript errors by checking zxcvbn is defined before calling.

Changes `wp.passwordStrength.meter()` to return `-1` if the strength of the password is unknown.

On the user profile screen, `generatePassword()` checks if the user has entered the password before setting the value of the password input box.

Props peterwilsoncc, adamsilverstein.
Fixes #34905.


git-svn-id: https://develop.svn.wordpress.org/trunk@37940 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-01 12:44:43 +00:00
Sergey Biryukov
84a07b8a90 Docs: Fix typo in WP_Theme_Install_List_Table description.
Props Frozzare.
Fixes #37234.

git-svn-id: https://develop.svn.wordpress.org/trunk@37937 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-01 10:26:03 +00:00
Helen Hou-Sandi
0d18f5136d Meta: Make retrieving registered metadata actually work.
The initial implementation used a `single` argument, which has now been added to the whitelist.

props Faison.
see #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37934 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 21:24:59 +00:00
Helen Hou-Sandi
40d834dfc7 Meta registration: Ensure $args is an array and simplify compat logic.
props ocean90, sc0ttkclark.
see #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37933 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 18:59:49 +00:00
Jeremy Felt
bba8b1271f Docs: Remove duplicate text for is_main_site() parameter.
Props Kenshino.
Fixes #37241.


git-svn-id: https://develop.svn.wordpress.org/trunk@37932 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 17:16:03 +00:00
Drew Jaynes
2220ac9425 Docs: Add changelog entries to the hook doc for the safe_style_css filter denoting recent CSS attribute additions.
* `min-height`, `max-height`, `min-width`, and `max-width` were added in 4.4, see [33739].
* `list-style-type` was added in 4.6, see [37898].

See #35877. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37931 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 17:01:51 +00:00
Jeremy Felt
229e0d5300 Multisite: Simplify logic assigning orderby in get_site_by_path().
Before [37628], there were 3 separate conditions for ordering by domain and/or path in `get_site_by_path()` that each resulted in it's own query. Now that `get_sites()` is used and supports `WP_Site_Query`, this can be simplified.

Props spacedmonkey.
Fixes #37215.


git-svn-id: https://develop.svn.wordpress.org/trunk@37930 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 16:58:06 +00:00
Jeremy Felt
7ddfbf589b Multisite: Revert [37874].
After [37923], `get_blog_details()` contained a now unnecessary attempt at back-compat for objects stored in cache.

See #36717.


git-svn-id: https://develop.svn.wordpress.org/trunk@37929 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 16:39:31 +00:00
Helen Hou-Sandi
4868cc600a Meta: Actually use fallback auth for the previous registration method.
see #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37928 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 16:38:45 +00:00
Andrew Ozz
c2cf25a75a TinyMCE: do not trigger execCommand on loading, it focuses the editor in Chrome.
Fixes #37243.

git-svn-id: https://develop.svn.wordpress.org/trunk@37927 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 15:17:12 +00:00
Dominik Schilling
f3339ff9f0 Post WordPress 4.6 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@37926 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 01:14:52 +00:00
Dominik Schilling
e7871d4633 WordPress 4.6 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@37925 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 01:02:48 +00:00
Helen Hou-Sandi
97d9557b3f Introduce an expanded meta registration API.
`register_meta()` has been altered to accept an array of arguments as the third parameter in order to support its usage beyond XML-RPC, notably in the REST API and other projects that may build on top of meta, such as a potential Fields API. Arguments are whitelisted to reserve the right for core to add more later.

New functions added to complement this expansion are:
* `registered_meta_key_exists()`
* `unregister_meta_key()`
* `get_registered_meta_keys()`
* `get_registered_metadata()`
* A "private" function for the aforementioned whitelisting.

There still need to be lots of tests written for previous and new behaviors, and many things are subject to change. Maybe things will explode. #yolo

props jeremyfelt, ericlewis, sc0ttkclark, helen, rmccue, ocean90, voldemortensen.
see #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37924 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-30 01:01:35 +00:00
Jeremy Felt
04fecbc5aa Multisite: Revert property type changes in WP_Site.
Partial revert of [37657]. Moving existing properties in `WP_Site` from public to private broke backwards compatibility in a pretty severe way. We made an initial attempt to work around this, but due to the variety of possible issues, moving forward does not seem wise.

Fixes #36717.


git-svn-id: https://develop.svn.wordpress.org/trunk@37923 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 22:07:17 +00:00
Dominik Schilling (ocean90)
f30e343b12 Script Loader: Use wp_parse_url() to fix URL parsing failures for PHP < 5.4.7.
See [37920].
See #34292.

git-svn-id: https://develop.svn.wordpress.org/trunk@37922 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 21:04:25 +00:00
Aaron Jorbin
ff05ec3076 Comments: Further improve text of initial comment.
In [37888], the comment text was initially updated, however an opportunity to make the text less trivializing of actions that users will take was missed. To quote Helen Hou-Sandi: "It's important not to trivialize actions that are perfectly reasonable for a user to find tricky (where to go to log in is not exactly intuitive, even with the rewrites we have now)."

The text of the comment now reads:

> Hi, this is a comment.
> To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
> Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.

Some interesting reading on the topic of "Simple" and "Easy" and how they relate to software development can be found at http://andrewspittle.com/2012/01/31/avoiding-easy/ and written by andrewspittle.

Props helen.
Fixes #36702.



git-svn-id: https://develop.svn.wordpress.org/trunk@37921 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 20:49:53 +00:00
Dominik Schilling (ocean90)
92dd472359 Script Loader: Introduce an API to register resource hints.
Resource hints allow browsers to prefetch specific pages or render them in the background to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background.

By default, `wp_resource_hints()` prints hints for "s.w.org" (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts.
Use the `wp_resource_hints` filter to add custom domains and URLs for `dns-prefetch`, `preconnect`, `prefetch` or `prerender`.

Props voldemortensen, swissspidy.
Fixes #34292.

git-svn-id: https://develop.svn.wordpress.org/trunk@37920 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 19:35:27 +00:00
Drew Jaynes
328ca0ed12 Docs: Supplement a changelog entry in the DocBlock for the $id property in WP_Network.
See [37657] for where access was changed from public to private.
See [37870] for where the type was changed from `string` to `int`.

See #36717.


git-svn-id: https://develop.svn.wordpress.org/trunk@37919 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 19:34:04 +00:00
Jeremy Felt
fbe1dc18d0 Multisite: Lazy load extended WP_Site properties when requested.
In the past, `get_blog_details()` has been used to retrieve the `home`, `siteurl`, `blogname`, and `post_count` options for a site. By lazy loading properties in a `WP_Site` object, we can avoid having to use `get_blog_details()` and instead provide the properties as needed.

This introduces the global `site-details` cache group in which standard objects representing the site are stored. This will one day be a replacement for the `blog-details` cache group that is currently used in `get_blog_details()`.

This relies on the `ms_loaded` action introduced in [37916] as properties are not available via `get_option()` until multisite has been fully loaded.

Props flixos90.
Fixes #36935.


git-svn-id: https://develop.svn.wordpress.org/trunk@37918 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 19:31:49 +00:00
Drew Jaynes
194f176c8b Docs: Add changelog entries to the DocBlocks for the $blog_id and $site_id properties in WP_Site.
See [37657] for where access was explicitly changed from public to private.

See #36717.


git-svn-id: https://develop.svn.wordpress.org/trunk@37917 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 19:28:58 +00:00
Jeremy Felt
d014d198c9 Multisite: Fire the ms_loaded action after multisite's bootstrap has finished.
This allows code in `sunrise.php` and in core to know when multisite bootstrap is complete and when the `$current_site` and `$current_blog` globals are populated.

Fixes #37235.
Props flixos90.


git-svn-id: https://develop.svn.wordpress.org/trunk@37916 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 18:59:42 +00:00
Joe McGill
0b4798b2bc Post Thumbnails: Add helper functions for attachment captions.
This adds three new functions for getting/displaying attachment captions:

* `wp_get_attachment_caption` - Retrieves a caption for a specific attachment.
* `get_the_post_thumbnail_caption()` - Returns the post thumbnail caption.
* `the_post_thumbnail_caption()` - Displays the post thumbnail caption.

These are helpful for displaying a caption associated with an image directly
in a template, rather than using the caption shortcode.

This also introduces two new filters:

* `wp_get_attachment_caption` - Filters the value of `wp_get_attachment_caption()`.
* `the_post_thumbnail_caption` - Filters the display of the post thumbnail caption.

`the_post_thumbnail_caption()` is automatically filtered by `wptexturize()`,
`convert_smilies()`, and `convert_chars()` in `wp-includes/default-filters.php`.

Props flixos90, joemcgill.
Fixes #12235.

git-svn-id: https://develop.svn.wordpress.org/trunk@37915 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 17:28:00 +00:00
Dominik Schilling (ocean90)
206380180e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 15:15:40 +00:00
ocean90
3715a70613 Posts: In wp_ajax_inline_save(), do not apply level for non-hierarchical post types.
Props Offereins.
Fixes #35010.

git-svn-id: https://develop.svn.wordpress.org/trunk@37913 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 14:06:01 +00:00
Andrea Fercia
9008030f1e List tables: Make the pagination links and text better responsive.
On small screens, especially with longer translations, the pagination links and
text could break in two lines. This fixes it moving down the text in a new line.

Fixes #33962.

git-svn-id: https://develop.svn.wordpress.org/trunk@37912 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 13:30:00 +00:00
Dominik Schilling (ocean90)
a89fdc3935 Plugins: Return the original value in apply_filters_deprecated() if no filter is registered for the tag.
Props flixos90.
Fixes #10441.

git-svn-id: https://develop.svn.wordpress.org/trunk@37911 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 13:21:24 +00:00