-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfunctions.php
86 lines (60 loc) · 2.33 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
remove_action('wp_head', 'feed_links_extra', 3 );
remove_action('wp_head', 'feed_links', 2 );
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'parent_post_rel_link', 10, 0 );
remove_action('wp_head', 'start_post_rel_link', 10, 0 );
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0 );
remove_action('wp_head', 'wp_generator');
remove_action('wp_head','jetpack_og_tags');
if ( ! isset( $content_width ) ) $content_width = 600;
add_theme_support('automatic-feed-links');
add_filter('show_admin_bar', '__return_false');
function theme_styles() {
wp_register_style( 'normalize-style', get_template_directory_uri() . '/normalize.css', array(), '20130425', 'all' );
wp_register_style( 'main-style', get_template_directory_uri() . '/style.css', array(), '20130425', 'all' );
wp_enqueue_style( 'normalize-style' );
wp_enqueue_style( 'main-style' );
}
add_action('wp_enqueue_scripts', 'theme_styles');
// MENU OPTIONS
function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __( 'Header Menu' ),
'footer-menu' => __( 'Footer Menu' ))
);
}
add_action( 'init', 'register_my_menus' );
// FEATURE IMAGE SUPPORT
add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); //
// THEME OPTIONS
add_action('after_setup_theme','ttext_setup');
function ttext_setup() {
}
add_action ('admin_menu', 'ttext_admin');
function ttext_admin() {
add_theme_page( 'Customize', 'Customize', 'edit_theme_options', 'customize.php' );
}
add_action('customize_register', 'ttext_customize');
function ttext_customize ($wp_customize) {
$wp_customize->add_section( 'ttext_settings', array(
'title' => 'Justin Blog Theme Customizations',
'priority' => 5,
) );
$wp_customize->add_setting( 'back_setting', array( 'default' => 'Return to List' ) );
$wp_customize->add_control( 'back_setting', array(
'label' => 'Back Text',
'section' => 'ttext_settings',
'type' => 'text'
) );
$wp_customize->add_setting( 'ga_setting', array( 'default' => 'UA-36474980-1' ) );
$wp_customize->add_control( 'ga_setting', array(
'label' => 'Google Analytics ID',
'section' => 'ttext_settings',
'type' => 'text'
) );
return $wp_customize;
}