Commit Graph

29303 Commits

Author SHA1 Message Date
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
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