Exemplo n.º 1
0
 public function addressShortcode($args)
 {
     extract(shortcode_atts(array('address' => ''), $args, 'address_schema'));
     $code = $address;
     $code_a = explode('_', $code);
     $code_a = array_reverse($code_a);
     $id = $code_a[0];
     require_once $this->inc_dir . 'wp-address-schema-display.php';
     $display = new Wp_Address_Schema_Display();
     return $display->parseAddress($id);
 }
 public function widget($args, $instance)
 {
     extract($args);
     $widget_code = $instance['address_id'];
     $widget_code_a = explode('_', $widget_code);
     $widget_code_a = array_reverse($widget_code_a);
     $widget_id = $widget_code_a[0];
     require_once 'wp-address-schema-display.php';
     $display = new Wp_Address_Schema_Display();
     echo $before_widget;
     echo $display->parseAddress($widget_id);
     echo $after_widget;
 }