File Editor
Directories:
.. (Back)
calypsoify
carousel
comment-likes
comments
contact-form
custom-css
custom-post-types
geo-location
google-analytics
infinite-scroll
lazy-images
likes
markdown
masterbar
memberships
photon
photon-cdn
plugin-search
post-by-email
protect
publicize
pwa
related-posts
scan
search
seo-tools
sharedaddy
shortcodes
simple-payments
site-icon
sitemaps
sso
subscriptions
theme-tools
tiled-gallery
verification-tools
videopress
widget-visibility
widgets
woocommerce-analytics
wordads
wpcom-block-editor
wpcom-tos
Files:
.eslintrc.js
after-the-deadline.php
carousel.php
comment-likes.php
comments.php
contact-form.php
copy-post.php
custom-content-types.php
custom-css.php
enhanced-distribution.php
geo-location.php
google-analytics.php
gravatar-hovercards.php
infinite-scroll.php
json-api.php
latex.php
lazy-images.php
likes.php
markdown.php
masterbar.php
minileven.php
mobile-push.php
module-extras.php
module-headings.php
module-info.php
monitor.php
notes.php
photon-cdn.php
photon.php
plugin-search.php
post-by-email.php
protect.php
publicize.php
pwa.php
related-posts.php
search.php
seo-tools.php
sharedaddy.php
shortcodes.php
shortlinks.php
sitemaps.php
sso.php
stats.php
subscriptions.php
theme-tools.php
tiled-gallery.php
vaultpress.php
verification-tools.php
videopress.php
widget-visibility.php
widgets.php
woocommerce-analytics.php
wordads.php
wpgroho.js
Create New File
Create
Edit File: theme-tools.php
<?php /* * Load code specific to themes or theme tools * This file is special, and is not an actual `module` as such. * It is included by ./module-extras.php */ function jetpack_load_theme_tools() { if ( current_theme_supports( 'tonesque' ) ) { jetpack_require_lib( 'tonesque' ); } } add_action( 'init', 'jetpack_load_theme_tools', 30 ); /** * Load theme compat file if it exists. */ function jetpack_load_theme_compat() { /** * Filter theme compat files. * * Themes can add their own compat files here if they like. For example: * * add_filter( 'jetpack_theme_compat_files', 'mytheme_jetpack_compat_file' ); * function mytheme_jetpack_compat_file( $files ) { * $files['mytheme'] = locate_template( 'jetpack-compat.php' ); * return $files; * } * * @module theme-tools * * @since 2.8.0 * * @param array Associative array of theme compat files to load. */ $compat_files = apply_filters( 'jetpack_theme_compat_files', array( 'twentyfourteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentyfourteen.php', 'twentyfifteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentyfifteen.php', 'twentysixteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentysixteen.php', 'twentyseventeen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentyseventeen.php', 'twentynineteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentynineteen.php', 'twentytwenty' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentytwenty.php', ) ); _jetpack_require_compat_file( get_stylesheet(), $compat_files ); if ( is_child_theme() ) { _jetpack_require_compat_file( get_template(), $compat_files ); } } add_action( 'after_setup_theme', 'jetpack_load_theme_compat', -1 ); /** * Requires a file once, if the passed key exists in the files array. * * @access private * @param string $key * @param array $files * @return void */ function _jetpack_require_compat_file( $key, $files ) { if ( ! is_string( $key ) ) { return new WP_Error( 'key_not_string', 'The specified key is not actually a string.', compact( 'key' ) ); } if ( array_key_exists( $key, $files ) && is_readable( $files[ $key ] ) ) { require_once $files[ $key ]; } }
Save Changes
Rename File
Rename