WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22037, comment 8


Ignore:
Timestamp:
10/27/2012 07:37:04 PM (6 years ago)
Author:
wdfee
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22037, comment 8

    initial v1  
    77add_action( 'wp_footer', array( $this, 'customize_preview_signature' ), 1000 );
    88}}}
    9 and similarly changed it on the remove_action hook on line 417. Now the signature variable is added to the footer of the response and lastIndexOf build correctly. But now it's added earlier than '</html>', so of course lastIndexOf smaller. I'm not sure, what the condition "index < response.lastIndexOf('</html>')" is for exactly, but I suggest to change it to
     9and similarly changed it on the remove_action hook on line 417. Now the signature variable is added to the footer of the response and lastIndexOf build correctly. But now it's added earlier than '</html>', so of course lastIndexOf smaller. I'm not sure, what the condition "index < response.lastIndexOf('</html>')" is for exactly, but I suggest to change it to <body>
    1010{{{
    1111// Check for a signature in the request.
     
    1313if ( -1 === index || index < response.lastIndexOf('<body>') ) {
    1414        deferred.rejectWith( self, [ 'unsigned' ] );
    15         //return;
     15        return;
    1616}
    1717
     
    2222self.iframe = $('<iframe />').appendTo( self.container );
    2323}}}
    24 
     24return then doesn't need commenting out anymore.