Add PF link to code
-
Hi,
I use Enfold theme and I have some code in functions.php to use a custom print icon in a specific place.
I would like to link that icon to Print Friendly, is that possible?Thank you
This is the code:
// Register PrintFriendly icon as a theme icon
function avia_add_custom_icon($icons) {
$icons[‘PrintFriendly’] = array( ‘font’ =>’entypo-fontello’, ‘icon’ => ‘ue838’);
return $icons;
}
add_filter(‘avf_default_icons’,’avia_add_custom_icon’, 10, 1);//Add items on the social share section
add_filter(‘avia_social_share_link_arguments’, ‘avia_add_social_share_link_arguments’, 10, 1);
function avia_add_social_share_link_arguments($args) {
$new_array = array(
‘PrintFriendly’ => array(
“encode”=>true, “encode_urls”=>false, “pattern” => “https://”
)
);return array_merge($new_array, $args);
}The page I need help with: [log in to see the link]
- The topic ‘Add PF link to code’ is closed to new replies.