PluginProbe
TablePress – Tables in WordPress made easy / 3.2
TablePress – Tables in WordPress made easy v3.2
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
← All changes | views/view-export.php +17 -17 2.4.33.2 View file →
@@ -89,9 +89,14 @@
89 89 $add_url = TablePress::url( array( 'action' => 'add' ) );
90 90 $import_url = TablePress::url( array( 'action' => 'import' ) );
91 91 ?>
92 92 <p><?php _e( 'No tables found.', 'tablepress' ); ?></p>
93 - <p><?php printf( __( 'You should <a href="%1$s">add</a> or <a href="%2$s">import</a> a table to get started!', 'tablepress' ), $add_url, $import_url ); ?></p>
93 + <p>
94 + <?php
95 + /* translators: %1$s: URL to add table page, %2$s: URL to import table page */
96 + printf( __( 'You should <a href="%1$s">add</a> or <a href="%2$s">import</a> a table to get started!', 'tablepress' ), $add_url, $import_url );
97 + ?>
98 + </p>
94 99 <?php
95 100 }
96 101
97 102 /**
@@ -102,25 +107,20 @@
102 107 * @param array<string, mixed> $data Data for this screen.
103 108 * @param array<string, mixed> $box Information about the meta box.
104 109 */
105 110 public function postbox_export_form( array $data, array $box ): void {
106 - $script_data = array(
107 - 'tables' => $this->admin_page->convert_to_json_parse_output( $data['tables'] ),
108 - 'exportFormats' => $this->admin_page->convert_to_json_parse_output( $data['export_formats'] ),
109 - 'csvDelimiters' => $this->admin_page->convert_to_json_parse_output( $data['csv_delimiters'] ),
110 - 'zipSupportAvailable' => $this->admin_page->convert_to_json_parse_output( $data['zip_support_available'] ),
111 - 'selectedTables' => $this->admin_page->convert_to_json_parse_output( $data['export_ids'] ),
112 - 'exportFormat' => $this->admin_page->convert_to_json_parse_output( $data['export_format'] ),
113 - 'csvDelimiter' => $this->admin_page->convert_to_json_parse_output( $data['csv_delimiter'] ),
111 + $this->print_script_data_json(
112 + 'export',
113 + array(
114 + 'tables' => $data['tables'],
115 + 'exportFormats' => $data['export_formats'],
116 + 'csvDelimiters' => $data['csv_delimiters'],
117 + 'zipSupportAvailable' => $data['zip_support_available'],
118 + 'selectedTables' => $data['export_ids'],
119 + 'exportFormat' => $data['export_format'],
120 + 'csvDelimiter' => $data['csv_delimiter'],
121 + ),
114 122 );
115 -
116 - echo "<script>\n";
117 - echo "window.tp = window.tp || {};\n";
118 - echo "tp.export = {};\n";
119 - foreach ( $script_data as $variable => $value ) {
120 - echo "tp.export.{$variable} = {$value};\n";
121 - }
122 - echo "</script>\n";
123 123
124 124 echo '<div id="tablepress-export-screen"></div>';
125 125 }
126 126