Plugin Directory

Changeset 713755


Ignore:
Timestamp:
05/16/2013 05:37:23 AM (13 years ago)
Author:
CompleteWebResources
Message:

New version 1.1 tagged. Global ON/OFF. Hide social media icons from specific posts/pages.

Location:
pagepost-specific-social-share-buttons
Files:
9 added
9 edited

Legend:

Unmodified
Added
Removed
  • pagepost-specific-social-share-buttons/trunk/page-post-specific-social-share.php

    r698939 r713755  
    66Author URI: http://www.completewebresources.com/
    77Plugin URI: http://www.completewebresources.com/page-post-specific-social-share-wp-plugin/
    8 Version: 1.0.1
     8Version: 1.1
    99License: GPL
    1010*/
  • pagepost-specific-social-share-buttons/trunk/ppss_admin_page.php

    r698934 r713755  
    3333        $meta = get_post_meta($post->ID, $field['id'], true);
    3434        echo '<tr>',
    35                 '<th style=""><label for="', $field['id'], '">Display social share buttons on this post / page:</label></th>',
     35                '<th style=""><label for="', $field['id'], '">Hide social share buttons on this post / page:</label></th>',
    3636                '<td>';
    3737                    echo '<input type="checkbox" value="',$field['value'],'" name="', $field['id'], '" id="', $field['id'], '"', $meta ? ' checked="checked"' : '', ' />';
     
    122122        $option['position'] = esc_html($_POST['ppss_social_share_position']);
    123123        $option['border'] = esc_html($_POST['ppss_social_share_border']);
     124        $option['bkcolor'] = (isset($_POST['ppss_social_share_background_color']) and $_POST['ppss_social_share_background_color']=='on') ? true : false;
    124125       
    125         $option['bkcolor'] = (isset($_POST['ppss_social_share_background_color']) and $_POST['ppss_social_share_background_color']=='on') ? true : false;
     126        $option['enabler'] = (isset($_POST['ppss_social_share_enabler']) and $_POST['ppss_social_share_enabler']=='on') ? true : false;
    126127       
    127128        $option['bkcolor_value'] = esc_html($_POST['ppss_social_share_bkcolor_value']);
    128129        $option['jsload'] = (isset($_POST['ppss_social_share_javascript_load']) and $_POST['ppss_social_share_javascript_load']=='on') ? true : false;
    129130        $option['mobdev'] = (isset($_POST['ppss_social_share_mobile_device']) and $_POST['ppss_social_share_mobile_device']=='on') ? true : false;
    130 
    131131        $option['twitter_id'] = esc_html($_POST['ppss_social_share_twitter_id']);
    132132        $option['custom_code'] = stripslashes($_POST['ppss_social_share_custom_code']);
     
    163163   
    164164    $bkcolor = ($option['bkcolor']) ? 'checked="checked"' : '';
     165   
     166    $enabler = ($option['enabler']) ? 'checked="checked"' : '';
     167   
    165168    $jsload =  ($option['jsload']) ? 'checked="checked"' : '';
    166169    $mobdev =  ($option['mobdev']) ? 'checked="checked"' : '';
     
    170173    $linkedin_count = ($option['linkedin_count']) ? 'checked="checked"' : '';
    171174    $pinterest_count = ($option['pinterest_count']) ? 'checked="checked"' : '';
     175   
     176    $enablerColor = $enabler ? '#0B932D' : '#ff0000';
    172177   
    173178    $out .= '
     
    182187    <div class="inside">
    183188    <table>
    184    
     189
     190    <tr><td style="padding:15px 0 20px 0; font-weight:bold; font-size:15px; color:'.$enablerColor.'" valign="top">'.__("Enable share buttons", 'menu-test' ).':</td>
     191    <td style="padding:15px 0 20px 0;">
     192        <input type="checkbox" name="ppss_social_share_enabler" '.$enabler.' />
     193    </td></tr>
     194
    185195    <tr><td valign="top" style="width:180px;">'.__("Active share buttons", 'menu-test' ).':</td>
    186196    <td style="padding-bottom:30px;">';
     
    412422    $option['border'] = $border;
    413423    $option['bkcolor'] = true;
     424    $option['enabler'] = true;
    414425    $option['bkcolor_value'] = $color;
    415426    $option['jsload'] = true;
  • pagepost-specific-social-share-buttons/trunk/ppss_display.php

    r698281 r713755  
    4949        return the_excerpt();
    5050    }
    51     if ($filter=='the_excerpt' and $last_execution=='the_excerpt') {
    52         add_filter('the_content', 'ppss_twitter_facebook_contents');
    53     }
     51if ($filter=='the_excerpt' and $last_execution=='the_excerpt') {
     52    add_filter('the_content', 'ppss_twitter_facebook_contents');
     53}
    5454 
    5555  $option = ppss_social_share_get_options_stored();
     
    230230    global $post;
    231231    $ppss_displayer = get_post_meta($post->ID, 'ab_checkbox', true);
    232 
    233     if($ppss_displayer) {
    234            
     232   
     233    $enabler = $option['enabler'];
     234
     235if($enabler) { // global enable check
     236   
     237    if(!$ppss_displayer) {
     238       
    235239    if (($option['position'] == 'below') || ($option['position'] == 'above') || ($option['position'] == 'both'))
    236240    {
     
    295299   
    296300    }
     301}
     302
    297303}
    298304
  • pagepost-specific-social-share-buttons/trunk/readme.txt

    r698939 r713755  
    66Requires at least: 3.0
    77Tested up to: 3.5.1
    8 Stable tag: 1.0.1
     8Stable tag: 1.1
    99
    1010== Description ==
     
    2424<p>Demo: http://www.completewebresources.com/page-post-specific-social-share-wp-plugin/</p>
    2525
     26* The ability to enable/disable social media buttons for entire website. Default: enabled
     27
     28* The ability to display/hide social media buttons on specific posts or pages.
     29
    2630* The ability to control the position of the social media buttons to be displayed on the posts or pages.
    2731
    2832* An easy to use admin panel where you can set different types of border styles with or without background colors.
    2933
    30 * Javascript is loaded to the footer to avoid most of the conflicts caused by other plugins. You can also choose the scripts to be loaded in the header if you wish.
     34* Javascript is loaded to the footer to avoid most of the conflicts caused by other plugins. You can also choose the
     35
     36scripts to be loaded in the header if you wish.
    3137
    3238* Option to display on home page, static pages, category, tag, archive pages etc.
    3339
    34 * Special metabox on the page or post editing windows to control the display of social buttons on the specific post/page.
     40* Special metabox on the page or post editing windows to control the display of social buttons on the specific
     41
     42post/page.
    3543
    3644* Facebook Like thumbnail will now display thumbnail specific to the post or page.
     
    4250* Option to disable on Mobile Devices (iPad, iPhone, Blackberry, Nokia, Android, Opera Mini)
    4351
    44 * Advanced image search for Pinterest sharing. (searches post thumbnail, then attached image to post and lastly any image inserted in the post content (picks up first image found).
     52* Advanced image search for Pinterest sharing. (searches post thumbnail, then attached image to post and lastly any
    4553
    46 * Last but not least, option to add your own custom code to display additional buttons along with the default available social media buttons.
     54image inserted in the post content (picks up first image found).
     55
     56* Last but not least, option to add your own custom code to display additional buttons along with the default available
     57
     58social media buttons.
    4759
    4860
     
    6981= 1.0.1 =
    7082* Minor edit
     83
     84= 1.1 =
     85* Added a global enable/disable option
     86* Hide social share buttons on specific pages/posts
Note: See TracChangeset for help on using the changeset viewer.