Commit Graph

14155 Commits

Author SHA1 Message Date
Andrew Ozz
2f4b08860b TinyMCE wpView: remove leftover/unused bits, see #28567.
Built from https://develop.svn.wordpress.org/trunk@29038


git-svn-id: http://core.svn.wordpress.org/trunk@28826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 22:56:14 +00:00
Helen Hou-Sandí
3575612966 Customizer panels:
* Close all accordion sections when going in and out of panels.
* Fix panel positioning when top-level Customizer controls are scrolled down.
* Keyboard accessibility: only focus on visible elements and transfer between them as needed when navigating around panels.

props celloexpressions. see #27406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 20:19:15 +00:00
John Blackbourn
1e681c1421 Add a create_wp_error action which is called when a WP_Error instance is created. Fixes #28319. Props ebinnion
Built from https://develop.svn.wordpress.org/trunk@29033


git-svn-id: http://core.svn.wordpress.org/trunk@28821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 18:47:15 +00:00
Scott Taylor
57dbc55e6e When setting the poster image for a video shortcode, set that image as the featured image for that attachment (if found) in the background. This AJAX functionality could be used for audio as well.
Introduces `attachment_url_to_postid()` to attempt to turn URLs into post IDs.

Fixes #27891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 17:48:17 +00:00
Sergey Biryukov
0b921efe38 Use wp_hash() instead of AUTH_KEY in WP_Customize_Widgets::get_instance_hash_key().
props juliobox.
fixes #28783.
Built from https://develop.svn.wordpress.org/trunk@29028


git-svn-id: http://core.svn.wordpress.org/trunk@28816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 17:17:14 +00:00
Scott Taylor
dc7c246da3 Allow an array() to be passed as the value for orderby to WP_Query. Allows for an independent order value for each key.
Example: `'orderby' => array( 'title' => 'DESC', 'menu_order' => 'ASC' )`.

Adds docs and unit tests.

Props wonderboymusic, johnbillion, DrewAPicture, dd32, andy.
See #17065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 17:16:15 +00:00
Helen Hou-Sandí
b6d3c0841e Prompt the user before leaving the Customizer if they have unsaved changes. props westonruter. fixes #25439.
Built from https://develop.svn.wordpress.org/trunk@29025


git-svn-id: http://core.svn.wordpress.org/trunk@28813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 17:04:15 +00:00
John Blackbourn
32224314a5 Pass the post object rather than the post ID between the post permalink functions. Fixes #28425. Props arnee
Built from https://develop.svn.wordpress.org/trunk@29024


git-svn-id: http://core.svn.wordpress.org/trunk@28812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 15:48:17 +00:00
Andrew Ozz
f44553d78c Pre-commit autoprefixer fixes for media-views.css
Built from https://develop.svn.wordpress.org/trunk@29023


git-svn-id: http://core.svn.wordpress.org/trunk@28811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 04:30:15 +00:00
Andrew Ozz
00ff787a86 TinyMCE wpView:
- Improve the fake caret hide/show.
- Improve getView() speed.
- Add callback for showing the proper path when a view is selected. This currently doesn't work, will start working after we update TinyMCE.
props avryl, see #28567, #28595.
Built from https://develop.svn.wordpress.org/trunk@29022


git-svn-id: http://core.svn.wordpress.org/trunk@28810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 04:15:14 +00:00
John Blackbourn
64f686b4c8 Focus and blur styling (via JS) for the install screen language selector. Props jorbin. See #28577
Built from https://develop.svn.wordpress.org/trunk@29020


git-svn-id: http://core.svn.wordpress.org/trunk@28808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 00:30:14 +00:00
Andrew Ozz
93170e58fa TinyMCE wpView:
- Add loadingPlaceholder() that returns some html to use as placeholder while the view is loading. Includes a subtle CSS based loading animation.
- Fix setContent(), it should empty the element before appending the new node.
- Change getHtml() to always return a string.
Fixes #28761.
Built from https://develop.svn.wordpress.org/trunk@29019


git-svn-id: http://core.svn.wordpress.org/trunk@28807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 22:41:15 +00:00
Helen Hou-Sandí
d7abad48e0 Remove some unnecessary empty space in the media library grid view. props adamsilverstein. see #24716.
Built from https://develop.svn.wordpress.org/trunk@29017


git-svn-id: http://core.svn.wordpress.org/trunk@28805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 20:30:16 +00:00
Drew Jaynes
9ef7c41a15 Inline docs syntax fixes following [28978].
See #28740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 16:42:16 +00:00
Sergey Biryukov
c321e40016 Introduce 'rss_tag_pre' action, which fires between the xml and rss tags in a feed.
props solarissmoke, wonderboymusic, DrewAPicture.
fixes #19017.
Built from https://develop.svn.wordpress.org/trunk@29014


git-svn-id: http://core.svn.wordpress.org/trunk@28802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 10:18:15 +00:00
Drew Jaynes
f5b5b89e66 Fix inconsistent language in two function descriptions in wp-includes/functions.php.
Also adds correct coding standards to a code sample in `_deprecated_argument()`.

Props TobiasBg.
Fixes #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 07:08:15 +00:00
Drew Jaynes
b8750d5bb6 Add phpDoc blocks for two WP_oEmbed methods added in [28846].
Fixes #28284.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 06:34:14 +00:00
Drew Jaynes
9f8ddaa627 General inline documentation improvements in wp-includes/functions.php.
Final run. Fixes #26185.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 06:19:14 +00:00
Andrew Ozz
bf9908b37f TinyMCE wpView:
- When a view is selected, pressing the up or down arrow key should move the caret to the block above or below the view.
- Selecting some text that touches the view and deleting it should not remove part of the view.
- Show/hide the "fake" carets on editor focus/blur.
- Don't create new paragraphs before or after a view on pressing the arrow keys or delete key. Paragraphs are created on pressing Enter.
Props avryl, see #28595.
Built from https://develop.svn.wordpress.org/trunk@29010


git-svn-id: http://core.svn.wordpress.org/trunk@28798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 01:21:15 +00:00
Sergey Biryukov
4a11203b06 Clarify a string on Add New User screen.
props vancoder, collinsinternet.
fixes #27398.
Built from https://develop.svn.wordpress.org/trunk@29009


git-svn-id: http://core.svn.wordpress.org/trunk@28797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-07 00:54:14 +00:00
Sergey Biryukov
8d358a16c3 Exclude a newline between delimeters from further checks in wptexturize() for better performance.
props miqrogroove.
fixes #28724.
Built from https://develop.svn.wordpress.org/trunk@29008


git-svn-id: http://core.svn.wordpress.org/trunk@28796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-06 08:50:18 +00:00
Andrew Nacin
4e2f1bd155 Introduce wp_dropdown_languages() and use it on general settings.
Early rough cut. Obviously not fully implemented.

see #15677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-05 06:19:16 +00:00
Andrew Ozz
e4fb3e7695 Remove debug remnants, see #28595
Built from https://develop.svn.wordpress.org/trunk@29004


git-svn-id: http://core.svn.wordpress.org/trunk@28792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-05 00:25:14 +00:00
Sergey Biryukov
2550fb200a Add 'status-sticky' class in get_post_class() for sticky posts in the admin.
props mordauk, netweb.
fixes #22590.
Built from https://develop.svn.wordpress.org/trunk@29003


git-svn-id: http://core.svn.wordpress.org/trunk@28791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-05 00:13:14 +00:00
Sergey Biryukov
6827624501 Fix alignment of Advanced Options close toggle arrow in Edit Media dialog.
props paulwilde.
fixes #28752.
Built from https://develop.svn.wordpress.org/trunk@29001


git-svn-id: http://core.svn.wordpress.org/trunk@28789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 23:38:15 +00:00
Sergey Biryukov
9587c27aab Fix a regression of positioning in Attachment Display Settings.
props paulwilde.
see #24716.
Built from https://develop.svn.wordpress.org/trunk@29000


git-svn-id: http://core.svn.wordpress.org/trunk@28788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 23:29:16 +00:00
Sergey Biryukov
7197468003 Add is_customize_preview(), a conditional function to check if the site is being previewed in the Customizer.
props sammybeats, mattwiebe.
fixes #23509.
Built from https://develop.svn.wordpress.org/trunk@28999


git-svn-id: http://core.svn.wordpress.org/trunk@28787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 16:17:15 +00:00
Scott Taylor
53bd731570 Media Grid: JSHint fixes.
See #24716. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@28786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:14:15 +00:00
Scott Taylor
6b377e12a0 Media Grid: Use the proper attachment value for uploadedToTitle.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:04:15 +00:00
Scott Taylor
2938a50a28 Media Grid: for audio and video files with covers, show that instead of the icon. The filename is still present with the extension to identify the type.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:00:14 +00:00
Scott Taylor
9a1ac73c34 Make media grid text fields (data) toggle-able. Checking/unchecking is saved in user settings cookie.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 04:48:15 +00:00
Andrew Ozz
fb559a8095 TinyMCE: improve the way wpViews work. Add two paragraphs and capture the caret in them on clicking before/after/left/right of a view or moving the caret with the arrow keys, then show a "fake" caret.
This makes it much more "natural" to move the caret with the arrow keys and to add paragraphs before a view when it is the first element or after a view when it's last.

Props avryl, see #28595.
Built from https://develop.svn.wordpress.org/trunk@28994


git-svn-id: http://core.svn.wordpress.org/trunk@28782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 03:59:15 +00:00
Helen Hou-Sandí
63f9cbd02a Media grid, round 2. Expect much more to come.
* Instead of a sidebar for details, utilize a modal. The modal experience allows for a larger preview, editing images, audio/video previews, and previous/next navigation, like the theme browser. Think of it as an attachment browser.
* Show some details in the grid view to more easily distinguish items.

props ericlewis, wonderboymusic, JerrySarcastic. see #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 03:39:15 +00:00
Scott Taylor
0546378ce8 Make a new file: media-grid.js. This will be way more useful in later commits and help reduce churn and bloat in media-views.js.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:18:14 +00:00
Scott Taylor
1637dbe164 The MCE view for galleries needs to read wp.media.galleryDefaults.columns after [28990].
See #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:06:14 +00:00
Scott Taylor
1571d3c47c Allow users to override default gallery settings in JS via wp_localize_script(). This is already possible in PHP by filtering shortcode_atts_gallery.
Fixes #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:03:14 +00:00
Scott Taylor
0510e0e589 Add more docs for media.view.MediaFrame.Select methods.
Props ericlewis.
See #28459.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:43:17 +00:00
Scott Taylor
9d123aa326 WP_Query::parse_tax_query() has always been documented as protected. Plugins should never have used it. However, it did not have a protected access modifier, so its visibility was public by default. If the access modifier had been present, accessing the method in a plugin would have produced a fatal error. The access modifier was added in [28523], along with magic methods to allow it to be accessed for BC. This one method is problematic because it expects to be passed a reference. The WP_Query::__call() logic does not go out of its way to fix this signature discrepancy, and so a warning is thrown: Parameter 1 to WP_Query::parse_tax_query() expected to be a reference, value given.
Remove the `protected` access modifier from `WP_Query::parse_tax_query()`.

Fixes #28739.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:29:14 +00:00
Scott Taylor
5eb23f8e3c Optimize regexp usage in wptexturize() for a "3x Performance Boost."
Props miqrogroove.
See #28724.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:15:15 +00:00
Scott Taylor
9181f36b7e Add IE11 to the browser whitelist for MediaElement-based MCE views.
Props azaozz.
Fixes #28742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:10:15 +00:00
Helen Hou-Sandí
2f399f18b7 Remove a toolbar CSS hack for a Chrome bug that no longer appears to exist. props avryl. fixes #28606. see #18868.
Built from https://develop.svn.wordpress.org/trunk@28981


git-svn-id: http://core.svn.wordpress.org/trunk@28770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 20:20:15 +00:00
Helen Hou-Sandí
fee65bacd7 Don't escape customizer control descriptions, just as section descriptions are not escaped. These are set programmatically, not via user input. props tollmanz. fixes #27981.
Built from https://develop.svn.wordpress.org/trunk@28980


git-svn-id: http://core.svn.wordpress.org/trunk@28769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 20:11:15 +00:00
Andrew Nacin
b35982cbff Simplify the setup-config.php UI flow and load process.
When no configuration file is detected, we now redirect to setup-config.php. This process now uses the WordPress bootstrap, rather than a set of fragile hacks.

fixes #28740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:57:14 +00:00
Drew Jaynes
6623df8b1f Clarify the inline documentation for plugins_url() to reflect that it also works with mu-plugins.
Props ericlewis.
See #28499.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:42:15 +00:00
Drew Jaynes
d4dd02b4ae Remove backticks on $post variables in some short parameter descriptions.
See [28653], [28654].
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:28:14 +00:00
John Blackbourn
fd2d2ebb2e Correct typo in sanitize_html_class() docblock.
Built from https://develop.svn.wordpress.org/trunk@28973


git-svn-id: http://core.svn.wordpress.org/trunk@28762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:58:16 +00:00
Helen Hou-Sandí
5f6b531f70 Improve oEmbed caching. Introduces the concept of a TTL for oEmbed caches and a filter for oembed_ttl.
We will no longer replace previously valid oEmbed responses with an `{{unknown}}` cache value. When this happens due to reaching a rate limit or a service going down, it is data loss, and is not acceptable. This means that oEmbed caches for a post are no longer deleted indiscriminately every time that post is saved.

oEmbed continues to be cached in post meta, with the addition of a separate meta key containing the timestamp of the last retrieval, which is used to avoid re-requesting a recently cached oEmbed response. By default, we consider a valued cached in the past day to be fresh. This can greatly reduce the number of outbound requests, especially in cases where a post containing multiple embeds is saved frequently.

The TTL used to determine whether or not to request a response can be filtered using `oembed_ttl`, thus allowing for the possibility of respecting the optional oEmbed response parameter `cache_age` or altering the period of time a cached value is considered to be fresh.

Now that oEmbeds are previewed in the visual editor as well as the media modal, oEmbed caches are often populated before a post is saved or published. By pre-populating and avoiding having to re-request that response, we also greatly reduce the chances of a stampede happening when a published post is visible before oEmbed caching is complete.

As it previously stood, a stampede was extremely likely to happen, as the AJAX caching was only triggered when `$_GET['message']` was 1. The published message is 6. We now trigger the caching every time `$_GET['message']` is present on the edit screen, as we are able to avoid triggering so many HTTP requests overall.

props markjaquith. fixes #14759. see #17210.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:45:14 +00:00
Sergey Biryukov
c6c1f56d60 Fix texturization of quotes when enclosed by angle brackets.
props miqrogroove.
fixes #28718.
Built from https://develop.svn.wordpress.org/trunk@28971


git-svn-id: http://core.svn.wordpress.org/trunk@28760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:22:14 +00:00
Sergey Biryukov
2f344b9d3c Prevent sending a 404 status when returning the response for the customize preview, since it causes the jQuery Ajax to fail. Send 200 instead.
props westonruter.
fixes #27992.
Built from https://develop.svn.wordpress.org/trunk@28970


git-svn-id: http://core.svn.wordpress.org/trunk@28759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:10:15 +00:00
Sergey Biryukov
4e75d406ec Pass $post object to 'preview_post_link' filter.
props danielbachhuber.
fixes #28729.
Built from https://develop.svn.wordpress.org/trunk@28969


git-svn-id: http://core.svn.wordpress.org/trunk@28758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 14:42:15 +00:00