2008-02-10 12:57:07 +00:00
|
|
|
<?php
|
2008-02-15 20:50:01 +00:00
|
|
|
require('./../../../wp-config.php'); //run config to connect to database
|
2008-02-10 12:57:07 +00:00
|
|
|
|
|
|
|
$order = explode(",", $_GET['order']); //cut up the coma delimited page IDs into array
|
|
|
|
$position = 1;
|
|
|
|
foreach ($order as $pageid):
|
|
|
|
$postquery = "UPDATE $wpdb->posts SET menu_order='$position' WHERE ID='$pageid'"; //setup db query
|
|
|
|
$wpdb->query($postquery); //update pages in db
|
|
|
|
$position += 1; //increment position var
|
|
|
|
endforeach;
|
|
|
|
|
2008-02-19 23:10:59 +00:00
|
|
|
update_option("exclude_pages", $_GET['exclude'], '', 'yes');
|
2008-02-10 12:57:07 +00:00
|
|
|
|
|
|
|
echo "pagemashed";
|
|
|
|
?>
|