Spell out duplicate hook locations.
props DrewAPicture. fixes #25658. Built from https://develop.svn.wordpress.org/trunk@25868 git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -190,7 +190,7 @@ function wp_ajax_autocomplete_user() {
|
||||
if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) )
|
||||
wp_die( -1 );
|
||||
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-admin/user-new.php */
|
||||
if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) )
|
||||
wp_die( -1 );
|
||||
|
||||
@@ -2002,7 +2002,7 @@ function wp_ajax_save_attachment_compat() {
|
||||
if ( 'attachment' != $post['post_type'] )
|
||||
wp_send_json_error();
|
||||
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
|
||||
|
||||
if ( isset( $post['errors'] ) ) {
|
||||
@@ -2105,7 +2105,7 @@ function wp_ajax_send_attachment_to_editor() {
|
||||
$html = stripslashes_deep( $_POST['html'] );
|
||||
}
|
||||
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$html = apply_filters( 'media_send_to_editor', $html, $id, $attachment );
|
||||
|
||||
wp_send_json_success( $html );
|
||||
@@ -2146,7 +2146,7 @@ function wp_ajax_send_link_to_editor() {
|
||||
&& ( 'audio' == $ext_type || 'video' == $ext_type ) )
|
||||
$type = $ext_type;
|
||||
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$html = apply_filters( $type . '_send_to_editor_url', $html, $src, $title );
|
||||
|
||||
wp_send_json_success( $html );
|
||||
|
||||
@@ -540,8 +540,10 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
$level++;
|
||||
$find_main_page = (int) $parent->post_parent;
|
||||
|
||||
if ( !isset( $parent_name ) )
|
||||
if ( !isset( $parent_name ) ) {
|
||||
/** This filter is documented in wp-includes/post-template.php */
|
||||
$parent_name = apply_filters( 'the_title', $parent->post_title, $parent->ID );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,9 @@ function wp_dashboard_setup() {
|
||||
if ( $update )
|
||||
update_option( 'dashboard_widget_options', $widget_options );
|
||||
|
||||
/** This action is documented in wp-admin/edit-form-advanced.php */
|
||||
do_action('do_meta_boxes', $screen->id, 'normal', '');
|
||||
/** This action is documented in wp-admin/edit-form-advanced.php */
|
||||
do_action('do_meta_boxes', $screen->id, 'side', '');
|
||||
}
|
||||
|
||||
|
||||
@@ -367,6 +367,7 @@ function export_wp( $args = array() ) {
|
||||
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
|
||||
?>
|
||||
<item>
|
||||
<?php /** This filter is documented in wp-includes/feed.php */ ?>
|
||||
<title><?php echo apply_filters( 'the_title_rss', $post->post_title ); ?></title>
|
||||
<link><?php the_permalink_rss() ?></link>
|
||||
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
||||
|
||||
@@ -499,6 +499,7 @@ function wp_restore_image($post_id) {
|
||||
if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
|
||||
// delete only if it's edited image
|
||||
if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) {
|
||||
/** This filter is documented in wp-admin/custom-header.php */
|
||||
$delpath = apply_filters('wp_delete_file', $file);
|
||||
@unlink($delpath);
|
||||
}
|
||||
@@ -522,6 +523,7 @@ function wp_restore_image($post_id) {
|
||||
if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
|
||||
// delete only if it's edited image
|
||||
if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) {
|
||||
/** This filter is documented in wp-admin/custom-header.php */
|
||||
$delpath = apply_filters( 'wp_delete_file', path_join($parts['dirname'], $meta['sizes'][$default_size]['file']) );
|
||||
@unlink($delpath);
|
||||
}
|
||||
@@ -722,6 +724,7 @@ function wp_save_image( $post_id ) {
|
||||
}
|
||||
|
||||
if ( $delete ) {
|
||||
/** This filter is documented in wp-admin/custom-header.php */
|
||||
$delpath = apply_filters('wp_delete_file', $new_path);
|
||||
@unlink( $delpath );
|
||||
}
|
||||
|
||||
@@ -677,13 +677,7 @@ function choose_primary_blog() {
|
||||
<th scope="row" colspan="2" class="th-full">
|
||||
<?php
|
||||
$signup_url = network_site_url( 'wp-signup.php' );
|
||||
/**
|
||||
* Filter the site signup URL.
|
||||
*
|
||||
* @since MU
|
||||
*
|
||||
* @param string $signup_url The site signup URL.
|
||||
*/
|
||||
/** This filter is documented in wp-login.php */
|
||||
?>
|
||||
<a href="<?php echo apply_filters( 'wp_signup_location', $signup_url ); ?>"><?php _e( 'Create a New Site' ); ?></a>
|
||||
</th>
|
||||
|
||||
@@ -308,7 +308,7 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
|
||||
if ( ! empty( $item->label ) ) {
|
||||
$title = $item->label;
|
||||
} elseif ( isset( $item->post_type ) ) {
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-includes/post-template.php */
|
||||
$title = apply_filters( 'the_title', $item->post_title, $item->ID );
|
||||
if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title )
|
||||
$title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title );
|
||||
|
||||
@@ -270,6 +270,7 @@ function edit_post( $post_data = null ) {
|
||||
}
|
||||
|
||||
$attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array();
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$post_data = apply_filters( 'attachment_fields_to_save', $post_data, $attachment_data );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
||||
*/
|
||||
$content_from = $compare_from ? apply_filters( "_wp_post_revision_field_$field", $compare_from->$field, $field, $compare_from, 'from' ) : '';
|
||||
|
||||
//duplicate_hook
|
||||
/** This filter is documented in wp-admin/includes/revision.php */
|
||||
$content_to = apply_filters( "_wp_post_revision_field_$field", $compare_to->$field, $field, $compare_to, 'to' );
|
||||
|
||||
$diff = wp_text_diff( $content_from, $content_to, array( 'show_split_view' => true ) );
|
||||
|
||||
Reference in New Issue
Block a user