@@ -40,7 +40,12 @@ var wordpress = module.exports = {
40
40
function ( ) {
41
41
var group = this . group ( ) ;
42
42
pages . forEach ( function ( page , index ) {
43
- wordpress . createPage ( page , group ( ) )
43
+ // Only allow pages that are in the order.yaml sitemap
44
+ if ( ~ page . menu_order ) {
45
+ wordpress . createPage ( page , group ( ) )
46
+ } else {
47
+ group ( ) ( null ) ;
48
+ }
44
49
} ) ;
45
50
} ,
46
51
function ( ) {
@@ -54,8 +59,9 @@ var wordpress = module.exports = {
54
59
localDate = date . getFullYear ( ) + "-" + ( date . getMonth ( ) + 1 ) + "-" + date . getDate ( ) + " " + date . getHours ( ) + ":" + date . getMinutes ( ) + ":" + date . getSeconds ( ) ,
55
60
gmtDate = date . getUTCFullYear ( ) + "-" + ( date . getUTCMonth ( ) + 1 ) + "-" + date . getUTCDate ( ) + " " + date . getUTCHours ( ) + ":" + date . getUTCMinutes ( ) + ":" + date . getUTCSeconds ( ) ;
56
61
db . query (
57
- "INSERT INTO `" + postsTable + "` " + "SET `post_type` = 'page', `post_author` = ?, `post_name` = ?, `post_title` = ?, `post_content` = ?, " + "`post_date` = ?, `post_date_gmt` = ?, `post_modified` = ?, `post_modified_gmt` = ?, `comment_status` = ?, `ping_status` = ?" ,
58
- [ 1 , page . slug , page . title , page . contents , localDate , gmtDate , localDate , gmtDate , "closed" , "closed" ] ,
62
+ "INSERT INTO `" + postsTable + "` " + "SET `post_type` = 'page', `post_author` = ?, `post_name` = ?, `post_title` = ?, `post_content` = ?, `menu_order` = ?, "
63
+ + "`post_date` = ?, `post_date_gmt` = ?, `post_modified` = ?, `post_modified_gmt` = ?, `comment_status` = ?, `ping_status` = ?" ,
64
+ [ 1 , page . slug , page . title , page . contents , page . menu_order , localDate , gmtDate , localDate , gmtDate , "closed" , "closed" ] ,
59
65
this
60
66
) ;
61
67
} ,
0 commit comments