wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
is_site_meta_supported › WordPress Function
Depuis5.1.0
Dépréciéen/a
› is_site_meta_supported ( Pas de paramètres )
| Retourne: |
|
| Défini(e) dans: |
|
| Codex: |
Determines whether site meta is enabled.
This function checks whether the 'blogmeta' database table exists. The result is saved as a setting for the main network, making it essentially a global setting. Subsequent requests will refer to this setting instead of running the query.Fonctions en relation: wp_is_https_supported, add_theme_support, wp_check_site_meta_support_prefilter, gd_edit_image_support, wp_timezone_supported
Source
function is_site_meta_supported() {
global $wpdb;
if ( ! is_multisite() ) {
return false;
}
$network_id = get_main_network_id();
$supported = get_network_option( $network_id, 'site_meta_supported', false );
if ( false === $supported ) {
$supported = $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->blogmeta}'" ) ? 1 : 0;
update_network_option( $network_id, 'site_meta_supported', $supported );
}
return (bool) $supported;
}