From 35940174ff4c817b1702553d02f602ff95e1b036 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 16 Aug 2009 14:17:20 -0400 Subject: [PATCH] working on documentation --- classes/WhatDidTheySayAdmin.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/classes/WhatDidTheySayAdmin.php b/classes/WhatDidTheySayAdmin.php index 3e3217d..c6f1658 100644 --- a/classes/WhatDidTheySayAdmin.php +++ b/classes/WhatDidTheySayAdmin.php @@ -29,6 +29,9 @@ class WhatDidTheySayAdmin { $this->language_file = dirname(__FILE__) . '/../data/lsr-language.txt'; } + /** + * Initialize the object. + */ function init() { $this->capabilities = array( 'submit_transcriptions' => __('Submit transcriptions to a post', 'what-did-they-say'), @@ -54,6 +57,9 @@ class WhatDidTheySayAdmin { $this->read_language_file(); } + /** + * user_has_cap filter. + */ function user_has_cap($capabilities, $requested_capabilities, $capability_name) { $options = get_option('what-did-they-say-options'); @@ -75,12 +81,9 @@ class WhatDidTheySayAdmin { return $capabilities; } - function _update_options($which, $value) { - $options = get_option('what-did-they-say-options'); - $options[$which] = $value; - update_option('what-did-they-say-options', $options); - } - + /** + * Show admin notices. + */ function admin_notices() { if (!empty($this->notices)) { echo '
'; @@ -89,6 +92,9 @@ class WhatDidTheySayAdmin { } } + /** + * Handle an update to options. + */ function handle_update($info) { foreach (get_class_methods($this) as $method) { if (strpos($method, "handle_update_") === 0) {