Version Description
'Download PDF' button added to options, but function is only available in Premium versions.
Download this release
Release Info
Developer | danlester |
Plugin | PDF Embedder |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.4
- core/core_pdf_embedder.php +12 -1
- css/pdfemb-embed-pdf.css +4 -0
- img/toolbarButton-download.png +0 -0
- pdf_embedder.php +14 -2
- readme.txt +14 -3
core/core_pdf_embedder.php
CHANGED
@@ -109,7 +109,7 @@ class core_pdf_embedder {
|
|
109 |
if (!in_array($toolbar_fixed, array('on', 'off'))) {
|
110 |
$toolbar_fixed = 'off';
|
111 |
}
|
112 |
-
|
113 |
$returnhtml = '<div class="pdfemb-viewer" data-pdf-url="'.esc_attr($this->modify_pdfurl($url)).'" style="'.esc_attr($extra_style).'" '
|
114 |
.'data-width="'.esc_attr($width).'" data-height="'.esc_attr($height).'" ';
|
115 |
|
@@ -268,14 +268,25 @@ class core_pdf_embedder {
|
|
268 |
<input type="radio" name='<?php echo $this->get_options_name(); ?>[pdfemb_toolbarfixed]' id='pdfemb_toolbarfixed_on' class='radio' value="on" <?php echo $options['pdfemb_toolbarfixed'] == 'on' ? 'checked' : ''; ?> />
|
269 |
<label for="pdfemb_toolbarfixed_on" class="radio">Toolbar always visible</label>
|
270 |
</span>
|
|
|
|
|
|
|
|
|
|
|
271 |
<br class="clear" />
|
272 |
<br class="clear" />
|
273 |
|
|
|
|
|
274 |
<p>You can override these defaults for specific embeds by modifying the shortcodes - see <a href="<?php echo $this->get_instructions_url(); ?>" target="_blank">instructions</a>.</p>
|
275 |
|
276 |
<?php
|
277 |
}
|
278 |
|
|
|
|
|
|
|
|
|
279 |
protected function get_instructions_url() {
|
280 |
return 'http://wp-pdf.com/free-instructions/?utm_source=PDF%20Settings%20Main&utm_medium=freemium&utm_campaign=Freemium';
|
281 |
}
|
109 |
if (!in_array($toolbar_fixed, array('on', 'off'))) {
|
110 |
$toolbar_fixed = 'off';
|
111 |
}
|
112 |
+
|
113 |
$returnhtml = '<div class="pdfemb-viewer" data-pdf-url="'.esc_attr($this->modify_pdfurl($url)).'" style="'.esc_attr($extra_style).'" '
|
114 |
.'data-width="'.esc_attr($width).'" data-height="'.esc_attr($height).'" ';
|
115 |
|
268 |
<input type="radio" name='<?php echo $this->get_options_name(); ?>[pdfemb_toolbarfixed]' id='pdfemb_toolbarfixed_on' class='radio' value="on" <?php echo $options['pdfemb_toolbarfixed'] == 'on' ? 'checked' : ''; ?> />
|
269 |
<label for="pdfemb_toolbarfixed_on" class="radio">Toolbar always visible</label>
|
270 |
</span>
|
271 |
+
|
272 |
+
<?php
|
273 |
+
$this->pdfemb_mainsection_extra();
|
274 |
+
?>
|
275 |
+
|
276 |
<br class="clear" />
|
277 |
<br class="clear" />
|
278 |
|
279 |
+
|
280 |
+
|
281 |
<p>You can override these defaults for specific embeds by modifying the shortcodes - see <a href="<?php echo $this->get_instructions_url(); ?>" target="_blank">instructions</a>.</p>
|
282 |
|
283 |
<?php
|
284 |
}
|
285 |
|
286 |
+
protected function pdfemb_mainsection_extra() {
|
287 |
+
// Override in Basic and Commercial
|
288 |
+
}
|
289 |
+
|
290 |
protected function get_instructions_url() {
|
291 |
return 'http://wp-pdf.com/free-instructions/?utm_source=PDF%20Settings%20Main&utm_medium=freemium&utm_campaign=Freemium';
|
292 |
}
|
css/pdfemb-embed-pdf.css
CHANGED
@@ -222,6 +222,10 @@ div.pdfemb-toolbar button.pdfemb-fs::before {
|
|
222 |
content: url('../img/toolbarButton-presentationMode.png');
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
225 |
div.pdfemb-toolbar button.pdfemb-btndisabled {
|
226 |
color: lightGray;
|
227 |
}
|
222 |
content: url('../img/toolbarButton-presentationMode.png');
|
223 |
}
|
224 |
|
225 |
+
div.pdfemb-toolbar button.pdfemb-download::before {
|
226 |
+
content: url('../img/toolbarButton-download.png');
|
227 |
+
}
|
228 |
+
|
229 |
div.pdfemb-toolbar button.pdfemb-btndisabled {
|
230 |
color: lightGray;
|
231 |
}
|
img/toolbarButton-download.png
ADDED
Binary file
|
pdf_embedder.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: PDF Embedder
|
5 |
* Plugin URI: http://wp-pdf.com/
|
6 |
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required.
|
7 |
-
* Version: 2.2.
|
8 |
* Author: Dan Lester
|
9 |
* Author URI: http://wp-pdf.com/
|
10 |
* License: GPL3
|
@@ -14,7 +14,7 @@ require_once( plugin_dir_path(__FILE__).'/core/core_pdf_embedder.php' );
|
|
14 |
|
15 |
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
16 |
|
17 |
-
protected $PLUGIN_VERSION = '2.2.
|
18 |
|
19 |
protected function useminified() {
|
20 |
/* using-minified */ return true;
|
@@ -53,6 +53,18 @@ class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
|
53 |
}
|
54 |
|
55 |
// ADMIN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
protected function pdfemb_mobilesection_text()
|
58 |
{
|
4 |
* Plugin Name: PDF Embedder
|
5 |
* Plugin URI: http://wp-pdf.com/
|
6 |
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required.
|
7 |
+
* Version: 2.2.4
|
8 |
* Author: Dan Lester
|
9 |
* Author URI: http://wp-pdf.com/
|
10 |
* License: GPL3
|
14 |
|
15 |
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
16 |
|
17 |
+
protected $PLUGIN_VERSION = '2.2.4';
|
18 |
|
19 |
protected function useminified() {
|
20 |
/* using-minified */ return true;
|
53 |
}
|
54 |
|
55 |
// ADMIN
|
56 |
+
|
57 |
+
protected function pdfemb_mainsection_extra() {
|
58 |
+
?>
|
59 |
+
<br class="clear" />
|
60 |
+
<br class="clear" />
|
61 |
+
|
62 |
+
<label for="pdfemb_download" class="textinput">Download Button</label>
|
63 |
+
<span>
|
64 |
+
<label for="pdfemb_download" class="checkbox plain">Check to provide PDF download button on toolbar - only available in premium versions</label>
|
65 |
+
</span>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
|
69 |
protected function pdfemb_mobilesection_text()
|
70 |
{
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: danlester
|
|
3 |
Tags: doc, docx, pdf, office, powerpoint, google, document, embed, intranet
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 2.2.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -15,9 +15,13 @@ Upload PDFs and embed them straight into your site - just like adding images! PD
|
|
15 |
|
16 |
The plugin has a unique method for embedding PDFs, using Javascript only, and _not_ using iframes or third-party services. This gives a lot of flexibility over the appearance of your document.
|
17 |
|
18 |
-
The viewer currently has Next/Prev buttons to page through the document, and zoom buttons.
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
|
22 |
= Usage =
|
23 |
|
@@ -103,6 +107,9 @@ A **secure premium** version is available that encrypts the PDF during transmiss
|
|
103 |
|
104 |
See our website [wp-pdf.com](http://wp-pdf.com/secure/?utm_source=PDF%20Readme%20FAQ%20Secure&utm_medium=freemium&utm_campaign=Freemium) for more details and purchase options.
|
105 |
|
|
|
|
|
|
|
106 |
|
107 |
== Installation ==
|
108 |
|
@@ -121,6 +128,10 @@ the Plugins section of your Wordpress admin
|
|
121 |
|
122 |
== Changelog ==
|
123 |
|
|
|
|
|
|
|
|
|
124 |
= 2.2.2 =
|
125 |
|
126 |
Redesigned toolbar buttons
|
3 |
Tags: doc, docx, pdf, office, powerpoint, google, document, embed, intranet
|
4 |
Requires at least: 3.3
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 2.2.4
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
15 |
|
16 |
The plugin has a unique method for embedding PDFs, using Javascript only, and _not_ using iframes or third-party services. This gives a lot of flexibility over the appearance of your document.
|
17 |
|
18 |
+
The viewer currently has Next/Prev buttons to page through the document, and zoom buttons.
|
19 |
|
20 |
+
PDFs are embedded within your existing WordPress pages so we have full control over appearance, and all Javascript and other files are served by your own server
|
21 |
+
(not by Google or any other third-party who may not be able to guarantee their own reliability).
|
22 |
+
Even if other plugins use similar technology, they will insert the PDF itself into an 'iframe' which means they do not get the flexibility over sizing.
|
23 |
+
|
24 |
+
There is no button for users to download the PDF in the free version of the plugin, but this is available in the Premium versions along with other extra features.
|
25 |
|
26 |
= Usage =
|
27 |
|
107 |
|
108 |
See our website [wp-pdf.com](http://wp-pdf.com/secure/?utm_source=PDF%20Readme%20FAQ%20Secure&utm_medium=freemium&utm_campaign=Freemium) for more details and purchase options.
|
109 |
|
110 |
+
= Can I add a Download button to the toolbar? =
|
111 |
+
|
112 |
+
This is possible only in the Premium version.
|
113 |
|
114 |
== Installation ==
|
115 |
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 2.2.4 =
|
132 |
+
|
133 |
+
'Download PDF' button added to options, but function is only available in Premium versions.
|
134 |
+
|
135 |
= 2.2.2 =
|
136 |
|
137 |
Redesigned toolbar buttons
|