PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.5.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.5.1
4.0.8 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 All 149 releases
← All changes | classes/Visualizer/Render/Sidebar/Google.php +13 -41 4.0.43.5.1 View file →
@@ -58,9 +58,9 @@
58 58 $this->_library = 'google';
59 59 parent::__construct( $data );
60 60
61 61 $this->_legendPositions = array(
62 - '' => esc_html__( 'Default', 'visualizer' ),
62 + '' => '',
63 63 'left' => esc_html__( 'Left of the chart', 'visualizer' ),
64 64 'right' => esc_html__( 'Right of the chart', 'visualizer' ),
65 65 'top' => esc_html__( 'Above the chart', 'visualizer' ),
66 66 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
@@ -81,8 +81,9 @@
81 81 'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
82 82 'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
83 83 'end' => esc_html__( 'Aligned to the end of the allocated area', 'visualizer' ),
84 84 );
85 +
85 86 }
86 87
87 88 /**
88 89 * Registers additional hooks.
@@ -97,17 +98,15 @@
97 98
98 99 /**
99 100 * Loads the assets.
100 101 */
101 - public function load_google_assets( $deps, $is_frontend ) {
102 + function load_google_assets( $deps, $is_frontend ) {
102 103 wp_register_script( 'google-jsapi', '//www.gstatic.com/charts/loader.js', array(), null, true );
103 - wp_register_script( 'dom-to-image', VISUALIZER_ABSURL . 'js/lib/dom-to-image.min.js', array(), null, true );
104 104 wp_register_script(
105 105 'visualizer-render-google-lib',
106 106 VISUALIZER_ABSURL . 'js/render-google.js',
107 107 array(
108 108 'google-jsapi',
109 - 'dom-to-image',
110 109 ),
111 110 Visualizer_Plugin::VERSION,
112 111 true
113 112 );
@@ -115,8 +114,9 @@
115 114 return array_merge(
116 115 $deps,
117 116 array( 'visualizer-render-google-lib' )
118 117 );
118 +
119 119 }
120 120
121 121 /**
122 122 * Enqueue assets.
@@ -147,18 +147,10 @@
147 147 'emphasis' => esc_html__( 'Emphasis', 'visualizer' ),
148 148 'scope' => esc_html__( 'Scope', 'visualizer' ),
149 149 'style' => esc_html__( 'Style', 'visualizer' ),
150 150 'tooltip' => esc_html__( 'Tooltip', 'visualizer' ),
151 - 'interval' => esc_html__( 'Interval', 'visualizer' ),
152 151 ),
153 - sprintf(
154 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag, %3$s - HTML link tag, %4$s - HTML closing link tag
155 - esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ),
156 - '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">',
157 - '</a>',
158 - '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">',
159 - '</a>'
160 - )
152 + sprintf( esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">', '</a>' )
161 153 );
162 154 }
163 155
164 156 /**
@@ -180,9 +172,9 @@
180 172
181 173 self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
182 174 echo '<div class="viz-section-item">';
183 175 echo '<a class="more-info" href="javascript:;">[?]</a>';
184 - echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
176 + echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
185 177
186 178 echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
187 179 echo '<tr>';
188 180 echo '<td class="viz-section-table-column">';
@@ -217,9 +209,9 @@
217 209 esc_html__( 'Position', 'visualizer' ),
218 210 'legend[position]',
219 211 isset( $this->legend['position'] ) ? $this->legend['position'] : '',
220 212 $this->_legendPositions,
221 - esc_html__( 'Sets the legend position relative to the chart.', 'visualizer' )
213 + esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
222 214 );
223 215
224 216 self::_renderSelectItem(
225 217 esc_html__( 'Alignment', 'visualizer' ),
@@ -255,11 +247,8 @@
255 247 $this->creator,
256 248 ''
257 249 );
258 250 self::_renderSectionEnd();
259 -
260 - self::_renderChartImageSettings();
261 -
262 251 do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
263 252
264 253 self::_renderGroupEnd();
265 254 }
@@ -306,8 +295,9 @@
306 295 esc_html__( 'The easing function applied to the animation.', 'visualizer' )
307 296 );
308 297
309 298 self::_renderSectionEnd();
299 +
310 300 }
311 301
312 302 /**
313 303 * Renders tooltip settings section.
@@ -321,14 +311,14 @@
321 311 esc_html__( 'Trigger', 'visualizer' ),
322 312 'tooltip[trigger]',
323 313 isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
324 314 array(
325 - '' => esc_html__( 'Default', 'visualizer' ),
315 + '' => '',
326 316 'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
327 - 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element.', 'visualizer' ),
317 + 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
328 318 'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
329 319 ),
330 - esc_html__( 'Controls when the tooltip appears.', 'visualizer' )
320 + esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
331 321 );
332 322
333 323 self::_renderSelectItem(
334 324 esc_html__( 'Show Color Code', 'visualizer' ),
@@ -372,9 +362,9 @@
372 362 echo '</div>';
373 363
374 364 echo '<div class="viz-section-delimiter"></div>';
375 365
376 - self::_renderSectionDescription( esc_html__( 'Set the chart\'s background color, border width, and border color.', 'visualizer' ) );
366 + self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
377 367
378 368 self::_renderTextItem(
379 369 esc_html__( 'Stroke Width', 'visualizer' ),
380 370 'backgroundColor[strokeWidth]',
@@ -446,29 +436,11 @@
446 436 echo '</tr>';
447 437 echo '</table>';
448 438
449 439 echo '<p class="viz-section-description">';
450 - esc_html_e( 'Determines the width and height of the chart area.', 'visualizer' );
440 + esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
451 441 echo '</p>';
452 442 echo '</div>';
453 443 self::_renderSectionEnd();
454 444 self::_renderGroupEnd();
455 - }
456 -
457 - /**
458 - * Renders advanced settings and hidden inputs for programmatically-set keys
459 - * (e.g. the global-preset colors palette) that have no visible sidebar control.
460 - *
461 - * @access protected
462 - */
463 - protected function _renderAdvancedSettings(): void {
464 - parent::_renderAdvancedSettings();
465 -
466 - // @phpstan-ignore-next-line (property accessed via magic __get from _data array)
467 - $colors = $this->colors;
468 - if ( ! empty( $colors ) && is_array( $colors ) ) {
469 - foreach ( $colors as $color ) {
470 - echo '<input type="hidden" name="colors[]" value="', esc_attr( $color ), '">';
471 - }
472 - }
473 445 }
474 446 }