Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to know if there is a way to use Wordpress Adminitration Tooltips (de gray and blue ones) that are shown one you update your worpdress (3.x). Showing the new features.

Thanks!

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

here is the simplest implementation I know of since there is no real API:

//add the needed scripts and styles
add_action('admin_enqueue_scripts', 'wpse_46028_enqueue_admin_scripts');
function wpse_46028_enqueue_admin_scripts() {
    wp_enqueue_style('wp-pointer');
    wp_enqueue_script('wp-pointer');
    //hook the pointer 
    add_action('admin_print_footer_scripts', 'wpse_46028_print_footer_scripts' );
}
function wpse_46028_print_footer_scripts() {
    $pointer_content = '<h3>WordPress Answers</h3>';
    $pointer_content .= '<p>This is your pointer content</p>';
?>
   <script type="text/javascript">
   //<![CDATA[
   jQuery(document).ready( function($) {
    //jQuery selector to point to 
    $('#menu-dashboard').pointer({
        content: '<?php echo $pointer_content; ?>',
        position: 'top',
        close: function() {
            // This function is fired when you click the close button
        }
      }).pointer('open');
   });
   //]]>
   </script>
<?php
}
share|improve this answer
add comment

There is always a way, as shown by some plugins utilizing these pointers, but they are currently meant as an internal core feature and thus have no real API for use.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.