$data Data for this view. */ #[\Override] public function setup( /* string */ $action, array $data ) /* : void */ { // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited. // Set action manually here, to get correct page title and nav bar entries. $this->action = 'options'; $this->data = $data; // Set page title. $GLOBALS['title'] = sprintf( __( '%1$s ‹ %2$s', 'tablepress' ), $this->data['view_actions'][ $this->action ]['page_title'], 'TablePress' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $this->add_header_message( '' . __( 'Attention: Further action is required to save the changes to your “Custom CSS”!', 'tablepress' ) . '', 'notice-success' ); // Admin page helpers, like script/style loading, could be moved to view. $this->admin_page = TablePress::load_class( 'TablePress_Admin_Page', 'class-admin-page-helper.php', 'classes' ); $this->admin_page->enqueue_style( 'common' ); $this->admin_page->add_admin_footer_text(); $this->add_text_box( 'explanation-text', array( $this, 'textbox_explanation_text' ), 'normal' ); $this->add_text_box( 'credentials-form', array( $this, 'textbox_credentials_form' ), 'normal' ); $this->add_text_box( 'proceed-no-file-saving', array( $this, 'textbox_proceed_no_file_saving' ), 'submit' ); } /** * Render the current view (in this view: without form tag). * * @since 1.0.0 */ #[\Override] public function render(): void { ?>
print_nav_tab_menu(); ?>
header_messages as $message ) { echo $message; } $this->do_text_boxes( 'header' ); ?>
do_text_boxes( 'normal' ); $this->do_meta_boxes( 'normal' ); $this->do_text_boxes( 'additional' ); $this->do_meta_boxes( 'additional' ); // Print all submit buttons. $this->do_text_boxes( 'submit' ); ?>
do_text_boxes( 'side' ); $this->do_meta_boxes( 'side' ); ?>

$data Data for this screen. * @param array $box Information about the text box. */ public function textbox_explanation_text( array $data, array $box ): void { ?>

$data Data for this screen. * @param array $box Information about the text box. */ public function textbox_credentials_form( array $data, array $box ): void { echo $data['credentials_form']; } /** * Print the content of the "Cancel Saving" text box. * * @since 1.0.0 * * @param array $data Data for this screen. * @param array $box Information about the text box. */ public function textbox_proceed_no_file_saving( array $data, array $box ): void { ?>