Customize document icon with dg_icon_template filter
-
Hi Dan,
Your plugin works great out of the box. I would like to add a link back to the parent post for each attached document or image. You say in your documentation to edit output, use the following:$doc_icon = apply_filters( ‘dg_icon_template’, $doc_icon, $this->gallery->useDescriptions(), $this->ID );
I have the code for grabbing the post ID based on the attachment ID. I have the following in my child theme functions file, but it is not working:
add_filter( ‘custom_doc_library’, ‘dg_icon_template’);
function custom_doc_library($desc, $attachID ){$parent_id = $attachID->post_parent;
echo “Parent ID: ” . $parent_id;
}thank you for your help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Customize document icon with dg_icon_template filter’ is closed to new replies.