wp_set_wpdb_vars [ WordPress Functions ]
wp_set_wpdb_vars ( No parameters )
| Access: |
|
| See: |
|
| Defined at: |
|
| Codex |
Similar Functions: wp_reset_vars, wp_set_password, wp_set_link_cats, wp_set_object_terms, wp_get_db_schema
Sets the database table prefix and the format specifiers for database table columns.
Columns not listed here default to %s.
Source
function wp_set_wpdb_vars() {
global $wpdb, $table_prefix;
if ( !empty( $wpdb->error ) )
dead_db();
$wpdb->field_types = array( 'post_author' => '%d', 'post_parent' => '%d', 'menu_order' => '%d', 'term_id' => '%d', 'term_group' => '%d', 'term_taxonomy_id' => '%d',
'parent' => '%d', 'count' => '%d','object_id' => '%d', 'term_order' => '%d', 'ID' => '%d', 'comment_ID' => '%d', 'comment_post_ID' => '%d', 'comment_parent' => '%d',
'user_id' => '%d', 'link_id' => '%d', 'link_owner' => '%d', 'link_rating' => '%d', 'option_id' => '%d', 'blog_id' => '%d', 'meta_id' => '%d', 'post_id' => '%d',
'user_status' => '%d', 'umeta_id' => '%d', 'comment_karma' => '%d', 'comment_count' => '%d',
// multisite:
'active' => '%d', 'cat_id' => '%d', 'deleted' => '%d', 'lang_id' => '%d', 'mature' => '%d', 'public' => '%d', 'site_id' => '%d', 'spam' => '%d',
);
$prefix = $wpdb->set_prefix( $table_prefix );
if ( is_wp_error( $prefix ) ) {
wp_load_translations_early();
wp_die( __( '<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.' ) );
}
}Examples [ wp-snippets.com ]
Top Google Search Results
- wp_set_wpdb_vars (WordPress Function) - WPSeek.com
Jun 9, 2013 ... Sets the database table prefix and the format specifiers for database table columns. WordPress lookup for wp_set_wpdb_vars, a WordPress ...
wpseek.com - WordPress › Support » Tags — wp_set_wpdb_vars
Username or Email Address Password (forgot?) Register · WordPress › Support » wp_set_wpdb_vars. Tag: wp_set_wpdb_vars Add New » ...
wordpress.org - PHPXRef 0.7 : WordPress : Function Reference: wp_set_wpdb_vars()
Function and Method Cross Reference. wp_set_wpdb_vars(). Defined at: /wp- includes/load.php -> line 333. Referenced 1 times: /wp-settings.php -> line 76 ...
phpxref.ftwr.co.uk - PHPXRef 0.7.1 : Documentation Wordpress : Full Function Index
Function List (alphabetical). Total unique function names: 4871. Functions defined on the site: 4430; PHP functions used on the site: 441. Functions defined on ...
doc-wordpress.com
