From ad375221e5809077b3d08c00917d1a5c8dfb1303 Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Sun, 27 Aug 2023 14:33:09 -0300 Subject: [PATCH] Do not show copy toggle if meta field is empty --- inc/class-table.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/class-table.php b/inc/class-table.php index 564ec72..a345ebe 100644 --- a/inc/class-table.php +++ b/inc/class-table.php @@ -313,6 +313,9 @@ protected function format_value_for_output( $value ): string { HTML; + // Don't show the copy button for empty values. + $copy_button = ! empty( $value ) ? $copy_button : ''; + $expand_button = ''; if ( is_string( $value ) && ! is_numeric( $value ) ) {