関数 get_month_link()
2015/01/14
関数 get_month_link()
定義ファイル :/blog/wp-includes/link-template.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function get_month_link($year, $month) { global $wp_rewrite; if ( !$year ) $year = gmdate('Y', current_time('timestamp')); if ( !$month ) $month = gmdate('m', current_time('timestamp')); $monthlink = $wp_rewrite->get_month_permastruct(); if ( !empty($monthlink) ) { $monthlink = str_replace('%year%', $year, $monthlink); $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); $monthlink = home_url( user_trailingslashit( $monthlink, 'month' ) ); } else { $monthlink = home_url( '?m=' . $year . zeroise( $month, 2 ) ); } return apply_filters( 'month_link', $monthlink, $year, $month ); } |