WordPress.org

Ready to get started?Download WordPress

Forums

Add Twitter, Facebook Like, Google plus one Social share
How to hide the plugin on mobile devices (6 posts)

  1. fotobeam
    Member
    Posted 11 months ago #

    Hi all,

    I found a solution to hide the buttons on mobile devices. You need to modify the file tf_admin_page.php. Then add these lines at the end of the file under function is_mobile_device():

    if (strpos( $_SERVER['HTTP_USER_AGENT'] , 'Android.*Mobile') )
    		return true;
    if (strpos( $_SERVER['HTTP_USER_AGENT'] , 'iPad.* (([3]_[2-9](_| ))|([4-9]_[0-9](_| )))') )
    		return true;
    if (strpos( $_SERVER['HTTP_USER_AGENT'] , 'iPhone.* (([3]_[2-9](_| ))|([4-9]_[0-9](_| )))') )
    		return true;
    if (strpos( $_SERVER['HTTP_USER_AGENT'] , 'Windows Phone') )
    		return true;
    if (strpos( $_SERVER['HTTP_USER_AGENT'] , 'Windows Phone OS [7-9]') )
    		return true;

    Regards,
    Andreas

    http://wordpress.org/plugins/twitter-facebook-google-plusone-share/

  2. @fotobeam? Much thanks for this but please do not search for months old topics and insert this link in them.

    Just like you other members can use search engines. I'm sure this post will be found especially as you've put it in the correct sub-forum.

  3. fotobeam
    Member
    Posted 11 months ago #

    The reason was to help people who posted this question before. Usually they check the notification box in their thread. This way they know now that a solution is available.

  4. Yes, I get that and thank you but don't do it anyway.

    Just like you other members can use search engines. I'm sure this post will be found especially as you've put it in the correct sub-forum.

    if users visit this sub-forum

    http://wordpress.org/support/plugin/twitter-facebook-google-plusone-share

    You're topic comes up and is right there. Trying to update all those old topics isn't necessary and is a type of spamming.

    Before you get upset with me (please don't): I know that was not your intention and I fully get that you are trying to help others. But really, it's not necessary to touch all those old topics that way.

  5. fotobeam
    Member
    Posted 11 months ago #

    Got it ;-)

  6. stephensteinberg88
    Member
    Posted 3 weeks ago #

    Can you be more specific on where we are supposed to add those lines of code? I don't see is_mobile_device() anywhere in that file...

Reply

You must log in to post.

About this Plugin

About this Topic