WP Manifestindependent plugin directory
manifest / media / wp-docviewer

docViewer

A document viewer plugin for wordpress that handles jpg, png, gif, pdf, doc, xls and ppt files, using google document viewer.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sorensenjg/wp-docviewer/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A document viewer plugin for wordpress that handles jpg, png, gif, pdf, doc, xls and ppt files, using google document viewer.


How to use shortcode:

The shortcode accepts two attributes:

  • url – provides the path to the file for display.
  • name – displays a title, otherwise defaults to the filename (optional).
[docViewer url="your_file_url" name="your_file_name"]

How to use function:

The plugin also exposes a function that accepts two attributes:

  • $url – provides the path to the file for display.
  • $name – displays a title, otherwise defaults to the filename (optional).
echo docViewer($url, $name);

How to build:

At the root of the plugin run:

npm install

After the dependencies have downloaded, run:

gulp