Changeset 1582595
- Timestamp:
- 01/26/2017 01:08:06 PM (8 years ago)
- Location:
- simple-google-docs-viewer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
simple-google-docs-viewer/trunk/readme.txt
r689731 r1582595 1 1 === Simple Google Docs Viewer === 2 2 Contributors: maor, illuminea 3 Tags: google-docs, embed-pdf, documents 3 Tags: google-docs, embed-pdf, documents 4 4 Requires at least: 3.0 5 Tested up to: 3.56 Stable tag: 1. 05 Tested up to: 6 Stable tag: 1. 7 7 License: GPLv2 or later 8 8 9 Enables you to easily embed documents with Google Docs Viewer - that are supported by Google Docs (PDF/DOC/DOCX/PPTX/etc). 10 9 Easily embed documents like PDFs, Word documents, and Powerpoint in your site using Google Docs Viewer. 11 10 == Description == 12 11 13 Enables you to easily embed documents with Google Docs Viewer - that are supported by Google Docs (PDF/DOC/DOCX/PPTX/etc) with a simple shortcode. `[gviewer]` 12 Easily embed documents supported by Google Docs (PDF/DOC/DOCX/PPTX/etc)with a simple shortcode `[gviewer]` 13 14 Ex. [gviewer file=”https://example.com/thisismyfile.pdf”] 14 15 15 16 A full list of attributes: 16 17 17 18 * `file` -- __Required__. The URL of the file you wish to show 18 * `width` -- Optional. The desired width of the viewer in pixels. If no thing set, the value of the theme's `$content_width` will be used. If no value set, the height of 600 pixels will be used.19 * `height` -- Optional. The desired height of the viewer in pixels. If nothing set, the height will 1.2 times the width. So for instance, if the width was 100px, the height will be 120px.20 * `language` -- The language of the document. If the document is written in a RTL language (Hebrew, Arabic, etc) then specifying the language will also apply right-to-leftsettings.19 * `width` -- Optional. The desired width of the viewer in pixels. If no. 20 * `height` -- Optional. The desired height of the viewer in pixels. If px. 21 * `language` -- The language of the document. If the document is written in a settings. 21 22 22 A yet another way to embed a Google Document is possible by using the template tag provided by the plugin. Here's an example.23 A 23 24 24 25 ` 25 26 <?php 26 27 27 echo simple_gviewer_embed( 'http ://.../file.pdf', $args );28 echo simple_gviewer_embed( 'http://.../file.pdf', $args ); 28 29 ` 29 30 … … 40 41 == Screenshots == 41 42 42 1. What the shortcode translates to on the front-end43 2. A sample use of the "gviewer" shortcode 43 1. 44 2. A sample use of the "gviewer" shortcode 44 45 45 46 == Changelog == 46 47 48 49 50 51 52 53 47 54 = 1.0 = 48 55 49 56 * Initial release 57 -
simple-google-docs-viewer/trunk/simple-google-docs-viewer.php
r689522 r1582595 2 2 /* 3 3 Plugin Name: Simple Google Docs Viewer 4 Plugin URI: http://www.illuminea.com/ plugins4 Plugin URI: http://www.illuminea.com/ 5 5 Description: Enables you to easily embed documents with Google Docs Viewer - that are supported by Google Docs (PDF/DOC/DOCX/PPTX/etc). 6 6 Author: illuminea … … 71 71 72 72 if ( '' != ( $file = apply_filters( 'simple_gviewer_file_url', $file ) ) ) { 73 $embed_format = '<iframe src="http ://docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s" width="%3$d" height="%4$d" style="border: none;"></iframe>';73 $embed_format = '<iframe src="http;"></iframe>'; 74 74 75 75 return sprintf( $embed_format,
Note: See TracChangeset
for help on using the changeset viewer.