Plugin Directory

Changeset 509199


Ignore:
Timestamp:
02/23/2012 03:04:48 AM (14 years ago)
Author:
michaelbeacom
Message:

adding version 1.4

Location:
sharing-is-caring/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sharing-is-caring/trunk/readme.txt

    r505793 r509199  
    7373* Added: sic-box, sic-title, and sic-button classes for better css flexibility
    7474
     75= 1.4 =
     76* Added: [sic] shortcode for manual display
     77
    7578== Upgrade Notice ==
    7679
     
    9598= 1.3 =
    9699* added title and css classes
     100
     101= 1.4 =
     102* added shortcode
  • sharing-is-caring/trunk/sharing-is-caring.php

    r505793 r509199  
    44Plugin URI: http://michaelbea.com/sharing-is-caring/
    55Description: Displays the social widgets from Facebook, Twitter, Google+ and Pinterest with your posts.  Most options for the buttons are customizable in the admin panel.  Also adds some meta tags for opengraph and schema.org.
    6 Version: 1.3
     6Version: 1.4b
    77Author: Michael Beacom
    88Author URI: http://michaelbea.com
     
    607607}
    608608
    609 //outputs the buttons on posts
    610 function sic_content_filter($content, $force = false) {
     609function sic_content(){
    611610    $options = get_option('sic_options');
    612     $custom_post_type_yepnope = false;
    613     foreach (array_keys(sic_detect_custom_post_types()) as $type) {
    614         if ($options[$type] && is_post_type_archive(str_replace("custom_type_", "", $type)) ) {
    615             $custom_post_type_yepnope=true;
    616         }
    617     }
    618 
    619     if (!($force ||
    620         ($options["posts"] && is_single()) ||
    621         ($options["pages"] && is_page()) ||
    622         ($options["homepage"] && is_home()) ||
    623         ($options["categories"] && is_category()) ||
    624         ($options["tags"] && is_tag()) ||
    625         ($options["taxonomies"] && is_tax()) ||
    626         ($options["dates"] && is_date()) ||
    627         ($options["authors"] && is_author()) ||
    628         ($options["searches"] && is_search()) ||
    629         ($options["attachments"] && is_attachment()) ||
    630         $custom_post_type_yepnope       
    631         )
    632         )
    633         return $content;
    634611
    635612    if ($options["fb_position"] != 0) {
     
    718695    }
    719696    $sic_content .= '</div>';
    720    
     697    return $sic_content;
     698}
     699
     700//outputs the buttons on posts
     701function sic_content_filter($content, $force = false) {
     702    $options = get_option('sic_options');
     703    $custom_post_type_yepnope = false;
     704    foreach (array_keys(sic_detect_custom_post_types()) as $type) {
     705        if ($options[$type] && is_post_type_archive(str_replace("custom_type_", "", $type)) ) {
     706            $custom_post_type_yepnope=true;
     707        }
     708    }
     709
     710    if (!($force ||
     711        ($options["posts"] && is_single()) ||
     712        ($options["pages"] && is_page()) ||
     713        ($options["homepage"] && is_home()) ||
     714        ($options["categories"] && is_category()) ||
     715        ($options["tags"] && is_tag()) ||
     716        ($options["taxonomies"] && is_tax()) ||
     717        ($options["dates"] && is_date()) ||
     718        ($options["authors"] && is_author()) ||
     719        ($options["searches"] && is_search()) ||
     720        ($options["attachments"] && is_attachment()) ||
     721        $custom_post_type_yepnope       
     722        )
     723        )
     724        return $content;
     725   
     726    $sic_content = sic_content();
    721727    if ($options["above_post"] == 1)
    722728        $content = $sic_content . $content;
     
    727733} //end function sic_content_filter
    728734
     735add_shortcode('sic', 'sic_content'); //add [sic] shortcode to manually output buttons
     736
    729737add_filter('the_content', 'sic_content_filter', $options["contentfilterpriority"]);
    730738
Note: See TracChangeset for help on using the changeset viewer.