| @@ -16,8 +16,16 @@ | ||
| 16 | 16 | */ |
| 17 | 17 | class SMF extends BBP_Converter_Base { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | + * Main Constructor | |
| 21 | + * | |
| 22 | + */ | |
| 23 | + public function __construct() { | |
| 24 | + parent::__construct(); | |
| 25 | + } | |
| 26 | + | |
| 27 | + /** | |
| 20 | 28 | * Sets up the field mappings |
| 21 | 29 | */ |
| 22 | 30 | public function setup_globals() { |
| 23 | 31 | |
| @@ -128,24 +136,24 @@ | ||
| 128 | 136 | // Forum dates. |
| 129 | 137 | $this->field_map[] = array( |
| 130 | 138 | 'to_type' => 'forum', |
| 131 | 139 | 'to_fieldname' => 'post_date', |
| 132 | - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore | |
| 140 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 133 | 141 | ); |
| 134 | 142 | $this->field_map[] = array( |
| 135 | 143 | 'to_type' => 'forum', |
| 136 | 144 | 'to_fieldname' => 'post_date_gmt', |
| 137 | - 'default' => gmdate( 'Y-m-d H:i:s' ) | |
| 145 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 138 | 146 | ); |
| 139 | 147 | $this->field_map[] = array( |
| 140 | 148 | 'to_type' => 'forum', |
| 141 | 149 | 'to_fieldname' => 'post_modified', |
| 142 | - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore | |
| 150 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 143 | 151 | ); |
| 144 | 152 | $this->field_map[] = array( |
| 145 | 153 | 'to_type' => 'forum', |
| 146 | 154 | 'to_fieldname' => 'post_modified_gmt', |
| 147 | - 'default' => gmdate( 'Y-m-d H:i:s' ) | |
| 155 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 148 | 156 | ); |
| 149 | 157 | |
| 150 | 158 | /** Forum Subscriptions Section ***************************************/ |
| 151 | 159 | |
| @@ -742,10 +750,8 @@ | ||
| 742 | 750 | } |
| 743 | 751 | |
| 744 | 752 | /** |
| 745 | 753 | * This callback processes any custom parser.php attributes and custom code with preg_replace |
| 746 | - * | |
| 747 | - * @param string $field HTML field | |
| 748 | 754 | */ |
| 749 | 755 | protected function callback_html( $field ) { |
| 750 | 756 | |
| 751 | 757 | // Strips SMF custom HTML first from $field before parsing $field to parser.php |