Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 13th, 2013  |  syntax: PHP  |  size: 0.92 KB  |  views: 121  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. global $wp_filter, $merged_filters, $wp_current_filter;
  2. $save_wp_filter = $wp_filter;
  3. $save_merged_filters = $merged_filters;
  4. $save_wp_current_filter = $wp_current_filter;
  5.        
  6. $placemark = array(
  7.         'id'                    => $postID,
  8.         'title'                 => apply_filters( 'the_title', $pp->post_title ),
  9.         'latitude'              => get_post_meta( $postID, self::PREFIX . 'latitude', true ),
  10.         'longitude'             => get_post_meta( $postID, self::PREFIX . 'longitude', true ),
  11.         'details'               => apply_filters( 'the_content', $pp->post_content ),           // note: don't use setup_postdata/get_the_content() in this instance -- http://lists.automattic.com/pipermail/wp-hackers/2013-January/045053.html
  12.         'categories'    => $categories,
  13.         'icon'                  => is_array( $icon ) ? $icon[ 0 ] : $defaultIcon,
  14.         'zIndex'                => get_post_meta( $postID, self::PREFIX . 'zIndex', true )
  15. );
  16.  
  17. $wp_filter = $save_wp_filter;
  18. $merged_filters = $save_merged_filters;
  19. $wp_current_filter = $save_wp_current_filter;