Last active
November 30, 2015 16:12
-
-
Save ekandreas/48012bd71caa8c3830f3 to your computer and use it in GitHub Desktop.
Options General Type for theme with Papi
This file contains hidden or 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 | |
/** | |
* Options General Type for theme with Papi | |
* Andreas Ek, 2015-11-30 | |
*/ | |
class Options_General_Type extends Papi_Option_Type | |
{ | |
/** | |
* Where to register the option page to show | |
* @return [] | |
*/ | |
public function meta() | |
{ | |
return [ | |
'menu' => 'options-general.php', | |
'name' => __('Orasolv','orasolv'), | |
]; | |
} | |
/** | |
* Registers meta boxes to papi page type | |
* @return void | |
*/ | |
public function register() | |
{ | |
$this->box('Access', [ | |
papi_property([ | |
'slug' => 'domains', | |
'title' => __('Tillåtna e-post-domäner','orasolv'), | |
'description' => __('Funktion för skapa konto via e-post. Lägg inte med @ i domännamnet.','orasolv'), | |
'type' => 'repeater', | |
'settings' => [ | |
'items' => [ | |
[ | |
'slug' => 'domain', | |
'type' => 'string', | |
] | |
] | |
] | |
]), | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment