Changeset 509199
- Timestamp:
- 02/23/2012 03:04:48 AM (14 years ago)
- Location:
- sharing-is-caring/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
sharing-is-caring.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sharing-is-caring/trunk/readme.txt
r505793 r509199 73 73 * Added: sic-box, sic-title, and sic-button classes for better css flexibility 74 74 75 = 1.4 = 76 * Added: [sic] shortcode for manual display 77 75 78 == Upgrade Notice == 76 79 … … 95 98 = 1.3 = 96 99 * added title and css classes 100 101 = 1.4 = 102 * added shortcode -
sharing-is-caring/trunk/sharing-is-caring.php
r505793 r509199 4 4 Plugin URI: http://michaelbea.com/sharing-is-caring/ 5 5 Description: 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. 36 Version: 1.4b 7 7 Author: Michael Beacom 8 8 Author URI: http://michaelbea.com … … 607 607 } 608 608 609 //outputs the buttons on posts 610 function sic_content_filter($content, $force = false) { 609 function sic_content(){ 611 610 $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_yepnope631 )632 )633 return $content;634 611 635 612 if ($options["fb_position"] != 0) { … … 718 695 } 719 696 $sic_content .= '</div>'; 720 697 return $sic_content; 698 } 699 700 //outputs the buttons on posts 701 function 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(); 721 727 if ($options["above_post"] == 1) 722 728 $content = $sic_content . $content; … … 727 733 } //end function sic_content_filter 728 734 735 add_shortcode('sic', 'sic_content'); //add [sic] shortcode to manually output buttons 736 729 737 add_filter('the_content', 'sic_content_filter', $options["contentfilterpriority"]); 730 738
Note: See TracChangeset
for help on using the changeset viewer.