gde_log_available

Check for existence and valid content of dx log.

Description

gde_log_available(); 

Usage

  1. if ( !function_exists( 'gde_log_available' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gde_log_available(); 
  7.  

Defined (1)

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

/functions-admin.php  
  1. function gde_log_available() { 
  2. global $wpdb; 
  3.  
  4. $table = $wpdb->base_prefix . 'gde_dx_log'; 
  5. $blogid = get_current_blog_id(); 
  6. $log = false; 
  7.  
  8. if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) == $table ) { 
  9. $c = $wpdb->get_var( "SELECT COUNT(*) FROM $table WHERE blogid = $blogid" ); 
  10. if ( $c > 0 ) { 
  11. $log = true; 
  12.  
  13. return $log;