Advertisement
Guest User

Fix to Sharedaddy and Post Page Associator

a guest
Jul 30th, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?php
  2. //*CUSTOM HEADER SIZE
  3. add_filter( 'twentyeleven_header_image_height', 'bylivkolding_header_height');
  4.  
  5. function bylivkolding_header_height($param) {
  6.  
  7. return 150;
  8. }
  9. ?>
  10.  
  11. <?php
  12.  
  13. /*
  14.  
  15. Plugin Name: ShareDaddy & PPA/APP Fix
  16. Description: Fixes the Incompatibility between Post-Page-Associator/Associated Posts Pro and ShareDaddy (JetPack) Plugin.
  17. Version: 1.0
  18. Author: Dennis Hoppe
  19. Author URI: http://DennisHoppe.de
  20.  
  21. */
  22.  
  23. // Plugin Class
  24. If (!Class_Exists('wp_plugin_sharedaddy_post_page_associator_fix')){
  25. Class wp_plugin_sharedaddy_post_page_associator_fix {
  26.  
  27.   Function __construct(){
  28.     Add_Action('init', Array($this, 'Repair_ShareDaddy_Hooks'));
  29.   }
  30.  
  31.   Function Repair_ShareDaddy_Hooks(){
  32.     If (Function_Exists('sharing_display')){
  33.       // Remove non working filters
  34.       Remove_Filter( 'the_content', 'sharing_display', 19 );
  35.       Remove_Filter( 'the_excerpt', 'sharing_display', 19 );
  36.      
  37.       // Add new filters
  38.       Add_Filter( 'the_content', 'sharing_display', 11 );
  39.       Add_Filter( 'the_excerpt', 'sharing_display', 11 );
  40.     }
  41.   }
  42.  
  43. } /* End of Class */
  44. New wp_plugin_sharedaddy_post_page_associator_fix();
  45. } /* End of If-Class-Exists-Condition */
  46. /* End of File */
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement