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($context=FALSE) 
  3. parent::define( 
  4. 'photocrati-frame_communication',  
  5. 'Frame/iFrame Inter-Communication',  
  6. 'Provides a means for HTML frames to share server-side events with each other',  
  7. '0.4',  
  8. 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',  
  9. 'Photocrati Media',  
  10. 'https://www.imagely.com',  
  11. $context 
  12. ); 
  13.  
  14. C_NextGen_Settings::get_instance()->add_option_handler('C_Frame_Communication_Option_Handler', array( 
  15. 'frame_event_cookie_name',  
  16. )); 
  17. C_NextGen_Global_Settings::get_instance()->add_option_handler('C_Frame_Communication_Option_Handler', array( 
  18. 'frame_event_cookie_name',  
  19. )); 
  20.  
  21. function _register_utilities() 
  22. $this->get_registry()->add_utility( 
  23. 'I_Frame_Event_Publisher', 'C_Frame_Event_Publisher' 
  24. ); 
  25.  
  26. function _register_hooks() 
  27. add_action('init', array($this, 'enqueue_admin_scripts')); 
  28.  
  29.  
  30. function enqueue_admin_scripts() 
  31. $router = C_Router::get_instance(); 
  32.  
  33. wp_register_script( 
  34. 'frame_event_publisher',  
  35. $router->get_static_url('photocrati-frame_communication#frame_event_publisher.js'),  
  36. array('jquery'),  
  37. NGG_SCRIPT_VERSION 
  38. ); 
  39.  
  40. if (is_admin()) 
  41. wp_enqueue_script('frame_event_publisher'); 
  42. wp_localize_script( 
  43. 'frame_event_publisher',  
  44. 'frame_event_publisher_domain',  
  45. array(parse_url(site_url(), PHP_URL_HOST)) 
  46. ); 
  47.  
  48. function get_type_list() 
  49. return array( 
  50. 'C_Frame_Communication_Option_Handler' => 'class.frame_communication_option_handler.php',  
  51. 'C_Frame_Event_Publisher' => 'class.frame_event_publisher.php' 
  52. );