From d5062e797a141890885b71b87f16ec1c871544de Mon Sep 17 00:00:00 2001
From: jmash
Date: Fri, 15 Feb 2008 19:57:57 +0000
Subject: [PATCH] >0.1.2 release
git-svn-id: https://plugins.svn.wordpress.org/pagemash/trunk@31950 b8457f37-d9ea-0310-8a92-e5e31aec5664
---
README.txt | 8 +++++++-
pagemash.php | 37 ++++++++++++++++++++-----------------
2 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/README.txt b/README.txt
index e3e4be7..21bf766 100644
--- a/README.txt
+++ b/README.txt
@@ -3,7 +3,7 @@ Contributors: JoelStarnes
Tags: order pages, ajax, re-order, drag-and-drop, admin,
Requires at least: 2.0
Tested up to: 2.4-bleeding
-Stable tag: 0.1.1
+Stable tag: 0.1.2
Organise your page order with this simple drag-and-drop Ajax interface.
@@ -22,6 +22,7 @@ If you want to see an example of the admin page check out: http://joelstarnes.co
In most cases the plugin should work straight out the box, since most templates will include something similar to: `wp_list_pages('depth=1&title_li=);`
+
However to achieve full functionality including the 'exclude pages' feature you should replace the wp_list_pages() function with the following php code:
`if(function_exists('pageMash_exclude_pages'))`
@@ -35,6 +36,7 @@ usually either the header.php or sidebar.php file found in: `wp-content\themes\t
== Frequently Asked Questions ==
If you have any questions or comments,
+
please drop me an email: joel@joelstarnes.co.uk
== Screenshots ==
@@ -52,8 +54,12 @@ The plugin will currently only handle top level pages.
==Change Log==
0.1.0 > Initial Release
+
0.1.1 > Removed version check [line72] since some hosts will not allow external includes.
+0.1.2 > Fixed CSS&JS headers to only display on pageMash admin
+
+
==Road Map==
For the next majour release I hope to support children pages and allow these to be sorted and moved between different parents in a nested list fashion.
\ No newline at end of file
diff --git a/pagemash.php b/pagemash.php
index 035bbee..d8704bf 100644
--- a/pagemash.php
+++ b/pagemash.php
@@ -61,9 +61,8 @@ function pageMash_main(){
$pageposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_parent = '0' ORDER BY menu_order");
}
- //get pages-to-hide from database
- $excludePagesObj = $wpdb->get_results("SELECT option_value FROM $wpdb->options WHERE option_name = 'exclude_pages'");
- $excludePagesList = '>, '.$excludePagesObj[0]->option_value;
+ //get pages-to-hide from option function
+ $excludePagesList = '>, '.get_option('exclude_pages');
//precede with '>, ' otherwise the first pageid will return 0 when strpos() is called to find it.
//the initial coma allows us to search for ', $pageid,' so as to avoid partial matches
?>
@@ -73,14 +72,14 @@ function pageMash_main(){
version [0.1.1]
pageMash - pageManagement
- You can use this to organise and manage your pages.
+ You can use this to organise and manage your pages.
- ID.',')){echo 'class="remove"';}//if page is in exclude list, add class remove ?>>
=$page->post_title;?>
- [edit]
+ [edit]
@@ -105,7 +104,7 @@ function pageMash_main(){
Note: This plugin only orders top level pages
To use this plugin you need to use the wp_list_pages() function with the parameters as shown below:
-
+
<?php if(function_exists('pageMash_exclude_pages')){$exclude_pages=pageMash_exclude_pages();} else{$exclude_pages='';}?>
<?php wp_list_pages('depth=1&title_li=&exclude='.$exclude_pages);?>
@@ -114,7 +113,10 @@ function pageMash_main(){
'.$_GET["page"], 'pagemash')){ // only include header stuff on pagemash admin page
//stylesheet & javascript to go in page header
global $instantUpdateFeature, $excludePagesFeature;
?>
@@ -126,15 +128,15 @@ function pageMash_head(){
ul#pageMash_pages li.remove a { color:grey; }
ul#pageMash_pages li.remove img { opacity:0.2; }
- code {display:block; border:solid 3px #858EF4; background-color:#211E1E; padding:7px; margin=10px;}
- code .white{color:#DADADA;}
- code .purple{color:#9B2E4D; font-weight:bold;}
- code .green{color:#00FF00;}
- code .blue{color:#858EF4;}
- code .yellow{color:#C1C144;}
- code .orange{color:#EC9E00;}
+ #pageMash_code {display:block; border:solid 3px #858EF4; background-color:#211E1E; padding:7px; margin=10px;}
+ #pageMash_code .white{color:#DADADA;}
+ #pageMash_code .purple{color:#9B2E4D; font-weight:bold;}
+ #pageMash_code .green{color:#00FF00;}
+ #pageMash_code .blue{color:#858EF4;}
+ #pageMash_code .yellow{color:#C1C144;}
+ #pageMash_code .orange{color:#EC9E00;}
-
+