| @@ -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' ) ); |