You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've forked wp-polls and am working on a file-based templating system (in addition to the wp_option based system). You can check the current state of my version at: https://github.com/klassebe/wp-polls
Its current state is usable for my particular situation, but I will improve upon it. I'm also looking for other people's input or thoughts on a feature like this.
The main reason for doing this is to enable poll styling to be done within a theme's folder, instead of only via wp-admin. I've tried to take a backwards-compatible approach, so file-based templating can be easily integrated if that would ever be an option, without breaking lots of people's existing setups.
Also, I think the default templates are rather lacking. They have a lot of inline styles, and few classes to enable custom styling. So I find myself needing custom templates most of the time.
How it works:
A theme creator can create a 'wp-polls' folder in their theme folder, and populate it with template files. These are simple html files, named according to the option names that are used for the different templates by the plugin.
Upon activation, the plugin checks whether template files are present in a /wp-polls directory within the current theme's stylesheet directory (so that means child themes need to have their own templates)
For each individual template, if it is present in the theme's 'wp-polls' folder, the contents of the html file is saved as the value for that template's corresponding option.
When a theme creator adds or modifies files in the theme's 'wp-polls' folder, they need to update the option values for the templates via the plugin's template screen in wp-admin. Users can also reset the templates to their default version. Each template option now has two 'reset' buttons, one for the plugin's version of the template, and one for the theme's version. The second button is not visible if the needed file does not exist.
Proposed modifications/additions:
Provide a global templating option (toggle) to either use wp-polls' own templates, or the theme's templates
Better parent/child theme support
Move wp-polls' own templates to individual html files, which can be copied to a theme's folder by theme creators
The text was updated successfully, but these errors were encountered:
I've forked wp-polls and am working on a file-based templating system (in addition to the wp_option based system). You can check the current state of my version at: https://github.com/klassebe/wp-polls
Its current state is usable for my particular situation, but I will improve upon it. I'm also looking for other people's input or thoughts on a feature like this.
The main reason for doing this is to enable poll styling to be done within a theme's folder, instead of only via wp-admin. I've tried to take a backwards-compatible approach, so file-based templating can be easily integrated if that would ever be an option, without breaking lots of people's existing setups.
Also, I think the default templates are rather lacking. They have a lot of inline styles, and few classes to enable custom styling. So I find myself needing custom templates most of the time.
How it works:
Proposed modifications/additions:
The text was updated successfully, but these errors were encountered: