Skip to content

Commit 59324b5

Browse files
committed
Rename to avoid conflicts again
1 parent 3f91512 commit 59324b5

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

admin/class-steempress_sp-admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
* @subpackage Steempress_sp/admin
2020
*/
2121

22-
require('partials/domlettersiterator.php');
23-
require('partials/DOMWordsIterator.php');
24-
require('partials/TruncateHTML.php');
22+
require('partials/steempress_sp_DOMLettersIterator.php');
23+
require('partials/steempress_sp_DOMWordsIterator.php');
24+
require('partials/steempress_sp_TruncateHTML.php');
2525

2626
class Steempress_sp_Admin {
2727

@@ -303,7 +303,7 @@ public function Steempress_sp_publish($id)
303303

304304
if ($options['wordlimit'] != "0") {
305305
$limit = intval($options["wordlimit"]);
306-
$content = TruncateHTML::truncateWords($content, $limit, '');
306+
$content = steempressspTruncateHTML::truncateWords($content, $limit, '');
307307
}
308308

309309
$data = array("body" => array(
@@ -849,7 +849,7 @@ function steempress_sp_update($post_id, $bulk = false)
849849

850850
if ($options['wordlimit'] != "0") {
851851
$limit = intval($options["wordlimit"]);
852-
$content = TruncateHTML::truncateWords($content, $limit, '');
852+
$content = steempressspTruncateHTML::truncateWords($content, $limit, '');
853853
}
854854

855855
$data = array("body" => array(

admin/partials/steempress_sp_DOMLettersIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* $doc = new DOMDocument();
1010
* $doc->load('example.xml');
11-
* foreach(new DOMLettersIterator($doc) as $letter) echo $letter;
11+
* foreach(new steempressspDOMLettersIterator($doc) as $letter) echo $letter;
1212
*
1313
* NB: If you only need characters without their position
1414
* in the document, use DOMNode->textContent instead.
@@ -17,7 +17,7 @@
1717
* @license Public Domain
1818
*
1919
*/
20-
final class DOMLettersIterator implements Iterator
20+
final class steempressspDOMLettersIterator implements Iterator
2121
{
2222
private $start, $current;
2323
private $offset, $key, $letters;

admin/partials/steempress_sp_DOMWordsIterator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
*
77
* $doc = new DOMDocument();
88
* $doc->load('example.xml');
9-
* foreach(new DOMWordsIterator($doc) as $word) echo $word;
9+
* foreach(new steempressspDOMWordsIterator($doc) as $word) echo $word;
1010
*
1111
* @author pjgalbraith http://www.pjgalbraith.com
12-
* @author porneL http://pornel.net (based on DOMLettersIterator available at http://pornel.net/source/domlettersiterator.php)
12+
* @author porneL http://pornel.net (based on steempressspDOMLettersIterator available at http://pornel.net/source/domlettersiterator.php)
1313
* @license Public Domain
1414
*
1515
*/
1616

17-
final class DOMWordsIterator implements Iterator {
17+
final class steempressspDOMWordsIterator implements Iterator {
1818

1919
private $start, $current;
2020
private $offset, $key, $words;

admin/partials/steempress_sp_TruncateHTML.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* Example:
66
*
7-
* $output = TruncateHTML::truncateChars($your_html, '40', '...');
8-
* $output = TruncateHTML::truncateWords($your_html, '7', '...');
7+
* $output = steempressspTruncateHTML::truncateChars($your_html, '40', '...');
8+
* $output = steempressspTruncateHTML::truncateWords($your_html, '7', '...');
99
*
1010
* @author pjgalbraith http://www.pjgalbraith.com
1111
*
@@ -34,7 +34,7 @@
3434
THE SOFTWARE.
3535
*/
3636

37-
class TruncateHTML {
37+
class steempressspTruncateHTML {
3838

3939
public static function truncateChars($html, $limit, $ellipsis = '...') {
4040

@@ -46,7 +46,7 @@ public static function truncateChars($html, $limit, $ellipsis = '...') {
4646

4747
$body = $dom->getElementsByTagName("body")->item(0);
4848

49-
$it = new DOMLettersIterator($body);
49+
$it = new steempressspDOMLettersIterator($body);
5050

5151
foreach($it as $letter) {
5252
if($it->key() >= $limit) {
@@ -71,7 +71,7 @@ public static function truncateWords($html, $limit, $ellipsis = '...') {
7171

7272
$body = $dom->getElementsByTagName("body")->item(0);
7373

74-
$it = new DOMWordsIterator($body);
74+
$it = new steempressspDOMWordsIterator($body);
7575

7676
foreach($it as $word) {
7777
if($it->key() >= $limit) {

0 commit comments

Comments
 (0)