Commit Graph

369 Commits

Author SHA1 Message Date
Andrew Nacin 5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +00:00
Andrew Nacin 8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Andrew Nacin 74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Andrew Nacin f0eb99952c Make sure when resizing an image according to ratio we do not end up with a zero-pixel width or height.
props plocha.
fixes #25038.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-09 19:07:17 +00:00
Dominik Schilling 51ff617278 Allow to filter the `link` attribute via `shortcode_atts_gallery`. props iworks. fixes #24979.
Built from https://develop.svn.wordpress.org/trunk@25665


git-svn-id: http://core.svn.wordpress.org/trunk@25581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 20:46:09 +00:00
Sergey Biryukov 7c5d11d671 Make the arguments of 'wp_audio_shortcode_override' and 'wp_video_shortcode_override' more consistent with the ones of 'img_caption_shortcode' and 'post_gallery' filters.
see #25313.
Built from https://develop.svn.wordpress.org/trunk@25485


git-svn-id: http://core.svn.wordpress.org/trunk@25406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 22:06:09 +00:00
Sergey Biryukov dd6e39bfb1 Replace non-functional 'wp_audio_shortcode_handler' and 'wp_video_shortcode_handler' filters with 'wp_audio_shortcode_override' and 'wp_video_shortcode_override'.
props ericlewis, SergeyBiryukov.
fixes #25313.
Built from https://develop.svn.wordpress.org/trunk@25484


git-svn-id: http://core.svn.wordpress.org/trunk@25405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 21:20:09 +00:00
Andrew Nacin 031576d79e Introduce a img_caption_shortcode_width filter for controlling the inline style of the image caption shortcode.
props iandunn for the initial patch.
fixes #14380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 20:45:09 +00:00
Sergey Biryukov 045f93f3b2 Ignore case differences when checking file extension in wp_audio_shortcode() and wp_video_shortcode(). props nofearinc, bhengh. fixes #25140.
Built from https://develop.svn.wordpress.org/trunk@25128


git-svn-id: http://core.svn.wordpress.org/trunk@25108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-26 19:21:10 +00:00
Andrew Nacin 6861353737 Set audio player to width: 100% and avoid breaking the layout in iOS when we fall back to a link.
props markjaquith, davidjlaietta.
fixes #24896.



git-svn-id: http://core.svn.wordpress.org/trunk@24948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 14:48:39 +00:00
Andrew Nacin 7d53482cee Use wp_get_mime_types() when calling wp_check_filetype() in the audio and video shortcodes. fixes #24911.
git-svn-id: http://core.svn.wordpress.org/trunk@24944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 13:33:15 +00:00
Andrew Nacin bd1d854f10 When rendering an audio or video shortcode in IE 6-8, call document.createElement() as a poor man's HTML5 shiv. see #24902.
git-svn-id: http://core.svn.wordpress.org/trunk@24931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-31 20:36:47 +00:00
Andrew Nacin 70109f6202 Update HTML classes in the audio and video shortcodes. props rfair404. fixes #24820.
git-svn-id: http://core.svn.wordpress.org/trunk@24857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 06:51:46 +00:00
Mark Jaquith 0a2ca92b33 Fix a variable typo in `get_post_gallery_images()`.
props rodrigosprimo. Fixes #24202 for trunk.

git-svn-id: http://core.svn.wordpress.org/trunk@24837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 00:52:31 +00:00
Mark Jaquith 48eefd5240 Oops. Forgot that we support a PHP version from 2007. Either that or I've been doing a lot of JS.
Props kovshenin. See [24789].

git-svn-id: http://core.svn.wordpress.org/trunk@24792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-24 06:36:29 +00:00
Mark Jaquith 290d61138c Fix some sizing issues with video embeds, and improve video/audio embed shortcode flexibility.
* `loop`, `autoplay`, and `preload` are now available via the shortcode. Use them non-annoyingly, please!
* Attributes that pass through the filters are now proper key/value pairs, not an array of `key="value"` strings.
* `preload` defaults to `metadata` for videos. This fixes the vertical video preview and Safari ogv/webm playback issues.
* Wrap a div around video embeds to combat a ME.js issue with responsive width=100% themes. Props kovshenin.

Fixes #24134, #24798.

git-svn-id: http://core.svn.wordpress.org/trunk@24789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-24 05:52:49 +00:00
Andrew Nacin 2c67dea9bc Media: Add awareness to Attachment Display Settings that audio and video can be embedded.
Also:
 * Add file length metadata to Attachment Details.
 * Round the kb/s bitrate on post.php.

fixes #24449.



git-svn-id: http://core.svn.wordpress.org/trunk@24777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-23 05:39:08 +00:00
Andrew Nacin 769e3e9b5d Drop get_images_in_content() and get_image_in_content(), until recently get_content_image(s)(). fixes #24202.
git-svn-id: http://core.svn.wordpress.org/trunk@24685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 20:34:07 +00:00
Andrew Nacin 75ab12808b Add types parameter to get_media_embedded_in_content(). props aaroncampbell. see #24202.
git-svn-id: http://core.svn.wordpress.org/trunk@24684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 19:51:59 +00:00
Andrew Nacin 4a1e326c1f Simplify and reduce the new media/content extraction functions.
The URL extraction function is now get_url_in_content(). For more, see #24202.

Also adds filters to get_post_galleries() and get_post_gallery(). fixes #24309.



git-svn-id: http://core.svn.wordpress.org/trunk@24682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 19:34:59 +00:00
Andrew Nacin 44abe2e502 Use wp_basename() in newer media code for filenames to avoid encoding issues on display. props SergeyBiryukov, fixes #23267.
git-svn-id: http://core.svn.wordpress.org/trunk@24585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 13:55:50 +00:00
Mark Jaquith 86c7950173 Make sure `get_post_gallery()` doesn't ever return an array when asked for a string.
props kovshenin, wonderboymusic, ocean90. fixes #24270.

git-svn-id: http://core.svn.wordpress.org/trunk@24572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 20:54:46 +00:00
Mark Jaquith 5da392a62f Drop some wrapper functions
* `get_attached_audio()` (use `get_attached_media( 'audio' )`)
* `get_attached_images()` (use `get_attached_media( 'image' )`)
* `get_attached_videos()` (use `get_attached_media( 'video' )`)

props wonderboymusic. fixes #23843.

git-svn-id: http://core.svn.wordpress.org/trunk@24571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 20:41:49 +00:00
Dominik Schilling 8c9c035d94 Remove the_post_format_gallery(). see #24452.
git-svn-id: http://core.svn.wordpress.org/trunk@24570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 20:37:12 +00:00
Dominik Schilling 26873abe38 Remove img_html_to_post_id(). It's unused since [24555]. fixes #24610.
git-svn-id: http://core.svn.wordpress.org/trunk@24569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 18:45:41 +00:00
Mark Jaquith d0d6e4aa51 Remove some more post format functions.
props wonderboymusic. fixes #24610.

git-svn-id: http://core.svn.wordpress.org/trunk@24555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-04 06:57:00 +00:00
Dominik Schilling 6ba7413fbd Lose content removal and splitting from get_content_url(). And remove unneeded lines from [24400].
fixes #24484.

git-svn-id: http://core.svn.wordpress.org/trunk@24554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-03 22:36:13 +00:00
Andrew Nacin 66054d7ffe Allow gallery to be inserted with no links on the images. props chipbennett, helgatheviking, aaroncampbell, wonderboymusic. fixes #18178.
git-svn-id: http://core.svn.wordpress.org/trunk@24550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-03 20:43:19 +00:00
Andrew Nacin 98832852dc Remove attachment_url_to_postid(). props kovshenin, wonderboymusic. see #24458.
git-svn-id: http://core.svn.wordpress.org/trunk@24548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-03 20:23:48 +00:00
Andrew Nacin 6500a24719 Call shortcode functions directly. props kovshenin, fixes #24505.
git-svn-id: http://core.svn.wordpress.org/trunk@24547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-03 20:19:00 +00:00
Mark Jaquith 28e3c51dab Lose content removal and splitting from the media extraction functions.
see #24484

git-svn-id: http://core.svn.wordpress.org/trunk@24400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-03 19:27:58 +00:00
Andrew Nacin c5033c96f5 No need for a pass-by-reference here. props sunnyratilal, fixes #24433.
git-svn-id: http://core.svn.wordpress.org/trunk@24376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-27 15:47:46 +00:00
Sergey Biryukov 5f05c95014 Add @return for get_the_post_format_image(). Make sure the function always returns a string. props tollmanz. fixes #24414. see #24348.
git-svn-id: http://core.svn.wordpress.org/trunk@24352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-24 23:56:00 +00:00
Jon Cave 94a56f3bbf Properly escape source parameter in audio/video shortcodes. See #23282.
git-svn-id: http://core.svn.wordpress.org/trunk@24334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-23 17:45:59 +00:00
Sergey Biryukov 71b6d68ad5 Switch to a CSS comment in gallery_shortcode() to avoid breaking markup when the shortcode is used inside an HTML comment. props mark-k, aaroncampbell. fixes #23787.
git-svn-id: http://core.svn.wordpress.org/trunk@24329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-22 22:27:53 +00:00
Ryan Boren f14b0c3e13 Remove redundant post ID validation.
Props SergeyBiryukov
fixes #24199


git-svn-id: http://core.svn.wordpress.org/trunk@24249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-14 13:57:59 +00:00
Mark Jaquith 74c6071b9d Improve regular expressions by using a backreference to match right quote of quote pair when matching attributes.
props kovshenin. see #24225.

git-svn-id: http://core.svn.wordpress.org/trunk@24241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 22:54:33 +00:00
Mark Jaquith 34455bbbd8 Return the requested image size in get_the_post_format_image()
props kovshenin. fixes #24188.

git-svn-id: http://core.svn.wordpress.org/trunk@24240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 22:49:24 +00:00
Ryan Boren bb51b4e239 Avoid warning in gallery_shortcode() when called outside of post context.
Props kovshenin
fixes #24272


git-svn-id: http://core.svn.wordpress.org/trunk@24198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 16:57:58 +00:00
Andrew Nacin 3139a0451e Variables passed by reference do not need to be set first.
props kovshenin.
see #24222.



git-svn-id: http://core.svn.wordpress.org/trunk@24129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 14:48:31 +00:00
Sergey Biryukov 93b0b5c32c Remove extraneous function parameters in wp_video_shortcode(). props rlerdorf. see #24210.
git-svn-id: http://core.svn.wordpress.org/trunk@24122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 00:56:27 +00:00
Sergey Biryukov d1966150dc Fix typo in get_the_post_format_image(). props rlerdorf. see #23964. see #24210.
git-svn-id: http://core.svn.wordpress.org/trunk@24118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-28 06:36:39 +00:00
Mark Jaquith e2fbad7ee0 the_post_format_gallery() (and Twenty Thirteen using it).
fixes #24126. props obenland, wonderboymusic.

git-svn-id: http://core.svn.wordpress.org/trunk@24093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 07:42:59 +00:00
Mark Jaquith 3f231a1758 Smarter structured post format caching.
fixes #24002. props kovshenin, wonderboymusic.

git-svn-id: http://core.svn.wordpress.org/trunk@24091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 07:10:35 +00:00
Mark Jaquith 254ea5ad54 Fix issue with [embed] in post_format_compat.
props kovshenin. fixes #24070.

git-svn-id: http://core.svn.wordpress.org/trunk@24083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 03:52:05 +00:00
Mark Jaquith d9d5c5eb03 Allow the_post_format_image() to choose an image size late in the game.
props davidwilliamson, SergeyBiryukov. fixes #23945.

git-svn-id: http://core.svn.wordpress.org/trunk@24079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 02:28:30 +00:00
Mark Jaquith cd0bbd830c Fix mangled image output in compat function.
props wonderboymusic. see #24175.

git-svn-id: http://core.svn.wordpress.org/trunk@24078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 02:18:49 +00:00
Mark Jaquith 0a49442e35 Multiple improvements to image post format insertion and display.
* get_tag_regex() altered based on Unit Tests.
* Changes to post-formats.js to provide size and link context during image selection.
* Captions are now output in the_post_format_image() when present.
* The meta value for url is respected for the image post format when the HTML in the image meta doesn't include a link

props wonderboymusic. fixes #23965, #23964. see #24147, #24046.

git-svn-id: http://core.svn.wordpress.org/trunk@24066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 22:11:42 +00:00
Mark Jaquith 412161de03 Standardize post format postmeta keys around the ones already used by the Crowd Favorite plugin.
props wonderboymusic. fixes #24010.

git-svn-id: http://core.svn.wordpress.org/trunk@24021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-17 20:57:44 +00:00
Mark Jaquith 56d5d62a19 New Post Format UI chooser treatment in response to testing.
* Bigger icons
* Format description under each
* UI hides after choice
* Saving without choosing implies "Standard"
* Helpful text, with "Change format" link

see #24046. props lessbloat, wonderboymusic.

git-svn-id: http://core.svn.wordpress.org/trunk@24006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-17 04:08:46 +00:00