| @@ -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,9 +98,9 @@ | ||
| 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 | 104 | wp_register_script( 'dom-to-image', VISUALIZER_ABSURL . 'js/lib/dom-to-image.min.js', array(), null, true ); |
| 104 | 105 | wp_register_script( |
| 105 | 106 | 'visualizer-render-google-lib', |
| @@ -115,8 +116,9 @@ | ||
| 115 | 116 | return array_merge( |
| 116 | 117 | $deps, |
| 117 | 118 | array( 'visualizer-render-google-lib' ) |
| 118 | 119 | ); |
| 120 | + | |
| 119 | 121 | } |
| 120 | 122 | |
| 121 | 123 | /** |
| 122 | 124 | * Enqueue assets. |
| @@ -180,9 +182,9 @@ | ||
| 180 | 182 | |
| 181 | 183 | self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false ); |
| 182 | 184 | echo '<div class="viz-section-item">'; |
| 183 | 185 | echo '<a class="more-info" href="javascript:;">[?]</a>'; |
| 184 | - echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>'; | |
| 186 | + echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>'; | |
| 185 | 187 | |
| 186 | 188 | echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">'; |
| 187 | 189 | echo '<tr>'; |
| 188 | 190 | echo '<td class="viz-section-table-column">'; |
| @@ -217,9 +219,9 @@ | ||
| 217 | 219 | esc_html__( 'Position', 'visualizer' ), |
| 218 | 220 | 'legend[position]', |
| 219 | 221 | isset( $this->legend['position'] ) ? $this->legend['position'] : '', |
| 220 | 222 | $this->_legendPositions, |
| 221 | - esc_html__( 'Sets the legend position relative to the chart.', 'visualizer' ) | |
| 223 | + esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' ) | |
| 222 | 224 | ); |
| 223 | 225 | |
| 224 | 226 | self::_renderSelectItem( |
| 225 | 227 | esc_html__( 'Alignment', 'visualizer' ), |
| @@ -306,8 +308,9 @@ | ||
| 306 | 308 | esc_html__( 'The easing function applied to the animation.', 'visualizer' ) |
| 307 | 309 | ); |
| 308 | 310 | |
| 309 | 311 | self::_renderSectionEnd(); |
| 312 | + | |
| 310 | 313 | } |
| 311 | 314 | |
| 312 | 315 | /** |
| 313 | 316 | * Renders tooltip settings section. |
| @@ -323,12 +326,12 @@ | ||
| 323 | 326 | isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null, |
| 324 | 327 | array( |
| 325 | 328 | '' => esc_html__( 'Default', 'visualizer' ), |
| 326 | 329 | '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' ), | |
| 330 | + 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ), | |
| 328 | 331 | 'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ), |
| 329 | 332 | ), |
| 330 | - esc_html__( 'Controls when the tooltip appears.', 'visualizer' ) | |
| 333 | + esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' ) | |
| 331 | 334 | ); |
| 332 | 335 | |
| 333 | 336 | self::_renderSelectItem( |
| 334 | 337 | esc_html__( 'Show Color Code', 'visualizer' ), |
| @@ -372,9 +375,9 @@ | ||
| 372 | 375 | echo '</div>'; |
| 373 | 376 | |
| 374 | 377 | echo '<div class="viz-section-delimiter"></div>'; |
| 375 | 378 | |
| 376 | - self::_renderSectionDescription( esc_html__( 'Set the chart\'s background color, border width, and border color.', 'visualizer' ) ); | |
| 379 | + self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) ); | |
| 377 | 380 | |
| 378 | 381 | self::_renderTextItem( |
| 379 | 382 | esc_html__( 'Stroke Width', 'visualizer' ), |
| 380 | 383 | 'backgroundColor[strokeWidth]', |
| @@ -446,29 +449,11 @@ | ||
| 446 | 449 | echo '</tr>'; |
| 447 | 450 | echo '</table>'; |
| 448 | 451 | |
| 449 | 452 | echo '<p class="viz-section-description">'; |
| 450 | - esc_html_e( 'Determines the width and height of the chart area.', 'visualizer' ); | |
| 453 | + esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' ); | |
| 451 | 454 | echo '</p>'; |
| 452 | 455 | echo '</div>'; |
| 453 | 456 | self::_renderSectionEnd(); |
| 454 | 457 | 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 | 458 | } |
| 474 | 459 | } |