Advertisement
Guest User

addBGMPInfoWindowPermalink

a guest
May 16th, 2012
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. function addBGMPInfoWindowPermalink( $placemarks )
  2. {
  3.     $newPlacemarks = array();
  4.    
  5.     foreach( $placemarks as $placemark )
  6.     {
  7.         $post = get_page_by_title( $placemark[ 'title' ], 'OBJECT', 'bgmp' );
  8.         $placemark[ 'details' ] .= get_permalink( $post->ID );
  9.         $newPlacemarks[] = $placemark;
  10.     }
  11.    
  12.     return $newPlacemarks;
  13. }
  14. add_filter( 'bgmp_get-map-placemarks-return', 'addBGMPInfoWindowPermalink' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement