Restrict post IDs
git-svn-id: https://develop.svn.wordpress.org/trunk@21048 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
42b507572c
commit
28fa0ecd9e
@ -37,6 +37,9 @@ if ( isset($action) && $action == 'edit' && !$ID )
|
|||||||
if ( isset($_GET['inline']) ) {
|
if ( isset($_GET['inline']) ) {
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
|
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
|
||||||
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
check_admin_referer('media-form');
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
@ -59,6 +62,9 @@ if ( isset($_GET['inline']) ) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isset( $_REQUEST['post_id'] ) )
|
||||||
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
$title = __('Upload New Media');
|
$title = __('Upload New Media');
|
||||||
$parent_file = 'upload.php';
|
$parent_file = 'upload.php';
|
||||||
get_current_screen()->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
@ -116,6 +122,8 @@ if ( isset($_GET['inline']) ) {
|
|||||||
include('./admin-footer.php');
|
include('./admin-footer.php');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
|
||||||
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
// upload type: image, video, file, ..?
|
// upload type: image, video, file, ..?
|
||||||
if ( isset($_GET['type']) )
|
if ( isset($_GET['type']) )
|
||||||
|
Loading…
Reference in New Issue
Block a user