working on documentation

This commit is contained in:
John Bintz 2009-08-16 14:17:20 -04:00
parent 1eb372c158
commit 35940174ff
1 changed files with 12 additions and 6 deletions

View File

@ -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 '<div class="updated fade">';
@ -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) {