This must be the smallest and simplest plugin (if one can name it that way) ever made for WordPress. What it does is the addition of a small piece of javascript code to the head of each web page, so that it can break out of foreign frames. Anyway, I just consider it as an example plugin for educational purposes.
This javascript code is not compatible with the live preview feature of the WordPress editor area. Some checks should be done, so that this code is not executed when editing posts or previewing drafts. The usage of the is_preview()
template function would be more appropriate, but, due to some issues, the checks are being made against the server variables. When these issues are resolved, the previously mentioned function will be used.
Very Important Notice
It has been brought to my attention that a plugin with the exact same name as this one has been released by a third party on the WordPress Plugin Repository. Be advised that that plugin has no relation to this one.
Installation
Just copy the break-out-of-frames.php
file in your /wp-content/plugins/
directory and activate through the administration panel.
License
This project is released under the terms of the GNU General Public License version 2 or later.
Downloads, Issue Tracking, Support
This project has been discontinued.
The latest public releases of the Break-Out-Of-Frames plugin are available at the Break-Out-Of-Frames development web site.
This plugin is not available on the WordPress Plugin Repository. A plugin with the same name that exists on the WordPress Plugin Repository is developed by a third party and is not related to this one.
This project is no longer supported. Submitting support requests, issue reports or feature requests is not possible at this time.
Changelog
* Fri Jan 26 2007 – v0.3
– The is_preview() WP function works ok now, so it is used in the plugin.
– Updated plugin homepage URL.
* Wed Oct 04 2006 – v0.2
– Plugin information update
* Thu Jan 5 2006 – v0.1
– Initial release
Development Status
This plugin has been discontinued.
Appendix I: Recommended best practice
The concept of preventing your web site from getting framed by adding javascript to the head section of the page is kind of obsolete nowadays.
Web applications can now send the X-Frame-Options HTTP header in the HTTP response and notify the web browsers about whether they should allow the resource to be served through a frame
, iframe
or object
HTML tag. For instance:
X-Frame-Options: SAMEORIGIN
Setting your web server or application server to include an HTTP header in the response as shown above is the recommended best practice.
Break-Out-Of-Frames WordPress Plugin by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved
Version 0.3 is out. WordPress 2.1 users please upgrade.
Thanks to Nicki for reporting a bug when the plugin was used in WP 2.1. When editing a static page, the “break-out-of-frames” code caused the page to escape from the preview in the WordPress editor.
This is now fixed.
You rock, thank you! :)
It works well but Chrome has an issue. Thank goodness not many people use Chrome.
i’m sure you’ve noticed that google has changed the way they present images now and this code no longer works. really really sucks!!! i hope someone finds a work-around!
@Mark: Thanks for letting me know. I hadn’t noticed it. I’ll see what can be done.
Any update on getting it work for new google image presentation?
Didn’t have the time to work on this plugin. I’ll check how can getting framed by Google Images be avoided.
Thanks for your feedback.