-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
41 lines (31 loc) · 895 Bytes
/
page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Display regular page
*
* @package Fdd
*/
get_header();
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part('template-parts/single/page');
}
}
get_footer();
if (false) {
// IMPORT TEST - REMOVE FROM PRODUCTION!
$cats = ['recipes', 'recipes', 'recipes', 'recipes', 'food-art'];
foreach (array('prep-in', 'prep-sec', 'vid', 'imgs', 'art1') as $test) {
$str = file_get_contents("test-$test.txt");
fdd_reg_shortcodes();
$str = do_shortcode($str);
print_r($str);
$post = array('post_content' => $str, 'post_type' => 'post', 'terms' => array(
array('domain' => 'category', 'slug' => array_shift($cats)),
));
$post = fdd_filter_wp_import_post_data_raw($post);
file_put_contents("test-$test.out", $post['post_content']);
echo "\nSuccess for $test!\n";
}
// IMPORT TEST - REMOVE FROM PRODUCTION!
}