Support » Plugin: Scriptless Social Sharing » Do not open new window or tab

  • Resolved john53

    (@john53)


    Hi

    Thank you for creating this brilliant plugin. It’s so very nearly it add very little to my mobile load time.

    Dareboost shows a security risk with the plugin though:-

    “Do not open new window or tab
    There are 2 target=”_blank”attribute on this page. You should not use them:

    We advise you to facilitate the user experience by limiting the navigation in a single tab.

    Is it possible to modify the plugin so that the social media pages open on the same page instead of opening an additional one?

    Or could you please provide some css to make this change?

    Thank you

    Best regards

    John

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    You could just return an empty string for the scriptlesssocialsharing_link_target filter, and all links will open in the same page. You can add the filter to your theme’s functions.php file, or a utility plugin–just make sure you practice safe coding and back up your files first. Hope that helps!

    Thread Starter john53

    (@john53)

    Hi Robin

    Thank you very much for the information.

    I have a child theme so could add the code to functions.php there.

    Can you please give me the exact code that I would need to use?

    Very impressed with the plugin. Before installing my website loaded on mobile in 0.6 to 0.7 seconds With your plugin installed it loads in 0.7 to 0.8 seconds. That compares to it loading in 6 seconds with other social sharing plugins!!

    Best regards

    John

    Plugin Author Robin Cornett

    (@littlerchicken)

    WordPress includes some functions to make this pretty straightforward. I would try:

    
    add_filter( 'scriptlesssocialsharing_link_target', '__return_empty_string' );
    

    (not tested, but reference for the function)

    Thread Starter john53

    (@john53)

    That’s great thank you very much for your help.

    Best regards

    John

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Do not open new window or tab’ is closed to new replies.