| @@ 552-560 (lines=9) @@ | ||
| 549 | * @param string $column_name Current column name. |
|
| 550 | */ |
|
| 551 | public function column_default( $post, $column_name ) { |
|
| 552 | if ( 'categories' === $column_name ) { |
|
| 553 | $taxonomy = 'category'; |
|
| 554 | } elseif ( 'tags' === $column_name ) { |
|
| 555 | $taxonomy = 'post_tag'; |
|
| 556 | } elseif ( 0 === strpos( $column_name, 'taxonomy-' ) ) { |
|
| 557 | $taxonomy = substr( $column_name, 9 ); |
|
| 558 | } else { |
|
| 559 | $taxonomy = false; |
|
| 560 | } |
|
| 561 | ||
| 562 | if ( $taxonomy ) { |
|
| 563 | $terms = get_the_terms( $post->ID, $taxonomy ); |
|
| @@ 1092-1100 (lines=9) @@ | ||
| 1089 | * @param string $column_name The current column name. |
|
| 1090 | */ |
|
| 1091 | public function column_default( $post, $column_name ) { |
|
| 1092 | if ( 'categories' === $column_name ) { |
|
| 1093 | $taxonomy = 'category'; |
|
| 1094 | } elseif ( 'tags' === $column_name ) { |
|
| 1095 | $taxonomy = 'post_tag'; |
|
| 1096 | } elseif ( 0 === strpos( $column_name, 'taxonomy-' ) ) { |
|
| 1097 | $taxonomy = substr( $column_name, 9 ); |
|
| 1098 | } else { |
|
| 1099 | $taxonomy = false; |
|
| 1100 | } |
|
| 1101 | if ( $taxonomy ) { |
|
| 1102 | $taxonomy_object = get_taxonomy( $taxonomy ); |
|
| 1103 | $terms = get_the_terms( $post->ID, $taxonomy ); |
|