">5 年之前 3395 a4345e5759 first commit 5 年之前 3429 a4345e5759 first commit 5 年之前 3430 a4345e5759 first commit 5 年之前 3431 a4345e5759 first commit 5 年之前 3433 a4345e5759 first commit 5 年之前 3439 a4345e5759 first commit 5 年之前 3440 a4345e5759 first commit 5 年之前 3455 a4345e5759 first commit 5 年之前 3456 a4345e5759 first commit 5 年之前 3456_fsm a4345e5759 first commit 5 年之前 3456_vm a4345e5759 first commit 5 年之前 3466 a4345e5759 first commit 5 年之前 3467 a4345e5759 first commit 5 年之前 3468 a4345e5759 first commit 5 年之前 3501 a4345e5759 first commit 5 年之前 3502 a4345e5759 first commit 5 年之前 3503 a4345e5759 first commit 5 年之前 3534 a4345e5759 first commit 5 年之前 3541 a4345e5759 first commit 5 年之前 3541_fsm a4345e5759 first commit 5 年之前 3541_vm a4345e5759 first commit 5 年之前 3542 a4345e5759 first commit 5 年之前 3574 a4345e5759 first commit 5 年之前 3575 a4345e5759 first commit 5 年之前 3576 a4345e5759 first commit 5 年之前 3596 a4345e5759 first commit 5 年之前 3597 a4345e5759 first commit 5 年之前 3598 a4345e5759 first commit 5 年之前 3599 a4345e5759 first commit 5 年之前 3600 a4345e5759 first commit 5 年之前 3600_fsm a4345e5759 first commit 5 年之前 3600_vm a4345e5759 first commit 5 年之前 3601 a4345e5759 first commit 5 年之前 3601_fsm a4345e5759 first commit 5 年之前 3601_vm a4345e5759 first commit 5 年之前 3602 a4345e5759 first commit 5 年之前 3602_fsm a4345e5759 first commit 5 年之前 3602_vm a4345e5759 first commit 5 年之前 3603 a4345e5759 first commit 5 年之前 3603_fsm a4345e5759 first commit 5 年之前 3603_vm a4345e5759 first commit 5 年之前 3604 a4345e5759 first commit 5 年之前 3605 a4345e5759 first commit 5 年之前 3606 a4345e5759 first commit 5 年之前 3607 a4345e5759 first commit 5 年之前 3608 a4345e5759 first commit 5 年之前 3609 a4345e5759 first commit 5 年之前 3712 a4345e5759 first commit 5 年之前 3764 a4345e5759 first commit 5 年之前 3764_fsm a4345e5759 first commit 5 年之前 3764_vm a4345e5759 first commit 5 年之前 3766 a4345e5759 first commit 5 年之前 3767 a4345e5759 first commit 5 年之前 3997 a4345e5759 first commit 5 年之前 4143 a4345e5759 first commit 5 年之前 4144 a4345e5759 first commit 5 年之前 4145 a4345e5759 first commit 5 年之前 4146 a4345e5759 first commit 5 年之前 4147 a4345e5759 first commit 5 年之前 4148 a4345e5759 first commit 5 年之前 4149 a4345e5759 first commit 5 年之前 4150 a4345e5759 first commit 5 年之前 4151 a4345e5759 first commit 5 年之前 4152 a4345e5759 first commit 5 年之前 4153 a4345e5759 first commit 5 年之前 4154 a4345e5759 first commit 5 年之前 4155 a4345e5759 first commit 5 年之前 4156 a4345e5759 first commit 5 年之前 4157 a4345e5759 first commit 5 年之前 4158 a4345e5759 first commit 5 年之前 4159 a4345e5759 first commit 5 年之前 4160 a4345e5759 first commit 5 年之前 4161 a4345e5759 first commit 5 年之前 4162 a4345e5759 first commit 5 年之前 4163 a4345e5759 first commit 5 年之前 4164 a4345e5759 first commit 5 年之前 4165 a4345e5759 first commit 5 年之前 4166 a4345e5759 first commit 5 年之前 4167 a4345e5759 first commit 5 年之前 4168 a4345e5759 first commit 5 年之前 4169 a4345e5759 first commit 5 年之前 4170 a4345e5759 first commit 5 年之前 4171 a4345e5759 first commit 5 年之前 4172 a4345e5759 first commit 5 年之前 4173 a4345e5759 first commit 5 年之前 4174 a4345e5759 first commit 5 年之前 5002 a4345e5759 first commit 5 年之前 548 a4345e5759 first commit 5 年之前 549 a4345e5759 first commit 5 年之前 6102 a4345e5759 first commit 5 年之前 6104 a4345e5759 first commit 5 年之前 6106 a4345e5759 first commit 5 年之前 6110 a4345e5759 first commit 5 年之前 6111 a4345e5759 first commit 5 年之前 6112 a4345e5759 first commit 5 年之前 6113 a4345e5759 first commit 5 年之前 6117 a4345e5759 first commit 5 年之前 826 a4345e5759 first commit 5 年之前 827 a4345e5759 first commit 5 年之前 828 a4345e5759 first commit 5 年之前 PG_VERSION a4345e5759 first commit 5 年之前 pg_filenode.map a4345e5759 first commit 5 年之前 tum/whitesports - Gogs: Simplico Git Service

暫無描述

class.akismet-widget.php 2.8KB

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