html.php (2226B)
1 <?php 2 use Elementor\Utils; 3 4 if ( ! defined( 'ABSPATH' ) ) { 5 exit; // Exit if accessed directly. 6 } 7 8 /** 9 * @var array $reports 10 */ 11 foreach ( $reports as $report_name => $report ) : ?> 12 <div class="elementor-system-info-section elementor-system-info-<?php echo esc_attr( $report_name ); ?>"> 13 <table class="widefat"> 14 <thead> 15 <tr> 16 <th><?php Utils::print_unescaped_internal_string( $report['label'] ); ?></th> 17 <th></th> 18 <th></th> 19 </tr> 20 </thead> 21 <tbody> 22 <?php 23 foreach ( $report['report'] as $field_name => $field ) : 24 if ( in_array( $report_name, [ 'plugins', 'network_plugins', 'mu_plugins' ], true ) ) { 25 foreach ( $field['value'] as $plugin_info ) : 26 ?> 27 <tr> 28 <td><?php 29 if ( $plugin_info['PluginURI'] ) : 30 $plugin_name = "<a href='{$plugin_info['PluginURI']}'>{$plugin_info['Name']}</a>"; 31 else : 32 $plugin_name = $plugin_info['Name']; 33 endif; 34 35 if ( $plugin_info['Version'] ) : 36 $plugin_name .= ' - ' . $plugin_info['Version']; 37 endif; 38 39 Utils::print_unescaped_internal_string( $plugin_name ); 40 ?></td> 41 <td><?php 42 if ( $plugin_info['Author'] ) : 43 if ( $plugin_info['AuthorURI'] ) : 44 $author = "<a href='{$plugin_info['AuthorURI']}'>{$plugin_info['Author']}</a>"; 45 else : 46 $author = $plugin_info['Author']; 47 endif; 48 49 Utils::print_unescaped_internal_string( "By $author" ); 50 endif; 51 ?></td> 52 <td></td> 53 </tr> 54 <?php 55 endforeach; 56 } else { 57 $warning_class = ! empty( $field['warning'] ) ? ' class="elementor-warning"' : ''; 58 $log_label = ! empty( $field['label'] ) ? $field['label'] . ':' : ''; 59 ?> 60 <tr<?php Utils::print_unescaped_internal_string( $warning_class ); ?>> 61 <td><?php Utils::print_unescaped_internal_string( $log_label ); ?></td> 62 <td><?php Utils::print_unescaped_internal_string( $field['value'] ); ?></td> 63 <td><?php 64 if ( ! empty( $field['recommendation'] ) ) : 65 Utils::print_unescaped_internal_string( $field['recommendation'] ); 66 endif; 67 ?></td> 68 </tr> 69 <?php 70 } 71 endforeach; 72 ?> 73 </tbody> 74 </table> 75 </div> 76 <?php 77 endforeach;