From 9ed8f2afcc21d2af0521886d8e96ac94bdb02053 Mon Sep 17 00:00:00 2001 From: jmash Date: Mon, 17 Mar 2008 17:40:40 +0000 Subject: [PATCH] compatability for csv to array git-svn-id: https://plugins.svn.wordpress.org/pagemash/trunk@35215 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pagemash.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pagemash.php b/pagemash.php index 2bed955..ab307d7 100644 --- a/pagemash.php +++ b/pagemash.php @@ -65,7 +65,7 @@ Garrett Murphey - Page Link Manager [http://gmurphey.com/2006/10/05/wordpress-pl function pageMash_getPages($post_parent){ //this is a recurrsive function which calls itself to produce a nested list of elements //$post_parent should be 0 for root pages, or contain a pageID to return it's sub-pages - global $wpdb, $wp_version, $excludePagesFeature; + global $wpdb, $wp_version, $excludePagesFeature, $excludePagesList; if($wp_version >= 2.1){ //get pages from database $pageposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = '$post_parent' ORDER BY menu_order"); }else{ @@ -78,7 +78,7 @@ function pageMash_getPages($post_parent){ echo '>'; foreach ($pageposts as $page): //list pages, [the 'li' ID must be the page ID] ?> -
  • ID, get_option('exclude_pages'))) echo 'class="remove"';//if page is in exclude list, add class remove ?>> +
  • ID, $excludePagesList)) echo 'class="remove"';//if page is in exclude list, add class remove ?>> post_title;?> id:ID;?> @@ -98,7 +98,10 @@ function pageMash_getPages($post_parent){ } function pageMash_main(){ - global $instantUpdateFeature, $excludePagesFeature; + global $instantUpdateFeature, $excludePagesFeature, $excludePagesList; + $excludePagesList = get_option('exclude_pages'); + if(!is_array($excludePagesList)) $excludePagesList=""; //compatability for people upgrading from CSV data + ?>