\s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); } // more if (!function_exists('opencage_excerpt_more')) { add_filter( 'excerpt_more', 'opencage_excerpt_more' ); function opencage_excerpt_more($more) { global $post; return '...'; } } // is_mobile function is_mobile(){ $useragents = array( 'iPhone', 'iPod', 'Android.*Mobile', 'Windows.*Phone', 'dream', 'CUPCAKE', 'blackberry9500', 'blackberry9530', 'blackberry9520', 'blackberry9550', 'blackberry9800', 'webOS', 'incognito', 'webmate' ); $pattern = '/'.implode('|', $useragents).'/i'; return preg_match($pattern, $_SERVER['HTTP_USER_AGENT']); } // Custom Menu if (!function_exists('description_in_nav_menu')) { add_filter('walker_nav_menu_start_el', 'description_in_nav_menu', 10, 4); function description_in_nav_menu($item_output, $item){ if ( !empty( $item->description ) ) { $item_output = preg_replace('/([^<]*?)', '$1' . "{$item->description}<", $item_output); } return $item_output; } } // THEME SUPPORT require 'library/theme-update-checker.php'; $example_update_checker = new ThemeUpdateChecker( 'jstork', 'http://open-cage.com/theme-update/stork/update-info.json' ); // add_theme_support add_theme_support( 'post-thumbnails' ); add_theme_support( 'custom-background', array( 'default-color' => 'f7f7f7', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ) ); add_theme_support('automatic-feed-links'); add_theme_support( 'menus' ); register_nav_menus( array( 'main-nav' => 'グローバルナビ' , 'main-nav-sp' => 'グローバルナビ(スマートフォン)' , 'footer-links' => 'フッターナビ', ) ); add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form' ) );