/home/u523506497/domains/mymelon.in/public_html/info/wp-admin UP
<?php
/**
* Manage media uploaded file.
*
* There are many filters in here for media. Plugins can extend functionality
* by hooking into the filters.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
}
wp_enqueue_script( 'plupload-handlers' );
$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;
}
}
if ( $_POST ) {
if ( isset( $_POST['html-upload'] ) && ! empty( $_FILES ) ) {
check_admin_referer( 'media-form' );
// Upload File button was clicked.
$upload_id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error( $upload_id ) ) {
wp_die( $upload_id );
}
}
wp_redirect( admin_url( 'upload.php' ) );
exit;
}
// Used in the HTML title tag.
$title = __( 'Upload Media' );
$parent_file = 'upload.php';
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:' ) . '</p>' .
'<ul>' .
'<li>' . __( '<strong>Drag and drop</strong> your files into the area below. Multiple files are allowed.' ) . '</li>' .
'<li>' . __( 'Clicking <strong>Select Files</strong> opens a navigation window showing you files in your operating system. Selecting <strong>Open</strong> after clicking on the file you want activates a progress bar on the uploader screen.' ) . '</li>' .
'<li>' . __( 'Revert to the <strong>Browser Uploader</strong> by clicking the link below the drag and drop box.' ) . '</li>' .
'</ul>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/media-add-new-screen/">Documentation on Uploading Media Files</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
require_once ABSPATH . 'wp-admin/admin-header.php';
$form_class = 'wp-upload-form media-upload-form type-form validate';
if ( get_user_setting( 'uploader' ) || isset( $_GET['browser-uploader'] ) ) {
$form_class .= ' html-uploader';
}
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="<?php echo esc_attr( $form_class ); ?>" id="file-form">
<?php media_upload_form(); ?>
<script>
var post_id = <?php echo absint( $post_id ); ?>, shortform = 3;
</script>
<input type="hidden" name="post_id" id="post_id" value="<?php echo absint( $post_id ); ?>" />
<?php wp_nonce_field( 'media-form' ); ?>
<div id="media-items" class="hide-if-no-js"></div>
</form>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
| about.php | 17994 | V |
| admin-ajax.php | 5146 | V |
| admin-footer.php | 2804 | V |
| admin-functions.php | 472 | V |
| admin-header.php | 9284 | V |
| admin-post.php | 2021 | V |
| admin.php | 12935 | V |
| async-upload.php | 5604 | V |
| authorize-application.php | 10335 | V |
| comment.php | 11643 | V |
| contribute.php | 5656 | V |
| credits.php | 4141 | V |
| css | - | |
| custom-background.php | 482 | V |
| custom-header.php | 492 | V |
| customize.php | 11586 | V |
| edit-comments.php | 14484 | V |
| edit-form-advanced.php | 29481 | V |
| edit-form-blocks.php | 15528 | V |
| edit-form-comment.php | 13980 | V |
| edit-link-form.php | 6347 | V |
| edit-tag-form.php | 10658 | V |
| edit-tags.php | 22510 | V |
| edit.php | 19952 | V |
| erase-personal-data.php | 7505 | V |
| export-personal-data.php | 7940 | V |
| export.php | 11265 | V |
| font-library.php | 1480 | V |
| freedoms.php | 4574 | V |
| images | - | |
| import.php | 7766 | V |
| includes | - | |
| index.php | 7864 | V |
| install-helper.php | 6961 | V |
| install.php | 18375 | V |
| js | - | |
| link-add.php | 934 | V |
| link-manager.php | 4361 | V |
| link-parse-opml.php | 2721 | V |
| link.php | 2957 | V |
| load-scripts.php | 2070 | V |
| load-styles.php | 2995 | V |
| maint | - | |
| media-new.php | 3249 | V |
| media-upload.php | 3668 | V |
| media.php | 819 | V |
| menu-header.php | 10052 | V |
| menu.php | 18134 | V |
| moderation.php | 307 | V |
| ms-admin.php | 196 | V |
| ms-delete-site.php | 4613 | V |
| ms-edit.php | 216 | V |
| ms-options.php | 229 | V |
| ms-sites.php | 215 | V |
| ms-themes.php | 217 | V |
| ms-upgrade-network.php | 219 | V |
| ms-users.php | 215 | V |
| my-sites.php | 4831 | V |
| nav-menus.php | 50199 | V |
| network | - | |
| network.php | 5523 | V |
| options-connectors.php | 1543 | V |
| options-discussion.php | 16403 | V |
| options-general.php | 22855 | V |
| options-head.php | 614 | V |
| options-media.php | 6640 | V |
| options-permalink.php | 22491 | V |
| options-privacy.php | 10704 | V |
| options-reading.php | 10198 | V |
| options-writing.php | 9404 | V |
| options.php | 14266 | V |
| plugin-editor.php | 14071 | V |
| plugin-install.php | 7433 | V |
| plugins.php | 30744 | V |
| post-new.php | 2768 | V |
| post.php | 10821 | V |
| press-this.php | 2470 | V |
| privacy-policy-guide.php | 3756 | V |
| privacy.php | 2512 | V |
| profile.php | 283 | V |
| revision.php | 5836 | V |
| setup-config.php | 17928 | V |
| site-editor.php | 12483 | V |
| site-health-info.php | 4173 | V |
| site-health.php | 10427 | V |
| term.php | 2249 | V |
| theme-editor.php | 17279 | V |
| theme-install.php | 24315 | V |
| themes.php | 49728 | V |
| tools.php | 3514 | V |
| update-core.php | 46202 | V |
| update.php | 13062 | V |
| upgrade-functions.php | 341 | V |
| upgrade.php | 6390 | V |
| upload.php | 15292 | V |
| user | - | |
| user-edit.php | 41844 | V |
| user-new.php | 24664 | V |
| users.php | 25698 | V |
| widgets-form-blocks.php | 5235 | V |
| widgets-form.php | 19588 | V |
| widgets.php | 1112 | V |