Google_Maps_Builder_Core_Scripts_Init

Base class for both plugins to extend in order to trigger the asset loading process.

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/class-gmc-scripts-init.php  
  1. abstract class Google_Maps_Builder_Core_Scripts_Init { 
  2.  
  3. /** 
  4. * Asset paths. 
  5. * @since 2.1.0 
  6. * @var Google_Maps_Builder_Core_Asset_Paths 
  7. */ 
  8. protected $paths; 
  9.  
  10. /** 
  11. * Load scripts by context. 
  12. * @since 2.0.0 
  13. */ 
  14. public function __construct() { 
  15.  
  16. $this->paths = Google_Maps_Builder_Core_Asset_Paths::get_instance(); 
  17.  
  18. if ( is_admin() ) { 
  19. new Google_Maps_Builder_Core_Admin_Scripts(); 
  20. add_action( 'admin_enqueue_scripts', array( $this, 'admin_hooks' ) ); 
  21. add_action( 'admin_enqueue_scripts', array( $this, 'admin_late' ), 50 ); 
  22. } else { 
  23. add_action( 'wp_enqueue_scripts', array( $this, 'front_end_hooks' ) ); 
  24. add_action( 'wp_enqueue_scripts', array( $this, 'front_end_late' ), 50 ); 
  25. new Google_Maps_Builder_Core_Front_End_Scripts(); 
  26.  
  27.  
  28.  
  29. /** 
  30. * Enqueue admin scripts that need to run late. 
  31. * @since 2.1.0 
  32. * @uses "admin_enqueue_scripts 
  33. * @param $hook 
  34. */ 
  35. public function admin_late( $hook ) { 
  36.  
  37. /** 
  38. * Load additional admin scripts. 
  39. * @since 2.1.0 
  40. * @uses "admin_enqueue_scripts" 
  41. * @param $hook 
  42. */ 
  43. public function admin_hooks( $hook ) { 
  44.  
  45. /** 
  46. * Load additional front-end scripts. 
  47. * @since 2.1.0 
  48. * @uses "enqueue_scripts" 
  49. */ 
  50. public function front_end_hooks() { 
  51.  
  52.  
  53. /** 
  54. * Enqueue front-end scripts that need to run late. 
  55. * @since 2.1.0 
  56. * @uses "wp_enqueue_scripts 
  57. * @param $hook 
  58. */ 
  59. public function front_end_late( $hook ) { 
  60.  
  61.