Commit Graph

144 Commits

Author SHA1 Message Date
nacin 06c86f519d In image_resize(), do not force the destination filename to *.jpg when we are dealing with a *.jpeg.
props SergeyBiryukov.
fixes #16458.



git-svn-id: http://core.svn.wordpress.org/trunk@20701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 20:58:57 +00:00
nacin fbea58a1b7 Add filter to image_resize_dimensions() so plugins can perform this calculation on their own. props ebababi. fixes #15989.
git-svn-id: http://core.svn.wordpress.org/trunk@20694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 20:15:44 +00:00
azaozz e8beafd57b Change the image caption shortcode format to [caption ...]<a><img /></a> caption text + html[/caption]. That way HTML tags in captions are better supported and the shortcode wouldn't break when using the wrong quotes. Props sushkov, nacin, fixes #18311
git-svn-id: http://core.svn.wordpress.org/trunk@20679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 01:14:52 +00:00
duck_ 3fdd4ee29f wp_oembed_get() returns false on failure. Props SergeyBiryukov. Fixes #20355.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-22 11:19:56 +00:00
nacin f665eb6a26 Remove enqueue of wp_plupload_default_settings() from admin_enqueue_scripts(). For now, it needs to be enqueued selectively when needed. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 03:21:07 +00:00
koopersmith 9ef7cbbdd8 Theme Customizer: Bind wp_plupload_default_settings() to the customize_controls_enqueue_scripts hook. Fixes JS errors. see #19910, [20189].
git-svn-id: http://svn.automattic.com/wordpress/trunk@20197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 19:46:15 +00:00
nacin ae6bf5bd80 Move wp_plupload_default_settings() to the admin_enqueue_scripts hook to prevent fatal errors when admin_init is run outside of normal admin-header execution, like admin-ajax. see #19910. fixes #20240.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:53:39 +00:00
nacin 4bd9f4f9f2 URL to admin-ajax.php should be relative. see #19910. see #18952.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:52:23 +00:00
nacin 5aba8d043c Ensure no nonce or multipart_params get passed to the plupload_default_settings filter. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:50:18 +00:00
koopersmith c06576d410 Theme Customizer: First pass for upload controls, using background image as an example. Add a wrapper for Plupload that allows for custom upload UIs. see #19910.
wp.Uploader is a wrapper that provides a simple way to upload an attachment (using the wp_ajax_upload_attachment handler). It is intentionally decoupled from the UI. When an upload succeeds, it will receive the attachment information (id, url, meta, etc) as a JSON response. If the upload fails, the wrapper handles both WordPress and plupload errors through a single handler.

As todos, we should add drag classes for the uploader dropzone and account for the rough 100mb filesize limit in most browsers. The UI for the customizer upload controls could be improved as well.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 04:14:05 +00:00
nacin bfeb575df9 Use relative paths for admin-ajax.php to avoid cross-domain issues with IDN domains in IE and Opera. props SergeyBiryukov, fixes #18952.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 16:12:11 +00:00
ryan e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan 07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan 32e25b6aec phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
git-svn-id: http://svn.automattic.com/wordpress/trunk@18827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 22:57:43 +00:00
duck_ 2f51b9be0d Fix typos in documentation (wp-includes/[i-z]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-05 19:08:15 +00:00
ryan 19c3608dcc Remove unused global. Props ocean90. fixes #18484
git-svn-id: http://svn.automattic.com/wordpress/trunk@18605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-25 19:35:22 +00:00
nbachiyski abe8b47351 Explicitly globalize some variables, so that unit tests can run WordPress inside a function. Fixes #17749
git-svn-id: http://svn.automattic.com/wordpress/trunk@18532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-11 04:45:14 +00:00
nacin 59446cff1d Remove default-embeds.php. fixes #17112.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 17:03:23 +00:00
westi 80f4e83a8c Introduce WP_MAX_MEMORY_LIMIT constant for the high memory limit we set when image processing and unzipping.
Ensure it is always filterable by plugins as well as configurable in wp-config
Fixes #13847 props hakre


git-svn-id: http://svn.automattic.com/wordpress/trunk@17749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 16:25:36 +00:00
ryan 4e09dfc8fb Remove PHP4 constructor. Props Jayjdk. see #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-11 18:57:34 +00:00
nacin bd6fe3c99c Document that the size parameter in image_downsize() can also be an array. props scribu, fixes #16263.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-23 18:46:38 +00:00
nacin 96b5c58ec2 use_default_gallery_style boolean filter and new gallery-columns-* class. see #15103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-10 19:15:37 +00:00
nacin 951549bf93 wp-caption-text class for the gallery shortcode caption. props chipbennett, fixes #14411.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-10 19:05:50 +00:00
markjaquith 7290e527e7 Pass post ID to embed_oembed_html filter to avoid global variable incantations. props filosofo. fixes #15491
git-svn-id: http://svn.automattic.com/wordpress/trunk@16740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-06 03:38:27 +00:00
nacin d0098e51bb Unescape ampersands before making an oEmbed request. props Viper007Bond, fixes #14514, see #11311.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-05 02:23:17 +00:00
nacin 69b3167678 Revert [15688], [15689], [15691]. Try again in 3.2. see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-22 17:17:26 +00:00
scribu 7640c5748b Add colon after Upload/Insert. Fixes #14810
git-svn-id: http://svn.automattic.com/wordpress/trunk@16358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 22:52:51 +00:00
scribu fdd3556806 Introduce wp_basename() and use it for media handling. See #11887
git-svn-id: http://svn.automattic.com/wordpress/trunk@16154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-02 17:19:55 +00:00
nacin d1093ac706 More pedantry.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-27 00:33:29 +00:00
nacin 054e18cb05 Docs and breathing room for get_media_buttons() and friends. see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 03:08:39 +00:00
nacin 4e666d5d44 Move some post and taxonomy functions from admin/includes to wp-includes in preparation for QuickPress template tag. Moves get_tags_to_edit, get_terms_to_edit, get_default_post_to_edit, media_buttons, _media_button, get_upload_iframe_src. Also introduce get_media_buttons as a wrapper for media_buttons. props jorbin, see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 02:58:59 +00:00
nacin 5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
markjaquith 7944bd5d82 These are not verbs. http://notaverb.com/badbad_verbs
git-svn-id: http://svn.automattic.com/wordpress/trunk@15473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-27 18:02:45 +00:00
markjaquith 4a1321c8ee Initialize instead of using isset(). props nacin. see #13556
git-svn-id: http://svn.automattic.com/wordpress/trunk@15003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 20:41:36 +00:00
markjaquith 2ac2f215b2 Tweaks to wp_constrain_dimensions() for better fits and consistency. fixes #13556
git-svn-id: http://svn.automattic.com/wordpress/trunk@15002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 20:37:42 +00:00
nacin 4de1c8edf4 Add some educational tips. Suggest using add_image_size() in the inline docs for image_get_intermediate_size() and wp_get_attachment_image(). props jorbin. see #13556.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 05:03:46 +00:00
markjaquith 6655fa6bc7 Use the correct array members of image_resize_dimensions() result when calculating best match for dynamic HTML image resize. fixes #13556
git-svn-id: http://svn.automattic.com/wordpress/trunk@14979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 04:40:14 +00:00
nacin 4d7c88f4a4 Introduce is_rtl(). Use it in core. It only becomes defined when locale is loaded, so it's impossible to use it too early. Deprecate the get_bloginfo('text_direction') call. fixes #13206.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 05:49:19 +00:00
dd32 f7e764312b Fix invalid paths in requires. See r14139. See #12594
git-svn-id: http://svn.automattic.com/wordpress/trunk@14151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 09:51:19 +00:00
dd32 3eec9dd73f Use Alt Text for Image alt caption (Falling back to Caption, and finally title) in wp_get_attachment_image() and subsequently, WordPress Galleries. Props kallewangstedt for initial patch. Fixes #11846
git-svn-id: http://svn.automattic.com/wordpress/trunk@14145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 08:52:18 +00:00
nacin 6ec7cb4540 Use relative paths when including files, avoiding include_path. fixes #12594, props sorich87.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 06:14:45 +00:00
nacin 207a1d6958 Consistently return WP_Error on failure in image_resize. props filosofo, fixes #12268
git-svn-id: http://svn.automattic.com/wordpress/trunk@14105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 13:53:22 +00:00
nacin c29313ab4d Register a dummy [media] shortcode for strip_shortcodes et al. props belg4mit, Viper007Bond. fixes #12505
git-svn-id: http://svn.automattic.com/wordpress/trunk@14035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-08 02:16:21 +00:00
dd32 bf6510abd1 Fix image_resize() dependencies by moving wp_load_image() from admin includes to wp-includes. Fixes #7279
git-svn-id: http://svn.automattic.com/wordpress/trunk@13860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-28 03:39:00 +00:00
dd32 47c064b890 Check if function exists before using it. imageistruecolor() requires PHP 4.3.2, WordPress requires 4.3.0 at this stage. Fixes #12297
git-svn-id: http://svn.automattic.com/wordpress/trunk@13857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-28 02:57:09 +00:00
nacin a7feaed0e6 Change @since 3.0 to @since 3.0.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:13:36 +00:00
nacin 8c8bf5039f Remove unnecessary ternary operators such as (expr) ? true : false.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-19 21:15:00 +00:00
nacin 8bcc5969dc Spelling and grammar fun. Fixes #11875 props cnorris23
git-svn-id: http://svn.automattic.com/wordpress/trunk@13382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 20:13:23 +00:00
ryan 9ab7306993 Remove author tags. fixes #12366
git-svn-id: http://svn.automattic.com/wordpress/trunk@13377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 19:07:21 +00:00
markjaquith 3284d920c0 Skip intermediate sizes of a different aspect ratio than the original image when considering which image to use in image_get_intermediate_size(). fixes #12218
git-svn-id: http://svn.automattic.com/wordpress/trunk@13145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-14 08:21:07 +00:00