回答編集履歴
2
参照URLを追加
answer
CHANGED
@@ -43,4 +43,7 @@
|
|
43
43
|
```
|
44
44
|
|
45
45
|
|
46
|
-
詳しくは、
|
46
|
+
詳しくは、下記URLを参照。
|
47
|
+
|
48
|
+
* [https://wpdocs.osdn.jp/関数リファレンス/WP_Rewrite](https://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Rewrite)
|
49
|
+
* [https://wpdocs.osdn.jp/プラグイン_API/フィルターフック一覧](https://wpdocs.osdn.jp/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3_API/%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%BC%E3%83%95%E3%83%83%E3%82%AF%E4%B8%80%E8%A6%A7)
|
1
誤記の修正
answer
CHANGED
@@ -24,9 +24,9 @@
|
|
24
24
|
|
25
25
|
function add_rewrite_date_link_tt150218($rules){
|
26
26
|
$newrules = array();
|
27
|
-
$newrules['news/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$'] = 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]'
|
27
|
+
$newrules['news/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$'] = 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]';
|
28
|
-
$newrules['news/([0-9]{4})/([0-9]{1,2})/?$'] = 'index.php?year=$matches[1]&monthnum=$matches[2]'
|
28
|
+
$newrules['news/([0-9]{4})/([0-9]{1,2})/?$'] = 'index.php?year=$matches[1]&monthnum=$matches[2]';
|
29
|
-
$newrules['news/([0-9]{4})/?$'] = 'index.php?year=$matches[1]'
|
29
|
+
$newrules['news/([0-9]{4})/?$'] = 'index.php?year=$matches[1]';
|
30
30
|
return $newrules + $rules;
|
31
31
|
}
|
32
32
|
add_filter('rewrite_rules_array', 'add_rewrite_date_link_tt150218');
|