WordPress.org

Ready to get started?Download WordPress

Forums

Add Twitter, Facebook Like, Google plus one Social share
[resolved] hidding the buttons on the mobile (3 posts)

  1. joaoacmota
    Member
    Posted 3 years ago #

    Hi,

    Using mobble I edited tf_display.php to force the plugin to not display the social share when the displaying the site on a mobile browser.

    The code snippet:

    Before:

    function kc_twitter_facebook($content, $filter)
    {
      global $single;
    
      $option = twitter_facebook_share_get_options_stored();
      $custom_disable = get_post_custom_values('disable_social_share');
      if (is_single() && ($option['show_in']['posts']) && ($custom_disable[0] != 'yes')) {
      ...

    After:

    function kc_twitter_facebook($content, $filter)
    {
      global $single;
    
      $option = twitter_facebook_share_get_options_stored();
      $custom_disable = get_post_custom_values('disable_social_share');
      if(is_mobile())  {
       $custom_disable[0] = 'yes' ;
       }
      if (is_single() && ($option['show_in']['posts']) && ($custom_disable[0] != 'yes')) {
      ...

    Is there a better way?
    If not can you include this on a future version?

    thanks and best regards,

    Joao

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

  2. caponx
    Member
    Posted 2 years ago #

    +1 on this, need to know how to disable this on Mobiles, esp WP-touch plugin.

    And btw that code broke my site so cant use it :)

    other then that great plugin!

  3. nickaster
    Member
    Posted 2 years ago #

    Hey that looks very good. I'm a little scared to tinker at that level ... any idea if the guys who wrote this pay attention to this forum? Seems like a common sense change to the plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic