' . esc_html__( 'Leaplens - Upgrade Advisor for PHP', 'leaplens' ) . '

'; echo '

' . esc_html__( 'Loading...', 'leaplens' ) . '

'; echo ''; } public static function action_links( $links ) { array_unshift( $links, '' . esc_html__( 'Scan', 'leaplens' ) . '' ); return $links; } /** A short "PHP 8.5: 2 errors" note under each plugin the last finished scan found problems in. */ public static function row_meta( $meta, $file ) { static $rows = null; if ( null === $rows ) { $rows = array(); $job = Scan::job(); if ( $job && 'done' === $job['status'] && current_user_can( self::capability() ) ) { foreach ( Report::rows( $job ) as $r ) { $rows[ $r['key'] ] = array( $r, $job['target'] ); } } } if ( ! isset( $rows[ 'plugin:' . $file ] ) ) { return $meta; } list( $r, $target ) = $rows[ 'plugin:' . $file ]; if ( 'failed' === $r['verdict'] ) { /* translators: %s: PHP version. */ $text = sprintf( __( 'PHP %s: could not be scanned', 'leaplens' ), $target ); } elseif ( $r['errors'] > 0 ) { /* translators: 1: PHP version, 2: number of errors. */ $text = sprintf( _n( 'PHP %1$s: %2$d error', 'PHP %1$s: %2$d errors', $r['errors'], 'leaplens' ), $target, $r['errors'] ); } elseif ( $r['warnings'] > 0 ) { /* translators: 1: PHP version, 2: number of deprecation notices. */ $text = sprintf( _n( 'PHP %1$s: %2$d deprecation', 'PHP %1$s: %2$d deprecations', $r['warnings'], 'leaplens' ), $target, $r['warnings'] ); } else { /* translators: %s: PHP version. */ $text = sprintf( __( 'PHP %s: no problems found', 'leaplens' ), $target ); } $meta[] = '' . esc_html( $text ) . ''; return $meta; } public static function deactivate() { wp_clear_scheduled_hook( Scan::CRON ); } }