Ticket #12293: frame-breakout.php
File frame-breakout.php, 436 bytes (added by , 15 years ago) |
---|
Line | |
---|---|
1 | <?php |
2 | |
3 | function wp_frame_breakout() { |
4 | echo <<<EOF |
5 | <script type="text/javascript"> |
6 | if (window.top !== window.self) { |
7 | window.top.location.href = window.self.location.href; } |
8 | </script> |
9 | EOF; |
10 | } |
11 | |
12 | function wp_frame_breakout_disable() { |
13 | remove_action('admin_print_scripts', 'wp_frame_breakout'); |
14 | } |
15 | |
16 | add_action('admin_print_scripts', 'wp_frame_breakout'); |
17 | |
18 | add_action('media_upload-iframe', 'wp_frame_breakout_disable'); |
19 | |
20 | ?> |