| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /* |
|---|
| 4 | Plugin Name: 12492 Example Plugin |
|---|
| 5 | Plugin URI: https://core.trac.wordpress.org/ticket/12492 |
|---|
| 6 | Description: This plugin shows the variable variable bug in remove_all_filters |
|---|
| 7 | Author: Chris Jean |
|---|
| 8 | Version: 1.0.0 |
|---|
| 9 | Author URI: http://gaarai.com/ |
|---|
| 10 | */ |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | add_action( 'template_redirect', 'show_bug' ); |
|---|
| 14 | add_action( 'template_redirect', 'show_bug', 20 ); |
|---|
| 15 | add_action( 'template_redirect', 'show_bug', 30 ); |
|---|
| 16 | |
|---|
| 17 | // Remove only the action(s) on the default priority |
|---|
| 18 | remove_all_actions( 'template_redirect', 10 ); |
|---|
| 19 | |
|---|
| 20 | function show_bug() { |
|---|
| 21 | echo "<h1>This should render twice.</h1>\n"; |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | ?> |
|---|