Switch language

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




get_attachment_innerhtml [ WordPress Function ]

get_attachment_innerhtml ( $id = 0, $fullsize = false, $max_dims = false )
Parameters:
  • (int) $id Optional. Post ID.
  • (bool) $fullsize Optional, default to false. Whether to have full size image.
  • (array) $max_dims Optional. Dimensions of image.
See:
Returns:
  • (string)
Defined at:



Retrieve HTML content of image element.

Source


<?php
function get_attachment_innerHTML($id 0$fullsize false$max_dims false) {
    
_deprecated_function__FUNCTION__'2.5''wp_get_attachment_image()' );
    
$id = (int) $id;
    if ( !
$post = & get_post($id) )
        return 
false;

    if ( 
$innerHTML get_attachment_icon($post->ID$fullsize$max_dims))
        return 
$innerHTML;

    
$innerHTML esc_attr($post->post_title);

    return 
apply_filters('attachment_innerHTML'$innerHTML$post->ID);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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