From c19b2d769e5670cf5ce0b89f0629000ff6bca4b7 Mon Sep 17 00:00:00 2001 From: westi Date: Sat, 16 Aug 2008 07:27:34 +0000 Subject: [PATCH] More phpdoc updates for wp-adming. See #7496 props santosj. git-svn-id: http://svn.automattic.com/wordpress/trunk@8656 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-header.php | 97 +++++++++++++++++++++++++++- wp-admin/edit-attachment-rows.php | 11 +++- wp-admin/edit-category-form.php | 10 +++ wp-admin/edit-comments.php | 8 +++ wp-admin/edit-form-advanced.php | 11 ++++ wp-admin/edit-form-comment.php | 10 +++ wp-admin/edit-link-categories.php | 8 +++ wp-admin/edit-link-category-form.php | 10 +++ wp-admin/edit-link-form.php | 10 +++ wp-admin/edit-page-form.php | 11 ++++ wp-admin/edit-pages.php | 8 +++ wp-admin/edit-post-rows.php | 11 +++- wp-admin/edit-tag-form.php | 10 +++ wp-admin/edit-tags.php | 8 +++ wp-admin/edit.php | 8 +++ wp-admin/options-discussion.php | 8 +++ wp-admin/options-general.php | 8 +++ wp-admin/options-misc.php | 8 +++ wp-admin/options-permalink.php | 14 ++++ wp-admin/options-reading.php | 8 +++ wp-admin/options-writing.php | 8 +++ wp-admin/options.php | 14 ++++ wp-admin/page-new.php | 8 +++ wp-admin/page.php | 15 +++++ wp-admin/plugin-editor.php | 8 +++ wp-admin/plugin-install.php | 8 +++ wp-admin/plugins.php | 8 +++ wp-admin/post.php | 15 +++++ wp-admin/press-this.php | 39 +++++++++++ wp-admin/revision.php | 7 ++ wp-admin/theme-editor.php | 8 +++ wp-admin/themes.php | 8 +++ wp-admin/update.php | 30 ++++++++- wp-admin/upload.php | 8 +++ wp-admin/user-edit.php | 13 ++++ wp-admin/users.php | 10 +++ wp-admin/widgets.php | 9 +++ 37 files changed, 489 insertions(+), 4 deletions(-) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index c0e8c54bb..31701dfc8 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -1,12 +1,45 @@ admin_header_callback = $admin_header_callback; } + /** + * Setup the hooks for the Custom Header admin page. + * + * @since unknown + */ function init() { $page = add_theme_page(__('Custom Image Header'), __('Custom Image Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); @@ -16,21 +49,43 @@ class Custom_Image_Header { add_action("admin_head-$page", $this->admin_header_callback, 51); } + /** + * Get the current step. + * + * @since unknown + * + * @return int Current step + */ function step() { - $step = (int) @$_GET['step']; + if ( ! isset( $_GET['step'] ) ) + return 1; + + $step = (int) $_GET['step']; if ( $step < 1 || 3 < $step ) $step = 1; + return $step; } + /** + * Setup the enqueue for the JavaScript files. + * + * @since unknown + */ function js_includes() { $step = $this->step(); + if ( 1 == $step ) wp_enqueue_script('colorpicker'); elseif ( 2 == $step ) wp_enqueue_script('cropper'); } + /** + * Execute custom header modification. + * + * @since unknown + */ function take_action() { if ( isset( $_POST['textcolor'] ) ) { check_admin_referer('custom-header'); @@ -48,6 +103,11 @@ class Custom_Image_Header { } } + /** + * Execute Javascript depending on step. + * + * @since unknown + */ function js() { $step = $this->step(); if ( 1 == $step ) @@ -56,6 +116,11 @@ class Custom_Image_Header { $this->js_2(); } + /** + * Display Javascript based on Step 1. + * + * @since unknown + */ function js_1() { ?>