Skip to content

Instantly share code, notes, and snippets.

@ekandreas
Last active November 30, 2015 16:12
Show Gist options
  • Save ekandreas/48012bd71caa8c3830f3 to your computer and use it in GitHub Desktop.
Save ekandreas/48012bd71caa8c3830f3 to your computer and use it in GitHub Desktop.
Options General Type for theme with Papi
<?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