PluginProbe ʕ •ᴥ•ʔ
Advanced Ads – Ad Manager & AdSense / 2.0.24
Advanced Ads – Ad Manager & AdSense v2.0.24
2.0.24 2.0.23 2.0.22 2.0.21 1.38.0 1.39.0 1.39.1 1.39.2 1.39.3 1.39.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.40.0 1.40.1 1.40.2 1.41.0 1.42.0 1.42.1 1.42.2 1.43.0 1.44.0 1.44.1 1.45.0 1.45.1 1.46.0 1.47.0 1.47.1 1.47.2 1.47.3 1.47.4 1.47.5 1.48.0 1.48.1 1.49.0 1.5.0 1.5.0.1 1.5.1 1.5.2 1.5.2.1 1.5.4 1.5.4.1 1.5.5 1.50.0 1.51.0 1.51.1 1.51.2 1.51.3 1.52.0 1.52.1 1.52.2 1.52.3 1.52.4 1.53.0 1.53.1 1.53.2 1.54.0 1.54.1 1.55.0 1.56.0 1.56.1 1.56.2 1.56.3 1.56.4 1.6 1.6.1 1.6.10 1.6.10.1 1.6.10.2 1.6.11 1.6.11.1 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.17.1 1.6.17.2 1.6.2 1.6.2.1 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.6 1.6.6.1 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.6.8.3 1.6.9 1.6.9.1 1.6.9.2 1.6.9.3 1.6.9.4 1.7 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.1.1 1.7.1.2 1.7.1.3 1.7.1.4 1.7.1.5 1.7.10 trunk 1.7.11 1.0.1 1.7.12 1.0.2 1.7.13 1.0.3 1.7.14 1.1.0 1.7.15 1.1.1 1.7.16 1.1.2 1.7.17 1.1.3 1.7.18 1.10 1.7.19 1.10.1 1.7.2 1.10.10 1.7.2.1 1.10.11 1.7.20 1.10.12 1.7.21 1.10.2 1.7.22 1.10.3 1.7.23 1.10.4 1.7.24 1.10.5 1.7.25 1.10.6 1.7.3 1.10.7 1.7.4 1.10.8 1.7.4.1 1.10.9 1.7.4.2 1.11 1.7.4.3 1.11.1 1.7.4.4 1.11.2 1.7.4.5 1.12 1.7.5 1.13 1.7.5.1 1.13.1 1.7.6 1.13.2 1.7.7 1.13.3 1.7.8 1.13.4 1.7.9 1.13.5 1.7.9.1 1.13.6 1.7.9.2 1.13.7 1.7.9.3 1.13.8 1.8 1.14 1.8.1 1.14.1 1.8.10 1.14.10 1.8.11 1.14.11 1.8.12 1.14.2 1.8.13 1.14.3 1.8.14 1.14.4 1.8.15 1.14.5 1.8.16 1.14.6 1.8.17 1.14.7 1.8.18 1.14.8 1.8.19 1.14.9 1.8.2 1.15 1.8.20 1.16 1.8.21 1.16.1 1.8.22 1.17 1.8.23 1.17.1 1.8.24 1.17.10 1.8.25 1.17.10-rc.1 1.8.26 1.17.11 1.8.27 1.17.12 1.8.28 1.17.12-rc.1 1.8.29 1.17.2 1.8.3 1.17.3 1.8.30 1.17.4 1.8.4 1.17.5 1.8.5 1.17.6 1.8.6 1.17.7 1.8.7 1.17.8 1.8.8 1.17.9 1.8.9 1.17.9-beta.1 1.9 1.18.0 2.0.0 1.19.0 2.0.1 1.19.1 2.0.10 1.2 2.0.11 1.2.1 2.0.12 1.2.2 2.0.13 1.2.3 2.0.14 1.2.4 2.0.15 1.2.5 2.0.16 1.2.6 2.0.17 1.2.7 2.0.18 1.20.0 2.0.19 1.20.0-rc.1 2.0.2 1.20.0-rc.2 2.0.20 1.20.1 2.0.3 1.20.2 2.0.4 1.20.3 2.0.5 1.21.0 2.0.6 1.21.1 2.0.7 1.22.0 2.0.8 1.22.1 2.0.9 1.22.2 1.23.0 1.23.1 1.23.2 1.24.0 1.24.1 1.24.2 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.29.0 1.29.1 1.3 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.30.0 1.30.1 1.30.2 1.30.2-rc.1 1.30.3 1.30.4 1.30.4-rc.1 1.30.5 1.31.0 1.31.1 1.32.0 1.32.0-rc.1 1.33.0 1.33.1 1.33.2 1.34.0 1.35.0 1.35.1 1.36.0 1.36.1 1.36.2 1.36.3 1.37.0 1.37.1 1.37.2
advanced-ads / admin / views / setting-license.php
advanced-ads / admin / views Last commit date
ad-list 5 months ago conditions 5 months ago notices 1 year ago upgrades 1 year ago ad-conditions-string-operators.php 3 months ago checks.php 3 months ago index.php 7 years ago modal.php 3 months ago overview-addons-line.php 5 months ago overview-notice-row.php 1 year ago overview-widget.php 1 year ago placement-form.php 1 year ago placement-injection-top.php 1 year ago placement-types.php 3 years ago placements-ad-label.php 1 year ago placements-inline-css.php 1 year ago placements-item.php 1 year ago post-list-filter-dropdown.php 5 months ago setting-license.php 1 year ago support-callout.php 1 year ago
setting-license.php
103 lines
1 <?php // phpcs:ignoreFile
2 /**
3 * Template for license fields.
4 *
5 * Do not move since it could be used by add-ons.
6 *
7 * @var string $index internal name of the add-on.
8 * @var string $plugin_name name of the add-on.
9 * @var string $options_slug slug of the add-on.
10 * @var string $license_status status code of the license.
11 */
12 $errortext = false;
13 $expires = Advanced_Ads_Admin_Licenses::get_instance()->get_license_expires( $options_slug );
14 $expired = false;
15 $expired_error = __( 'Your license expired.', 'advanced-ads' );
16
17 ob_start();
18 ?>
19 <button type="button" class="button-secondary advads-license-activate"
20 data-addon="<?php echo esc_attr( $index ); ?>"
21 data-pluginname="<?php echo esc_attr( $plugin_name ); ?>"
22 data-optionslug="<?php echo esc_attr( $options_slug ); ?>"
23 name="advads_license_activate"><?php esc_html_e( 'Update expiry date', 'advanced-ads' ); ?></button>
24 <?php
25 $update_button = ob_get_clean();
26
27 $license_key_for_expired_link = $license_key ? $license_key : '%LICENSE_KEY%';
28 //phpcs:ignore
29 $expired_error .= $expired_renew_link = ' ' . sprintf(
30 /* translators: 1: is a URL, 2: is HTML of a button. */
31 __( 'Click on %2$s if you renewed it or have a subscription or <a href="%1$s" class="advads-renewal-link" target="_blank">renew your license</a>.', 'advanced-ads' ), // phpcs:ignore
32 'https://wpadvancedads.com/checkout/?edd_license_key=' . esc_attr( $license_key_for_expired_link ) . '&utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses',
33 $update_button
34 );
35 if ( 'lifetime' !== $expires ) {
36 $expires_time = strtotime( $expires );
37 $days_left = ( $expires_time - time() ) / DAY_IN_SECONDS;
38 }
39 // phpcs:ignore
40 if ( 'lifetime' === $expires ) {
41 // do nothing.
42 } elseif ( $expired && $days_left <= 0 ) {
43 $plugin_url = isset( $plugin_url ) ? $plugin_url : 'https://wpadvancedads.com/';
44 $errortext = $expired_error;
45 $expired = true;
46 } elseif ( 0 < $days_left && 31 > $days_left ) {
47 $errortext = sprintf(
48 /* translators: %d is a number of days. */
49 esc_html__( '(%d days left)', 'advanced-ads' ),
50 $days_left
51 );
52 }
53 $show_active = ( false !== $license_status && 'valid' === $license_status && ! $expired ) ? true : false;
54 ?>
55 <input type="text" class="regular-text advads-license-key" placeholder="<?php esc_html_e( 'License key', 'advanced-ads' ); ?>"
56 name="<?php echo esc_attr( ADVADS_SLUG ) . '-licenses'; ?>[<?php echo esc_attr( $index ); ?>]"
57 value="<?php echo esc_attr( $license_key ); ?>"
58 <?php
59 if ( false !== $license_status && 'valid' === $license_status && ! $expired ) :
60 ?>
61 readonly="readonly"<?php endif; ?>/>
62
63 <button type="button" class="button-secondary advads-license-deactivate"
64 <?php
65 if ( 'valid' !== $license_status ) {
66 echo ' style="display: none;" ';
67 }
68 ?>
69 data-addon="<?php echo esc_attr( $index ); ?>"
70 data-pluginname="<?php echo esc_attr( $plugin_name ); ?>"
71 data-optionslug="<?php echo esc_attr( $options_slug ); ?>"
72 name="advads_license_activate"><?php esc_html_e( 'Deactivate License', 'advanced-ads' ); ?></button>
73
74 <button type="button" class="button-primary advads-license-activate"
75 data-addon="<?php echo esc_attr( $index ); ?>"
76 data-pluginname="<?php echo esc_attr( $plugin_name ); ?>"
77 data-optionslug="<?php echo esc_attr( $options_slug ); ?>"
78 name="advads_license_activate">
79 <?php
80 // phpcs:ignore
81 echo ( 'valid' === $license_status && ! $expired ) ? esc_html__( 'Update License', 'advanced-ads' ) : esc_html__( 'Activate License', 'advanced-ads' ); ?></button>
82 <?php
83 if ( '' === trim( $license_key ) ) {
84 $errortext = __( 'Please enter a valid license key', 'advanced-ads' );
85 } elseif ( ! $expired && ! $errortext ) {
86 $errortext = ( 'invalid' === $license_status ) ? esc_html__( 'License key invalid', 'advanced-ads' ) : '';
87 }
88 ?>
89 &nbsp;
90 <span class="advads-license-activate-active advads-notice-inline advads-check" <?php echo ( ! $show_active ) ? 'style="display: none;"' : ''; ?>><?php esc_html_e( 'active', 'advanced-ads' ); ?></span>
91 <span class="advads-license-activate-error advads-notice-inline advads-error" <?php echo ( ! $errortext ) ? 'style="display: none;"' : ''; ?>>
92 <?php
93 // phpcs:ignore
94 echo $errortext;
95 ?>
96 </span>
97 <span class="advads-license-expired-error advads-notice-inline advads-error" style="display: none;">
98 <?php
99 // phpcs:ignore
100 echo $expired_error;
101 ?>
102 </span>
103