googleplushangoutevent_get_widget_message

The WordPress Core googleplushangoutevent get widget message function.

Description

googleplushangoutevent_get_widget_message( $events, $type ); 

Parameters (2)

0. $events
The events.
1. $type
The type.

Usage

  1. if ( !function_exists( 'googleplushangoutevent_get_widget_message' ) ) { 
  2. require_once '/lib/_widgets.php'; 
  3.  
  4. // The events. 
  5. $events = null; 
  6.  
  7. // The type. 
  8. $type = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = googleplushangoutevent_get_widget_message($events, $type); 
  12.  

Defined (1)

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

/lib/_widgets.php  
  1. function googleplushangoutevent_get_widget_message($events, $type) { 
  2. $message = __('Not Connected.', 'yakadanda-google-hangout-events'); 
  3.  
  4. $token = get_option('yakadanda_googleplus_hangout_event_access_token'); 
  5. if ($token) { 
  6. if ($type == 'normal') $message = 'No event yet.'; 
  7. else $message = __('No hangout event yet.', 'yakadanda-google-hangout-events'); 
  8.  
  9. // Error 403 message 
  10. $http_status = isset($events['error']['code']) ? $events['error']['code'] : null; 
  11. if ($http_status) { 
  12. $message = isset($events['error']['message']) ? $events['error']['message'] : null; 
  13. $message = $http_status . ' ' . $message . '.'; 
  14.  
  15. return $message;