| @@ -34,10 +34,9 @@ | ||
| 34 | 34 | // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited. |
| 35 | 35 | |
| 36 | 36 | parent::setup( $action, $data ); |
| 37 | 37 | |
| 38 | - TablePress::enqueue_script( 'common', array( 'jquery-core', 'postbox' ) ); | |
| 39 | - TablePress::enqueue_script( 'options' ); | |
| 38 | + $this->admin_page->enqueue_script( 'options' ); | |
| 40 | 39 | |
| 41 | 40 | $this->process_action_messages( array( |
| 42 | 41 | 'success_save' => __( 'Options saved successfully.', 'tablepress' ), |
| 43 | 42 | 'success_save_error_custom_css' => __( 'Options saved successfully, but “Custom CSS” was not saved to file.', 'tablepress' ), |
| @@ -49,16 +48,13 @@ | ||
| 49 | 48 | // Enqueue WordPress copy of CodeMirror, with CSS linting, etc., for the "Custom CSS" textarea, which is only shown to admins. |
| 50 | 49 | $codemirror_settings = wp_enqueue_code_editor( array( 'type' => 'text/css' ) ); |
| 51 | 50 | if ( ! empty( $codemirror_settings ) ) { |
| 52 | 51 | // Load CSS adjustments for CodeMirror and the added vertical resizing. |
| 53 | - TablePress::enqueue_style( 'codemirror', array( 'code-editor' ) ); | |
| 54 | - TablePress::enqueue_script( 'codemirror' ); | |
| 52 | + $this->admin_page->enqueue_style( 'codemirror', array( 'code-editor' ) ); | |
| 53 | + $this->admin_page->enqueue_script( 'codemirror' ); | |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | - if ( ! TABLEPRESS_IS_PLAYGROUND_PREVIEW ) { | |
| 58 | - /* translators: %s: Premium badge HTML or empty string */ | |
| 59 | - $this->add_meta_box( 'default-style', sprintf( __( 'Default Styling %s', 'tablepress' ), tb_tp_fs()->is_free_plan() ? '<span class="pill-label">' . __( 'Premium', 'tablepress' ) . '</span>' : '' ), array( $this, 'postbox_default_style_customizer_screen' ), 'normal' ); | |
| 60 | - } | |
| 56 | + $this->add_meta_box( 'default-style', sprintf( __( 'Default Styling %s', 'tablepress' ), tb_tp_fs()->is_free_plan() ? '<span class="pill-label">' . __( 'Premium', 'tablepress' ) . '</span>' : '' ), array( $this, 'postbox_default_style_customizer_screen' ), 'normal' ); | |
| 61 | 57 | $this->add_meta_box( 'frontend-options', __( 'Custom Styling', 'tablepress' ), array( $this, 'postbox_frontend_options' ), 'normal' ); |
| 62 | 58 | } |
| 63 | 59 | $this->add_meta_box( 'user-options', __( 'User Options', 'tablepress' ), array( $this, 'postbox_user_options' ), 'normal' ); |
| 64 | 60 | $this->add_text_box( 'submit', array( $this, 'textbox_submit_button' ), 'submit' ); |