installed() public method

Check if the Customers table was ever installed
Since: 1.4.3
public installed ( ) : boolean
return boolean Returns if the customers table was installed and upgrade routine run.
示例#1
0
/**
 * Drop Give's custom tables when a mu site is deleted.
 *
 * @since  1.4.3
 *
 * @param  array $tables The tables to drop.
 * @param  int   $blog_id The Blog ID being deleted.
 *
 * @return array          The tables to drop.
 */
function give_wpmu_drop_tables($tables, $blog_id)
{
    switch_to_blog($blog_id);
    $customers_db = new Give_DB_Customers();
    $customer_meta_db = new Give_DB_Customer_Meta();
    if ($customers_db->installed()) {
        $tables[] = $customers_db->table_name;
        $tables[] = $customer_meta_db->table_name;
    }
    restore_current_blog();
    return $tables;
}