gmb_install

Install.

Description

gmb_install( (bool) $network_wide = false ); 

Runs on plugin install

Parameters (1)

0. $network_wide — Optional. (bool) => false
The network wide.

Usage

  1. if ( !function_exists( 'gmb_install' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'maps-builder/vendor/wordimpress/maps-builder-core/includes/install.php'; 
  3.  
  4. // The network wide. 
  5. $network_wide = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gmb_install($network_wide); 
  9.  

Defined (1)

The function is defined in the following location(s).

/vendor/wordimpress/maps-builder-core/includes/install.php  
  1. function gmb_install( $network_wide = false ) { 
  2.  
  3. global $wpdb; 
  4.  
  5. if ( is_multisite() && $network_wide ) { 
  6.  
  7. foreach ( $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs LIMIT 100" ) as $blog_id ) { 
  8.  
  9. switch_to_blog( $blog_id ); 
  10. restore_current_blog(); 
  11.  
  12.  
  13. } else { 
  14.  
  15.  
  16.