From 2c1fe0b2efbf0b1ab6c3479b21c6a57b90cca01a Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Fri, 2 Nov 2012 12:59:13 -0400 Subject: [PATCH] Simplify even more --- lib/activation.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/activation.php b/lib/activation.php index 79e8ddb..b07265f 100644 --- a/lib/activation.php +++ b/lib/activation.php @@ -75,7 +75,7 @@ function roots_theme_activation_options_render_page() { ?> $roots_default_activation_options = roots_get_default_theme_activation_options(); ?> - + @@ -83,8 +83,8 @@ function roots_theme_activation_options_render_page() { ?>

@@ -96,8 +96,8 @@ function roots_theme_activation_options_render_page() { ?>

@@ -109,8 +109,8 @@ function roots_theme_activation_options_render_page() { ?>

@@ -122,8 +122,8 @@ function roots_theme_activation_options_render_page() { ?>

@@ -135,8 +135,8 @@ function roots_theme_activation_options_render_page() { ?>

@@ -156,17 +156,17 @@ function roots_theme_activation_options_validate($input) { $output = $defaults = roots_get_default_theme_activation_options(); $options = array( - 'first_run' => 1, - 'create_front_page' => 'yes', - 'change_permalink_structure' => 'yes', - 'change_uploads_folder' => 'yes', - 'create_navigation_menus' => 'yes', - 'add_pages_to_primary_navigation' => 'yes' + 'first_run', + 'create_front_page', + 'change_permalink_structure', + 'change_uploads_folder', + 'create_navigation_menus', + 'add_pages_to_primary_navigation' ); - foreach($options as $name => $value) { - if (isset($input[$name])) { - $input[$name] = ($input[$name] === $value) ? true : false; + foreach($options as $option_name) { + if (isset($input[$option_name])) { + $input[$option_name] = ($input[$option_name] === 'true') ? true : false; $output[$name] = $input[$name]; } }