/
functions.php
executable file
·58 lines (51 loc) · 1.41 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
<?php
/**
* @package Manga_Press_Templates
* @subpackage Functions
* @version $Id$
* @author Jess Green <jgreen@psy-dreamer.com>
*/
/**
* Load theme language domain
*/
function mangapress_theme_load_theme_textdomain() {
load_theme_textdomain('mp-twentyeleven', get_stylesheet_directory() . '/languages');
}
add_action( 'after_setup_theme', 'mangapress_theme_load_theme_textdomain' );
add_action('admin_init', '_disable_options_init');
/**
* Run the action that disables the insert_nav option.
*
* @access private
* @return void
*/
function _disable_options_init() {
add_action('mangapress_option_fields', '_disable_options');
}
/**
* Remove the insert_nav option from the options array.
*
* @access private
* @param array $options
* @return array
*/
function _disable_options($options)
{
// we're specifically looking for navigation...
if (isset($options['nav']['insert_nav'])) {
unset($options['nav']['insert_nav']);
}
return $options;
}
add_action('wp_enqueue_scripts', 'mangapress_theme_load_twentyeleven_css');
/**
* Load the stylesheet from the TwentyEleven Theme
*
* @return void
*/
function mangapress_theme_load_twentyeleven_css()
{
$src = get_template_directory_uri() . '/style.css';
wp_register_style('twentyeleven', $src, null, MP_VERSION);
wp_enqueue_style('twentyeleven');
}