Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




image_media_send_to_editor [ WordPress Function ]

image_media_send_to_editor ( $html, $attachment_id, $attachment )
Parameters:
  • (unknown_type) $html
  • (unknown_type) $attachment_id
  • (unknown_type) $attachment
Returns:
  • (unknown)
Defined at:



{@internal Missing Short Description}}

Source


<?php
function image_media_send_to_editor($html$attachment_id$attachment) {
    
$post =& get_post($attachment_id);
    if ( 
substr($post->post_mime_type05) == 'image' ) {
        
$url $attachment['url'];
        
$align = !empty($attachment['align']) ? $attachment['align'] : 'none';
        
$size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium';
        
$alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : '';
        
$rel = ( $url == get_attachment_link($attachment_id) );

        return 
get_image_send_to_editor($attachment_id$attachment['post_excerpt'], $attachment['post_title'], $align$url$rel$size$alt);
    }

    return 
$html;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics