Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1477759

    The new font-icon handling leads to one question about replacing standard icons.
    The old method works if we want to replace font-icons by different font-icons:

    function avia_replace_default_icons($icons){
    	$icons['standard'] =  array( 'font' =>'custom-font', 'icon' => 'ue807');
    		return $icons;
    	}
    add_filter('avf_default_icons','avia_replace_default_icons', 10, 1);

    now we got that SVG Iconset: Wp Media Library (svg_wp-media-library)
    how to replace the standard icon by a media library svg ?

    Edit i tested it with the icon name – but that does not work.
    we now have to use the svg ID to replace:

    function avia_replace_default_icons($icons){
    	$icons['svg__standard'] =  array( 'font' =>'svg_wp-media-library', 'icon' => '40720');
    		return $icons;
    	}
    add_filter('avf_default_icons','avia_replace_default_icons', 10, 1);
    #1477763

    Hey Guenter,

    wp-media-library svg are identified by attachment ID (which is unique) – title of svg which is used as name can be changed which would lead to loosing the icon. If you check the shortcode of e.g. ALB icon you will see that the ID is also used.

    For other svg iconsets you must use the name – as it is the name of the svg file it will never change.

    Best regards,
    Günter

    #1477767

    Thanks to clarify the usage.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.