Make WordPress Core

Changeset 8656


Ignore:
Timestamp:
08/16/2008 07:27:34 AM (16 years ago)
Author:
westi
Message:

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

Location:
trunk/wp-admin
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • 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();
  • trunk/wp-admin/edit-attachment-rows.php

    r8484 r8656  
    1 <?php if ( ! defined('ABSPATH') ) die(); ?>
     1<?php
     2/**
     3 * Edit attachments table for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9if ( ! defined('ABSPATH') ) die();
     10?>
    211<table class="widefat">
    312    <thead>
  • trunk/wp-admin/edit-category-form.php

    r8112 r8656  
    11<?php
     2/**
     3 * Edit category form for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
    29if ( ! empty($cat_ID) ) {
     10    /**
     11     * @var string
     12     */
    313    $heading = __('Edit Category');
    414    $submit_text = __('Edit Category');
  • trunk/wp-admin/edit-comments.php

    r8459 r8656  
    11<?php
     2/**
     3 * Edit Comments Administration Panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/edit-form-advanced.php

    r8635 r8656  
    11<?php
    2 
     2/**
     3 * Post advanced form for inclusion in the administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/**
     10 * Post ID global
     11 * @name $post_ID
     12 * @var int
     13 */
    314if ( ! isset( $post_ID ) )
    415    $post_ID = 0;
  • trunk/wp-admin/edit-form-comment.php

    r7883 r8656  
    11<?php
     2/**
     3 * Edit comment form for inclusion in another file.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/**
     10 * @var string
     11 */
    212$submitbutton_text = __('Edit Comment');
    313$toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID);
  • trunk/wp-admin/edit-link-categories.php

    r8600 r8656  
    11<?php
     2/**
     3 * Edit Link Categories Administration Panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/edit-link-category-form.php

    r7896 r8656  
    11<?php
     2/**
     3 * Edit link category form for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
    29if ( ! empty($cat_ID) ) {
     10    /**
     11     * @var string
     12     */
    313    $heading = __('Edit Category');
    414    $submit_text = __('Edit Category');
  • trunk/wp-admin/edit-link-form.php

    r8600 r8656  
    11<?php
     2/**
     3 * Edit links form for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
    29if ( ! empty($link_id) ) {
     10    /**
     11     * @var string
     12     */
    313    $heading = __('Edit Link');
    414    $submit_text = __('Save Changes');
  • trunk/wp-admin/edit-page-form.php

    r8635 r8656  
    11<?php
    2 
     2/**
     3 * Edit page form for inclusion in the administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/**
     10 * Post ID global
     11 * @name $post_ID
     12 * @var int
     13 */
    314if ( ! isset( $post_ID ) )
    415    $post_ID = 0;
  • trunk/wp-admin/edit-pages.php

    r8589 r8656  
    11<?php
     2/**
     3 * Edit Pages Administration Panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/edit-post-rows.php

    r8484 r8656  
    1 <?php if ( ! defined('ABSPATH') ) die(); ?>
     1<?php
     2/**
     3 * Edit posts rows table for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9if ( ! defined('ABSPATH') ) die();
     10?>
    211<table class="widefat">
    312    <thead>
  • trunk/wp-admin/edit-tag-form.php

    r7896 r8656  
    11<?php
     2/**
     3 * Edit tag form for inclusion in administration panels.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
    29if ( ! empty($tag_ID) ) {
     10    /**
     11     * @var string
     12     */
    313    $heading = __('Edit Tag');
    414    $submit_text = __('Edit Tag');
  • trunk/wp-admin/edit-tags.php

    r7883 r8656  
    11<?php
     2/**
     3 * Edit Tags Administration Panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/edit.php

    r8646 r8656  
    11<?php
     2/**
     3 * Edit Posts Administration Panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/options-discussion.php

    r7886 r8656  
    11<?php
     2/**
     3 * Discussion settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/options-general.php

    r7883 r8656  
    11<?php
     2/**
     3 * General settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('./admin.php');
    311
  • trunk/wp-admin/options-misc.php

    r8653 r8656  
    11<?php
     2/**
     3 * Miscellaneous settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/options-permalink.php

    r8365 r8656  
    11<?php
     2/**
     3 * Permalink settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
     
    513$parent_file = 'options-general.php';
    614
     15/**
     16 * Display JavaScript on the page.
     17 *
     18 * @package WordPress
     19 * @subpackage Permalink_Settings_Panel
     20 */
    721function add_js() {
    822?>
  • trunk/wp-admin/options-reading.php

    r7883 r8656  
    11<?php
     2/**
     3 * Reading settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/options-writing.php

    r8180 r8656  
    11<?php
     2/**
     3 * Writing settings administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/options.php

    r7883 r8656  
    11<?php
     2/**
     3 * Options Management Administration Panel.
     4 *
     5 * Just allows for displaying of options.
     6 *
     7 * This isn't referenced or linked to, but will show all of the options and
     8 * allow editing. The issue is that serialized data is not supported to be
     9 * modified. Options can not be removed.
     10 *
     11 * @package WordPress
     12 * @subpackage Administration
     13 */
     14
     15/** WordPress Administration Bootstrap */
    216require_once('admin.php');
    317
  • trunk/wp-admin/page-new.php

    r8033 r8656  
    11<?php
     2/**
     3 * New page administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311$title = __('New Page');
  • trunk/wp-admin/page.php

    r8627 r8656  
    11<?php
     2/**
     3 * Edit page administration panel.
     4 *
     5 * Manage edit page: post, edit, delete, etc.
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
     10
     11/** WordPress Administration Bootstrap */
    212require_once('admin.php');
    313
     
    717wp_reset_vars(array('action'));
    818
     19/**
     20 * Redirect to previous page.
     21 *
     22 * @param int $page_ID Page ID.
     23 */
    924function redirect_page($page_ID) {
    1025    $referredby = '';
  • trunk/wp-admin/plugin-editor.php

    r7999 r8656  
    11<?php
     2/**
     3 * Edit plugin editor administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/plugin-install.php

    r8550 r8656  
    11<?php
     2/**
     3 * Install plugin administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/plugins.php

    r8646 r8656  
    11<?php
     2/**
     3 * Plugins administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/post.php

    r8625 r8656  
    11<?php
     2/**
     3 * Edit post administration panel.
     4 *
     5 * Manage Post actions: post, edit, delete, etc.
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
     10
     11/** WordPress Administration Bootstrap */
    212require_once('admin.php');
    313
     
    717wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
    818
     19/**
     20 * Redirect to previous page.
     21 *
     22 * @param int $post_ID Optional. Post ID.
     23 */
    924function redirect_post($post_ID = '') {
    1025    global $action;
  • trunk/wp-admin/press-this.php

    r8600 r8656  
    11<?php
     2/**
     3 * Press This Display and Handler.
     4 *
     5 * @package WordPress
     6 * @subpackage Press_This
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
    412if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin&#8217; uh?' ) );
    513
     14/**
     15 * Replace forward slash with backslash and slash.
     16 *
     17 * @package WordPress
     18 * @subpackage Press_This
     19 * @since unknown
     20 *
     21 * @param string $string
     22 * @return string
     23 */
    624function preg_quote2($string) {
    725    return str_replace('/', '\/', preg_quote($string));
    826}
     27
     28/**
     29 * Convert characters.
     30 *
     31 * @package WordPress
     32 * @subpackage Press_This
     33 * @since unknown
     34 *
     35 * @param string $text
     36 * @return string
     37 */
    938function aposfix($text) {
    1039    $translation_table[chr(34)] = '&quot;';
     
    1342    return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&amp;" , strtr($text, $translation_table));
    1443}
     44
     45/**
     46 * Press It form handler.
     47 *
     48 * @package WordPress
     49 * @subpackage Press_This
     50 * @since unknown
     51 *
     52 * @return int Post ID
     53 */
    1554function press_it() {
    1655    // define some basic variables
  • trunk/wp-admin/revision.php

    r8600 r8656  
    11<?php
    2 
     2/**
     3 * Revisions administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    310require_once('admin.php');
    411
  • trunk/wp-admin/theme-editor.php

    r8208 r8656  
    11<?php
     2/**
     3 * Theme editor administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/themes.php

    r8040 r8656  
    11<?php
     2/**
     3 * Themes administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/update.php

    r8600 r8656  
    11<?php
     2/**
     3 * Update Plugin / Core administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/** WordPress Administration Bootstrap */
    310require_once('admin.php');
    411
     
    613    wp_die(__('You do not have sufficient permissions to update plugins for this blog.'));
    714
     15/**
     16 * Plugin upgrade display.
     17 *
     18 * @since 2.5
     19 *
     20 * @param string $plugin Plugin
     21 */
    822function do_plugin_upgrade($plugin) {
    923    global $wp_filesystem;
     
    4559}
    4660
     61/**
     62 * Display upgrade WordPress for downloading latest or upgrading automatically form.
     63 *
     64 * @since 2.7
     65 *
     66 * @return null
     67 */
    4768function core_upgrade_preamble() {
    4869    $update = get_option('update_core');
     
    5879
    5980    if ( 'development' == $update->response ) {
    60         $message = __('You are using a developmemt version of WordPress.  You can upgrade to the latest nightly build automatically or download the nightly build and install it manually. Which would you like to do?');
     81        $message = __('You are using a development version of WordPress.  You can upgrade to the latest nightly build automatically or download the nightly build and install it manually. Which would you like to do?');
    6182        $submit = __('Download nightly build');
    6283    } else {
     
    79100}
    80101
     102/**
     103 * Upgrade WordPress core display.
     104 *
     105 * @since 2.7
     106 *
     107 * @return null
     108 */
    81109function do_core_upgrade() {
    82110    global $wp_filesystem;
  • trunk/wp-admin/upload.php

    r8600 r8656  
    11<?php
     2/**
     3 * Media Library administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
    311
  • trunk/wp-admin/user-edit.php

    r8600 r8656  
    11<?php
    2 
     2/**
     3 * Edit user administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    310require_once('admin.php');
    411
     
    815    $is_profile_page = false;
    916
     17/**
     18 * Display JavaScript for profile page.
     19 *
     20 * @package WordPress
     21 * @subpackage Administration
     22 */
    1023function profile_js ( ) {
    1124?>
  • trunk/wp-admin/users.php

    r8646 r8656  
    11<?php
     2/**
     3 * Users administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    210require_once('admin.php');
     11
     12/** WordPress Registration API */
    313require_once( ABSPATH . WPINC . '/registration.php');
    414
  • trunk/wp-admin/widgets.php

    r8600 r8656  
    11<?php
    2 
     2/**
     3 * Widgets administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
    310require_once( 'admin.php' );
     11
     12/** WordPress Administration Widgets API */
    413require_once(ABSPATH . 'wp-admin/includes/widgets.php');
    514
Note: See TracChangeset for help on using the changeset viewer.