回答編集履歴

1

コード修正

2020/06/22 03:01

投稿

KazuhiroHatano
KazuhiroHatano

スコア7804

test CHANGED
@@ -10,9 +10,9 @@
10
10
 
11
11
 
12
12
 
13
- function get_template_parts_in_dir($dir='functions') {
13
+ function get_template_parts_in_dir($path='functions') {
14
14
 
15
- $dir = scandir(get_stylesheet_directory().'/'.$dir);
15
+ $dir = scandir(get_stylesheet_directory().'/'.$path);
16
16
 
17
17
 
18
18
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  $fileName = basename($fileName, ".php");
24
24
 
25
- get_template_part($dir.'/'. $fileName);
25
+ get_template_part($path.'/'. $fileName);
26
26
 
27
27
  }
28
28