Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -9,8 +9,9 @@
|
|||
* @subpackage Administration
|
||||
*/
|
||||
|
||||
if ( ! isset( $_GET['inline'] ) )
|
||||
define( 'IFRAME_REQUEST' , true );
|
||||
if ( ! isset( $_GET['inline'] ) ) {
|
||||
define( 'IFRAME_REQUEST', true );
|
||||
}
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
@ -19,20 +20,20 @@ if ( ! current_user_can( 'upload_files' ) ) {
|
|||
wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
|
||||
}
|
||||
|
||||
wp_enqueue_script('plupload-handlers');
|
||||
wp_enqueue_script('image-edit');
|
||||
wp_enqueue_script('set-post-thumbnail' );
|
||||
wp_enqueue_style('imgareaselect');
|
||||
wp_enqueue_script( 'plupload-handlers' );
|
||||
wp_enqueue_script( 'image-edit' );
|
||||
wp_enqueue_script( 'set-post-thumbnail' );
|
||||
wp_enqueue_style( 'imgareaselect' );
|
||||
wp_enqueue_script( 'media-gallery' );
|
||||
|
||||
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
||||
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
||||
|
||||
// IDs should be integers
|
||||
$ID = isset($ID) ? (int) $ID : 0;
|
||||
$post_id = isset($post_id)? (int) $post_id : 0;
|
||||
$ID = isset( $ID ) ? (int) $ID : 0;
|
||||
$post_id = isset( $post_id ) ? (int) $post_id : 0;
|
||||
|
||||
// Require an ID for the edit screen.
|
||||
if ( isset( $action ) && $action == 'edit' && !$ID ) {
|
||||
if ( isset( $action ) && $action == 'edit' && ! $ID ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'Something went wrong.' ) . '</h1>' .
|
||||
'<p>' . __( 'Invalid item ID.' ) . '</p>',
|
||||
|
@ -40,7 +41,7 @@ if ( isset( $action ) && $action == 'edit' && !$ID ) {
|
|||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
|
||||
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post', $_REQUEST['post_id'] ) ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
|
||||
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
|
||||
|
@ -49,8 +50,8 @@ if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQU
|
|||
}
|
||||
|
||||
// Upload type: image, video, file, ..?
|
||||
if ( isset($_GET['type']) ) {
|
||||
$type = strval($_GET['type']);
|
||||
if ( isset( $_GET['type'] ) ) {
|
||||
$type = strval( $_GET['type'] );
|
||||
} else {
|
||||
/**
|
||||
* Filters the default media upload type in the legacy (pre-3.5.0) media popup.
|
||||
|
@ -64,8 +65,8 @@ if ( isset($_GET['type']) ) {
|
|||
}
|
||||
|
||||
// Tab: gallery, library, or type-specific.
|
||||
if ( isset($_GET['tab']) ) {
|
||||
$tab = strval($_GET['tab']);
|
||||
if ( isset( $_GET['tab'] ) ) {
|
||||
$tab = strval( $_GET['tab'] );
|
||||
} else {
|
||||
/**
|
||||
* Filters the default tab in the legacy (pre-3.5.0) media popup.
|
||||
|
@ -80,7 +81,7 @@ if ( isset($_GET['tab']) ) {
|
|||
$body_id = 'media-upload';
|
||||
|
||||
// Let the action code decide how to handle the request.
|
||||
if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_upload_tabs() ) ) {
|
||||
if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab, media_upload_tabs() ) ) {
|
||||
/**
|
||||
* Fires inside specific upload-type views in the legacy (pre-3.5.0)
|
||||
* media popup based on the current tab.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue