Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/23/2018 10:24:15 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Admin Notices: remove create_function() usage from tools feedback.

This change removes the last remaining deprecated function call for full PHP 7.2 support, while also making admin area notices a bit more flexible in the process.

Notices are now stored in an bbpress()->admin->notices array, and are output to the page via the bbp_admin_notices sub-action. This ensures that they'll only be made visible when bbPress is active, and keeps them contained to places where bbPress is already hooked in.

It was also previously possible for any user to dismiss the database upgrade notice, even if they were not capable of seeing it, so this is now fixed as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/replies.php

    r6697 r6771  
    7474
    7575        // Check if there are any bbp_toggle_reply_* requests on admin_init, also have a message displayed
    76         add_action( 'load-edit.php',  array( $this, 'toggle_reply'        ) );
    77         add_action( 'admin_notices', array( $this, 'toggle_reply_notice' ) );
     76        add_action( 'load-edit.php',     array( $this, 'toggle_reply'        ) );
     77        add_action( 'bbp_admin_notices', array( $this, 'toggle_reply_notice' ) );
    7878
    7979        // Add ability to filter topics and replies per forum
Note: See TracChangeset for help on using the changeset viewer.