Created
August 8, 2014 09:39
-
-
Save katpadi/aee1bee918f98a157e49 to your computer and use it in GitHub Desktop.
Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TitanStuff { | |
function __construct( ) { | |
$this->init(); | |
} | |
function init() { | |
$this->titan = TitanFramework::getInstance( '_s' ); | |
$this->_sAdminPanel(); | |
$this->_sAdminOptions(); | |
} | |
function _sAdminPanel() { | |
$this->panel = $this->titan->createAdminPanel( array( | |
'name' => 'Theme Options', | |
'parent' => 'options-general.php', | |
) ); | |
} | |
function _sAdminOptions() { | |
$this->panel->createOption( array( | |
'name' => 'My Text Option', | |
'id' => 'my_text_option', | |
'type' => 'text', | |
'desc' => 'This is our option' | |
) ); | |
$this->panel->createOption( array( | |
'name' => 'My Select Option', | |
'id' => 'my_select_option', | |
'type' => 'select', | |
'options' => array( | |
'1' => 'Option one', | |
'2' => 'Option two', | |
'3' => 'Option three', | |
), | |
'desc' => 'This is a select drop down box', | |
'default' => '2', | |
) ); | |
$this->panel->createOption( array( | |
'type' => 'save' | |
) ); | |
} | |
} | |
new TitanStuff(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment