Support » Plugin: WordPress Page Tree » [Plugin: WordPress Page Tree] Fix for WP 3.3.2

  • I had this plugin installed on an old blog and recently updated both WordPress and the plugin.
    After that the admin page under Pages disappeared. I looked into the code and here is what you have to change in order to make it work again:

    On line 108 from wppagetree.php replace

    add_submenu_page('edit-pages.php', __("WordPress Page Tree", "page-tree"), __("Page tree", "page-tree"), 7, __FILE__, 'pagetree_options');


    add_submenu_page('edit.php?post_type=page', __("WordPress Page Tree", "page-tree"), __("Page tree", "page-tree"), 'edit_others_posts', __FILE__, 'pagetree_options');

    First is the “edit-pages.php” – now it is “edit.php?post_type=page”. Then the plugin is using user_level when these have been deprecated a LONG time ago… – substitute with “edit_others_posts” capability which corresponds to the “Editor” role and higher.

    Additionally you can comment/remove line 47:

    wp_enqueue_style( 'page-tree-css', plugins_url('page-tree.css', __FILE__), false, false, 'all' );

    Since this file actually doesn’t exists(not sure if the dev missed it or it’s supposed to be like that) – you’ll save yourself a 404 error from the admin section 🙂

  • The topic ‘[Plugin: WordPress Page Tree] Fix for WP 3.3.2’ is closed to new replies.