Commit Graph

2929 Commits

Author SHA1 Message Date
Lance Willett
04ff214073 Twenty Fifteen: add ARIA attributes to menu toggle.
See #31527, props davidakennedy, lance.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 17:34:26 +00:00
Scott Taylor
38df7e5048 For our MediaElement 2.16.4 build + monkey patches, also add from the illustrious dd32:
https://github.com/johndyer/mediaelement/pull/1423

Props dd32.
See [31444], #31541.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 15:47:26 +00:00
Helen Hou-Sandí
b6393c9d77 Media: UI tweaks for Insert from URL.
"Title" field is now labeled as "Link Text", to reflect how it's actually used. It's also hidden whenever the embed is updating, to make it clearer that something is happening. Embed dimension fields are shown below the preview, much like image property fields are shown below.

fixes #29476, see #31139.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 15:03:25 +00:00
Helen Hou-Sandí
7ce4256d4d Comments: Show more identifying information for moderation and editing.
Attempting to moderate comments without context about the post is more difficult than necessary. The comment moderation screen you are sent to via email link was also in need of some better visual treatment.

props thaicloud, seanchayes, adamsilverstein.
see #23988.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 14:06:24 +00:00
Boone Gorges
305cf8b95e Allow $autoload setting to be changed for existing options using update_option().
[31628] made it possible to pass an `$autoload` param to `update_option()` that
applies when the option does not yet exist in the database. The current
changeset introduces parity for existing options: the `$autoload` setting
for existing options can be changed via the `$autoload` parameter. For internal
simplicity, `$autoload` is ignored for existing options when `$value` is not
also changed.

This changeset also moves `update_option()` tests into their own class.

Props dd32.
Fixes #26394.
Built from https://develop.svn.wordpress.org/trunk@31640


git-svn-id: http://core.svn.wordpress.org/trunk@31621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 13:57:26 +00:00
Boone Gorges
3acf36fe48 Ensure that an array of object IDs is passed to the 'get_object_terms' filter.
Originally introduced in [31581].

Props doublesharp.
Fixes #18828.
Built from https://develop.svn.wordpress.org/trunk@31639


git-svn-id: http://core.svn.wordpress.org/trunk@31620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 13:18:26 +00:00
Drew Jaynes
68bbc0e43d Correct the $number argument description in get_terms() to reflect that an empty string or 0 will return all possible results, not -1.
Previously, it was noted that -1 would return all possible results. However, as the value of `$number` is passed through `absint()`, -1 would actually be converted to 1, thereby producing unexpected results.

Props iandunn.
Fixes #31526.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 08:05:25 +00:00
Andrew Ozz
5abac389fa PressThis: when server-side parsing, filter small images by the width and height attributes if set.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31637


git-svn-id: http://core.svn.wordpress.org/trunk@31618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 02:03:27 +00:00
Andrew Ozz
0ba8fe0132 PressThis: fix toggling of aria-expanded attribute.
Props afercia, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31636


git-svn-id: http://core.svn.wordpress.org/trunk@31617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 01:51:25 +00:00
Andrew Ozz
bcad925af4 PressThis:
- Fix error when checking for empty array keys.
- Add better DailyMotion embed support.
Props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31635


git-svn-id: http://core.svn.wordpress.org/trunk@31616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 01:17:24 +00:00
Scott Taylor
e4952687f6 Audio previews need top margin on Edit Media screen.
Fixes #31524.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 22:45:26 +00:00
Scott Taylor
b8341a472d When adding post_type to $sendback in wp-admin/post.php, use add_query_arg() instead of string concatenation.
Props podpirate.
Fixes #31492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 22:31:24 +00:00
Scott Taylor
ba977671b6 In the modal state for Embed previews, only show the Title field when the preview fails.
Props johnbillion, wonderboymusic.
See #29476.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 21:03:25 +00:00
Scott Taylor
c06316b7ab Whitespace after [31630].
Built from https://develop.svn.wordpress.org/trunk@31631


git-svn-id: http://core.svn.wordpress.org/trunk@31612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 20:14:24 +00:00
Scott Taylor
b05ff18586 Add oEmbed support for Tumblr.
Props elliottcarlson.
See #31180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 20:13:25 +00:00
Scott Taylor
e1e8782304 Use browserify's watch mechanism in tandem with grunt watch. Makes building media bundles about 10 (million) times faster.
Make the `browserify` config more dynamic to make future additions easier and to ensure proper use of `SOURCE_DIR`.

Props iseulde, wonderboymusic.
See #28510.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 19:49:26 +00:00
Boone Gorges
11ec50e453 Introduce $autoload parameter to update_option().
When creating an option via `add_option()`, the `$autoload` param allows you to
tell WP whether the option should be loaded as part of the 'alloptions' cache
during every pageload. `update_option()`, when used with a non-existent option
calls `add_option()` internally. The new `$autoload` param in `update_option()`
is passed along to `add_option()` in cases where the option does not yet exist.

The associated unit tests are skipped on multisite due to an issue that causes
`WP_INSTALLING` to force cache misses. See #31130.

Props codix, nofearinc, MikeHansenMe.
Fixes #26394.
Built from https://develop.svn.wordpress.org/trunk@31628


git-svn-id: http://core.svn.wordpress.org/trunk@31609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 19:13:25 +00:00
Scott Taylor
cd49531b14 Ugrade to MediaElement 2.16.4:
https://github.com/johndyer/mediaelement/compare/2.16.2...2.16.4

Includes PRs from WordPress folk:
1a74854abf
f438256f5c
8b9856accd

Monkey-patch MediaElement to restore H264 support to Chromium.

Documented here:
https://core.trac.wordpress.org/ticket/31541#comment:1

See #31541.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 16:54:26 +00:00
Scott Taylor
da7359b060 After [31620], when checking for HTTP URLs, make sure we are checking the shortcode body instead of an indexed attribute.
See #31139.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 16:26:25 +00:00
Scott Taylor
ae85d506e6 When editing/viewing the details of a [video] shortcode that has Vimeo as its source, and Froogaloop has not already been lazy-loaded, check the details of the state's model for the video src, instead of the HTML element.
See #29267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 16:15:25 +00:00
Scott Taylor
f9c138b4c4 detached affects the wp() call for the media list table, so switch our new $_GET key to detach.
See #6820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 15:59:27 +00:00
Boone Gorges
ec26a08d3c Pinking shears in unit test files.
Built from https://develop.svn.wordpress.org/trunk@31623


git-svn-id: http://core.svn.wordpress.org/trunk@31604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 13:15:53 +00:00
Boone Gorges
55e32049e3 In PHPUnit test classes, parent::tearDown() should be the last thing done in tearDown() methods.
`WP_UnitTestCase::tearDown()` restores the test environment to the default
conditions, including rolling back the MySQL transaction that the test takes
place in, resetting globals, and unhooking test-specific filters. As such, all
teardown routines for specific tests should happen before the parent class's
`tearDown()` method is called. Failure to do so can cause database locks on
certain configurations, among other problems.

See #31537.
Built from https://develop.svn.wordpress.org/trunk@31622


git-svn-id: http://core.svn.wordpress.org/trunk@31603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 13:15:25 +00:00
Andrew Ozz
36610e072b TinyMCE wpView: revert decoding of HTML entities. Doesn't work in old IE and needs to be more selective. Keep the change from .html() to .text() when getting the content of a node. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31621


git-svn-id: http://core.svn.wordpress.org/trunk@31602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 12:36:28 +00:00
Scott Taylor
cc953717b7 Allow inline editing of width and height parameters while previewing an embed in the media modal:
* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* Allow a URL to transition to a shortcode (and vice versa) when returning an embed to TinyMCE
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.

This is a first pass to allow broad testing with recent MCE view changes. 

See #31139.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 06:00:26 +00:00
Scott Taylor
d3471e9850 Allow attachments to be Detached from their parent in media grid and list modes.
See #6820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 05:35:28 +00:00
Scott Taylor
0250aebf2a Media modules: set $ to Backbone.$, instead of jQuery, so fewer globals are imported.
See #28510.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 04:12:26 +00:00
Boone Gorges
34715e3b1a 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.
Built from https://develop.svn.wordpress.org/trunk@31617


git-svn-id: http://core.svn.wordpress.org/trunk@31598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 03:57:24 +00:00
Scott Taylor
7ba0674183 [31468] reverted this in the 4.1 branch, also reverting in trunk.
See #30725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 03:50:28 +00:00
Boone Gorges
b3e11db20b Respect comment_date and comment_date_gmt params in wp_new_comment().
Props solarissmoke, oso96_2000.
Fixes #14279.
Built from https://develop.svn.wordpress.org/trunk@31615


git-svn-id: http://core.svn.wordpress.org/trunk@31596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 03:00:26 +00:00
Boone Gorges
8c48f9400e 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.
Built from https://develop.svn.wordpress.org/trunk@31614


git-svn-id: http://core.svn.wordpress.org/trunk@31595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 02:39:24 +00:00
Andrew Ozz
09ef640af4 PressThis: remove the extra .length tests for strings from press-this.js.
Props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31613


git-svn-id: http://core.svn.wordpress.org/trunk@31594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 21:01:25 +00:00
Andrew Ozz
810df170e7 TinyMCE wpView: decode HTML entities before trying to insert view markers. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31612


git-svn-id: http://core.svn.wordpress.org/trunk@31593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 20:35:27 +00:00
Helen Hou-Sandí
77f3f6943d Autocomplete: Update CSS based on both jQuery UI and general visual changes.
props rodrigosprimo for the initial patch.
fixes #31427.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 20:24:25 +00:00
Helen Hou-Sandí
df08581656 List tables: Display front and posts page indicators.
fixes #30190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:45:25 +00:00
Andrew Ozz
f53199487d 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.
Built from https://develop.svn.wordpress.org/trunk@31609


git-svn-id: http://core.svn.wordpress.org/trunk@31590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:29:25 +00:00
Drew Jaynes
3b267afbf4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 09:51:26 +00:00
Helen Hou-Sandí
513a038159 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:53:25 +00:00
Andrew Ozz
eecd5561d8 wpLink: fix the logic for prepending http:// and trim the input.
Props iseulde. See #18149.
Built from https://develop.svn.wordpress.org/trunk@31606


git-svn-id: http://core.svn.wordpress.org/trunk@31587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:21:25 +00:00
Helen Hou-Sandí
b201f3a5cb Fix some inline doc typos that were missed in [31604]. see #25698.
Built from https://develop.svn.wordpress.org/trunk@31605


git-svn-id: http://core.svn.wordpress.org/trunk@31586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:18:25 +00:00
Helen Hou-Sandí
5567d03278 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 21:14:25 +00:00
Sergey Biryukov
b8bbd959e2 Themes: Avoid jumping when selecting a feature in the feature filter on Add Themes screen.
props abhishekfdd.
fixes #31497.
Built from https://develop.svn.wordpress.org/trunk@31603


git-svn-id: http://core.svn.wordpress.org/trunk@31584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 19:47:25 +00:00
Andrew Ozz
1750c89afb 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.
Built from https://develop.svn.wordpress.org/trunk@31602


git-svn-id: http://core.svn.wordpress.org/trunk@31583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-03 00:01:28 +00:00
Andrew Ozz
a9f165915f 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.
Built from https://develop.svn.wordpress.org/trunk@31601


git-svn-id: http://core.svn.wordpress.org/trunk@31582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 23:41:27 +00:00
Drew Jaynes
bc378b8de1 Properly indent the hash notation of default arguments for wp_page_menu().
See #28841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 06:16:26 +00:00
Drew Jaynes
0b3c3092fc 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 06:11:40 +00:00
Andrew Ozz
acc6c422e2 PressThis: fix and update buttons styles. Props Michael-Arestad. Fixes #31498.
Built from https://develop.svn.wordpress.org/trunk@31598


git-svn-id: http://core.svn.wordpress.org/trunk@31579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 01:18:27 +00:00
Andrew Ozz
c22307fd9a PressThis: make sure buttons.css is loaded before press-this.css. Use (int) $post_ID instead of $post->ID.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31597


git-svn-id: http://core.svn.wordpress.org/trunk@31578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 00:58:25 +00:00
Andrew Ozz
3a124ac2f4 PressThis:
- Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them.
- Fix docs typo, props kraftbj.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31596


git-svn-id: http://core.svn.wordpress.org/trunk@31577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 23:28:26 +00:00
Andrew Ozz
4e8138cea5 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.
Built from https://develop.svn.wordpress.org/trunk@31595


git-svn-id: http://core.svn.wordpress.org/trunk@31576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 22:44:25 +00:00
Andrew Ozz
5e07bfdfd1 Add wp.a11y.speak() for audible alerts/updates in screen readers. Props afercia, GrahamArmfield (for the idea), iseulde. Fixes #31368.
Built from https://develop.svn.wordpress.org/trunk@31594


git-svn-id: http://core.svn.wordpress.org/trunk@31575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 19:11:27 +00:00
Drew Jaynes
a337c34c4e Fix a typo in the $args parameter hash notation description for add_settings_field().
See #28975, [31592].

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


git-svn-id: http://core.svn.wordpress.org/trunk@31574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:57:32 +00:00
Drew Jaynes
82fd5e33dd 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:53:25 +00:00
Drew Jaynes
33d9dd8066 Adjust the description for the $extra_attr argument in the DocBlocks for get_avatar_data() and get_avatar().
See [31561]. See #31469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:19:24 +00:00
Drew Jaynes
a49cd7851b 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:10:26 +00:00
Andrew Ozz
8164f8fe0e PressThis:
- Remove unneeded passing of post formats strings to JS.
- Set the currently selected post format name with jQuery.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31589


git-svn-id: http://core.svn.wordpress.org/trunk@31570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-28 20:08:27 +00:00
Dominik Schilling
8ecb7f5d1e 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.
Built from https://develop.svn.wordpress.org/trunk@31588


git-svn-id: http://core.svn.wordpress.org/trunk@31569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-28 10:36:25 +00:00
Gary Pendergast
18bb886b22 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


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


git-svn-id: http://core.svn.wordpress.org/trunk@31568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-28 02:21:26 +00:00
Andrew Ozz
5aae51144d TinyMCE wpView: update the "update" method. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31586


git-svn-id: http://core.svn.wordpress.org/trunk@31567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 22:29:26 +00:00
Scott Taylor
7acfb7740b 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 22:13:27 +00:00
Andrew Ozz
0b626ffea2 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.
Built from https://develop.svn.wordpress.org/trunk@31584


git-svn-id: http://core.svn.wordpress.org/trunk@31565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 22:06:25 +00:00
Andrew Ozz
9f86b1023b PressThis: fix selecting a post format (radio buttons) with the keyboard. Props afercia, Michael-Arestad. Fixes #31440.
Built from https://develop.svn.wordpress.org/trunk@31583


git-svn-id: http://core.svn.wordpress.org/trunk@31564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 21:53:25 +00:00
Scott Taylor
39dabbb8b1 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 21:27:25 +00:00
Boone Gorges
3db78d6a24 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.
Built from https://develop.svn.wordpress.org/trunk@31581


git-svn-id: http://core.svn.wordpress.org/trunk@31562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 20:31:26 +00:00
Andrew Ozz
848cd46e9a PressThis TinyMCE: set 'directionality' and add the LTR button when in RTL. Fixes #31474.
Built from https://develop.svn.wordpress.org/trunk@31580


git-svn-id: http://core.svn.wordpress.org/trunk@31561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 20:21:24 +00:00
Dominik Schilling
03a50ce509 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.
Built from https://develop.svn.wordpress.org/trunk@31579


git-svn-id: http://core.svn.wordpress.org/trunk@31560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 20:19:29 +00:00
Scott Taylor
7994009296 Support GIMP files in the Media Library. We already support Photoshop files.
Props MikeHansenMe.
Fixes #31146.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 19:47:25 +00:00
Dominik Schilling
c7dba8b015 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.
Built from https://develop.svn.wordpress.org/trunk@31577


git-svn-id: http://core.svn.wordpress.org/trunk@31558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 19:44:24 +00:00
Scott Taylor
dbc38ea246 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 19:38:27 +00:00
Scott Taylor
f6b1b01ecd Make a new function, wp_delete_file(). Use it.
Props scribu, wonderboymusic.
Fixes #17864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 16:51:25 +00:00
Scott Taylor
295af37bd0 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 16:11:25 +00:00
Dominik Schilling
d2f0abf85f 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
Built from https://develop.svn.wordpress.org/trunk@31573


git-svn-id: http://core.svn.wordpress.org/trunk@31554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 13:41:30 +00:00
Dominik Schilling
043cf80e75 Press This: Add press-this to list of RTL styles.
see #31373.
Built from https://develop.svn.wordpress.org/trunk@31572


git-svn-id: http://core.svn.wordpress.org/trunk@31553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 11:22:25 +00:00
Dominik Schilling
5e47a1f633 Press This: Use boolean value instead of __return_true(). Add missing hook docs.
see #31373.
Built from https://develop.svn.wordpress.org/trunk@31571


git-svn-id: http://core.svn.wordpress.org/trunk@31552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 11:15:25 +00:00
Dominik Schilling
789cd2e824 Customize Widgets: Don't return undefined items in getWidgetFormControls method.
props westonruter.
fixes #31465.
Built from https://develop.svn.wordpress.org/trunk@31570


git-svn-id: http://core.svn.wordpress.org/trunk@31551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 10:35:24 +00:00
Dominik Schilling
8f44036ea7 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.
Built from https://develop.svn.wordpress.org/trunk@31569


git-svn-id: http://core.svn.wordpress.org/trunk@31550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 10:21:26 +00:00
Dominik Schilling
4f19a4b613 JSHint: Remove an unused variable.
Built from https://develop.svn.wordpress.org/trunk@31568


git-svn-id: http://core.svn.wordpress.org/trunk@31549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 09:50:24 +00:00
Dominik Schilling
d35ef1c5b1 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.
Built from https://develop.svn.wordpress.org/trunk@31567


git-svn-id: http://core.svn.wordpress.org/trunk@31548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 09:41:27 +00:00
Andrew Ozz
4593319ea7 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.
Built from https://develop.svn.wordpress.org/trunk@31566


git-svn-id: http://core.svn.wordpress.org/trunk@31547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 02:50:25 +00:00
Andrew Ozz
dd79f77b26 PressThis: enable scrollbars in Firefox, remove overflow-x: hidden from the html element. Part props Michael-Arestad. Fixes #31455.
Built from https://develop.svn.wordpress.org/trunk@31565


git-svn-id: http://core.svn.wordpress.org/trunk@31546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-27 01:55:26 +00:00
Helen Hou-Sandí
6d03323746 CSS: Move relevant #sidemenu rules into deprecated-media.css and remove the cruft.
fixes #27956.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 23:24:27 +00:00
Scott Taylor
c43fcec0e3 Fix the build file after [31562].
Built from https://develop.svn.wordpress.org/trunk@31563


git-svn-id: http://core.svn.wordpress.org/trunk@31544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 23:02:24 +00:00
Scott Taylor
a8dcd7aced 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 23:01:25 +00:00
Scott Taylor
e899c370a4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 21:17:24 +00:00
Helen Hou-Sandí
b95d99d1c1 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 19:59:25 +00:00
Andrew Ozz
a226da32d3 TinyMCE: wpView improvements: introduce getText() and remove() methods, improved getInstance(), better docs. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31559


git-svn-id: http://core.svn.wordpress.org/trunk@31540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 19:32:24 +00:00
Aaron Jorbin
38b6646b41 Run unit tests on Travis CI with php nightlies
With PHP7 in active development, this will help us identify issues there. Also will be fun to see how fast it is.

Fixes #31454


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


git-svn-id: http://core.svn.wordpress.org/trunk@31539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 17:50:24 +00:00
Aaron Jorbin
4eefb02ebe Update grunt-patch-wordpress to 0.3.0
This new update includes the following changes:
 * The tools directory can now be patched along with a handful of other root level files that were failing
 * If patching fails  or otherwise issues a prompt, you can now interact with the prompt
 * Only save the watch file to your directory if you pass the --debug flag
 * Default to selecting the newest patch rather then the oldest patch

props ocean90 ntwb kadamwhite aaronjorbin
Fixes #31466


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


git-svn-id: http://core.svn.wordpress.org/trunk@31538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 17:47:31 +00:00
Sergey Biryukov
49dd31506f Press This: Use correct URL for update bookmarklet link.
props kraftbj.
fixes #31461.
Built from https://develop.svn.wordpress.org/trunk@31556


git-svn-id: http://core.svn.wordpress.org/trunk@31537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 08:48:25 +00:00
Scott Taylor
4ce271ea86 Cleanup the @property annotations for WP_User.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:54:24 +00:00
Scott Taylor
7cb45f2402 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:48:24 +00:00
Scott Taylor
94bd0f93b8 wp_insert_comment() should be checking and setting $compacted, not the non-existent $post_data.
See [31263], #21212.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:38:24 +00:00
Scott Taylor
4310147e54 Add missing access modifiers to WP_Press_This.
See #31456.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:18:25 +00:00
Drew Jaynes
50bb433c66 Ignore the internal-use function _wp_posts_page_notice() from parsing for the code reference.
See #17470.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 03:08:28 +00:00
Helen Hou-Sandí
ae3baa7c5b 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 02:47:25 +00:00
Andrew Ozz
9e7561a8d4 Press This: fix notices/errors classes. Props michael-arestad. Fixes #31456.
Built from https://develop.svn.wordpress.org/trunk@31549


git-svn-id: http://core.svn.wordpress.org/trunk@31530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 01:31:26 +00:00
Andrew Ozz
5f27c59f49 TinyMCE: wpView improvements: remove the (obsolete) get/setViewText methods. Update stopping/pausing of multiple ME media players. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31548


git-svn-id: http://core.svn.wordpress.org/trunk@31529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 00:31:31 +00:00
Andrew Ozz
c30c705ec3 Press This: add press-this.css to the list of stylesheets that are minified. Bump wp_version. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31547


git-svn-id: http://core.svn.wordpress.org/trunk@31528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 23:49:24 +00:00
Andrew Ozz
b799bd8e33 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.
Built from https://develop.svn.wordpress.org/trunk@31546


git-svn-id: http://core.svn.wordpress.org/trunk@31527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 23:13:25 +00:00
Andrew Ozz
3146475ed8 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.
Built from https://develop.svn.wordpress.org/trunk@31545


git-svn-id: http://core.svn.wordpress.org/trunk@31526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 20:16:24 +00:00