| @@ -168,16 +168,15 @@ | ||
| 168 | 168 | * @access public |
| 169 | 169 | * @param array $atts The array of shortcode attributes. |
| 170 | 170 | */ |
| 171 | 171 | public function renderChart( $atts ) { |
| 172 | - global $wp_version; | |
| 173 | 172 | $atts = shortcode_atts( |
| 174 | 173 | array( |
| 175 | 174 | 'id' => false, // chart id |
| 176 | - 'class' => false, // chart class | |
| 177 | - 'series' => false, // series filter hook | |
| 178 | - 'data' => false, // data filter hook | |
| 179 | - 'settings' => false, // data filter hook | |
| 175 | + 'class' => false, // chart class | |
| 176 | + 'series' => false, // series filter hook | |
| 177 | + 'data' => false, // data filter hook | |
| 178 | + 'settings' => false, // data filter hook | |
| 180 | 179 | ), $atts |
| 181 | 180 | ); |
| 182 | 181 | |
| 183 | 182 | // if empty id or chart does not exists, then return empty string |
| @@ -239,9 +238,9 @@ | ||
| 239 | 238 | wp_localize_script( |
| 240 | 239 | 'visualizer-render', 'visualizer', array( |
| 241 | 240 | 'charts' => $this->_charts, |
| 242 | 241 | 'map_api_key' => get_option( 'visualizer-map-api-key' ), |
| 243 | - 'rest_url' => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '', | |
| 242 | + 'rest_url' => rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ), | |
| 244 | 243 | 'i10n' => array( |
| 245 | 244 | 'copied' => __( 'Copied!', 'visualizer' ), |
| 246 | 245 | ), |
| 247 | 246 | ) |