Base class to be extended by specific individual importers.

phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared

since 2.1.0 bbPress (r3813)
package bbPress

 Methods

This is the constructor and it connects to the platform databases.

__construct() 

Run password through wp_hash_password().

callback_pass(string $username = '', string $password = ''

Parameters

$username

string

$password

string

This method deletes data from the wp database.

clean() 
since 2.6.0 bbPress (r6456)

This method deletes passwords from the wp database.

clean_passwords(integer $start = 1

Parameters

$start

integer

Start row

This method converts anonymous replies.

convert_anonymous_reply_authors($start = 1
since 2.6.0 bbPress (r5538)

Parameters

$start

This method converts anonymous topics.

convert_anonymous_topic_authors($start = 1
since 2.6.0 bbPress (r5538)

Parameters

$start

Convert Favorites.

convert_favorites($start = 1

Parameters

$start

This method converts old forum hierarchy to new bbPress hierarchy.

convert_forum_parents($start = 1

Parameters

$start

Convert Forum Subscriptions.

convert_forum_subscriptions($start = 1

Parameters

$start

Convert Forums.

convert_forums($start = 1

Parameters

$start

Convert Posts.

convert_replies($start = 1

Parameters

$start

This method converts old reply_to post id to new bbPress reply_to post id.

convert_reply_to_parents($start = 1
since 2.4.0 bbPress (r5093)

Parameters

$start

Convert Table.

convert_table(string $to_type, integer $start) 

Parameters

$to_type

string

to type

$start

integer

Start row

Convert Topic Tags.

convert_tags($start = 1

Parameters

$start

This method converts old closed topics to bbPress closed topics.

convert_topic_closed_topics($start = 1
since 2.6.0 bbPress (r5425)

Parameters

$start

This method converts old topic stickies to new bbPress stickies.

convert_topic_stickies($start = 1
since 2.5.0 bbPress (r5170)

Parameters

$start

Convert Topic Subscriptions.

convert_topic_subscriptions($start = 1

Parameters

$start

This method converts old topic super stickies to new bbPress super stickies.

convert_topic_super_stickies($start = 1
since 2.5.0 bbPress (r5170)

Parameters

$start

Convert Topics / Threads.

convert_topics($start = 1

Parameters

$start

Convert Users.

convert_users($start = 1

Parameters

$start

Setup global values.

setup_globals() 

This method implements the authentication for the different forums.

authenticate_pass(string $password, $hash) 

Parameters

$password

string

Un-encoded password.

$hash

callback_datetime()

callback_datetime($field) 

Parameters

$field

callback_html()

callback_html($field) 

Parameters

$field

callback_negative()

callback_negative($field) 

Parameters

$field

callback_null()

callback_null($field) 

Parameters

$field

callback_slug()

callback_slug($field) 

Parameters

$field

Info

info() 

Check if the topic or reply author is anonymous.

callback_check_anonymous(string $field) : string
since 2.6.0 bbPress (r5544)

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to forum ID's.

callback_forumid(string $field) : string

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to reply_to post id.

callback_reply_to(string $field) : string
since 2.4.0 bbPress (r5093)

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to topic ID's.

callback_topicid(string $field) : string

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls map topics ID's to forum ID's.

callback_topicid_to_forumid(string $field) : string

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to user ID's.

callback_userid(string $field) : string

Parameters

$field

string

Returns

string

Update the number of rows in the current step.

count_rows_by_results(string $query = '') : boolean
since 2.6.0 bbPress (r6637)

Parameters

$query

string

The literal MySQL query.

Returns

boolean

Update the number of rows in the current step.

count_rows_by_table(string $table_name = '') : boolean
since 2.6.0 bbPress (r6637)

Parameters

$table_name

string

The literal MySQL query.

Returns

boolean

This method grabs appropriate fields from the table specified.

get_fields(string $tablename = ''

Parameters

$tablename

string

The table name to grab fields from.

Update the last query option and return results.

get_results(string $query = '', string $output = OBJECT

Parameters

$query

string

$output

string

Update the last query option and return results.

get_row(string $query = ''

Parameters

$query

string

Initialize the converter

init() 
since 2.1.0

Update the last query option and do a general query.

query(string $query = ''

Parameters

$query

string

Update the last query ran.

update_query(string $query = '') : boolean
since 2.6.0 bbPress (r6637)

Parameters

$query

string

The literal MySQL query.

Returns

boolean

 Properties

 

Custom BBCode class properties in a key => value format

$bbcode_parser_properties : array

Default

array()
 

This is the charset for your wp database.

$charset : \str

Default

''
 

Whether to clean up any old converter data. Default false.

$clean : boolean

Default

false
 

Whether users should be converted or not. Default false.

$convert_users : boolean

Default

false
 

Sync table available.

$sync_table : boolean

Default

false
 

Sync table name.

$sync_table_name : \str

Default

''
 

This is the field mapping array to process.

$field_map : \array()

Default

array()
 

Map of from old forum ids to new forum ids. It is for optimization.

$map_forumid : \array()

Default

array()
 

Map of from old reply_to ids to new reply_to ids. It is for optimization.

$map_reply_to : \array()

Default

array()
 

Map of from old topic ids to new topic ids. It is for optimization.

$map_topicid : \array()

Default

array()
 

Map of topic to forum. It is for optimization.

$map_topicid_to_forumid : \array()

Default

array()
 

Map of from old user ids to new user ids. It is for optimization.

$map_userid : \array()

Default

array()
 

Maximum number of rows to convert at 1 time. Default 100.

$max_rows : integer

Default

100
 

This is the connection to the other platforms database.

$opdb : object

Default

 

This is the connection to the WordPress database.

$wpdb : object

Default