|
@@ 490-496 (lines=7) @@
|
| 487 |
|
if ( !$month ) |
| 488 |
|
$month = gmdate('m', current_time('timestamp')); |
| 489 |
|
$monthlink = $wp_rewrite->get_month_permastruct(); |
| 490 |
|
if ( !empty($monthlink) ) { |
| 491 |
|
$monthlink = str_replace('%year%', $year, $monthlink); |
| 492 |
|
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); |
| 493 |
|
$monthlink = home_url( user_trailingslashit( $monthlink, 'month' ) ); |
| 494 |
|
} else { |
| 495 |
|
$monthlink = home_url( '?m=' . $year . zeroise( $month, 2 ) ); |
| 496 |
|
} |
| 497 |
|
|
| 498 |
|
/** |
| 499 |
|
* Filters the month archive permalink. |
|
@@ 1034-1041 (lines=8) @@
|
| 1031 |
|
|
| 1032 |
|
$permastruct = $wp_rewrite->get_search_permastruct(); |
| 1033 |
|
|
| 1034 |
|
if ( empty( $permastruct ) ) { |
| 1035 |
|
$link = home_url('?s=' . urlencode($search) ); |
| 1036 |
|
} else { |
| 1037 |
|
$search = urlencode($search); |
| 1038 |
|
$search = str_replace('%2F', '/', $search); // %2F(/) is not valid within a URL, send it un-encoded. |
| 1039 |
|
$link = str_replace( '%search%', $search, $permastruct ); |
| 1040 |
|
$link = home_url( user_trailingslashit( $link, 'search' ) ); |
| 1041 |
|
} |
| 1042 |
|
|
| 1043 |
|
/** |
| 1044 |
|
* Filters the search permalink. |