Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_Converter_Base::callback_reply_to( string $field )
A mini cache system to reduce database calls to reply_to post id.
Description Description
Parameters Parameters
- $field
-
(Required)
Return Return
(string)
Source Source
File: includes/admin/classes/class-bbp-converter-base.php
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | private function callback_reply_to( $field ) { if ( ! isset( $this ->map_reply_to[ $field ] ) ) { $row = ! empty ( $this ->sync_table ) ? $this ->get_row( $this ->wpdb->prepare( "SELECT value_id, meta_value FROM {$this->sync_table_name} WHERE meta_key = %s AND meta_value = %s LIMIT 1" , '_bbp_old_reply_id' , $field ) ) : $this ->get_row( $this ->wpdb->prepare( "SELECT post_id AS value_id FROM {$this->wpdb->postmeta} WHERE meta_key = %s AND meta_value = %s LIMIT 1" , '_bbp_old_reply_id' , $field ) ); $this ->map_reply_to[ $field ] = ! is_null ( $row ) ? $row ->value_id : 0; } return $this ->map_reply_to[ $field ]; } |
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |