Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 959 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 959 Bytes

wp-docViewer

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