Support » Plugin: Document Gallery » Document Gallery Custom Template

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    Hi EOSlover,

    As promised, I am getting back to you with a sample usage of dg_icon_template. You’ll find a complete listing of tags (%keyword%) supported by this filter on the Installation tab.

    /** Modify all DG icons to show filesize alongside title. */
    function dg_icon_template($icon, $use_descriptions, $id) {
    	return str_replace('%title%', '%title% (%size%)', $icon);
    }
    add_filter( 'dg_icon_template', 'dg_icon_template', 10, 3 );

    Please let me know if you would like any further information.

    -Dan

    Hi Dan,

    This code looks perfect to add to my galeries! However, could you help me out where to put this filter? I’ve never done this (custom filters) before and don’t want to mess up the dg plugin.

    Thx!

    Peter

    Never mind, I figured it out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Document Gallery Custom Template’ is closed to new replies.