Edit File by line
/home/barbar84/public_h.../wp-admin
File: press-this.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Press This Display and Handler.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Press_This
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
define( 'IFRAME_REQUEST', true );
[8] Fix | Delete
[9] Fix | Delete
/** WordPress Administration Bootstrap */
[10] Fix | Delete
require_once __DIR__ . '/admin.php';
[11] Fix | Delete
[12] Fix | Delete
function wp_load_press_this() {
[13] Fix | Delete
$plugin_slug = 'press-this';
[14] Fix | Delete
$plugin_file = 'press-this/press-this-plugin.php';
[15] Fix | Delete
[16] Fix | Delete
if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
[17] Fix | Delete
wp_die(
[18] Fix | Delete
__( 'Sorry, you are not allowed to create posts as this user.' ),
[19] Fix | Delete
__( 'You need a higher level of permission.' ),
[20] Fix | Delete
403
[21] Fix | Delete
);
[22] Fix | Delete
} elseif ( is_plugin_active( $plugin_file ) ) {
[23] Fix | Delete
include WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php';
[24] Fix | Delete
$wp_press_this = new WP_Press_This_Plugin();
[25] Fix | Delete
$wp_press_this->html();
[26] Fix | Delete
} elseif ( current_user_can( 'activate_plugins' ) ) {
[27] Fix | Delete
if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
[28] Fix | Delete
$url = wp_nonce_url(
[29] Fix | Delete
add_query_arg(
[30] Fix | Delete
array(
[31] Fix | Delete
'action' => 'activate',
[32] Fix | Delete
'plugin' => $plugin_file,
[33] Fix | Delete
'from' => 'press-this',
[34] Fix | Delete
),
[35] Fix | Delete
admin_url( 'plugins.php' )
[36] Fix | Delete
),
[37] Fix | Delete
'activate-plugin_' . $plugin_file
[38] Fix | Delete
);
[39] Fix | Delete
$action = sprintf(
[40] Fix | Delete
'<a href="%1$s" aria-label="%2$s">%2$s</a>',
[41] Fix | Delete
esc_url( $url ),
[42] Fix | Delete
__( 'Activate Press This' )
[43] Fix | Delete
);
[44] Fix | Delete
} else {
[45] Fix | Delete
if ( is_main_site() ) {
[46] Fix | Delete
$url = wp_nonce_url(
[47] Fix | Delete
add_query_arg(
[48] Fix | Delete
array(
[49] Fix | Delete
'action' => 'install-plugin',
[50] Fix | Delete
'plugin' => $plugin_slug,
[51] Fix | Delete
'from' => 'press-this',
[52] Fix | Delete
),
[53] Fix | Delete
self_admin_url( 'update.php' )
[54] Fix | Delete
),
[55] Fix | Delete
'install-plugin_' . $plugin_slug
[56] Fix | Delete
);
[57] Fix | Delete
$action = sprintf(
[58] Fix | Delete
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%2$s" aria-label="%3$s">%3$s</a>',
[59] Fix | Delete
esc_url( $url ),
[60] Fix | Delete
esc_attr( $plugin_slug ),
[61] Fix | Delete
__( 'Install Now' )
[62] Fix | Delete
);
[63] Fix | Delete
} else {
[64] Fix | Delete
$action = sprintf(
[65] Fix | Delete
/* translators: %s: URL to Press This bookmarklet on the main site. */
[66] Fix | Delete
__( 'Press This is not installed. Please install Press This from <a href="%s">the main site</a>.' ),
[67] Fix | Delete
get_admin_url( get_current_network_id(), 'press-this.php' )
[68] Fix | Delete
);
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
wp_die(
[72] Fix | Delete
__( 'The Press This plugin is required.' ) . '<br />' . $action,
[73] Fix | Delete
__( 'Installation Required' ),
[74] Fix | Delete
200
[75] Fix | Delete
);
[76] Fix | Delete
} else {
[77] Fix | Delete
wp_die(
[78] Fix | Delete
__( 'Press This is not available. Please contact your site administrator.' ),
[79] Fix | Delete
__( 'Installation Required' ),
[80] Fix | Delete
200
[81] Fix | Delete
);
[82] Fix | Delete
}
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
wp_load_press_this();
[86] Fix | Delete
[87] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function