
如何在FileZilla中显示隐藏文件
wp_theme_has_theme_json ( No parameters )
wp_theme_has_theme_json: 这是一个WordPress的函数,用来检查活动主题是否有一个theme.json文件。这个文件用于定义主题的各种设置和配置,例如块样式和块支持。
function wp_theme_has_theme_json() { static $theme_has_support = null; if ( null !== $theme_has_support && /* * Ignore static cache when `WP_DEBUG` is enabled. Why? To avoid interfering with * the theme developer's workflow. * * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core. */ ! WP_DEBUG && /* * Ignore cache when automated test suites are running. Why? To ensure * the static cache is reset between each test. */ ! ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) ) { return $theme_has_support; } // Does the theme have its own theme.json? $theme_has_support = is_readable( get_stylesheet_directory() . '/theme.json' ); // Look up the parent if the child does not have a theme.json. if ( ! $theme_has_support ) { $theme_has_support = is_readable( get_template_directory() . '/theme.json' ); } return $theme_has_support; }