| 1 |
<?php |
| 2 |
|
| 3 |
use Dev4Press\Plugin\SweepPress\Basic\Sweep; |
| 4 |
use function Dev4Press\v43\Functions\panel; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; |
| 8 |
} |
| 9 |
|
| 10 |
?> |
| 11 |
<div class="d4p-content"> |
| 12 |
<?php |
| 13 |
|
| 14 |
if ( isset( $_GET['print'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification |
| 15 |
$all = Sweep::instance()->all( true ); |
| 16 |
$cat = Sweep::instance()->categories(); |
| 17 |
|
| 18 |
foreach ( $cat as $category => $label ) { |
| 19 |
echo '<h3>' . esc_html( $label ) . '</h3>'; |
| 20 |
echo '<ul>'; |
| 21 |
|
| 22 |
foreach ( $all as $sweeper ) { |
| 23 |
if ( $sweeper['cat'] == $category ) { |
| 24 |
echo '<li><strong style="font-size: 120%">' . esc_html( $sweeper['name'] ) . '</strong><br/>'; |
| 25 |
echo '<p><em>' . esc_html( $sweeper['info'] ) . '</em><br/>From plugin version: <strong>' . esc_html( $sweeper['version'] ) . '</strong></p>'; |
| 26 |
|
| 27 |
echo '</li>'; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
echo '</ul>'; |
| 32 |
} |
| 33 |
} else { |
| 34 |
$_grid = panel()->get_table_object(); |
| 35 |
$_grid->prepare_items(); |
| 36 |
$_grid->display(); |
| 37 |
} |
| 38 |
|
| 39 |
?> |
| 40 |
</div> |