PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.0.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.0.3
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Render/Library.php +38 -45 3.0.72.0.3 View file →
@@ -85,16 +85,12 @@
85 85 // support for old pro
86 86 $array = array( 'enabled' => true, 'name' => $array );
87 87 }
88 88 $label = $array['name'];
89 - $link = '<a class=" " href="' . esc_url(
90 - add_query_arg(
91 - array(
92 - 'type' => $type,
93 - 'vpage' => false,
94 - )
95 - )
96 - ) . '">';
89 + $link = '<a class=" " href="' . esc_url( add_query_arg( array(
90 + 'type' => $type,
91 + 'vpage' => false,
92 + ) ) ) . '">';
97 93 if ( ! $array['enabled'] ) {
98 94 $link = "<a class=' visualizer-pro-only' href='" . Visualizer_Plugin::PRO_TEASER_URL . "' target='_blank'>";
99 95 }
100 96 echo '<li class="visualizer-list-item all">';
@@ -122,8 +118,15 @@
122 118 foreach ( $this->charts as $placeholder_id => $chart ) {
123 119 $this->_renderChartBox( $placeholder_id, $chart['id'] );
124 120 }
125 121 echo '</div>';
122 + if ( is_array( $this->pagination ) ) {
123 + echo '<ul class=" subsubsub">';
124 + foreach ( $this->pagination as $page ) {
125 + echo '<li class="all">', $page, '</li>';
126 + }
127 + echo '</ul>';
128 + }
126 129 } else {
127 130 echo '<div id="visualizer-library" class="visualizer-clearfix">';
128 131 echo '<div class="visualizer-chart">';
129 132 echo '<div class="visualizer-chart-canvas visualizer-nochart-canvas">';
@@ -142,15 +145,8 @@
142 145 echo '</div>';
143 146 }
144 147 $this->_renderSidebar();
145 148 echo '</div>';
146 - if ( is_array( $this->pagination ) ) {
147 - echo '<ul class=" subsubsub">';
148 - foreach ( $this->pagination as $page ) {
149 - echo '<li class="all">', $page, '</li>';
150 - }
151 - echo '</ul>';
152 - }
153 149 }
154 150
155 151 /**
156 152 * Renders chart's box block.
@@ -162,37 +158,26 @@
162 158 * @param string $placeholder_id The placeholder's id for the chart.
163 159 * @param int $chart_id The id of the chart.
164 160 */
165 161 private function _renderChartBox( $placeholder_id, $chart_id ) {
166 - $settings = get_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS );
167 - $title = '#' . $chart_id;
168 - if ( ! empty( $settings[0]['title'] ) ) {
169 - $title = $settings[0]['title'];
170 - }
171 162 $ajax_url = admin_url( 'admin-ajax.php' );
172 - $delete_url = add_query_arg(
173 - array(
174 - 'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
175 - 'nonce' => wp_create_nonce(),
176 - 'chart' => $chart_id,
177 - ), $ajax_url
178 - );
179 - $clone_url = add_query_arg(
180 - array(
181 - 'action' => Visualizer_Plugin::ACTION_CLONE_CHART,
182 - 'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
183 - 'chart' => $chart_id,
184 - 'type' => $this->type,
185 - ), $ajax_url
186 - );
187 - $export_link = add_query_arg(
188 - array(
189 - 'action' => Visualizer_Plugin::ACTION_EXPORT_DATA,
190 - 'chart' => $chart_id,
191 - 'security' => wp_create_nonce( Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION ),
192 - ), admin_url( 'admin-ajax.php' )
193 - );
194 - echo '<div class="visualizer-chart"><div class="visualizer-chart-title">', esc_html( $title ), '</div>';
163 + $delete_url = add_query_arg( array(
164 + 'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
165 + 'nonce' => wp_create_nonce(),
166 + 'chart' => $chart_id,
167 + ), $ajax_url );
168 + $clone_url = add_query_arg( array(
169 + 'action' => Visualizer_Plugin::ACTION_CLONE_CHART,
170 + 'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
171 + 'chart' => $chart_id,
172 + 'type' => $this->type,
173 + ), $ajax_url );
174 + $export_link = add_query_arg( array(
175 + 'action' => Visualizer_Plugin::ACTION_EXPORT_DATA,
176 + 'chart' => $chart_id,
177 + 'security' => wp_create_nonce( Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION ),
178 + ), admin_url( 'admin-ajax.php' ) );
179 + echo '<div class="visualizer-chart">';
195 180 echo '<div id="', $placeholder_id, '" class="visualizer-chart-canvas">';
196 181 echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
197 182 echo '</div>';
198 183 echo '<div class="visualizer-chart-footer visualizer-clearfix">';
@@ -211,18 +196,26 @@
211 196 * Render sidebar.
212 197 */
213 198 private function _renderSidebar() {
214 199 if ( ! VISUALIZER_PRO ) {
200 + $checked = apply_filters( 'visualizer_logger_flag', false );
201 + $checked = ( $checked === false ) ? '' : 'checked';
215 202 echo '<div id="visualizer-sidebar">';
216 203 echo '<div class="visualizer-sidebar-box">';
217 204 echo '<h3>' . __( 'Gain more editing power', 'visualizer' ) . '</h3><ul>';
218 205 echo '<li>' . __( 'Spreadsheet like editor', 'visualizer' ) . '</li>';
219 206 echo '<li>' . __( 'Import from other charts', 'visualizer' ) . '</li>';
220 - echo '<li>' . __( 'Frontend editor', 'visualizer' ) . '</li>';
221 - echo '<li>' . __( 'Private charts', 'visualizer' ) . '</li>';
222 207 echo '<li>' . __( 'Auto-sync with online files', 'visualizer' ) . '</li>';
223 208 echo '<li>' . __( '3 more chart types', 'visualizer' ) . '</li></ul>';
224 209 echo '<a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a>';
210 + echo '</div>';
211 + echo '<div class="visualizer-sidebar-box visualizer-tracking">';
212 + echo '<label class="visualizer-switch">';
213 + echo '<input type="checkbox" ' . $checked . ' >';
214 + echo '<div class="visualizer-slider visualizer-round"></div>';
215 + echo '</label>';
216 + echo '<span>' . __( 'Enable Tracking', 'visualizer' ) . '<sup>*</sup></span>';
217 + echo '<p><small><sup>*</sup>' . __( 'Allow Visualizer to anonymously track how this plugin is used and help us make the plugin better. No sensitive data is tracked.', 'visualizer' ) . '</small></p>';
225 218 echo '</div>';
226 219 echo '</div>';
227 220 }
228 221 }