media_send_to_editor

media_send_to_editor

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('media_send_to_editor') is found 2 times:

  • /wp-admin/includes/ajax-actions.php line 3370
    3366
    3367
    3368
    3369
    3370
    3371
    3372
    3373
    3374
    3375
    3376
            }
        }
     
        /** 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 );
    }
     
    /**
     * Handles sending a link to the editor via AJAX.
  • /wp-admin/includes/media.php line 858
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
             * @param string $html       HTML markup for a media item sent to the editor.
             * @param int    $send_id    The first key from the $_POST['send'] data.
             * @param array  $attachment Array of attachment metadata.
             */
            $html = apply_filters( 'media_send_to_editor', $html, $send_id, $attachment );
     
            return media_send_to_editor( $html );
        }
     
        return $errors;
    }

See this hook used in plugins: