Commit Graph

29370 Commits

Author SHA1 Message Date
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
Aaron Jorbin 21f4857a32 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31558 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 17:49:13 +00:00
Aaron Jorbin 39d1f621fd 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



git-svn-id: https://develop.svn.wordpress.org/trunk@31557 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 17:46:33 +00:00