]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/press-this.php
WordPress 4.4-scripts
[autoinstalls/wordpress.git] / wp-admin / press-this.php
1 <?php
2 /**
3  * Press This Display and Handler.
4  *
5  * @package WordPress
6  * @subpackage Press_This
7  */
8
9 define('IFRAME_REQUEST' , true);
10
11 /** WordPress Administration Bootstrap */
12 require_once( dirname( __FILE__ ) . '/admin.php' );
13
14 if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
15         wp_die(
16                 '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
17                 '<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
18                 403
19         );
20 }
21
22 /**
23  * @global WP_Press_This $wp_press_this
24  */
25 if ( empty( $GLOBALS['wp_press_this'] ) ) {
26         include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
27 }
28
29 $GLOBALS['wp_press_this']->html();