I am wanting to build a plugin to accompany my theme that will let the end user select what color scheme they want their site to use.
I thought the best way to do this would be in a plugin where they could select from select/options like below:
Code: Select all
$html .= '<div>';
$html .= '<select name="colorScheme">';
$html .= '<option value="default.css">Red</option>';
$html .= '<option value="light.css">Light</option>';
$html .= '<option value="dark.css">Dark</option>';
$html .= '</select>';
$html .= '</div>';
return $html;
}
public function siteHead()
{
global $L;
global $color;
// HTML for head
$html = '<link rel="stylesheet" type="text/css" href=".'$this->getValue("colorScheme").'" />'
return $html;
}
}
So, I want to know if someone has a similar plugin whith numerous options that the user can select that I can take a look at ... or can someone spot what I am doing wrong in my code?