$value ) { $new_columns[ $key ] = $value; if ( 'author' === $key ) { $new_columns['seo_column'] = __( 'SEO', 'airygen-seo' ); } } return $new_columns; } /** * Display the data for the custom column. * * @param string $column The name of the column to display. * @param int $post_id The current post ID. * @return void */ public function display_column_data( string $column, int $post_id ): void { if ( 'seo_column' !== $column ) { return; } $post_data = PostData::get( $post_id ); $title = $post_data['title']; $description = $post_data['description']; if ( ! empty( $title ) && ! empty( $description ) ) { TemplateRenderer::render( 'admin/parts/seo-column' ); } } }