PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.9.7
Filter Everything — WordPress & WooCommerce Filters v1.9.7
1.9.7 1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 All 52 releases
← All changes | views/admin/options.php +24 -4 1.4.81.9.7 View file →
@@ -2,10 +2,10 @@
2 2 /**
3 3 * @var \FilterEverything\Filter\TabInterface[] $tabs
4 4 */
5 5
6 -if ( ! defined('WPINC') ) {
7 - wp_die();
6 +if ( ! defined('ABSPATH') ) {
7 + exit;
8 8 }
9 9
10 10 ?>
11 11 <div class="wrap">
@@ -14,13 +14,33 @@
14 14 <?php foreach ( $tabs as $tab ): ?>
15 15 <?php if ( $tab->valid() ): ?>
16 16 <?php
17 17 $class = ( $tab == $current ) ? ' nav-tab-active' : '';
18 + $class .= ' wpc-tab-' . $tab->getName();
18 19 $tabUrl = admin_url( 'edit.php?post_type=filter-set&page=filters-settings&tab=' . $tab->getName() );
20 + $label = esc_html($tab->getLabel());
19 21 ?>
20 22 <a class='nav-tab<?php echo esc_attr( $class ); ?>'
21 - href='<?php echo esc_url( $tabUrl ); ?>'><?php echo esc_html($tab->getLabel()) ?></a>
22 - <?php endif; ?>
23 + href='<?php echo esc_url( $tabUrl ); ?>'><?php echo $label ?>
24 + <?php if (method_exists($tab, 'labelIcon')) {
25 + echo '<span class="' . esc_attr('wpc-nav-tab-icon') . '">' .$tab->labelIcon() . '</span>';
26 + }
27 + if (method_exists($tab, 'labelBadge')) {
28 + echo $tab->labelBadge(); // escaped by the tab
29 + }?>
30 + </a>
31 + <?php
32 + if (method_exists($tab, 'getFreeLink')) {
33 + $links = $tab->getFreeLink();
34 + if (!empty($links)) {
35 + $tabUrl = $links['link'];
36 + $label = $links['text']; ?>
37 + <a class='nav-tab<?php echo esc_attr(' wpc-tab-' . $tab->getName()); ?> wpc-pro-badge-text'
38 + href='<?php echo esc_url($tabUrl); ?>'><?php echo $label ?></a>
39 + <?php }
40 + }
41 + ?>
42 + <?php endif; ?>
23 43 <?php endforeach; ?>
24 44 </h2>
25 45 <?php echo $current->render() //already escaped in the method ?>
26 46 </div>