diff --git a/classes/WhatDidTheySayAdmin.php b/classes/WhatDidTheySayAdmin.php index a7880b8..66c8c50 100644 --- a/classes/WhatDidTheySayAdmin.php +++ b/classes/WhatDidTheySayAdmin.php @@ -158,23 +158,6 @@ class WhatDidTheySayAdmin { return $updated; } - function handle_update_options($requested_options) { - $updated_options = array( - 'only_allowed_users' => false - ); - - foreach ($requested_options as $option => $value) { - switch ($option) { - case 'only_allowed_users': - $updated_options['only_allowed_users'] = true; - break; - } - } - - $options = array_merge(get_option('what-did-they-say-options'), $updated_options); - update_option('what-did-they-say-options', $options); - } - function read_language_file() { if (file_exists($this->language_file)) { foreach (file($this->language_file, FILE_IGNORE_NEW_LINES) as $language) { diff --git a/test/WhatDidTheySayAdminTest.php b/test/WhatDidTheySayAdminTest.php index a7ffa5d..108b3ed 100644 --- a/test/WhatDidTheySayAdminTest.php +++ b/test/WhatDidTheySayAdminTest.php @@ -59,19 +59,6 @@ class WhatDidTheySayAdminTest extends PHPUnit_Framework_TestCase { $this->assertEquals($expected_results, $options['languages']); } - function testHandleUpdateOptions() { - $admin = new WhatDidTheySayAdmin(); - - update_option('what-did-they-say-options', array('only_allowed_users' => false)); - - $admin->handle_update_options(array( - 'only_allowed_users' => 'yes' - )); - - $options = get_option('what-did-they-say-options'); - $this->assertTrue($options['only_allowed_users']); - } - function testBuildFullDefaultLanguageInfo() { $admin = new WhatDidTheySayAdmin(); $admin->all_languages = array(