A document viewer plugin for wordpress that handles jpg, png, gif, pdf, doc, xls and ppt files, using google document viewer.
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"]
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);
At the root of the plugin run:
npm install
After the dependencies have downloaded, run:
gulp