press-this.php 635 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Press This Display and Handler.
  4. *
  5. * @package WordPress
  6. * @subpackage Press_This
  7. */
  8. define('IFRAME_REQUEST' , true);
  9. /** WordPress Administration Bootstrap */
  10. require_once( dirname( __FILE__ ) . '/admin.php' );
  11. if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
  12. wp_die(
  13. '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
  14. '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
  15. 403
  16. );
  17. }
  18. include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
  19. $wp_press_this = new WP_Press_This();
  20. $wp_press_this->html();