M_Frame_Communication

The NextGEN Gallery M Frame Communication class.

Defined (1)

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

/products/photocrati_nextgen/modules/frame_communication/module.frame_communication.php  
  1. class M_Frame_Communication extends C_Base_Module 
  2. function define($id = 'pope-module',  
  3. $name = 'Pope Module',  
  4. $description = '',  
  5. $version = '',  
  6. $uri = '',  
  7. $author = '',  
  8. $author_uri = '',  
  9. $context = FALSE) 
  10. parent::define( 
  11. 'photocrati-frame_communication',  
  12. 'Frame/iFrame Inter-Communication',  
  13. 'Provides a means for HTML frames to share server-side events with each other',  
  14. '0.5',  
  15. 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',  
  16. 'Imagely',  
  17. 'https://www.imagely.com',  
  18. $context 
  19. ); 
  20.  
  21. C_NextGen_Settings::get_instance()->add_option_handler('C_Frame_Communication_Option_Handler', array( 
  22. 'frame_event_cookie_name',  
  23. )); 
  24. C_NextGen_Global_Settings::get_instance()->add_option_handler('C_Frame_Communication_Option_Handler', array( 
  25. 'frame_event_cookie_name',  
  26. )); 
  27.  
  28. function _register_utilities() 
  29. $this->get_registry()->add_utility( 
  30. 'I_Frame_Event_Publisher', 'C_Frame_Event_Publisher' 
  31. ); 
  32.  
  33. function _register_hooks() 
  34. add_action('init', array($this, 'enqueue_admin_scripts')); 
  35.  
  36.  
  37. function enqueue_admin_scripts() 
  38. $router = C_Router::get_instance(); 
  39.  
  40. wp_register_script( 
  41. 'frame_event_publisher',  
  42. $router->get_static_url('photocrati-frame_communication#frame_event_publisher.js'),  
  43. array('jquery'),  
  44. NGG_SCRIPT_VERSION 
  45. ); 
  46.  
  47. if (is_admin()) 
  48. wp_enqueue_script('frame_event_publisher'); 
  49. wp_localize_script( 
  50. 'frame_event_publisher',  
  51. 'frame_event_publisher_domain',  
  52. array(parse_url(site_url(), PHP_URL_HOST)) 
  53. ); 
  54.  
  55. function get_type_list() 
  56. return array( 
  57. 'C_Frame_Communication_Option_Handler' => 'class.frame_communication_option_handler.php',  
  58. 'C_Frame_Event_Publisher' => 'class.frame_event_publisher.php' 
  59. );