Show
Ignore:
Timestamp:
07/11/08 08:14:00 (4 months ago)
Author:
michaeltwofish
Message:

Don't replace footnotes when filtering on the publish page, or they'll be destroyed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/footnotes/trunk/footnotes.plugin.php

    r644 r671  
    3838    public function filter_post_content( $content, $post ) 
    3939    { 
     40        // If we're on the publish page, replacement will be destructive. 
     41        // We don't want that, so return here. 
     42        $controller = Controller::get_handler(); 
     43        if ( $controller->action == 'admin' && $controller->handler_vars['page'] == 'publish' ) { 
     44            return $content; 
     45        } 
     46 
    4047        // If there are no footnotes, save the trouble and just return it as is. 
    4148        if ( strpos( $content, '<footnote>' ) === false ) {