Changeset 1313896
- Timestamp:
- 12/21/2015 11:43:43 PM (10 years ago)
- Location:
- track-connect/trunk
- Files:
-
- 3 edited
-
includes/api/request.php (modified) (4 diffs)
-
plugin.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
track-connect/trunk/includes/api/request.php
r1313832 r1313896 276 276 $post_id = $wpdb->insert_id; 277 277 278 if(!$custom_desc){ 279 $wpdb->update( $wpdb->posts,280 array( 'post_content' => $unit->description ),281 array( 'ID' => $post_id ),282 array( '%s' ), array( '%d' ) );283 }278 279 $wpdb->update( $wpdb->posts, 280 array( 'post_content' => $unit->description ), 281 array( 'ID' => $post_id ), 282 array( '%s' ), array( '%d' ) ); 283 284 284 285 285 $wpdb->query( $wpdb->prepare( … … 442 442 $term_taxonomy_id = $wpdb->insert_id; 443 443 444 445 foreach($node->units as $unitId){ 446 $post = $wpdb->get_row("SELECT ID FROM wp_posts WHERE unit_id = '".$unitId."';"); 447 if($post){ 448 $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post->ID."' AND term_taxonomy_id = '".$term_taxonomy_id."';"); 449 $wpdb->insert( 'wp_term_relationships', 450 array( 'object_id' => $post->ID, 'term_taxonomy_id' => $term_taxonomy_id ), 451 array( '%d', '%d' ) ); 444 if(isset($node->units)){ 445 foreach($node->units as $unitId){ 446 $post = $wpdb->get_row("SELECT ID FROM wp_posts WHERE unit_id = '".$unitId."';"); 447 if($post){ 448 $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id = '".$post->ID."' AND term_taxonomy_id = '".$term_taxonomy_id."';"); 449 $wpdb->insert( 'wp_term_relationships', 450 array( 'object_id' => $post->ID, 'term_taxonomy_id' => $term_taxonomy_id ), 451 array( '%d', '%d' ) ); 452 } 452 453 } 453 454 } … … 547 548 548 549 $wpdb->insert( 'wp_term_taxonomy', 549 array( 'term_id' => $term Id, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ),550 array( 'term_id' => $term->term_id, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ), 550 551 array( '%d', '%s', '%s', '%d' ) ); 551 552 … … 557 558 array( '%s', '%s', ), array( '%d' ) ); 558 559 560 $amenityTax = $wpdb->get_row("SELECT term_id FROM wp_term_taxonomy WHERE term_id = '".$term->term_id."';"); 561 if($amenityTax){ 559 562 $wpdb->update( 'wp_term_taxonomy', 560 563 array( 'description' => $amenity->groupname ), 561 564 array( 'term_id' => $term->term_id ), 562 array( '%s' ), array( '%d' ) ); 565 array( '%s' ), array( '%d' ) ); 566 }else{ 567 $wpdb->insert( 'wp_term_taxonomy', 568 array( 'term_id' => $term->term_id, 'taxonomy' => 'features', 'description' => $amenity->groupname, 'parent' => 0 ), 569 array( '%d', '%s', '%s', '%d' ) ); 570 } 563 571 564 572 } -
track-connect/trunk/plugin.php
r1313832 r1313896 7 7 Author URI: http://www.trackhs.com 8 8 9 Version: 1.9. 89 Version: 1.9.9 10 10 11 11 License: GNU General Public License v2.0 (or later) … … 55 55 56 56 define( 'WP_LISTINGS_URL', plugin_dir_url( __FILE__ ) ); 57 define( 'WP_LISTINGS_VERSION', '1.9. 8' );57 define( 'WP_LISTINGS_VERSION', '1.9.9' ); 58 58 59 59 /** Load textdomain for translation */ -
track-connect/trunk/readme.txt
r1313832 r1313896 4 4 Requires at least: 3.7 5 5 Tested up to: 4.2.3 6 Stable tag: 1.9. 86 Stable tag: 1.9.9 7 7 8 8 Creates and syncs listing-type posts from TRACK PM, a cloud-based property management system (www.trackhs.com).
Note: See TracChangeset
for help on using the changeset viewer.