| @@ -77,9 +77,26 @@ | ||
| 77 | 77 | * |
| 78 | 78 | * @access protected |
| 79 | 79 | */ |
| 80 | 80 | protected function _renderSidebarContent() { |
| 81 | + | |
| 82 | + $chartSettings = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_SETTINGS, true ); | |
| 83 | + $hasTitle = isset( $chartSettings['backend-title'] ) && '' !== $chartSettings['backend-title']; | |
| 84 | + | |
| 81 | 85 | ?> |
| 86 | + <div class="viz-info-panel"> | |
| 87 | + <div class="viz-info-item"> | |
| 88 | + <label for="viz-shortcode"><?php _e( 'Shortcode', 'visualizer' ); ?></label> | |
| 89 | + <div class="viz-info-row"> | |
| 90 | + <input type="text" id="viz-shortcode" value="[visualizer id="<?php echo $this->chart->ID; ?>" class='']" readonly> | |
| 91 | + <button class="button" id="viz-copy-shortcode"><?php _e( 'Copy', 'visualizer' ); ?></button> | |
| 92 | + </div> | |
| 93 | + </div> | |
| 94 | + <div class="viz-info-item"> | |
| 95 | + <label for="viz-backend-name"><?php _e( 'Backend chart title for internal usage', 'visualizer' ); ?></label> | |
| 96 | + <input type="text" id="viz-backend-name" value="<?php echo $hasTitle ? esc_attr( $chartSettings['backend-title'] ) : ( '#' . esc_attr( $this->chart->ID ) ); ?>"> | |
| 97 | + </div> | |
| 98 | + </div> | |
| 82 | 99 | <div id="viz-tabs"> |
| 83 | 100 | <ul> |
| 84 | 101 | <li><a href="#viz-tab-basic-content" id="viz-tab-basic"><?php _e( 'Source', 'visualizer' ); ?></a></li> |
| 85 | 102 | <li><a href="#viz-tab-advanced-content" id="viz-tab-advanced"><?php _e( 'Settings', 'visualizer' ); ?></a></li> |
| @@ -90,11 +107,9 @@ | ||
| 90 | 107 | <div id="viz-tab-help-content"><?php Visualizer_Render_Layout::show( 'tab-help', $this->chart->ID ); ?></div> |
| 91 | 108 | </div> |
| 92 | 109 | |
| 93 | 110 | <li class="viz-group bottom-fixed" id="vz-chart-copyright"> |
| 94 | - Hate it? Love it? <a href="https://wordpress.org/support/plugin/visualizer/reviews/#new-post" target="_blank">Rate it!</a> | |
| 95 | - <br/> | |
| 96 | - Visualizer © | |
| 111 | + <?php _e( 'Hate it? Love it?', 'visualizer' ); ?> <a href="https://wordpress.org/support/plugin/visualizer/reviews/#new-post" target="_blank"><?php _e( 'Rate it!', 'visualizer' ); ?></a> | |
| 97 | 112 | <?php |
| 98 | 113 | // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date, WordPress.DateTime.CurrentTimeTimestamp.Requested |
| 99 | 114 | echo date( 'Y', current_time( 'timestamp' ) ); |
| 100 | 115 | ?> |
| @@ -138,6 +153,5 @@ | ||
| 138 | 153 | } |
| 139 | 154 | Visualizer_Render_Layout::show( 'db-query', $query, $this->chart->ID ); |
| 140 | 155 | Visualizer_Render_Layout::show( 'json-screen', $this->chart->ID ); |
| 141 | 156 | } |
| 142 | - | |
| 143 | 157 | } |