-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
54 lines (40 loc) · 1.68 KB
/
functions.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
<?php
/**
* Discoverer functions.
*
* @package Discoverer
*/
define( 'DISCOVERER_VERSION', '1.0.0' );
if ( false === isset( $content_width ) ) {
$content_width = 650;
}
/** Include additional files. */
$template_path = get_template_directory();
require_once( "$template_path/inc/class.opengraph.php" );
require_once( "$template_path/inc/discover-opengraph.php" );
require_once( "$template_path/inc/jetpack.php" );
require_once( "$template_path/inc/template-tags.php" );
function discoverer_lato_fonts_url() {
return '//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=latin,latin-ext';
}
function discoverer_setup_theme() {
/** Add editor style so the back-end looks like the front. */
add_editor_style( array( 'assets/css/editor-style.css', discoverer_lato_fonts_url() ) );
/** Load the appropriate languages folder. */
load_theme_textdomain( 'discoverer', get_template_directory() . '/languages' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );
/** Render out the HTML5 versions. */
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/** Add the post formats which are relevant to Discoverer. */
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'link' ) );
set_post_thumbnail_size( '300', '169', true );
}
add_action( 'after_setup_theme', 'discoverer_setup_theme' );
function discoverer_enqueue_scripts() {
wp_enqueue_style( 'discoverer-lato', discoverer_lato_fonts_url() );
wp_enqueue_style( 'discoverer-css', get_stylesheet_uri(), array( 'discoverer-lato' ), DISCOVERER_VERSION );
}
add_action( 'wp_enqueue_scripts', 'discoverer_enqueue_scripts' );