mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Fix Text/Diff includes. Props codestyling. fixes #7391 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8581 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1530,10 +1530,6 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
|
||||
$defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
// PEAR Text_Diff is lame; it includes things from include_path rather than it's own path.
|
||||
// Not sure of the ramifications of disttributing modified code.
|
||||
ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC );
|
||||
|
||||
if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
|
||||
require( ABSPATH . WPINC . '/wp-diff.php' );
|
||||
|
||||
@@ -1552,8 +1548,6 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
|
||||
$renderer = new WP_Text_Diff_Renderer_Table();
|
||||
$diff = $renderer->render($text_diff);
|
||||
|
||||
ini_restore('include_path');
|
||||
|
||||
if ( !$diff )
|
||||
return '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user