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 5th, 2013  |  syntax: PHP  |  size: 0.64 KB  |  views: 55  |  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.   function widget($args, $instance) {
  2.     $out = $tmp = '';
  3.  
  4.     extract($args, EXTR_SKIP);
  5.  
  6.     $ll = '';
  7.        
  8.     global $post;
  9.     if(is_single() && $post) {
  10.             $lat = get_post_meta($post->ID, 'geo_latitude', true);
  11.             $lng = get_post_meta($post->ID, 'geo_longitude', true);
  12.             $zoom = get_post_meta($post->ID, 'geo_zoom', true);
  13.             $address = get_post_meta($post->ID, 'geo_address', true);
  14.             if($lat != '') {
  15.                 $ll = $lat . ',' . $lng;
  16.                 $instance['address'] = $address;
  17.                 $instance['lightbox_zoom'] = $zoom;
  18.             }
  19.     }
  20.    
  21.     if($ll == '') {
  22.         return $out;
  23.     }
  24.    
  25.     // self::$widgets[] = array(....
clone this paste RAW Paste Data