Skip to:
Content

Ticket #7325: 7325-core-anonymous-functions.diff

File 7325-core-anonymous-functions.diff, 661 bytes (added by tw2113, 20 months ago)
  • src/bp-core/admin/bp-core-admin-tools.php

    diff --git src/bp-core/admin/bp-core-admin-tools.php src/bp-core/admin/bp-core-admin-tools.php
    index 6926c28..b929f69 100644
    function bp_admin_tools_feedback( $message, $class = false ) { 
    357357
    358358        $message = '<div id="message" class="' . esc_attr( $class ) . '">' . $message . '</div>';
    359359        $message = str_replace( "'", "\'", $message );
    360         $lambda  = create_function( '', "echo '$message';" );
     360        $lambda  = function() use ( $message ) { echo $message; };
    361361
    362362        add_action( bp_core_do_network_admin() ? 'network_admin_notices' : 'admin_notices', $lambda );
    363363