post_content; } if ( isset( $table_settings['show_title'] ) && '1' === $table_settings['show_title'] ) { $table_contents .= ' ' . $table_post->post_title; } $table_contents .= ' ' . get_post_meta( $table_id, '_ninja_table_caption', true ); $rows = $wpdb->get_results( $wpdb->prepare( "SELECT value FROM {$wpdb->prefix}ninja_table_items WHERE table_id=%d", $table_id ) ); foreach ( $rows as $row ) { if ( empty( $row->value ) ) { continue; } $json_decoded = json_decode( $row->value ); if ( ! is_object( $json_decoded ) ) { continue; } $array_values = array_map( function ( $value ) { if ( is_object( $value ) ) { return ''; } return strval( $value ); }, array_values( get_object_vars( $json_decoded ) ) ); $table_contents .= ' ' . implode( ' ', $array_values ); } return $table_contents; }