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 | controllers/controller-frontend.php +5 -1 3.3.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 /**
@@ -91,9 +93,9 @@
91 93 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ) );
92 94 }
93 95
94 96 // Register a placeholder script handle so that plugins can properly declare it as a dependency, even before the actual script is enqueued in `enqueue_datatables_files()`.
95 - wp_register_script( 'tablepress-datatables', '', array(), TablePress::version, array( 'in_footer' => true ) );
97 + wp_register_script( 'tablepress-datatables', '', array(), TablePress::version, array( 'in_footer' => true ) ); // @phpstan-ignore argument.type ($src is empty, as it's a placeholder.)
96 98
97 99 add_action( 'wp_print_footer_scripts', array( $this, 'add_datatables_calls' ), 9 ); // Priority 9 so that this runs before `_wp_footer_scripts()`.
98 100
99 101 // Register TablePress Shortcodes. Priority 20 is kept for backwards-compatibility purposes.
@@ -320,8 +322,10 @@
320 322 *
321 323 * @since 3.0.0
322 324 *
323 325 * @param string[] $dependencies The dependencies for the DataTables JS library.
326 + *
327 + * @phpstan-param non-empty-string[] $dependencies
324 328 */
325 329 $dependencies = apply_filters( 'tablepress_datatables_js_dependencies', $dependencies );
326 330
327 331 // De-register the placeholder script handle and enqueue the actual script, so that the dependencies are correct.