I am making readme.html file for a plugin with some detailed setup instruction that need to include screenshots.

As rest of UI I want it be consistent with WordPress style and so I looked at its own readme.html.

It includes stylesheet with relative path:

<link rel="stylesheet" href="https://wordpress.stackexchange.com/questions/12101/wp-admin/css/install.css?ver=20100228" type="text/css" />

So for a plugin file I might go with:

<link rel="stylesheet" href="https://wordpress.stackexchange.com/wp-admin/css/install.css" type="text/css" />

But it is good way to include styling? There are really many ways to do it:

  • link to install.css;
  • bundle copy of install.css with plugin;
  • bundle own CSS file with plugin;
  • embed style in readme.html.

I am not aware of any recommendation about providing HTML documentation with plugins.

Had you included HTML documentation with plugins (or themes, whatever)? What method had you chosen to style it and what was you reasoning for it?

3 Answers
3

It would be better to include your own CSS file that way you can:

  • Use a relative path to your CSS.
  • Avoid problems getting the path right to the wp-admin directory. Not all people put WordPress in the root directory, so your example above would break for them.
  • Possibly redundancy by reusing the CSS in your HTML & admin pages for your plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *