BBP_Converter_Base::convert_topic_super_stickies( $start )
This method converts old topic super stickies to new Forums super stickies.
Description
Source
File: bp-forums/admin/converter.php
public function convert_topic_super_stickies( $start ) { $has_update = false; if ( !empty( $this->sync_table ) ) { $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows; } else { $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows; } update_option( '_bbp_converter_query', $query ); $sticky_array = $this->wpdb->get_results( $query ); foreach ( (array) $sticky_array as $row ) { $super = true; bbp_stick_topic( $row->value_id, $super ); $has_update = true; } return ! $has_update; }
Changelog
Version | Description |
---|---|
bbPress (r) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.