Changeset 6670
- Timestamp:
- 08/27/2017 11:24:00 PM (8 years ago)
- Location:
- trunk/src/includes/admin
- Files:
-
- 25 edited
-
classes/class-bbp-converter-base.php (modified) (5 diffs)
-
converters/AEF.php (modified) (4 diffs)
-
converters/Drupal7.php (modified) (4 diffs)
-
converters/Example.php (modified) (1 diff)
-
converters/FluxBB.php (modified) (3 diffs)
-
converters/Invision.php (modified) (5 diffs)
-
converters/Kunena1.php (modified) (4 diffs)
-
converters/Kunena2.php (modified) (5 diffs)
-
converters/Kunena3.php (modified) (4 diffs)
-
converters/Mingle.php (modified) (5 diffs)
-
converters/MyBB.php (modified) (3 diffs)
-
converters/PHPFox3.php (modified) (5 diffs)
-
converters/PHPWind.php (modified) (2 diffs)
-
converters/Phorum.php (modified) (3 diffs)
-
converters/PunBB.php (modified) (3 diffs)
-
converters/SMF.php (modified) (6 diffs)
-
converters/SimplePress5.php (modified) (5 diffs)
-
converters/Vanilla.php (modified) (5 diffs)
-
converters/XMB.php (modified) (3 diffs)
-
converters/XenForo.php (modified) (6 diffs)
-
converters/bbPress1.php (modified) (7 diffs)
-
converters/e107v1.php (modified) (6 diffs)
-
converters/phpBB.php (modified) (7 diffs)
-
converters/vBulletin.php (modified) (6 diffs)
-
converters/vBulletin3.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/classes/class-bbp-converter-base.php
r6669 r6670 91 91 public $clean = false; 92 92 93 /** 94 * @var array Custom BBCode class properties in a key => value format 95 */ 96 public $bbcode_parser_properties = array(); 97 93 98 /** Methods ***************************************************************/ 94 99 … … 98 103 public function __construct() { 99 104 $this->init(); 105 $this->setup_globals(); 100 106 } 101 107 … … 106 112 */ 107 113 private function init() { 114 115 /** BBCode Parse Properties *******************************************/ 116 117 // Setup smiley URL & path 118 $this->bbcode_parser_properties = array( 119 'smiley_url' => includes_url( 'images/smilies' ), 120 'smiley_dir' => '/' . WPINC . '/images/smilies' 121 ); 108 122 109 123 /** Sanitize Options **************************************************/ … … 250 264 ); 251 265 } 266 267 /** 268 * Setup global values 269 */ 270 public function setup_globals() {} 252 271 253 272 /** … … 1128 1147 $bbcode = BBCode::getInstance(); 1129 1148 1130 // Setup smiley URL & path 1131 $bbcode->smiley_url = includes_url( 'images/smilies' ); 1132 $bbcode->smiley_dir = '/' . WPINC . '/images/smilies'; 1149 // Pass BBCode properties to the parser 1150 foreach ( $this->bbcode_parser_properties as $prop => $value ) { 1151 $bbcode->{$prop} = $value; 1152 } 1133 1153 1134 1154 return html_entity_decode( $bbcode->Parse( $field ) ); -
trunk/src/includes/admin/converters/AEF.php
r6573 r6670 20 20 * Main Constructor 21 21 */ 22 function __construct() {22 public function __construct() { 23 23 parent::__construct(); 24 $this->setup_globals();25 24 } 26 25 … … 593 592 594 593 /** 595 * Translate the forum status from AEF v1.0.9 numeric 's to WordPress's strings.594 * Translate the forum status from AEF v1.0.9 numerics to WordPress's strings. 596 595 * 597 596 * @param int $status AEF v1.0.9 numeric forum status … … 613 612 614 613 /** 615 * Translate the post status from AEF v1.0.9 numeric 's to WordPress's strings.614 * Translate the post status from AEF v1.0.9 numerics to WordPress's strings. 616 615 * 617 616 * @param int $status AEF v1.0.9 numeric topic status … … 633 632 634 633 /** 635 * Translate the topic sticky status type from AEF 1.x numeric 's to WordPress's strings.634 * Translate the topic sticky status type from AEF 1.x numerics to WordPress's strings. 636 635 * 637 636 * @param int $status AEF 1.x numeric forum type -
trunk/src/includes/admin/converters/Drupal7.php
r6573 r6670 20 20 * Main Constructor 21 21 */ 22 function __construct() {22 public function __construct() { 23 23 parent::__construct(); 24 $this->setup_globals();25 24 } 26 25 … … 591 590 592 591 /** 593 * Translate the post status from Drupal v7.x numeric 's to WordPress's592 * Translate the post status from Drupal v7.x numerics to WordPress's 594 593 * strings. 595 594 * … … 612 611 613 612 /** 614 * Translate the post status from Drupal v7.x numeric 's to WordPress's strings.613 * Translate the post status from Drupal v7.x numerics to WordPress's strings. 615 614 * 616 615 * @param int $status Drupal v7.x numeric topic status … … 632 631 633 632 /** 634 * Translate the topic sticky status type from Drupal v7.x numeric 's to WordPress's strings.633 * Translate the topic sticky status type from Drupal v7.x numerics to WordPress's strings. 635 634 * 636 635 * @param int $status Drupal v7.x numeric forum type -
trunk/src/includes/admin/converters/Example.php
r6573 r6670 20 20 * Main Constructor 21 21 */ 22 function __construct() {22 public function __construct() { 23 23 parent::__construct(); 24 $this->setup_globals();25 24 } 26 25 -
trunk/src/includes/admin/converters/FluxBB.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 614 613 615 614 /** 616 * Translate the post status from FluxBB v1.5.3 numeric 's to WordPress's strings.615 * Translate the post status from FluxBB v1.5.3 numerics to WordPress's strings. 617 616 * 618 617 * @param int $status FluxBB v1.5.3 numeric topic status … … 634 633 635 634 /** 636 * Translate the topic sticky status type from FluxBB v1.5.3 numeric 's to WordPress's strings.635 * Translate the topic sticky status type from FluxBB v1.5.3 numerics to WordPress's strings. 637 636 * 638 637 * @param int $status FluxBB v1.5.3 numeric forum type -
trunk/src/includes/admin/converters/Invision.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 472 477 473 478 /** 474 * Translate the forum type from Invision numeric 's to WordPress's strings.479 * Translate the forum type from Invision numerics to WordPress's strings. 475 480 * 476 481 * @param int $status Invision numeric forum type … … 487 492 488 493 /** 489 * Translate the topic sticky status type from Invision numeric 's to WordPress's strings.494 * Translate the topic sticky status type from Invision numerics to WordPress's strings. 490 495 * 491 496 * @param int $status Invision numeric forum type … … 628 633 $field = $invision_markup; 629 634 630 require_once bbpress()->admin->admin_dir . 'parser.php'; 631 $bbcode = BBCode::getInstance(); 632 $bbcode->enable_smileys = false; 633 $bbcode->smiley_regex = false; 634 return html_entity_decode( $bbcode->Parse( $field ) ); 635 // Parse out any bbCodes in $field with the BBCode 'parser.php' 636 return parent::callback_html( $field ); 635 637 } 636 638 } -
trunk/src/includes/admin/converters/Kunena1.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 469 468 470 469 /** 471 * Translate the forum type from Kunena v1.x numeric 's to WordPress's strings.470 * Translate the forum type from Kunena v1.x numerics to WordPress's strings. 472 471 * 473 472 * @param int $status Kunena v1.x numeric forum type … … 484 483 485 484 /** 486 * Translate the forum status from Kunena v1.x numeric 's to WordPress's strings.485 * Translate the forum status from Kunena v1.x numerics to WordPress's strings. 487 486 * 488 487 * @param int $status Kunena v1.x numeric forum status … … 504 503 505 504 /** 506 * Translate the post status from Kunena v1.x numeric 's to WordPress's strings.505 * Translate the post status from Kunena v1.x numerics to WordPress's strings. 507 506 * 508 507 * @param int $status Kunena v1.x numeric topic status -
trunk/src/includes/admin/converters/Kunena2.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 32 31 33 32 /** Forum Section *****************************************************/ 34 35 33 36 34 // Old forum id (Stored in postmeta) … … 500 498 } 501 499 /** 502 * Translate the forum type from Kunena v2.x numeric 's to WordPress's strings.500 * Translate the forum type from Kunena v2.x numerics to WordPress's strings. 503 501 * 504 502 * @param int $status Kunena v2.x numeric forum type … … 515 513 516 514 /** 517 * Translate the forum status from Kunena v2.x numeric 's to WordPress's strings.515 * Translate the forum status from Kunena v2.x numerics to WordPress's strings. 518 516 * 519 517 * @param int $status Kunena v2.x numeric forum status … … 535 533 536 534 /** 537 * Translate the post status from Kunena v2.x numeric 's to WordPress's strings.535 * Translate the post status from Kunena v2.x numerics to WordPress's strings. 538 536 * 539 537 * @param int $status Kunena v2.x numeric topic status -
trunk/src/includes/admin/converters/Kunena3.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 724 723 725 724 /** 726 * Translate the forum type from Kunena v3.x numeric 's to WordPress's strings.725 * Translate the forum type from Kunena v3.x numerics to WordPress's strings. 727 726 * 728 727 * @param int $status Kunena v3.x numeric forum type … … 739 738 740 739 /** 741 * Translate the forum status from Kunena v3.x numeric 's to WordPress's strings.740 * Translate the forum status from Kunena v3.x numerics to WordPress's strings. 742 741 * 743 742 * @param int $status Kunena v3.x numeric forum status … … 759 758 760 759 /** 761 * Translate the post status from Kunena v3.x numeric 's to WordPress's strings.760 * Translate the post status from Kunena v3.x numerics to WordPress's strings. 762 761 * 763 762 * @param int $status Kunena v3.x numeric topic status -
trunk/src/includes/admin/converters/Mingle.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section ******************************************************/ … … 435 440 436 441 /** 437 * Translate the topic status from Mingle numeric 's to WordPress's strings.442 * Translate the topic status from Mingle numerics to WordPress's strings. 438 443 * 439 444 * @param int $status Mingle v1.x numeric topic status … … 455 460 456 461 /** 457 * Translate the topic sticky status type from Mingle numeric 's to WordPress's strings.462 * Translate the topic sticky status type from Mingle numerics to WordPress's strings. 458 463 * 459 464 * @param int $status Mingle numeric forum type … … 473 478 return $status; 474 479 } 475 476 /**477 * This callback processes any custom BBCodes with parser.php478 */479 protected function callback_html( $field ) {480 require_once bbpress()->admin->admin_dir . 'parser.php';481 $bbcode = BBCode::getInstance();482 $bbcode->enable_smileys = false;483 $bbcode->smiley_regex = false;484 return html_entity_decode( $bbcode->Parse( $field ) );485 }486 480 } -
trunk/src/includes/admin/converters/MyBB.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 540 539 541 540 /** 542 * Translate the post status from MyBB v1.6.10 numeric 's to WordPress's strings.541 * Translate the post status from MyBB v1.6.10 numerics to WordPress's strings. 543 542 * 544 543 * @param int $status MyBB v1.6.10 numeric topic status … … 560 559 561 560 /** 562 * Translate the topic sticky status type from MyBB v1.6.10 numeric 's to WordPress's strings.561 * Translate the topic sticky status type from MyBB v1.6.10 numerics to WordPress's strings. 563 562 * 564 563 * @param int $status MyBB v1.6.10 numeric forum type -
trunk/src/includes/admin/converters/PHPFox3.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 530 529 531 530 /** 532 * Translate the forum type from PHPFox v3.5.x numeric 's to WordPress's strings.531 * Translate the forum type from PHPFox v3.5.x numerics to WordPress's strings. 533 532 * 534 533 * @param int $status PHPFox v3.5.x numeric forum type … … 550 549 551 550 /** 552 * Translate the forum status from PHPFox v3.5.x numeric 's to WordPress's strings.551 * Translate the forum status from PHPFox v3.5.x numerics to WordPress's strings. 553 552 * 554 553 * @param int $status PHPFox v3.5.x numeric forum status … … 570 569 571 570 /** 572 * Translate the post status from PHPFox v3.5.x numeric 's to WordPress's strings.571 * Translate the post status from PHPFox v3.5.x numerics to WordPress's strings. 573 572 * 574 573 * @param int $status PHPFox v3.5.x numeric topic status … … 590 589 591 590 /** 592 * Translate the topic sticky status type from PHPFox v3.5.x numeric 's to WordPress's strings.591 * Translate the topic sticky status type from PHPFox v3.5.x numerics to WordPress's strings. 593 592 * 594 593 * @param int $status PHPFox v3.5.x numeric forum type -
trunk/src/includes/admin/converters/PHPWind.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 538 537 539 538 /** 540 * Translate the post status from PHPWind v9.x numeric 's to WordPress's strings.539 * Translate the post status from PHPWind v9.x numerics to WordPress's strings. 541 540 * 542 541 * @param int $status PHPWind v9.x numeric topic status -
trunk/src/includes/admin/converters/Phorum.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 540 539 541 540 /** 542 * Translate the forum type from Phorum v5.2.19 numeric 's to WordPress's strings.541 * Translate the forum type from Phorum v5.2.19 numerics to WordPress's strings. 543 542 * 544 543 * @param int $status Phorum v5.2.19 numeric forum type … … 560 559 561 560 /** 562 * Translate the post status from Phorum v5.2.19 numeric 's to WordPress's strings.561 * Translate the post status from Phorum v5.2.19 numerics to WordPress's strings. 563 562 * 564 563 * @param int $status Phorum v5.2.19 numeric topic status -
trunk/src/includes/admin/converters/PunBB.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 687 686 688 687 /** 689 * Translate the post status from PunBB v1.4.2 numeric 's to WordPress's strings.688 * Translate the post status from PunBB v1.4.2 numerics to WordPress's strings. 690 689 * 691 690 * @param int $status PunBB v1.4.2 numeric topic status … … 707 706 708 707 /** 709 * Translate the topic sticky status type from PunBB v1.4.2 numeric 's to WordPress's strings.708 * Translate the topic sticky status type from PunBB v1.4.2 numerics to WordPress's strings. 710 709 * 711 710 * @param int $status PunBB v1.4.2 numeric forum type -
trunk/src/includes/admin/converters/SMF.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section ******************************************************/ … … 676 681 677 682 /** 678 * Translate the post status from SMF v2.0.4 numeric 's to WordPress's strings.683 * Translate the post status from SMF v2.0.4 numerics to WordPress's strings. 679 684 * 680 685 * @param int $status SMF v2.0.4 numeric topic status … … 696 701 697 702 /** 698 * Translate the topic sticky status type from SMF v2.0.4 numeric 's to WordPress's strings.703 * Translate the topic sticky status type from SMF v2.0.4 numerics to WordPress's strings. 699 704 * 700 705 * @param int $status SMF v2.0.4 numeric forum type … … 797 802 798 803 // Replace non-break space ' ' with space ' ' 799 $SMF_markup = preg_replace ( '/ /', ' ', $SMF_markup );804 $SMF_markup = preg_replace( '/ /', ' ', $SMF_markup ); 800 805 801 806 // Now that SMF custom HTML has been stripped put the cleaned HTML back in $field … … 803 808 804 809 // Parse out any bbCodes in $field with the BBCode 'parser.php' 805 require_once bbpress()->admin->admin_dir . 'parser.php'; 806 $bbcode = BBCode::getInstance(); 807 $bbcode->enable_smileys = false; 808 $bbcode->smiley_regex = false; 809 return html_entity_decode( $bbcode->Parse( $field ) ); 810 return parent::callback_html( $field ); 810 811 } 811 812 } -
trunk/src/includes/admin/converters/SimplePress5.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 522 527 523 528 /** 524 * Translate the post status from Simple:Press v5.x numeric 's to WordPress's strings.529 * Translate the post status from Simple:Press v5.x numerics to WordPress's strings. 525 530 * 526 531 * @param int $status Simple:Press numeric status … … 542 547 543 548 /** 544 * Translate the topic sticky status type from Simple:Press v5.x numeric 's to WordPress's strings.549 * Translate the topic sticky status type from Simple:Press v5.x numerics to WordPress's strings. 545 550 * 546 551 * @param int $status Simple:Press v5.x numeric forum type … … 598 603 599 604 // Replace '<strong>username said </strong>' with '@username said:' 600 $simplepress_markup = preg_replace ( '/\<strong\>(.*?)\ said\ \<\/strong\>/', '@$1 said:', $simplepress_markup );605 $simplepress_markup = preg_replace( '/\<strong\>(.*?)\ said\ \<\/strong\>/', '@$1 said:', $simplepress_markup ); 601 606 602 607 // Replace '<p> </p>' with '<p> </p>' 603 $simplepress_markup = preg_replace ( '/\n( |[\s\p{Z}\xA0\x{00A0}]+)\r/', '<br>', $simplepress_markup );608 $simplepress_markup = preg_replace( '/\n( |[\s\p{Z}\xA0\x{00A0}]+)\r/', '<br>', $simplepress_markup ); 604 609 605 610 // Now that SimplePress' custom HTML codes have been stripped put the cleaned HTML back in $field 606 611 $field = $simplepress_markup; 607 612 608 // Parse out any bbCodes with the BBCode 'parser.php' 609 require_once bbpress()->admin->admin_dir . 'parser.php'; 610 $bbcode = BBCode::getInstance(); 611 $bbcode->enable_smileys = false; 612 $bbcode->smiley_regex = false; 613 return html_entity_decode( $bbcode->Parse( $field ) ); 613 // Parse out any bbCodes in $field with the BBCode 'parser.php' 614 return parent::callback_html( $field ); 614 615 } 615 616 } -
trunk/src/includes/admin/converters/Vanilla.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 521 526 522 527 /** 523 * Translate the topic status from Vanilla v2.x numeric 's to WordPress's strings.528 * Translate the topic status from Vanilla v2.x numerics to WordPress's strings. 524 529 * 525 530 * @param int $status Vanilla v2.x numeric topic status … … 541 546 542 547 /** 543 * Translate the topic sticky status type from Vanilla v2.x numeric 's to WordPress's strings.548 * Translate the topic sticky status type from Vanilla v2.x numerics to WordPress's strings. 544 549 * 545 550 * @param int $status Vanilla v2.x numeric forum type … … 601 606 return false; 602 607 } 603 604 /**605 * This callback processes any custom BBCodes with parser.php606 */607 protected function callback_html( $field ) {608 require_once bbpress()->admin->admin_dir . 'parser.php';609 $bbcode = BBCode::getInstance();610 $bbcode->enable_smileys = false;611 $bbcode->smiley_regex = false;612 return html_entity_decode( $bbcode->Parse( $field ) );613 }614 608 } -
trunk/src/includes/admin/converters/XMB.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 671 670 672 671 /** 673 * Translate the post status from XMB v1.9.11.13 numeric 's to WordPress's strings.672 * Translate the post status from XMB v1.9.11.13 numerics to WordPress's strings. 674 673 * 675 674 * @param int $status XMB v1.9.11.13 numeric topic status … … 691 690 692 691 /** 693 * Translate the topic sticky status type from XMB v1.9.11.13 numeric 's to WordPress's strings.692 * Translate the topic sticky status type from XMB v1.9.11.13 numerics to WordPress's strings. 694 693 * 695 694 * @param int $status XMB v1.9.11.13 numeric forum type -
trunk/src/includes/admin/converters/XenForo.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 722 727 723 728 /** 724 * Translate the forum status from XenForo numeric 's to WordPress's strings.729 * Translate the forum status from XenForo numerics to WordPress's strings. 725 730 * 726 731 * @param int $status XenForo numeric forum status … … 762 767 763 768 /** 764 * Translate the topic status from XenForo numeric 's to WordPress's strings.769 * Translate the topic status from XenForo numerics to WordPress's strings. 765 770 * 766 771 * @param int $status XenForo numeric topic status … … 782 787 783 788 /** 784 * Translate the topic sticky status type from XenForo numeric 's to WordPress's strings.789 * Translate the topic sticky status type from XenForo numerics to WordPress's strings. 785 790 * 786 791 * @param int $status XenForo numeric forum type … … 841 846 842 847 // Parse out any bbCodes in $field with the BBCode 'parser.php' 843 require_once bbpress()->admin->admin_dir . 'parser.php'; 844 $bbcode = BBCode::getInstance(); 845 $bbcode->enable_smileys = false; 846 $bbcode->smiley_regex = false; 847 return html_entity_decode( $bbcode->Parse( $field ) ); 848 return parent::callback_html( $field ); 848 849 } 849 850 } -
trunk/src/includes/admin/converters/bbPress1.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 626 631 627 632 /** 628 * Translate the post status from bbPress 1's numeric 's to WordPress's633 * Translate the post status from bbPress 1's numerics to WordPress's 629 634 * strings. 630 635 * … … 651 656 652 657 /** 653 * Translate the forum type from bbPress 1.x numeric 's to WordPress's strings.658 * Translate the forum type from bbPress 1.x numerics to WordPress's strings. 654 659 * 655 660 * @param int $status bbPress 1.x numeric forum type … … 666 671 667 672 /** 668 * Translate the topic status from bbPress 1's numeric 's to WordPress's673 * Translate the topic status from bbPress 1's numerics to WordPress's 669 674 * strings. 670 675 * … … 687 692 688 693 /** 689 * Translate the topic sticky status type from bbPress 1.x numeric 's to WordPress's strings.694 * Translate the topic sticky status type from bbPress 1.x numerics to WordPress's strings. 690 695 * 691 696 * @param int $status bbPress 1.x numeric forum type … … 752 757 return $field; 753 758 } 754 755 /**756 * This callback:757 *758 * - turns off smiley parsing759 * - processes any custom parser.php attributes760 * - decodes necessary HTML entities761 */762 protected function callback_html( $field ) {763 require_once bbpress()->admin->admin_dir . 'parser.php';764 $bbcode = BBCode::getInstance();765 $bbcode->enable_smileys = false;766 $bbcode->smiley_regex = false;767 return html_entity_decode( $bbcode->Parse( $field ) );768 }769 759 } -
trunk/src/includes/admin/converters/e107v1.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 489 494 490 495 /** 491 * Translate the forum type from e107 v1.x numeric 's to WordPress's strings.496 * Translate the forum type from e107 v1.x numerics to WordPress's strings. 492 497 * 493 498 * @param int $status e107 v1.x numeric forum type … … 504 509 505 510 /** 506 * Translate the post status from e107 v1.x numeric 's to WordPress's strings.511 * Translate the post status from e107 v1.x numerics to WordPress's strings. 507 512 * 508 513 * @param int $status e107 v1.x numeric topic status … … 524 529 525 530 /** 526 * Translate the topic sticky status type from e107 v1.x numeric 's to WordPress's strings.531 * Translate the topic sticky status type from e107 v1.x numerics to WordPress's strings. 527 532 * 528 533 * @param int $status e107 v1.x numeric forum type … … 628 633 629 634 // Parse out any bbCodes in $field with the BBCode 'parser.php' 630 require_once bbpress()->admin->admin_dir . 'parser.php'; 631 $bbcode = BBCode::getInstance(); 632 $bbcode->enable_smileys = false; 633 $bbcode->smiley_regex = false; 634 return html_entity_decode( $bbcode->Parse( $field ) ); 635 return parent::callback_html( $field ); 635 636 } 636 637 } -
trunk/src/includes/admin/converters/phpBB.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 public function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 832 837 833 838 /** 834 * Translate the forum type from phpBB v3.x numeric 's to WordPress's strings.839 * Translate the forum type from phpBB v3.x numerics to WordPress's strings. 835 840 * 836 841 * @param int $status phpBB v3.x numeric forum type … … 852 857 853 858 /** 854 * Translate the forum status from phpBB v3.x numeric 's to WordPress's strings.859 * Translate the forum status from phpBB v3.x numerics to WordPress's strings. 855 860 * 856 861 * @param int $status phpBB v3.x numeric forum status … … 872 877 873 878 /** 874 * Translate the topic status from phpBB v3.x numeric 's to WordPress's strings.879 * Translate the topic status from phpBB v3.x numerics to WordPress's strings. 875 880 * 876 881 * @param int $status phpBB v3.x numeric topic status … … 892 897 893 898 /** 894 * Translate the topic sticky status type from phpBB 3.x numeric 's to WordPress's strings.899 * Translate the topic sticky status type from phpBB 3.x numerics to WordPress's strings. 895 900 * 896 901 * @param int $status phpBB 3.x numeric forum type … … 1018 1023 1019 1024 // Parse out any bbCodes in $field with the BBCode 'parser.php' 1020 require_once bbpress()->admin->admin_dir . 'parser.php'; 1021 $bbcode = BBCode::getInstance(); 1022 $bbcode->enable_smileys = false; 1023 $bbcode->smiley_regex = false; 1024 return html_entity_decode( $bbcode->Parse( $field ) ); 1025 return parent::callback_html( $field ); 1025 1026 } 1026 1027 } -
trunk/src/includes/admin/converters/vBulletin.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 private function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 651 656 652 657 /** 653 * Translate the forum type from vBulletin v4.x numeric 's to WordPress's strings.658 * Translate the forum type from vBulletin v4.x numerics to WordPress's strings. 654 659 * 655 660 * @param int $status vBulletin v4.x numeric forum type … … 666 671 667 672 /** 668 * Translate the topic sticky status type from vBulletin v4.x numeric 's to WordPress's strings.673 * Translate the topic sticky status type from vBulletin v4.x numerics to WordPress's strings. 669 674 * 670 675 * @param int $status vBulletin v4.x numeric forum type … … 701 706 702 707 /** 703 * Translate the post status from vBulletin numeric 's to WordPress's strings.708 * Translate the post status from vBulletin numerics to WordPress's strings. 704 709 * 705 710 * @param int $status vBulletin v4.x numeric topic status … … 747 752 748 753 // Parse out any bbCodes in $field with the BBCode 'parser.php' 749 require_once bbpress()->admin->admin_dir . 'parser.php'; 750 $bbcode = BBCode::getInstance(); 751 $bbcode->enable_smileys = false; 752 $bbcode->smiley_regex = false; 753 return html_entity_decode( $bbcode->Parse( $field ) ); 754 return parent::callback_html( $field ); 754 755 } 755 756 } -
trunk/src/includes/admin/converters/vBulletin3.php
r6573 r6670 21 21 * 22 22 */ 23 function __construct() {23 public function __construct() { 24 24 parent::__construct(); 25 $this->setup_globals();26 25 } 27 26 … … 30 29 */ 31 30 private function setup_globals() { 31 32 // Setup smiley URL & path 33 $this->bbcode_parser_properties = array( 34 'smiley_url' => false, 35 'smiley_dir' => false 36 ); 32 37 33 38 /** Forum Section *****************************************************/ … … 655 660 656 661 /** 657 * Translate the forum type from vBulletin v3.x numeric 's to WordPress's strings.662 * Translate the forum type from vBulletin v3.x numerics to WordPress's strings. 658 663 * 659 664 * @param int $status vBulletin v3.x numeric forum type … … 670 675 671 676 /** 672 * Translate the topic sticky status type from vBulletin v3.x numeric 's to WordPress's strings.677 * Translate the topic sticky status type from vBulletin v3.x numerics to WordPress's strings. 673 678 * 674 679 * @param int $status vBulletin v3.x numeric forum type … … 701 706 702 707 /** 703 * Translate the post status from vBulletin v3.x numeric 's to WordPress's strings.708 * Translate the post status from vBulletin v3.x numerics to WordPress's strings. 704 709 * 705 710 * @param int $status vBulletin v3.x numeric topic status … … 745 750 746 751 // Parse out any bbCodes in $field with the BBCode 'parser.php' 747 require_once bbpress()->admin->admin_dir . 'parser.php'; 748 $bbcode = BBCode::getInstance(); 749 $bbcode->enable_smileys = false; 750 $bbcode->smiley_regex = false; 751 return html_entity_decode( $bbcode->Parse( $field ) ); 752 return parent::callback_html( $field ); 752 753 } 753 754 }
Note: See TracChangeset
for help on using the changeset viewer.