CMS Tree Page View - Version 1.2.34

Version Description

  • Fix assignement by reference standards violation. Thanks johnny-bit for the fix. Fixes http://eskapism.se/wordpress/cms-tree-page-view/comment-page-4/#comment-99867 and https://wordpress.org/support/topic/strict-standards-only-variables-should-be-assigned-by-reference-1 and possible more.
  • Remove donate-box from dashboard, because it was highly annoying and looked terrible there.
Download this release

Release Info

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

Code changes from version 1.2.33 to 1.2.34

Files changed (3) hide show
  1. functions.php +8 -2
  2. index.php +2 -2
  3. readme.txt +9 -1
functions.php CHANGED
@@ -438,6 +438,12 @@ function cms_tpv_promo_above_wrapper() {
438
  $show_box = get_option('cms_tpv_show_promo', 1);
439
  }
440
 
 
 
 
 
 
 
441
  if ( ! $show_box ) {
442
  return;
443
  }
@@ -1927,7 +1933,7 @@ function cms_tpv_add_caps_to_role( $role, $caps ) {
1927
  global $wp_roles;
1928
 
1929
  if ( $wp_roles->is_role( $role ) ) {
1930
- $role =& get_role( $role );
1931
  foreach ( $caps as $cap )
1932
  $role->add_cap( $cap );
1933
  }
@@ -1941,7 +1947,7 @@ function cms_tpv_remove_caps_from_role( $role, $caps ) {
1941
  global $wp_roles;
1942
 
1943
  if ( $wp_roles->is_role( $role ) ) {
1944
- $role =& get_role( $role );
1945
  foreach ( $caps as $cap )
1946
  $role->remove_cap( $cap );
1947
  }
438
  $show_box = get_option('cms_tpv_show_promo', 1);
439
  }
440
 
441
+ // Never show on dashboard, becuase highly annoying
442
+ $current_screen = get_current_screen();
443
+ if ( $current_screen->id === "dashboard" ) {
444
+ $show_box = false;
445
+ }
446
+
447
  if ( ! $show_box ) {
448
  return;
449
  }
1933
  global $wp_roles;
1934
 
1935
  if ( $wp_roles->is_role( $role ) ) {
1936
+ $role = get_role( $role );
1937
  foreach ( $caps as $cap )
1938
  $role->add_cap( $cap );
1939
  }
1947
  global $wp_roles;
1948
 
1949
  if ( $wp_roles->is_role( $role ) ) {
1950
+ $role = get_role( $role );
1951
  foreach ( $caps as $cap )
1952
  $role->remove_cap( $cap );
1953
  }
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.33
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.33");
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.34
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.34");
31
  define( "CMS_TPV_NAME", "CMS Tree Page View");
32
 
33
  require(dirname(__FILE__) . "/functions.php");
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: page, pages, posts, custom posts, tree, cms, dashboard, overview, drag-and
5
  Text Domain: cms-tree-page-view
6
  Requires at least: 3.8
7
  Tested up to: 4.2
8
- Stable tag: 1.2.33
9
 
10
  Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages.
11
 
@@ -116,6 +116,14 @@ Now the tree with the pages will be visible both on the dashboard and in the men
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
 
119
  = 1.2.33 =
120
 
121
  - Fix conflicts with Formidable Forms. Fixes https://wordpress.org/support/topic/conflicts-with-formidable-forms. Thanks https://github.com/alexciarlillo for the pull request.
5
  Text Domain: cms-tree-page-view
6
  Requires at least: 3.8
7
  Tested up to: 4.2
8
+ Stable tag: 1.2.34
9
 
10
  Adds a tree view of all pages & custom posts. Get a great overview + options to drag & drop to reorder & option to add multiple pages.
11
 
116
 
117
  == Changelog ==
118
 
119
+ = 1.2.34 =
120
+
121
+ - Fix assignement by reference standards violation. Thanks [johnny-bit](https://github.com/johnny-bit) for the fix.
122
+ Fixes http://eskapism.se/wordpress/cms-tree-page-view/comment-page-4/#comment-99867 and
123
+ https://wordpress.org/support/topic/strict-standards-only-variables-should-be-assigned-by-reference-1
124
+ and possible more.
125
+ - Remove donate-box from dashboard, because it was highly annoying and looked terrible there.
126
+
127
  = 1.2.33 =
128
 
129
  - Fix conflicts with Formidable Forms. Fixes https://wordpress.org/support/topic/conflicts-with-formidable-forms. Thanks https://github.com/alexciarlillo for the pull request.