Make WordPress Core

Ticket #7496: 7496.phpdoc.r8653.patch

File 7496.phpdoc.r8653.patch, 22.8 KB (added by anonymized_218323, 17 years ago)

Finishes the file level inline documentation for wp-admin/*.php. Need to finish wp-admin/includes/*.php files. Based off of r8653

  • custom-header.php

     
    11<?php
     2/**
     3 * The custom header image script.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     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'));
    1245
     
    1649                add_action("admin_head-$page", $this->admin_header_callback, 51);
    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');
    3080                elseif ( 2 == $step )
    3181                        wp_enqueue_script('cropper');
    3282        }
    3383
     84        /**
     85         * Execute custom header modification.
     86         *
     87         * @since unknown
     88         */
    3489        function take_action() {
    3590                if ( isset( $_POST['textcolor'] ) ) {
    3691                        check_admin_referer('custom-header');
     
    48103                }
    49104        }
    50105
     106        /**
     107         * Execute Javascript depending on step.
     108         *
     109         * @since unknown
     110         */
    51111        function js() {
    52112                $step = $this->step();
    53113                if ( 1 == $step )
     
    56116                        $this->js_2();
    57117        }
    58118
     119        /**
     120         * Display Javascript based on Step 1.
     121         *
     122         * @since unknown
     123         */
    59124        function js_1() { ?>
    60125<script type="text/javascript">
    61126        var cp = new ColorPicker();
     
    129194<?php
    130195        }
    131196
     197        /**
     198         * Display Javascript based on Step 2.
     199         *
     200         * @since unknown
     201         */
    132202        function js_2() { ?>
    133203<script type="text/javascript">
    134204        function onEndCrop( coords, dimensions ) {
     
    173243<?php
    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'] ) { ?>
    178253<div id="message" class="updated fade">
     
    226301
    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');
    231311                $overrides = array('test_form' => false);
     
    298378                <?php
    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');
    303388                if ( $_POST['oitar'] > 1 ) {
     
    339424                return $this->finished();
    340425        }
    341426
     427        /**
     428         * Display last step of custom header image page.
     429         *
     430         * @since unknown
     431         */
    342432        function finished() {
    343433                ?>
    344434<div class="wrap">
     
    350440                <?php
    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();
    355450                if ( 1 == $step )
  • edit-attachment-rows.php

     
    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>
    413        <tr>
  • edit-category-form.php

     
    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');
    515        $form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">';
  • edit-comments.php

     
    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
    412$title = __('Edit Comments');
  • edit-form-advanced.php

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

     
    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);
    414$form_action = 'editedcomment';
  • edit-link-categories.php

     
    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
    412// Handle bulk deletes
  • edit-link-category-form.php

     
    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');
    515        $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">';
  • edit-link-form.php

     
    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');
    515        $form = '<form name="editlink" id="editlink" method="post" action="link.php">';
  • edit-page-form.php

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

     
    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
    412// Handle bulk deletes
  • edit-post-rows.php

     
    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>
    413        <tr>
  • edit-tag-form.php

     
    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');
    515        $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
  • edit-tags.php

     
    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
    412$title = __('Tags');
  • edit.php

     
    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
    412// Handle bulk deletes
  • options-discussion.php

     
    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
    412$title = __('Discussion Settings');
  • options-general.php

     
    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
    412$title = __('General Settings');
  • options-misc.php

     
    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
    412$title = __('Miscellaneous Settings');
  • options-permalink.php

     
    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
    412$title = __('Permalink Settings');
    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?>
    923<script type="text/javascript">
  • options-reading.php

     
    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
    412$title = __('Reading Settings');
  • options-writing.php

     
    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
    412$title = __('Writing Settings');
  • options.php

     
    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
    418$title = __('Settings');
  • page-new.php

     
    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');
    412$parent_file = 'post-new.php';
  • page.php

     
    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
    414$parent_file = 'edit.php';
     
    616
    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 = '';
    1126        if ( !empty($_POST['referredby']) ) {
  • plugin-editor.php

     
    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
    412$title = __("Edit Plugins");
  • plugin-install.php

     
    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
    412if ( ! current_user_can('install_plugins') )
  • plugins.php

     
    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
    412$action = '';
  • post.php

     
    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
    414$parent_file = 'edit.php';
     
    616
    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;
    1126
  • press-this.php

     
    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;';
    1140        $translation_table[chr(38)] = '&';
    1241        $translation_table[chr(39)] = '&apos;';
    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
    1756        $quick['post_status'] = isset($_REQUEST['publish']) ? 'publish' : 'draft';
  • revision.php

     
    11<?php
     2/**
     3 * Revisions administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/** WordPress Administration Bootstrap */
    310require_once('admin.php');
    411
    512wp_reset_vars(array('revision', 'left', 'right', 'action'));
  • theme-editor.php

     
    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
    412$title = __("Edit Themes");
  • themes.php

     
    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
    412if ( isset($_GET['action']) ) {
  • update.php

     
    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
    512if ( ! current_user_can('update_plugins') )
    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;
    1024
     
    4458        echo '</div>';
    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');
    4970
     
    5778        }
    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 {
    6384                $message =      sprintf(__('You can upgrade to version %s automatically or download the nightly build and install it manually. Which would you like to do?'), $update->current);
     
    7899        echo '</div>';
    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;
    83111
  • upload.php

     
    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
    412if (!current_user_can('upload_files'))
  • user-edit.php

     
    11<?php
     2/**
     3 * Edit user administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/** WordPress Administration Bootstrap */
    310require_once('admin.php');
    411
    512if ( defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE )
     
    714else
    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?>
    1225<script type="text/javascript">
  • users.php

     
    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
    515if ( !current_user_can('edit_users') )
  • widgets.php

     
    11<?php
     2/**
     3 * Widgets administration panel.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/** WordPress Administration Bootstrap */
    310require_once( 'admin.php' );
     11
     12/** WordPress Administration Widgets API */
    413require_once(ABSPATH . 'wp-admin/includes/widgets.php');
    514
    615if ( ! current_user_can('switch_themes') )