| @@ -1,5 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | +use Elementor\Utils; | |
| 3 | + | |
| 2 | 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 5 | exit; // Exit if accessed directly. |
| 4 | 6 | } |
| 5 | 7 | |
| @@ -10,9 +12,9 @@ | ||
| 10 | 12 | <div class="elementor-system-info-section elementor-system-info-<?php echo esc_attr( $report_name ); ?>"> |
| 11 | 13 | <table class="widefat"> |
| 12 | 14 | <thead> |
| 13 | 15 | <tr> |
| 14 | - <th><?php $report['report']->print_html_label( ( $report['label'] ) ); ?></th> | |
| 16 | + <th><?php Utils::print_unescaped_internal_string( $report['label'] ); ?></th> | |
| 15 | 17 | <th></th> |
| 16 | 18 | <th></th> |
| 17 | 19 | </tr> |
| 18 | 20 | </thead> |
| @@ -17,9 +19,57 @@ | ||
| 17 | 19 | </tr> |
| 18 | 20 | </thead> |
| 19 | 21 | <tbody> |
| 20 | 22 | <?php |
| 21 | - $report['report']->print_html(); | |
| 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; | |
| 22 | 72 | ?> |
| 23 | 73 | </tbody> |
| 24 | 74 | </table> |
| 25 | 75 | </div> |