Plugin Directory

Changeset 194580


Ignore:
Timestamp:
01/16/2010 07:37:28 PM (16 years ago)
Author:
rjeevan
Message:

Bug Fix: When 'The_Excerpt' called and No Excerpt found, WordPress call 'get_the_contents' to create except. If the contents is not enough to FILL 'the_content" filter fire and add Report Post Form to contents. When excerpt is trimmed it causes to Display HTMl contents of Form. Now Report Post won't be invoked IF the_excerpt is called

Location:
wp-reportpost
Files:
25 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • wp-reportpost/trunk/Readme.txt

    r169581 r194580  
    44Tags: broken link, broken, report, report post, post report, notify, inform, abuse, wp-report, error report
    55Requires at least: 2.8
    6 Tested up to: 2.8.5
    7 Stable tag: 1.2.3
     6Tested up to: 2.9.1
     7Stable tag: 1.2.4
    88
    99Simple and powerful plugin to make your life easier, Report post plugin to automate links / contents error reporting in your website.
     
    4242
    4343There have been many updates in the Past, I'm only going to specify the main changes made to archive this new version 1.2.
     44= 1.2.4 =
     45* Fixed: When excerpt is invoked; Report option Show up broken. Now Report option won't be attache to 'the_excerpt'
    4446= 1.2.3 =
    4547Bug Fixes Only
  • wp-reportpost/trunk/main.php

    r169581 r194580  
    22/*
    33Plugin Name: WP-ReportPost
    4 Plugin URI: http://www.rjeevan.com/en/projects/wordpress/plugins/wp-reportpost
     4Plugin URI: http://ww2.rjeevan.com/projects/wordpress/wp-reportpost
    55Description: This plugin attach form (jQuery / Ajax) to your contents that can be Invoked by any end-user to make a report on posts / pages. This plugin gives you much flexibility as what to report and archive old reports... No coding skills needed, simply install and activate.
    6 Version: 1.2.3
     6Version: 1.2.4
    77Author: Rajeevan
    8 Author URI: http://rjeevan.com
     8Author URI: http://ww2.rjeevan.com
    99*/
    1010
     
    5151
    5252        if($rp_if != 3) // BY THEME EDIT
    53             add_filter('the_content',wprp_attach_report); // Call Attach Report Option
     53        {
     54            add_filter('the_content',wprp_attach_report,100); // Call Attach Report Option
     55            add_filter('get_the_excerpt', wprp_get_the_excerpt,1);
     56        }
    5457           
    5558    } // END IF
     
    6366}
    6467
     68#Except Exception
     69function wprp_get_the_excerpt($output)
     70{
     71    // Remove Content Filter
     72    remove_filter('the_content', wprp_attach_report, 100);
     73    return $output;
     74}
    6575
    6676# Attach REPORT to THE_CONTENT
     
    279289    add_submenu_page( dirname(__FILE__)."/new-reports.php", 'New Reports', 'New Reports', 4,  dirname(__FILE__)."/new-reports.php");
    280290    add_submenu_page( dirname(__FILE__)."/new-reports.php", 'Archives', 'Archives', 4,  dirname(__FILE__)."/archive-reports.php");
    281     add_submenu_page( dirname(__FILE__)."/new-reports.php", 'Settings', 'Settings', 8,  dirname(__FILE__)."/settings.php");
     291    add_submenu_page( dirname(__FILE__)."/new-reports.php", 'Settings', 'Settings', 8,  dirname(__FILE__)."/wprpsettings.php");
    282292}
    283293
     
    301311   
    302312}
    303 /*
    304 add_action('wp_dashboard_setup', 'wprp_add_dashboard_widgets' );
    305 function wprp_add_dashboard_widgets()
    306 {
    307     wp_add_dashboard_widget('wprp_widget', 'WP REPORTPOST', 'wprp_widget_callback');   
    308 }
    309 function wprp_widget_callback()
    310 {
    311     global $wpdb, $wprp;
    312    
    313     if($wprp == NULL)
    314     {
    315         $wprp = new ReportPost($wpdb);
    316         $wprp->findReports('ORDER BY id DESC',1,'WHERE status=1');
    317     }
    318     if($wprp->totalRows >0)
    319     {
    320         echo 'Hello, There is <strong>'.$wprp->totalRows.' New Reports</strong> Logged!';
    321     }else{
    322         echo 'There is no new reports!';
    323     }
    324    
    325 }*/
    326 
    327313# Install
    328314register_activation_hook(__FILE__,'wprp_install');
     
    430416    wp_enqueue_style('thickbox');
    431417}
     418
    432419?>
Note: See TracChangeset for help on using the changeset viewer.