Skip to content

Commit 021e69a

Browse files
Merge pull request #742 from contactashish13/issue-740
Show chart ID in the chart library
2 parents 0f98767 + 9326de3 commit 021e69a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/Visualizer/Render/Library.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ private function _renderChartBox( $placeholder_id, $chart_id ) {
319319
admin_url( 'admin-ajax.php' )
320320
);
321321

322-
$chart_status = array( 'date' => get_the_modified_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $chart_id ), 'error' => get_post_meta( $chart_id, Visualizer_Plugin::CF_ERROR, true ), 'icon' => 'dashicons-yes-alt', 'title' => '' );
322+
$chart_status = array( 'date' => get_the_modified_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $chart_id ), 'error' => get_post_meta( $chart_id, Visualizer_Plugin::CF_ERROR, true ), 'icon' => 'dashicons-yes-alt', 'title' => 'A-OK!' );
323323
if ( ! empty( $chart_status['error'] ) ) {
324324
$chart_status['icon'] = 'error dashicons-dismiss';
325325
$chart_status['title'] = __( 'Click to view the error', 'visualizer' );
@@ -340,7 +340,7 @@ private function _renderChartBox( $placeholder_id, $chart_id ) {
340340
}
341341
echo '<a class="visualizer-chart-action visualizer-chart-shortcode" href="javascript:;" title="', esc_attr__( 'Click to copy shortcode', 'visualizer' ), '" data-clipboard-text="', esc_attr( $shortcode ), '"></a>';
342342
echo '<span>&nbsp;</span>';
343-
echo '<hr><div class="visualizer-chart-status"><span class="visualizer-date" title="' . __( 'Last Updated', 'visualizer' ) . '">' . $chart_status['date'] . '</span><span class="visualizer-error"><i class="dashicons ' . $chart_status['icon'] . '" data-viz-error="' . esc_attr( str_replace( '"', "'", $chart_status['error'] ) ) . '" title="' . esc_attr( $chart_status['title'] ) . '"></i></span></div>';
343+
echo '<hr><div class="visualizer-chart-status"><span title="' . __( 'Chart ID', 'visualizer' ) . '">(' . $chart_id . '):</span> <span class="visualizer-date" title="' . __( 'Last Updated', 'visualizer' ) . '">' . $chart_status['date'] . '</span><span class="visualizer-error"><i class="dashicons ' . $chart_status['icon'] . '" data-viz-error="' . esc_attr( str_replace( '"', "'", $chart_status['error'] ) ) . '" title="' . esc_attr( $chart_status['title'] ) . '"></i></span></div>';
344344
echo '</div>';
345345
echo '</div>';
346346
}

0 commit comments

Comments
 (0)