Changeset 8119 for trunk/bp-core/admin/bp-core-functions.php
- Timestamp:
- 03/13/2014 12:58:28 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-functions.php
r8117 r8119 277 277 'name' => __( 'Register', 'buddypress' ) 278 278 ); 279 280 bp_core_maybe_install_signups(); 279 281 } 280 282 … … 791 793 <?php 792 794 } 795 796 /** 797 * Check if the signups table needs to be created. 798 * 799 * @since BuddyPress (2.0.0) 800 * 801 * @global $wpdb 802 */ 803 function bp_core_maybe_install_signups() { 804 global $wpdb; 805 806 // Multisite installations already have the signups table. 807 if ( ! empty( $wpdb->signups ) ) { 808 return; 809 } 810 811 $bp_signups = bp_core_get_table_prefix() . 'signups'; 812 813 // Check for the table 814 $suppress = $wpdb->suppress_errors(); 815 $table_exists = $wpdb->get_results( "DESCRIBE {$bp_signups};" ); 816 $wpdb->suppress_errors( $suppress ); 817 818 // Bail if the table exists 819 if ( ! empty( $table_exists ) ) { 820 return; 821 } 822 823 // Signups is not there and we need it so let's create it 824 require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-schema.php' ); 825 826 bp_core_install_signups(); 827 }
Note: See TracChangeset
for help on using the changeset viewer.