| 1 | Index: plugin.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- plugin.php (revision 10674) |
|---|
| 4 | +++ plugin.php (working copy) |
|---|
| 5 | @@ -645,6 +645,8 @@ |
|---|
| 6 | function _wp_filter_build_unique_id($tag, $function, $priority) { |
|---|
| 7 | global $wp_filter; |
|---|
| 8 | |
|---|
| 9 | + static $filter_id_count = 0; |
|---|
| 10 | + |
|---|
| 11 | // If function then just skip all of the tests and not overwrite the following. |
|---|
| 12 | if ( is_string($function) ) |
|---|
| 13 | return $function; |
|---|
| 14 | @@ -654,10 +656,8 @@ |
|---|
| 15 | if ( !isset($function[0]->wp_filter_id) ) { |
|---|
| 16 | if ( false === $priority ) |
|---|
| 17 | return false; |
|---|
| 18 | - $count = isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : 0; |
|---|
| 19 | - $function[0]->wp_filter_id = $count; |
|---|
| 20 | + $function[0]->wp_filter_id = $filter_id_count++; |
|---|
| 21 | $obj_idx .= $count; |
|---|
| 22 | - unset($count); |
|---|
| 23 | } else |
|---|
| 24 | $obj_idx .= $function[0]->wp_filter_id; |
|---|
| 25 | return $obj_idx; |
|---|