WP Tavern › Forums › Create Topic
Stephen R In my JavaScript Pull-Quotes plugin I have a folder of CSS files within the plugin directory. The admin page allows the user to select a style from a drop-down list. I’ve also integrated some error checking — for example, if that folder goes missing it falls back to a copy of the “default” stylesheet kept in a different part of the plugin file. Finally, if there is a file names “pullquote.css” in the theme directory, that overrides any other setting. Thus: a few options for the point-&-click set, and the ability to completely customize (via theme directory) for the power users. Down the road I may also simply allow the user to specify a styles directory so they can keep the folder that populates the drop-down in a completely different location.
Stephen R
In my JavaScript Pull-Quotes plugin I have a folder of CSS files within the plugin directory. The admin page allows the user to select a style from a drop-down list.
I’ve also integrated some error checking — for example, if that folder goes missing it falls back to a copy of the “default” stylesheet kept in a different part of the plugin file.
Finally, if there is a file names “pullquote.css” in the theme directory, that overrides any other setting. Thus: a few options for the point-&-click set, and the ability to completely customize (via theme directory) for the power users. Down the road I may also simply allow the user to specify a styles directory so they can keep the folder that populates the drop-down in a completely different location.
Name *
Email *
Website:
Topic Title (Maximum Length: 80):
Forum: — No forum —AI and WordPress Articles Blocks Showcase Discussions Events Introductions Jobs and Working in WordPress Podcast Episodes Site and Block Editor
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address
Submit
Enter the destination URL
Or link to existing content