X7ROOT File Manager
Current Path:
/var/softaculous/sitepad/editor/site-admin
var
/
softaculous
/
sitepad
/
editor
/
site-admin
/
??
..
??
admin-ajax.php
(4.32 KB)
??
admin-footer.php
(2.3 KB)
??
admin-header.php
(13.74 KB)
??
admin-post.php
(1.66 KB)
??
admin.php
(11.1 KB)
??
async-upload.php
(3.63 KB)
??
comment.php
(10.66 KB)
??
cookie-consent.php
(17.43 KB)
??
css
??
custom-background.php
(20.06 KB)
??
custom-header.php
(46.28 KB)
??
customize.php
(8.69 KB)
??
edit-form-advanced.php
(30.63 KB)
??
edit-form-blocks.php
(12.82 KB)
??
edit-form-comment.php
(7.32 KB)
??
edit-tag-form.php
(9.28 KB)
??
edit-tags.php
(21.41 KB)
??
edit.php
(21.76 KB)
??
export.php
(10.69 KB)
??
features.php
(4.64 KB)
??
fonts
??
google-analytics.php
(2.79 KB)
??
images
??
import.php
(7.28 KB)
??
includes
??
index.php
(12.57 KB)
??
js
??
load-scripts.php
(1.62 KB)
??
load-styles.php
(2.27 KB)
??
mailchimp.php
(4.51 KB)
??
media-new.php
(3.12 KB)
??
media-upload.php
(3.3 KB)
??
media.php
(5.54 KB)
??
menu-header.php
(7.63 KB)
??
menu.php
(9.83 KB)
??
nav-menus.php
(38.34 KB)
??
options-discussion.php
(14.83 KB)
??
options-general.php
(15.88 KB)
??
options-head.php
(492 B)
??
options-media.php
(6.05 KB)
??
options-permalink.php
(9.34 KB)
??
options-reading.php
(9.05 KB)
??
options.php
(11.6 KB)
??
plans.php
(9.32 KB)
??
post-new.php
(3.56 KB)
??
post.php
(10.65 KB)
??
privacy.php
(6.81 KB)
??
profile.php
(298 B)
??
revision.php
(5.06 KB)
??
seo.php
(3.98 KB)
??
setup.php
(22.96 KB)
??
sitemap.php
(7.88 KB)
??
smtp-mail.php
(12.75 KB)
??
term.php
(2.07 KB)
??
themes.php
(20.78 KB)
??
themes_setup.php
(18.26 KB)
??
upload.php
(13.46 KB)
??
user-edit.php
(21.36 KB)
??
user-new.php
(21.56 KB)
??
users.php
(18.62 KB)
Editing: async-upload.php
<?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 ); } if ( defined( 'ABSPATH' ) ) { require_once( ABSPATH . 'kickstart.php' ); } else { require_once( dirname( dirname( __FILE__ ) ) . '/kickstart.php' ); } require_once( ABSPATH . 'site-admin/admin.php' ); header( 'Content-Type: text/plain; charset=' . get_option( 'blog_charset' ) ); if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { include( ABSPATH . 'site-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'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) { $id = intval( $_REQUEST['attachment_id'] ); $post = get_post( $id ); if ( 'attachment' != $post->post_type ) { wp_die( __( 'Invalid post type.' ) ); } if ( ! current_user_can( 'edit_post', $id ) ) { wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); } switch ( $_REQUEST['fetch'] ) { case 3: if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) { echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />'; } echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>'; // Title shouldn't ever be empty, but use filename just in case. $file = get_attached_file( $post->ID ); $title = $post->post_title ? $post->post_title : wp_basename( $file ); echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60, '…' ) ) . '</span></div>'; 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 ) ) { echo '<div class="error-div error"> <button type="button" class="dismiss button-link" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __( 'Dismiss' ) . '</button> <strong>' . sprintf( __( '“%s” has failed to upload.' ), esc_html( $_FILES['async-upload']['name'] ) ) . '</strong><br />' . esc_html( $id->get_error_message() ) . '</div>'; 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, * such as 'image', 'audio', 'video', 'file', etc. * * @since 2.5.0 * * @param int $id Uploaded attachment ID. */ echo apply_filters( "async_upload_{$type}", $id ); }
Upload File
Create Folder