WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Page Tree
Fix for WP 3.3.2 (1 post)

  1. Nikola Nikolov
    Member
    Posted 2 years ago #

    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');

    with

    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 :)

    http://wordpress.org/extend/plugins/page-tree/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Nikola Nikolov
  • This topic is not a support question
  • WordPress version: 3.3.2

Tags

No tags yet.