Changeset 16365 for trunk/wp-includes/post.php
- Timestamp:
- 11/14/2010 03:50:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r16338 r16365 1609 1609 * 1610 1610 * @since 2.3.0 1611 * @uses apply_filters() Calls 'edit_$field' and ' ${field_no_prefix}_edit_pre' passing $value and1611 * @uses apply_filters() Calls 'edit_$field' and '{$field_no_prefix}_edit_pre' passing $value and 1612 1612 * $post_id if $context == 'edit' and field name prefix == 'post_'. 1613 1613 * 1614 1614 * @uses apply_filters() Calls 'edit_post_$field' passing $value and $post_id if $context == 'db'. 1615 1615 * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'post_'. 1616 * @uses apply_filters() Calls ' ${field}_pre' passing $value if $context == 'db' and field name prefix != 'post_'.1616 * @uses apply_filters() Calls '{$field}_pre' passing $value if $context == 'db' and field name prefix != 'post_'. 1617 1617 * 1618 1618 * @uses apply_filters() Calls '$field' passing $value, $post_id and $context if $context == anything … … 1653 1653 1654 1654 if ( $prefixed ) { 1655 $value = apply_filters("edit_ $field", $value, $post_id);1655 $value = apply_filters("edit_{$field}", $value, $post_id); 1656 1656 // Old school 1657 $value = apply_filters(" ${field_no_prefix}_edit_pre", $value, $post_id);1657 $value = apply_filters("{$field_no_prefix}_edit_pre", $value, $post_id); 1658 1658 } else { 1659 $value = apply_filters("edit_post_ $field", $value, $post_id);1659 $value = apply_filters("edit_post_{$field}", $value, $post_id); 1660 1660 } 1661 1661 … … 1670 1670 } else if ( 'db' == $context ) { 1671 1671 if ( $prefixed ) { 1672 $value = apply_filters("pre_ $field", $value);1673 $value = apply_filters(" ${field_no_prefix}_save_pre", $value);1672 $value = apply_filters("pre_{$field}", $value); 1673 $value = apply_filters("{$field_no_prefix}_save_pre", $value); 1674 1674 } else { 1675 $value = apply_filters("pre_post_ $field", $value);1676 $value = apply_filters(" ${field}_pre", $value);1675 $value = apply_filters("pre_post_{$field}", $value); 1676 $value = apply_filters("{$field}_pre", $value); 1677 1677 } 1678 1678 } else { … … 1681 1681 $value = apply_filters($field, $value, $post_id, $context); 1682 1682 else 1683 $value = apply_filters("post_ $field", $value, $post_id, $context);1683 $value = apply_filters("post_{$field}", $value, $post_id, $context); 1684 1684 } 1685 1685 … … 2924 2924 * @uses do_action() Calls 'transition_post_status' on $new_status, $old_status and 2925 2925 * $post if there is a status change. 2926 * @uses do_action() Calls ' ${old_status}_to_$new_status' on $post if there is a status change.2927 * @uses do_action() Calls ' ${new_status}_$post->post_type' on post ID and $post.2926 * @uses do_action() Calls '{$old_status}_to_{$new_status}' on $post if there is a status change. 2927 * @uses do_action() Calls '{$new_status}_{$post->post_type}' on post ID and $post. 2928 2928 * 2929 2929 * @param string $new_status Transition to this post status. … … 2933 2933 function wp_transition_post_status($new_status, $old_status, $post) { 2934 2934 do_action('transition_post_status', $new_status, $old_status, $post); 2935 do_action(" ${old_status}_to_$new_status", $post);2936 do_action(" ${new_status}_$post->post_type", $post->ID, $post);2935 do_action("{$old_status}_to_{$new_status}", $post); 2936 do_action("{$new_status}_{$post->post_type}", $post->ID, $post); 2937 2937 } 2938 2938
Note: See TracChangeset
for help on using the changeset viewer.