Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/14/2015 12:31:42 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Abstraction: Use bbp_db(), bbp_rewrite() & friends, introduced in r5823 & r5826.

This commit improves the stability of bbPress in the WordPress environment by reducing global variable exposure. It also comes with minimal opcode improvements in some circumstances where $GLOBALS is preferred over defining via global statements.

Some additional surrounding cleanup directly related to functions & methods being altered is also being performed here.

Fixes #2786.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/functions.php

    r5825 r5827  
    12491249 *                    and destination topic ids
    12501250 * @uses bbp_get_reply_post_type() To get the reply post type
    1251  * @uses wpdb::prepare() To prepare our sql query
    1252  * @uses wpdb::get_results() To execute the sql query and get results
    12531251 * @uses wp_update_post() To update the replies
    12541252 * @uses bbp_update_reply_topic_id() To update the reply topic id
     
    21122110    /** Proceed ***************************************************************/
    21132111
    2114     global $wpdb;
    2115 
    21162112    // Table name for posts
    2117     $table_name = $wpdb->prefix . 'posts';
     2113    $table_name = bbp_db()->prefix . 'posts';
    21182114
    21192115    // Get the topic ID from the post_parent, set in bbp_has_replies()
Note: See TracChangeset for help on using the changeset viewer.