PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 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 All 45 releases
← All changes | views/view-editor_button_thickbox.php +10 -7 2.2.2 → 3.4 View file →
@@ -7,8 +7,10 @@
7 7 * @author Tobias Bäthge
8 8 * @since 1.0.0
9 9 */
10 10
11 +declare(strict_types=1);
12 +
11 13 // Prohibit direct script loading.
12 14 defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
13 15
14 16 /**
@@ -24,11 +26,10 @@
24 26 /**
25 27 * Object for the Editor Button Thickbox List Table.
26 28 *
27 29 * @since 1.0.0
28 - * @var TablePress_Editor_Button_Thickbox_List_Table
29 30 */
30 - protected $wp_list_table;
31 + protected \TablePress_Editor_Button_Thickbox_List_Table $wp_list_table;
31 32
32 33 /**
33 34 * Initializes the View class.
34 35 *
@@ -45,8 +46,9 @@
45 46 *
46 47 * @param string $action Action for this view.
47 48 * @param array<string, mixed> $data Data for this view.
48 49 */
50 + #[\Override]
49 51 public function setup( /* string */ $action, array $data ) /* : void */ {
50 52 // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited.
51 53
52 54 $this->action = $action;
@@ -62,8 +64,9 @@
62 64 * Renders the current view.
63 65 *
64 66 * @since 1.0.0
65 67 */
68 + #[\Override]
66 69 public function render(): void {
67 70 _wp_admin_html_begin();
68 71
69 72 wp_print_styles( 'colors' );
@@ -68,9 +71,9 @@
68 71
69 72 wp_print_styles( 'colors' );
70 73 wp_print_scripts( 'jquery-core' );
71 74 ?>
72 -<title><?php printf( __( '%1$s &lsaquo; %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></title>
75 +<title><?php /* translators: %1$s: Page title, %2$s: Plugin name */ printf( __( '%1$s &lsaquo; %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></title>
73 76 <style>
74 77 /* Account for .wp-toolbar. */
75 78 html {
76 79 padding-top: 0 !important;
@@ -111,11 +114,11 @@
111 114 }
112 115 <?php endif; ?>
113 116 </style>
114 117 </head>
115 -<body class="wp-admin wp-core-ui js iframe<?php echo is_rtl() ? ' rtl' : ''; ?>">
118 +<body class="wp-admin wp-core-ui js iframe <?php echo 'admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'modern' ) . ( is_rtl() ? ' rtl' : '' ); ?>">
116 119 <div id="tablepress-page" class="wrap">
117 -<h1><?php printf( __( '%1$s &lsaquo; %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></h1>
120 +<h1><?php /* translators: %1$s: Page title, %2$s: Plugin name */ printf( __( '%1$s &lsaquo; %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></h1>
118 121 <div id="poststuff">
119 122 <p><?php _e( 'This is a list of your tables.', 'tablepress' ); ?> <?php _e( 'You may insert a table into a post or page here.', 'tablepress' ); ?></p>
120 123 <p><?php printf( __( 'Click the “%1$s” button for the desired table to automatically insert its Shortcode into the editor.', 'tablepress' ), __( 'Insert Shortcode', 'tablepress' ) ); ?></p>
121 124 <?php
@@ -122,10 +125,10 @@
122 125 if ( ! empty( $_GET['s'] ) ) {
123 126 printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'tablepress' ) . '</span>', esc_html( wp_unslash( $_GET['s'] ) ) );
124 127 }
125 128 ?>
126 -<form method="get" action="">
127 - <input type="hidden" name="action" value="tablepress_<?php echo $this->action; ?>" />
129 +<form method="get">
130 + <input type="hidden" name="action" value="tablepress_<?php echo $this->action; ?>">
128 131 <?php
129 132 wp_nonce_field( TablePress::nonce( $this->action ), '_wpnonce', false );
130 133 $this->wp_list_table->search_box( __( 'Search Tables', 'tablepress' ), 'tables_search' );
131 134 ?>