admin_page->enqueue_script( 'import', array( 'jquery-core' ), array( 'import' => array( 'error_wp_table_reloaded_nothing_selected' => __( 'Error: You did not select what to import from WP-Table Reloaded!', 'tablepress' ), ), ) ); $this->process_action_messages( array( 'error_import' => __( 'Error: The import failed.', 'tablepress' ), 'error_no_zip_import' => __( 'Error: Import of ZIP files is not available on this server.', 'tablepress' ), 'error_import_zip_open' => __( 'Error: The ZIP file could not be opened.', 'tablepress' ), 'error_import_zip_content' => __( 'Error: The data in the ZIP file is invalid.', 'tablepress' ), 'error_import_no_existing_id' => __( 'Error: You selected to replace or append to an existing table, but did not select a table.', 'tablepress' ), 'error_import_source_invalid' => __( 'Error: The source for the import is invalid or could not be accessed.', 'tablepress' ), 'error_import_data' => __( 'Error: The data for the import is invalid.', 'tablepress' ), 'error_wp_table_reloaded_nothing_selected' => __( 'Error: You did not select what to import from WP-Table Reloaded!', 'tablepress' ), 'error_wp_table_reloaded_not_installed' => __( 'Error: Existing WP-Table Reloaded tables were not found in the database.', 'tablepress' ), 'error_import_wp_table_reloaded' => __( 'Error: The tables from WP-Table Reloaded could not be imported.', 'tablepress' ), 'error_wp_table_reloaded_dump_file' => __( 'Error: The WP-Table Reloaded Dump File could not be imported!', 'tablepress' ), ) ); $this->add_text_box( 'head', array( $this, 'textbox_head' ), 'normal' ); $this->add_meta_box( 'import-form', __( 'Import Tables', 'tablepress' ), array( $this, 'postbox_import_form' ), 'normal' ); if ( current_user_can( 'tablepress_import_tables_wptr' ) ) { $this->add_meta_box( 'import-wp-table-reloaded', __( 'Import from WP-Table Reloaded', 'tablepress' ), array( $this, 'postbox_wp_table_reloaded_import' ), 'additional' ); } add_filter( 'default_hidden_meta_boxes', array( $this, 'hide_import_wptr_postbox' ), 10, 2 ); } /** * Hide the "Import from WP-Table Reloaded postbox" by default, if WP-Table Reloaded is not installed. It can still be opened manually from the "Screen Options". * * @since 1.0.0 */ public function hide_import_wptr_postbox( $hidden, $screen ) { if ( 'tablepress_import' !== $screen->id ) { return $hidden; } if ( ! $this->data['wp_table_reloaded_installed'] ) { $hidden[] = 'tablepress_import-import-wp-table-reloaded' ; } return $hidden; } /** * Print the screen head text. * * @since 1.0.0 * * @param array $data Data for this screen. * @param array $box Information about the text box. */ public function textbox_head( array $data, array $box ) { ?>

:
' . __( 'You can import multiple tables by placing them in a ZIP file.', 'tablepress' ) . ''; } ?>
' . __( 'You can import multiple tables by placing them in a ZIP file.', 'tablepress' ) . ''; } ?>
' . __( 'You can import multiple tables by placing them in a ZIP file.', 'tablepress' ) . ''; } ?>
' . __( 'Import of HTML files is not available on your server.', 'tablepress' ) . ''; } ?>
:



migration guide on the TablePress website.', 'tablepress' ), 'https://tablepress.org/migration-from-wp-table-reloaded/' ); ?>

:
:
:
data['wp_table_reloaded_installed'] ) { return; } $content = '

' . __( 'TablePress Feature: Import from WP-Table Reloaded', 'tablepress' ) . '

'; $content .= '

' . __( 'You can import your existing tables and “Custom CSS” from WP-Table Reloaded into TablePress.', 'tablepress' ) . '

'; $this->admin_page->print_wp_pointer_js( 'tp100_wp_table_reloaded_import', '#tablepress_import-import-wp-table-reloaded', array( 'content' => $content, 'position' => array( 'edge' => 'bottom', 'align' => 'left', 'offset' => '16 -16' ), ) ); } } // class TablePress_Import_View