This repository has been archived by the owner on Dec 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paththeme-support.php
executable file
·75 lines (65 loc) · 1.94 KB
/
theme-support.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Register theme support for languages, menus, post-thumbnails, post-formats, etc.
*/
if ( ! function_exists( 'base_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function base_setup() {
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
// Add menu support
add_theme_support( 'menus' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
// add_theme_support( 'html5', array(
// 'search-form',
// 'comment-form',
// 'comment-list',
// 'gallery',
// 'caption',
// ) );
/*
* Enable support for Post Formats.
* See https://developer.wordpress.org/themes/functionality/post-formats/
*/
// add_theme_support( 'post-formats', array(
// 'aside',
// 'gallery',
// 'link',
// 'image',
// 'quote',
// 'status',
// 'video',
// 'audio',
// 'chat'
// ) );
// Set up the WordPress core custom background feature.
// add_theme_support( 'custom-background', apply_filters( 'base_custom_background_args', array(
// 'default-color' => 'ffffff',
// 'default-image' => '', // https://source.unsplash.com/category/nature/1600x900
// ) ) );
}
endif;
add_action( 'after_setup_theme', 'base_setup' );
?>