??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/tlma.co.uk/wp-admin/async-upload.php
⬅ Kembali
<?php
/**
* Server-side file upload handler from wp-plupload or other asynchronous upload methods.
*
* @package WordPress
* @subpackage Administration
*/
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
define( 'DOING_AJAX', true );
}
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
require_once ABSPATH . 'wp-admin/admin.php';
header( 'Content-Type: text/plain; charset=' . get_option( 'blog_charset' ) );
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
require ABSPATH . 'wp-admin/includes/ajax-actions.php';
send_nosniff_header();
nocache_headers();
wp_ajax_upload_attachment();
die( '0' );
}
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
}
// Just fetch the detail form for that attachment.
if ( isset( $_REQUEST['attachment_id'] ) && (int) $_REQUEST['attachment_id'] && $_REQUEST['fetch'] ) {
$id = (int) $_REQUEST['attachment_id'];
$post = get_post( $id );
if ( 'attachment' !== $post->post_type ) {
wp_die( __( 'Invalid post type.' ) );
}
switch ( $_REQUEST['fetch'] ) {
case 3:
?>
<div class="media-item-wrapper">
<div class="attachment-details">
<?php
$thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true );
if ( $thumb_url ) {
echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
}
// Title shouldn't ever be empty, but use filename just in case.
$file = get_attached_file( $post->ID );
$file_url = wp_get_attachment_url( $post->ID );
$title = $post->post_title ? $post->post_title : wp_basename( $file );
?>
<div class="filename new">
<span class="media-list-title word-wrap-break-word"><strong><?php echo esc_html( wp_html_excerpt( $title, 60, '…' ) ); ?></strong></span>
<span class="media-list-subtitle word-wrap-break-word"><?php echo esc_html( wp_basename( $file ) ); ?></span>
<div class="attachment-tools">
<?php
if ( current_user_can( 'edit_post', $id ) ) {
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '">' . _x( 'Edit', 'media item' ) . '</a>';
} else {
echo '<span class="edit-attachment">' . _x( 'Success', 'media item' ) . '</span>';
}
?>
<span class="media-item-copy-container copy-to-clipboard-container edit-attachment">
<button type="button" class="button button-small copy-attachment-url"
data-clipboard-text="<?php echo esc_url( $file_url ); ?>"
><?php _e( 'Copy URL to clipboard' ); ?></button>
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
</span>
</div>
</div>
</div>
</div>
<?php
break;
case 2:
add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
echo get_media_item(
$id,
array(
'send' => false,
'delete' => true,
)
);
break;
default:
add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 );
echo get_media_item( $id );
break;
}
exit;
}
check_admin_referer( 'media-form' );
$post_id = 0;
if ( isset( $_REQUEST['post_id'] ) ) {
$post_id = absint( $_REQUEST['post_id'] );
if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) {
$post_id = 0;
}
}
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error( $id ) ) {
$button_unique_id = uniqid( 'dismiss-' );
$error_description_id = uniqid( 'error-description-' );
$message = sprintf(
'%s <strong>%s</strong><br />%s',
sprintf(
'<button type="button" id="%1$s" class="dismiss button-link" aria-describedby="%2$s">%3$s</button>',
esc_attr( $button_unique_id ),
esc_attr( $error_description_id ),
__( 'Dismiss' )
),
sprintf(
/* translators: %s: Name of the file that failed to upload. */
__( '“%s” has failed to upload.' ),
esc_html( $_FILES['async-upload']['name'] )
),
esc_html( $id->get_error_message() )
);
wp_admin_notice(
$message,
array(
'id' => $error_description_id,
'additional_classes' => array( 'error-div', 'error' ),
'paragraph_wrap' => false,
)
);
$speak_message = sprintf(
/* translators: %s: Name of the file that failed to upload. */
__( '%s has failed to upload.' ),
$_FILES['async-upload']['name']
);
echo '<script>_.delay(function() {wp.a11y.speak(' . wp_json_encode( $speak_message, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ");}, 1500);jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );jQuery( '#plupload-browse-button' ).trigger( 'focus' );})});</script>\n";
exit;
}
if ( $_REQUEST['short'] ) {
// Short form response - attachment ID only.
echo $id;
} else {
// Long form response - big chunk of HTML.
$type = $_REQUEST['type'];
/**
* Filters the returned ID of an uploaded attachment.
*
* The dynamic portion of the hook name, `$type`, refers to the attachment type.
*
* Possible hook names include:
*
* - `async_upload_audio`
* - `async_upload_file`
* - `async_upload_image`
* - `async_upload_video`
*
* @since 2.5.0
*
* @param int $id Uploaded attachment ID.
*/
echo apply_filters( "async_upload_{$type}", $id );
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 css
dir
—
2026-06-05 13:16
📁 images
dir
—
2026-06-05 13:16
📁 includes
dir
—
2026-06-17 07:54
📁 js
dir
—
2026-06-05 13:16
📁 maint
dir
—
2026-06-05 13:16
📁 network
dir
—
2026-06-05 13:16
📁 user
dir
—
2026-06-05 13:16
🐘 about.php
php
16 KB
2026-05-14 18:51
🐘 admin-ajax.php
php
5 KB
2024-07-04 15:22
🐘 admin-footer.php
php
2.7 KB
2026-01-05 21:04
🐘 admin-functions.php
php
479 B
2025-01-22 19:06
🐘 admin-header.php
php
9.1 KB
2026-02-15 13:02
🐘 admin-post.php
php
2 KB
2025-01-16 21:18
🐘 admin.php
php
12.6 KB
2026-03-13 03:24
🐘 async-upload.php
php
5.5 KB
2025-08-27 14:34
🐘 authorize-application.php
php
10.1 KB
2023-09-14 04:54
🐘 comment.php
php
11.4 KB
2026-03-07 04:20
🐘 contribute.php
php
5.9 KB
2026-05-14 18:51
🐘 credits.php
php
4.4 KB
2026-05-14 18:51
🐘 custom-background.php
php
489 B
2025-01-22 19:06
🐘 custom-header.php
php
499 B
2025-01-22 19:06
🐘 customize.php
php
11.2 KB
2026-05-13 11:20
🐘 edit-comments.php
php
14.1 KB
2026-02-13 22:52
🐘 edit-form-advanced.php
php
28.8 KB
2026-01-05 21:04
🐘 edit-form-blocks.php
php
14.7 KB
2026-02-20 16:52
🐘 edit-form-comment.php
php
8.3 KB
2026-02-16 22:02
🐘 edit-link-form.php
php
6.2 KB
2025-02-08 16:44
🐘 edit-tag-form.php
php
10.4 KB
2026-01-05 21:04
🐘 edit-tags.php
php
22 KB
2026-01-05 21:04
🐘 edit.php
php
19.5 KB
2024-10-04 02:46
🐘 erase-personal-data.php
php
7.3 KB
2024-04-18 00:21
📄 error_log
file
525 B
2026-06-25 05:04
🐘 export-personal-data.php
php
7.8 KB
2024-04-18 00:21
🐘 export.php
php
11 KB
2026-01-05 21:04
🐘 font-library.php
php
1 KB
2026-01-19 22:00
🐘 freedoms.php
php
4.8 KB
2026-05-14 18:51
🐘 import.php
php
7.6 KB
2025-02-25 23:34
🐘 index.php
php
7.7 KB
2023-09-14 04:54
🐘 install-helper.php
php
6.8 KB
2022-11-20 19:10
🐘 install.php
php
17.9 KB
2026-02-19 02:14
🐘 link-add.php
php
934 B
2025-02-08 16:44
🐘 link-manager.php
php
4.3 KB
2025-02-08 16:44
🐘 link-parse-opml.php
php
2.6 KB
2026-01-09 07:40
🐘 link.php
php
2.9 KB
2024-05-01 22:01
🐘 load-scripts.php
php
2 KB
2024-08-26 03:48
🐘 load-styles.php
php
2.9 KB
2024-11-04 20:51
🐘 media-new.php
php
3.2 KB
2026-02-01 15:18
🐘 media-upload.php
php
3.6 KB
2025-02-08 20:53
🐘 media.php
php
819 B
2024-05-01 22:01
🐘 menu-header.php
php
9.8 KB
2025-02-21 02:29
🐘 menu.php
php
17.7 KB
2026-04-27 04:04
🐘 moderation.php
php
307 B
2020-02-06 11:33
🐘 ms-admin.php
php
196 B
2020-02-06 11:33
🐘 ms-delete-site.php
php
4.5 KB
2025-04-21 15:49
🐘 ms-edit.php
php
216 B
2020-02-06 11:33
🐘 ms-options.php
php
229 B
2024-06-22 15:47
🐘 ms-sites.php
php
215 B
2020-02-06 11:33
🐘 ms-themes.php
php
217 B
2020-02-06 11:33
🐘 ms-upgrade-network.php
php
219 B
2020-02-06 11:33
🐘 ms-users.php
php
215 B
2020-02-06 11:33
🐘 my-sites.php
php
4.7 KB
2026-01-06 10:57
🐘 nav-menus.php
php
49.1 KB
2026-02-17 11:47
🐘 network.php
php
5.4 KB
2024-03-09 03:38
🐘 options-connectors.php
php
1.1 KB
2026-03-05 17:09
🐘 options-discussion.php
php
15.9 KB
2025-11-11 03:51
🐘 options-general.php
php
22.3 KB
2026-02-28 04:43
🐘 options-head.php
php
621 B
2025-01-22 19:06
🐘 options-media.php
php
6.4 KB
2025-09-29 02:38
🐘 options-permalink.php
php
21.9 KB
2026-03-05 00:48
🐘 options-privacy.php
php
9.9 KB
2026-01-09 09:22
🐘 options-reading.php
php
10 KB
2026-03-23 03:06
🐘 options-writing.php
php
9.1 KB
2026-05-08 19:59
🐘 options.php
php
13.9 KB
2026-05-08 19:59
🐘 plugin-editor.php
php
13.8 KB
2025-10-14 01:50
🐘 plugin-install.php
php
7 KB
2024-02-20 12:27
🐘 plugins.php
php
30 KB
2025-10-14 03:12
🐘 post-new.php
php
2.7 KB
2024-06-15 16:34
🐘 post.php
php
10 KB
2025-09-06 10:49
🐘 press-this.php
php
2.4 KB
2026-02-20 07:25
🐘 privacy-policy-guide.php
php
3.7 KB
2023-11-22 22:44
🐘 privacy.php
php
2.8 KB
2026-05-14 18:51
🐘 profile.php
php
283 B
2020-02-06 11:33
🐘 revision.php
php
5.7 KB
2025-10-07 18:30
🐘 setup-config.php
php
17.5 KB
2026-02-19 02:14
🐘 site-editor.php
php
12.1 KB
2026-02-20 16:52
🐘 site-health-info.php
php
4.1 KB
2026-02-12 02:10
🐘 site-health.php
php
10.2 KB
2026-01-06 10:57
🐘 term.php
php
2.2 KB
2022-06-01 22:14
🐘 theme-editor.php
php
16.9 KB
2025-10-16 04:16
🐘 theme-install.php
php
23.6 KB
2026-05-19 15:36
🐘 themes.php
php
47.9 KB
2025-11-11 02:08
🐘 tools.php
php
3.4 KB
2023-02-23 15:38
🐘 update-core.php
php
45.1 KB
2026-01-23 23:14
🐘 update.php
php
12.8 KB
2026-01-09 07:48
🐘 upgrade-functions.php
php
341 B
2020-02-06 11:33
🐘 upgrade.php
php
6.2 KB
2026-02-19 02:14
🐘 upload.php
php
14.9 KB
2026-01-09 07:26
🐘 user-edit.php
php
40.4 KB
2026-04-27 10:12
🐘 user-new.php
php
24.1 KB
2026-02-16 22:02
🐘 users.php
php
23.4 KB
2026-03-14 12:15
🐘 widgets-form-blocks.php
php
5.1 KB
2025-08-27 14:34
🐘 widgets-form.php
php
19.1 KB
2026-02-19 03:03
🐘 widgets.php
php
1.1 KB
2022-03-22 23:59