| @@ -8,10 +8,8 @@ | ||
| 8 | 8 | namespace TableBuilder\Core; |
| 9 | 9 | |
| 10 | 10 | defined( 'ABSPATH' ) || exit; |
| 11 | 11 | |
| 12 | -use TableBuilder\Helpers\Utils; | |
| 13 | - | |
| 14 | 12 | /** |
| 15 | 13 | * Enqueue registrar. |
| 16 | 14 | * |
| 17 | 15 | * @since 1.0.0 |
| @@ -31,9 +29,8 @@ | ||
| 31 | 29 | public function __construct() { |
| 32 | 30 | add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); |
| 33 | 31 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_deactivation_popup_scripts' ) ); |
| 34 | 32 | add_action( 'enqueue_block_editor_assets', array( $this, 'blocks_editor_scripts' ) ); |
| 35 | - add_action( 'wp_head', array( $this, 'print_device_script_for_window' ) ); | |
| 36 | 33 | add_filter( 'body_class', array( $this, 'add_body_class' ) ); |
| 37 | 34 | add_filter( 'admin_body_class', array( $this, 'add_body_class' ) ); |
| 38 | 35 | } |
| 39 | 36 | |
| @@ -306,18 +303,17 @@ | ||
| 306 | 303 | return 'body {' . implode( ' ', $css ) . '}'; |
| 307 | 304 | } |
| 308 | 305 | |
| 309 | 306 | /** |
| 310 | - * Prints device script in the header for responsive behavior. | |
| 307 | + * Deprecated no-op, kept only so external callers don't fatal. | |
| 311 | 308 | * |
| 309 | + * It used to attach a "breakpoints" global to the "wp-block-editor" script | |
| 310 | + * on the frontend, which no frontend script reads. | |
| 311 | + * | |
| 312 | + * @deprecated 2.2.15 | |
| 312 | 313 | * @return void |
| 313 | 314 | */ |
| 314 | - public function print_device_script_for_window() { | |
| 315 | - if ( ! is_admin() ) { | |
| 316 | - $devices = Utils::get_device_list(); | |
| 317 | - wp_add_inline_script( 'wp-block-editor', 'var breakpoints = ' . wp_json_encode( $devices ) . ';', 'before' ); | |
| 318 | - } | |
| 319 | - } | |
| 315 | + public function print_device_script_for_window() {} | |
| 320 | 316 | |
| 321 | 317 | /** |
| 322 | 318 | * Adds a tableBuilder class to the admin/editor body. |
| 323 | 319 | * |