PluginProbe ʕ •ᴥ•ʔ
External Links – nofollow, noopener & new window / 2.66
External Links – nofollow, noopener & new window v2.66
2.66 0.31 0.32 0.33 0.34 0.35 1.01 1.02 1.03 1.10 1.20 1.21 1.30 1.31 1.40 1.41 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.60 1.61 1.62 1.70 1.80 1.81 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 2.3 2.32 2.35 2.40 2.42 2.43 2.45 2.46 2.47 2.48 2.50 2.51 2.55 2.56 2.57 2.58 2.59 2.60 2.61 2.62 2.63 2.64 2.65 trunk 0.10 0.11 0.12 0.20 0.21 0.30
wp-external-links / templates / partials / nav-tabs.php
wp-external-links / templates / partials Last commit date
tab-contents 1 year ago nav-tabs.php 1 year ago
nav-tabs.php
51 lines
1 <?php
2 /**
3 * Tab Nav
4 *
5 * @package WPEL
6 * @category WordPress Plugin
7 * @version 2.3
8 * @link https://www.webfactoryltd.com/
9 * @license Dual licensed under the MIT and GPLv2+ licenses
10 *
11 * @var array $vars
12 * @option array "tabs"
13 * @option string "current_tab"
14 * @option string "page_url"
15 */
16 $set_tab_active_class = function ( $tab ) use ( $vars ) {
17 if ( $tab === $vars[ 'current_tab' ] ) {
18 echo ' nav-tab-active';
19 }
20 };
21
22 // disabled
23 $first_install = get_option( 'wpel-first-install' );
24 if(isset($_SERVER['REQUEST_URI'])){
25 $redirect_url = sanitize_url(wp_unslash($_SERVER['REQUEST_URI']));
26 } else {
27 $redirect_url = '';
28 }
29 $dismiss_url = add_query_arg(array('action' => 'wpel_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($redirect_url)), admin_url('admin.php'));
30 $dismiss_url = wp_nonce_url($dismiss_url, 'wpel_dismiss_rate');
31
32 if (false && false == get_option( 'wpel-notice-dismissed-rate', false ) && current_time( 'timestamp' ) - $first_install > ( HOUR_IN_SECONDS / 4 ) ) {
33 echo '<div id="rating-notice" class="notice notice-info">
34 <p><strong>Help us keep External Links <u>free &amp; maintained</u></strong><br>By taking a minute to rate the plugin you\'ll help us keep it free &amp; maintained. Thank you 👋</p>
35 <p><a href="https://wordpress.org/support/plugin/wp-external-links/reviews/#new-post" target="_blank" class="button button-primary">Rate the plugin 👍</a> &nbsp;&nbsp; <a href="' . esc_url($dismiss_url) . '">I\'ve already rated it</a></p>
36 </div>';
37 }
38 ?>
39 <h2 class="nav-tab-wrapper">
40 <?php foreach ( $vars[ 'tabs' ] as $tab_key => $tab_values ):
41 if($tab_key == 'admin'){
42 continue;
43 }
44
45 ?>
46 <a class="nav-tab<?php $set_tab_active_class( $tab_key ); ?> nav-tab-<?php echo esc_html($tab_key); ?>" href="<?php echo esc_url($vars[ 'page_url' ]); ?>&tab=<?php echo esc_html($tab_key); ?>">
47 <?php WPEL_Plugin::wp_kses_wf($tab_values[ 'icon' ]); ?> <?php WPEL_Plugin::wp_kses_wf($tab_values[ 'title' ]); ?>
48 </a>
49 <?php endforeach; ?>
50 </h2>
51