diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 85397787ae..5d90c12c21 100644
a
|
b
|
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2403 | 2403 | * Filters the value of a specific post field to edit. |
2404 | 2404 | * |
2405 | 2405 | * The dynamic portion of the hook name, `$field`, refers to the post |
2406 | | * field name. |
| 2406 | * field name. Possible filter names include: |
| 2407 | * |
| 2408 | * - `edit_post_author` |
| 2409 | * - `edit_post_date` |
| 2410 | * - `edit_post_date_gmt` |
| 2411 | * - `edit_post_content` |
| 2412 | * - `edit_post_title` |
| 2413 | * - `edit_post_excerpt` |
| 2414 | * - `edit_post_status` |
| 2415 | * - `edit_post_password` |
| 2416 | * - `edit_post_name` |
| 2417 | * - `edit_post_modified` |
| 2418 | * - `edit_post_modified_gmt` |
| 2419 | * - `edit_post_content_filtered` |
| 2420 | * - `edit_post_parent` |
| 2421 | * - `edit_post_type` |
| 2422 | * - `edit_post_mime_type` |
2407 | 2423 | * |
2408 | 2424 | * @since 2.3.0 |
2409 | 2425 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2415 | 2431 | /** |
2416 | 2432 | * Filters the value of a specific post field to edit. |
2417 | 2433 | * |
2418 | | * The dynamic portion of the hook name, `$field_no_prefix`, refers to |
2419 | | * the post field name. |
| 2434 | * Only applied to post fields with a name which is prefixed with `post_`. |
| 2435 | * |
| 2436 | * The dynamic portion of the hook name, `$field_no_prefix`, refers to the |
| 2437 | * post field name minus the `post_` prefix. Possible filter names include: |
| 2438 | * |
| 2439 | * - `author_edit_pre` |
| 2440 | * - `date_edit_pre` |
| 2441 | * - `date_gmt_edit_pre` |
| 2442 | * - `content_edit_pre` |
| 2443 | * - `title_edit_pre` |
| 2444 | * - `excerpt_edit_pre` |
| 2445 | * - `status_edit_pre` |
| 2446 | * - `password_edit_pre` |
| 2447 | * - `name_edit_pre` |
| 2448 | * - `modified_edit_pre` |
| 2449 | * - `modified_gmt_edit_pre` |
| 2450 | * - `content_filtered_edit_pre` |
| 2451 | * - `parent_edit_pre` |
| 2452 | * - `type_edit_pre` |
| 2453 | * - `mime_type_edit_pre` |
2420 | 2454 | * |
2421 | 2455 | * @since 2.3.0 |
2422 | 2456 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2425 | 2459 | */ |
2426 | 2460 | $value = apply_filters( "{$field_no_prefix}_edit_pre", $value, $post_id ); |
2427 | 2461 | } else { |
| 2462 | // @TODO |
2428 | 2463 | $value = apply_filters( "edit_post_{$field}", $value, $post_id ); |
2429 | 2464 | } |
2430 | 2465 | |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2443 | 2478 | /** |
2444 | 2479 | * Filters the value of a specific post field before saving. |
2445 | 2480 | * |
| 2481 | * Only applied to post fields with a name which is prefixed with `post_`. |
| 2482 | * |
2446 | 2483 | * The dynamic portion of the hook name, `$field`, refers to the post |
2447 | | * field name. |
| 2484 | * field name. Possible filter names include: |
| 2485 | * |
| 2486 | * - `pre_post_author` |
| 2487 | * - `pre_post_date` |
| 2488 | * - `pre_post_date_gmt` |
| 2489 | * - `pre_post_content` |
| 2490 | * - `pre_post_title` |
| 2491 | * - `pre_post_excerpt` |
| 2492 | * - `pre_post_status` |
| 2493 | * - `pre_post_password` |
| 2494 | * - `pre_post_name` |
| 2495 | * - `pre_post_modified` |
| 2496 | * - `pre_post_modified_gmt` |
| 2497 | * - `pre_post_content_filtered` |
| 2498 | * - `pre_post_parent` |
| 2499 | * - `pre_post_type` |
| 2500 | * - `pre_post_mime_type` |
2448 | 2501 | * |
2449 | 2502 | * @since 2.3.0 |
2450 | 2503 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2455 | 2508 | /** |
2456 | 2509 | * Filters the value of a specific field before saving. |
2457 | 2510 | * |
2458 | | * The dynamic portion of the hook name, `$field_no_prefix`, refers |
2459 | | * to the post field name. |
| 2511 | * Only applied to post fields with a name which is prefixed with `post_`. |
| 2512 | * |
| 2513 | * The dynamic portion of the hook name, `$field_no_prefix`, refers to the |
| 2514 | * post field name minus the `post_` prefix. Possible filter names include: |
| 2515 | * |
| 2516 | * - `author_save_pre` |
| 2517 | * - `date_save_pre` |
| 2518 | * - `date_gmt_save_pre` |
| 2519 | * - `content_save_pre` |
| 2520 | * - `title_save_pre` |
| 2521 | * - `excerpt_save_pre` |
| 2522 | * - `status_save_pre` |
| 2523 | * - `password_save_pre` |
| 2524 | * - `name_save_pre` |
| 2525 | * - `modified_save_pre` |
| 2526 | * - `modified_gmt_save_pre` |
| 2527 | * - `content_filtered_save_pre` |
| 2528 | * - `parent_save_pre` |
| 2529 | * - `type_save_pre` |
| 2530 | * - `mime_type_save_pre` |
2460 | 2531 | * |
2461 | 2532 | * @since 2.3.0 |
2462 | 2533 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2464 | 2535 | */ |
2465 | 2536 | $value = apply_filters( "{$field_no_prefix}_save_pre", $value ); |
2466 | 2537 | } else { |
| 2538 | // @TODO |
2467 | 2539 | $value = apply_filters( "pre_post_{$field}", $value ); |
2468 | 2540 | |
2469 | 2541 | /** |
2470 | 2542 | * Filters the value of a specific post field before saving. |
2471 | 2543 | * |
| 2544 | * Only applied to post fields with a name which is *not* prefixed with `post_`. |
| 2545 | * |
2472 | 2546 | * The dynamic portion of the hook name, `$field`, refers to the post |
2473 | | * field name. |
| 2547 | * field name. Possible filter names include: |
| 2548 | * |
| 2549 | * - `ID_pre` |
| 2550 | * - `comment_status_pre` |
| 2551 | * - `ping_status_pre` |
| 2552 | * - `to_ping_pre` |
| 2553 | * - `pinged_pre` |
| 2554 | * - `guid_pre` |
| 2555 | * - `menu_order_pre` |
| 2556 | * - `comment_count_pre` |
2474 | 2557 | * |
2475 | 2558 | * @since 2.3.0 |
2476 | 2559 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2486 | 2569 | /** |
2487 | 2570 | * Filters the value of a specific post field for display. |
2488 | 2571 | * |
| 2572 | * Only applied to post fields with a name which is prefixed with `post_`. |
| 2573 | * |
2489 | 2574 | * The dynamic portion of the hook name, `$field`, refers to the post |
2490 | | * field name. |
| 2575 | * field name. Possible filter names include: |
| 2576 | * |
| 2577 | * - `post_author` |
| 2578 | * - `post_date` |
| 2579 | * - `post_date_gmt` |
| 2580 | * - `post_content` |
| 2581 | * - `post_title` |
| 2582 | * - `post_excerpt` |
| 2583 | * - `post_status` |
| 2584 | * - `post_password` |
| 2585 | * - `post_name` |
| 2586 | * - `post_modified` |
| 2587 | * - `post_modified_gmt` |
| 2588 | * - `post_content_filtered` |
| 2589 | * - `post_parent` |
| 2590 | * - `post_type` |
| 2591 | * - `post_mime_type` |
2491 | 2592 | * |
2492 | 2593 | * @since 2.3.0 |
2493 | 2594 | * |
… |
… |
function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) { |
2499 | 2600 | */ |
2500 | 2601 | $value = apply_filters( "{$field}", $value, $post_id, $context ); |
2501 | 2602 | } else { |
| 2603 | // @TODO |
2502 | 2604 | $value = apply_filters( "post_{$field}", $value, $post_id, $context ); |
2503 | 2605 | } |
2504 | 2606 | |