add_pointer_scripts

The WooCommerce Billogram Integration add pointer scripts function.

Description

add_pointer_scripts(); 

Usage

  1. if ( !function_exists( 'add_pointer_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-billogram-integration/woocommerce-billogram2-extended.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = add_pointer_scripts(); 
  7.  

Defined (1)

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

/woocommerce-billogram2-extended.php  
  1. function add_pointer_scripts() 
  2. $content = '<h3>WooCommerce Billogram Integration</h3>'; 
  3. $content .= '<p>You*ve just installed WooCommerce Billogram Integration by WooBill. Please use the plugin options page to setup your integration.</p>'; 
  4.  
  5. ?> 
  6.  
  7. <script type="text/javascript"> 
  8. jQuery(document).ready( function($) { 
  9. $("#toplevel_page_woocommerce_billogram_options").pointer({ 
  10. content: '<?php echo $content; ?>',  
  11. position: { 
  12. edge: 'left',  
  13. align: 'center' 
  14. },  
  15. close: function() { 
  16. // what to do after the object is closed 
  17. var data = { 
  18. action: 'wp_pointer_hide' 
  19. }; 
  20.  
  21. jQuery.post(ajaxurl, data); 
  22. }).pointer('open'); 
  23. }); 
  24. </script> 
  25.  
  26. <?php