| Server IP : 172.67.71.254 / Your IP : 216.73.216.4 Web Server : nginx/1.27.1 System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : arabianexpress ( 1872) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v9321/leapdubai/public_html/wp-content/plugins/tablepress/views/ |
Upload File : |
<?php
/**
* Add Table View
*
* @package TablePress
* @subpackage Views
* @author Tobias Bäthge
* @since 1.0.0
*/
// Prohibit direct script loading.
defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
/**
* Add Table View class
*
* @package TablePress
* @subpackage Views
* @author Tobias Bäthge
* @since 1.0.0
*/
class TablePress_Add_View extends TablePress_View {
/**
* Sets up the view with data and does things that are specific for this view.
*
* @since 1.0.0
*
* @param string $action Action for this view.
* @param array<string, mixed> $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.
parent::setup( $action, $data );
$this->add_text_box( 'no-javascript', array( $this, 'textbox_no_javascript' ), 'header' );
$this->process_action_messages( array(
'error_add' => __( 'Error: The table could not be added.', 'tablepress' ),
) );
TablePress::enqueue_script( 'add' );
$this->add_text_box( 'head', array( $this, 'textbox_head' ), 'normal' );
$this->add_text_box( 'add-table', array( $this, 'textbox_add_table' ), 'normal' );
}
/**
* Prints the screen head text.
*
* @since 1.0.0
*
* @param array<string, mixed> $data Data for this screen.
* @param array<string, mixed> $box Information about the text box.
*/
public function textbox_head( array $data, array $box ): void {
?>
<p>
<?php _e( 'To add a new table, enter its name, a description (optional), and the number of rows and columns into the form below.', 'tablepress' ); ?>
</p>
<p>
<?php _e( 'You can always change the name, description, and size of your table later.', 'tablepress' ); ?>
</p>
<?php
}
/**
* Prints the content of the "Add New Table" text box.
*
* @since 3.0.0
*
* @param array<string, mixed> $data Data for this screen.
* @param array<string, mixed> $box Information about the text box.
*/
public function textbox_add_table( array $data, array $box ): void {
echo '<div id="tablepress-add-screen"></div>';
}
} // class TablePress_Add_View