@@ -40,7 +40,12 @@ var wordpress = module.exports = {
4040 function ( ) {
4141 var group = this . group ( ) ;
4242 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+ }
4449 } ) ;
4550 } ,
4651 function ( ) {
@@ -54,8 +59,9 @@ var wordpress = module.exports = {
5459 localDate = date . getFullYear ( ) + "-" + ( date . getMonth ( ) + 1 ) + "-" + date . getDate ( ) + " " + date . getHours ( ) + ":" + date . getMinutes ( ) + ":" + date . getSeconds ( ) ,
5560 gmtDate = date . getUTCFullYear ( ) + "-" + ( date . getUTCMonth ( ) + 1 ) + "-" + date . getUTCDate ( ) + " " + date . getUTCHours ( ) + ":" + date . getUTCMinutes ( ) + ":" + date . getUTCSeconds ( ) ;
5661 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" ] ,
5965 this
6066 ) ;
6167 } ,
0 commit comments