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)
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)
This method converts old forum hierarchy to new bbPress hierarchy.
convert_forum_parents($start = 1)
Convert Forum Subscriptions.
convert_forum_subscriptions($start = 1)
Convert Forums.
convert_forums($start = 1)
Convert Posts.
convert_replies($start = 1)
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)
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)
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)
Convert Users.
convert_users($start = 1)
Setup global values.
setup_globals()
This method implements the authentication for the different forums.
authenticate_pass(string $password, $hash)
Parameters
$password
stringUn-encoded password.
$hash
callback_datetime()
callback_datetime($field)
callback_html()
callback_html($field)
callback_negative()
callback_negative($field)
callback_null()
callback_null($field)
callback_slug()
callback_slug($field)
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
stringThe 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
stringThe literal MySQL query.
Returns
boolean
This method grabs appropriate fields from the table specified.
get_fields(string $tablename = '')
Parameters
$tablename
stringThe 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 = '')
Initialize the converter
init()
Update the last query option and do a general query.
query(string $query = '')
Update the last query ran.
update_query(string $query = '') : boolean
| since |
2.6.0 bbPress (r6637) |
Parameters
$query
stringThe literal MySQL query.
Returns
boolean
Properties
Custom BBCode class properties in a key => value format
$bbcode_parser_properties : array
This is the charset for your wp database.
$charset : \str
Whether to clean up any old converter data. Default false.
$clean : boolean
Whether users should be converted or not. Default false.
$convert_users : boolean
Sync table available.
$sync_table : boolean
Sync table name.
$sync_table_name : \str
This is the field mapping array to process.
$field_map : \array()
Map of from old forum ids to new forum ids. It is for optimization.
$map_forumid : \array()
Map of from old reply_to ids to new reply_to ids. It is for optimization.
$map_reply_to : \array()
Map of from old topic ids to new topic ids. It is for optimization.
$map_topicid : \array()
Map of topic to forum. It is for optimization.
$map_topicid_to_forumid : \array()
Map of from old user ids to new user ids. It is for optimization.
$map_userid : \array()
Maximum number of rows to convert at 1 time. Default 100.
$max_rows : integer
This is the connection to the other platforms database.
$opdb : object
This is the connection to the WordPress database.
$wpdb : object