function fix_attachment_body($content, $cell, $renderer) { global $post; // Do not render attachment post type posts' bodies automatically if ($this->is_wp_post_object($post) && $post->post_type === 'attachment' && $this->attachment_markup) { $content = WPDD_Utils::str_replace_once($this->attachment_markup, '', $content); } return $content; }