Wordpress/tests/phpunit/data/themedir1/default/functions.php
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00

19 lines
511 B
PHP

<?php
// Minimum functions.php to pass unit tests.
function default_widgets_init() {
register_sidebar( array( 'id' => 'sidebar-1' ) );
}
add_action( 'widgets_init', 'default_widgets_init' );
function default_after_setup_theme() {
add_theme_support( 'post-thumbnails' );
// Don't call it after wp_loaded has happened, for tests that manually re-run load actions.
if( ! did_action( 'wp_loaded' ) ) {
add_theme_support( 'title-tag' );
}
}
add_action( 'after_setup_theme', 'default_after_setup_theme' );