• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Akismet_Widget::widget() –

You appear to be a bot. Output may be restricted

Description

Usage

Akismet_Widget::widget( $args, $instance );

Parameters

$args
( mixed ) required –
$instance
( mixed ) required –

Returns

void

Source

File name: akismet/class.akismet-widget.php


Lines:

1 to 45 of 45
  function widget( $args, $instance ) {
    $count = get_option( 'akismet_spam_count' );

    if ( ! isset( $instance['title'] ) ) {
      $instance['title'] = __( 'Spam Blocked' , 'akismet' );
    }

    echo $args['before_widget'];
    if ( ! empty( $instance['title'] ) ) {
      echo $args['before_title'];
      echo esc_html( $instance['title'] );
      echo $args['after_title'];
    }
?>

	<div class="a-stats">
		<a href="https://akismet.com" target="_blank" rel="noopener" title="">
			<?php

      echo wp_kses(
        sprintf(
          /* translators: The placeholder is the number of pieces of spam blocked by Akismet. */
          _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 )
        ),
        array(
          'strong' => array(
            'class' => true,
          ),
        )
      );

      ?>
		</a>
	</div>

<?php
    echo $args['after_widget'];
  }
 

 View on GitHub View on Trac

Published: 19th December 2019 | Last updated: 14th November 2021

Primary Sidebar

Information

Function name: Akismet_Widget::widget
Class ref: Akismet_Widget
Plugin ref: Akismet
Version: 5.0.1
Sourcefile: class.akismet-widget.php
File ref: class.akismet-widget.php
Deprecated?: No
API Letters: A,W

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites