C:\stinger20130825\functions.php C:\stinger20130827b\stinger20130827b\functions.php
119//カスタムヘッダー 119//カスタムヘッダー
120add_custom_image_header('','admin_header_style');   120$args = array( 
121function admin_header_style(){}  121    'width'         => 986, 
122  122    'height'        => 150, 
123//標準のヘッダー画像  123    'default-image' => get_template_directory_uri() . '/images/stinger2.png', 
124define('HEADER_IMAGE','%s/images/stinger2.png'); 124); 
  125add_theme_support( 'custom-header', $args ); 
  126 
  127//RSS 
  128add_theme_support('automatic-feed-links'); 
  129//エディタスタイル 
  130add_theme_support('editor-style');
  131add_editor_style('editor-style.css'); 
  132function custom_editor_settings( $initArray ){ 
  133    $initArray['body_class'] = 'editor-area'; 
  134    return $initArray; 
  135} 
  136add_filter( 'tiny_mce_before_init', 'custom_editor_settings' ); 
125  137 
126//ヘッダー画像の横幅と高さ  
127define('HEADER_IMAGE_WIDTH','986px');  
128define('HEADER_IMAGE_HEIGHT','150px');  
129  138 
139//カスタム背景 148//カスタム背景
140add_custom_background();   149add_theme_support( 'custom-background' );
141add_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 
195if ( !is_admin() ) { 205function register_user_script() { 
196wp_deregister_script('jquery'); 206    if (!is_admin()) {
197wp_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  
  215add_action('init','register_user_script');
  216 
  217 
  218 
200//ヘッダーを綺麗に 219//ヘッダーを綺麗に
219function no_self_ping( &$links ) { 238function 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 
  274if ( ! isset( $content_width ) ) $content_width = 546;
255  275