Changeset 42836 for trunk/src/wp-includes/functions.php
- Timestamp:
- 03/16/2018 02:14:04 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r42824 r42836 4728 4728 4729 4729 /** 4730 * Determines whether site meta is enabled. 4731 * 4732 * This function checks whether the 'blogmeta' database table exists. The result is saved as 4733 * a setting for the main network, making it essentially a global setting. Subsequent requests 4734 * will refer to this setting instead of running the query. 4735 * 4736 * @since 5.0.0 4737 * 4738 * @global wpdb $wpdb WordPress database abstraction object. 4739 * 4740 * @return bool True if site meta is supported, false otherwise. 4741 */ 4742 function is_site_meta_supported() { 4743 global $wpdb; 4744 4745 if ( ! is_multisite() ) { 4746 return false; 4747 } 4748 4749 $network_id = get_main_network_id(); 4750 4751 $supported = get_network_option( $network_id, 'site_meta_supported', false ); 4752 if ( false === $supported ) { 4753 $supported = $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->blogmeta}'" ) ? 1 : 0; 4754 4755 update_network_option( $network_id, 'site_meta_supported', $supported ); 4756 } 4757 4758 return (bool) $supported; 4759 } 4760 4761 /** 4730 4762 * gmt_offset modification for smart timezone handling. 4731 4763 *
Note: See TracChangeset
for help on using the changeset viewer.