https://github.com/soderlind/wp-live-preview-links
WordPress Plugin: See a live scaled preview of the site you are linking to prior to clicking on it.
https://github.com/soderlind/wp-live-preview-links
Last synced: 4 months ago
JSON representation
WordPress Plugin: See a live scaled preview of the site you are linking to prior to clicking on it.
- Host: GitHub
- URL: https://github.com/soderlind/wp-live-preview-links
- Owner: soderlind
- Created: 2013-12-27T12:15:16.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-09T17:20:54.000Z (about 11 years ago)
- Last Synced: 2025-08-16T06:58:32.443Z (6 months ago)
- Language: PHP
- Homepage: http://soderlind.no/wp-live-preview-links/
- Size: 477 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
WP Live Preview Links
=====================
WP Live Preview Links allows you to see a live scaled preview of the site you are linking to in a pop-up dialog style window prior to clicking on it.
WP Live Preview Links does not use an external service to create these "thumbnails".
In the admin panel you can select which links that will trigger the preview (`class="wp-live-preview"`, internal, external or all links). You can also adjust the preview window size and position.
Installation
-------------
You can download and install WP Live Preview Links using the built in WordPress plugin installer. If you download WP Live Preview Links manually, make sure it is uploaded to "/wp-content/plugins/wp-live-preview-links/".
Activate WP Live Preview Links in the "Plugins" admin panel using the "Activate" link.
Demo
-------
You'll find [a demo at my site](http://soderlind.no/wp-live-preview-links/#demo)
Frequently Asked Questions
--------------------------
###It doesn't work ?!###
1. WP Live Preview Links needs a modern browsers that support CSS3 3D Transform properties (Chrome, Firefox, Safari, IE10+)
1. Certain sites may have set their X-FRAME-OPTIONS header policy to SAMEORGIN or DENY. This is specifically to prevent other sites from iframing their site. If that is the case, this plugin will not work.
###Show me some cool jQuery Selectors
1. All links with class="myclass": `.myclass`
1. All links in the widget area: `.widget a`
1. All external links except wordpress.org and wordpress.com: `a:not([href^="http://wordpress.org"]):not([href^="http://wordpress.com"]):not([href^="#"]):not([href^="/"])`
Adding live preview to WordPress search
---------------------------------------
Activate the plugin and in plugin settings select Live Preview Links = class="wp-live-preview"
This is how I've done it [on my site](http://soderlind.no/?s=plugin) running TwentyTwelve.
In the (child) theme folder, in functions.php, add the following
```php
add_action( 'wp_enqueue_scripts', 'ps_live_preview_search_result', 11 );
function ps_live_preview_search_result () {
wp_enqueue_script( 'ps_live_preview_search_result_script', get_stylesheet_directory_uri() . '/ps_live_preview_search_result.js', array('wp-live-preview-links'), false, true );
}
```
Copy ps_live_preview_search_result.js to the (child) theme folder:
```javascript
(function($) {
$('.search-results .entry-title a').each(function(index){
$(this).addClass('wp-live-preview');
});
$(window).resize();
})(jQuery);
```
Changelog
---------
### 1.0.6.1 ###
* Fixed bad path to admin/RevealerCustomFieldType.php
### 1.0.6 ###
* Added the option to use a [jQuery Selector](http://www.w3schools.com/jquery/jquery_ref_selectors.asp) to tell Live Preview Links which links to use.
### 1.0.5 ###
* Upgraded [Admin Page Framework](http://wordpress.org/plugins/admin-page-framework/) to version 3.0.5
* Updated languages/wp-live-preview-links.po
### 1.0.4 ###
* Added mising file
###1.0.2###
* Minor fixes
###1.0.1###
* Fixed a small bug
###1.0###
* Initial release
Credits
-------
* WP Live Preview Links uses the [Jquery Live Link Preview Plugin](https://github.com/alanphoon/jquery-live-preview) by [Alan Phoon](http://www.ampedupdesigns.com/about)
* The admin panel is done using the excellent [Admin Page Framework](http://wordpress.org/plugins/admin-page-framework/) by [Michael Uno](http://michaeluno.jp/)