Changeset 16365
- Timestamp:
- 11/14/2010 03:50:02 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-terms-list-table.php
r16254 r16365 251 251 252 252 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); 253 $actions = apply_filters( " ${taxonomy}_row_actions", $actions, $tag );253 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); 254 254 255 255 $out .= $this->row_actions( $actions ); -
trunk/wp-admin/includes/post.php
r16174 r16365 1023 1023 if ( !empty($uri) ) 1024 1024 $uri .= '/'; 1025 $permalink = str_replace('%pagename%', " ${uri}%pagename%", $permalink);1025 $permalink = str_replace('%pagename%', "{$uri}%pagename%", $permalink); 1026 1026 } 1027 1027 -
trunk/wp-admin/includes/widgets.php
r16313 r16365 99 99 $hidden = isset($params[0]['_hide']) ? ' style="display:none;"' : ''; 100 100 101 $params[0]['before_widget'] = "<div id='widget- ${i}_$id' class='widget'$hidden>";101 $params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>"; 102 102 $params[0]['after_widget'] = "</div>"; 103 103 $params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated -
trunk/wp-includes/comment.php
r16357 r16365 1162 1162 if ( $new_status != $old_status ) { 1163 1163 do_action('transition_comment_status', $new_status, $old_status, $comment); 1164 do_action("comment_ ${old_status}_to_$new_status", $comment);1165 } 1166 do_action("comment_ ${new_status}_$comment->comment_type", $comment->comment_ID, $comment);1164 do_action("comment_{$old_status}_to_{$new_status}", $comment); 1165 } 1166 do_action("comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment); 1167 1167 } 1168 1168 -
trunk/wp-includes/functions.php
r16340 r16365 4227 4227 4228 4228 if ( $context != '' ) { 4229 $extra_headers = apply_filters( "extra_ $context".'_headers', array() );4229 $extra_headers = apply_filters( "extra_{$context}".'_headers', array() ); 4230 4230 4231 4231 $extra_headers = array_flip( $extra_headers ); -
trunk/wp-includes/general-template.php
r16303 r16365 1122 1122 $thisyear = ''.intval(substr($m, 0, 4)); 1123 1123 $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's 1124 $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD(' ${thisyear}0101', INTERVAL $d DAY) ), '%m')");1124 $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')"); 1125 1125 } elseif ( !empty($m) ) { 1126 1126 $thisyear = ''.intval(substr($m, 0, 4)); -
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 -
trunk/wp-includes/taxonomy.php
r16322 r16365 1384 1384 1385 1385 if ( 'edit' == $context ) { 1386 $value = apply_filters("edit_term_ $field", $value, $term_id, $taxonomy);1387 $value = apply_filters("edit_ ${taxonomy}_$field", $value, $term_id);1386 $value = apply_filters("edit_term_{$field}", $value, $term_id, $taxonomy); 1387 $value = apply_filters("edit_{$taxonomy}_{$field}", $value, $term_id); 1388 1388 if ( 'description' == $field ) 1389 1389 $value = format_to_edit($value); … … 1391 1391 $value = esc_attr($value); 1392 1392 } else if ( 'db' == $context ) { 1393 $value = apply_filters("pre_term_ $field", $value, $taxonomy);1394 $value = apply_filters("pre_ ${taxonomy}_$field", $value);1393 $value = apply_filters("pre_term_{$field}", $value, $taxonomy); 1394 $value = apply_filters("pre_{$taxonomy}_{$field}", $value); 1395 1395 // Back compat filters 1396 1396 if ( 'slug' == $field ) … … 1398 1398 1399 1399 } else if ( 'rss' == $context ) { 1400 $value = apply_filters("term_ ${field}_rss", $value, $taxonomy);1401 $value = apply_filters(" ${taxonomy}_${field}_rss", $value);1400 $value = apply_filters("term_{$field}_rss", $value, $taxonomy); 1401 $value = apply_filters("{$taxonomy}_{$field}_rss", $value); 1402 1402 } else { 1403 1403 // Use display filters by default. 1404 $value = apply_filters("term_ $field", $value, $term_id, $taxonomy, $context);1405 $value = apply_filters(" ${taxonomy}_$field", $value, $term_id, $context);1404 $value = apply_filters("term_{$field}", $value, $term_id, $taxonomy, $context); 1405 $value = apply_filters("{$taxonomy}_{$field}", $value, $term_id, $context); 1406 1406 } 1407 1407 -
trunk/wp-includes/user.php
r16353 r16365 1149 1149 * 1150 1150 * @since 2.3.0 1151 * @uses apply_filters() Calls 'edit_$field' and ' ${field_no_prefix}_edit_pre' passing $value and1151 * @uses apply_filters() Calls 'edit_$field' and '{$field_no_prefix}_edit_pre' passing $value and 1152 1152 * $user_id if $context == 'edit' and field name prefix == 'user_'. 1153 1153 * 1154 1154 * @uses apply_filters() Calls 'edit_user_$field' passing $value and $user_id if $context == 'db'. 1155 1155 * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'user_'. 1156 * @uses apply_filters() Calls ' ${field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'.1156 * @uses apply_filters() Calls '{$field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'. 1157 1157 * 1158 1158 * @uses apply_filters() Calls '$field' passing $value, $user_id and $context if $context == anything … … 1187 1187 if ( 'edit' == $context ) { 1188 1188 if ( $prefixed ) { 1189 $value = apply_filters("edit_ $field", $value, $user_id);1189 $value = apply_filters("edit_{$field}", $value, $user_id); 1190 1190 } else { 1191 $value = apply_filters("edit_user_ $field", $value, $user_id);1191 $value = apply_filters("edit_user_{$field}", $value, $user_id); 1192 1192 } 1193 1193 … … 1198 1198 } else if ( 'db' == $context ) { 1199 1199 if ( $prefixed ) { 1200 $value = apply_filters("pre_ $field", $value);1200 $value = apply_filters("pre_{$field}", $value); 1201 1201 } else { 1202 $value = apply_filters("pre_user_ $field", $value);1202 $value = apply_filters("pre_user_{$field}", $value); 1203 1203 } 1204 1204 } else { … … 1207 1207 $value = apply_filters($field, $value, $user_id, $context); 1208 1208 else 1209 $value = apply_filters("user_ $field", $value, $user_id, $context);1209 $value = apply_filters("user_{$field}", $value, $user_id, $context); 1210 1210 } 1211 1211
Note: See TracChangeset
for help on using the changeset viewer.