Support » Plugin: Dashboard: Pending Review » Fix for "Notice: Undefined index: dashboard_pending_review…"

  • The plugin is old and obviously not updated any more but I still use it on some sites and just want to share this fix:

    If WP_DEBUG in wp-config.php is set to true and you load the admin dashboard, this plugin causes an error like:
    Notice: Undefined index: dashboard_pending_review in /some/path/wp-admin/includes/dashboard.php on line 130

    Here is a quick fix for that:

    In file dashboard-pending-review.php locate this:

    function register_widget() {
    	wp_register_sidebar_widget( 'dashboard_pending_review', __( 'Posts Pending Review', 'dashboard-pending-review' ), array(&$this, 'widget') );
    }

    Replace with this:

    function register_widget() {
    	wp_add_dashboard_widget( 'dashboard_pending_review', __( 'Posts Pending Review', 'dashboard-pending-review' ), array(&$this, 'widget') );
    }

    http://wordpress.org/extend/plugins/dashboard-pending-review/

  • The topic ‘Fix for "Notice: Undefined index: dashboard_pending_review…"’ is closed to new replies.