Tag Info

Here's what you can do. There's a filter at the beginning of the shortcode execution function for the front end that will let you hijack the captions. Returning a non-empty value will stop execution of the shortcode, so if you just process the shortcode the way you want it to be processed and return that result, you can get rid of the pesky 10px of inline ...

Another possibility is to change the shortcode output so that the width is no longer hard-coded. Modifying the Codex example to have no width:
add_filter('img_caption_shortcode', 'my_img_caption_shortcode_filter',10,3);
/**
* Filter to replace the [caption] shortcode text with HTML5 compliant code
*
* @return text HTML content describing embedded ...

That caption shortcode is built into WordPress. It should generate the same markup for any theme, unless the theme or a plugin has unregistered it and registered a replacement. I don't know if that is the case with your theme or with TwentyEleven. Look for 'img_caption_shortcode' in your theme files, probably functions.php. If your theme is unregistering it, ...

I'm glad that better support should be added in version 3.4 but for now I've fixed the issue by changing the behaviour of image insertion so that it doesn't use the [caption] shortcode.
Here's what I added to functions.php:
add_filter( 'disable_captions', create_function('$a', 'return true;') );
function image_send_to_editor_2($html, $id, $caption, ...

The latest versions of WP have really improved the filterability of caption arguments, so I think this new answer will have the smallest footprint and safest operation.
What we need to do is directly filter $atts['caption'] during shortcode_atts() for the [caption] shortcode. We can do this with the shortcode_atts_caption filter which only affects the ...

To use this you will need to add this to in place of your themes thumbnail function:
function your_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)
{
$attachment =& get_post($post_thumbnail_id);
if ($attachment->post_excerpt || $attachment->post_content) {
$html .= '<p class="thumbcaption">';
if ...

Yes, it stores the caption in it's own place in the DB. I can't quote the exact location but in Wordpress, "Attachments" are a post type and it stores each attachment just like a post. For an attachment post type, it treats the Image Caption as the_excerpt the Image Description as the_content and the Image Title as... the_title.

There's really no documentation for it yet, but you'll probably be able to do it hooking to the attachment_fields_to_save filter and inserting the default caption there.
From the Codex:
attachment_fields_to_save
applied to fields associated with an
attachment prior to saving them in the database. Called in the
media_upload_form_handler function. ...

Have you tried this for NextGen? - http://wordpress.org/support/topic/nextgen-image-gallery-captions
Excerpt (many other useful tips at the linked thread):
ENABLING CAPTIONS BELOW GALLERY IMAGES
When you add a gallery to a post/page, you get this by default:
[nggallery id=1]
You need to add this:
[nggallery id=1 template=caption]
...

Image captions in Wordpress are actually shortcodes.
Shortcodes are applied by the filter:
$content = apply_filters('the_content', $content);
For example, Wordpress creates the following code in your content when you enter an image caption:
[caption id="attachment_55" align="alignleft" width="127" caption="Here is my caption"][/caption]
You need to ...

That markup is created by the caption shortcode. If you look at the the source for that shortcode you will see this:
// Allow plugins/themes to override the default caption template.
$output = apply_filters('img_caption_shortcode', '', $attr, $content);
if ( $output != '' )
return $output;
That means that you can hook a function into ...

There is a hook inside the caption shortcode that will allow you to hijack the whole thing. Most of the following is copied from the Core img_caption_shortcode function.
function nested_img_caption_shortcode($nada, $attr, $content = null) {
extract(
shortcode_atts(
array(
'id' => '',
'align' => 'alignnone',
'width' ...

First of all I don't think that create a custom post type only for backgrounds is a right choose: backgrond are images and images already have their post type: attachment.
If you have Worpress 3.5+ you can register a custom taxonomy for attachments, call it, e.g. 'image_scope' :
register_taxonomy('image_scope', 'attachment', $args );
for the $args array ...

Here is an example below where you can embed html tags within the Caption box and it will style your caption text accordingly.
Also, don't forget that WordPress applies a default class of wp-caption to your caption elements for which you can further use to specify custom CSS properties, so technically you can wrap text within your caption box also using ...

Can you try something along these lines and report back the result?
<?php if(qtrans_getLanguage()=='en'): ?>
// attachment if statement
<?php else if(qtrans_getLanguage()=='fr'): ?>
// attachment if statement
<?php endif; ?>
Technically you could omit the second else if statement and replace it just with <?php else : ?> ...

I know this is kind of primitive, but if all you really need to do is keep them from editing the caption when they hit ADD MEDIA you can just paste this into your functions.php
add_action('admin_head', 'disable_caption_editing');
function disable_caption_editing() {
echo "<style>.setting[data-setting='caption'] { display: none; }</style>";
}
...