- Timestamp:
- 08/27/2017 11:24:00 PM (8 years ago)
- File:
-
- 1 edited
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 ) );
Note: See TracChangeset
for help on using the changeset viewer.