Changeset 174 for branches

Show
Ignore:
Timestamp:
11/19/08 17:56:31 (2 months ago)
Author:
pdingle
Message:

added functions, updated docs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/RB-0.91/wp-infocard/wp/admin.pw.php

    r170 r174  
    305305class pw_admin extends pwlib_admin 
    306306{ 
    307         // Function: getOption 
    308         // Description: Retrieves things set in wp_options 
    309         // Input: attribute name 
    310         // Output: attribute value 
    311         // Side effect: none 
     307        /** 
     308        * Retrieves an option value with a given name 
     309        * 
     310        * @param $option_name 
     311        *    Name of the option to retrieve, without the option prefix 
     312        * @return Option value 
     313        */ 
    312314        function getOption($attr_name) 
    313315        { 
  • branches/RB-0.91/wp-infocard/wp/utils.pw.php

    r170 r174  
    2929        } 
    3030 
    31         // Function:  screenPrint 
    32         // Description:  wrapper for localized print statement 
    33         // Input:  content to be printed 
    34         // Output:  content is printed to the screen 
    35         // Side-Effects:  none 
     31        /** 
     32        * 
     33        * Prints a localized string to the screen 
     34        * 
     35        * @param $content 
     36        *    Initial english string 
     37        */ 
    3638        function screenPrint( $content )  
    3739        { 
     
    3941        } 
    4042 
     43        /** 
     44        * 
     45        * Returns a localized string 
     46        *  
     47        * @param $content 
     48        *    Initial english string 
     49        * @return  
     50        *    Possibly localized string 
     51        */ 
     52        function message( $content ) 
     53        { 
     54                // wrapper for future localization 
     55                return __($content); 
     56        }//end function message 
     57 
     58        /** 
     59        * Prints debug statements in larger font   
     60        * 
     61        * @param $content 
     62        *    String to print if debug is turned on. 
     63        */ 
    4164        function printDebugHeader( $content ) 
    4265        { 
     
    4568        } // end function printDebugHeader 
    4669 
     70        /** 
     71        * Prints debug statements (at this time to the screen) 
     72        *  
     73        * @param $content  
     74        *    String to add to debug if and only if debugging is on. 
     75        */ 
    4776        function printDebug( $content, $level=0 ) 
    4877        { 
     
    72101        } // end function printTitle 
    73102 
    74         // Function:    getTitle 
    75         // Description: returns the site title 
    76         // Input:               none 
    77         // Output:              string representing the title 
    78         // Side Effects: none 
     103        /** 
     104        * Returns the site's title 
     105        *  
     106        * @return  
     107        *    String representing the title  
     108        */ 
    79109        function getTitle() 
    80110        { 
     
    109139        } // end function printLearnMoreLink 
    110140 
     141        /** 
     142        * Redirects to the Error URL if debug is off - if debug is on, the 
     143        *   link is shown but isn't invoked. 
     144        * 
     145        * @param $error_code 
     146        *    All-caps string which indexes to a localized define in 
     147        *    infocard-errormessages.php 
     148        * @param $error_details 
     149        *    Further theoretically dynamic details to pass on.  Not yet in use. 
     150        */ 
    111151        function errorPageRedirect( $error_code='', $error_details = '') 
    112152        { 
     
    353393                } 
    354394        }// end function matchLinkProtocol 
     395 
     396        /** 
     397        * Retrieves an option value with a given name 
     398        * 
     399        * @param $option_name 
     400        *    Name of the option to retrieve, without the option prefix 
     401        * @return Option value 
     402        */ 
     403        function getOption($attr_name) 
     404        { 
     405                return get_option($attr_name); 
     406        } //end function getOption 
    355407} // end class pw_utils 
    356408?>