| 629 | | foreach ($templates as $template) { |
|---|
| 630 | | $template_data = implode('', file(ABSPATH . $template)); |
|---|
| 631 | | preg_match("|Template Name:(.*)|i", $template_data, $name); |
|---|
| 632 | | preg_match("|Description:(.*)|i", $template_data, $description); |
|---|
| 633 | | |
|---|
| 634 | | $name = $name[1]; |
|---|
| 635 | | $description = $description[1]; |
|---|
| 636 | | |
|---|
| 637 | | if (! empty($name)) { |
|---|
| 638 | | $page_templates[trim($name)] = basename($template); |
|---|
| | 629 | if( is_array( $templates ) ) { |
|---|
| | 630 | foreach ($templates as $template) { |
|---|
| | 631 | $template_data = implode('', file(ABSPATH . $template)); |
|---|
| | 632 | preg_match("|Template Name:(.*)|i", $template_data, $name); |
|---|
| | 633 | preg_match("|Description:(.*)|i", $template_data, $description); |
|---|
| | 634 | |
|---|
| | 635 | $name = $name[1]; |
|---|
| | 636 | $description = $description[1]; |
|---|
| | 637 | |
|---|
| | 638 | if (! empty($name)) { |
|---|
| | 639 | $page_templates[trim($name)] = basename($template); |
|---|
| | 640 | } |
|---|