Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/akismet
File: class.akismet-widget.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Akismet
[2] Fix | Delete
*/
[3] Fix | Delete
class Akismet_Widget extends WP_Widget {
[4] Fix | Delete
[5] Fix | Delete
function __construct() {
[6] Fix | Delete
load_plugin_textdomain( 'akismet' );
[7] Fix | Delete
[8] Fix | Delete
parent::__construct(
[9] Fix | Delete
'akismet_widget',
[10] Fix | Delete
__( 'Akismet Widget' , 'akismet'),
[11] Fix | Delete
array( 'description' => __( 'Display the number of spam comments Akismet has caught' , 'akismet') )
[12] Fix | Delete
);
[13] Fix | Delete
[14] Fix | Delete
if ( is_active_widget( false, false, $this->id_base ) ) {
[15] Fix | Delete
add_action( 'wp_head', array( $this, 'css' ) );
[16] Fix | Delete
}
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
function css() {
[20] Fix | Delete
?>
[21] Fix | Delete
[22] Fix | Delete
<style type="text/css">
[23] Fix | Delete
.a-stats {
[24] Fix | Delete
width: auto;
[25] Fix | Delete
}
[26] Fix | Delete
.a-stats a {
[27] Fix | Delete
background: #7CA821;
[28] Fix | Delete
background-image:-moz-linear-gradient(0% 100% 90deg,#5F8E14,#7CA821);
[29] Fix | Delete
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#7CA821),to(#5F8E14));
[30] Fix | Delete
border: 1px solid #5F8E14;
[31] Fix | Delete
border-radius:3px;
[32] Fix | Delete
color: #CFEA93;
[33] Fix | Delete
cursor: pointer;
[34] Fix | Delete
display: block;
[35] Fix | Delete
font-weight: normal;
[36] Fix | Delete
height: 100%;
[37] Fix | Delete
-moz-border-radius:3px;
[38] Fix | Delete
padding: 7px 0 8px;
[39] Fix | Delete
text-align: center;
[40] Fix | Delete
text-decoration: none;
[41] Fix | Delete
-webkit-border-radius:3px;
[42] Fix | Delete
width: 100%;
[43] Fix | Delete
}
[44] Fix | Delete
.a-stats a:hover {
[45] Fix | Delete
text-decoration: none;
[46] Fix | Delete
background-image:-moz-linear-gradient(0% 100% 90deg,#6F9C1B,#659417);
[47] Fix | Delete
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#659417),to(#6F9C1B));
[48] Fix | Delete
}
[49] Fix | Delete
.a-stats .count {
[50] Fix | Delete
color: #FFF;
[51] Fix | Delete
display: block;
[52] Fix | Delete
font-size: 15px;
[53] Fix | Delete
line-height: 16px;
[54] Fix | Delete
padding: 0 13px;
[55] Fix | Delete
white-space: nowrap;
[56] Fix | Delete
}
[57] Fix | Delete
</style>
[58] Fix | Delete
[59] Fix | Delete
<?php
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
function form( $instance ) {
[63] Fix | Delete
if ( $instance && isset( $instance['title'] ) ) {
[64] Fix | Delete
$title = $instance['title'];
[65] Fix | Delete
}
[66] Fix | Delete
else {
[67] Fix | Delete
$title = __( 'Spam Blocked' , 'akismet' );
[68] Fix | Delete
}
[69] Fix | Delete
?>
[70] Fix | Delete
[71] Fix | Delete
<p>
[72] Fix | Delete
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'akismet'); ?></label>
[73] Fix | Delete
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
[74] Fix | Delete
</p>
[75] Fix | Delete
[76] Fix | Delete
<?php
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
function update( $new_instance, $old_instance ) {
[80] Fix | Delete
$instance['title'] = strip_tags( $new_instance['title'] );
[81] Fix | Delete
return $instance;
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
function widget( $args, $instance ) {
[85] Fix | Delete
$count = get_option( 'akismet_spam_count' );
[86] Fix | Delete
[87] Fix | Delete
if ( ! isset( $instance['title'] ) ) {
[88] Fix | Delete
$instance['title'] = __( 'Spam Blocked' , 'akismet' );
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
echo $args['before_widget'];
[92] Fix | Delete
if ( ! empty( $instance['title'] ) ) {
[93] Fix | Delete
echo $args['before_title'];
[94] Fix | Delete
echo esc_html( $instance['title'] );
[95] Fix | Delete
echo $args['after_title'];
[96] Fix | Delete
}
[97] Fix | Delete
?>
[98] Fix | Delete
[99] Fix | Delete
<div class="a-stats">
[100] Fix | Delete
<a href="https://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count , 'akismet'), number_format_i18n( $count ) ); ?></a>
[101] Fix | Delete
</div>
[102] Fix | Delete
[103] Fix | Delete
<?php
[104] Fix | Delete
echo $args['after_widget'];
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
function akismet_register_widgets() {
[109] Fix | Delete
register_widget( 'Akismet_Widget' );
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
add_action( 'widgets_init', 'akismet_register_widgets' );
[113] Fix | Delete
[114] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function