119 | //カスタムヘッダー |
119 | //カスタムヘッダー |
120 | add_custom_image_header('','admin_header_style'); |
120 | $args = array( |
121 | function admin_header_style(){} |
121 | 'width' => 986, |
122 | |
122 | 'height' => 150, |
123 | //標準のヘッダー画像 |
123 | 'default-image' => get_template_directory_uri() . '/images/stinger2.png', |
124 | define('HEADER_IMAGE','%s/images/stinger2.png'); |
124 | ); |
| |
125 | add_theme_support( 'custom-header', $args ); |
| |
126 | |
| |
127 | //RSS |
| |
128 | add_theme_support('automatic-feed-links'); |
| |
129 | //エディタスタイル |
| |
130 | add_theme_support('editor-style'); |
| |
131 | add_editor_style('editor-style.css'); |
| |
132 | function custom_editor_settings( $initArray ){ |
| |
133 | $initArray['body_class'] = 'editor-area'; |
| |
134 | return $initArray; |
| |
135 | } |
| |
136 | add_filter( 'tiny_mce_before_init', 'custom_editor_settings' ); |
125 | |
137 | |
126 | //ヘッダー画像の横幅と高さ |
| |
127 | define('HEADER_IMAGE_WIDTH','986px'); |
| |
128 | define('HEADER_IMAGE_HEIGHT','150px'); |
| |
129 | |
138 | |
| | | |
139 | //カスタム背景 |
148 | //カスタム背景 |
140 | add_custom_background(); |
149 | add_theme_support( 'custom-background' ); |
141 | add_theme_support( 'custom-background', array()); |
| |
142 | |
150 | |
| | | |
192 | |
200 | |
| |
201 | |
| |
202 | |
193 | //管理画面では内蔵のjQueryサイト側ではGoogle AJAX Libraries API |
203 | //管理画面では内蔵のjQueryサイト側ではGoogle AJAX Libraries API |
194 | |
204 | |
195 | if ( !is_admin() ) { |
205 | function register_user_script() { |
196 | wp_deregister_script('jquery'); |
206 | if (!is_admin()) { |
197 | wp_enqueue_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); |
207 | $script_directory = get_template_directory_uri(); |
| |
208 | wp_deregister_script('jquery'); |
| |
209 | wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'); |
| |
210 | |
| |
211 | wp_enqueue_script('MyTheme_InitScript',$script_directory.'/init.js',array('jquery')); |
| |
212 | } |
198 | } |
213 | } |
199 | |
214 | |
| |
215 | add_action('init','register_user_script'); |
| |
216 | |
| |
217 | |
| |
218 | |
200 | //ヘッダーを綺麗に |
219 | //ヘッダーを綺麗に |
| | | |
219 | function no_self_ping( &$links ) { |
238 | function no_self_ping( &$links ) { |
220 | $home = get_option( 'home' ); |
239 | $home = home_url(); |
221 | foreach ( $links as $l => $link ) |
240 | foreach ( $links as $l => $link ) |
| | | |
254 | |
273 | |
| |
274 | if ( ! isset( $content_width ) ) $content_width = 546; |
255 | |
275 | |
| | | |
| |
| |