質問するログイン新規登録

質問編集履歴

3

誤字修正

2019/06/11 08:37

投稿

chikachi
chikachi

スコア33

title CHANGED
File without changes
body CHANGED
@@ -1,5 +1,5 @@
1
1
  ###前提・実現したいこと
2
- 次のような「noun」「adjective」というタクソノミーがあり、それぞれに親として「js」「en」というタームがあります。
2
+ 次のような「noun」「adjective」というタクソノミーがあり、それぞれに親として「ja」「en」というタームがあります。
3
3
 
4
4
  noun(タクソノミー)
5
5
  |─ ja(親ターム)

2

コードに説明を追記

2019/06/11 08:37

投稿

chikachi
chikachi

スコア33

title CHANGED
File without changes
body CHANGED
@@ -61,7 +61,7 @@
61
61
  // 取得できた子タームを出力
62
62
  //-----------------------------------------------------
63
63
 
64
- // IDとdescriptionだけにする
64
+ // $merge_arrayに上の➀➁➂が実現できたと仮定し、IDとdescriptionだけにする
65
65
  $terms_array = [];
66
66
  foreach( $merge_array as $term ) :
67
67
  $num = count( $terms_array );

1

コード修正

2019/06/11 08:36

投稿

chikachi
chikachi

スコア33

title CHANGED
File without changes
body CHANGED
@@ -63,7 +63,7 @@
63
63
 
64
64
  // IDとdescriptionだけにする
65
65
  $terms_array = [];
66
- foreach( $genre_en_array as $term ) :
66
+ foreach( $merge_array as $term ) :
67
67
  $num = count( $terms_array );
68
68
  $terms_array[$num]['id'] = $term->term_id;
69
69
  $terms_array[$num]['description'] = unserialize( $term->description );