googleapps_service_name

Get the name of the service we'll be embedding.

Description

(string) googleapps_service_name( (string) $domain, (string) $dir ); 

Returns (string)

Parameters (2)

0. $domain (string)
The domain.
1. $dir (string)
The dir.

Usage

  1. if ( !function_exists( 'googleapps_service_name' ) ) { 
  2. require_once '/modules/shortcodes/googleapps.php'; 
  3.  
  4. // The domain. 
  5. $domain = ''; 
  6.  
  7. // The dir. 
  8. $dir = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = googleapps_service_name($domain, $dir); 
  12.  

Defined (1)

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

/modules/shortcodes/googleapps.php  
  1. function googleapps_service_name( $domain, $dir ) { 
  2. switch ( $domain ) { 
  3. case 'drive': 
  4. case 'docs': 
  5. $service_name = ( 'present/embed' == $dir ) ? 'googledocs_presentation' : 'googledocs_document'; 
  6. break; 
  7. case 'spreadsheets': 
  8. $service_name = ( 'embeddedform' == $dir ) ? 'googledocs_form' : 'googledocs_spreadsheet'; 
  9. break; 
  10. case 'calendar': 
  11. default: 
  12. $service_name = 'google_calendar'; 
  13.  
  14. return $service_name;