Ticket #2399: 2399.diff
File 2399.diff, 6.0 KB (added by , 7 years ago) |
---|
-
converter.php
949 949 950 950 case 'tags': 951 951 $post_id = wp_set_object_terms( $insert_postmeta['objectid'], $insert_postmeta['name'], 'topic-tag', true ); 952 break; 952 $term = get_term_by( 'name', $insert_postmeta['name'], 'topic-tag'); 953 if ( false !== $term ) { 954 wp_update_term( $term->term_id, 'topic-tag', array( 955 'description' => $insert_postmeta['description'], 956 'slug' => $insert_postmeta['slug'] 957 ) ); 958 } 959 break; 953 960 954 961 /** Forum, Topic, Reply ***************************/ 955 962 -
converters/bbPress1.php
315 315 'to_fieldname' => 'name' 316 316 ); 317 317 318 // Term slug. 319 $this->field_map[] = array( 320 'from_tablename' => 'terms', 321 'from_fieldname' => 'slug', 322 'join_tablename' => 'term_taxonomy', 323 'join_type' => 'INNER', 324 'join_expression' => 'USING (term_id)', 325 'to_type' => 'tags', 326 'to_fieldname' => 'slug', 327 'callback_method' => 'callback_slug' 328 ); 329 318 330 /** Reply Section *****************************************************/ 319 331 320 332 // Reply id (Stored in postmeta) -
converters/Drupal7.php
269 269 'to_fieldname' => 'name' 270 270 ); 271 271 272 /* Pending: 'Topic-Tag' Descriptions & Slugs with bbPress Importer273 /* Pending: http://bbpress.trac.wordpress.org/ticket/2399274 275 272 // Term slug. 276 273 $this->field_map[] = array( 277 274 'from_tablename' => 'taxonomy_term_data', 278 'from_fieldname' => ' description',275 'from_fieldname' => 'name', 279 276 'join_tablename' => 'field_data_field_tags', 280 277 'join_type' => 'INNER', 281 278 'join_expression' => 'ON field_tags_tid = taxonomy_term_data.tid', 282 279 'to_type' => 'tags', 283 'to_fieldname' => 'slug' 280 'to_fieldname' => 'slug', 281 'callback_method' => 'callback_slug' 284 282 ); 285 283 286 284 // Term description. … … 293 291 'to_type' => 'tags', 294 292 'to_fieldname' => 'description' 295 293 ); 296 */297 294 298 295 /** Reply Section *****************************************************/ 299 296 -
converters/Example.php
1 1 <?php 2 2 3 3 /** 4 * Example converter base impoprter template for bbPress 4 * Example converter base impoprter template for bbPress 5 5 * 6 6 * @since bbPress (r4689) 7 7 * @link Codex Docs http://codex.bbpress.org/import-forums/custom-import … … 320 320 'to_fieldname' => 'name' 321 321 ); 322 322 323 // Term slug. 324 $this->field_map[] = array( 325 'from_tablename' => 'tag_table', 326 'from_fieldname' => 'tagslug', 327 'to_type' => 'tags', 328 'to_fieldname' => 'slug', 329 'callback_method' => 'callback_slug' 330 ); 331 332 // Term description. 333 $this->field_map[] = array( 334 'from_tablename' => 'tag_table', 335 'from_fieldname' => 'tagdescription', 336 'to_type' => 'tags', 337 'to_fieldname' => 'description' 338 ); 339 323 340 /** Reply Section *****************************************************/ 324 341 325 342 // Setup table joins for the reply section at the base of this section … … 357 374 'to_type' => 'reply', 358 375 'to_fieldname' => '_bbp_author_ip' 359 376 ); 360 377 361 378 // Reply author. 362 379 $this->field_map[] = array( 363 380 'from_tablename' => 'replies_table', … … 454 471 /** User Section ******************************************************/ 455 472 456 473 // Setup table joins for the user section at the base of this section 457 474 458 475 // Store old User id (Stored in usermeta) 459 476 $this->field_map[] = array( 460 477 'from_tablename' => 'users_table', -
converters/PHPFox3.php
306 306 'to_fieldname' => 'name' 307 307 ); 308 308 309 // Term slug. 310 $this->field_map[] = array( 311 'from_tablename' => 'tag', 312 'from_fieldname' => 'tag_url', 313 'to_type' => 'tags', 314 'to_fieldname' => 'slug', 315 'callback_method' => 'callback_slug' 316 ); 317 309 318 /** Reply Section *****************************************************/ 310 319 311 320 // Reply id (Stored in postmeta) -
converters/vBulletin.php
311 311 'to_fieldname' => 'name' 312 312 ); 313 313 314 // Term slug. 315 $this->field_map[] = array( 316 'from_tablename' => 'tag', 317 'from_fieldname' => 'tagtext', 318 'join_tablename' => 'tagcontent', 319 'join_type' => 'INNER', 320 'join_expression' => 'USING (tagid)', 321 'to_type' => 'tags', 322 'to_fieldname' => 'slug', 323 'callback_method' => 'callback_slug' 324 ); 325 314 326 /** Reply Section *****************************************************/ 315 327 316 328 // Reply id (Stored in postmeta) -
converters/vBulletin3.php
311 311 'to_fieldname' => 'name' 312 312 ); 313 313 314 // Term slug. 315 $this->field_map[] = array( 316 'from_tablename' => 'tag', 317 'from_fieldname' => 'tagtext', 318 'join_tablename' => 'tagthread', 319 'join_type' => 'INNER', 320 'join_expression' => 'USING (tagid)', 321 'to_type' => 'tags', 322 'to_fieldname' => 'slug', 323 'callback_method' => 'callback_slug' 324 ); 325 314 326 /** Reply Section *****************************************************/ 315 327 316 328 // Reply id (Stored in postmeta)