ID), array("fa fa-anchor fa-border",'Yahoo','http://yahoo.com','',$post->ID) ); // combine the two arrays if(is_array($extra_icon) && is_array($icon)) $icon = array_merge($extra_icon, $icon); return $icon; } add_filter('upg_add_icon_grid', 'upg_add_extra_icon_test'); Above function will result the image below." />

Add icon on gallery hook

Add icon on gallery hook

In grid layouts file Eg. (pluginswp-upglayoutgridbasicbasic_main.php)
This loop file has function echo upg_show_icon_grid(); which is responsible to add icons below the gallery.
This function is mentioned at wp-upg/libs/functions.php

Developer can also create a function on their own plugin, which will add icons of their own.

Below function will create a link to http://yahoo.com with anchor icon

//Use this function in your plugin if you would like to add own icons below gallery.
function upg_add_extra_icon_test($icon)
{
	global $post; 
	$extra_icon=array();
	$extra_icon = array
	(
	//array("fontawesome_icon fa-border",'Link_Title','URL','css_class_name',$post->ID),
	array("fa fa-anchor fa-border",'Yahoo','http://yahoo.com','',$post->ID)
	);
	// combine the two arrays
	if(is_array($extra_icon) && is_array($icon))
	$icon = array_merge($extra_icon, $icon);
 
	return $icon;
}
add_filter('upg_add_icon_grid', 'upg_add_extra_icon_test');

Above function will result the image below.

1.82

Leave a Reply

Your email address will not be published. Required fields are marked *