2008-05-12 15:08:39 -04:00
|
|
|
<?php
|
2008-08-16 03:27:34 -04:00
|
|
|
/**
|
|
|
|
* Press This Display and Handler.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Press_This
|
|
|
|
*/
|
|
|
|
|
2010-11-06 05:41:03 -04:00
|
|
|
define('IFRAME_REQUEST' , true);
|
2010-10-18 13:58:36 -04:00
|
|
|
|
2008-08-16 03:27:34 -04:00
|
|
|
/** WordPress Administration Bootstrap */
|
2013-09-24 20:18:11 -04:00
|
|
|
require_once( dirname( __FILE__ ) . '/admin.php' );
|
2010-10-18 13:58:36 -04:00
|
|
|
|
2015-09-02 14:38:21 -04:00
|
|
|
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
|
|
|
|
wp_die(
|
|
|
|
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
2016-06-29 11:16:29 -04:00
|
|
|
'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
|
2015-09-02 14:38:21 -04:00
|
|
|
403
|
|
|
|
);
|
|
|
|
}
|
2008-06-23 17:16:39 -04:00
|
|
|
|
2015-05-28 17:41:30 -04:00
|
|
|
/**
|
|
|
|
* @global WP_Press_This $wp_press_this
|
|
|
|
*/
|
PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31534
git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-24 20:50:26 -05:00
|
|
|
if ( empty( $GLOBALS['wp_press_this'] ) ) {
|
2016-08-27 02:07:29 -04:00
|
|
|
$GLOBALS['wp_press_this'] = new WP_Press_This();
|
2008-07-09 17:39:36 -04:00
|
|
|
}
|
2014-03-25 04:05:15 -04:00
|
|
|
|
PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31534
git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-24 20:50:26 -05:00
|
|
|
$GLOBALS['wp_press_this']->html();
|