Title: Bug-Fix: &#8220;Undefined&#8221; in Wp-pointer while editing posts
Last modified: November 4, 2018

---

# Bug-Fix: “Undefined” in Wp-pointer while editing posts

 *  [Webreaper](https://wordpress.org/support/users/webreaper/)
 * (@webreaper)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-fix-undefined-in-wp-pointer-while-editing-posts/)
 * Found another bug in zoom-lite. Seems that when editing a post, the wp-pointer
   associated with the post format section doesn’t get translated properly, which
   means that it pops up with the content as ‘undefined’, and can never be permanently
   dismissed. Bit annoying, as it pops up every time you edit a post.
 * I think the fix is to re-order the point at which the script gets enqueued, so
   that it comes after the localisation:
 *     ```
       function zoom_post_formats_script_handle( $hook ) {
   
       	// Only load on posts, pages
           if ( !in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) return;
   
       	$localized_array = array( 'gallery_count' => zoom_gallery_count() );
   
       	// Check first before Enqueue WP Pointer
           $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
   
           if ( ! in_array( 'zoom_post_format_pointer', $dismissed ) ) {
   
               wp_enqueue_style( 'wp-pointer' );
       		wp_enqueue_script( 'wp-pointer' );
   
       		$localized_array['is_rtl'] = is_rtl();
       		$localized_array['title'] = esc_html__( 'ZOOM Theme' , 'zoom-lite' );
       		$localized_array['content'] = esc_html__( 'The following Post Formats will make you more easily to display image gallery, video or music player.' , 'zoom-lite' );
   
       	}
   
       	wp_localize_script( 'zoom-post-formats', 'zomm_lclz', $localized_array );
   
       	// Moving this line down to here stops the undefined wp-pointer popping up
       	wp_enqueue_script( 'zoom-post-formats', get_template_directory_uri() . '/inc/admin/assets/js/post-formats.js', array( 'jquery' ) );
       }
       ```
   

The topic ‘Bug-Fix: “Undefined” in Wp-pointer while editing posts’ is closed to 
new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/zoom-lite/1.1.5/screenshot.png)
 * Zoom Lite
 * [Support Threads](https://wordpress.org/support/theme/zoom-lite/)
 * [Active Topics](https://wordpress.org/support/theme/zoom-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/zoom-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/zoom-lite/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Webreaper](https://wordpress.org/support/users/webreaper/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/bug-fix-undefined-in-wp-pointer-while-editing-posts/)
 * Status: not resolved