PluginProbe
bbPress / 2.6.17
bbPress v2.6.17
2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 All 72 releases
← All changes | includes/admin/converters/Example.php +14 -7 trunk2.6.17 View file →
@@ -16,8 +16,15 @@
16 16 */
17 17 class Example extends BBP_Converter_Base {
18 18
19 19 /**
20 + * Main Constructor
21 + */
22 + public function __construct() {
23 + parent::__construct();
24 + }
25 +
26 + /**
20 27 * Sets up the field mappings
21 28 */
22 29 public function setup_globals() {
23 30
@@ -80,9 +87,9 @@
80 87 'to_type' => 'forum',
81 88 'to_fieldname' => 'post_title'
82 89 );
83 90
84 - // Forum slug (Clean name to avoid conflicts)
91 + // Forum slug (Clean name to avoid confilcts)
85 92 $this->field_map[] = array(
86 93 'from_tablename' => 'forums_table',
87 94 'from_fieldname' => 'the_forum_slug',
88 95 'to_type' => 'forum',
@@ -128,24 +135,24 @@
128 135 // Forum dates.
129 136 $this->field_map[] = array(
130 137 'to_type' => 'forum',
131 138 'to_fieldname' => 'post_date',
132 - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore
139 + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
133 140 );
134 141 $this->field_map[] = array(
135 142 'to_type' => 'forum',
136 143 'to_fieldname' => 'post_date_gmt',
137 - 'default' => gmdate( 'Y-m-d H:i:s' )
144 + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
138 145 );
139 146 $this->field_map[] = array(
140 147 'to_type' => 'forum',
141 148 'to_fieldname' => 'post_modified',
142 - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore
149 + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
143 150 );
144 151 $this->field_map[] = array(
145 152 'to_type' => 'forum',
146 153 'to_fieldname' => 'post_modified_gmt',
147 - 'default' => gmdate( 'Y-m-d H:i:s' )
154 + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
148 155 );
149 156
150 157 // Setup the table joins for the forum section
151 158 $this->field_map[] = array(
@@ -153,9 +160,9 @@
153 160 'from_fieldname' => 'forum_id',
154 161 'join_tablename' => 'forums_table',
155 162 'join_type' => 'INNER',
156 163 'join_expression' => 'USING groups_table.forum_id = forums_table.forum_id',
157 - // 'from_expression' => 'WHERE forums_table.forum_id != 1',
164 + // 'from_expression' => 'WHERE forums_table.forum_id != 1',
158 165 'to_type' => 'forum'
159 166 );
160 167
161 168 /** Forum Subscriptions Section ***************************************/
@@ -707,9 +714,9 @@
707 714 $pass_array = unserialize(
708 715 $serialized_pass,
709 716 array(
710 717 'allowed_classes' => false,
711 - 'max_depth' => 1,
718 + 'max_depth' => 1
712 719 )
713 720 );
714 721
715 722 // Bail if missing values