mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
fix $taxonomy assignment for new term
This commit is contained in:
@@ -87,16 +87,16 @@ class Display_Featured_Image_Genesis_Admin {
|
||||
*/
|
||||
public function manage_taxonomy_column( $value, $column, $term_id ) {
|
||||
|
||||
$taxonomy = get_current_screen()->taxonomy;
|
||||
$taxonomy = ( isset( $_POST['taxonomy'] ) ) ? $_POST['taxonomy'] : get_current_screen()->taxonomy;
|
||||
if ( 'featured_image' === $column ) {
|
||||
$term_meta = get_option( "displayfeaturedimagegenesis_$term_id" );
|
||||
if ( ! empty( $term_meta['term_image'] ) ) {
|
||||
$alt_tag = get_term( $term_id, $taxonomy )->name;
|
||||
$id = $term_meta['term_image'];
|
||||
if ( ! is_numeric( $term_meta['term_image'] ) ) {
|
||||
$id = Display_Featured_Image_Genesis_Common::get_image_id( $term_meta['term_image'] );
|
||||
$id = Display_Featured_Image_Genesis_Common::get_image_id( $term_meta['term_image'] );
|
||||
}
|
||||
$preview = apply_filters( 'display_featured_image_genesis_admin_term_thumbnail', wp_get_attachment_image_src( $id, 'thumbnail' ), $id );
|
||||
$preview = apply_filters( 'display_featured_image_genesis_admin_term_thumbnail', wp_get_attachment_image_src( $id, 'thumbnail' ), $id );
|
||||
echo '<img src="' . esc_url( $preview[0] ) . '" alt="' . esc_attr( $alt_tag ) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user