Пример #1
-1
 protected function __construct($post)
 {
     parent::__construct($post);
     // Set standard content
     $this->description =& $this->content;
     $this->caption =& $this->excerpt;
     // Retrieve post meta
     $this->alt = get_post_meta($this->id, '_wp_attachment_image_alt', true);
     $this->mime_type = get_post_mime_type($this->id);
     $this->link = wp_get_attachment_url($this->id);
 }