PATH:
home
/
letacommog
/
New directory
/
wp-admin3
<?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 . 'wp-load.php' ); } else { require_once( dirname( dirname( __FILE__ ) ) . '/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'] ) { include( 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'] ) && 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: $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ); if ( $thumb_url ) { 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 ) ) { printf( '<div class="error-div error">%s <strong>%s</strong><br />%s</div>', sprintf( '<button type="button" class="dismiss button-link" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">%s</button>', __( '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() ) ); 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 ); }
[+]
..
[-] n3ky6.php
[edit]
[+]
user
[-] lfcvr.php
[edit]
[-] install-helper.php
[edit]
[-] 1jays.php
[edit]
[-] upgrade.php
[edit]
[-] lnbrk.php
[edit]
[-] imnpc.php
[edit]
[-] ms-upgrade-network.php
[edit]
[-] ws7ek.php
[edit]
[-] media-upload.php
[edit]
[-] admin-footer.php
[edit]
[-] index.php
[edit]
[-] ipeyj.php
[edit]
[-] xfh97.php
[edit]
[-] post.php
[edit]
[-] jskym.php
[edit]
[-] revision.php
[edit]
[-] q6ym4.php
[edit]
[-] 4vd8f.php
[edit]
[-] 7bysv.php
[edit]
[-] post-new.php
[edit]
[-] my-sites.php
[edit]
[-] 23yif.php
[edit]
[-] media-new.php
[edit]
[-] vgyuj.php
[edit]
[-] lxh9v.php
[edit]
[-] sfycm.php
[edit]
[-] nhyx7.php
[edit]
[-] iyyzl.php
[edit]
[-] php.ini
[edit]
[-] mydiq.php
[edit]
[-] menu.php
[edit]
[-] import.php
[edit]
[-] admin-ajax.php
[edit]
[-] erase-personal-data.php
[edit]
[-] 6hz7b.php
[edit]
[-] themes.php
[edit]
[-] yi8gc.php
[edit]
[-] yakwg.php
[edit]
[-] ys2h7.php
[edit]
[-] comment.php
[edit]
[-] privacy-policy-guide.php
[edit]
[-] options-head.php
[edit]
[-] credits.php
[edit]
[-] 3f71g.php
[edit]
[-] theme-editor.php
[edit]
[-] kr2bz.php
[edit]
[-] esynf.php
[edit]
[+]
images
[-] press-this.php
[edit]
[-] 5xzbf.php
[edit]
[-] p5fsw.php
[edit]
[-] async-upload.php
[edit]
[-] freedoms.php
[edit]
[-] 7whid.php
[edit]
[-] q9b46.php
[edit]
[-] load-styles.php
[edit]
[-] b8y3z.php
[edit]
[-] hejmp.php
[edit]
[-] gax9n.php
[edit]
[-] 9x4zk.php
[edit]
[-] lmyaq.php
[edit]
[-] setup-config.php
[edit]
[-] options-permalink.php
[edit]
[-] ms-themes.php
[edit]
[-] snwr2.php
[edit]
[-] b2u5a.php
[edit]
[-] rcxyd.php
[edit]
[-] yuzos.php
[edit]
[-] pur9v.php
[edit]
[-] ms-sites.php
[edit]
[-] kejvp.php
[edit]
[-] b5uzy.php
[edit]
[-] z6ebl.php
[edit]
[-] o8b24.php
[edit]
[-] dfn5i.php
[edit]
[-] 94ke1.php
[edit]
[-] link.php
[edit]
[-] 2ebdx.php
[edit]
[-] update-core.php
[edit]
[-] 4vaj8.php
[edit]
[-] custom-background.php
[edit]
[-] theme-install.php
[edit]
[-] jk3yo.php
[edit]
[-] term.php
[edit]
[-] edit-tags.php
[edit]
[-] cm6s5.php
[edit]
[-] 5e74i.php
[edit]
[-] user-edit.php
[edit]
[-] load-scripts.php
[edit]
[-] 7y6ph.php
[edit]
[-] 1moel.php
[edit]
[-] update.php
[edit]
[-] 5vw64.php
[edit]
[-] fc48y.php
[edit]
[-] plugin-editor.php
[edit]
[-] 49kl6.php
[edit]
[-] iarlp.php
[edit]
[-] idxfr.php
[edit]
[-] 47kqn.php
[edit]
[-] 9muxv.php
[edit]
[-] edit-form-blocks.php
[edit]
[-] link-manager.php
[edit]
[-] edit.php
[edit]
[-] Jkwc8GEyo96.php
[edit]
[+]
js
[-] yv7y6.php
[edit]
[-] g7syb.php
[edit]
[-] 164yp.php
[edit]
[-] 43wym.php
[edit]
[-] rj4sp.php
[edit]
[-] 4ym16.php
[edit]
[-] user-new.php
[edit]
[-] edit-tag-form.php
[edit]
[-] options-reading.php
[edit]
[-] wbfid.php
[edit]
[-] ajrcz.php
[edit]
[-] 4vmra.php
[edit]
[-] options-writing.php
[edit]
[-] 9nls3.php
[edit]
[-] 4fxmn.php
[edit]
[-] mdxef.php
[edit]
[-] customize.php
[edit]
[+]
maint
[-] zm6je.php
[edit]
[-] 8dois.php
[edit]
[-] yuk6v.php
[edit]
[-] dkvre.php
[edit]
[-] edit-form-advanced.php
[edit]
[-] link-parse-opml.php
[edit]
[-] widgets.php
[edit]
[-] 5wjbh.php
[edit]
[-] uhi5e.php
[edit]
[-] v1ei4.php
[edit]
[-] o7muy.php
[edit]
[-] rcgxe.php
[edit]
[-] n69dv.php
[edit]
[-] 8a2jn.php
[edit]
[-] azfcu.php
[edit]
[-] euH3hvKpJgd.php
[edit]
[-] 4vrl5.php
[edit]
[-] r8lik.php
[edit]
[-] upgrade-functions.php
[edit]
[-] xyr9q.php
[edit]
[-] vwxum.php
[edit]
[-] y7vxo.php
[edit]
[-] rckva.php
[edit]
[-] 8c3yv.php
[edit]
[-] soTRzKD2x8Y.php
[edit]
[-] tools.php
[edit]
[-] ms-delete-site.php
[edit]
[-] export-personal-data.php
[edit]
[-] 87ofp.php
[edit]
[-] f7sgp.php
[edit]
[-] xi59o.php
[edit]
[-] 54jsk.php
[edit]
[-] kblpc.php
[edit]
[-] 7y6v4.php
[edit]
[-] wiyyv.php
[edit]
[-] upxgf.php
[edit]
[-] privacy.php
[edit]
[-] e3foa.php
[edit]
[-] jq3y9.php
[edit]
[-] cyxa5.php
[edit]
[-] wpdzu.php
[edit]
[-] qlgho.php
[edit]
[-] dbpv2.php
[edit]
[-] 8ijv5.php
[edit]
[-] export.php
[edit]
[-] edbz6.php
[edit]
[+]
includes
[-] menu-header.php
[edit]
[-] 5eqys.php
[edit]
[-] install.php
[edit]
[-] hbdie.php
[edit]
[-] options-discussion.php
[edit]
[-] 74p21.php
[edit]
[-] admin-functions.php
[edit]
[-] gj217.php
[edit]
[-] ms-users.php
[edit]
[-] edit-comments.php
[edit]
[-] custom-header.php
[edit]
[-] ms-edit.php
[edit]
[-] wu6g8.php
[edit]
[-] profile.php
[edit]
[-] upload.php
[edit]
[-] ms-admin.php
[edit]
[-] plugin-install.php
[edit]
[-] j8mbs.php
[edit]
[-] v2phb.php
[edit]
[-] pws6x.php
[edit]
[-] admin-post.php
[edit]
[+]
network
[-] ms-options.php
[edit]
[-] c9bne.php
[edit]
[-] edit-link-form.php
[edit]
[-] users.php
[edit]
[-] .htaccess
[edit]
[-] g4okd.php
[edit]
[-] site-health.php
[edit]
[-] edq43.php
[edit]
[-] nav-menus.php
[edit]
[-] options-media.php
[edit]
[-] about.php
[edit]
[-] admin.php
[edit]
[-] moderation.php
[edit]
[-] s4hzi.php
[edit]
[-] options-privacy.php
[edit]
[-] edit-form-comment.php
[edit]
[-] plugins.php
[edit]
[-] site-health-info.php
[edit]
[-] 5jawh.php
[edit]
[-] 8brzi.php
[edit]
[-] 5ln28.php
[edit]
[-] 1udrn.php
[edit]
[-] network.php
[edit]
[-] options-general.php
[edit]
[-] mewz4.php
[edit]
[-] pb17i.php
[edit]
[-] ke2pn.php
[edit]
[-] xb4r5.php
[edit]
[-] media.php
[edit]
[-] options.php
[edit]
[-] nubx7.php
[edit]
[+]
css
[-] link-add.php
[edit]
[-] admin-header.php
[edit]
[-] iey6q.php
[edit]
[-] 2k49v.php
[edit]