| @@ -201,27 +201,10 @@ | ||
| 201 | 201 | /** |
| 202 | 202 | * Hook server side rendering into render callback |
| 203 | 203 | */ |
| 204 | 204 | public function register_block_type() { |
| 205 | - $asset_path = VISUALIZER_ABSPATH . '/classes/Visualizer/Gutenberg/build/index.asset.php'; | |
| 206 | - $version = $this->version; | |
| 207 | - if ( file_exists( $asset_path ) ) { | |
| 208 | - // @phpstan-ignore-next-line | |
| 209 | - $asset = require $asset_path; | |
| 210 | - $version = isset( $asset['version'] ) ? $asset['version'] : $version; | |
| 211 | - } | |
| 212 | - if ( ! wp_style_is( 'visualizer-datatables', 'registered' ) ) { | |
| 213 | - wp_register_style( 'visualizer-datatables', VISUALIZER_ABSURL . 'css/lib/datatables.min.css', array(), Visualizer_Plugin::VERSION ); | |
| 214 | - } | |
| 215 | - if ( ! wp_style_is( 'visualizer-gutenberg-block', 'registered' ) ) { | |
| 216 | - wp_register_style( 'visualizer-gutenberg-block', VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/style-index.css', array( 'visualizer-datatables' ), $version ); | |
| 217 | - } | |
| 218 | 205 | register_block_type( |
| 219 | 206 | 'visualizer/chart', array( |
| 220 | - // The editor_style registration is what gets the stylesheet into the | |
| 221 | - // iframed editor canvas; styles enqueued via enqueue_block_editor_assets | |
| 222 | - // only reach the parent document. | |
| 223 | - 'editor_style' => 'visualizer-gutenberg-block', | |
| 224 | 207 | 'render_callback' => array( $this, 'gutenberg_block_callback' ), |
| 225 | 208 | 'attributes' => array( |
| 226 | 209 | 'id' => array( |
| 227 | 210 | 'type' => 'number', |
| @@ -313,11 +296,8 @@ | ||
| 313 | 296 | $data['visualizer-default-data'] = get_post_meta( $post_id, Visualizer_Plugin::CF_DEFAULT_DATA, true ); |
| 314 | 297 | |
| 315 | 298 | // faetch and update settings |
| 316 | 299 | $data['visualizer-settings'] = get_post_meta( $post_id, Visualizer_Plugin::CF_SETTINGS, true ); |
| 317 | - if ( ! is_array( $data['visualizer-settings'] ) ) { | |
| 318 | - $data['visualizer-settings'] = array(); | |
| 319 | - } | |
| 320 | 300 | if ( empty( $data['visualizer-settings']['pagination'] ) ) { |
| 321 | 301 | $data['visualizer-settings']['pageSize'] = ''; |
| 322 | 302 | } |
| 323 | 303 | // handle series filter hooks |