Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author micropat

    (@micropat)

    That service is already available in AddToAny.

    Thread Starter Manaz

    (@manaz)

    Very thanks, I tried but I cannot find. Where can I make from?

    Plugin Author micropat

    (@micropat)

    Right after the Print service in Settings > AddToAny > Add/Remove Services.

    Thread Starter Manaz

    (@manaz)

    Hi micropat, I know that there is AddToAny Service in plugin. I mean that how can I change AddToAny functions after added. For example there are some features in https://www.printfriendly.com/button. These features are important. For this reason I am also using the other plugin for PrintFriendly Buton.

    Plugin Author micropat

    (@micropat)

    I see what you mean.

    You can do that by adding it as a custom service in your theme’s functions.php like so:

    function addtoany_add_services( $services ) {
        $services['my_printfriendly'] = array(
            'name'        => 'My PrintFriendly',
            'icon_url'    => 'https://pf-cdn.printfriendly.com/images/icons/button-print-grnw20.png',
            'icon_width'  => 62,
            'icon_height' => 20,
            'href'        => 'javascript:(function()%7Bif(window%5B%27priFri%27%5D)%7Bwindow.print()%7Delse%7Bvar%20pfurl%3D%27%27%3Bpfstyle%3D%27nbk%27%3BpfBkVersion%3D%271%27%3Bif(window.location.href.match(/https/))%7Bpfurl%3D%27https://pf-cdn.printfriendly.com/ssl/main.js%27%7Delse%7Bpfurl%3D%27https://cdn.printfriendly.com/printfriendly.js%27%7D_pnicer_script%3Ddocument.createElement(%27SCRIPT%27)%3B_pnicer_script.type%3D%27text/javascript%27%3B_pnicer_script.src%3Dpfurl %2B %27%3Fx%3D%27%2B(Math.random())%3Bdocument.getElementsByTagName(%27head%27)%5B0%5D.appendChild(_pnicer_script)%3B%7D%7D)()%3B'
        );
        return $services;
    }
    add_filter( 'A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1 );

    Then select “My PrintFriendly” at the end of the services in AddToAny settings.

    Then PrintFriendly’s custom options (JavaScript) can be added to the Additional Options box in AddToAny settings. For example:

    var pfHeaderImgUrl = '';
    var pfHeaderTagline = '';
    var pfdisableClickToDel = 0;
    var pfHideImages = 0;
    var pfImageDisplayStyle = 'right';
    var pfDisablePDF = 0;
    var pfDisableEmail = 0;
    var pfDisablePrint = 0;
    var pfCustomCSS = '';
    var pfBtVersion='1';

    Thread Starter Manaz

    (@manaz)

    Very very thanks micropat. That is.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Print Friendly Options’ is closed to new replies.