CMS Tree Page View - Version 1.2.7

Version Description

  • Fix some notice errors/warning. Props damienwhaley. Fixes http://wordpress.org/support/topic/fix-for-three-non-fatal-errors.
Download this release

Release Info

Developer eskapism
Plugin Icon wp plugin CMS Tree Page View
Version 1.2.7
Comparing to
See all releases

Code changes from version 1.2.6 to 1.2.7

Files changed (3) hide show
  1. functions.php +24 -5
  2. index.php +2 -2
  3. readme.txt +4 -1
functions.php CHANGED
@@ -506,9 +506,9 @@ function cms_tpv_save_settings() {
506
  if (isset($_POST["cms_tpv_action"]) && $_POST["cms_tpv_action"] == "save_settings" && check_admin_referer('update-options')) {
507
 
508
  $options = array();
509
- $options["dashboard"] = (array) $_POST["post-type-dashboard"];
510
  $options["menu"] = isset( $_POST["post-type-menu"] ) ? (array) $_POST["post-type-menu"] : array();
511
- $options["postsoverview"] = (array) $_POST["post-type-postsoverview"];
512
 
513
  update_option('cms_tpv_options', $options); // enable this to show box
514
 
@@ -663,6 +663,7 @@ function cms_tpv_options() {
663
 
664
  <input type="hidden" name="action" value="update" />
665
  <input type="hidden" name="cms_tpv_action" value="save_settings" />
 
666
  <input type="hidden" name="page_options" value="<?php echo join($arr_page_options, ",") ?>" />
667
  <p class="submit">
668
  <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'cms-tree-page-view') ?>" />
@@ -680,11 +681,29 @@ function cms_tpv_options() {
680
  * @return array with options
681
  */
682
  function cms_tpv_get_options() {
 
683
  $arr_options = (array) get_option('cms_tpv_options');
684
- $arr_options["dashboard"] = (array) @$arr_options["dashboard"];
685
- $arr_options["menu"] = (array) @$arr_options["menu"];
686
- $arr_options["postsoverview"] = (array) @$arr_options["postsoverview"];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  return $arr_options;
 
688
  }
689
 
690
  function cms_tpv_get_selected_post_type() {
506
  if (isset($_POST["cms_tpv_action"]) && $_POST["cms_tpv_action"] == "save_settings" && check_admin_referer('update-options')) {
507
 
508
  $options = array();
509
+ $options["dashboard"] = isset( $_POST["post-type-dashboard"] ) ? (array) $_POST["post-type-dashboard"] : array();
510
  $options["menu"] = isset( $_POST["post-type-menu"] ) ? (array) $_POST["post-type-menu"] : array();
511
+ $options["postsoverview"] = isset( $_POST["post-type-postsoverview"] ) ? (array) $_POST["post-type-postsoverview"] : array();
512
 
513
  update_option('cms_tpv_options', $options); // enable this to show box
514
 
663
 
664
  <input type="hidden" name="action" value="update" />
665
  <input type="hidden" name="cms_tpv_action" value="save_settings" />
666
+ <?php // TODO: why is the line below needed? gives deprecated errors ?>
667
  <input type="hidden" name="page_options" value="<?php echo join($arr_page_options, ",") ?>" />
668
  <p class="submit">
669
  <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'cms-tree-page-view') ?>" />
681
  * @return array with options
682
  */
683
  function cms_tpv_get_options() {
684
+
685
  $arr_options = (array) get_option('cms_tpv_options');
686
+
687
+ if (array_key_exists('dashboard', $arr_options)) {
688
+ $arr_options['dashboard'] = (array) @$arr_options['dashboard'];
689
+ } else {
690
+ $arr_options['dashboard'] = array();
691
+ }
692
+
693
+ if (array_key_exists('menu', $arr_options)) {
694
+ $arr_options['menu'] = (array) @$arr_options['menu'];
695
+ } else {
696
+ $arr_options['menu'] = array();
697
+ }
698
+
699
+ if (array_key_exists('postsoverview', $arr_options)) {
700
+ $arr_options['postsoverview'] = (array) @$arr_options['postsoverview'];
701
+ } else {
702
+ $arr_options['postsoverview'] = array();
703
+ }
704
+
705
  return $arr_options;
706
+
707
  }
708
 
709
  function cms_tpv_get_selected_post_type() {
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. Use the tree view to edit, view, add pages and search pages (very 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: 1.2.6
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
@@ -27,7 +27,7 @@ License: GPL2
27
 
28
  #require("functions.php");
29
 
30
- define( "CMS_TPV_VERSION", "1.2.6");
31
  define( "CMS_TPV_NAME", "CMS Tree Page View");
32
 
33
  require(dirname(__FILE__)."/functions.php");
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. Use the tree view to edit, view, add pages and search pages (very 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: 1.2.7
7
  Author: Pär Thernström
8
  Author URI: http://eskapism.se/
9
  License: GPL2
27
 
28
  #require("functions.php");
29
 
30
+ define( "CMS_TPV_VERSION", "1.2.7");
31
  define( "CMS_TPV_NAME", "CMS Tree Page View");
32
 
33
  require(dirname(__FILE__)."/functions.php");
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://eskapism.se/sida/donate/
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.5.1
6
  Tested up to: 3.5.1
7
- Stable tag: 1.2.6
8
 
9
  Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages.
10
 
@@ -111,6 +111,9 @@ Now the tree with the pages will be visible both on the dashboard and in the men
111
 
112
  == Changelog ==
113
 
 
 
 
114
  = 1.2.6 =
115
  - Fixed loading CSS over HTTPS.
116
  Fixes http://wordpress.org/support/topic/update-noticonscss-reference-in-stylescss-for-https-sites-too.
4
  Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and-drop, rearrange, management, manage, admin
5
  Requires at least: 3.5.1
6
  Tested up to: 3.5.1
7
+ Stable tag: 1.2.7
8
 
9
  Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages.
10
 
111
 
112
  == Changelog ==
113
 
114
+ = 1.2.7 =
115
+ - Fix some notice errors/warning. Props damienwhaley. Fixes http://wordpress.org/support/topic/fix-for-three-non-fatal-errors.
116
+
117
  = 1.2.6 =
118
  - Fixed loading CSS over HTTPS.
119
  Fixes http://wordpress.org/support/topic/update-noticonscss-reference-in-stylescss-for-https-sites-too.