Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dipeshkakadiya
committed
May 26, 2015
1 parent
a551519
commit 3eea7dc
Showing
959 changed files
with
16,880 additions
and
24,660 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/** | ||
* Don't load this file directly! | ||
*/ | ||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
if ( ! class_exists( 'Rt_Biz_Text_Diff' ) ) { | ||
|
||
if ( ! class_exists( 'WP_Text_Diff_Renderer_Table' ) ) { | ||
require( ABSPATH . WPINC . '/wp-diff.php' ); | ||
} | ||
|
||
/** | ||
* Class Rt_Biz_Text_Diff | ||
* Email Diff text generator | ||
* | ||
* @since 0.1 | ||
* | ||
* @author udit | ||
*/ | ||
class Rt_Biz_Text_Diff extends WP_Text_Diff_Renderer_Table { | ||
|
||
/** | ||
* @var int | ||
*/ | ||
var $_leading_context_lines = 2; | ||
/** | ||
* @var int | ||
*/ | ||
var $_trailing_context_lines = 2; | ||
|
||
/** | ||
* Added Content format for Email Diff Content | ||
* | ||
* @since 0.1 | ||
* | ||
* @param string $line | ||
* | ||
* @return string | ||
*/ | ||
function addedLine( $line ) { | ||
return "<td style='padding: .5em;border: 0;width:25px;'>+</td><td style='padding: .5em;border: 0;background-color: #dfd; width: auto;'>{$line}</td>"; | ||
} | ||
|
||
/** | ||
* Delete Content format for Email Diff Content | ||
* | ||
* @since 0.1 | ||
* | ||
* @param string $line HTML-escape the value. | ||
* | ||
* @return string | ||
*/ | ||
function deletedLine( $line ) { | ||
return "<td style='padding: .5em;border: 0;width:25px;' >-</td><td style='padding: .5em;border: 0;background-color: #fdd; width: 40%;' >{$line}</td>"; | ||
} | ||
|
||
/** | ||
* Content format for Email Diff Content | ||
* | ||
* @since 0.1 | ||
* | ||
* @param string $line HTML-escape the value. | ||
* | ||
* @return string | ||
*/ | ||
function contextLine( $line ) { | ||
return "<td style='padding: .5em;border: 0;' > </td><td style='padding: .5em;border: 0; width: auto;'>{$line}</td>"; | ||
|
||
} | ||
} | ||
} | ||
|
Oops, something went wrong.