-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
64 lines (50 loc) · 2.03 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
<?php
if ( !function_exists( 'optionsframework_init' ) ) {
/*-----------------------------------------------------------------------------------*/
/* Options Framework Theme
/*-----------------------------------------------------------------------------------*/
/* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */
if ( STYLESHEETPATH == TEMPLATEPATH ) {
define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/admin/admin/');
define('OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/admin/admin/');
} else {
define('OPTIONS_FRAMEWORK_URL', get_stylesheet_directory() . '/admin/admin/');
define('OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('stylesheet_directory') . '/admin/admin/');
}
require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
}
function init() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
wp_enqueue_script( 'jquery' );
}
add_action('init','init');
function in_my_foot(){
?>
<script>
window.jQuery || document.write('<script src="<?php echo get_template_directory_uri(); ?>/js/libs/jquery-1.6.2.min.js"><\/script>')
</script>
<?php
}
add_action('wp_footer', 'in_my_foot');
// load the custom stylesheet
if ( !is_admin() ) {
wp_register_style('style', get_bloginfo( 'stylesheet_directory' ) . '/css/site.css',false,0.1);
wp_enqueue_style( 'style' );
}
//Load dynamic options stylesheet
function of_options_output_css() { ?>
<style type="text/css">
/* <![CDATA[ */
<?php $of_css_options_output = dirname( __FILE__ ) . '/style-output.php'; if( is_file( $of_css_options_output ) ) require $of_css_options_output; ?>
/* ]]> */
</style>
<?php }
add_action('wp_head', 'of_options_output_css');
/*
* Turns off the default options panel from Twenty Eleven
*/
add_action('after_setup_theme','remove_twentyeleven_options', 100);
function remove_twentyeleven_options() {
remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
}