SZGoogleModuleDrive

The SZ - Google SZGoogleModuleDrive class.

Defined (1)

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

/classes/module/SZGoogleModuleDrive.php  
  1. class SZGoogleModuleDrive extends SZGoogleModule 
  2. private $setJavascriptPlusone = false; 
  3.  
  4. /** 
  5. * Definition of the initial variable array which are 
  6. * used to identify the module and options related to it 
  7. */ 
  8.  
  9. function moduleAddSetup() 
  10. $this->moduleSetClassName(__CLASS__); 
  11. $this->moduleSetOptionSet('sz_google_options_drive'); 
  12.  
  13. // Definition shortcode connected to the module with an array where you 
  14. // have to specify the name activation option with the shortcode and function 
  15.  
  16. $this->moduleSetShortcodes(array( 
  17. 'drive_embed_shortcode' => array('sz-drive-embed' , array(new SZGoogleActionDriveEmbed() , 'getShortcode')),  
  18. 'drive_viewer_shortcode' => array('sz-drive-viewer', array(new SZGoogleActionDriveViewer(), 'getShortcode')),  
  19. 'drive_savebutton_shortcode' => array('sz-drive-save' , array(new SZGoogleActionDriveSave() , 'getShortcode')),  
  20. )); 
  21.  
  22. // Definition widgets connected to the module with an array where you 
  23. // have to specify the name option of activating and class to be loaded 
  24.  
  25. $this->moduleSetWidgets(array( 
  26. 'drive_embed_widget' => 'SZGoogleWidgetDriveEmbed',  
  27. 'drive_viewer_widget' => 'SZGoogleWidgetDriveViewer',  
  28. 'drive_savebutton_widget' => 'SZGoogleWidgetDriveSaveButton',  
  29. )); 
  30.  
  31. /** 
  32. * Add the Javascript code in the various components 
  33. * of google plus footer and if control was performed 
  34. */ 
  35.  
  36. function addCodeJavascriptFooter() 
  37. // If you've already entered the Javascript code in the footer section 
  38. // I leave the function otherwise set the variable and constant 
  39.  
  40. if ($this->setJavascriptPlusone) return; 
  41. else $this->setJavascriptPlusone = true; 
  42.  
  43. // Loading action in the footer of the plugin to load 
  44. // the javascript framework made available by google 
  45.  
  46. add_action('SZ_FOOT', array($this, 'setJavascriptPlusOne'));