Ticket #25658: 25658.diff
| File 25658.diff, 17.4 KB (added by , 13 years ago) |
|---|
-
src/wp-admin/admin-ajax.php
38 38 send_nosniff_header(); 39 39 nocache_headers(); 40 40 41 //duplicate_ hook41 //duplicate_action 42 42 do_action( 'admin_init' ); 43 43 44 44 $core_actions_get = array( -
src/wp-admin/admin-post.php
23 23 24 24 nocache_headers(); 25 25 26 //duplicate_ hook26 //duplicate_action 27 27 do_action( 'admin_init' ); 28 28 29 29 $action = 'admin_post'; -
src/wp-admin/custom-background.php
386 386 $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); 387 387 set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) ); 388 388 389 //duplicate_ hook389 //duplicate_action 390 390 do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication 391 391 $this->updated = true; 392 392 } … … 412 412 public function wp_set_background_image() { 413 413 if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit; 414 414 $attachment_id = absint($_POST['attachment_id']); 415 //duplicate_ hook415 //duplicate_filter 416 416 $sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) )); 417 417 $size = 'thumbnail'; 418 418 if ( in_array( $_POST['size'], $sizes ) ) -
src/wp-admin/custom-header.php
712 712 if ( ! $image || is_wp_error( $image ) ) 713 713 wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); 714 714 715 //duplicate_ hook715 //duplicate_filter 716 716 $image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication 717 717 718 718 $url = str_replace(basename($url), basename($image), $url); … … 854 854 if ( ! $cropped || is_wp_error( $cropped ) ) 855 855 wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); 856 856 857 //duplicate_ hook857 //duplicate_filter 858 858 $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication 859 859 860 860 $parent = get_post($attachment_id); … … 887 887 // cleanup 888 888 $medium = str_replace( basename( $original ), 'midsize-' . basename( $original ), $original ); 889 889 if ( file_exists( $medium ) ) { 890 //duplicate_ hook890 //duplicate_filter 891 891 @unlink( apply_filters( 'wp_delete_file', $medium ) ); 892 892 } 893 893 894 894 if ( empty( $_POST['create-new-attachment'] ) && empty( $_POST['skip-cropping'] ) ) { 895 //duplicate_ hook895 //duplicate_filter 896 896 @unlink( apply_filters( 'wp_delete_file', $original ) ); 897 897 } 898 898 -
src/wp-admin/edit-form-advanced.php
239 239 * @param WP_Post $post Post object. 240 240 */ 241 241 do_action( 'do_meta_boxes', $post_type, 'normal', $post ); 242 //duplicate_ hook242 //duplicate_action 243 243 do_action( 'do_meta_boxes', $post_type, 'advanced', $post ); 244 //duplicate_ hook244 //duplicate_action 245 245 do_action( 'do_meta_boxes', $post_type, 'side', $post ); 246 246 247 247 add_screen_option('layout_columns', array('max' => 2, 'default' => 2) ); -
src/wp-admin/includes/ajax-actions.php
190 190 if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) ) 191 191 wp_die( -1 ); 192 192 193 //duplicate_ hook193 //duplicate_filter 194 194 if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) 195 195 wp_die( -1 ); 196 196 … … 2002 2002 if ( 'attachment' != $post['post_type'] ) 2003 2003 wp_send_json_error(); 2004 2004 2005 //duplicate_ hook2005 //duplicate_filter 2006 2006 $post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data ); 2007 2007 2008 2008 if ( isset( $post['errors'] ) ) { … … 2105 2105 $html = stripslashes_deep( $_POST['html'] ); 2106 2106 } 2107 2107 2108 //duplicate_ hook2108 //duplicate_filter 2109 2109 $html = apply_filters( 'media_send_to_editor', $html, $id, $attachment ); 2110 2110 2111 2111 wp_send_json_success( $html ); … … 2146 2146 && ( 'audio' == $ext_type || 'video' == $ext_type ) ) 2147 2147 $type = $ext_type; 2148 2148 2149 //duplicate_ hook2149 //duplicate_filter 2150 2150 $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $title ); 2151 2151 2152 2152 wp_send_json_success( $html ); -
src/wp-admin/includes/nav-menu.php
308 308 if ( ! empty( $item->label ) ) { 309 309 $title = $item->label; 310 310 } elseif ( isset( $item->post_type ) ) { 311 //duplicate_ hook311 //duplicate_filter 312 312 $title = apply_filters( 'the_title', $item->post_title, $item->ID ); 313 313 if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title ) 314 314 $title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title ); -
src/wp-admin/includes/revision.php
70 70 */ 71 71 $content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : ''; 72 72 73 //duplicate_ hook73 //duplicate_filter 74 74 $content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' ); 75 75 76 76 $diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => true ) ); -
src/wp-admin/options-writing.php
28 28 'content' => '<p>' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you’ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '</p>', 29 29 ) ); 30 30 31 //duplicate_ hook31 //duplicate_filter 32 32 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { 33 33 get_current_screen()->add_help_tab( array( 34 34 'id' => 'options-postemail', … … 131 131 </div> 132 132 133 133 <?php 134 //duplicate_ hook134 //duplicate_filter 135 135 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { 136 136 ?> 137 137 <h3 class="title"><?php _e('Post via e-mail') ?></h3> … … 168 168 <?php } ?> 169 169 170 170 <?php 171 //duplicate_ hook171 //duplicate_filter 172 172 if ( apply_filters( 'enable_update_services_configuration', true ) ) { 173 173 ?> 174 174 <h3 class="title"><?php _e('Update Services') ?></h3> -
src/wp-admin/user-new.php
335 335 ?> 336 336 <p><?php _e('Create a brand new user and add them to this site.'); ?></p> 337 337 <?php 338 //duplicate_ hook338 //duplicate_action 339 339 ?> 340 340 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> 341 341 <input name="action" type="hidden" value="createuser" /> … … 427 427 </table> 428 428 429 429 <?php 430 //duplicate_ hook430 //duplicate_action 431 431 do_action( 'user_new_form', 'add-new-user' ); 432 432 ?> 433 433 -
src/wp-content/themes/twentyeleven/content-single.php
55 55 <div id="author-info"> 56 56 <div id="author-avatar"> 57 57 <?php 58 //duplicate_ hook58 //duplicate_filter 59 59 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); 60 60 ?> 61 61 </div><!-- #author-avatar --> -
src/wp-content/themes/twentyeleven/functions.php
528 528 if ( ! $has_url ) 529 529 $has_url = twentyeleven_url_grabber(); 530 530 531 //duplicate_ hook531 //duplicate_filter 532 532 return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); 533 533 } 534 534 -
src/wp-content/themes/twentyeleven/inc/widgets.php
55 55 ob_start(); 56 56 extract( $args, EXTR_SKIP ); 57 57 58 //duplicate_ hook58 //duplicate_filter 59 59 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base); 60 60 61 61 if ( ! isset( $instance['number'] ) ) -
src/wp-content/themes/twentyten/loop-single.php
38 38 <div id="entry-author-info"> 39 39 <div id="author-avatar"> 40 40 <?php 41 //duplicate_ hook41 //duplicate_filter 42 42 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); 43 43 ?> 44 44 </div><!-- #author-avatar --> -
src/wp-content/themes/twentytwelve/author.php
48 48 <div class="author-info"> 49 49 <div class="author-avatar"> 50 50 <?php 51 //duplicate_ hook51 //duplicate_filter 52 52 $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ); 53 53 echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); 54 54 ?> -
src/wp-includes/canonical.php
296 296 297 297 if ( 'wp-register.php' == basename( $redirect['path'] ) ) { 298 298 if ( is_multisite() ) 299 //duplicate_ hook299 //duplicate_filter 300 300 $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); 301 301 else 302 302 $redirect_url = site_url( 'wp-login.php?action=register' ); -
src/wp-includes/class-wp-embed.php
215 215 216 216 // If there was a result, return it 217 217 if ( $html ) { 218 //duplicate_ hook218 //duplicate_filter 219 219 return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_ID ); 220 220 } 221 221 } -
src/wp-includes/feed-rdf.php
31 31 <description><?php bloginfo_rss('description') ?></description> 32 32 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date> 33 33 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> 34 <?php //duplicate_ hook?>34 <?php //duplicate_filter ?> 35 35 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency> 36 36 <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> 37 37 <?php -
src/wp-includes/feed-rss2-comments.php
15 15 xmlns:atom="http://www.w3.org/2005/Atom" 16 16 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 17 17 <?php 18 //duplicate_ hook18 //duplicate_action 19 19 do_action( 'rss2_ns' ); 20 20 ?> 21 21 … … 41 41 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link> 42 42 <description><?php bloginfo_rss("description") ?></description> 43 43 <lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate> 44 <?php //duplicate_ hook?>44 <?php //duplicate_filter ?> 45 45 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> 46 <?php //duplicate_ hook?>46 <?php //duplicate_filter ?> 47 47 <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency> 48 48 <?php 49 49 /** … … 60 60 <title><?php 61 61 if ( !is_singular() ) { 62 62 $title = get_the_title($comment_post->ID); 63 //duplicate_ hook63 //duplicate_filter 64 64 $title = apply_filters('the_title_rss', $title); 65 65 printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 66 66 } else { -
src/wp-includes/nav-menu-template.php
147 147 148 148 $item_output = $args->before; 149 149 $item_output .= '<a'. $attributes .'>'; 150 //duplicate_ hook150 //duplicate_filter 151 151 $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; 152 152 $item_output .= '</a>'; 153 153 $item_output .= $args->after; -
src/wp-login.php
619 619 <?php 620 620 if ( get_option( 'users_can_register' ) ) : 621 621 $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); 622 //duplicate_ hook622 //duplicate_filter 623 623 echo ' | ' . apply_filters( 'register', $registration_url ); 624 624 endif; 625 625 ?> … … 765 765 login_header( '', $message ); ?> 766 766 </div> 767 767 <?php 768 //duplicate_ hook768 //duplicate_action 769 769 do_action( 'login_footer' ); ?> 770 770 <?php if ( $customize_login ) : ?> 771 771 <script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script> … … 869 869 <?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : 870 870 if ( get_option( 'users_can_register' ) ) : 871 871 $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); 872 //duplicate_ hook872 //duplicate_filter 873 873 echo apply_filters( 'register', $registration_url ) . ' | '; 874 874 endif; 875 875 ?> -
src/wp-signup.php
433 433 <form id="setupform" method="post" action="wp-signup.php"> 434 434 <input type="hidden" name="stage" value="validate-user-signup" /> 435 435 <?php 436 //duplicate_ hook436 //duplicate_action 437 437 do_action( 'signup_hidden_fields', 'validate-user' ); 438 438 ?> 439 439 <?php show_user_form($user_name, $user_email, $errors); ?> … … 481 481 return false; 482 482 } 483 483 484 //duplicate_ hook484 //duplicate_filter 485 485 wpmu_signup_user( $user_name, $user_email, apply_filters( 'add_signup_meta', array() ) ); 486 486 487 487 confirm_user_signup($user_name, $user_email); … … 503 503 <p><?php printf( __( 'Check your inbox at <strong>%s</strong> and click the link given.' ), $user_email ); ?></p> 504 504 <p><?php _e( 'If you do not activate your username within two days, you will have to sign up again.' ); ?></p> 505 505 <?php 506 //duplicate_ hook506 //duplicate_action 507 507 do_action( 'signup_finished' ); 508 508 } 509 509 … … 563 563 <input type="hidden" name="user_name" value="<?php echo esc_attr($user_name) ?>" /> 564 564 <input type="hidden" name="user_email" value="<?php echo esc_attr($user_email) ?>" /> 565 565 <?php 566 //duplicate_ hook566 //duplicate_action 567 567 do_action( 'signup_hidden_fields', 'validate-site' ); 568 568 ?> 569 569 <?php show_blog_form($blogname, $blog_title, $errors); ?> … … 605 605 $public = (int) $_POST['blog_public']; 606 606 $meta = array ('lang_id' => 1, 'public' => $public); 607 607 608 //duplicate_ hook608 //duplicate_filter 609 609 $meta = apply_filters( 'add_signup_meta', $meta ); 610 610 611 611 wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta); … … 642 642 </ul> 643 643 </p> 644 644 <?php 645 //duplicate_ hook645 //duplicate_action 646 646 do_action( 'signup_finished' ); 647 647 } 648 648