Commit Graph

6061 Commits

Author SHA1 Message Date
Scott Taylor 26875b75a3 Media modules: set `$` to `Backbone.$`, instead of `jQuery`, so fewer globals are imported.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31618 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 04:11:23 +00:00
Boone Gorges 07abae914e In `get_next_comments_link()`, ensure proper pagination when no 'cpage' query var is found.
The 'cpage' query var is only set when using `comments_template()` to display
comments. If displaying them in a context where 'cpage' is not yet set, the
default value should be 1, not 0.

Props MomDad, couturefreak.
Fixes #20319.

git-svn-id: https://develop.svn.wordpress.org/trunk@31617 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 03:56:21 +00:00
Scott Taylor 18af27f550 [31468] reverted this in the 4.1 branch, also reverting in trunk.
See #30725.


git-svn-id: https://develop.svn.wordpress.org/trunk@31616 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 03:49:11 +00:00
Boone Gorges c1b30747d5 Respect `comment_date` and `comment_date_gmt` params in `wp_new_comment()`.
Props solarissmoke, oso96_2000.
Fixes #14279.

git-svn-id: https://develop.svn.wordpress.org/trunk@31615 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 02:59:47 +00:00
Boone Gorges 1ee4d99972 In `wp_get_attachment_url()`, convert to HTTPS when possible.
`wp_get_attachment_url()`, via `wp_upload_dir()`, uses 'siteurl' to generate
attachment URLs. When a site is SSL-optional on the front end - ie, 'siteurl'
is non-HTTPS, but SSL is available - a number of situations can arise where
non-HTTPS attachment URLs cause browser mixed-content warnings:

a) SSL is forced in the admin and `wp_get_attachment_url()` is used to generate the `<img>` tag for an inserted image. In these cases, the post content will contain non-HTTPS. Viewing/editing this post in the Dashboard will result in non-HTTPS images being served in an SSL environment.
b) `wp_get_attachment_url()` is used in a theme to generate an `<img>` `src` attribute on a public page. When viewing that page over SSL, the images will have HTTP URLs.

This changeset switches attachment URLs to HTTPS when it's determined that the
host supports SSL. This happens when 'siteurl' is non-SSL, but the current page
request *is* over SSL, and the host of the current request matches the host of
the URL being generated.

Props joemcgill, boonebgorges.
Fixes #15928.

git-svn-id: https://develop.svn.wordpress.org/trunk@31614 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-05 02:38:59 +00:00
Andrew Ozz bd69086dcb PressThis: remove the extra .length tests for strings from press-this.js.
Props stephdau, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31613 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 21:00:52 +00:00
Andrew Ozz 5433303166 TinyMCE wpView: decode HTML entities before trying to insert view markers. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31612 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 20:34:35 +00:00
Helen Hou-Sandi 6b94742b72 Autocomplete: Update CSS based on both jQuery UI and general visual changes.
props rodrigosprimo for the initial patch.
fixes #31427.


git-svn-id: https://develop.svn.wordpress.org/trunk@31611 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 20:23:29 +00:00
Helen Hou-Sandi c4673e8c79 List tables: Display front and posts page indicators.
fixes #30190.


git-svn-id: https://develop.svn.wordpress.org/trunk@31610 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 19:44:22 +00:00
Andrew Ozz f9a6a7aa56 PressThis:
- Improve handling of the data, both from the bookmarklet and from server-side parsing.
- Standardize on processing the data in PHP and remove duplicate code from JS.
- Improve the bookmarklet code and remove pre-filtering of the data.
Part props stephdau, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31609 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 19:28:53 +00:00
Drew Jaynes 44f0a2976a Correct a typo in the hash notation for `wp_insert_user()`: The argument name should be `$user_registered` not `$date_registered`.
Props floriansimeth.
Fixes #31513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31608 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-04 09:50:34 +00:00
Helen Hou-Sandi 1c9b51a3e6 Remove the once-placeholder-esque "tag hint", which has not worked in quite some time.
It's not particularly useful, and adds visual noise when in place.

props welcher.
fixes #31485.


git-svn-id: https://develop.svn.wordpress.org/trunk@31607 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:52:35 +00:00
Andrew Ozz 6505f70ffb wpLink: fix the logic for prepending `http://` and trim the input.
Props iseulde. See #18149.

git-svn-id: https://develop.svn.wordpress.org/trunk@31606 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:20:35 +00:00
Helen Hou-Sandi dfe924ab99 Fix some inline doc typos that were missed in [31604]. see #25698.
git-svn-id: https://develop.svn.wordpress.org/trunk@31605 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:17:22 +00:00
Helen Hou-Sandi 84ec54e07e Nav menus: Better JS performance on initial load of edit screen.
The accessibility helpers previously processed all items when editing a menu, which was quite slow to the point of being unresponsive for large menus. They now only process items when they are expanded or a user comes near them in some way, such as hover or focus.

Also simplifies a redundant set of click event handlers down to one, which further enhances performance.

props atimmer, sevenspark.
fixes #25698.


git-svn-id: https://develop.svn.wordpress.org/trunk@31604 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 21:13:37 +00:00
Sergey Biryukov d9cd7a141c Themes: Avoid jumping when selecting a feature in the feature filter on Add Themes screen.
props abhishekfdd.
fixes #31497.

git-svn-id: https://develop.svn.wordpress.org/trunk@31603 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 19:46:27 +00:00
Andrew Ozz fc26b777dd wpLink:
- Prepend 'http://' to pasted URLs.
- Do not prepend it when typing an URL.
- Do not prepend it when pasting the same URL for the second time (trying to correct wrong guess).
Props iseulde. Fixes #18149.

git-svn-id: https://develop.svn.wordpress.org/trunk@31602 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-03 00:00:42 +00:00
Andrew Ozz 0b962e2238 Press This:
- Remove classes from suggested HTML for the editor.
- Improve the filter, pass an associative array as param.
- Use <em> instead of <cite>.
Props Michael-Arestad, kraftbj. Fixes #31493.

git-svn-id: https://develop.svn.wordpress.org/trunk@31601 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 23:40:13 +00:00
Drew Jaynes 340fa25658 Properly indent the hash notation of default arguments for `wp_page_menu()`.
See #28841.


git-svn-id: https://develop.svn.wordpress.org/trunk@31600 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 06:15:36 +00:00
Drew Jaynes 7b0e13670d Clean up and refine DocBlocks for a variety of functions and methods in wp-admin/includes/template.php.
* Also documents the default arguments of `wp_terms_checklist()` as a hash notation.

Props ipm-frommen, DrewAPicture.
Fixes #31248.


git-svn-id: https://develop.svn.wordpress.org/trunk@31599 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 06:10:08 +00:00
Andrew Ozz 7c516ad964 PressThis: fix and update buttons styles. Props Michael-Arestad. Fixes #31498.
git-svn-id: https://develop.svn.wordpress.org/trunk@31598 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 01:17:26 +00:00
Andrew Ozz 701d97b6d5 PressThis: make sure buttons.css is loaded before press-this.css. Use (int) $post_ID instead of $post->ID.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31597 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 00:57:34 +00:00
Andrew Ozz 2d19a3b446 PressThis:
- Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them.
- Fix docs typo, props kraftbj.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31596 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 23:28:00 +00:00
Andrew Ozz aee04ab9a3 PressThis:
- Simplify `getSuggestedContent()` and helpers. No need to override the global `data`.
- Replace the `press_this_source_string` and `press_this_source_link` filters with `press_this_suggested_html` that allows filtering of the link and the wrapper HTML tags.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31595 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 22:43:36 +00:00
Andrew Ozz 0778a17875 Add `wp.a11y.speak()` for audible alerts/updates in screen readers. Props afercia, GrahamArmfield (for the idea), iseulde. Fixes #31368.
git-svn-id: https://develop.svn.wordpress.org/trunk@31594 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 19:10:58 +00:00
Drew Jaynes 753b3c6d38 Fix a typo in the `$args` parameter hash notation description for `add_settings_field()`.
See #28975, [31592].


git-svn-id: https://develop.svn.wordpress.org/trunk@31593 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:56:18 +00:00
Drew Jaynes 9013a5d088 Add a hash notation for the optional `$args` parameter in `add_settings_field()`, which includes a description for the new `$class` argument added in [31560].
Also adds a changelog entry to `add_settings_field()` DocBlock for the new `$class` argument.

See [31560].
Fixes #28975.


git-svn-id: https://develop.svn.wordpress.org/trunk@31592 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:52:46 +00:00
Drew Jaynes 79a3048412 Adjust the description for the `$extra_attr` argument in the DocBlocks for `get_avatar_data()` and `get_avatar()`.
See [31561]. See #31469.


git-svn-id: https://develop.svn.wordpress.org/trunk@31591 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:18:42 +00:00
Drew Jaynes c2d677a4a4 Add an entry to the changelog for `wp_get_mime_types()` mentioning that GIMP (xcf) file support was added in 4.2.
See [31578].
Fixes #31146.


git-svn-id: https://develop.svn.wordpress.org/trunk@31590 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-01 07:09:48 +00:00
Andrew Ozz cc3b0374ae PressThis:
- Remove unneeded passing of post formats strings to JS.
- Set the currently selected post format name with jQuery.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31589 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-28 20:07:45 +00:00
Dominik Schilling (ocean90) 91694337df Press This: Backwards compatibility enhancements.
* Add missing actions for printing styles/scripts.
* Since `$hook_suffix` is null, hardcode `press-this.php`.
* Restore body classes, add filter.
* Use boolean value instead of `__return_false()`.
* Use `wp_json_encode()`.
* Update docs for filters in script-loader.php.
* Make `<a href="%1$s">%2$s</a>` not translatable.

see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31588 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-28 10:35:27 +00:00
Gary Pendergast d258490653 When sanitizing a URL to redirect to, UTF-8 characters can be URL encoded, instead of being removed.
While RFC 3986 does not specify which character sets are allowed in URIs, Section 2.5 states that octects matching UTF-8 character encoding should be percent-encoded, then unreserved octets outside of the UTF-8 range should be percent-encoded. As browsers tend to only implement support for UTF-8 in URLs, this change only implements the UTF-8 encoding part. We may revisit the second part if it becomes an issue.

Fixes #31486



git-svn-id: https://develop.svn.wordpress.org/trunk@31587 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-28 02:20:52 +00:00
Andrew Ozz eb28f78cd3 TinyMCE wpView: update the "update" method. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31586 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 22:28:58 +00:00
Scott Taylor dc6246a548 In the `Insert From URL` state of the `Post` frame, add the necessary CSS for focus styles for images.
Example image to insert: https://flic.kr/p/rnsm5M 

See #28820.


git-svn-id: https://develop.svn.wordpress.org/trunk@31585 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 22:12:52 +00:00
Andrew Ozz c904f0f61e PressThis: when there is a protocol mismatch (http vs. https), use server-side media detection instead of submitting a form as it triggers "Unsafe data" warning in some browsers. Props stephdau. Fixes #31468.
git-svn-id: https://develop.svn.wordpress.org/trunk@31584 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 22:05:51 +00:00
Andrew Ozz a6bb04bd41 PressThis: fix selecting a post format (radio buttons) with the keyboard. Props afercia, Michael-Arestad. Fixes #31440.
git-svn-id: https://develop.svn.wordpress.org/trunk@31583 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 21:52:55 +00:00
Scott Taylor a46c2462da When viewing media in List mode, auto-submit the form for attachment filters when the value of a `<select>` changes. This makes it behave similar to Grid mode and "feels" more performant, even though it is a full page load.
Fixes #30333.


git-svn-id: https://develop.svn.wordpress.org/trunk@31582 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 21:26:42 +00:00
Boone Gorges 22179be8ca Introduce 'get_object_terms' filter in `wp_get_object_terms()`.
The existing 'wp_get_object_terms' filter accepts a parameter `$taxonomies`,
which is a list of taxonomy names formatted for direct use in a MySQL IN clause.
This formatting makes it difficult to make use of the taxonomy list in filter
callbacks. However, changing the parameters passed to the existing filter
raises backward compatibility concerns, so we introduce a new filter that
receives a structured `$taxonomy_array` parameter.

We also take this opportunity to correct and clean up some of the documentation
on the 'wp_get_object_terms' filter.

Props postpostmodern, doublesharp, wonderboymusic, nacin.
Fixes #18828.

git-svn-id: https://develop.svn.wordpress.org/trunk@31581 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 20:30:13 +00:00
Andrew Ozz c4adfac1b9 PressThis TinyMCE: set 'directionality' and add the LTR button when in RTL. Fixes #31474.
git-svn-id: https://develop.svn.wordpress.org/trunk@31580 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 20:20:31 +00:00
Dominik Schilling (ocean90) 4e7a4deca6 Build: Let RTLCSS handle swapping the codes for right/left arrows from Dashicons.
Exclude `wp-includes/css/dashicons.css` from core task since we don't want/need a RTL version of it.

fixes #31478.

git-svn-id: https://develop.svn.wordpress.org/trunk@31579 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 20:18:05 +00:00
Scott Taylor 7656a776af Support GIMP files in the Media Library. We already support Photoshop files.
Props MikeHansenMe.
Fixes #31146.


git-svn-id: https://develop.svn.wordpress.org/trunk@31578 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 19:46:19 +00:00
Dominik Schilling (ocean90) 964ba03e97 Press This: RTL improvements.
* Load the RTL version of press-this-editor.css.
* Use more semantic class names for the arrows, Makes it easier to swap the arrows in RTL, see #31478.

see #31474.

git-svn-id: https://develop.svn.wordpress.org/trunk@31577 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 19:43:33 +00:00
Scott Taylor fed3b8fd1f In the `->multi_resize()` method of the `WP_Image_Editor` subclasses, when looping through potential crops, we need to make sure the crop isn't the exact same dimensions as the original image before copying it as a new crop.
This ensures that we don't save multiple copies of the same image.

Supposedly broke in [30639], but this logic was always missing. When I tested reverting [30639], there were still 2 files being created.

Fixes #31296.


git-svn-id: https://develop.svn.wordpress.org/trunk@31576 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 19:37:47 +00:00
Scott Taylor 212d6d8046 Make a new function, `wp_delete_file()`. Use it.
Props scribu, wonderboymusic.
Fixes #17864.


git-svn-id: https://develop.svn.wordpress.org/trunk@31575 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 16:50:14 +00:00
Scott Taylor 65c58832cb Improve `get_media_embedded_in_content()` so that it returns the media it finds in the same order that it appears in the content.
Adds unit test, updates another.

Props kopepasah.
See #26675.


git-svn-id: https://develop.svn.wordpress.org/trunk@31574 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 16:11:00 +00:00
Dominik Schilling (ocean90) cbb528de0f RTL CSS generation: Switch from CSSJanus to RTLCSS.
CSSJanus (introduced in [26107]), we had a great time with you, but sadly you don't like our fancy CSS.

RTLCSS is a framework for converting CSS from LTR to RTL, same as CSSJanus, with support for more CSS properties like `transform`, `transition` or multiple box and text shadows.

Changes:
* devDependencies: Remove `grunt-cssjanus`, add `grunt-rtlcss`.
* RTLCSS uses `/* rtl:ignore */` to ignore a rule, switch existing `/* @noflip */` to the new directive.
* RTLCSS supports the `transform` property, means we can remove some ignore rules.
* RTLCSS supports string maps for custom replace rules. This commit includes a rule `import-rtl-stylesheet` which replaces ".css" with "-rtl.css" in URLs.

Notes for core development:
* The file generation task is still `grunt rtl`.
* If you have used `grunt cssjanus` before, use `grunt rtlcss` now.
* Remember the new directive `/* rtl:ignore */`.

fixes #31332.

Build: https://build.trac.wordpress.org/changeset/31554

git-svn-id: https://develop.svn.wordpress.org/trunk@31573 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 13:40:03 +00:00
Dominik Schilling (ocean90) a4cf473c6d Press This: Add press-this to list of RTL styles.
see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31572 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 11:21:44 +00:00
Dominik Schilling (ocean90) 7d9ed19fa7 Press This: Use boolean value instead of __return_true(). Add missing hook docs.
see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31571 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 11:14:34 +00:00
Dominik Schilling (ocean90) 61dfcc3b4c Customize Widgets: Don't return undefined items in getWidgetFormControls method.
props westonruter.
fixes #31465.

git-svn-id: https://develop.svn.wordpress.org/trunk@31570 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 10:34:42 +00:00
Dominik Schilling (ocean90) aa2da3051a Update jQuery UI to 1.11.3.
Changelog:
* http://jqueryui.com/changelog/1.11.3/
* https://github.com/jquery/jquery-ui/compare/1.11.2...1.11.3

fixes #31473.

git-svn-id: https://develop.svn.wordpress.org/trunk@31569 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 10:20:18 +00:00
Dominik Schilling (ocean90) 5d2c780c95 JSHint: Remove an unused variable.
git-svn-id: https://develop.svn.wordpress.org/trunk@31568 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 09:49:19 +00:00
Dominik Schilling (ocean90) f37973fa64 Update jQuery to 1.11.2.
Changelog:
* https://github.com/jquery/jquery/issues?q=milestone%3A1.11.2%2F2.1.3
* https://github.com/jquery/jquery/compare/1.11.1...1.11.2

props HarishChaudhari.
fixes #31423.

git-svn-id: https://develop.svn.wordpress.org/trunk@31567 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 09:40:55 +00:00
Andrew Ozz 2223b319f9 PressThis: accessibility enhancements:
- Add missing form labels.
- Add some screen-reader-text and aria-hidden attributes.
- Focus handling improvements.
- Change tagcloud-link into a button.
- Add missing ID attribute in tools.php.
Props afercia. Fixes #31449.

git-svn-id: https://develop.svn.wordpress.org/trunk@31566 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 02:49:05 +00:00
Andrew Ozz 161e1a951e PressThis: enable scrollbars in Firefox, remove overflow-x: hidden from the html element. Part props Michael-Arestad. Fixes #31455.
git-svn-id: https://develop.svn.wordpress.org/trunk@31565 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-27 01:54:48 +00:00
Helen Hou-Sandi ea4eb2e66c CSS: Move relevant `#sidemenu` rules into `deprecated-media.css` and remove the cruft.
fixes #27956.


git-svn-id: https://develop.svn.wordpress.org/trunk@31564 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 23:23:39 +00:00
Scott Taylor e2d0ec507b Fix the build file after [31562].
git-svn-id: https://develop.svn.wordpress.org/trunk@31563 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 23:01:55 +00:00
Scott Taylor 41f89a3c14 Persist search terms across grid/list modes:
* In `grid` mode, when the page loads and `s` is in the URL, all attachments are loaded and then the search value is set, which will filter the attachments. If the page loads with the attachments already filtered, the library will have to be requery'd to get the full set, which will require weirder code.
* When a user searches, the mode-switcher link for `list` view is updated dynamically to represent the current `location.href` in the proper `mode=` and `s=` context.

Fixes #30583.


git-svn-id: https://develop.svn.wordpress.org/trunk@31562 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 23:00:20 +00:00
wonderboymusic 2f86fcd9a9 In `get_avatar_data()` and `get_avatar()`, allow `height` and `width` to be specified separately (both default to `size`). Also allow arbitrary attributes on the `<img>` via the `extra_attr` arg.
Props miqrogroove.
See #31469.


git-svn-id: https://develop.svn.wordpress.org/trunk@31561 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 21:16:02 +00:00
Helen Hou-Sandi 195dabc136 Settings API: Allow passing a class to `add_settings_field()` via the `$args` array.
While it's possible to target the wrapper element otherwise (currently a `tr`), this deficiency is made especially noticeable when custom code cannot take advantage of what core is doing, such as with avatars in #30168.

props valendesigns.
fixes #28975. see #30168.


git-svn-id: https://develop.svn.wordpress.org/trunk@31560 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 19:58:50 +00:00
Andrew Ozz 01eb7466ae TinyMCE: wpView improvements: introduce getText() and remove() methods, improved getInstance(), better docs. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31559 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 19:31:27 +00:00
Sergey Biryukov 6e4b84f073 Press This: Use correct URL for update bookmarklet link.
props kraftbj.
fixes #31461.

git-svn-id: https://develop.svn.wordpress.org/trunk@31556 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 08:47:30 +00:00
Scott Taylor d73c180c9d Cleanup the `@property` annotations for `WP_User`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31555 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:53:31 +00:00
Scott Taylor 79706ee8a8 Don't call the size function `count()` as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
Scrutinizer added a Performance label: these are the only violations.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31554 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:47:53 +00:00
Scott Taylor a524e05572 `wp_insert_comment()` should be checking and setting `$compacted`, not the non-existent `$post_data`.
See [31263], #21212.


git-svn-id: https://develop.svn.wordpress.org/trunk@31553 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:37:34 +00:00
Scott Taylor 9145a72789 Add missing access modifiers to `WP_Press_This`.
See #31456.


git-svn-id: https://develop.svn.wordpress.org/trunk@31552 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 05:17:42 +00:00
Drew Jaynes a136a78c1e Ignore the internal-use function `_wp_posts_page_notice()` from parsing for the code reference.
See #17470.


git-svn-id: https://develop.svn.wordpress.org/trunk@31551 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 03:07:26 +00:00
Helen Hou-Sandi f11e86fb83 Hide irrelevant UI and display a message when editing the page for posts.
Users are frequently confused as to why the content they've entered or the page template they've selected doesn't apply for this one page. Showing and saving items that don't do anything hurts trust.

Developers can elect to turn on the editor should they be using it for something. If the content isn't empty, the editor will show so that users still have access to their content.

props alexkingorg for the initial, long-suffering patch.
fixes #17470.


git-svn-id: https://develop.svn.wordpress.org/trunk@31550 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 02:46:40 +00:00
Andrew Ozz 89120dbb92 Press This: fix notices/errors classes. Props michael-arestad. Fixes #31456.
git-svn-id: https://develop.svn.wordpress.org/trunk@31549 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 01:30:06 +00:00
Andrew Ozz fc6ffd2a83 TinyMCE: wpView improvements: remove the (obsolete) get/setViewText methods. Update stopping/pausing of multiple ME media players. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31548 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 00:30:35 +00:00
Andrew Ozz b40bc85424 Press This: add press-this.css to the list of stylesheets that are minified. Bump wp_version. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31547 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 23:48:27 +00:00
Andrew Ozz 3d36949893 TinyMCE: wpView improvements:
- Better structure, simpler "view" registration, better extensibility.
- Better inline documentation.
- Don't show a placeholder for pasted link until we know the link is "embeddable'.
And many more improvements. Props iseulde. See #31412.

git-svn-id: https://develop.svn.wordpress.org/trunk@31546 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 23:12:08 +00:00
Andrew Ozz 2fb11a4ae4 PressThis: go back to loading the minified bookmarklet content with file_get_contents(). Add Grunt task to minify bookmarklet.js on precommit and update it in /src. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31545 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 20:15:46 +00:00
Drew Jaynes 7bb4ab4088 Add a missing file header to wp-includes/class-wp-customize-widgets.php, separate out the class DocBlock for `WP_Customize_Widgets`.
Fixes #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31544 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:19:54 +00:00
Drew Jaynes 6a3e9b10c3 Add a missing file header and clean up class DocBlocks in wp-includes/class-wp-customize-setting.php.
* Adds a file header separate from the `WP_Customize_Setting` class block
* Fixes formatting for the `WP_Customize_Setting`, `WP_Customize_Filter_Setting`, `WP_Customize_Header_Image_Setting`, and `WP_Customize_Background_Image_Setting` class DocBlocks.

See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31543 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:17:25 +00:00
Drew Jaynes 4331386507 Add a missing file header and clean up class DocBlocks in wp-includes/class-wp-customize-section.php.
* Adds a file header separate from the `WP_Customize_Section` class block
* Fixes formatting for the `WP_Customize_Section`, `WP_Customize_Themes_Section`, and `WP_Customize_Sidebar_Section` class DocBlocks.

See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31542 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:12:12 +00:00
Drew Jaynes 0f6ea391ab Add a missing file header to wp-includes/class-wp-customize-panel.php, separate out the class DocBlock for `WP_Customize_Panel`.
See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31541 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:08:48 +00:00
Drew Jaynes 4d549627b4 Add a missing file header to wp-includes/class-wp-customize-manager.php, separate out the class DocBlock for `WP_Customize_Manager`.
See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31540 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 08:06:26 +00:00
Drew Jaynes 575c60ac39 Add a missing file header and clean up class DocBlocks in wp-includes/class-wp-customize-control.php.
* Adds a file header separate from the `WP_Customize_Control` class block
* Fixes formatting for the `WP_Customize_Control`, `WP_Customize_Color_Control`, `WP_Customize_Upload_Control`, `WP_Customize_Image_Control`, `WP_Customize_Background_Image_Control`, `WP_Customize_Theme_Control`, `WP_Customize_New_Theme_Control`, `WP_Widget_Area_Customize_Control`, and `WP_Widget_Form_Customize_Control` class DocBlocks.
* Adds a missing class DocBlock for `WP_Customize_Header_Image_Control`

See #31446.


git-svn-id: https://develop.svn.wordpress.org/trunk@31539 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 07:55:55 +00:00
Andrew Ozz 6dad5d4353 Grunt precommit cleanup. See [31533], [31535].
git-svn-id: https://develop.svn.wordpress.org/trunk@31538 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 04:16:18 +00:00
Andrew Ozz e6bbea8fe7 Press This: JSON encode the URL before appending it to the bookmarklet. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31537 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 03:57:43 +00:00
Mark Jaquith b734341433 Make sure WP_Customize_Manager::theme() never returns null.
* Fixes issue in [31533] that caused unit test fatal error

fixes #31445

git-svn-id: https://develop.svn.wordpress.org/trunk@31536 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 03:53:04 +00:00
Andrew Ozz 578a785440 PressThis:
- Hard-code the minified bookmarklet js. Adding the non-minified bookmarklet to the browser bookmarks bar may have unexpected effect.
- Fix type juggling when checking the bookmarklet version.
Props stephdau, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31535 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 03:02:48 +00:00
Andrew Ozz 2e3afd2760 PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
git-svn-id: https://develop.svn.wordpress.org/trunk@31534 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-25 01:49:26 +00:00
Mark Jaquith f1bb5c2fd7 Add theme browsing and theme switching to the Customizer
* Brings into core the Customizer Theme Switcher feature plugin
* You can now browse, preview, and activate themes right from the Customizer

fixes #31303.
props celloexpressions, afercia, westonruter, folletto, designsimply

git-svn-id: https://develop.svn.wordpress.org/trunk@31533 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 20:30:22 +00:00
Boone Gorges e365b3a364 Add 'orderby=description' support to `get_terms()`.
This fixes an interface inconsistency in edit-tags.php, where Description
appears as a sortable column header.

Props neil_pie.
Fixes #31364.

git-svn-id: https://develop.svn.wordpress.org/trunk@31532 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 16:36:26 +00:00
Drew Jaynes d44289d6de Clarify a wide variety of function, parameter, and return descriptions in DocBlocks throughout wp-includes/media.php.
Props stevegrunwell, DrewAPicture.
Fixes #28408.


git-svn-id: https://develop.svn.wordpress.org/trunk@31530 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 07:41:24 +00:00
Drew Jaynes 4cc15f83cc Add missing function and parameter descriptions to a variety of functions in wp-admin/includes/image-edit.php.
Props NikV for the initial patch.
Fixes #31353.


git-svn-id: https://develop.svn.wordpress.org/trunk@31529 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 06:06:59 +00:00
Dion Hulse ced1630496 Upgrades: Specifically pass the 'version' and 'locale' POST vars through the Core Update FTP credentials form.
This bug was introduced with [30384] / #30245
Fixes #31378 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31527 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-24 03:00:54 +00:00
Andrew Ozz 4ca703e03b Load json2.js only in IE7 and older. Fixes #31276.
git-svn-id: https://develop.svn.wordpress.org/trunk@31526 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 23:03:19 +00:00
Boone Gorges 6bd6da908e Pass taxonomy name, not object, to 'edit_term_taxonomy' and 'edited_term_taxonomy' actions.
These actions are fired in a number of different places, and in some cases
the tax name is passed, while in others the taxonomy object is passed. This
inconsistency made it difficult for plugins to use the `$taxonomy` value.

Props ipm-frommen.
Fixes #30999.

git-svn-id: https://develop.svn.wordpress.org/trunk@31525 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 21:07:34 +00:00
Sergey Biryukov de4a5ada98 Menus: Remove fixed height from `.description-thin` fields.
props tyxla.
fixes #31426.

git-svn-id: https://develop.svn.wordpress.org/trunk@31524 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 20:22:32 +00:00
Sergey Biryukov fe2b449d1c Menus: Prevent checkboxes and radio buttons from being stretched to full width on mobile.
props tyxla.
fixes #31425.

git-svn-id: https://develop.svn.wordpress.org/trunk@31523 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 20:02:58 +00:00
Sergey Biryukov ed1cc5a126 Fix a typo in `wp_update_nav_menu_item` hook documentation.
props tyxla.
fixes #31338.

git-svn-id: https://develop.svn.wordpress.org/trunk@31521 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 16:50:01 +00:00
Sergey Biryukov 569a47075e Add missing labels to Archives and Categories dropdown widgets.
props joedolson, jlevandowski, DrewAPicture, SergeyBiryukov.
fixes #18650.

git-svn-id: https://develop.svn.wordpress.org/trunk@31520 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 16:31:31 +00:00
Sergey Biryukov 3e3eacb4de Themes: Use a darker color for "No themes found" message to increase contrast.
props joedolson.
see #26600.

git-svn-id: https://develop.svn.wordpress.org/trunk@31519 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 15:48:46 +00:00
Jeremy Felt a86c3114ae Add `comment-author-is-site-member` class to comment output for site members.
Add a class to allow targeting of comments made by members of a site rather than users of the entire network.

Props Viper007Bond, MikeHansenMe.

Fixes #24054.


git-svn-id: https://develop.svn.wordpress.org/trunk@31518 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 02:51:49 +00:00
Jeremy Felt ff0b2f7a6f Provide proper label associations and descriptions throughout the network admin
* Add labels previously missing for many inputs throughout the network admin screen.
* Add proper `aria-describedby` attributes to provide better descriptions.
* Wrap grouped inputs with `fieldset` elements.
* Remove now unneeded `title` attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.


git-svn-id: https://develop.svn.wordpress.org/trunk@31517 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 02:28:41 +00:00
Jeremy Felt 4958dd8998 Avoid clearing stored capabilities for a user when removing their built in role in multisite.
Previously, if “No role on this site” was assigned to a user AND that user did not have an empty role array stored for the site, the `$blog_prefix . ‘capabilities’` meta for that user would be deleted completely after changes to the user were saved. Any custom capabilities stored (i.e. `$user->add_role()`) would be removed as well.

This removes the code controlling the old WPMU handling of “no role” and allows custom stored capabilities to remain. Users with no role and custom capabilities will now appear in the users list table with “None” as the role.

In the process we’re able to better clarify the multisite specific pieces that do occur.

Props PeteMall, jeremyfelt.

Fixes #18934.


git-svn-id: https://develop.svn.wordpress.org/trunk@31516 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 01:33:11 +00:00
Jeremy Felt e61b0021bd Use response code 200 when an existing network user joins a site via invitation.
Pass a response code of 200 to `wp_die()` when a user is successfully added to an individual site after using the `/newbloguser/` URL from an invite email. This is a user facing success message.

Props MikeHansenMe.

Fixes #31224.


git-svn-id: https://develop.svn.wordpress.org/trunk@31514 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 22:29:19 +00:00
Andrew Ozz 825fa21a22 Improve table footer tab sequence by moving `<tfoot>` after `<tbody>`. Props afercia, rianrietveld, DrewAPicture. Fixes #30914.
git-svn-id: https://develop.svn.wordpress.org/trunk@31513 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 21:47:30 +00:00
Jeremy Felt 6556f8e112 Do not activate plugins on initial installation in multisite.
Check `is_multisite()` before activating a plugin that has been installed via AJAX. Without this check, the plugin would be automatically activated on the main site of the network.

Props ianmjones.

Fixes #31327.


git-svn-id: https://develop.svn.wordpress.org/trunk@31511 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 21:29:45 +00:00
Sergey Biryukov a468005276 Delegate `focusin` and `focusout` events for row actions to make sure the actions are always revealed on focus.
props afercia.
fixes #29765.

git-svn-id: https://develop.svn.wordpress.org/trunk@31509 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 20:13:31 +00:00
Sergey Biryukov 2dd6c6e696 Dashboard: Add a filter for the query arguments used for the Recent Posts widget.
props danielbachhuber.
fixes #29374.

git-svn-id: https://develop.svn.wordpress.org/trunk@31508 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 19:56:09 +00:00
Sergey Biryukov 5e1241d587 Quick Edit: Make date fields a bit wider.
props Ravindra Pal Singh, janhenckens.
fixes #27912.

git-svn-id: https://develop.svn.wordpress.org/trunk@31507 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 19:23:59 +00:00
SergeyBiryukov d1998396fb Remove untranslatable period from a successful update message in `Bulk_Upgrader_Skin::add_strings()`.
props mako09, DrewAPicture.
fixes #30793.

git-svn-id: https://develop.svn.wordpress.org/trunk@31506 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 17:06:02 +00:00
Dominik Schilling (ocean90) 97bc1c3707 Run Autoprefixer after [31504].
This removes media queries for Opera < 12 and `-ms-animation`/`@-ms-keyframes` which was never (dev versions excluded) supported by IE.

see #31337.

git-svn-id: https://develop.svn.wordpress.org/trunk@31505 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 16:59:41 +00:00
Sergey Biryukov 5006390b0d Use correct closing tag for "Under the Hood" header on About screen.
props tyxla.
fixes #31402.

git-svn-id: https://develop.svn.wordpress.org/trunk@31503 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 16:43:44 +00:00
Dominik Schilling (ocean90) e61db3350d Update POT file for Twenty Fourteen.
props SergeyBiryukov.
see #30972, #30603.

git-svn-id: https://develop.svn.wordpress.org/trunk@31501 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 15:15:11 +00:00
Dominik Schilling (ocean90) e1f97b4b9d Revert [30790] and update POT file for Twenty Fifteen.
see #30972, #30603.

git-svn-id: https://develop.svn.wordpress.org/trunk@31500 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 13:42:46 +00:00
Sergey Biryukov 7f69e6430b Themes: Add feedback for screen readers when search results are changed.
props obenland, joedolson.
see #26600.

git-svn-id: https://develop.svn.wordpress.org/trunk@31497 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 10:14:45 +00:00
Sergey Biryukov 579c7cd3bf Remove a stray single quote in `wp_insert_post()` documentation.
see #31359.

git-svn-id: https://develop.svn.wordpress.org/trunk@31496 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 09:49:38 +00:00
SergeyBiryukov 18ffeef266 Themes: Update the theme count when searching for installed themes, like we do on Add Themes screen.
props afercia.
see #26600.

git-svn-id: https://develop.svn.wordpress.org/trunk@31495 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 09:40:01 +00:00
Scott Taylor 87717c1218 Make sure the `grid` build does not load files from the `views` build.
Fix the errant back-compat assignment for `wp.media.view.Frame`.

See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31494 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 08:47:01 +00:00
Scott Taylor 2b4ce0722a Make sure the `audio-video` build does not load files from the `views` build.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31493 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 08:28:30 +00:00
Scott Taylor d7af3e8bf0 Media JS files:
* specify globals in more files
* add missing `wp.media.*` namespace docs
* add doc blocks to files that had none

See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31492 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 07:24:45 +00:00
Scott Taylor eabe8e42bb Specify globals in media JS files - it is important to denote where we are diverging from dependency injection.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31491 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 06:55:25 +00:00
Scott Taylor b8f24489bd After [30120], in media JS files, move from `@constructor` to `@class` annotations as per JSDoc preferred nomenclature: http://usejsdoc.org/tags-class.html
See #28510, #30193.


git-svn-id: https://develop.svn.wordpress.org/trunk@31490 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 06:27:45 +00:00
Scott Taylor 96f4fc7091 The `grid` build should not load `views/edit-image`, it already exists in the `views` build.
`views/edit-image.js` doesn't need to set a `render` method if it doesn't override its parent.

See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31489 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 06:20:07 +00:00
Scott Taylor 4fe668e53a JSHint after [31487].
git-svn-id: https://develop.svn.wordpress.org/trunk@31488 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 05:56:03 +00:00
Scott Taylor e2bc047528 Restore the changes I made in [31016] for chromeless Vimeo that were missed in [31373].
Make sure that the build file for `grid` doesn't load `views/media-details.js`, it already exists in the `audio-video` build.

See #29267, #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31487 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 05:38:00 +00:00
Drew Jaynes c3cb2ab03b Clarify and complete default argument documentation for `wp_insert_post()`.
Props atimmer, SergeyBiryukov.
Fixes #31359.


git-svn-id: https://develop.svn.wordpress.org/trunk@31486 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 00:55:46 +00:00
Andrew Ozz 928ba6848c TinyMCE wpView: don't insert nested paragraphs when inserting embeddable URLs. Props iseulde, fixes #29526.
git-svn-id: https://develop.svn.wordpress.org/trunk@31485 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-20 23:16:34 +00:00
Sergey Biryukov 34fca78f68 Fix typo in [30760].
props afercia.
fixes #31393.

git-svn-id: https://develop.svn.wordpress.org/trunk@31484 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-20 17:08:32 +00:00
Sergey Biryukov 7d445a3e00 When creating a new user, pasting a password should update the password strength indicator.
props dipesh.kakadiya.
fixes #31226.

git-svn-id: https://develop.svn.wordpress.org/trunk@31483 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-20 13:04:03 +00:00
Drew Jaynes 747f6589a1 Add an entry to the changelog for `twentyfourteen_post_thumbnail()` noting that it was made 'pluggable'.
Fixes #31374.


git-svn-id: https://develop.svn.wordpress.org/trunk@31482 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-20 10:34:59 +00:00
Lance Willett b30afb0349 Twenty Fourteen: make `twentyfourteen_post_thumbnail()` pluggable.
Fixes #31374, props wordpressorru.


git-svn-id: https://develop.svn.wordpress.org/trunk@31481 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-19 19:42:24 +00:00
Sergey Biryukov 45d5c5ddbe Remove `src` from duplicate hook comments for `get_avatar` and `get_avatar_data`.
see #21195.

git-svn-id: https://develop.svn.wordpress.org/trunk@31480 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-19 14:58:40 +00:00
Sergey Biryukov 2175fbb21d Fix a typo in duplicate hook comment.
see [31107], #21195.

git-svn-id: https://develop.svn.wordpress.org/trunk@31479 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-19 14:55:34 +00:00
Boone Gorges 94791cd8f2 Respect 'default_option_' filters during early sanity checks in `add_option()` and `update_option()`.
`add_option()` and `update_option()` both call `get_option()` to compare the
value passed to the function with any existing value for the given option name.
When a `'default_option_'` filter is in place to change the default value of
an option, `add_option()` and `update_option()` ought to check against the
filtered value, rather than a hardcoded `false`, in order to determine whether
a prior value exists.

Props GregLone, tyxla.
Fixes #31047.

git-svn-id: https://develop.svn.wordpress.org/trunk@31473 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-18 19:13:43 +00:00
Boone Gorges 8bf5fce78f Improve 'orderby' syntax for `WP_Comment_Query`.
Since [29027], `WP_Query` has supported an array of values for the `$orderby`
parameter, with field names as array keys and ASC/DESC as the array values.
This changeset introduces the same syntax to `WP_Comment_Query`.

We leverage the new support for multiple ORDER BY clauses to fix a bug that
causes comments to be queried in an indeterminate order when sorting by the
default `comment_date_gmt` and comments share the same value for
`comment_date_gmt`. By always including a `comment_ID` subclause at the end of
the ORDER BY statement, we ensure that comments always have a unique fallback
for sorting.

This changeset also includes improvements paralleling those introduced to
`WP_Query` in [31312] and [31340], which allow `$orderby` to accept array keys
from specific `$meta_query` clauses. This change lets devs sort by multiple
clauses of an associated meta query. See #31045.

Fixes #30478. See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31467 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-16 14:09:40 +00:00
Andrew Ozz 0dd81fe134 TinyMCE wpView: fire `nodeChanged` when an embedded iframe is resized so we can adjust the editor height and other UI components. Props iseulde, fixes #30646.
git-svn-id: https://develop.svn.wordpress.org/trunk@31466 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-15 18:18:06 +00:00
Dominik Schilling (ocean90) 73a85825fb `grunt autoprefixer` for [31333].
see ##29820.

git-svn-id: https://develop.svn.wordpress.org/trunk@31465 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-15 12:17:41 +00:00
Lance Willett 9e3fffdf09 Bundled themes: update CSS rules for `.screen-reader-text` to be consistent with current accessibility guidelines. Fixes #31279.
git-svn-id: https://develop.svn.wordpress.org/trunk@31464 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 17:28:19 +00:00
Drew Jaynes c77e726eef Add inline documentation to clarify the reasoning behind the various conditions that control how WP is loaded.
Props mattheweppelsheimer for the initial patch.
Fixes #30935.


git-svn-id: https://develop.svn.wordpress.org/trunk@31463 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 11:38:41 +00:00
Sergey Biryukov 9b463c5a45 Don't try to read a non-existent Exif:Title tag in `wp_read_image_metadata()`, as it's not a part of the Exif standard.
props tyxla.
fixes #31043.

git-svn-id: https://develop.svn.wordpress.org/trunk@31462 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 09:13:36 +00:00
Drew Jaynes 0653d029f2 Update the descriptions for `transition_post_status()` and the `{$new_stats}_{$post->post_type}` hook with more information about the expected behavior of transitioning post statuses.
In some cases, the values of `$old_status` and `$new_status` may be the same thing before and after a post status is "transitioned". An example of this would be the scenario where a published post is being updated: the status before and after the update both equal 'publish'.

Further, the documentation clarifies that if the intent is to only execute code when initially transitioningto a post status from something else, the 'transition_post_status' hook should be used instead of one of the dynamic hooks to avoid confusion.

Props Idealien for the initial patch.
Fixes #31099.


git-svn-id: https://develop.svn.wordpress.org/trunk@31461 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 09:10:29 +00:00
Sergey Biryukov ef04afe4bf Customizer: Remove margin for hidden controls.
props dlh.
fixes #31330.

git-svn-id: https://develop.svn.wordpress.org/trunk@31460 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 08:45:50 +00:00
Sergey Biryukov 5aac59d178 Replace hardcoded usage of `comment-page` with the comment pagination base.
props johnbillion, SergeyBiryukov, webord.
fixes #18084.

git-svn-id: https://develop.svn.wordpress.org/trunk@31459 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 03:47:02 +00:00
Boone Gorges 4138275df9 More careful type conversion in `WP_Query` `is_*()` methods.
`is_array( 1, '1-foo' )` returns true, which means that `is_page( 1 )`
was returning true when on a page with the slug '1-foo'. We avoid this odd
behavior by casting the queried object ID to a string before testing against
the value passed to the conditional function.

This also helps to avoid a problem where an arbitrary value for `$page` would
cause `is_page( $page )` to return true if the query had been manipulated by
a plugin to show that the current page's ID is 0.

Props boonebgorges, r-a-y, nunomorgadinho, wonderboymusic, clifgriffin.
Fixes #24674.

git-svn-id: https://develop.svn.wordpress.org/trunk@31458 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-14 02:08:46 +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
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
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
Scott Taylor ce08972f6b Export the proper class in `media/views/image-details.js`
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31393 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 23:46:00 +00:00
Boone Gorges d4fbf04671 Don't parse empty 'tax_input' keys in `edit_post()`.
This fixes a bug introduced in [31359] where saving a tax_input that contained
only whitespace would result in a random tag being erroneously added to the
post.

See #30615.

git-svn-id: https://develop.svn.wordpress.org/trunk@31392 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:53:40 +00:00
Gary Pendergast 350cfba6c8 WPDB: When checking to see if we can use utf8mb4, we also need to make sure PHP's MySQL client library is capable of using utf8mb4.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31391 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 22:27:43 +00:00
John Blackbourn fa36ce3810 Revert [30696] pending further investigation.
See #31011, #13071


git-svn-id: https://develop.svn.wordpress.org/trunk@31390 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 21:49:18 +00:00
Aaron Jorbin 5abd98618d Add translator comments for new strings.
These strings were added in [31388].

Props ocean90.
Fixes 26553.



git-svn-id: https://develop.svn.wordpress.org/trunk@31389 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 20:14:19 +00:00
Aaron Jorbin cf09359d34 Use screen reader text instead of a title attribute in comments_popup_link
To better understand screen reader text, check out https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/

Screen Reader text improves the user experience for screen reader users. It provides additional context for links, document forms and other pieces of a page that may exist visually, but are lost when looking only at the html of a site.  This does change the output of comments_popup_link if you don't pass in values for $zero, $one, $more or $none. Theme authors can and should style <code>.screen-reader-text</code> in ways that are recommended in the above article to hide it visually.

Props joedolson
Fixes #26553





git-svn-id: https://develop.svn.wordpress.org/trunk@31388 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 19:26:56 +00:00
Scott Taylor d5888fbc13 After [31386], this needs to happen in `audio-video.manifest.js`.
See #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31387 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:44:32 +00:00
Scott Taylor 7ea1eb7e94 Avoid an IE8 JS error when removing a MediaElement player.
Props afercia.
Fixes #31058.


git-svn-id: https://develop.svn.wordpress.org/trunk@31386 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 18:42:33 +00:00
Scott Taylor a3210a100d Media JS files:
* In media manifests, ditch IIFEs and global injection, these get dynamically scoped via Browserify
* Remove the `debug` option from `browserify:media`
* Add `jshint:media` to `jshint:corejs`
* Add a trailing newline to all new module files

Props iseulde.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31385 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 16:00:44 +00:00
Dominik Schilling (ocean90) da09ac082b Improve the Customize experience on mobile.
Before: https://make.wordpress.org/flow/2015/02/02/a-peek-at-the-customizer-on-an-iphone-6/
After: https://make.wordpress.org/flow/2015/02/03/vizrec-for-28784-improve-the-customize-experience-on-mobile-iphone-6-28784-diff-4-2-alpha-31325/

props celloexpressions.
see #28784.

git-svn-id: https://develop.svn.wordpress.org/trunk@31384 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 12:35:38 +00:00
Dion Hulse 0d65892e29 Updates: Display plugin update rows even for plugins which are not hosted by WordPress.org or the HTTP request times out on.
See #29583.
Fixes #30767 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31382 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 06:31:18 +00:00
Drew Jaynes b325f149d8 Improve return and parameter documentation for `check_admin_referer()`, `check_ajax_referer()`, and `wp_verify_nonce()`.
Also update and clarify docsfor the `check_admin_referer` and `check_ajax_referer` hooks.

Props johnbillion, DrewAPicture.
Fixes #31055.


git-svn-id: https://develop.svn.wordpress.org/trunk@31381 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:56:42 +00:00
Scott Taylor cf8018aef9 Bind `this` at calltime instead of letting `self` spill down into closures.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31380 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:44:39 +00:00
Scott Taylor 1c9874a7f2 Make sure that `media/views.js` doesn't load Models that already exist in `media/models.js`.
See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31379 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 04:13:38 +00:00
Gary Pendergast b136100978 WPDB: The `mysqli_query()` call in `wpdb::set_charset()` had the parameters the wrong way around.
git-svn-id: https://develop.svn.wordpress.org/trunk@31374 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 01:25:47 +00:00
Scott Taylor 4eb88c3d15 Split the media JS files into modules:
* Add a new folder in `wp-includes/js`, `media`
* Create manifest files for `views`, `models`, `grid`, and `audio-video`
* Make `browserify` an `npm` dependency
* Add Grunt tasks for `browserify` and `uglify:media` on `build` and `watch`
* Update the paths loaded for media files in `script-loader`
* All new files were created using `svn cp` from their original location

Please run `npm install`. While developing media JS, you must run `grunt watch`.

See #28510.


git-svn-id: https://develop.svn.wordpress.org/trunk@31373 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:42:28 +00:00
Gary Pendergast afdd7da11b WPDB: When we're removing invalid text text from strings with multiple different character sets, `wpdb::strip_invalid_text()` wasn't correctly switching connection character sets.
Fixes #31262



git-svn-id: https://develop.svn.wordpress.org/trunk@31371 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-09 00:33:32 +00:00
Dominik Schilling (ocean90) 2518bbbb1f Customizer: Introduce an API to create WP_Customize_Settings for dynamically-created settings.
* Introduce WP_Customize_Manager::add_dynamic_settings() to register dynamically-created settings.
* Introduce `customize_dynamic_setting_args` filter to pass an array of args to a dynamic setting's constructor.
* Add unit tests for WP_Customize_Manager and WP_Customize_Widgets.
* See WP_Customize_Widgets as an example.

props westonruter.
fixes #30936.

git-svn-id: https://develop.svn.wordpress.org/trunk@31370 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 23:10:05 +00:00
Boone Gorges 76b84b9231 Add `orderby=meta_value_num` support to `WP_User_Query`.
Props tyxla, genkisan.
Fixes #27887.

git-svn-id: https://develop.svn.wordpress.org/trunk@31369 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 16:58:14 +00:00
Sergey Biryukov ad90613648 Use a positive wording for translations update notice.
props DrewAPicture, siobhan, netweb.
fixes #28199.

git-svn-id: https://develop.svn.wordpress.org/trunk@31368 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 04:08:50 +00:00
Boone Gorges b121105f26 Late escaping in `get_terms()` and `WP_Tax_Query`.
Props vortfu, dd32.

git-svn-id: https://develop.svn.wordpress.org/trunk@31367 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-08 01:58:51 +00:00
Boone Gorges bdda122e7f In `WP_Query::get_queried_object()`, avoid PHP notices when `is_tax` is paired with an empty `tax_query`.
It's possible to have an empty `tax_query` and `is_tax=true` when the initial
query contains a taxonomy var (and is processed as such during
`WP_Query::parse_query()`) but the taxonomy var is unset during a 'parse_query'
callback. While this kind of behavior is not necessarily something we need to
support, we should continue to avoid PHP notices in such cases, as we did prior
to WP 4.1.

Fixes #31246.

git-svn-id: https://develop.svn.wordpress.org/trunk@31366 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 19:49:17 +00:00
Sergey Biryukov fa1a382dff Remove unnecessary `array_shift()` usage in `get_terms()` for better performance.
props bswatson, VolodymyrC.
fixes #31182.

git-svn-id: https://develop.svn.wordpress.org/trunk@31365 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 19:44:13 +00:00
Sergey Biryukov 692f79087f In `_wp_menu_output()`, `$submenu_items` is an array and should be initialized as such.
props ipm-frommen.
fixes #31257.

git-svn-id: https://develop.svn.wordpress.org/trunk@31364 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 17:56:18 +00:00
Sergey Biryukov 8aac5ba74e Avoid inadvertent stomping of the original `$args` parameter passed to `plugins_api_result` and `themes_api_result` filters in `plugins_api()` and `themes_api()`, respectively.
Fixes a regression introduced in [25956].

props Corphi, obenland.
fixes #29079.

git-svn-id: https://develop.svn.wordpress.org/trunk@31363 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-07 06:20:42 +00:00
Andrew Ozz 24a33d8181 TinyMCE: ensure the image toolbar stays visible when the image is much wider than the editor. Props iseulde, fixes #20696 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@31362 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 22:59:35 +00:00
Andrew Ozz 329115bf05 Editor: prevent errors in editor-expand when the Text editor is not used. Props iseulde, fixes #31163.
git-svn-id: https://develop.svn.wordpress.org/trunk@31361 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 22:24:43 +00:00
Dominik Schilling (ocean90) 1b6e82cf98 Customizer: Add changelog entry for the 'default' parameter added in [31329].
props westonruter.
see #30988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31360 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 21:13:50 +00:00
Boone Gorges fb4048fcdd Parse non-hierarchical tag input into term IDs before sending to `wp_insert_post()`.
When editing a post, non-hierarchical taxonomy terms are sent as the
comma-separated list entered into the tax_input metabox. Passing these
values directly to `wp_update_post()` meant that they were interpreted as
term slugs rather than term names, causing mismatches when a typed string
matched the slug of one term and the name of a different term. We fix the
problem by preprocessing tax_input data sent from post.php, converting it to
unambiguous term_ids before saving.

Props boonebgorges, ArminBraun.
Fixes #30615.

git-svn-id: https://develop.svn.wordpress.org/trunk@31359 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 20:31:37 +00:00
Gary Pendergast 8f02177c40 Upgrades: wp_usermeta is a global table in multisite, so it should only be upgraded by the single site routines when we're not in a multisite install.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31358 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 13:40:17 +00:00
Drew Jaynes 88b0b7d9da Update the DocBlock for `wp_dropdown_categories()` to reflect that the entire `$args` parameter array is optional instead of individual arugments.
See #30306.


git-svn-id: https://develop.svn.wordpress.org/trunk@31357 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 09:03:26 +00:00
Drew Jaynes 475337bd97 Adjust the DocBlock for `wp_dropdown_pages()` to mark the entire `$args` parameter array as optional instead of each individual argument.
See #12494.


git-svn-id: https://develop.svn.wordpress.org/trunk@31356 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:55:52 +00:00
Drew Jaynes 53209f19b3 Add documentation for the `$value_field` argument added to `wp_dropdown_pages()` in [31338].
See #12494.


git-svn-id: https://develop.svn.wordpress.org/trunk@31355 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:50:20 +00:00
Gary Pendergast 029f637aa5 Upgrades: When upgrading a table to utf8mb4, we should run the `ALTER TABLE` query, even if it doesn't have any text columns. This will update the table's default character set, so that any text columns added in the future will have the expected character set.
See #21212 



git-svn-id: https://develop.svn.wordpress.org/trunk@31354 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:58:15 +00:00
Gary Pendergast 8004484a6b Upgrades: When deciding if we can upgrade a table to utf8mb4, make sure we're checking the character set, not the collation.
Bump the DB version as well, as the update in [31349] wouldn't have triggered for anyone who tried it.

See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31351 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 05:25:22 +00:00
Gary Pendergast 9f6ddf8944 WPDB: If a site is using the `utf8` charset, and their version of MySQL supports `utf8mb4`, auto-upgrade them to `utf8mb4`.
This patch also resizes some indexes, to allow for the 767 byte index size limit in standard MySQL installs.

See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31349 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 04:50:19 +00:00
Andrew Nacin 43789f822a Remove leading space from the definition of a global cache group.
This only applied in a rare situation during the switch_to_blog() process where no global groups were currently defined.

see #31243.


git-svn-id: https://develop.svn.wordpress.org/trunk@31348 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 03:25:32 +00:00
Andrew Nacin 30e57104e6 Add useremail and userslugs as global cache groups. fixes #31243.
git-svn-id: https://develop.svn.wordpress.org/trunk@31347 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 03:23:46 +00:00
Boone Gorges 41db99c31a Use field-specific sanitization in `WP_Tax_Query::transform_query()`.
When terms are entered into the database, term fields are sanitized with
`sanitize_term_field()`. To ensure that the `SELECT ... WHERE` queries in
`WP_Tax_Query::transform_query()` are not broken by overzealous sanitization,
`sanitize_term_field()` should be used in that case as well. This fixes a bug
where a tax_query using 'field=name' would fail if the 'terms' parameter
contained characters (like spaces) that were improperly removed by
`sanitize_title_for_query()`.

Fixes #27810.

git-svn-id: https://develop.svn.wordpress.org/trunk@31346 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 02:01:24 +00:00
Gary Pendergast ba2beaf37d Shiny Updates: Fix a PHP warning when installing new plugins.
Props lgladdy for the initial patch.

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31345 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 00:33:49 +00:00
Helen Hou-Sandi cdbea14c09 MCE views: Always refresh the view after updating a gallery.
This allows things like caption changes to be synced, as they are tied to the attachment and not the shortcode.

props iseulde.
fixes #31239.


git-svn-id: https://develop.svn.wordpress.org/trunk@31343 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 20:11:04 +00:00
Boone Gorges cc6ef67db7 jshint fixes for shiny updates JS.
As introduced in [31333].

Props iseulde.
See #29820.

git-svn-id: https://develop.svn.wordpress.org/trunk@31341 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:51:42 +00:00
Boone Gorges 0f28011bcf Modify `meta_query orderby syntax to use array keys as clause "handles".
The implementation of `meta_query` orderby introduced in [31312] put clause
identifiers into a 'name' parameter of the clause. For greater clarity, this
changeset updates the syntax to use the associative array key used when
defining `meta_query` parameters, instead of the 'name' parameter.

Props Funkatronic, DrewAPicture.
Fixes #31045.

git-svn-id: https://develop.svn.wordpress.org/trunk@31340 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:37:47 +00:00
Boone Gorges c9c9af5df8 Introduce `'value_field'` parameter to `wp_dropdown_pages()`.
This parameter allows developers to choose the post field that will be used to
fill in the 'option' attribute of the generated dropdown markup.

See [31006] #30306 for a parallel enhancement in `wp_dropdown_categories()`.

Props jfarthing84.
Fixes #12494.

git-svn-id: https://develop.svn.wordpress.org/trunk@31338 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:03:52 +00:00
Boone Gorges a710c0451c Use hash notation for `wp_dropdown_pages()` argument documentation.
git-svn-id: https://develop.svn.wordpress.org/trunk@31337 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 18:59:22 +00:00
Drew Jaynes ffb4ec93b8 Clarify inline documentation for `WP_Date_Query` to better explain the relationship between an individual clause's 'compare' argument and various integer-based date arguments.
If the 'compare' argument equals 'IN' or 'NOT IN', arrays of any number of specific, valid values are accepted and simply considered based on the value of 'operator' (OR or AND). If the 'compare' argument is a range such as 'BETWEEN' or 'NOT BETWEEN', arrays of only two valid values are accepted.
 
Props boonebgorges.
Fixes #31036.


git-svn-id: https://develop.svn.wordpress.org/trunk@31336 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:16:35 +00:00
Gary Pendergast 4c49dd62e3 Shiny Updates: If the current user is not allowed to install/update plugins, we should return a JSON error, so it can be used by the JS handlers.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31335 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:15:59 +00:00
Gary Pendergast d0379f4fb7 Shiny Updates: Add capability checks to the ajax callbacks, to ensure the current user is allowed to install/update plugins.
See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31334 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 06:04:32 +00:00
Gary Pendergast 748d595b5c Shiny Updates: Add ajax-y updates to the plugin list page, and ajax-y updates and installs to the plugin card page.
This also includes JS architecture that can be expanded to support theme, core and language pack updates.

Props pento, ericlewis, lgladdy, adamsilverstein, DrewAPicture

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31333 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 04:18:57 +00:00
Andrew Ozz f205eb63d0 Fix displaying long tag names in the Tags postbox. Props trishasalas, carolinegeven, iseulde. Fixes #18946.
git-svn-id: https://develop.svn.wordpress.org/trunk@31332 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-04 22:14:31 +00:00
Helen Hou-Sandi 8d0b774e65 Accessibility: remove remaining instances of accesskey.
It is a poorly implemented browser feature, not particularly discoverable, and causes more problems than it helps solve.

props afercia.
fixes #29715.


git-svn-id: https://develop.svn.wordpress.org/trunk@31331 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-04 03:45:24 +00:00
Helen Hou-Sandi fe32344314 Themes: Allow version number in the overlay to be selected.
props johneckman.
fixes #31205.


git-svn-id: https://develop.svn.wordpress.org/trunk@31330 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 15:14:59 +00:00
Dominik Schilling (ocean90) 8bc9ad756d Ensure that `WP_Customize_Setting::value()` returns default value for setting if not dirty.
There was regression introduced by #28580 where only changed (dirty) settings now are POST'ed to the Customizer preview.

* Allow WP_Customize_Manager::post_value() to accept a second $default argument.
* Introduce WP_Customize_Manager::unsanitized_post_values() for accessing previously-private member variable _post_values.
* Do require_once instead of require for Customizer classes.
* Add unit tests for WP_Customize_Manager and WP_Customize_Setting.

props westonruter.
fixes #30988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31329 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 10:14:28 +00:00
Dion Hulse 5811dcbcd6 Remove an extra indent from most of media-new.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@31328 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 07:46:21 +00:00
Dion Hulse 4ed2d89ced WP_Upgrader: Remove references to non-existant variables that have never existed.
Props jdgrimes. Fixes  #29087


git-svn-id: https://develop.svn.wordpress.org/trunk@31327 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:17:05 +00:00
dd32 5f13a0e3e5 Remove an unused parameter on install_plugins_upload().
Props michalzuber. Fixes #28964


git-svn-id: https://develop.svn.wordpress.org/trunk@31326 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:13:02 +00:00
Sergey Biryukov 4aada86274 Add `'widget_nav_menu_args'` filter for Custom Menu widget arguments.
props cyman, DrewAPicture.
fixes #29463.

git-svn-id: https://develop.svn.wordpress.org/trunk@31325 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 02:55:21 +00:00
Sergey Biryukov 5e9b89bf59 When using WP_Query's `'fields' => 'ids'` (or `'fields' => 'id=>parent'`), make sure the returned result is always an array of integers.
fixes #31194. see #27252.

git-svn-id: https://develop.svn.wordpress.org/trunk@31324 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 02:28:52 +00:00
Boone Gorges f05f380638 In `get_sample_permalink()`, override 'future' status before generating permalink.
In [31114], `get_permalink()` was modified to prevent pretty permalinks from
being generated for posts with the 'future' post status. This inadvertently
broke the pretty permalink preview for scheduled posts. The fix is to include
the 'future' status in the list of statuses that `get_sample_permalink()` fakes
as 'publish' before it fetches a permalink.

Props DrewAPicture.
Fixes #30910.

git-svn-id: https://develop.svn.wordpress.org/trunk@31323 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-02 16:49:23 +00:00
Dominik Schilling (ocean90) c61dff8c21 jQuery UI: Add `jquery-ui-core` as dependency for `jquery-ui-progressbar`.
props tyxla.
fixes #31208.

git-svn-id: https://develop.svn.wordpress.org/trunk@31322 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-02 10:33:49 +00:00
Boone Gorges 5f6ea53e86 When querying for a specific post, allow posts with a non-public status to be returned as long as that status is specified.
This makes it possible to, for example, retrieve a specific post using the
`p` parameter of `WP_Query`, even if the post is in the Trash, by including
the `post_status=trash` parameter.

Props ebinnion.
Fixes #29167.

git-svn-id: https://develop.svn.wordpress.org/trunk@31321 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-01 20:25:42 +00:00
Sergey Biryukov 09d350b835 Menus: Don't display "Move" text without direction if there is only one menu item.
props kucrut for initial patch.
fixes #30765.

git-svn-id: https://develop.svn.wordpress.org/trunk@31320 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-01 05:28:29 +00:00
Sergey Biryukov 54dedff5c7 Reduce the size of the WordPress logo tap target on log in screen on mobile, to avoid unexpected redirect away from the form.
props mzak.
fixes #31185.

git-svn-id: https://develop.svn.wordpress.org/trunk@31318 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 21:31:26 +00:00
Sergey Biryukov cec05576e4 Themes: Remove a Chrome workaround that causes theme screenshots to look too crisp and no longer appears to be relevant.
props mzak.
fixes #26584.

git-svn-id: https://develop.svn.wordpress.org/trunk@31316 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 20:38:08 +00:00
Boone Gorges 32f2903248 Prevent terms in a show_in_quick_edit=false taxonomy from being updated by a faked AJAX request.
The UI for these taxonomies was hidden in [31308], but it remained possible to
send a direct POST request to the `inline-edit` endpoint to bypass the
restriction. The current changeset fixes this.

Props meloniq.
Fixes #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31313 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 19:37:12 +00:00
Boone Gorges 2d737796d2 Improve support for ordering `WP_Query` results by postmeta.
`WP_Meta_Query` clauses now support a 'name' parameter. When building a
`WP_Query` object, the value of 'orderby' can reference this 'name', so that
it's possible to order by any clause in a meta_query, not just the first one
(as when using 'orderby=meta_value'). This improvement also makes it possible
to order by multiple meta query clauses (or by any other eligible field plus
a meta query clause), using the array syntax for 'orderby' introduced in [29027].

Props Funkatronic, boonebgorges.
Fixes #31045.

git-svn-id: https://develop.svn.wordpress.org/trunk@31312 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 15:47:51 +00:00
Drew Jaynes (DrewAPicture) 0c783b06fb Add changelog entries to the `post_gallery` and `post_playlist` hook docs for the `$instance` variable that was added in [31304].
Props ninnypants for the initial patch.
Fixes #31151.


git-svn-id: https://develop.svn.wordpress.org/trunk@31309 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 00:32:09 +00:00
Boone Gorges c7320c5a86 Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases.
See #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31308 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:28:27 +00:00
Boone Gorges 057c428346 Introduce 'show_in_quick_edit' parameter for `register_taxonomy()`.
Setting 'show_in_quick_edit' to false when registering a custom taxonomy will
hide the taxonomy when editing posts using Quick Edit.

The new 'quick_edit_show_taxonomy' filter allows this behavior to be filtered
on a finer scale, as when you want a given taxonomy to be hidden for one post
type but not for others.

Props hlashbrooke.
Fixes #26948.

git-svn-id: https://develop.svn.wordpress.org/trunk@31307 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 19:17:51 +00:00
Sergey Biryukov 14c3492ff5 Rename `$instances` to `$instance` in wp_audio_shortcode() and wp_video_shortcode() for consistency with gallery_shortcode() and wp_playlist_shortcode().
see #31151.

git-svn-id: https://develop.svn.wordpress.org/trunk@31305 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 16:05:52 +00:00
Sergey Biryukov 45b0513c1b Pass the current shortcode instance ID to `post_gallery` and `post_playlist` filters.
props justincwatt.
fixes #31151.

git-svn-id: https://develop.svn.wordpress.org/trunk@31304 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 16:01:25 +00:00
Sergey Biryukov e725b36d1e Don't display the Help tab reference in Page Attributes meta box if Help tab was removed.
props bananastalktome.
fixes #31164.

git-svn-id: https://develop.svn.wordpress.org/trunk@31303 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 15:33:33 +00:00
Boone Gorges 9cb4d3c1ce In `get_adjacent_post()`, return private post if the current user has the capacity to read it.
This mirrors the check that happens post-query in `WP_Query`. See #30911.

Props bswatson.
Fixes #30287.

git-svn-id: https://develop.svn.wordpress.org/trunk@31302 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-30 02:19:46 +00:00
Sergey Biryukov dcb278f006 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.

git-svn-id: https://develop.svn.wordpress.org/trunk@31300 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 21:14:54 +00:00
Dominik Schilling (ocean90) 4914b74403 Add New User: Remove trailing whitespace from button labels.
fixes #31175.

git-svn-id: https://develop.svn.wordpress.org/trunk@31298 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 14:53:05 +00:00
Drew Jaynes (DrewAPicture) 8821a5531c Avoid confusion by clarifying an inline comment on logic for performing multisite upgrades.
Props dmchale for the initial patch.
Fixes #30837.


git-svn-id: https://develop.svn.wordpress.org/trunk@31297 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:52:55 +00:00
Drew Jaynes (DrewAPicture) 08409d8d33 Fix an inaccurate summary and description in the DocBlock for `wpmu_validate_user_signup()`.
Props ericlewis.
Fixes #31141.


git-svn-id: https://develop.svn.wordpress.org/trunk@31296 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:45:59 +00:00
Drew Jaynes (DrewAPicture) 18a86bf33a Add a missing description for the `$_diff_threshold` property in the `WP_Text_Diff_Renderer_Table` class.
Props ipm-frommen.
Fixes #31008.


git-svn-id: https://develop.svn.wordpress.org/trunk@31295 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:36:00 +00:00
Drew Jaynes (DrewAPicture) b98c2c0bb3 Add missing descriptions to the `$blogid` and `$siteid` property DocBlocks in the `wpdb` class.
Props ipm-frommen.
See #31008.


git-svn-id: https://develop.svn.wordpress.org/trunk@31294 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:34:52 +00:00
Drew Jaynes (DrewAPicture) f4e2134bee Add missing descriptions to the DocBlocks for various functions in wp-admin/includes/taxonomy.php.
Also adds a few missing parameter descriptions.

Props ipm-frommen.
See #31008.


git-svn-id: https://develop.svn.wordpress.org/trunk@31293 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:33:02 +00:00
Drew Jaynes (DrewAPicture) 18280eb766 Add missing descriptions to the DocBlocks for various functions in wp-admin/includes/post.php
Props ipm-frommen.
See #31008.


git-svn-id: https://develop.svn.wordpress.org/trunk@31292 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 11:31:44 +00:00
Andrew Nacin 65cdb41d31 Update readme recommendations. fixes #31173.
git-svn-id: https://develop.svn.wordpress.org/trunk@31291 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 05:09:33 +00:00
Dion Hulse db3a49f8c8 HTTP API: Fix an issue where the `limit_response_size` parameter wasn't working properly with large documents and the cURL transport.
Fixes #31172


git-svn-id: https://develop.svn.wordpress.org/trunk@31290 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 03:57:42 +00:00
Boone Gorges fb447fb687 When updating the name a hierarchical term with Quick Edit, update the corresponding option in the Parent dropdown.
Props garyc40, rmarks.
Fixes #14565.

git-svn-id: https://develop.svn.wordpress.org/trunk@31288 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 01:52:47 +00:00
Boone Gorges 2e848072eb Don't use term IDs for array indexes when caching object terms.
Uncached results pulled from `wp_get_object_terms()` are zero-indexed (ie 0,
1, 2...). As a result, `get_the_terms()` was returning a strictly different
array when pulling from the cache and when the cache was empty.

Props joshlevinson.
Fixes #31086.

git-svn-id: https://develop.svn.wordpress.org/trunk@31287 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-28 20:42:25 +00:00
Boone Gorges 9d3a6394fb Ensure that 'hierarchical' is respected in `get_terms()` when multiple taxonomies are passed.
Previously, attempts to descend the family tree of each term were done using
the first taxonomy in the `$taxonomies` array, with the result that terms not
belonging to that taxonomy were not found and their children not properly
parsed. We fix this bug by fetching each term's taxonomy with the SQL query,
and then using that taxonomy to get the correct children for each term.

Fixes #31118.

git-svn-id: https://develop.svn.wordpress.org/trunk@31285 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-26 19:03:09 +00:00
Boone Gorges fed49d226c Ensure that 'pad_counts' is not discarded when the first of multiple taxonomies passed to `get_terms()` is non-hierarchical.
See #31118.

git-svn-id: https://develop.svn.wordpress.org/trunk@31284 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-26 18:08:59 +00:00
Lance Willett 081cff1a6e Twenty Fifteen: move RSS icon style rule lower to prevent it from being overridden by other social icon rules.
Props iamtakashi, fixes #31129.


git-svn-id: https://develop.svn.wordpress.org/trunk@31283 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-26 15:57:22 +00:00
Sergey Biryukov 7f6d638bd9 Remove duplicate label on installation screen.
props Ankit K Gupta.
fixes #31131.

git-svn-id: https://develop.svn.wordpress.org/trunk@31282 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-25 19:38:04 +00:00
Sergey Biryukov cbd723b2b2 Revert [30027]. These fields are already sufficiently labeled; duplicate labels can lead to confused behavior for screen readers.
see #31117, #30101.

git-svn-id: https://develop.svn.wordpress.org/trunk@31281 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-25 18:32:56 +00:00
Sergey Biryukov da8f896426 Fix a typo in [30138].
see #30224.

git-svn-id: https://develop.svn.wordpress.org/trunk@31279 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-25 09:47:05 +00:00
Andrew Nacin 4857c6996c Allow $autoload in add_option() to receive false.
props dllh.
fixes #31119.


git-svn-id: https://develop.svn.wordpress.org/trunk@31278 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-25 07:50:31 +00:00
Boone Gorges 5bcee9e939 In `get_terms()`, check hierarchy for all `$taxonomies` before bailing early from 'parent' or 'child_of'.
There is a pre-check in `get_terms()` that prevents an unnecessary database
query if the 'parent' or 'child_of' parameter is not found in the cached term
hierarchy (since a term without an index in the hierarchy cache has no
descendants). Previously, only the first item in the `$taxonomies` array was
being checked, with the result that an empty array was being erroneously
returned in cases where the 'parent' or 'child_of' term is in a subsequent
taxonomy.

See #31118.

git-svn-id: https://develop.svn.wordpress.org/trunk@31276 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-25 02:45:11 +00:00
Boone Gorges c67e5da8c9 Introduce 'childless' parameter to `get_terms()`.
This new parameter allows developers to limit queried terms to terminal nodes -
ie, those without any descendants.

As part of the improvement, some internal logic in `get_terms()` has been
consolidated. Parameters that resolve to a NOT IN clause containing term IDs
('exclude', 'exclude_tree', and 'childless') are now parsed into a single
"exclusions" array before the SQL clause is generated.

Props theMikeD, horike.
Fixes #29839.

git-svn-id: https://develop.svn.wordpress.org/trunk@31275 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-24 18:47:30 +00:00
Sergey Biryukov 02b3356750 Quick Edit: Don't save the post if Enter is pressed on the Cancel link.
props afercia.
fixes #30345.

git-svn-id: https://develop.svn.wordpress.org/trunk@31274 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-24 15:06:43 +00:00
Dominik Schilling (ocean90) 1b05ffa982 jQuery UI: Add missing dependencies for puff and scale effects.
see #31113.

git-svn-id: https://develop.svn.wordpress.org/trunk@31273 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-23 22:38:08 +00:00
Aaron Jorbin 7cbe92b0ea Improve accessibility of nav menu locations form.
A couple of small tweaks to the nav menu locations form that make it friendlier to assistive technology.  These include:
 * labels for selects
 * better context for the "Edit" link.  We hide "edit" from screen readers and instead give them a phrase with context since they may not be able to take advantage of the visual context

Additionally, there are some minor css tweaks to improve the visual alignment of the rows.
We also remove duplicate IDs and use classes instead.

Props afercia.
fixes #31090.



git-svn-id: https://develop.svn.wordpress.org/trunk@31272 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-23 18:17:25 +00:00
Boone Gorges 8ec0792557 Add classes for custom taxonomy terms in `get_post_class()`.
Props sillybean.
Fixes #16223.

git-svn-id: https://develop.svn.wordpress.org/trunk@31271 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-23 15:40:31 +00:00
Boone Gorges 10d3b42211 Introduce 'parent' parameter to `wp_get_object_terms()`.
Props mikeschinkel.
Fixes #15675.

git-svn-id: https://develop.svn.wordpress.org/trunk@31270 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-23 14:56:04 +00:00
Sergey Biryukov 63ee24789d In wp_update_user(), make sure $userdata['ID'] is set before using it.
props tyxla.
fixes #31097.

git-svn-id: https://develop.svn.wordpress.org/trunk@31269 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-22 14:45:14 +00:00
Lance Willett 6629feb738 Twenty Eleven and Twelve: fill in support for `screen-reader-text` class.
Props obenland, fixes #31095.

git-svn-id: https://develop.svn.wordpress.org/trunk@31268 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-22 00:55:09 +00:00
Lance Willett 2487709643 Twenty Eleven: fix indentation (spaces to tabs). See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31267 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-22 00:43:31 +00:00
Lance Willett 9ad83781e9 Twenty Ten: fix escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31266 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-22 00:41:58 +00:00
Lance Willett 31b1340825 Twenty Eleven: fix escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31265 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-22 00:41:36 +00:00
Gary Pendergast cd02bd0702 Comments: When a comment fails to insert, remove invalid characters from the email and URL fields, too.
See [31263], #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31264 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-21 23:17:08 +00:00
Gary Pendergast b2642750ce Comments: When a comment fails to insert, remove any invalid characters and try again.
See #21212



git-svn-id: https://develop.svn.wordpress.org/trunk@31263 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-21 23:03:48 +00:00
Lance Willett 260f671a95 Twenty Twelve: more fixes for escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31262 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-21 21:05:29 +00:00
Lance Willett 74eb9552bf Twenty Twelve: fix escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31261 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-21 20:59:15 +00:00
Lance Willett 95f9a91d86 Twenty Thirteen: fix escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31260 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-21 20:48:45 +00:00
Dominik Schilling (ocean90) 3089d4d6cc Customizer: Hide the reorder-widgets button when a widget area is empty.
props celloexpressions.
fixes #27787.

git-svn-id: https://develop.svn.wordpress.org/trunk@31255 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-20 22:44:11 +00:00
Dominik Schilling (ocean90) e3bff14246 Customizer: If there's only one available sidebar, hide the move-widget button.
props celloexpressions.
fixes #30690.

git-svn-id: https://develop.svn.wordpress.org/trunk@31252 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-20 20:35:13 +00:00
Boone Gorges f1771073dc `WP_Date_Query` date validation should not fail for hour = 0.
Props ChriCo, tyxla.
Fixes #31067 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@31251 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-20 19:12:48 +00:00
Lance Willett 37ea642f69 Twenty Fourteen: fix escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31250 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-20 19:02:53 +00:00
Gary Pendergast 3a87ef36e2 Texturize: Add "em" as a cockney term, so that "'em" is texturized with an apostrophe, instead of an open quote.
Fixes #29813.

Props miqrogroove.



git-svn-id: https://develop.svn.wordpress.org/trunk@31249 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-20 18:43:30 +00:00
Boone Gorges d80ca82693 Better loop detection for `_pad_term_counts()`.
The `$ancestors` check must be reset for each term in order for term counts
to be correct.

Fixes #20635.

git-svn-id: https://develop.svn.wordpress.org/trunk@31248 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 16:51:44 +00:00
Sergey Biryukov 2c955c0bbf Remove inaccurate part of {$taxonomy}_add_form_fields action description.
props joostdekeijzer.
fixes #31052.

git-svn-id: https://develop.svn.wordpress.org/trunk@31247 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 15:30:09 +00:00
Drew Jaynes (DrewAPicture) 5e301c5794 Add missing summaries and descriptions for various functions in wp-admin/includes/upgrade.php.
Also generally improve existing parameter, return, and other documentation in various function DocBlocks.

Props morganestes.
Fixes #30825.


git-svn-id: https://develop.svn.wordpress.org/trunk@31246 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 09:14:39 +00:00
Drew Jaynes (DrewAPicture) 032ec0d24a Remove a stray period introduced in [31242].
Props SergeyBiryukov.
See #31048.


git-svn-id: https://develop.svn.wordpress.org/trunk@31245 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:46:24 +00:00
Drew Jaynes (DrewAPicture) b590db9253 Ensure the correct list of default tabs for the Plugin Install screen are documented.
Props stevenkword.
Fixes #31017.


git-svn-id: https://develop.svn.wordpress.org/trunk@31244 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:43:15 +00:00
Drew Jaynes (DrewAPicture) 73780fdd32 Add more complete documentation for parameters, globals, and return values to the DocBlocks for `remove_shortcode()`, `shortcode_exists()`, and `do_shortcode()`.
Props SergeyBiryukov.
Fixes #31048.


git-svn-id: https://develop.svn.wordpress.org/trunk@31243 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:39:10 +00:00
Drew Jaynes (DrewAPicture) 596412fb0b Ensure both parameters and the return for `has_shortcode()` are fully documented.
Props cais, SergeyBiryukov
See #31048.


git-svn-id: https://develop.svn.wordpress.org/trunk@31242 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:35:05 +00:00
Sergey Biryukov 352be0b432 Display correct title in Archives widget if the type of archive was changed using the 'widget_archives_dropdown_args' filter.
props floriansimeth for initial patch.
fixes #31024.

git-svn-id: https://develop.svn.wordpress.org/trunk@31241 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-19 08:25:36 +00:00
Sergey Biryukov 4a1cf7a38b Strip HTML tags when searching for installed themes.
props enej, SergeyBiryukov, obenland.
fixes #27561.

git-svn-id: https://develop.svn.wordpress.org/trunk@31240 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 20:39:39 +00:00
Sergey Biryukov a036114a4d attachment_url_to_postid() should always return an integer.
props nathan_dawson, ashfame.
fixes #31044.

git-svn-id: https://develop.svn.wordpress.org/trunk@31239 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 20:32:50 +00:00
Drew Jaynes (DrewAPicture) a79297ba2d Minor fix for inline doc syntax in a changelog entry for `wp_get_object_terms()`.
See #28688.


git-svn-id: https://develop.svn.wordpress.org/trunk@31238 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 19:04:45 +00:00
Boone Gorges fd886b7d60 Add `@since` annotation for 'orderby' values introduced in [31236].
See #28688.

git-svn-id: https://develop.svn.wordpress.org/trunk@31237 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 19:02:34 +00:00
Boone Gorges 9501fb3213 Additional 'orderby' values for `wp_get_object_terms()`.
Adds support for ordering by 'taxonomy', 'term_taxonomy_id', and 'parent'.

Props ChriCo.
Fixes #28688.

git-svn-id: https://develop.svn.wordpress.org/trunk@31236 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 18:56:38 +00:00
Andrew Ozz 9ade002c6f TinyMCE: fix vertical positioning of the image toolbar when there are several instances of the editor. Props avryl, fixes #31028.
git-svn-id: https://develop.svn.wordpress.org/trunk@31235 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 17:55:39 +00:00
Sergey Biryukov 2b4099c6bd Customizer: Replicate behavior from options-reading.php and hide front page options if there are no pages.
props Clorith.
fixes #27630.

git-svn-id: https://develop.svn.wordpress.org/trunk@31234 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-18 06:00:18 +00:00
Boone Gorges c7e95b9433 Correct `wp_get_object_terms()` documentation.
The 'orderby' parameter accepts a number of values that have never been
properly documented.

git-svn-id: https://develop.svn.wordpress.org/trunk@31232 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 20:38:20 +00:00
Boone Gorges b18ee3334f Standardize the docblock for `wp_get_object_terms()`.
The enumeration of the `$args` parameter has been moved from the long
description to an array hash associated with the proper `@param` attribute.

git-svn-id: https://develop.svn.wordpress.org/trunk@31231 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 20:08:11 +00:00
Sergey Biryukov 658d1bb32e Add a changelog entry for the new parameter added in [31228].
props DrewAPicture.
fixes #31015.

git-svn-id: https://develop.svn.wordpress.org/trunk@31229 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 17:30:10 +00:00
Sergey Biryukov 54f366da0b Pass $force_reauth value to the 'login_url' filter.
props jfarthing84, MikeHansenMe.
fixes #31015.

git-svn-id: https://develop.svn.wordpress.org/trunk@31228 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 17:19:57 +00:00
Sergey Biryukov 3c86263afe Customizer: Make "Search widgets" input sticky.
props celloexpressions.
fixes #30751.

git-svn-id: https://develop.svn.wordpress.org/trunk@31227 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 13:15:00 +00:00
Sergey Biryukov 4c4de36c5c Customizer: Fix form tag replacement in WP_Customize_Widgets::get_widget_control() after [31200].
see #30126.

git-svn-id: https://develop.svn.wordpress.org/trunk@31226 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 13:10:27 +00:00
Sergey Biryukov 6e206c2973 Use the site's local time to create the first post during installation.
props extendwings.
fixes #29296.

git-svn-id: https://develop.svn.wordpress.org/trunk@31225 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 10:06:42 +00:00
Sergey Biryukov e7bf16b423 Introduce has_header_image() to check whether a header image is set.
props GunGeekATX, voldemortensen.
fixes #16268.

git-svn-id: https://develop.svn.wordpress.org/trunk@31224 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 06:33:42 +00:00
Andrew Ozz f18854e866 Add support for IE conditional comments for WP_Scripts to match the functionality of WP_Styles, including unit tests. Props filosofo, aaroncampbell, ethitter, georgestephanis, valendesigns. Fixes #16024.
git-svn-id: https://develop.svn.wordpress.org/trunk@31223 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 01:36:55 +00:00
Andrew Ozz 5378b4e000 TinyMCE: add breaking out of blockquotes by pressing Enter twice. Togging blockquote on|off with the button and the shortcut is unchanged. Props avryl, fixes #23110.
git-svn-id: https://develop.svn.wordpress.org/trunk@31222 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 23:35:24 +00:00
Scott Taylor cd2d6d27d9 `wp_set_object_terms()` takes `$taxonomy` as a string. Update `@param`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31221 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 23:26:38 +00:00
Scott Taylor 357fa4131a Fix some internal types that are passed to functions to avoid changing the acceptable types passed as arguments to those functions:
* In `WP_Importer->is_user_over_quota()`, the default value for the first argument for `upload_is_user_over_quota()` is `true`. Don't bother passing `1`.
* When calling `submit_button()` with no `$name`, pass empty string instead of `false`.
* The default value for the 2nd argument to `get_edit_post_link()` is `'display'`. Because PHP is PHP, passing `true` is the same as passing `'display'` or nothing. Don't bother passing `true`. 
* In `WP_User_Meta_Session_Tokens::drop_sessions()`, pass `0` instead of `false` to `delete_metadata()` as the value for `$object_id`, which expects an int. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31220 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 22:50:20 +00:00
Scott Taylor 1d3b42d226 Fix some erroneous `@param` annotations.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31219 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 22:43:13 +00:00
Boone Gorges 5b7baae907 In `get_edit_term_link()`, default to a valid `$object_type`.
The $object_type param is used to set the 'post_type' query var, which
determines the post type menu that will be expanded when clicking through to
the term edit page. Not all taxonomies are associated with Posts, so it makes
sense to default to a post_type that the taxonomy is actually associated with.

Props DzeryCZ, juliobox.
Fixes #29251.

git-svn-id: https://develop.svn.wordpress.org/trunk@31218 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:36:12 +00:00
Scott Taylor 5deee71273 Remove unused local vars in `delete_plugins()`, `delete_theme()`, `WP_Date_Query->validate_date_values()`, `global_terms()`, and `WP_Text_Diff_Renderer_Table->_changed()`.
This will clear out the "Unused Code" label in the next Scrutinizer report.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31217 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:18:52 +00:00
Scott Taylor 2ed007c023 Calling `->chown()` and `->chgrp()` in `WP_Filesystem_ftpsockets` produces no side-effects. Remove the calls. `->chgrp()` is defined in the super class, and does nothing, can be removed from the child class.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31216 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:09:18 +00:00
Scott Taylor 9a16e6230b Calling `->chown()` and `->chgrp()` in `WP_Filesystem_FTPext` produces no side-effects. Remove the calls. `->chgrp()` is defined in the super class, and does nothing, can be removed from the child class.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31215 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 21:06:29 +00:00
Lance Willett 19b4a0053a Twenty Fifteen: keep sub-menus open when visiting sub-menu pages, to show context when navigating a site.
Props jartes, fixes #30722.

git-svn-id: https://develop.svn.wordpress.org/trunk@31214 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:16:56 +00:00
Scott Taylor d29abb1d24 By initializing this array before a loop, Scrutinizer reports 0 (zero) "Coding Style" errors.
There are plenty of other kinds of errors, but this label will be cleared out.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31213 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:12:15 +00:00
Scott Taylor 5743898e1e `@param` cleanup:
* `get_metadata()` will return literally anything, needs to be `mixed`
* `wp()` and `WP_Query::__construct()` no longer just take a query string
* Clarify a few others

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31212 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 19:02:26 +00:00
Scott Taylor 835dbe7baf [31210] broke Supportflow on dotorg, which declares these methods as `protected`. Switch to `protected` for the noop methods. The subclasses can make them more visible using `public`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31211 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 18:36:46 +00:00
Scott Taylor e3ac341f24 Add 2 noop methods to `WP_List_Table`: `->column_default()` and `->column_cb()`.
`WP_List_Table` is essentially an `abstract` class. Some of its methods throw `die()` warnings if they aren't overridden in a child class.

These noop methods wouldn't be `abstract`, because they are not required in subclasses. However, `WP_List_Table` can call these methods in its own method, `->single_row_columns()`, whether a subclass defined them or not.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31210 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:41:50 +00:00
Scott Taylor 07d899740e In `WP_Filesystem_Base` subclasses that set `$wp_base`, remove this dead code.
Unused since [8009] - "Make WP_Filesystem work with new directory constants"

There is currently no declared field and no `@property` annotation.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31209 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:22:07 +00:00
Scott Taylor b0c6a64fbd `WP_Filesystem_Base` should declare `$errors` and `$options` as fields for use by subclasses.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31208 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:09:35 +00:00
Boone Gorges 60f2983b2e Bail out of hierarchy loops in `_get_term_children()`.
This prevents infinite loops that lead to PHP nesting limit fatal errors.

Props boonebgorges, sgrant.
Fixes #24461.

git-svn-id: https://develop.svn.wordpress.org/trunk@31207 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 17:09:11 +00:00
Boone Gorges 8ae64f6384 Bail out of hierarchy loops in `_pad_term_counts()`.
Taxonomy hierarchy loops should not occur naturally, but when they do, the
logic of `_pad_term_counts()` could result in infinite loops, leading to
timeouts. We avoid this by breaking when a loop is detected.

Fixes #20635.

git-svn-id: https://develop.svn.wordpress.org/trunk@31206 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 16:45:21 +00:00
Scott Taylor 18dbceee8c Add `<s>` to `$allowedtags` in KSES.
From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s :
"The <strike> element, alter ego of the <s> element is obsolete and should not be used on Web sites any more."

`<strike>` shall remain for BC, but `<s>` should not be stripped from the author (et al) role's HTML input.

Props paulschreiber.
Fixes #30954.


git-svn-id: https://develop.svn.wordpress.org/trunk@31205 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 16:06:47 +00:00
Scott Taylor db1ace58ca In `comment_form()`, add the HTML5 `required` attribute next to `aria-required` in fields that utilize it.
Props MMN-o.
Fixes #24732.


git-svn-id: https://develop.svn.wordpress.org/trunk@31204 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 15:55:50 +00:00
Boone Gorges af146fef8c In `paginate_links()`, don't override custom format arguments when setting up default 'add_args'.
Since 4.1 [29780], the default value of the 'add_args' argument in
`paginate_links()` has been determined by parsing the current URL. This change
had the side effect of overriding custom values of 'format' that changed the
pagination query var, with the result that plugins using `paginate_links()`
with a custom format generated the incorrect links unless explicitly
declaring 'add_args=false' to prevent the default values from overriding. We
fix this behavior by parsing URL query vars into the 'add_args' array only
after the explicit function params have been parsed, and by skipping the
current page's pagination query var when doing this parsing (to avoid the
override).

Props obenland.
Fixes #30831 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@31203 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 15:48:24 +00:00
Scott Taylor 7c707c6633 Add `@ignore` to `_wp_scripts_maybe_doing_it_wrong()`.
Props DrewAPicture for the thought leadership.
See #20513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31202 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 05:37:06 +00:00
Scott Taylor 8ebe917c6b In `wp_ajax_parse_media_shortcode()`, don't require a global `$post` for all passed shortcodes.
`embed` is the only shortcode that requires a post ID. This will allow MCE views to work for `playlist`, `audio`, and `video` outside of the Edit Post screen.

See #30835.


git-svn-id: https://develop.svn.wordpress.org/trunk@31201 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 05:18:17 +00:00
Scott Taylor 83b6fad852 In HTML5, the `action` attribute is no longer required. Remove this attribute when empty.
The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces." 
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.


git-svn-id: https://develop.svn.wordpress.org/trunk@31200 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 04:15:52 +00:00
Gary Pendergast c8c8b66bae When a hyphen `-` or double hyphen `--` was at the start or the end of a string, it wasn't texturized correctly.
Fixes #31030



git-svn-id: https://develop.svn.wordpress.org/trunk@31199 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 03:54:00 +00:00
Helen Hou-Sandi d266ecd5b2 Media: Prevent filter selects from jiggling when the spinner shows.
props valendesigns.
fixes #30725 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31197 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:59:59 +00:00
Scott Taylor c6ba804b33 Make `_wp_scripts_maybe_doing_it_wrong( $function )` "private".
Props obenland for the thought leadership.
See #20513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31196 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:41:07 +00:00
Gary Pendergast 58d931dfc7 Allow `comment_post_ID` to be passed to `wp_update_comment()`, so that a comment can be moved to a different post.
Props tyxla, rachelbaker

Fixes #30946



git-svn-id: https://develop.svn.wordpress.org/trunk@31195 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:38:30 +00:00
Scott Taylor 28d654837d After [31192], create a function, `wp_styles()`, to reduce duplicated code in `functions.wp-styles.php`. The style functions can reuse `wp_scripts_maybe_doing_it_wrong( $function )` internally.
See #20513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31194 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:30:08 +00:00
Scott Taylor e1da69195d In `wp_print_scripts()`, bail if `$handles` is `false` and the `$wp_scripts` global has not been instantiated.
See [31192], #20513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31193 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:27:49 +00:00
Scott Taylor 7ccdc6b470 `functions.wp-scripts.php` contains a lot of duplicated code. Make 2 new functions: `wp_scripts()` and `wp_scripts_maybe_doing_it_wrong( $function )`, to encapsulate the repeated logic.
Props GaryJ, scribu, wonderboymusic.
Fixes #20513.


git-svn-id: https://develop.svn.wordpress.org/trunk@31192 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:06:03 +00:00
Scott Taylor bcc7f9e093 In `WP_User`, `->get_role_caps()` and `->update_user_level_from_caps()` must be called inside `->add_cap()` and `->remove_cap()` after updating user meta. `->has_cap()` checks are currently failing directly after calling `->add_cap()`.
Adds unit test.

Props rachelbaker.
Fixes #28374.


git-svn-id: https://develop.svn.wordpress.org/trunk@31190 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 01:48:36 +00:00
Scott Taylor 5412af65d8 Revert [31032], this did not get much love.
See #25277.


git-svn-id: https://develop.svn.wordpress.org/trunk@31189 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 01:10:39 +00:00
Scott Taylor 5acc6bdb58 In PHP 5.0.0, `is_a()` became deprecated in favour of the `instanceof` operator. Calling `is_a()` would result in an `E_STRICT` warning.
In PHP 5.3.0, `is_a()` is no longer deprecated, and will therefore no longer throw `E_STRICT` warnings.

To avoid warnings in PHP < 5.3.0, convert all `is_a()` calls to `$var instanceof WP_Class` calls.

`instanceof` does not throw any error if the variable being tested is not an object, it simply returns `false`.

Props markoheijnen, wonderboymusic.
Fixes #25672.


git-svn-id: https://develop.svn.wordpress.org/trunk@31188 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 01:05:52 +00:00
Scott Taylor 102fb4ac5c Replace the 3 remaining occurrences of `wpspin` GIF with `spinner`.
Props avryl.
Fixes #27482.


git-svn-id: https://develop.svn.wordpress.org/trunk@31187 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 00:32:45 +00:00
Scott Taylor 0c71d0033a Ensure that `<figcaption>` is not autop'd.
Fixes #29219.


git-svn-id: https://develop.svn.wordpress.org/trunk@31186 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 00:26:36 +00:00
Andrew Ozz adc9a1d565 TinyMCE: remove the fade in/out when opening/closing native modals to match the rest of our UI. Props afercia, avryl. Fixes #27388.
git-svn-id: https://develop.svn.wordpress.org/trunk@31185 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-15 23:28:39 +00:00
Lance Willett ff779e2d0e Twenty Fifteen: move `js` and `no-js` class name functionality out of header template and into a `wp_head` hook in functions.php file so that the JavaScript functionality isn't hard-coded into a template file.
Fixes #30770, props chipbennett, valendesigns, and peterwilsoncc.

git-svn-id: https://develop.svn.wordpress.org/trunk@31184 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-15 23:09:07 +00:00
Lance Willett f09026e439 Twenty Fifteen: remove unused CSS rules for `wp_page_menu` since are not used in the theme. And a bit of CSS cleanup.
Props iamtakashi, fixes #30957.

git-svn-id: https://develop.svn.wordpress.org/trunk@31183 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-15 23:04:28 +00:00
Lance Willett 541ec337cf Twenty Fifteen: remove border on post navigation when post thumbnail is available.
Props jartes, fixes #30918.

git-svn-id: https://develop.svn.wordpress.org/trunk@31182 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-15 23:02:24 +00:00
Helen Hou-Sandi 8ab449ae35 List tables: Use CSS :nth-child() selectors for zebra striping.
Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the `.alternate` class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.


git-svn-id: https://develop.svn.wordpress.org/trunk@31181 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 22:13:03 +00:00
Andrew Ozz 84c0411bcc TinyMCE: select the iframe element by id. Needed as some browser extensions insert extra elements in the page. Props avryl, see #30785.
git-svn-id: https://develop.svn.wordpress.org/trunk@31180 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 21:32:23 +00:00
Boone Gorges 4b6957c852 Support array values in `WP_Date_Query::validate_date_values()`.
Introduced in [29925], `validate_date_values()` throws `_doing_it_wrong()`
notices when values passed as part of a `WP_Date_Query` do not reflect actual
dates. However, the validation did not account properly for the case where an
array of multiple values is passed, as when doing IN or BETWEEN queries.

Props dlh.
Fixes #31001 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@31179 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 16:50:09 +00:00
Jeremy Felt 1a930c5d43 Don't overcheck the expected return from `get_blog_details()` in `get_blogaddress_by_id()`
If `get_blog_details()` is returning something that is not our expected object or `false`, then a notice would already be thrown there.

Also adds proper return docs to `get_blog_details()`.

Props SergeyBiryukov.

Fixes #30566


git-svn-id: https://develop.svn.wordpress.org/trunk@31178 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 05:32:19 +00:00
Sergey Biryukov 02d9bcbb7c Revert [31173] and target only taxonomy and link manager tables in keyboard focus code.
props afercia.
fixes #30980.

git-svn-id: https://develop.svn.wordpress.org/trunk@31177 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 14:00:15 +00:00
Sergey Biryukov 74bb197a4a Customizer: Use deep-link for Widgets in toolbar on front-end.
props caseypatrickdriscoll.
fixes #30971.

git-svn-id: https://develop.svn.wordpress.org/trunk@31176 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 07:44:57 +00:00
Sergey Biryukov 4b498e9201 Twenty Fifteen: Add print section to the table of contents in the stylesheet.
props iamtakashi.
fixes #30993.

git-svn-id: https://develop.svn.wordpress.org/trunk@31175 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 07:20:51 +00:00
Sergey Biryukov b61f6f3a60 Scope attachment selectors in media views to avoid interfering with attachment pages on front-end.
props valendesigns.
fixes #30878.

git-svn-id: https://develop.svn.wordpress.org/trunk@31174 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 07:15:24 +00:00
Sergey Biryukov cfa5aa457d Reveal row actions on focus on taxonomy screens.
props afercia.
fixes #30980.

git-svn-id: https://develop.svn.wordpress.org/trunk@31173 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 07:01:49 +00:00
Sergey Biryukov 819a53be46 Add 'user_id' to the list of fields wp_update_comment() can update.
props jphase.
fixes #30307.

git-svn-id: https://develop.svn.wordpress.org/trunk@31172 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 06:47:33 +00:00
Sergey Biryukov a744bb9a5f Add 'comment_type' to the list of fields wp_update_comment() can update.
props desaiuditd.
fixes #30627.

git-svn-id: https://develop.svn.wordpress.org/trunk@31171 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 06:41:19 +00:00
Drew Jaynes (DrewAPicture) 9b0cf1bd5b Ensure we're using the correct `@ignore` phpDocumentor tag to mark elements that should be skipped when parsing.
Up to this point, various core elements' DocBlocks incorrectly included an `@internal` tag as a means for skipping the parsing process. When paired with a description (inline or otherwise), `@internal` is a valid tag meant to provide internal-only context, but not necessarily to skip parsing the entire element.

See #30987.


git-svn-id: https://develop.svn.wordpress.org/trunk@31170 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 00:50:32 +00:00
Drew Jaynes (DrewAPicture) 1f9ee350fc Remove an erroneous `@internal` tag from the DocBlock for `get_children()`.
Use of the `@internal` tag caused the reference article for this function to be skipped during the parsing process.

Fixes #30987 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31169 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 00:07:39 +00:00
Scott Taylor 865185903b There are some random `add_action()` and `add_filter()` calls littered around some files in `wp-includes/`. These should be moved to `wp-includes/default-filters.php` with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even `SHORTINIT` - a lot of the hooks registered won't run anyways (that's already the case).
See #30947.


git-svn-id: https://develop.svn.wordpress.org/trunk@31168 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:39:39 +00:00
Scott Taylor 47ba5e6c2e `WP_Themes_List_Table` accesses `$_pagination_args` from the parent class. Switch `$_pagination_args` to `protected` in `WP_List_Table`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31167 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:25:30 +00:00
Scott Taylor 47a74bb21f Add a `private` field to `WP_Terms_List_Table`, `$level`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31166 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:22:38 +00:00
Scott Taylor b3f726efc4 Add a `private` field to `WP_Posts_List_Table`, `$is_trash`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31165 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:21:08 +00:00
Scott Taylor e5672bd8c5 Add a `private` field to `WP_Plugin_Install_List_Table`, `$error`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31164 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:18:52 +00:00
Scott Taylor 02eaef3ae0 In lieu of refactoring, add a `private` field to `WP_MS_Themes_List_Table`, `$has_items`. Ideally, this class would overload `->has_items()` and not set a `private` field.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31163 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:16:16 +00:00
Scott Taylor f0c4ab3e69 Add 2 `private` fields to `WP_Media_List_Table`, `$detached` and `$is_trash`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31162 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:07:41 +00:00
Scott Taylor 243d50d2f7 After [31146], properly declare `$user_can` as a `private` field in `WP_Comments_List_Table`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31161 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:01:53 +00:00
Dion Hulse 32b020bf05 More concise documentation for wp_install_maybe_enable_pretty_permalinks()
See #6481. Props ericlewis.


git-svn-id: https://develop.svn.wordpress.org/trunk@31160 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 04:32:35 +00:00
Dion Hulse 0aaa2f0f32 The new wp_install_maybe_enable_pretty_permalinks() function doesn't need to be pluggable.
See #6481. Props nacin, valendesigns


git-svn-id: https://develop.svn.wordpress.org/trunk@31159 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 04:30:01 +00:00
Jeremy Felt 0eb9f7e414 Use a less complex approach for enforcing path slashes in `update_blog_details()`
Ensure leading and traling slashes are in place and don't touch anything in the middle. Validating with `array_filter()` would have missed a possible valid falsy path - `/my-path/0/`.

Props nacin.

Fixes #18117.


git-svn-id: https://develop.svn.wordpress.org/trunk@31158 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 04:20:47 +00:00
Jeremy Felt d759c0ef23 Check for existence of data from `get_blogaddress_by_id()` before returning a URL
* Prevent a notice when an invalid ID is used with `get_blogaddres_by_id()`.
* Return a falsy empty string rather than the previous "http://".
* Add unit tests for `get_blogaddress_by_id()`.

Props nerrad.

Fixes #30566.


git-svn-id: https://develop.svn.wordpress.org/trunk@31157 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 02:23:43 +00:00
Jeremy Felt 331262b544 Update `home` and `siteurl` after path slashes are validated in `update_blog_details()`
When editing a site, if `home` and `siteurl` are checked to be updated along with a site's domain and path, they should receive the results of any modifications in `update_blog_details()` rather than trusting the POST data.

Previously, it was possible to save a value without a leading slash on the path, causing an invalid URL to be stored.

Props earnjam.

Fixes #30417.


git-svn-id: https://develop.svn.wordpress.org/trunk@31156 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 01:56:04 +00:00
Jeremy Felt f9e9287875 Enforce leading and trailing slashes on paths updated with `update_blog_details()`
In multisite, core expects the stored value for a site's path to have leading and trailing slashes. When these slashes are missing, it becomes impossible to visit the site.

This enforces proper `/path/` creation in `update_blog_details()`, most likely used when updating an existing site through `site-info.php`.

Props earnjam, simonwheatley.

Fixes #18117. Fixes #23865.


git-svn-id: https://develop.svn.wordpress.org/trunk@31155 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 01:42:46 +00:00
Gary Pendergast 0b993ffe35 If `get_avatar_data()` is passed an empty value for the default avatar, we should be using the site's `avatar_default` option instead.
See #21195


git-svn-id: https://develop.svn.wordpress.org/trunk@31154 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 00:22:12 +00:00
Gary Pendergast 69f8b26d89 In `get_avatar_data()`, there's no need to return `false` if we couldn't find an avatar, as Gravatar can handle being given an empty email hash. This allows the default avatar to show when no email address is given.
See #21195



git-svn-id: https://develop.svn.wordpress.org/trunk@31153 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 00:19:34 +00:00
Gary Pendergast d0fab598e7 In `get_avatar()`, revert the `<img>` tag attributes to using single quotes, instead of double quotes. This behaviour was changed in [31107], but caused problems for code that attempted to parse the `<img>` tag.
See #21195



git-svn-id: https://develop.svn.wordpress.org/trunk@31152 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 00:02:31 +00:00
Scott Taylor 156a673660 In `WP_Query`, only call magic method internals again whitelists of properties and methods, `$compat_fields` and `$compat_methods`. Remove `__unset()` since `__set()` is not implemented.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31151 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:40:53 +00:00
Scott Taylor 1178e8a6e1 In `WP_Comment_Query`, only allow `__call()` to run against `->get_search_sql()`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31150 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:32:44 +00:00
Scott Taylor f6d7c5e52f In `wp_xmlrpc_server`, only allow `__call()` to run against `->_multisite_getUsersBlogs()`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31149 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:30:26 +00:00
Scott Taylor cd3fde69bb In `WP_oEmbed`, only allow `__call()` to run against a whitelist of methods, `$compat_methods`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31148 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:26:55 +00:00
Scott Taylor 5b6858eff8 In `WP_Roles`, only allow `__call()` to run against `->_init()`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31147 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:23:00 +00:00
Scott Taylor 274253629f In `WP_List_Table`, only call magic method internals again whitelists of properties and methods, `$compat_fields` and `$compat_methods`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31146 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:19:58 +00:00
Scott Taylor ad6dd738b2 In `WP_Filesystem_Base`, make the only `private` member, `$cache`, `public` and remove magic methods. `$cache` was always `public` until [28487], has been essentially `public` via a magic method since.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31145 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 22:03:59 +00:00
Scott Taylor bbc7ca2d0d In `WP_User_Query`, only call magic method internals against a whitelist of properties, `$compat_fields`.
See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31144 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 21:59:54 +00:00
Andrew Ozz 43b2de66c6 TinyMCE wpView: when clicking in the editor optimize the caret placement before or after a view. Props avryl, fixes #30938.
git-svn-id: https://develop.svn.wordpress.org/trunk@31143 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-11 20:41:36 +00:00