functions.php 511 B

123456789101112131415161718
  1. <?php
  2. // Minimum functions.php to pass unit tests.
  3. function default_widgets_init() {
  4. register_sidebar( array( 'id' => 'sidebar-1' ) );
  5. }
  6. add_action( 'widgets_init', 'default_widgets_init' );
  7. function default_after_setup_theme() {
  8. add_theme_support( 'post-thumbnails' );
  9. // Don't call it after wp_loaded has happened, for tests that manually re-run load actions.
  10. if( ! did_action( 'wp_loaded' ) ) {
  11. add_theme_support( 'title-tag' );
  12. }
  13. }
  14. add_action( 'after_setup_theme', 'default_after_setup_theme' );