| @@ -91,8 +91,16 @@ | ||
| 91 | 91 | */ |
| 92 | 92 | protected $_supportsAnimation = true; |
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | + * Which library does this this chart implement? | |
| 96 | + * | |
| 97 | + * @access protected | |
| 98 | + * @var string | |
| 99 | + */ | |
| 100 | + protected $_library = null; | |
| 101 | + | |
| 102 | + /** | |
| 95 | 103 | * Constructor. |
| 96 | 104 | * |
| 97 | 105 | * @since 1.0.0 |
| 98 | 106 | * |
| @@ -123,8 +131,10 @@ | ||
| 123 | 131 | '' => '', |
| 124 | 132 | '1' => esc_html__( 'Yes', 'visualizer' ), |
| 125 | 133 | '0' => esc_html__( 'No', 'visualizer' ), |
| 126 | 134 | ); |
| 135 | + | |
| 136 | + $this->hooks(); | |
| 127 | 137 | } |
| 128 | 138 | |
| 129 | 139 | /** |
| 130 | 140 | * Renders chart title settings. |
| @@ -164,9 +174,9 @@ | ||
| 164 | 174 | self::_renderGroupEnd(); |
| 165 | 175 | |
| 166 | 176 | self::_renderGroupStart( esc_html__( 'Manual Configuration', 'visualizer' ) ); |
| 167 | 177 | self::_renderSectionStart(); |
| 168 | - self::_renderSectionDescription( __( 'Configure the graph by providing configuration variables right from the', 'visualizer' ) . ' <a href="https://developers.google.com/chart/interactive/docs/reference" target="_blank">Google Visualization</a> API.' ); | |
| 178 | + self::_renderSectionDescription( '<span class="viz-gvlink">' . sprintf( __( 'Configure the graph by providing configuration variables right from the %1$sGoogle Visualization API%2$s', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/gallery/?#configuration-options" target="_blank">', '</a>' ) . '</span>' ); | |
| 169 | 179 | |
| 170 | 180 | $example = ' |
| 171 | 181 | { |
| 172 | 182 | "vAxis": { |
| @@ -182,9 +192,10 @@ | ||
| 182 | 192 | esc_html__( 'Configuration', 'visualizer' ), |
| 183 | 193 | 'manual', |
| 184 | 194 | $this->manual, |
| 185 | 195 | sprintf( |
| 186 | - esc_html__( 'One per line in valid JSON (key:value) format e.g. %s', 'visualizer' ), '<br><code>' . $example . '</code>' | |
| 196 | + esc_html__( 'One per line in valid JSON (key:value) format e.g. %s', 'visualizer' ), | |
| 197 | + '<br><code>' . $example . '</code>' | |
| 187 | 198 | ), |
| 188 | 199 | '', |
| 189 | 200 | array( 'rows' => 5 ) |
| 190 | 201 | ); |
| @@ -745,7 +756,14 @@ | ||
| 745 | 756 | echo '<b>', $title, '</b>'; |
| 746 | 757 | echo '<textarea class="control-text" ', $attributes, ' name="', $name, '" placeholder="', $placeholder, '">', $value, '</textarea>'; |
| 747 | 758 | echo '<p class="viz-section-description">', $desc, '</p>'; |
| 748 | 759 | echo '</div>'; |
| 760 | + } | |
| 761 | + | |
| 762 | + /** | |
| 763 | + * Returns the library this chart implements. | |
| 764 | + */ | |
| 765 | + public function getLibrary() { | |
| 766 | + return $this->_library; | |
| 749 | 767 | } |
| 750 | 768 | |
| 751 | 769 | } |