Changeset 25819
- Timestamp:
- 10/16/2013 10:58:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r25719 r25819 33 33 add_action( 'admin_footer', '_local_storage_notice' ); 34 34 35 /* 36 * @todo Document the $messages array(s). 37 */ 35 38 $messages = array(); 36 39 $messages['post'] = array( … … 65 68 $messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now. 66 69 70 /** 71 * Filter the post updated messages. 72 * 73 * @since 3.0.0 74 * 75 * @param array $messages Post updated messages. For defaults @see $messages declarations above. 76 */ 67 77 $messages = apply_filters( 'post_updated_messages', $messages ); 68 78 … … 173 183 add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core'); 174 184 175 do_action('dbx_post_advanced', $post); 185 /** 186 * Fires in the middle of built-in meta box registration. 187 * 188 * @since 2.1.0 189 * @deprecated 3.7.0 Use 'add_meta_boxes' instead. 190 * 191 * @param WP_Post $post Post object. 192 */ 193 do_action( 'dbx_post_advanced', $post ); 194 176 195 if ( post_type_supports($post_type, 'comments') ) 177 196 add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); … … 188 207 } 189 208 190 do_action('add_meta_boxes', $post_type, $post); 191 do_action('add_meta_boxes_' . $post_type, $post); 192 193 do_action('do_meta_boxes', $post_type, 'normal', $post); 194 do_action('do_meta_boxes', $post_type, 'advanced', $post); 195 do_action('do_meta_boxes', $post_type, 'side', $post); 209 /** 210 * Fires after all built-in meta boxes have been added. 211 * 212 * @since 3.0.0 213 * 214 * @param string $post_type Post type. 215 * @param WP_Post $post Post object. 216 */ 217 do_action( 'add_meta_boxes', $post_type, $post ); 218 219 /** 220 * Fires after all built-in meta boxes have been added, contextually for the given post type. 221 * 222 * The dynamic portion of the hook, $post_type, refers to the post type of the post. 223 * 224 * @since 3.0.0 225 * 226 * @param WP_Post $post Post object. 227 */ 228 do_action( 'add_meta_boxes_' . $post_type, $post ); 229 230 /** 231 * Fires after meta boxes have been added. 232 * 233 * Fires once for each of the default meta box contexts: normal, advanced, and side. 234 * 235 * @since 3.0.0 236 * 237 * @param string $post_type Post type of the post. 238 * @param string $context string Meta box context. 239 * @param WP_Post $post Post object. 240 */ 241 do_action( 'do_meta_boxes', $post_type, 'normal', $post ); 242 //duplicate_hook 243 do_action( 'do_meta_boxes', $post_type, 'advanced', $post ); 244 //duplicate_hook 245 do_action( 'do_meta_boxes', $post_type, 'side', $post ); 196 246 197 247 add_screen_option('layout_columns', array('max' => 2, 'default' => 2) ); … … 327 377 </p> 328 378 </div> 329 330 <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag', $post); ?>> 379 <?php 380 /** 381 * Fires inside the post editor <form> tag. 382 * 383 * @since 3.0.0 384 * 385 * @param WP_Post $post Post object. 386 */ 387 ?> 388 <form name="post" action="post.php" method="post" id="post"<?php do_action( 'post_edit_form_tag', $post ); ?>> 331 389 <?php wp_nonce_field($nonce_action); ?> 332 390 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> … … 351 409 ?> 352 410 353 <?php do_action( 'edit_form_top', $post ); ?> 411 <?php 412 /** 413 * Fires at the beginning of the edit form. 414 * 415 * At this point, the required hidden fields and nonces have already been output. 416 * 417 * @since 3.7.0 418 * 419 * @param WP_Post $post Post object. 420 */ 421 do_action( 'edit_form_top', $post ); ?> 354 422 355 423 <div id="poststuff"> … … 360 428 <div id="titlediv"> 361 429 <div id="titlewrap"> 430 <?php 431 /** 432 * Filter the title field placeholder text. 433 * 434 * @since 3.1.0 435 * 436 * @param string $text Placeholder text. Default 'Enter title here'. 437 * @param WP_Post $post Post object. 438 */ 439 ?> 362 440 <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> 363 441 <input type="text" name="post_title" size="30" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" /> … … 390 468 <?php 391 469 } 392 470 /** 471 * Fires after the title field. 472 * 473 * @since 3.5.0 474 * 475 * @param WP_Post $post Post object. 476 */ 393 477 do_action( 'edit_form_after_title', $post ); 394 478 … … 421 505 </div> 422 506 <?php } 423 507 /** 508 * Fires after the content editor. 509 * 510 * @since 3.5.0 511 * 512 * @param WP_Post $post Post object. 513 */ 424 514 do_action( 'edit_form_after_editor', $post ); 425 515 ?> … … 429 519 <?php 430 520 431 if ( 'page' == $post_type ) 432 do_action('submitpage_box', $post); 433 else 434 do_action('submitpost_box', $post); 521 if ( 'page' == $post_type ) { 522 /** 523 * Fires before meta boxes with 'side' context are output for the 'page' post type. 524 * 525 * The submitpage box is a meta box with 'side' context, so this hook fires just before it is output. 526 * 527 * @since 2.5.0 528 * 529 * @param WP_Post $post Post object. 530 */ 531 do_action( 'submitpage_box', $post ); 532 } 533 else { 534 /** 535 * Fires before meta boxes with 'side' context are output for all post types other than 'page'. 536 * 537 * The submitpost box is a meta box with 'side' context, so this hook fires just before it is output. 538 * 539 * @since 2.5.0 540 * 541 * @param WP_Post $post Post object. 542 */ 543 do_action( 'submitpost_box', $post ); 544 } 545 435 546 436 547 do_meta_boxes($post_type, 'side', $post); … … 443 554 do_meta_boxes(null, 'normal', $post); 444 555 445 if ( 'page' == $post_type ) 446 do_action('edit_page_form', $post); 447 else 448 do_action('edit_form_advanced', $post); 556 if ( 'page' == $post_type ) { 557 /** 558 * Fires after 'normal' context meta boxes have been output for the 'page' post type. 559 * 560 * @since 1.5.2 561 * 562 * @param WP_Post $post Post object. 563 */ 564 do_action( 'edit_page_form', $post ); 565 } 566 else { 567 /** 568 * Fires after 'normal' context meta boxes have been output for all post types other than 'page'. 569 * 570 * @since 1.5.2 571 * 572 * @param WP_Post $post Post object. 573 */ 574 do_action( 'edit_form_advanced', $post ); 575 } 576 449 577 450 578 do_meta_boxes(null, 'advanced', $post); … … 453 581 </div> 454 582 <?php 455 456 do_action('dbx_post_sidebar', $post); 583 /** 584 * Fires after all meta box sections have been output, before the closing #post-body div. 585 * 586 * @since 2.1.0 587 * 588 * @param WP_Post $post Post object. 589 */ 590 do_action( 'dbx_post_sidebar', $post ); 457 591 458 592 ?>
Note: See TracChangeset
for help on using the changeset viewer.