$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 { ?>
$data Data for this screen. * @param array