PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 10.3
Jetpack – WP Security, Backup, Speed, & Growth v10.3
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
← All changes | modules/theme-tools.php +6 -12 12.2.310.3 View file →
@@ -1,21 +1,14 @@
1 1 <?php
2 -/**
3 - * Module: Theme Tools
4 - *
2 +/*
5 3 * Load code specific to themes or theme tools
6 4 * This file is special, and is not an actual `module` as such.
7 5 * It is included by ./module-extras.php
8 - *
9 - * @package automattic/jetpack
10 6 */
11 7
12 -/**
13 - * Conditionally require the Tonesque lib depending on theme support.
14 - */
15 8 function jetpack_load_theme_tools() {
16 9 if ( current_theme_supports( 'tonesque' ) ) {
17 - require_once JETPACK__PLUGIN_DIR . '/_inc/lib/tonesque.php';
10 + jetpack_require_lib( 'tonesque' );
18 11 }
19 12 }
20 13 add_action( 'init', 'jetpack_load_theme_tools', 30 );
21 14
@@ -61,15 +54,16 @@
61 54 }
62 55 }
63 56 add_action( 'after_setup_theme', 'jetpack_load_theme_compat', -1 );
64 57
58 +
65 59 /**
66 60 * Requires a file once, if the passed key exists in the files array.
67 61 *
68 62 * @access private
69 - * @param string $key The key to check.
70 - * @param array $files Array of files to check in.
71 - * @return void|WP_Error
63 + * @param string $key
64 + * @param array $files
65 + * @return void
72 66 */
73 67 function _jetpack_require_compat_file( $key, $files ) {
74 68 if ( ! is_string( $key ) ) {
75 69 return new WP_Error( 'key_not_string', 'The specified key is not actually a string.', compact( 'key' ) );