Ticket #7496: 7496.phpdoc.r8653.patch
| File 7496.phpdoc.r8653.patch, 22.8 KB (added by , 17 years ago) |
|---|
-
custom-header.php
1 1 <?php 2 /** 3 * The custom header image script. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** 10 * The custom header image class. 11 * 12 * @since unknown 13 * @package WordPress 14 * @subpackage Administration 15 */ 3 16 class Custom_Image_Header { 17 18 /** 19 * Callback for administration header. 20 * 21 * @var callback 22 * @since unknown 23 * @access private 24 */ 4 25 var $admin_header_callback; 5 26 27 /** 28 * PHP4 Constructor - Register administration header callback. 29 * 30 * @since unknown 31 * @param callback $admin_header_callback 32 * @return Custom_Image_Header 33 */ 6 34 function Custom_Image_Header($admin_header_callback) { 7 35 $this->admin_header_callback = $admin_header_callback; 8 36 } 9 37 38 /** 39 * Setup the hooks for the Custom Header admin page. 40 * 41 * @since unknown 42 */ 10 43 function init() { 11 44 $page = add_theme_page(__('Custom Image Header'), __('Custom Image Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); 12 45 … … 16 49 add_action("admin_head-$page", $this->admin_header_callback, 51); 17 50 } 18 51 52 /** 53 * Get the current step. 54 * 55 * @since unknown 56 * 57 * @return int Current step 58 */ 19 59 function step() { 20 $step = (int) @$_GET['step']; 60 if ( ! isset( $_GET['step'] ) ) 61 return 1; 62 63 $step = (int) $_GET['step']; 21 64 if ( $step < 1 || 3 < $step ) 22 65 $step = 1; 66 23 67 return $step; 24 68 } 25 69 70 /** 71 * Setup the enqueue for the JavaScript files. 72 * 73 * @since unknown 74 */ 26 75 function js_includes() { 27 76 $step = $this->step(); 77 28 78 if ( 1 == $step ) 29 79 wp_enqueue_script('colorpicker'); 30 80 elseif ( 2 == $step ) 31 81 wp_enqueue_script('cropper'); 32 82 } 33 83 84 /** 85 * Execute custom header modification. 86 * 87 * @since unknown 88 */ 34 89 function take_action() { 35 90 if ( isset( $_POST['textcolor'] ) ) { 36 91 check_admin_referer('custom-header'); … … 48 103 } 49 104 } 50 105 106 /** 107 * Execute Javascript depending on step. 108 * 109 * @since unknown 110 */ 51 111 function js() { 52 112 $step = $this->step(); 53 113 if ( 1 == $step ) … … 56 116 $this->js_2(); 57 117 } 58 118 119 /** 120 * Display Javascript based on Step 1. 121 * 122 * @since unknown 123 */ 59 124 function js_1() { ?> 60 125 <script type="text/javascript"> 61 126 var cp = new ColorPicker(); … … 129 194 <?php 130 195 } 131 196 197 /** 198 * Display Javascript based on Step 2. 199 * 200 * @since unknown 201 */ 132 202 function js_2() { ?> 133 203 <script type="text/javascript"> 134 204 function onEndCrop( coords, dimensions ) { … … 173 243 <?php 174 244 } 175 245 246 /** 247 * Display first step of custom header image page. 248 * 249 * @since unknown 250 */ 176 251 function step_1() { 177 252 if ( $_GET['updated'] ) { ?> 178 253 <div id="message" class="updated fade"> … … 226 301 227 302 } 228 303 304 /** 305 * Display second step of custom header image page. 306 * 307 * @since unknown 308 */ 229 309 function step_2() { 230 310 check_admin_referer('custom-header'); 231 311 $overrides = array('test_form' => false); … … 298 378 <?php 299 379 } 300 380 381 /** 382 * Display third step of custom header image page. 383 * 384 * @since unknown 385 */ 301 386 function step_3() { 302 387 check_admin_referer('custom-header'); 303 388 if ( $_POST['oitar'] > 1 ) { … … 339 424 return $this->finished(); 340 425 } 341 426 427 /** 428 * Display last step of custom header image page. 429 * 430 * @since unknown 431 */ 342 432 function finished() { 343 433 ?> 344 434 <div class="wrap"> … … 350 440 <?php 351 441 } 352 442 443 /** 444 * Display the page based on the current step. 445 * 446 * @since unknown 447 */ 353 448 function admin_page() { 354 449 $step = $this->step(); 355 450 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 9 if ( ! defined('ABSPATH') ) die(); 10 ?> 2 11 <table class="widefat"> 3 12 <thead> 4 13 <tr> -
edit-category-form.php
1 1 <?php 2 /** 3 * Edit category form for inclusion in administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 2 9 if ( ! empty($cat_ID) ) { 10 /** 11 * @var string 12 */ 3 13 $heading = __('Edit Category'); 4 14 $submit_text = __('Edit Category'); 5 15 $form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">'; -
edit-comments.php
1 1 <?php 2 /** 3 * Edit Comments Administration Panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Edit Comments'); -
edit-form-advanced.php
1 1 <?php 2 /** 3 * Post advanced form for inclusion in the administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** 10 * Post ID global 11 * @name $post_ID 12 * @var int 13 */ 3 14 if ( ! isset( $post_ID ) ) 4 15 $post_ID = 0; 5 16 -
edit-form-comment.php
1 1 <?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 */ 2 12 $submitbutton_text = __('Edit Comment'); 3 13 $toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID); 4 14 $form_action = 'editedcomment'; -
edit-link-categories.php
1 1 <?php 2 /** 3 * Edit Link Categories Administration Panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 // Handle bulk deletes -
edit-link-category-form.php
1 1 <?php 2 /** 3 * Edit link category form for inclusion in administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 2 9 if ( ! empty($cat_ID) ) { 10 /** 11 * @var string 12 */ 3 13 $heading = __('Edit Category'); 4 14 $submit_text = __('Edit Category'); 5 15 $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">'; -
edit-link-form.php
1 1 <?php 2 /** 3 * Edit links form for inclusion in administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 2 9 if ( ! empty($link_id) ) { 10 /** 11 * @var string 12 */ 3 13 $heading = __('Edit Link'); 4 14 $submit_text = __('Save Changes'); 5 15 $form = '<form name="editlink" id="editlink" method="post" action="link.php">'; -
edit-page-form.php
1 1 <?php 2 /** 3 * Edit page form for inclusion in the administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** 10 * Post ID global 11 * @name $post_ID 12 * @var int 13 */ 3 14 if ( ! isset( $post_ID ) ) 4 15 $post_ID = 0; 5 16 -
edit-pages.php
1 1 <?php 2 /** 3 * Edit Pages Administration Panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 // 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 9 if ( ! defined('ABSPATH') ) die(); 10 ?> 2 11 <table class="widefat"> 3 12 <thead> 4 13 <tr> -
edit-tag-form.php
1 1 <?php 2 /** 3 * Edit tag form for inclusion in administration panels. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 2 9 if ( ! empty($tag_ID) ) { 10 /** 11 * @var string 12 */ 3 13 $heading = __('Edit Tag'); 4 14 $submit_text = __('Edit Tag'); 5 15 $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">'; -
edit-tags.php
1 1 <?php 2 /** 3 * Edit Tags Administration Panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Tags'); -
edit.php
1 1 <?php 2 /** 3 * Edit Posts Administration Panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 // Handle bulk deletes -
options-discussion.php
1 1 <?php 2 /** 3 * Discussion settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Discussion Settings'); -
options-general.php
1 1 <?php 2 /** 3 * General settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('./admin.php'); 3 11 4 12 $title = __('General Settings'); -
options-misc.php
1 1 <?php 2 /** 3 * Miscellaneous settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Miscellaneous Settings'); -
options-permalink.php
1 1 <?php 2 /** 3 * Permalink settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Permalink Settings'); 5 13 $parent_file = 'options-general.php'; 6 14 15 /** 16 * Display JavaScript on the page. 17 * 18 * @package WordPress 19 * @subpackage Permalink_Settings_Panel 20 */ 7 21 function add_js() { 8 22 ?> 9 23 <script type="text/javascript"> -
options-reading.php
1 1 <?php 2 /** 3 * Reading settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Reading Settings'); -
options-writing.php
1 1 <?php 2 /** 3 * Writing settings administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __('Writing Settings'); -
options.php
1 1 <?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 */ 2 16 require_once('admin.php'); 3 17 4 18 $title = __('Settings'); -
page-new.php
1 1 <?php 2 /** 3 * New page administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 $title = __('New Page'); 4 12 $parent_file = 'post-new.php'; -
page.php
1 1 <?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 */ 2 12 require_once('admin.php'); 3 13 4 14 $parent_file = 'edit.php'; … … 6 16 7 17 wp_reset_vars(array('action')); 8 18 19 /** 20 * Redirect to previous page. 21 * 22 * @param int $page_ID Page ID. 23 */ 9 24 function redirect_page($page_ID) { 10 25 $referredby = ''; 11 26 if ( !empty($_POST['referredby']) ) { -
plugin-editor.php
1 1 <?php 2 /** 3 * Edit plugin editor administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __("Edit Plugins"); -
plugin-install.php
1 1 <?php 2 /** 3 * Install plugin administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 if ( ! current_user_can('install_plugins') ) -
plugins.php
1 1 <?php 2 /** 3 * Plugins administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $action = ''; -
post.php
1 1 <?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 */ 2 12 require_once('admin.php'); 3 13 4 14 $parent_file = 'edit.php'; … … 6 16 7 17 wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder')); 8 18 19 /** 20 * Redirect to previous page. 21 * 22 * @param int $post_ID Optional. Post ID. 23 */ 9 24 function redirect_post($post_ID = '') { 10 25 global $action; 11 26 -
press-this.php
1 1 <?php 2 /** 3 * Press This Display and Handler. 4 * 5 * @package WordPress 6 * @subpackage Press_This 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin’ uh?' ) ); 5 13 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 */ 6 24 function preg_quote2($string) { 7 25 return str_replace('/', '\/', preg_quote($string)); 8 26 } 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 */ 9 38 function aposfix($text) { 10 39 $translation_table[chr(34)] = '"'; 11 40 $translation_table[chr(38)] = '&'; 12 41 $translation_table[chr(39)] = '''; 13 42 return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($text, $translation_table)); 14 43 } 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 */ 15 54 function press_it() { 16 55 // define some basic variables 17 56 $quick['post_status'] = isset($_REQUEST['publish']) ? 'publish' : 'draft'; -
revision.php
1 1 <?php 2 /** 3 * Revisions administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** WordPress Administration Bootstrap */ 3 10 require_once('admin.php'); 4 11 5 12 wp_reset_vars(array('revision', 'left', 'right', 'action')); -
theme-editor.php
1 1 <?php 2 /** 3 * Theme editor administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 $title = __("Edit Themes"); -
themes.php
1 1 <?php 2 /** 3 * Themes administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 if ( isset($_GET['action']) ) { -
update.php
1 1 <?php 2 /** 3 * Update Plugin / Core administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** WordPress Administration Bootstrap */ 3 10 require_once('admin.php'); 4 11 5 12 if ( ! current_user_can('update_plugins') ) 6 13 wp_die(__('You do not have sufficient permissions to update plugins for this blog.')); 7 14 15 /** 16 * Plugin upgrade display. 17 * 18 * @since 2.5 19 * 20 * @param string $plugin Plugin 21 */ 8 22 function do_plugin_upgrade($plugin) { 9 23 global $wp_filesystem; 10 24 … … 44 58 echo '</div>'; 45 59 } 46 60 61 /** 62 * Display upgrade WordPress for downloading latest or upgrading automatically form. 63 * 64 * @since 2.7 65 * 66 * @return null 67 */ 47 68 function core_upgrade_preamble() { 48 69 $update = get_option('update_core'); 49 70 … … 57 78 } 58 79 59 80 if ( 'development' == $update->response ) { 60 $message = __('You are using a developme mt 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?'); 61 82 $submit = __('Download nightly build'); 62 83 } else { 63 84 $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); … … 78 99 echo '</div>'; 79 100 } 80 101 102 /** 103 * Upgrade WordPress core display. 104 * 105 * @since 2.7 106 * 107 * @return null 108 */ 81 109 function do_core_upgrade() { 82 110 global $wp_filesystem; 83 111 -
upload.php
1 1 <?php 2 /** 3 * Media Library administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 3 11 4 12 if (!current_user_can('upload_files')) -
user-edit.php
1 1 <?php 2 /** 3 * Edit user administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** WordPress Administration Bootstrap */ 3 10 require_once('admin.php'); 4 11 5 12 if ( defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE ) … … 7 14 else 8 15 $is_profile_page = false; 9 16 17 /** 18 * Display JavaScript for profile page. 19 * 20 * @package WordPress 21 * @subpackage Administration 22 */ 10 23 function profile_js ( ) { 11 24 ?> 12 25 <script type="text/javascript"> -
users.php
1 1 <?php 2 /** 3 * Users administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 2 10 require_once('admin.php'); 11 12 /** WordPress Registration API */ 3 13 require_once( ABSPATH . WPINC . '/registration.php'); 4 14 5 15 if ( !current_user_can('edit_users') ) -
widgets.php
1 1 <?php 2 /** 3 * Widgets administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** WordPress Administration Bootstrap */ 3 10 require_once( 'admin.php' ); 11 12 /** WordPress Administration Widgets API */ 4 13 require_once(ABSPATH . 'wp-admin/includes/widgets.php'); 5 14 6 15 if ( ! current_user_can('switch_themes') )