Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/12/2009 05:03:05 AM (15 years ago)
Author:
sambauers
Message:

branches 0.9: Maintain registry of valid plugin page callbacks. See #1172.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9/bb-admin/admin-functions.php

    r2053 r2348  
    7777{
    7878    global $bb_menu;
     79    global $bb_registered_plugin_callbacks;
     80    if ( empty( $bb_registered_plugin_callbacks ) ) {
     81        $bb_registered_plugin_callbacks = array();
     82    }
     83
    7984    if ($display_name && $capability && $file_name) {
     85        if ( strpos( $file_name, '.php' ) === false ) {
     86            $bb_registered_plugin_callbacks[] = $file_name;
     87        }
    8088        $bb_menu[] = array($display_name, $capability, $file_name);
    8189    }
     
    8593{
    8694    global $bb_submenu;
     95    global $bb_registered_plugin_callbacks;
     96    if ( empty( $bb_registered_plugin_callbacks ) ) {
     97        $bb_registered_plugin_callbacks = array();
     98    }
     99
    87100    if ($display_name && $capability && $file_name) {
     101        if ( strpos( $file_name, '.php' ) === false ) {
     102            $bb_registered_plugin_callbacks[] = $file_name;
     103        }
    88104        $bb_submenu[$parent][] = array($display_name, $capability, $file_name);
    89105    }
Note: See TracChangeset for help on using the changeset viewer.