BBP_Converter_Base::convert_topic_super_stickies( $start = 1 )
This method converts old topic super stickies to new bbPress super stickies.
Description Description
Source Source
File: includes/admin/classes/class-bbp-converter-base.php
public function convert_topic_super_stickies( $start = 1 ) { $has_update = false; $query = ! empty( $this->sync_table ) ? $this->wpdb->prepare( "SELECT value_id, meta_value FROM {$this->sync_table_name} WHERE meta_key = %s AND meta_value = %s LIMIT {$start}, {$this->max_rows}", '_bbp_old_sticky_status_id', 'super-sticky' ) : $this->wpdb->prepare( "SELECT post_id AS value_id, meta_value FROM {$this->wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s LIMIT {$start}, {$this->max_rows}", '_bbp_old_sticky_status_id', 'super-sticky' ); foreach ( $this->count_rows_by_results( $query ) as $row ) { $super = true; bbp_stick_topic( $row->value_id, $super ); $has_update = true; } return ! $has_update; }
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |