Show
Ignore:
Timestamp:
08/16/08 07:27:34 (3 months ago)
Author:
westi
Message:

More phpdoc updates for wp-adming. See #7496 props santosj.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/custom-header.php

    r8618 r8656  
    11<?php 
    2  
     2/** 
     3 * The custom header image script. 
     4 * 
     5 * @package WordPress 
     6 * @subpackage Administration 
     7 */ 
     8 
     9/** 
     10 * The custom header image class. 
     11 * 
     12 * @since unknown 
     13 * @package WordPress 
     14 * @subpackage Administration 
     15 */ 
    316class Custom_Image_Header { 
     17 
     18    /** 
     19     * Callback for administration header. 
     20     * 
     21     * @var callback 
     22     * @since unknown 
     23     * @access private 
     24     */ 
    425    var $admin_header_callback; 
    526 
     27    /** 
     28     * PHP4 Constructor - Register administration header callback. 
     29     * 
     30     * @since unknown 
     31     * @param callback $admin_header_callback 
     32     * @return Custom_Image_Header 
     33     */ 
    634    function Custom_Image_Header($admin_header_callback) { 
    735        $this->admin_header_callback = $admin_header_callback; 
    836    } 
    937 
     38    /** 
     39     * Setup the hooks for the Custom Header admin page. 
     40     * 
     41     * @since unknown 
     42     */ 
    1043    function init() { 
    1144        $page = add_theme_page(__('Custom Image Header'), __('Custom Image Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); 
     
    1750    } 
    1851 
     52    /** 
     53     * Get the current step. 
     54     * 
     55     * @since unknown 
     56     * 
     57     * @return int Current step 
     58     */ 
    1959    function step() { 
    20         $step = (int) @$_GET['step']; 
     60        if ( ! isset( $_GET['step'] ) ) 
     61            return 1; 
     62 
     63        $step = (int) $_GET['step']; 
    2164        if ( $step < 1 || 3 < $step ) 
    2265            $step = 1; 
     66 
    2367        return $step; 
    2468    } 
    2569 
     70    /** 
     71     * Setup the enqueue for the JavaScript files. 
     72     * 
     73     * @since unknown 
     74     */ 
    2675    function js_includes() { 
    2776        $step = $this->step(); 
     77 
    2878        if ( 1 == $step ) 
    2979            wp_enqueue_script('colorpicker'); 
     
    3282    } 
    3383 
     84    /** 
     85     * Execute custom header modification. 
     86     * 
     87     * @since unknown 
     88     */ 
    3489    function take_action() { 
    3590        if ( isset( $_POST['textcolor'] ) ) { 
     
    49104    } 
    50105 
     106    /** 
     107     * Execute Javascript depending on step. 
     108     * 
     109     * @since unknown 
     110     */ 
    51111    function js() { 
    52112        $step = $this->step(); 
     
    57117    } 
    58118 
     119    /** 
     120     * Display Javascript based on Step 1. 
     121     * 
     122     * @since unknown 
     123     */ 
    59124    function js_1() { ?> 
    60125<script type="text/javascript"> 
     
    130195    } 
    131196 
     197    /** 
     198     * Display Javascript based on Step 2. 
     199     * 
     200     * @since unknown 
     201     */ 
    132202    function js_2() { ?> 
    133203<script type="text/javascript"> 
     
    174244    } 
    175245 
     246    /** 
     247     * Display first step of custom header image page. 
     248     * 
     249     * @since unknown 
     250     */ 
    176251    function step_1() { 
    177252        if ( $_GET['updated'] ) { ?> 
     
    227302    } 
    228303 
     304    /** 
     305     * Display second step of custom header image page. 
     306     * 
     307     * @since unknown 
     308     */ 
    229309    function step_2() { 
    230310        check_admin_referer('custom-header'); 
     
    299379    } 
    300380 
     381    /** 
     382     * Display third step of custom header image page. 
     383     * 
     384     * @since unknown 
     385     */ 
    301386    function step_3() { 
    302387        check_admin_referer('custom-header'); 
     
    340425    } 
    341426 
     427    /** 
     428     * Display last step of custom header image page. 
     429     * 
     430     * @since unknown 
     431     */ 
    342432    function finished() { 
    343433        ?> 
     
    351441    } 
    352442 
     443    /** 
     444     * Display the page based on the current step. 
     445     * 
     446     * @since unknown 
     447     */ 
    353448    function admin_page() { 
    354449        $step = $this->step();