Skip to content

Instantly share code, notes, and snippets.

@tangrufus
Last active August 29, 2015 14:13
Show Gist options
  • Save tangrufus/655a4f2ce4718fbd4f0b to your computer and use it in GitHub Desktop.
Save tangrufus/655a4f2ce4718fbd4f0b to your computer and use it in GitHub Desktop.
<?php
// Skipping lots of array elements above.....
$settings['your_tab_slug']['user_email'] = array(
'name' => __( 'Your Email', $this->plugin_name ),
'type' => 'email'
);
$settings['your_tab_slug']['user_plan'] = array(
'name' => __( 'Select a plan', $this->plugin_name ),
'options' => array(
'gold' => __( 'Gold - I am champion!', $this->plugin_name ),
'silver' => __( 'Silver - I love speech', $this->plugin_name ),
'bronze' => __( "Bronze - Let's have a try", $this->plugin_name )
),
'type' => 'select'
);
return self::apply_tab_slug_filters( $settings );
<?php
$user_email = Plugin_Option::get_option( 'user_email' );
$user_plan = Plugin_Option::get_option( 'user_plan' );
git clone https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate.git
git clone https://github.com/wphuman/WordPress-Settings-Module.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment