name = $name;
$this->options = $options;
if ( isset( $_POST['save-vamtam-config'] ) )
$this->save_config();
$this->render();
}
/**
* Save the current page config
*/
private function save_config() {
vamtam_save_config( $this->options );
global $vamtam_config_messages;
$vamtam_config_messages .= '
Updated Successfully
';
}
/**
* Single options row template
* @param string $template template name
* @param array $value options row config
*/
protected function tpl( $template, $value ) {
extract( $value );
if ( ! isset( $desc ) )
$desc = '';
if ( ! isset( $default ) )
$default = null;
if ( ! isset( $class ) )
$class = '';
include VAMTAM_ADMIN_HELPERS . "config_generator/$template.php";
}
/**
* Renders the option page
*/
private function render() {
echo '
';
echo '
'; // #theme-config
if ( ! isset( $this->options[0]['no-save-button'] ) ) {
$this->tpl( 'save', array() );
}
echo '';
echo '';
}
/**
* Auto fill