Version Description
- remove some code that did not belong...
- does not show auto-draft-posts in wp3
Download this release
Release Info
Developer | eskapism |
Plugin | CMS Tree Page View |
Version | 0.4.7 |
Comparing to | |
See all releases |
Code changes from version 0.4.6 to 0.4.7
- functions.php +1 -42
- index.php +1 -1
- readme.txt +4 -0
functions.php
CHANGED
@@ -203,7 +203,7 @@ function cms_tpv_get_pages($args = null) {
|
|
203 |
$whereView = " AND ( post_status NOT IN ('pending', 'private', 'future', 'draft') ) ";
|
204 |
}
|
205 |
|
206 |
-
$where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status <> '%s'", "page", "trash");
|
207 |
$query = "SELECT * FROM $wpdb->posts WHERE ($where_post_type) $where $whereView";
|
208 |
$query .= " ORDER BY menu_order ASC, post_title ASC" ;
|
209 |
#echo $query;
|
@@ -521,45 +521,4 @@ function bonny_d($var) {
|
|
521 |
echo "</pre>";
|
522 |
}
|
523 |
|
524 |
-
/**
|
525 |
-
* Shortcode for videos
|
526 |
-
* Usage: [video source="<youtube url>" w=<width, default 480> h=<height, default 385>]
|
527 |
-
* Example: [video source="http://www.youtube.com/watch?v=QMGVWCPRNLI&feature=related" w=650]
|
528 |
-
*/
|
529 |
-
function shortcode_pb_video($options) {
|
530 |
-
|
531 |
-
$defaults = array(
|
532 |
-
"source" => "",
|
533 |
-
"w" => 480,
|
534 |
-
"h" => 385
|
535 |
-
);
|
536 |
-
$options = polarbear_extend($defaults, $options);
|
537 |
-
$source = $options["source"];
|
538 |
-
|
539 |
-
// if opnly one option and no source, that first one is probably the source...
|
540 |
-
if (!$source && isset($options[0])) {
|
541 |
-
$source = $options[0];
|
542 |
-
}
|
543 |
-
|
544 |
-
$return = "";
|
545 |
-
|
546 |
-
/*
|
547 |
-
Array
|
548 |
-
(
|
549 |
-
[source] => http://www.youtube.com/watch?v=UiIxRxG39KY&feature=related
|
550 |
-
)
|
551 |
-
*/
|
552 |
-
// check for youtube
|
553 |
-
if (strpos($source, "youtube.com/") !== false) {
|
554 |
-
preg_match("/v=([a-zA-Z0-9_]+)/", $source, $matches);
|
555 |
-
if (isset($matches[1])) {
|
556 |
-
$youtube_videoID = $matches[1];
|
557 |
-
#$return .= "<br>youtube_videoID: $youtube_videoID";
|
558 |
-
$return .= "<object width='{$options["w"]}' height='{$options["h"]}'><param name='movie' value='http://www.youtube.com/v/{$youtube_videoID}'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{$youtube_videoID}' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='{$options["w"]}' height='{$options["h"]}'></embed></object>";
|
559 |
-
}
|
560 |
-
}
|
561 |
-
|
562 |
-
return $return;
|
563 |
-
}
|
564 |
-
|
565 |
?>
|
203 |
$whereView = " AND ( post_status NOT IN ('pending', 'private', 'future', 'draft') ) ";
|
204 |
}
|
205 |
|
206 |
+
$where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status <> '%s' AND post_status <> '%s' ", "page", "trash", "auto-draft");
|
207 |
$query = "SELECT * FROM $wpdb->posts WHERE ($where_post_type) $where $whereView";
|
208 |
$query .= " ORDER BY menu_order ASC, post_title ASC" ;
|
209 |
#echo $query;
|
521 |
echo "</pre>";
|
522 |
}
|
523 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
?>
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMS Tree Page View
|
4 |
Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
|
5 |
Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. By using the tree you can edit, view, add pages and even search pages (useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
|
6 |
-
Version: 0.4.
|
7 |
Author: Pär Thernström
|
8 |
Author URI: http://eskapism.se/
|
9 |
License: GPL2
|
3 |
Plugin Name: CMS Tree Page View
|
4 |
Plugin URI: http://eskapism.se/code-playground/cms-tree-page-view/
|
5 |
Description: Adds a CMS-like tree view of all your pages, like the view often found in a page-focused CMS. By using the tree you can edit, view, add pages and even search pages (useful if you have many pages). And with drag and drop you can rearrange the order of your pages. Page management won't get any easier than this!
|
6 |
+
Version: 0.4.7
|
7 |
Author: Pär Thernström
|
8 |
Author URI: http://eskapism.se/
|
9 |
License: GPL2
|
readme.txt
CHANGED
@@ -44,6 +44,10 @@ Now the tree with the pages will be visible both on the dashboard and in the men
|
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
|
|
47 |
= 0.4.6 =
|
48 |
- could get database error because post_content had no default value
|
49 |
- removed usage of console.log and one alert. ouch!
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 0.4.7 =
|
48 |
+
- remove some code that did not belong...
|
49 |
+
- does not show auto-draft-posts in wp3
|
50 |
+
|
51 |
= 0.4.6 =
|
52 |
- could get database error because post_content had no default value
|
53 |
- removed usage of console.log and one alert. ouch!
|