How to place "wp pointers", need help…
-
As of WordPress 3.x I understand there are now “pointers”. I have learned how to insert a point into the WordPress backend, but I can’t seem to find any documentation on how to tell it where to point!
Can anyone help?
add_action( 'admin_enqueue_scripts', 'my_admin_enqueue_scripts' ); function my_admin_enqueue_scripts() { wp_enqueue_style( 'wp-pointer' ); wp_enqueue_script( 'wp-pointer' ); add_action( 'admin_print_footer_scripts', 'my_admin_print_footer_scripts' ); } function my_admin_print_footer_scripts() { $pointer_content = '<h3>Title</h3>'; $pointer_content .= '<p>Example content.</p>'; ?> <script type="text/javascript"> //<![CDATA[ jQuery(document).ready( function($) { $('#menu-appearance').pointer({ content: '<?php echo $pointer_content; ?>', position: 'bottom', close: function() { // Once the close button is hit } }).pointer('open'); }); //]]> </script> <?php }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to place "wp pointers", need help…’ is closed to new replies.