WordPress.org

Support

Support » Plugins and Hacks » Add Twitter, Facebook Like, Google plus one Social share » [Resolved] [Plugin: Add Twitter, Facebook Like, Google plus one Social share] hidding the buttons on the mobile

[Resolved] [Plugin: Add Twitter, Facebook Like, Google plus one Social share] hidding the buttons on the mobile

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • +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!

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Add Twitter, Facebook Like, Google plus one Social share] hidding the buttons on the mobile’ is closed to new replies.
Skip to toolbar