Version Description
- improved coding style in backend templates
- prepared for option to allow minimum number of words between ads in Advanced Ads Pro
- hide notice that warns if the "Disable ads in REST API" option was selected
- Renad theme: fixed a bug that caused menu item to point to incorrect url instead of theme options
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.17.6 |
Comparing to | |
See all releases |
Code changes from version 1.17.5 to 1.17.6
- admin/class-advanced-ads-admin.php +0 -4
- admin/includes/class-ad-groups-list.php +4 -3
- admin/includes/class-menu.php +9 -2
- admin/includes/class-meta-box.php +10 -2
- admin/includes/class-settings.php +2 -2
- admin/views/ad-conditions-string-operators.php +5 -2
- admin/views/ad-group-edit.php +12 -8
- admin/views/ad-group-list-ads.php +13 -5
- admin/views/ad-group-list-form-row.php +12 -11
- admin/views/ad-group-list-header.php +2 -3
- admin/views/ad-group-list-row.php +23 -15
- admin/views/ad-info-after-textarea.php +16 -8
- admin/views/ad-info-bottom.php +11 -8
- admin/views/ad-info-top.php +8 -7
- admin/views/ad-info.php +32 -12
- admin/views/ad-list-details-column.php +8 -8
- admin/views/ad-list-filters.php +9 -9
- admin/views/ad-list-shortcode-column.php +1 -1
- admin/views/ad-list-timing-column.php +51 -6
- admin/views/ad-main-metabox.php +10 -11
- admin/views/ad-output-metabox.php +46 -66
- admin/views/ad-parameters-metabox.php +7 -7
- admin/views/ad-parameters-size.php +9 -7
- admin/views/ad-submitbox-meta.php +31 -14
- admin/views/checks.php +14 -5
- admin/views/feedback-disable.php +11 -9
- admin/views/gadsense-dashboard.php +26 -21
- admin/views/overview-addons-line.php +22 -5
- admin/views/overview-notice-row.php +19 -3
- admin/views/overview-notices.php +38 -12
- admin/views/overview-widget.php +12 -4
- admin/views/overview.php +3 -5
- admin/views/pitch-pro-tab.php +0 -18
- admin/views/pitch-tracking.php +0 -12
- admin/views/{pitch-bundle.php → pitches/all-access.php} +1 -1
- admin/views/pitches/pro-tab.php +18 -0
- admin/views/pitches/tracking.php +12 -0
- admin/views/placement-form.php +47 -21
- admin/views/placement-injection-top.php +116 -60
- admin/views/placements-ad-label-position.php +25 -22
- admin/views/placements-ad-label.php +17 -12
- admin/views/placements-content-index.php +35 -17
- admin/views/placements-item.php +18 -10
- admin/views/placements.php +106 -54
- admin/views/post-ad-settings-metabox.php +5 -3
- admin/views/setting-license.php +56 -34
- admin/views/settings.php +11 -10
- admin/views/support-callout.php +5 -5
- admin/views/support.php +51 -12
- advanced-ads.php +2 -2
- classes/ad_placements.php +1 -1
- classes/checks.php +161 -156
- classes/plugin.php +37 -10
- languages/advanced-ads.pot +290 -308
- modules/import-export/main.php +5 -3
- readme.txt +9 -2
admin/class-advanced-ads-admin.php
CHANGED
@@ -228,10 +228,6 @@ class Advanced_Ads_Admin {
|
|
228 |
'show_inactive_ads' => __( 'Show inactive ads', 'advanced-ads' ),
|
229 |
'hide_inactive_ads' => __( 'Hide inactive ads', 'advanced-ads' ),
|
230 |
'display_conditions_form_name' => Advanced_Ads_Display_Conditions::FORM_NAME, // not meant for translation.
|
231 |
-
'ajax_error_message' => __( 'There has been an AJAX error caused by another plugin.', 'advanced-ads' )
|
232 |
-
. ' '
|
233 |
-
// translators: %1$s is an opening link tag, %2$s is a closing one.
|
234 |
-
. sprintf( __( 'Please contact our %1$ssupport%2$s.', 'advanced-ads' ), '<a href="' . Advanced_Ads_Plugin::support_url( '#utm_source=advanced-ads&utm_medium=link&utm_campaign=broken-ajax' ) . '/" target="_blank">', '</a>' ),
|
235 |
);
|
236 |
|
237 |
wp_localize_script( $this->plugin_slug . '-admin-script', 'advadstxt', $translation_array );
|
228 |
'show_inactive_ads' => __( 'Show inactive ads', 'advanced-ads' ),
|
229 |
'hide_inactive_ads' => __( 'Hide inactive ads', 'advanced-ads' ),
|
230 |
'display_conditions_form_name' => Advanced_Ads_Display_Conditions::FORM_NAME, // not meant for translation.
|
|
|
|
|
|
|
|
|
231 |
);
|
232 |
|
233 |
wp_localize_script( $this->plugin_slug . '-admin-script', 'advadstxt', $translation_array );
|
admin/includes/class-ad-groups-list.php
CHANGED
@@ -122,8 +122,8 @@ class Advanced_Ads_Groups_List {
|
|
122 |
foreach ( $ads->posts as $_ad ) {
|
123 |
$row = '';
|
124 |
$ad_id = $_ad->ID;
|
125 |
-
$row .= '<tr data-ad-id="' . $ad_id . '" data-group-id="' . $group->id . '"><td>' . $_ad->post_title . '</td><td>';
|
126 |
-
$row .= '<select name="advads-groups[' . $group->id . '][ads][' . $_ad->ID . ']">';
|
127 |
$ad_weight = ( isset( $weights[ $ad_id ] ) ) ? $weights[ $ad_id ] : Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
|
128 |
for ( $i = 0; $i <= $max_weight; $i ++ ) {
|
129 |
$row .= '<option ' . selected( $ad_weight, $i, false ) . '>' . $i . '</option>';
|
@@ -139,7 +139,7 @@ class Advanced_Ads_Groups_List {
|
|
139 |
$ads_for_select = $this->ads_for_select();
|
140 |
$new_ad_weights = '<select class="advads-group-add-ad-list-weights">';
|
141 |
for ( $i = 0; $i <= $max_weight; $i ++ ) {
|
142 |
-
$new_ad_weights .= '<option ' . selected( 10, $i, false ) . '>' . $i . '</option>';
|
143 |
}
|
144 |
$new_ad_weights .= '</select>';
|
145 |
|
@@ -480,6 +480,7 @@ class Advanced_Ads_Groups_List {
|
|
480 |
|
481 |
// iterate through groups.
|
482 |
$post_ad_groups = isset( $_POST['advads-groups'] ) ? wp_unslash( $_POST['advads-groups'] ) : array();
|
|
|
483 |
if ( count( $post_ad_groups ) ) {
|
484 |
|
485 |
foreach ( $post_ad_groups as $_group_id => $_group ) {
|
122 |
foreach ( $ads->posts as $_ad ) {
|
123 |
$row = '';
|
124 |
$ad_id = $_ad->ID;
|
125 |
+
$row .= '<tr data-ad-id="' . absint( $ad_id ) . '" data-group-id="' . absint( $group->id ) . '"><td>' . esc_html( $_ad->post_title ) . '</td><td>';
|
126 |
+
$row .= '<select name="advads-groups[' . absint( $group->id ) . '][ads][' . absint( $_ad->ID ) . ']">';
|
127 |
$ad_weight = ( isset( $weights[ $ad_id ] ) ) ? $weights[ $ad_id ] : Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
|
128 |
for ( $i = 0; $i <= $max_weight; $i ++ ) {
|
129 |
$row .= '<option ' . selected( $ad_weight, $i, false ) . '>' . $i . '</option>';
|
139 |
$ads_for_select = $this->ads_for_select();
|
140 |
$new_ad_weights = '<select class="advads-group-add-ad-list-weights">';
|
141 |
for ( $i = 0; $i <= $max_weight; $i ++ ) {
|
142 |
+
$new_ad_weights .= '<option ' . selected( 10, $i, false ) . '>' . absint( $i ) . '</option>';
|
143 |
}
|
144 |
$new_ad_weights .= '</select>';
|
145 |
|
480 |
|
481 |
// iterate through groups.
|
482 |
$post_ad_groups = isset( $_POST['advads-groups'] ) ? wp_unslash( $_POST['advads-groups'] ) : array();
|
483 |
+
|
484 |
if ( count( $post_ad_groups ) ) {
|
485 |
|
486 |
foreach ( $post_ad_groups as $_group_id => $_group ) {
|
admin/includes/class-menu.php
CHANGED
@@ -188,8 +188,15 @@ class Advanced_Ads_Admin_Menu {
|
|
188 |
}
|
189 |
);
|
190 |
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
|
195 |
/**
|
188 |
}
|
189 |
);
|
190 |
|
191 |
+
/**
|
192 |
+
* Allows extensions to insert sub menu pages.
|
193 |
+
*
|
194 |
+
* @since untagged Added the `$hidden_page_slug` parameter.
|
195 |
+
*
|
196 |
+
* @param string $plugin_slug The slug slug used to add a visible page.
|
197 |
+
* @param string $hidden_page_slug The slug slug used to add a hidden page.
|
198 |
+
*/
|
199 |
+
do_action( 'advanced-ads-submenu-pages', $this->plugin_slug, 'advanced_ads_hidden_page_slug' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
200 |
}
|
201 |
|
202 |
/**
|
admin/includes/class-meta-box.php
CHANGED
@@ -202,6 +202,14 @@ class Advanced_Ads_Admin_Meta_Boxes {
|
|
202 |
$view = 'ad-parameters-metabox.php';
|
203 |
break;
|
204 |
case 'ad-output-box':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
$view = 'ad-output-metabox.php';
|
206 |
break;
|
207 |
case 'ad-display-box':
|
@@ -215,11 +223,11 @@ class Advanced_Ads_Admin_Meta_Boxes {
|
|
215 |
$hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __( 'Manual', 'advanced-ads' ) . '</a>';
|
216 |
break;
|
217 |
case 'advads-pro-pitch':
|
218 |
-
$view = '
|
219 |
// $hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
|
220 |
break;
|
221 |
case 'advads-tracking-pitch':
|
222 |
-
$view = '
|
223 |
// $hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
|
224 |
break;
|
225 |
case 'advads-gadsense-box':
|
202 |
$view = 'ad-parameters-metabox.php';
|
203 |
break;
|
204 |
case 'ad-output-box':
|
205 |
+
$ad_options = $ad->options( 'output' );
|
206 |
+
$has_position = ! empty( $ad_options['position'] ) ? true : false;
|
207 |
+
$position = isset( $ad_options['position'] ) ? $ad_options['position'] : false;
|
208 |
+
$has_clearfix = isset( $ad_options['clearfix'] ) ? $ad_options['clearfix'] : false;
|
209 |
+
$margin = isset( $ad_options['margin'] ) ? $ad_options['margin'] : array();
|
210 |
+
$wrapper_id = isset( $ad_options['wrapper-id'] ) ? $ad_options['wrapper-id'] : '';
|
211 |
+
$wrapper_class = isset( $ad_options['wrapper-class'] ) ? $ad_options['wrapper-class'] : '';
|
212 |
+
$debug_mode_enabled = isset( $ad_options['debugmode'] ) ? true : false;
|
213 |
$view = 'ad-output-metabox.php';
|
214 |
break;
|
215 |
case 'ad-display-box':
|
223 |
$hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __( 'Manual', 'advanced-ads' ) . '</a>';
|
224 |
break;
|
225 |
case 'advads-pro-pitch':
|
226 |
+
$view = 'pitches/all-access.php';
|
227 |
// $hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
|
228 |
break;
|
229 |
case 'advads-tracking-pitch':
|
230 |
+
$view = 'pitches/tracking.php';
|
231 |
// $hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
|
232 |
break;
|
233 |
case 'advads-gadsense-box':
|
admin/includes/class-settings.php
CHANGED
@@ -362,7 +362,7 @@ class Advanced_Ads_Admin_Settings {
|
|
362 |
*/
|
363 |
public function render_settings_pro_pitch_section_callback() {
|
364 |
echo '<br/>';
|
365 |
-
include ADVADS_BASE_PATH . 'admin/views/
|
366 |
}
|
367 |
|
368 |
/**
|
@@ -370,7 +370,7 @@ class Advanced_Ads_Admin_Settings {
|
|
370 |
*/
|
371 |
public function render_settings_tracking_pitch_section_callback() {
|
372 |
echo '<br/>';
|
373 |
-
include ADVADS_BASE_PATH . 'admin/views/
|
374 |
}
|
375 |
|
376 |
/**
|
362 |
*/
|
363 |
public function render_settings_pro_pitch_section_callback() {
|
364 |
echo '<br/>';
|
365 |
+
include ADVADS_BASE_PATH . 'admin/views/pitches/pro-tab.php';
|
366 |
}
|
367 |
|
368 |
/**
|
370 |
*/
|
371 |
public function render_settings_tracking_pitch_section_callback() {
|
372 |
echo '<br/>';
|
373 |
+
include ADVADS_BASE_PATH . 'admin/views/pitches/tracking.php';
|
374 |
}
|
375 |
|
376 |
/**
|
admin/views/ad-conditions-string-operators.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Render select field for matching-technique of string-based Display Conditions
|
4 |
*
|
@@ -7,8 +7,11 @@
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
|
|
|
|
10 |
*/
|
11 |
-
?><select name="<?php echo $name; ?>[operator]">
|
12 |
<option value="contain" <?php selected( 'contain', $operator ); ?>><?php esc_attr_e( 'contains', 'advanced-ads' ); ?></option>
|
13 |
<option value="start" <?php selected( 'start', $operator ); ?>><?php esc_attr_e( 'starts with', 'advanced-ads' ); ?></option>
|
14 |
<option value="end" <?php selected( 'end', $operator ); ?>><?php esc_attr_e( 'ends with', 'advanced-ads' ); ?></option>
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Render select field for matching-technique of string-based Display Conditions
|
4 |
*
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
+
*
|
11 |
+
* @var string $name option name.
|
12 |
+
* @var string $operator value of the $operator option.
|
13 |
*/
|
14 |
+
?><select name="<?php echo esc_attr( $name ); ?>[operator]">
|
15 |
<option value="contain" <?php selected( 'contain', $operator ); ?>><?php esc_attr_e( 'contains', 'advanced-ads' ); ?></option>
|
16 |
<option value="start" <?php selected( 'start', $operator ); ?>><?php esc_attr_e( 'starts with', 'advanced-ads' ); ?></option>
|
17 |
<option value="end" <?php selected( 'end', $operator ); ?>><?php esc_attr_e( 'ends with', 'advanced-ads' ); ?></option>
|
admin/views/ad-group-edit.php
CHANGED
@@ -8,6 +8,8 @@
|
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
* @deprecated
|
|
|
|
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -24,11 +26,11 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy );
|
|
24 |
?>
|
25 |
|
26 |
<div class="wrap">
|
27 |
-
<h1><?php echo $tax->labels->edit_item; ?></h1>
|
28 |
<div id="ajax-response"></div>
|
29 |
-
<form name="editgroup" id="editgroup" method="post" action="<?php echo Advanced_Ads_Groups_List::group_page_url(); ?>" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>>
|
30 |
<input type="hidden" name="action" value="editedgroup" />
|
31 |
-
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
|
32 |
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
|
33 |
<?php
|
34 |
wp_original_referer_field( true, 'previous' );
|
@@ -36,7 +38,7 @@ wp_nonce_field( 'update-group_' . $group_id );
|
|
36 |
?>
|
37 |
<table class="form-table">
|
38 |
<tr class="form-field form-required">
|
39 |
-
|
40 |
<td><input name="name" id="name" type="text" value="
|
41 |
<?php
|
42 |
if ( isset( $tag->name ) ) {
|
@@ -47,10 +49,12 @@ wp_nonce_field( 'update-group_' . $group_id );
|
|
47 |
<?php if ( ! global_terms_enabled() ) { ?>
|
48 |
<tr class="form-field">
|
49 |
<th scope="row" valign="top"><label for="slug"><?php echo esc_attr_x( 'Slug', 'Taxonomy Slug', 'advanced-ads' ); ?></label></th>
|
50 |
-
<td><input name="slug" id="slug" type="text" value="
|
|
|
51 |
if ( isset( $tag->slug ) ) {
|
52 |
echo esc_attr( apply_filters( 'editable_slug', $tag->slug ) ); }
|
53 |
-
?>
|
|
|
54 |
<p class="description"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></p></td>
|
55 |
</tr>
|
56 |
<?php
|
@@ -58,7 +62,7 @@ wp_nonce_field( 'update-group_' . $group_id );
|
|
58 |
$text = ( isset( $tag->description ) ) ? $tag->description : '';
|
59 |
?>
|
60 |
<tr class="form-field">
|
61 |
-
|
62 |
<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo esc_textarea( $text ); ?></textarea></td>
|
63 |
</tr>
|
64 |
<?php
|
@@ -70,7 +74,7 @@ wp_nonce_field( 'update-group_' . $group_id );
|
|
70 |
do_action( $taxonomy . '_edit_form', $tag, $taxonomy );
|
71 |
|
72 |
if ( 0 === $group_id ) {
|
73 |
-
submit_button(esc_attr__( 'Create new Ad Group', 'advanced-ads' ) );
|
74 |
} else {
|
75 |
submit_button( esc_attr__( 'Update', 'advanced-ads' ) );
|
76 |
}
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
* @deprecated
|
11 |
+
*
|
12 |
+
* @var int $group_id ID of the ad group.
|
13 |
*/
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
?>
|
27 |
|
28 |
<div class="wrap">
|
29 |
+
<h1><?php echo esc_html( $tax->labels->edit_item ); ?></h1>
|
30 |
<div id="ajax-response"></div>
|
31 |
+
<form name="editgroup" id="editgroup" method="post" action="<?php echo esc_url( Advanced_Ads_Groups_List::group_page_url() ); ?>" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>>
|
32 |
<input type="hidden" name="action" value="editedgroup" />
|
33 |
+
<input type="hidden" name="group_id" value="<?php echo esc_attr( $group_id ); ?>" />
|
34 |
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
|
35 |
<?php
|
36 |
wp_original_referer_field( true, 'previous' );
|
38 |
?>
|
39 |
<table class="form-table">
|
40 |
<tr class="form-field form-required">
|
41 |
+
<th scope="row" valign="top"><label for="name"><?php echo esc_attr_x( 'Name', 'Taxonomy Name', 'advanced-ads' ); ?></label></th>
|
42 |
<td><input name="name" id="name" type="text" value="
|
43 |
<?php
|
44 |
if ( isset( $tag->name ) ) {
|
49 |
<?php if ( ! global_terms_enabled() ) { ?>
|
50 |
<tr class="form-field">
|
51 |
<th scope="row" valign="top"><label for="slug"><?php echo esc_attr_x( 'Slug', 'Taxonomy Slug', 'advanced-ads' ); ?></label></th>
|
52 |
+
<td><input name="slug" id="slug" type="text" value="
|
53 |
+
<?php
|
54 |
if ( isset( $tag->slug ) ) {
|
55 |
echo esc_attr( apply_filters( 'editable_slug', $tag->slug ) ); }
|
56 |
+
?>
|
57 |
+
" size="40" />
|
58 |
<p class="description"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></p></td>
|
59 |
</tr>
|
60 |
<?php
|
62 |
$text = ( isset( $tag->description ) ) ? $tag->description : '';
|
63 |
?>
|
64 |
<tr class="form-field">
|
65 |
+
<th scope="row" valign="top"><label for="description"><?php echo esc_attr_x( 'Description', 'Taxonomy Description', 'advanced-ads' ); ?></label></th>
|
66 |
<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo esc_textarea( $text ); ?></textarea></td>
|
67 |
</tr>
|
68 |
<?php
|
74 |
do_action( $taxonomy . '_edit_form', $tag, $taxonomy );
|
75 |
|
76 |
if ( 0 === $group_id ) {
|
77 |
+
submit_button( esc_attr__( 'Create new Ad Group', 'advanced-ads' ) );
|
78 |
} else {
|
79 |
submit_button( esc_attr__( 'Update', 'advanced-ads' ) );
|
80 |
}
|
admin/views/ad-group-list-ads.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Render a list of ads included in an ad group
|
4 |
*
|
@@ -7,11 +7,19 @@
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
|
|
|
|
|
|
|
|
10 |
*/
|
11 |
-
|
12 |
?><table class="advads-group-ads">
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
15 |
<tbody>
|
16 |
<?php
|
17 |
if ( count( $ad_form_rows ) ) {
|
@@ -29,7 +37,7 @@ if ( count( $ad_form_rows ) ) {
|
|
29 |
<select class="advads-group-add-ad-list-ads">
|
30 |
<?php
|
31 |
foreach ( $ads_for_select as $_ad_id => $_ad_title ) {
|
32 |
-
echo '<option value="advads-groups[' . $group->id . '][ads][' . $_ad_id . ']">' . $_ad_title . '</option>';
|
33 |
}
|
34 |
?>
|
35 |
</select>
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Render a list of ads included in an ad group
|
4 |
*
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
+
*
|
11 |
+
* @var array $ad_form_rows HTML to render ad form.
|
12 |
+
* @var array $ads_for_select array with ads that can be choosen from for the group.
|
13 |
+
* @var Advanced_Ads_Group $group ad group object.
|
14 |
+
* @var string $new_ad_weights HTML for new ad weights form.
|
15 |
*/
|
16 |
+
|
17 |
?><table class="advads-group-ads">
|
18 |
+
<thead><tr><th>
|
19 |
+
<?php
|
20 |
+
esc_attr_e( 'Ad', 'advanced-ads' );
|
21 |
+
?>
|
22 |
+
</th><th colspan="2"><?php esc_attr_e( 'weight', 'advanced-ads' ); ?></th></tr></thead>
|
23 |
<tbody>
|
24 |
<?php
|
25 |
if ( count( $ad_form_rows ) ) {
|
37 |
<select class="advads-group-add-ad-list-ads">
|
38 |
<?php
|
39 |
foreach ( $ads_for_select as $_ad_id => $_ad_title ) {
|
40 |
+
echo '<option value="advads-groups[' . absint( $group->id ) . '][ads][' . absint( $_ad_id ) . ']">' . esc_html( $_ad_title ) . '</option>';
|
41 |
}
|
42 |
?>
|
43 |
</select>
|
admin/views/ad-group-list-form-row.php
CHANGED
@@ -7,20 +7,22 @@
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
// Open form if this was the last edited.
|
13 |
$is_last_edited = isset( $_REQUEST['advads-last-edited-group'] ) && $group->id == $_REQUEST['advads-last-edited-group'];
|
14 |
-
$hidden
|
15 |
-
$
|
16 |
-
?><tr id="advads-ad-group-<?php echo $group->id;?>" class="advads-ad-group-form<?php echo esc_attr( $hidden ); ?>" <?php echo $jquery_data; ?>>
|
17 |
<td colspan="3">
|
18 |
<?php
|
19 |
// group name.
|
20 |
ob_start();
|
21 |
?>
|
22 |
-
<input type="hidden" class="advads-group-id" name="advads-groups[<?php echo $group->id; ?>][id]" value="<?php echo absint( $group->id ); ?>"/>
|
23 |
-
<input type="text" name="advads-groups[<?php echo $group->id; ?>][name]" value="<?php echo $group->name; ?>"/>
|
24 |
<?php
|
25 |
$option_content = ob_get_clean();
|
26 |
|
@@ -36,11 +38,10 @@ $jquery_data = $is_last_edited ? 'data-touched="true"' : '';
|
|
36 |
<div class="advads-ad-group-type">
|
37 |
<?php
|
38 |
foreach ( $this->types as $_type_key => $_type ) :
|
39 |
-
|
40 |
-
|
41 |
-
?>][type]" value="<?php echo $_type_key; ?>" <?php checked( $group->type, $_type_key ); ?>/>
|
42 |
<?php
|
43 |
-
echo $_type['title'];
|
44 |
?>
|
45 |
</label>
|
46 |
<?php
|
@@ -64,7 +65,7 @@ $jquery_data = $is_last_edited ? 'data-touched="true"' : '';
|
|
64 |
$max = ( count( $ad_form_rows ) >= 10 ) ? count( $ad_form_rows ) + 2 : 10;
|
65 |
for ( $i = 1; $i <= $max; $i++ ) :
|
66 |
?>
|
67 |
-
<option <?php selected( $group->ad_count, $i ); ?>><?php echo $i; ?></option>
|
68 |
<?php
|
69 |
endfor;
|
70 |
?>
|
@@ -75,7 +76,7 @@ $jquery_data = $is_last_edited ? 'data-touched="true"' : '';
|
|
75 |
|
76 |
Advanced_Ads_Admin_Options::render_option(
|
77 |
'group-number advads-group-type-default advads-group-type-ordered',
|
78 |
-
|
79 |
$option_content,
|
80 |
esc_attr__( 'Number of ads that are visible at the same time', 'advanced-ads' )
|
81 |
);
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
+
*
|
11 |
+
* @var Advanced_Ads_Group $group ad group object.
|
12 |
+
* @var array $ad_form_rows array with HTML for ad form.
|
13 |
*/
|
14 |
|
15 |
// Open form if this was the last edited.
|
16 |
$is_last_edited = isset( $_REQUEST['advads-last-edited-group'] ) && $group->id == $_REQUEST['advads-last-edited-group'];
|
17 |
+
$hidden = $is_last_edited ? '' : ' hidden';
|
18 |
+
?><tr id="advads-ad-group-<?php echo absint( $group->id ); ?>" class="advads-ad-group-form<?php echo esc_attr( $hidden ); ?>" <?php echo $is_last_edited ? 'data-touched="true"' : ''; ?>>
|
|
|
19 |
<td colspan="3">
|
20 |
<?php
|
21 |
// group name.
|
22 |
ob_start();
|
23 |
?>
|
24 |
+
<input type="hidden" class="advads-group-id" name="advads-groups[<?php echo absint( $group->id ); ?>][id]" value="<?php echo absint( $group->id ); ?>"/>
|
25 |
+
<input type="text" name="advads-groups[<?php echo absint( $group->id ); ?>][name]" value="<?php echo esc_attr( $group->name ); ?>"/>
|
26 |
<?php
|
27 |
$option_content = ob_get_clean();
|
28 |
|
38 |
<div class="advads-ad-group-type">
|
39 |
<?php
|
40 |
foreach ( $this->types as $_type_key => $_type ) :
|
41 |
+
?>
|
42 |
+
<label title="<?php echo esc_html( $_type['description'] ); ?>"><input type="radio" name="advads-groups[<?php echo absint( $group->id ); ?>][type]" value="<?php echo esc_attr( $_type_key ); ?>" <?php checked( $group->type, $_type_key ); ?>/>
|
|
|
43 |
<?php
|
44 |
+
echo esc_html( $_type['title'] );
|
45 |
?>
|
46 |
</label>
|
47 |
<?php
|
65 |
$max = ( count( $ad_form_rows ) >= 10 ) ? count( $ad_form_rows ) + 2 : 10;
|
66 |
for ( $i = 1; $i <= $max; $i++ ) :
|
67 |
?>
|
68 |
+
<option <?php selected( $group->ad_count, $i ); ?>><?php echo absint( $i ); ?></option>
|
69 |
<?php
|
70 |
endfor;
|
71 |
?>
|
76 |
|
77 |
Advanced_Ads_Admin_Options::render_option(
|
78 |
'group-number advads-group-type-default advads-group-type-ordered',
|
79 |
+
esc_attr__( 'Visible ads', 'advanced-ads' ),
|
80 |
$option_content,
|
81 |
esc_attr__( 'Number of ads that are visible at the same time', 'advanced-ads' )
|
82 |
);
|
admin/views/ad-group-list-header.php
CHANGED
@@ -7,13 +7,12 @@
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
-
*
|
11 |
*/
|
12 |
|
13 |
?><thead>
|
14 |
<tr>
|
15 |
-
|
16 |
-
|
17 |
<th><?php esc_attr_e( 'Ads', 'advanced-ads' ); ?></th>
|
18 |
</tr>
|
19 |
</thead>
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
10 |
*/
|
11 |
|
12 |
?><thead>
|
13 |
<tr>
|
14 |
+
<th><?php esc_attr_e( 'Ad Group', 'advanced-ads' ); ?></th>
|
15 |
+
<th><?php esc_attr_e( 'Details', 'advanced-ads' ); ?></th>
|
16 |
<th><?php esc_attr_e( 'Ads', 'advanced-ads' ); ?></th>
|
17 |
</tr>
|
18 |
</thead>
|
admin/views/ad-group-list-row.php
CHANGED
@@ -8,35 +8,43 @@
|
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
*
|
|
|
11 |
*/
|
12 |
|
13 |
?><tr class="advads-group-row">
|
14 |
<td>
|
15 |
-
<strong><a class="row-title" href="#"><?php echo $group->name; ?></a></strong>
|
16 |
-
|
17 |
-
|
|
|
|
|
18 |
<div class="hidden advads-usage">
|
19 |
-
|
20 |
<code><input type="text" onclick="this.select();" style="width: 200px;" value='[the_ad_group id="<?php echo absint( $group->id ); ?>"]'/></code>
|
21 |
</label><br/>
|
22 |
<label><?php esc_attr_e( 'template', 'advanced-ads' ); ?>
|
23 |
<code><input type="text" onclick="this.select();" value="the_ad_group(<?php echo absint( $group->id ); ?>);"/></code>
|
24 |
</label>
|
25 |
-
<p><?php printf( __( 'Learn more about using groups in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/ad-groups/#utm_source=advanced-ads&utm_medium=link&utm_campaign=groups' ); ?></p>
|
26 |
</div>
|
27 |
</td>
|
28 |
<td>
|
29 |
<ul><?php $_type = isset( $this->types[ $group->type ]['title'] ) ? $this->types[ $group->type ]['title'] : 'default'; ?>
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</ul>
|
41 |
</td>
|
42 |
<td class="advads-ad-group-list-ads"><?php $this->render_ads_list( $group ); ?></td>
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
*
|
11 |
+
* @var Advanced_Ads_Group $group ad group object.
|
12 |
*/
|
13 |
|
14 |
?><tr class="advads-group-row">
|
15 |
<td>
|
16 |
+
<strong><a class="row-title" href="#"><?php echo esc_html( $group->name ); ?></a></strong>
|
17 |
+
<?php
|
18 |
+
// escaping done by the function.
|
19 |
+
// phpcs:ignore
|
20 |
+
echo $this->render_action_links( $group ); ?>
|
21 |
<div class="hidden advads-usage">
|
22 |
+
<label><?php esc_attr_e( 'shortcode', 'advanced-ads' ); ?>
|
23 |
<code><input type="text" onclick="this.select();" style="width: 200px;" value='[the_ad_group id="<?php echo absint( $group->id ); ?>"]'/></code>
|
24 |
</label><br/>
|
25 |
<label><?php esc_attr_e( 'template', 'advanced-ads' ); ?>
|
26 |
<code><input type="text" onclick="this.select();" value="the_ad_group(<?php echo absint( $group->id ); ?>);"/></code>
|
27 |
</label>
|
|
|
28 |
</div>
|
29 |
</td>
|
30 |
<td>
|
31 |
<ul><?php $_type = isset( $this->types[ $group->type ]['title'] ) ? $this->types[ $group->type ]['title'] : 'default'; ?>
|
32 |
+
<li><strong>
|
33 |
+
<?php
|
34 |
+
/*
|
35 |
+
* translators: %s is the name of a group type
|
36 |
+
*/
|
37 |
+
printf( esc_html__( 'Type: %s', 'advanced-ads' ), esc_html( $_type ) );
|
38 |
+
?>
|
39 |
+
</strong></li>
|
40 |
+
<li>
|
41 |
+
<?php
|
42 |
+
/*
|
43 |
+
* translators: %s is the ID of an ad group
|
44 |
+
*/
|
45 |
+
printf( esc_attr__( 'ID: %s', 'advanced-ads' ), absint( $group->id ) );
|
46 |
+
?>
|
47 |
+
</li>
|
48 |
</ul>
|
49 |
</td>
|
50 |
<td class="advads-ad-group-list-ads"><?php $this->render_ads_list( $group ); ?></td>
|
admin/views/ad-info-after-textarea.php
CHANGED
@@ -8,28 +8,36 @@
|
|
8 |
* @license GPL-2.0+
|
9 |
* @link https://wpadvancedads.com
|
10 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
11 |
-
*
|
12 |
*/
|
13 |
|
14 |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG &&
|
15 |
( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
|
16 |
<p class="advads-error-message">
|
17 |
<?php
|
18 |
-
|
19 |
?>
|
20 |
|
21 |
<?php
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
if ( true === WP_DEBUG ) :
|
27 |
-
?>
|
28 |
<span style="white-space:pre-wrap"><?php echo $error; ?></span>
|
29 |
<?php
|
30 |
endif;
|
31 |
?>
|
32 |
</p>
|
33 |
-
<?php
|
|
|
34 |
|
35 |
do_action( 'advanced-ads-ad-params-below-textarea', $ad );
|
8 |
* @license GPL-2.0+
|
9 |
* @link https://wpadvancedads.com
|
10 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
11 |
*/
|
12 |
|
13 |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG &&
|
14 |
( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
|
15 |
<p class="advads-error-message">
|
16 |
<?php
|
17 |
+
esc_html_e( 'The code of this ad might not work properly with the Content placement.', 'advanced-ads' );
|
18 |
?>
|
19 |
|
20 |
<?php
|
21 |
+
printf(
|
22 |
+
wp_kses(
|
23 |
+
// translators: %s is a URL.
|
24 |
+
__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ),
|
25 |
+
array(
|
26 |
+
'a' => array(
|
27 |
+
'href' => array(),
|
28 |
+
),
|
29 |
+
)
|
30 |
+
),
|
31 |
+
esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#support' ) )
|
32 |
+
);
|
33 |
if ( true === WP_DEBUG ) :
|
34 |
+
// phpcs:ignore ?>
|
35 |
<span style="white-space:pre-wrap"><?php echo $error; ?></span>
|
36 |
<?php
|
37 |
endif;
|
38 |
?>
|
39 |
</p>
|
40 |
+
<?php
|
41 |
+
endif;
|
42 |
|
43 |
do_action( 'advanced-ads-ad-params-below-textarea', $ad );
|
admin/views/ad-info-bottom.php
CHANGED
@@ -7,15 +7,16 @@
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
10 |
-
*
|
11 |
*/
|
12 |
|
13 |
?><div id="advads-wizard-controls" class="hidden">
|
14 |
-
|
15 |
-
<input type="submit" id="advads-wizard-controls-save" class="button button-primary button-large" value="
|
|
|
16 |
// display different message depending on a new ad (filter = raw) or existing one.
|
17 |
echo ( isset( $post->filter ) && 'raw' === $post->filter ) ? esc_attr_x( 'next', 'wizard navigation', 'advanced-ads' ) : esc_attr_x( 'save', 'wizard navigation', 'advanced-ads' );
|
18 |
-
?>
|
|
|
19 |
<button type="button" id="advads-wizard-controls-next" class="button button-primary button-large"><?php echo esc_attr_x( 'next', 'wizard navigation', 'advanced-ads' ); ?> <span class="dashicons dashicons-controls-forward"></span></button>
|
20 |
<p><a href="javascript:void(0)" class="advads-stop-wizard"><?php esc_attr_e( 'Stop Wizard and show all options', 'advanced-ads' ); ?></a></p>
|
21 |
</div>
|
@@ -30,7 +31,9 @@ endif;
|
|
30 |
/**
|
31 |
* Support and review box
|
32 |
*/
|
33 |
-
if( ! Advanced_Ads_Plugin::any_activated_add_on() ) :
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
7 |
* @license GPL-2.0+
|
8 |
* @link https://wpadvancedads.com
|
9 |
* @copyright since 2013 Thomas Maier, Advanced Ads GmbH
|
|
|
10 |
*/
|
11 |
|
12 |
?><div id="advads-wizard-controls" class="hidden">
|
13 |
+
<button type="button" id="advads-wizard-controls-prev" class="button button-secondary button-large"><span class="dashicons dashicons-controls-back"></span> <?php echo esc_attr_x( 'previous', 'wizard navigation', 'advanced-ads' ); ?></button>
|
14 |
+
<input type="submit" id="advads-wizard-controls-save" class="button button-primary button-large" value="
|
15 |
+
<?php
|
16 |
// display different message depending on a new ad (filter = raw) or existing one.
|
17 |
echo ( isset( $post->filter ) && 'raw' === $post->filter ) ? esc_attr_x( 'next', 'wizard navigation', 'advanced-ads' ) : esc_attr_x( 'save', 'wizard navigation', 'advanced-ads' );
|
18 |
+
?>
|
19 |
+
"/>
|
20 |
<button type="button" id="advads-wizard-controls-next" class="button button-primary button-large"><?php echo esc_attr_x( 'next', 'wizard navigation', 'advanced-ads' ); ?> <span class="dashicons dashicons-controls-forward"></span></button>
|
21 |
<p><a href="javascript:void(0)" class="advads-stop-wizard"><?php esc_attr_e( 'Stop Wizard and show all options', 'advanced-ads' ); ?></a></p>
|
22 |
</div>
|
31 |
/**
|
32 |
* Support and review box
|
33 |
*/
|
34 |
+
if ( ! Advanced_Ads_Plugin::any_activated_add_on() ) :
|
35 |
+
include ADVADS_BASE_PATH . 'admin/views/support-callout.php';
|
36 |
+
?>
|
37 |
+
<script>jQuery( document ).ready(function () { jQuery( '#advads-support-callout').insertAfter( '#ad-main-box' ); });</script>
|
38 |
+
<?php
|
39 |
+
endif;
|
admin/views/ad-info-top.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php // display ad wizard controls
|
2 |
-
?><button type="button" id="advads-start-wizard" class="dashicons-before dashicons-controls-play page-title-action"><?php
|
3 |
-
<button type="button" id="advads-stop-wizard" class="advads-stop-wizard dashicons-before dashicons-no page-title-action hidden"><?php
|
4 |
<script>
|
5 |
-
// move wizard button to head
|
6 |
jQuery('#advads-start-wizard').appendTo('h1');
|
7 |
jQuery('.advads-stop-wizard').insertAfter('h1');
|
8 |
</script>
|
9 |
<?php
|
10 |
-
// show wizard welcome message
|
11 |
if ( $this->show_wizard_welcome() || ! Advanced_Ads::get_number_of_ads() ) :
|
12 |
?>
|
13 |
<div class="advads-ad-metabox postbox">
|
@@ -21,9 +21,10 @@ if ( $this->show_wizard_welcome() || ! Advanced_Ads::get_number_of_ads() ) :
|
|
21 |
<?php
|
22 |
/*
|
23 |
<h2><?php _e( 'Welcome to the Wizard', 'advanced-ads' ); ?></h2>
|
24 |
-
<p><?php _e( 'The Wizard helps you to quickly create and publish an ad. Therefore, only the most common options are visible.', 'advanced-ads' ); ?></p
|
|
|
25 |
?>
|
26 |
-
<a class="advads-stop-wizard dashicons-before dashicons-no" style="line-height: 1.6em; cursor: pointer;"><?php
|
27 |
</div>
|
28 |
<script>
|
29 |
// move wizard button to head
|
1 |
+
<?php // display ad wizard controls.
|
2 |
+
?><button type="button" id="advads-start-wizard" class="dashicons-before dashicons-controls-play page-title-action"><?php esc_html_e( 'Start Wizard', 'advanced-ads' ); ?></button>
|
3 |
+
<button type="button" id="advads-stop-wizard" class="advads-stop-wizard dashicons-before dashicons-no page-title-action hidden"><?php esc_html_e( 'Stop Wizard', 'advanced-ads' ); ?></button>
|
4 |
<script>
|
5 |
+
// move wizard button to head.
|
6 |
jQuery('#advads-start-wizard').appendTo('h1');
|
7 |
jQuery('.advads-stop-wizard').insertAfter('h1');
|
8 |
</script>
|
9 |
<?php
|
10 |
+
// show wizard welcome message.
|
11 |
if ( $this->show_wizard_welcome() || ! Advanced_Ads::get_number_of_ads() ) :
|
12 |
?>
|
13 |
<div class="advads-ad-metabox postbox">
|
21 |
<?php
|
22 |
/*
|
23 |
<h2><?php _e( 'Welcome to the Wizard', 'advanced-ads' ); ?></h2>
|
24 |
+
<p><?php _e( 'The Wizard helps you to quickly create and publish an ad. Therefore, only the most common options are visible.', 'advanced-ads' ); ?></p>
|
25 |
+
*/
|
26 |
?>
|
27 |
+
<a class="advads-stop-wizard dashicons-before dashicons-no" style="line-height: 1.6em; cursor: pointer;"><?php esc_html_e( 'Stop Wizard and show all options', 'advanced-ads' ); ?></a>
|
28 |
</div>
|
29 |
<script>
|
30 |
// move wizard button to head
|
admin/views/ad-info.php
CHANGED
@@ -1,25 +1,45 @@
|
|
1 |
<div id="advads-ad-info">
|
2 |
-
<span><?php printf(
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
<span><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
</div>
|
9 |
<div id="advads-ad-description">
|
10 |
<?php if ( ! empty( $ad->description ) ) : ?>
|
11 |
-
<p title="<?php
|
12 |
-
|
13 |
<?php
|
14 |
-
echo nl2br( $ad->description );
|
15 |
?>
|
16 |
</p>
|
17 |
<?php else : ?>
|
18 |
-
<button type="button" onclick="advads_toggle('#advads-ad-description textarea'); advads_toggle('#advads-ad-description button')"><?php
|
19 |
<?php endif; ?>
|
20 |
<textarea name="advanced_ad[description]" placeholder="
|
21 |
<?php
|
22 |
-
|
23 |
?>
|
24 |
-
"><?php echo $ad->description; ?></textarea>
|
25 |
</div>
|
1 |
<div id="advads-ad-info">
|
2 |
+
<span><?php printf(
|
3 |
+
// translators: %s is an ad ID.
|
4 |
+
esc_html__( 'Ad Id: %s', 'advanced-ads' ),
|
5 |
+
'<strong>' . absint( $post->ID ) . '</strong>'
|
6 |
+
); ?></span>
|
7 |
+
<label><span><?php esc_html_e( 'shortcode', 'advanced-ads' ); ?></span>
|
8 |
+
<pre><input type="text" onclick="this.select();" value='[the_ad id="<?php echo absint( $post->ID ); ?>"]' readonly="readonly"/></pre></label>
|
9 |
+
<label><span><?php esc_html_e( 'theme function', 'advanced-ads' ); ?></span>
|
10 |
+
<pre><input type="text" onclick="this.select();" value="<?php the_ad(<?php echo absint( $post->ID ); ?>); ?>" readonly="readonly"/></pre></label>
|
11 |
+
<span>
|
12 |
+
<?php
|
13 |
+
printf(
|
14 |
+
wp_kses(
|
15 |
+
// translators: %s is a URL.
|
16 |
+
__( 'Find more display options in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ),
|
17 |
+
array(
|
18 |
+
'a' => array(
|
19 |
+
'href' => array(),
|
20 |
+
'target' => array(),
|
21 |
+
),
|
22 |
+
)
|
23 |
+
),
|
24 |
+
esc_url( ADVADS_URL ) . 'manual/display-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit'
|
25 |
+
);
|
26 |
+
?>
|
27 |
+
</span>
|
28 |
</div>
|
29 |
<div id="advads-ad-description">
|
30 |
<?php if ( ! empty( $ad->description ) ) : ?>
|
31 |
+
<p title="<?php esc_html_e( 'click to change', 'advanced-ads' ); ?>"
|
32 |
+
onclick="advads_toggle('#advads-ad-description textarea'); advads_toggle('#advads-ad-description p')">
|
33 |
<?php
|
34 |
+
echo nl2br( esc_html( $ad->description ) );
|
35 |
?>
|
36 |
</p>
|
37 |
<?php else : ?>
|
38 |
+
<button type="button" onclick="advads_toggle('#advads-ad-description textarea'); advads_toggle('#advads-ad-description button')"><?php esc_html_e( 'Add a description', 'advanced-ads' ); ?></button>
|
39 |
<?php endif; ?>
|
40 |
<textarea name="advanced_ad[description]" placeholder="
|
41 |
<?php
|
42 |
+
esc_html_e( 'Internal description or your own notes about this ad.', 'advanced-ads' );
|
43 |
?>
|
44 |
+
"><?php echo esc_html( $ad->description ); ?></textarea>
|
45 |
</div>
|
admin/views/ad-list-details-column.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
<fieldset class="inline-edit-col-left">
|
2 |
<div class="inline-edit-col">
|
3 |
<?php if ( ! empty( $type ) ) :
|
4 |
-
// display image, if this is the image type
|
5 |
if ( 'image' === $ad->type ) {
|
6 |
-
$
|
7 |
-
$types[ $ad->type ]->create_image_icon( $
|
8 |
}
|
9 |
-
?><p><strong class="advads-ad-type"><?php echo $type; ?></strong></p>
|
10 |
<?php
|
11 |
endif;
|
12 |
-
if ( ! empty( $size ) ) :
|
13 |
-
|
14 |
-
<p class="advads-ad-size"><?php echo $size; ?></p>
|
15 |
<?php
|
16 |
endif;
|
17 |
do_action( 'advanced-ads-ad-list-details-column-after', $ad );
|
18 |
-
?>
|
19 |
</div>
|
20 |
</fieldset>
|
1 |
<fieldset class="inline-edit-col-left">
|
2 |
<div class="inline-edit-col">
|
3 |
<?php if ( ! empty( $type ) ) :
|
4 |
+
// display image, if this is the image type.
|
5 |
if ( 'image' === $ad->type ) {
|
6 |
+
$image_id = ( isset( $ad->output['image_id'] ) ) ? $ad->output['image_id'] : '';
|
7 |
+
$types[ $ad->type ]->create_image_icon( $image_id );
|
8 |
}
|
9 |
+
?><p><strong class="advads-ad-type"><?php echo esc_attr( $type ); ?></strong></p>
|
10 |
<?php
|
11 |
endif;
|
12 |
+
if ( ! empty( $size ) ) :
|
13 |
+
?>
|
14 |
+
<p class="advads-ad-size"><?php echo esc_attr( $size ); ?></p>
|
15 |
<?php
|
16 |
endif;
|
17 |
do_action( 'advanced-ads-ad-list-details-column-after', $ad );
|
18 |
+
?>
|
19 |
</div>
|
20 |
</fieldset>
|
admin/views/ad-list-filters.php
CHANGED
@@ -15,34 +15,34 @@ if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] )
|
|
15 |
?>
|
16 |
<?php if ( ! empty( $all_filters['all_types'] ) ) : ?>
|
17 |
<select id="advads-filter-type" name="adtype">
|
18 |
-
<option value="">- <?php
|
19 |
<?php foreach ( $all_filters['all_types'] as $key => $value ) : ?>
|
20 |
-
<option <?php selected( $ad_type, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo $value; ?></option>
|
21 |
<?php endforeach; ?>
|
22 |
</select>
|
23 |
<?php endif; ?>
|
24 |
<?php if ( ! empty( $all_filters['all_sizes'] ) ) : ?>
|
25 |
<select id="advads-filter-size" name="adsize">
|
26 |
-
<option value="">- <?php
|
27 |
<?php foreach ( $all_filters['all_sizes'] as $key => $value ) : ?>
|
28 |
-
<option <?php selected( $ad_size, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo $value; ?></option>
|
29 |
<?php endforeach; ?>
|
30 |
</select>
|
31 |
<?php endif; ?>
|
32 |
<?php if ( ! empty( $all_filters['all_dates'] ) ) : ?>
|
33 |
<select id="advads-filter-date" name="addate">
|
34 |
-
<option value="">- <?php
|
35 |
<?php foreach ( $all_filters['all_dates'] as $key => $value ) : ?>
|
36 |
-
<option <?php selected( $ad_date, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo $value; ?></option>
|
37 |
<?php endforeach; ?>
|
38 |
</select>
|
39 |
<?php endif; ?>
|
40 |
<?php if ( ! empty( $all_filters['all_groups'] ) ) : ?>
|
41 |
<select id="advads-filter-group" name="adgroup">
|
42 |
-
<option value="">- <?php
|
43 |
<?php foreach ( $all_filters['all_groups'] as $key => $value ) : ?>
|
44 |
-
<option <?php selected( $ad_group, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo $value; ?></option>
|
45 |
<?php endforeach; ?>
|
46 |
</select>
|
47 |
<?php endif; ?>
|
48 |
-
<?php do_action( 'advanced-ads-ad-list-filter-markup', $all_filters ); ?>
|
15 |
?>
|
16 |
<?php if ( ! empty( $all_filters['all_types'] ) ) : ?>
|
17 |
<select id="advads-filter-type" name="adtype">
|
18 |
+
<option value="">- <?php esc_html_e( 'all ad types', 'advanced-ads' ); ?> -</option>
|
19 |
<?php foreach ( $all_filters['all_types'] as $key => $value ) : ?>
|
20 |
+
<option <?php selected( $ad_type, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
|
21 |
<?php endforeach; ?>
|
22 |
</select>
|
23 |
<?php endif; ?>
|
24 |
<?php if ( ! empty( $all_filters['all_sizes'] ) ) : ?>
|
25 |
<select id="advads-filter-size" name="adsize">
|
26 |
+
<option value="">- <?php esc_html_e( 'all ad sizes', 'advanced-ads' ); ?> -</option>
|
27 |
<?php foreach ( $all_filters['all_sizes'] as $key => $value ) : ?>
|
28 |
+
<option <?php selected( $ad_size, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
|
29 |
<?php endforeach; ?>
|
30 |
</select>
|
31 |
<?php endif; ?>
|
32 |
<?php if ( ! empty( $all_filters['all_dates'] ) ) : ?>
|
33 |
<select id="advads-filter-date" name="addate">
|
34 |
+
<option value="">- <?php esc_html_e( 'all ad dates', 'advanced-ads' ); ?> -</option>
|
35 |
<?php foreach ( $all_filters['all_dates'] as $key => $value ) : ?>
|
36 |
+
<option <?php selected( $ad_date, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
|
37 |
<?php endforeach; ?>
|
38 |
</select>
|
39 |
<?php endif; ?>
|
40 |
<?php if ( ! empty( $all_filters['all_groups'] ) ) : ?>
|
41 |
<select id="advads-filter-group" name="adgroup">
|
42 |
+
<option value="">- <?php esc_html_e( 'all ad groups', 'advanced-ads' ); ?> -</option>
|
43 |
<?php foreach ( $all_filters['all_groups'] as $key => $value ) : ?>
|
44 |
+
<option <?php selected( $ad_group, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
|
45 |
<?php endforeach; ?>
|
46 |
</select>
|
47 |
<?php endif; ?>
|
48 |
+
<?php do_action( 'advanced-ads-ad-list-filter-markup', $all_filters ); ?>
|
admin/views/ad-list-shortcode-column.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<input class="advads-ad-injection-shortcode" onclick="this.select();" value="[the_ad id="<?php echo $ad->id; ?>"]"/>
|
1 |
+
<input class="advads-ad-injection-shortcode" onclick="this.select();" value="[the_ad id="<?php echo esc_attr( $ad->id ); ?>"]"/>
|
admin/views/ad-list-timing-column.php
CHANGED
@@ -1,7 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<fieldset class="inline-edit-col-left">
|
2 |
-
<div class="inline-edit-col <?php echo $html_classes; ?>">
|
3 |
-
<?php
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
<?php endif; ?>
|
6 |
<?php if ( $expiry ) : ?>
|
7 |
<?php
|
@@ -25,11 +52,29 @@
|
|
25 |
}
|
26 |
?>
|
27 |
<?php if ( $expiry > time() ) : ?>
|
28 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<?php else : ?>
|
30 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
<?php endif; ?>
|
32 |
<?php endif; ?>
|
33 |
-
<?php
|
|
|
|
|
34 |
</div>
|
35 |
</fieldset>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render content of the Ad Schedule column in the ad overview list
|
4 |
+
*
|
5 |
+
* @var string $html_classes additonal values for class attribute.
|
6 |
+
* @var string $post_future timestamp of the schedule date.
|
7 |
+
* @var string $expiry_date_format date format.
|
8 |
+
* @var string $expiry expiry date.
|
9 |
+
* @var string $content_after HTML to load after the schedule content.
|
10 |
+
*/
|
11 |
+
?>
|
12 |
<fieldset class="inline-edit-col-left">
|
13 |
+
<div class="inline-edit-col <?php echo esc_attr( $html_classes ); ?>">
|
14 |
+
<?php
|
15 |
+
if ( $post_future ) :
|
16 |
+
?>
|
17 |
+
<p>
|
18 |
+
<?php
|
19 |
+
printf(
|
20 |
+
// translators: %s is a date.
|
21 |
+
esc_html__( 'starts %s', 'advanced-ads' ),
|
22 |
+
esc_html(
|
23 |
+
get_date_from_gmt(
|
24 |
+
// phpcs:ignore
|
25 |
+
date( 'Y-m-d H:i:s', $post_future ),
|
26 |
+
esc_html( $expiry_date_format )
|
27 |
+
)
|
28 |
+
)
|
29 |
+
);
|
30 |
+
?>
|
31 |
+
</p>
|
32 |
<?php endif; ?>
|
33 |
<?php if ( $expiry ) : ?>
|
34 |
<?php
|
52 |
}
|
53 |
?>
|
54 |
<?php if ( $expiry > time() ) : ?>
|
55 |
+
<p>
|
56 |
+
<?php
|
57 |
+
printf(
|
58 |
+
// translators: %s is a time and date string.
|
59 |
+
esc_html__( 'expires %s', 'advanced-ads' ),
|
60 |
+
esc_html( $expiry_date_string )
|
61 |
+
);
|
62 |
+
?>
|
63 |
+
</p>
|
64 |
<?php else : ?>
|
65 |
+
<p>
|
66 |
+
<?php
|
67 |
+
printf(
|
68 |
+
// translators: %s is a time and date string.
|
69 |
+
esc_html__( '<strong>expired</strong> %s', 'advanced-ads' ),
|
70 |
+
esc_html( $expiry_date_string )
|
71 |
+
);
|
72 |
+
?>
|
73 |
+
</p>
|
74 |
<?php endif; ?>
|
75 |
<?php endif; ?>
|
76 |
+
<?php
|
77 |
+
// phpcs:ignore
|
78 |
+
echo $content_after; ?>
|
79 |
</div>
|
80 |
</fieldset>
|
admin/views/ad-main-metabox.php
CHANGED
@@ -1,28 +1,27 @@
|
|
1 |
<?php $types = Advanced_Ads::get_instance()->ad_types; ?>
|
2 |
<?php if ( empty( $types ) ) : ?>
|
3 |
-
<p><?php
|
4 |
<?php else : ?>
|
5 |
<ul id="advanced-ad-type">
|
6 |
<?php
|
7 |
-
// choose first type if none set
|
8 |
-
$
|
9 |
foreach ( $types as $_type ) :
|
10 |
?>
|
11 |
-
<li class="advanced-ads-type-list-<?php echo $_type->ID; ?>">
|
12 |
-
<input type="radio" name="advanced_ad[type]" id="advanced-ad-type-<?php
|
13 |
-
|
14 |
-
<label for="advanced-ad-type-<?php echo $_type->ID; ?>"><?php echo ( empty( $_type->title ) ) ? $_type->ID : $_type->title; ?></label>
|
15 |
<?php
|
16 |
if ( ! empty( $_type->description ) ) :
|
17 |
?>
|
18 |
-
<span class="description"><?php echo $_type->description; ?></span><?php endif; ?>
|
19 |
</li>
|
20 |
<?php endforeach; ?>
|
21 |
</ul>
|
22 |
<?php endif; ?>
|
23 |
<script>
|
24 |
jQuery( document ).on('change', '#advanced-ad-type input', function () {
|
25 |
-
|
26 |
advads_update_ad_type_headline();
|
27 |
});
|
28 |
|
@@ -33,8 +32,8 @@ function advads_update_ad_type_headline(){
|
|
33 |
var advads_selected_id = jQuery('#advanced-ad-type input:checked').attr('id');
|
34 |
jQuery('#ad-main-box h2').html( advads_main_metabox_title + ': ' + advads_selected_type );
|
35 |
// if (advads_selected_id === "advanced-ad-type-adsense") jQuery('#advads-gadsense-box').show();
|
36 |
-
|
37 |
-
|
38 |
}
|
39 |
advads_update_ad_type_headline();
|
40 |
</script>
|
1 |
<?php $types = Advanced_Ads::get_instance()->ad_types; ?>
|
2 |
<?php if ( empty( $types ) ) : ?>
|
3 |
+
<p><?php esc_html_e( 'No ad types defined', 'advanced-ads' ); ?></p>
|
4 |
<?php else : ?>
|
5 |
<ul id="advanced-ad-type">
|
6 |
<?php
|
7 |
+
// choose first type if none set.
|
8 |
+
$ad_type = ( isset( $ad->type ) ) ? $ad->type : current( $types )->ID;
|
9 |
foreach ( $types as $_type ) :
|
10 |
?>
|
11 |
+
<li class="advanced-ads-type-list-<?php echo esc_attr( $_type->ID ); ?>">
|
12 |
+
<input type="radio" name="advanced_ad[type]" id="advanced-ad-type-<?php echo esc_attr( $_type->ID ); ?>" value="<?php echo esc_attr( $_type->ID ); ?>" <?php checked( $ad_type, $_type->ID ); ?>/>
|
13 |
+
<label for="advanced-ad-type-<?php echo esc_attr( $_type->ID ); ?>"><?php echo empty( $_type->title ) ? esc_html( $_type->ID ) : esc_html( $_type->title ); ?></label>
|
|
|
14 |
<?php
|
15 |
if ( ! empty( $_type->description ) ) :
|
16 |
?>
|
17 |
+
<span class="description"><?php echo esc_html( $_type->description ); ?></span><?php endif; ?>
|
18 |
</li>
|
19 |
<?php endforeach; ?>
|
20 |
</ul>
|
21 |
<?php endif; ?>
|
22 |
<script>
|
23 |
jQuery( document ).on('change', '#advanced-ad-type input', function () {
|
24 |
+
AdvancedAdsAdmin.AdImporter.onChangedAdType();
|
25 |
advads_update_ad_type_headline();
|
26 |
});
|
27 |
|
32 |
var advads_selected_id = jQuery('#advanced-ad-type input:checked').attr('id');
|
33 |
jQuery('#ad-main-box h2').html( advads_main_metabox_title + ': ' + advads_selected_type );
|
34 |
// if (advads_selected_id === "advanced-ad-type-adsense") jQuery('#advads-gadsense-box').show();
|
35 |
+
// else jQuery('#advads-gadsense-box').hide();
|
36 |
+
jQuery('#advads-gadsense-box').hide();
|
37 |
}
|
38 |
advads_update_ad_type_headline();
|
39 |
</script>
|
admin/views/ad-output-metabox.php
CHANGED
@@ -1,85 +1,65 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<div class="advads-option-list">
|
4 |
-
<span class="label"><?php
|
5 |
<div id="advanced-ad-output-position">
|
6 |
-
<label><input type="radio" name="advanced_ad[output][position]" value="" title="<?php
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
<label title="<?php
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
checked( $options['position'], 'right' ); }
|
25 |
-
?>/>
|
26 |
-
<img src="<?php echo ADVADS_BASE_URL; ?>admin/assets/img/output-right.png" width="60" height="45"/></label>
|
27 |
-
<p><label><input type="checkbox" name="advanced_ad[output][clearfix]" value="1"<?php
|
28 |
-
if ( isset( $options['clearfix'] ) ) {
|
29 |
-
checked( $options['clearfix'], 1 ); }
|
30 |
-
?>/><?php
|
31 |
-
_e( 'Check this if you don\'t want the following elements to float around the ad. (adds a clearfix)', 'advanced-ads' );
|
32 |
-
?></label></p>
|
33 |
</div>
|
34 |
<hr/>
|
35 |
-
<span class="label"><?php
|
36 |
<div id="advanced-ad-output-margin">
|
37 |
-
<label><?php
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
<
|
42 |
-
if ( isset( $options['margin']['right'] ) ) {
|
43 |
-
echo $options['margin']['right']; }
|
44 |
-
?>" name="advanced_ad[output][margin][right]"/>px</label>
|
45 |
-
<label><?php _e( 'bottom:', 'advanced-ads' ); ?> <input type="number" value="<?php
|
46 |
-
if ( isset( $options['margin']['bottom'] ) ) {
|
47 |
-
echo $options['margin']['bottom']; }
|
48 |
-
?>" name="advanced_ad[output][margin][bottom]"/>px</label>
|
49 |
-
<label><?php _e( 'left:', 'advanced-ads' ); ?> <input type="number" value="<?php
|
50 |
-
if ( isset( $options['margin']['left'] ) ) {
|
51 |
-
echo $options['margin']['left']; }
|
52 |
-
?>" name="advanced_ad[output][margin][left]"/>px</label>
|
53 |
-
<p class="description"><?php _e( 'tip: use this to add a margin around the ad', 'advanced-ads' ); ?></p>
|
54 |
</div>
|
55 |
<hr class="advads-hide-in-wizard"/>
|
56 |
-
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-id"><?php
|
57 |
<div class="advads-hide-in-wizard">
|
58 |
-
<input type="text" id="advads-output-wrapper-id" name="advanced_ad[output][wrapper-id]" value="<?php
|
59 |
-
|
60 |
-
echo $options['wrapper-id']; }
|
61 |
-
?>"/>
|
62 |
-
<p class="description"><?php _e( 'Specify the id of the ad container. Leave blank for random or no id.', 'advanced-ads' ); ?>
|
63 |
<span class="advads-output-wrapper-id-error"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></span></p>
|
64 |
</div>
|
65 |
<hr class="advads-hide-in-wizard"/>
|
66 |
-
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-class"><?php
|
67 |
<div class="advads-hide-in-wizard">
|
68 |
-
<input type="text" id="advads-output-wrapper-class" name="advanced_ad[output][wrapper-class]" value="<?php
|
69 |
-
|
70 |
-
echo $options['wrapper-class']; }
|
71 |
-
?>"/>
|
72 |
-
<p class="description"><?php _e( 'Specify one or more classes for the container. Separate multiple classes with a space', 'advanced-ads' ); ?>.</p>
|
73 |
</div>
|
74 |
<hr class="advads-hide-in-wizard"/>
|
75 |
-
<label for="advads-output-debugmode" class="label advads-hide-in-wizard"><?php
|
76 |
<div class="advads-hide-in-wizard">
|
77 |
-
<input id="advads-output-debugmode" type="checkbox" name="advanced_ad[output][debugmode]" value="1" <?php
|
78 |
-
if ( isset( $options['debugmode'] ) ) {
|
79 |
-
checked( $options['debugmode'], 1 ); }
|
80 |
-
?>/>
|
81 |
|
82 |
-
<a href="<?php echo ADVADS_URL; ?>manual/ad-debug-mode/#utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank"><?php
|
83 |
</div>
|
84 |
|
85 |
<?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render Layout/Output meta box on ad edit screen.
|
4 |
+
*
|
5 |
+
* @var bool $has_position true if the position option is set.
|
6 |
+
* @var bool $has_clearfix true if the clearfix option is enabled.
|
7 |
+
* @var string $margin value for margin option.
|
8 |
+
* @var string $wrapper_id value for wrapper ID option.
|
9 |
+
* @var bool $debug_mode_enabled true if the ad debug mode option is enabled.
|
10 |
+
*/
|
11 |
+
?>
|
12 |
+
<p class="description"><?php esc_html_e( 'Everything connected to the ads layout and output.', 'advanced-ads' ); ?></p>
|
13 |
<div class="advads-option-list">
|
14 |
+
<span class="label"><?php esc_html_e( 'Position', 'advanced-ads' ); ?></span>
|
15 |
<div id="advanced-ad-output-position">
|
16 |
+
<label><input type="radio" name="advanced_ad[output][position]" value="" title="<?php esc_html_e( '- default -', 'advanced-ads' ); ?>" <?php checked( $has_position, false ); ?>
|
17 |
+
?
|
18 |
+
/><?php esc_html_e( 'default', 'advanced-ads' ); ?></label>
|
19 |
+
<label title="<?php esc_html_e( 'left', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="left" <?php checked( $position, 'left' ); ?>
|
20 |
+
/>
|
21 |
+
<img src="<?php echo esc_url( ADVADS_BASE_URL ); ?>admin/assets/img/output-left.png" width="60" height="45"/></label>
|
22 |
+
<label title="<?php esc_html_e( 'center', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="center" <?php checked( $position, 'center' ); ?>
|
23 |
+
/>
|
24 |
+
<img src="<?php echo esc_url( ADVADS_BASE_URL ); ?>admin/assets/img/output-center.png" width="60" height="45"/></label>
|
25 |
+
<label title="<?php esc_html_e( 'right', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="right" <?php checked( $position, 'right' ); ?>
|
26 |
+
/>
|
27 |
+
<img src="<?php echo esc_url( ADVADS_BASE_URL ); ?>admin/assets/img/output-right.png" width="60" height="45"/></label>
|
28 |
+
<p><label><input type="checkbox" name="advanced_ad[output][clearfix]" value="1" <?php checked( $has_clearfix, true ); ?>
|
29 |
+
/>
|
30 |
+
<?php
|
31 |
+
esc_html_e( 'Check this if you don’t want the following elements to float around the ad. (adds a clearfix)', 'advanced-ads' );
|
32 |
+
?>
|
33 |
+
</label></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
</div>
|
35 |
<hr/>
|
36 |
+
<span class="label"><?php esc_html_e( 'Margin', 'advanced-ads' ); ?></span>
|
37 |
<div id="advanced-ad-output-margin">
|
38 |
+
<label><?php esc_html_e( 'top:', 'advanced-ads' ); ?> <input type="number" value="<?php echo ( isset( $margin['top'] ) ) ? esc_attr( $margin['top'] ) : ''; ?>" name="advanced_ad[output][margin][top]"/>px</label>
|
39 |
+
<label><?php esc_html_e( 'right:', 'advanced-ads' ); ?> <input type="number" value="<?php echo ( isset( $margin['right'] ) ) ? esc_attr( $margin['right'] ) : ''; ?>" name="advanced_ad[output][margin][right]"/>px</label>
|
40 |
+
<label><?php esc_html_e( 'bottom:', 'advanced-ads' ); ?> <input type="number" value="<?php echo ( isset( $margin['bottom'] ) ) ? esc_attr( $margin['bottom'] ) : ''; ?>" name="advanced_ad[output][margin][bottom]"/>px</label>
|
41 |
+
<label><?php esc_html_e( 'left:', 'advanced-ads' ); ?> <input type="number" value="<?php echo ( isset( $margin['left'] ) ) ? esc_attr( $margin['left'] ) : ''; ?>" name="advanced_ad[output][margin][left]"/>px</label>
|
42 |
+
<p class="description"><?php esc_html_e( 'tip: use this to add a margin around the ad', 'advanced-ads' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</div>
|
44 |
<hr class="advads-hide-in-wizard"/>
|
45 |
+
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-id"><?php esc_html_e( 'container ID', 'advanced-ads' ); ?></label>
|
46 |
<div class="advads-hide-in-wizard">
|
47 |
+
<input type="text" id="advads-output-wrapper-id" name="advanced_ad[output][wrapper-id]" value="<?php echo esc_attr( $wrapper_id ); ?>"/>
|
48 |
+
<p class="description"><?php esc_html_e( 'Specify the id of the ad container. Leave blank for random or no id.', 'advanced-ads' ); ?>
|
|
|
|
|
|
|
49 |
<span class="advads-output-wrapper-id-error"><?php esc_attr_e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></span></p>
|
50 |
</div>
|
51 |
<hr class="advads-hide-in-wizard"/>
|
52 |
+
<label class='label advads-hide-in-wizard' for="advads-output-wrapper-class"><?php esc_html_e( 'container classes', 'advanced-ads' ); ?></label>
|
53 |
<div class="advads-hide-in-wizard">
|
54 |
+
<input type="text" id="advads-output-wrapper-class" name="advanced_ad[output][wrapper-class]" value="<?php echo esc_attr( $wrapper_class ); ?>"/>
|
55 |
+
<p class="description"><?php esc_html_e( 'Specify one or more classes for the container. Separate multiple classes with a space', 'advanced-ads' ); ?>.</p>
|
|
|
|
|
|
|
56 |
</div>
|
57 |
<hr class="advads-hide-in-wizard"/>
|
58 |
+
<label for="advads-output-debugmode" class="label advads-hide-in-wizard"><?php esc_html_e( 'Enable debug mode', 'advanced-ads' ); ?></label>
|
59 |
<div class="advads-hide-in-wizard">
|
60 |
+
<input id="advads-output-debugmode" type="checkbox" name="advanced_ad[output][debugmode]" value="1" <?php checked( $debug_mode_enabled, true ); ?>/>
|
|
|
|
|
|
|
61 |
|
62 |
+
<a href="<?php echo esc_url( ADVADS_URL ); ?>manual/ad-debug-mode/#utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
|
63 |
</div>
|
64 |
|
65 |
<?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
|
admin/views/ad-parameters-metabox.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php $types = Advanced_Ads::get_instance()->ad_types; ?>
|
2 |
<?php
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* @filesource admin/assets/js/admin.js
|
7 |
* @filesource includes/class-ajax-callbacks.php ::load_ad_parameters_metabox
|
@@ -12,7 +12,7 @@ do_action( 'advanced-ads-ad-params-before', $ad, $types );
|
|
12 |
<div id="advanced-ads-tinymce-wrapper" style="display:none;">
|
13 |
<?php
|
14 |
$args = array(
|
15 |
-
// used here instead of textarea_rows, because of display:none
|
16 |
'editor_height' => 300,
|
17 |
'drag_drop_upload' => true,
|
18 |
);
|
@@ -24,11 +24,11 @@ do_action( 'advanced-ads-ad-params-before', $ad, $types );
|
|
24 |
$type = ( isset( $types[ $ad->type ] ) ) ? $types[ $ad->type ] : current( $types );
|
25 |
$type->render_parameters( $ad );
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
if ( ! in_array($ad->type, $types_without_size) ) {
|
30 |
-
|
31 |
-
|
32 |
?>
|
33 |
</div>
|
34 |
<?php
|
1 |
<?php $types = Advanced_Ads::get_instance()->ad_types; ?>
|
2 |
<?php
|
3 |
/**
|
4 |
+
* When changing ad type ad parameter content is loaded via ajax
|
5 |
*
|
6 |
* @filesource admin/assets/js/admin.js
|
7 |
* @filesource includes/class-ajax-callbacks.php ::load_ad_parameters_metabox
|
12 |
<div id="advanced-ads-tinymce-wrapper" style="display:none;">
|
13 |
<?php
|
14 |
$args = array(
|
15 |
+
// used here instead of textarea_rows, because of display:none.
|
16 |
'editor_height' => 300,
|
17 |
'drag_drop_upload' => true,
|
18 |
);
|
24 |
$type = ( isset( $types[ $ad->type ] ) ) ? $types[ $ad->type ] : current( $types );
|
25 |
$type->render_parameters( $ad );
|
26 |
|
27 |
+
$types_without_size = array( 'dummy' );
|
28 |
+
$types_without_size = apply_filters( 'advanced-ads-types-without-size', $types_without_size );
|
29 |
+
if ( ! in_array( $ad->type, $types_without_size ) ) {
|
30 |
+
include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
|
31 |
+
};
|
32 |
?>
|
33 |
</div>
|
34 |
<?php
|
admin/views/ad-parameters-size.php
CHANGED
@@ -1,23 +1,25 @@
|
|
1 |
<?php
|
2 |
|
3 |
// don’t show sizes for Google Ad Manager ads.
|
4 |
-
if ( 'gam'
|
5 |
return;
|
6 |
}
|
7 |
|
8 |
?>
|
9 |
-
<span class="label"><?php
|
10 |
<div id="advanced-ads-ad-parameters-size">
|
11 |
-
<label><?php
|
12 |
-
<label><?php
|
13 |
<?php
|
14 |
-
$show_reserve_space = in_array( $type->ID, array( 'plain', 'content', 'group', 'adsense' ) );
|
15 |
$enable_reserve_space = $show_reserve_space && ! empty( $ad->output['add_wrapper_sizes'] );
|
16 |
?>
|
17 |
-
<label
|
|
|
18 |
if ( ! $show_reserve_space ) {
|
19 |
echo 'style="display:none;"'; }
|
20 |
-
|
|
|
21 |
<?php
|
22 |
if ( 'image' === $type->ID ) :
|
23 |
Advanced_Ads_Ad_Type_Image::show_original_image_size( $ad );
|
1 |
<?php
|
2 |
|
3 |
// don’t show sizes for Google Ad Manager ads.
|
4 |
+
if ( 'gam' === $type->ID ) {
|
5 |
return;
|
6 |
}
|
7 |
|
8 |
?>
|
9 |
+
<span class="label"><?php esc_html_e( 'size', 'advanced-ads' ); ?></span>
|
10 |
<div id="advanced-ads-ad-parameters-size">
|
11 |
+
<label><?php esc_html_e( 'width', 'advanced-ads' ); ?><input type="number" value="<?php echo isset( $ad->width ) ? esc_attr( $ad->width ) : 0; ?>" name="advanced_ad[width]">px</label>
|
12 |
+
<label><?php esc_html_e( 'height', 'advanced-ads' ); ?><input type="number" value="<?php echo isset( $ad->height ) ? esc_attr( $ad->height ) : 0; ?>" name="advanced_ad[height]">px</label>
|
13 |
<?php
|
14 |
+
$show_reserve_space = in_array( $type->ID, array( 'plain', 'content', 'group', 'adsense' ), true );
|
15 |
$enable_reserve_space = $show_reserve_space && ! empty( $ad->output['add_wrapper_sizes'] );
|
16 |
?>
|
17 |
+
<label
|
18 |
+
<?php
|
19 |
if ( ! $show_reserve_space ) {
|
20 |
echo 'style="display:none;"'; }
|
21 |
+
?>
|
22 |
+
><input type="checkbox" id="advads-wrapper-add-sizes" name="advanced_ad[output][add_wrapper_sizes]" value="true" <?php checked( $enable_reserve_space ); ?>><?php esc_html_e( 'reserve this space', 'advanced-ads' ); ?></label>
|
23 |
<?php
|
24 |
if ( 'image' === $type->ID ) :
|
25 |
Advanced_Ads_Ad_Type_Image::show_original_image_size( $ad );
|
admin/views/ad-submitbox-meta.php
CHANGED
@@ -1,21 +1,26 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
?><div id="advanced-ads-expiry-date" class="misc-pub-section curtime misc-pub-curtime">
|
4 |
<label onclick="advads_toggle_box('#advanced-ads-expiry-date-enable', '#advanced-ads-expiry-date .inner')">
|
5 |
-
<input type="checkbox" id="advanced-ads-expiry-date-enable" name="advanced_ad[expiry_date][enabled]" value="1" <?php checked( $enabled, 1 ); ?>/><?php
|
6 |
</label>
|
7 |
<br/>
|
8 |
-
|
9 |
-
|
10 |
-
if ( ! $enabled ) :
|
11 |
-
?> style="display:none;"<?php endif; ?>><?php
|
12 |
$month = '<label><span class="screen-reader-text">' . __( 'Month', 'advanced-ads' ) . '</span><select id="advads-exp-mm" name="advanced_ad[expiry_date][month]"' . ">\n";
|
13 |
-
for ( $i = 1; $i < 13; $i =
|
14 |
-
$
|
15 |
-
$month
|
16 |
-
$month
|
|
|
17 |
_x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', 'advanced-ads' ),
|
18 |
-
$
|
|
|
19 |
) . "</option>\n";
|
20 |
}
|
21 |
$month .= '</select></label>';
|
@@ -28,9 +33,21 @@ $TZ = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone
|
|
28 |
?>
|
29 |
<fieldset id="advads-exp-timestampdiv">
|
30 |
<div class="timestamp-wrap">
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</fieldset>
|
34 |
-
(<?php echo $
|
35 |
</div>
|
36 |
</div>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Render schedule options in the publish meta box on the ad edit screen
|
4 |
+
*
|
5 |
+
* @var int $curr_month current month index;
|
6 |
+
*/
|
7 |
+
$timezone_name = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() );
|
8 |
?><div id="advanced-ads-expiry-date" class="misc-pub-section curtime misc-pub-curtime">
|
9 |
<label onclick="advads_toggle_box('#advanced-ads-expiry-date-enable', '#advanced-ads-expiry-date .inner')">
|
10 |
+
<input type="checkbox" id="advanced-ads-expiry-date-enable" name="advanced_ad[expiry_date][enabled]" value="1" <?php checked( $enabled, 1 ); ?>/><?php esc_html_e( 'Set expiry date', 'advanced-ads' ); ?>
|
11 |
</label>
|
12 |
<br/>
|
13 |
+
<div class="inner"<?php echo ( ! $enabled ) ? ' style="display:none;"' : ''; ?>>
|
14 |
+
<?php
|
|
|
|
|
15 |
$month = '<label><span class="screen-reader-text">' . __( 'Month', 'advanced-ads' ) . '</span><select id="advads-exp-mm" name="advanced_ad[expiry_date][month]"' . ">\n";
|
16 |
+
for ( $i = 1; $i < 13; $i = ++$i ) {
|
17 |
+
$month_num = zeroise( $i, 2 );
|
18 |
+
$month .= "\t\t\t" . '<option value="' . $month_num . '" ' . selected( $curr_month, $month_num, false ) . '>';
|
19 |
+
$month .= sprintf(
|
20 |
+
// translators: %1$s is the month number, %2$s is the month shortname.
|
21 |
_x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', 'advanced-ads' ),
|
22 |
+
$month_num,
|
23 |
+
$wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) )
|
24 |
) . "</option>\n";
|
25 |
}
|
26 |
$month .= '</select></label>';
|
33 |
?>
|
34 |
<fieldset id="advads-exp-timestampdiv">
|
35 |
<div class="timestamp-wrap">
|
36 |
+
<?php
|
37 |
+
// phpcs:disable
|
38 |
+
printf(
|
39 |
+
// translators: %1$s month, %2$s day, %3$s year, %4$s hour, %5$s minute.
|
40 |
+
_x( '%1$s %2$s, %3$s @ %4$s %5$s', 'order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute', 'advanced-ads' ),
|
41 |
+
$month,
|
42 |
+
$day,
|
43 |
+
$year,
|
44 |
+
$hour,
|
45 |
+
$minute
|
46 |
+
);
|
47 |
+
// phpcs:enable
|
48 |
+
?>
|
49 |
+
</div>
|
50 |
</fieldset>
|
51 |
+
(<?php echo esc_html( $timezone_name ); ?>)
|
52 |
</div>
|
53 |
</div>
|
admin/views/checks.php
CHANGED
@@ -7,12 +7,16 @@
|
|
7 |
|
8 |
$messages = array();
|
9 |
|
10 |
-
// this check is left here even though we no longer show it here, but we don’t want to check it all the time on each page
|
11 |
Advanced_Ads_Checks::jquery_ui_conflict();
|
12 |
|
13 |
-
if( Advanced_Ads_Ad_Health_Notices::has_visible_problems() ){
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
$messages = apply_filters( 'advanced-ads-support-messages', $messages );
|
@@ -22,7 +26,12 @@ if ( count( $messages ) ) :
|
|
22 |
<?php
|
23 |
foreach ( $messages as $_message ) :
|
24 |
?>
|
25 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
26 |
<?php
|
27 |
endforeach;
|
28 |
?>
|
7 |
|
8 |
$messages = array();
|
9 |
|
10 |
+
// this check is left here even though we no longer show it here, but we don’t want to check it all the time on each page.
|
11 |
Advanced_Ads_Checks::jquery_ui_conflict();
|
12 |
|
13 |
+
if ( Advanced_Ads_Ad_Health_Notices::has_visible_problems() ) {
|
14 |
+
$messages[] = sprintf(
|
15 |
+
// translators: %1$s is a starting link tag, %2$s is closing the link tag.
|
16 |
+
esc_attr__( 'Advanced Ads detected potential problems with your ad setup. %1$sShow me these errors%2$s', 'advanced-ads' ),
|
17 |
+
'<a href="' . admin_url( 'admin.php?page=advanced-ads' ) . '">',
|
18 |
+
'</a>'
|
19 |
+
);
|
20 |
}
|
21 |
|
22 |
$messages = apply_filters( 'advanced-ads-support-messages', $messages );
|
26 |
<?php
|
27 |
foreach ( $messages as $_message ) :
|
28 |
?>
|
29 |
+
<p>
|
30 |
+
<?php
|
31 |
+
// phpcs:ignore
|
32 |
+
echo $_message;
|
33 |
+
?>
|
34 |
+
</p>
|
35 |
<?php
|
36 |
endforeach;
|
37 |
?>
|
admin/views/feedback-disable.php
CHANGED
@@ -12,7 +12,8 @@
|
|
12 |
<?php
|
13 |
printf(
|
14 |
/* translators: %s is the email address of the current user */
|
15 |
-
|
|
|
16 |
);
|
17 |
?>
|
18 |
</label></li>
|
@@ -25,7 +26,7 @@
|
|
25 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="other plugin"/><?php esc_attr_e( 'I switched to another plugin', 'advanced-ads' ); ?></label></li>
|
26 |
</ul>
|
27 |
<?php if ( $from ) : ?>
|
28 |
-
<input type="hidden" name="advanced_ads_disable_from" value="<?php echo $from; ?>"/>
|
29 |
<?php endif; ?>
|
30 |
<input class="advanced-ads-feedback-submit button button-primary" type="submit" name="advanced_ads_disable_submit" value="<?php esc_attr_e( 'Send feedback & deactivate', 'advanced-ads' ); ?>"/>
|
31 |
<input class="advanced-ads-feedback-not-deactivate advanced-ads-feedback-submit button" type="submit" name="advanced_ads_keep_submit" value="<?php esc_attr_e( 'Send feedback', 'advanced-ads' ); ?>">
|
@@ -33,13 +34,14 @@
|
|
33 |
<a class="advanced-ads-feedback-only-deactivate" href="#"><?php esc_attr_e( 'Only Deactivate', 'advanced-ads' ); ?></a>
|
34 |
</form>
|
35 |
<div id="advanced-ads-feedback-after-submit">
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
43 |
</div>
|
44 |
</div>
|
45 |
</div>
|
12 |
<?php
|
13 |
printf(
|
14 |
/* translators: %s is the email address of the current user */
|
15 |
+
esc_html__( 'Send me free help to %s', 'advanced-ads' ),
|
16 |
+
esc_html( $mailinput )
|
17 |
);
|
18 |
?>
|
19 |
</label></li>
|
26 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="other plugin"/><?php esc_attr_e( 'I switched to another plugin', 'advanced-ads' ); ?></label></li>
|
27 |
</ul>
|
28 |
<?php if ( $from ) : ?>
|
29 |
+
<input type="hidden" name="advanced_ads_disable_from" value="<?php echo esc_attr( $from ); ?>"/>
|
30 |
<?php endif; ?>
|
31 |
<input class="advanced-ads-feedback-submit button button-primary" type="submit" name="advanced_ads_disable_submit" value="<?php esc_attr_e( 'Send feedback & deactivate', 'advanced-ads' ); ?>"/>
|
32 |
<input class="advanced-ads-feedback-not-deactivate advanced-ads-feedback-submit button" type="submit" name="advanced_ads_keep_submit" value="<?php esc_attr_e( 'Send feedback', 'advanced-ads' ); ?>">
|
34 |
<a class="advanced-ads-feedback-only-deactivate" href="#"><?php esc_attr_e( 'Only Deactivate', 'advanced-ads' ); ?></a>
|
35 |
</form>
|
36 |
<div id="advanced-ads-feedback-after-submit">
|
37 |
+
<h2 id="advanced-ads-feedback-after-submit-waiting" style="display: none"><?php esc_attr_e( 'Thanks for submitting your feedback. I will reply within 24 hours on working days.', 'advanced-ads' ); ?></h2>
|
38 |
+
<h2 id="advanced-ads-feedback-after-submit-goodbye" style="display: none">
|
39 |
+
<?php
|
40 |
+
// translators: %s is the title of the website.
|
41 |
+
printf( esc_attr__( 'All the best to you and %s.', 'advanced-ads' ), '<em>' . esc_html( get_bloginfo( 'name' ) ) . '</em>' );
|
42 |
+
?>
|
43 |
+
</h2>
|
44 |
+
<p id="advanced-ads-feedback-after-submit-disabling-plugin" style="display: none"><?php esc_attr_e( 'Disabling the plugin now…', 'advanced-ads' ); ?></p>
|
45 |
</div>
|
46 |
</div>
|
47 |
</div>
|
admin/views/gadsense-dashboard.php
CHANGED
@@ -1,31 +1,36 @@
|
|
1 |
<?php
|
2 |
$pub_id = Advanced_Ads_AdSense_Data::get_instance()->get_adsense_id();
|
3 |
-
if ($pub_id){
|
4 |
-
if (! $advads_gadsense_options)
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
$summary = Advanced_Ads_Overview_Widgets_Callbacks::create_dashboard_summary($advads_gadsense_options);
|
18 |
-
Advanced_Ads_Overview_Widgets_Callbacks::adsense_stats_js($pub_id);
|
19 |
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
?>
|
26 |
<div class="advanced-ads-adsense-dashboard" data-refresh='<?php echo json_encode($summary)?>' <?php echo $div_tag_extras?>></div><?php
|
27 |
}
|
28 |
-
else{
|
29 |
-
|
30 |
}
|
31 |
-
?>
|
1 |
<?php
|
2 |
$pub_id = Advanced_Ads_AdSense_Data::get_instance()->get_adsense_id();
|
3 |
+
if ( $pub_id ) {
|
4 |
+
if ( ! $advads_gadsense_options ) {
|
5 |
+
$advads_gadsense_options = array();
|
6 |
+
}
|
7 |
+
$advads_gadsense_options = array_merge(
|
8 |
+
array(
|
9 |
+
'dimension_name' => null,
|
10 |
+
'filter_value' => null,
|
11 |
+
'hide_dimensions' => false,
|
12 |
+
'metabox_selector' => null,
|
13 |
+
'hidden' => null,
|
14 |
+
),
|
15 |
+
$advads_gadsense_options
|
16 |
+
);
|
17 |
+
$div_tag_extras = '';
|
18 |
+
if ( $advads_gadsense_options['metabox_selector'] ) {
|
19 |
+
$div_tag_extras .= 'data-metabox_selector="' . $advads_gadsense_options['metabox_selector'] . '""';
|
20 |
+
}
|
21 |
|
22 |
+
$summary = Advanced_Ads_Overview_Widgets_Callbacks::create_dashboard_summary( $advads_gadsense_options );
|
23 |
+
Advanced_Ads_Overview_Widgets_Callbacks::adsense_stats_js( $pub_id );
|
24 |
|
25 |
|
26 |
+
if ( $advads_gadsense_options['hidden'] || ( 'DOMAIN_NAME' !== $advads_gadsense_options['dimension_name'] && ! $advads_gadsense_options['filter_value'] ) ) {
|
27 |
+
$summary->hidden = true;
|
28 |
+
}
|
29 |
|
30 |
?>
|
31 |
<div class="advanced-ads-adsense-dashboard" data-refresh='<?php echo json_encode($summary)?>' <?php echo $div_tag_extras?>></div><?php
|
32 |
}
|
33 |
+
else {
|
34 |
+
echo esc_html__( 'There is an error in your AdSense setup.', 'advanced-ads' );
|
35 |
}
|
36 |
+
?>
|
admin/views/overview-addons-line.php
CHANGED
@@ -1,13 +1,30 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<td><?php if ( isset( $_addon['link'] ) && $_addon['link'] ) : ?>
|
4 |
-
<a class="button <?php echo ( isset( $_addon['link_primary'] )
|
5 |
<?php
|
6 |
-
echo $link_title;
|
7 |
?>
|
8 |
</a>
|
9 |
<?php
|
10 |
endif;
|
11 |
-
?>
|
12 |
</td>
|
13 |
</tr>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render a row with add-on information on the Advanced Ads overview page
|
4 |
+
*
|
5 |
+
* @var array $_addon add-on information.
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<tr<?php echo isset( $_addon['class'] ) ? ' class="' . esc_attr( $_addon['class'] ) . '"' : ''; ?>><th>
|
9 |
+
<?php
|
10 |
+
// phpcs:ignore
|
11 |
+
echo $_addon['title'];
|
12 |
+
?>
|
13 |
+
</th>
|
14 |
+
<td>
|
15 |
+
<?php
|
16 |
+
// phpcs:ignore
|
17 |
+
echo $_addon['desc'];
|
18 |
+
?>
|
19 |
+
</td>
|
20 |
<td><?php if ( isset( $_addon['link'] ) && $_addon['link'] ) : ?>
|
21 |
+
<a class="button <?php echo ( isset( $_addon['link_primary'] ) ) ? 'button-primary' : 'button-secondary'; ?>" href="<?php echo esc_url( $_addon['link'] ); ?>" target="_blank">
|
22 |
<?php
|
23 |
+
echo esc_html( $link_title );
|
24 |
?>
|
25 |
</a>
|
26 |
<?php
|
27 |
endif;
|
28 |
+
?>
|
29 |
</td>
|
30 |
</tr>
|
admin/views/overview-notice-row.php
CHANGED
@@ -1,9 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<li data-notice="<?php echo esc_attr( $_notice_key ); ?>" <?php echo $is_hidden ? 'style="display: none;"' : ''; ?>>
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
<?php if ( $can_hide ) : ?>
|
4 |
-
|
5 |
<?php endif; ?>
|
6 |
<?php if ( $date ) : ?>
|
7 |
-
|
8 |
<?php endif; ?>
|
9 |
</li>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render a line in the notice meta box on the Advanced Ads overview page
|
4 |
+
*
|
5 |
+
* @var string $_notice_key index of the notice.
|
6 |
+
* @var bool $is_hidden true if the notice is currently hidden
|
7 |
+
* @var bool $can_hide true if the notice can be hidden
|
8 |
+
* @var bool $hide true if the notice is hidden
|
9 |
+
* @var string $date date string
|
10 |
+
*/
|
11 |
+
?>
|
12 |
<li data-notice="<?php echo esc_attr( $_notice_key ); ?>" <?php echo $is_hidden ? 'style="display: none;"' : ''; ?>>
|
13 |
+
<span>
|
14 |
+
<?php
|
15 |
+
// phpcs:ignore
|
16 |
+
echo $text;
|
17 |
+
?>
|
18 |
+
</span>
|
19 |
<?php if ( $can_hide ) : ?>
|
20 |
+
<button type="button" class="advads-ad-health-notice-hide<?php echo ! $hide ? ' remove' : ''; ?>"><span class="dashicons dashicons-no-alt"></span></button>
|
21 |
<?php endif; ?>
|
22 |
<?php if ( $date ) : ?>
|
23 |
+
<span class="date"><?php echo esc_attr( $date ); ?></span>
|
24 |
<?php endif; ?>
|
25 |
</li>
|
admin/views/overview-notices.php
CHANGED
@@ -1,22 +1,47 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<?php
|
4 |
Advanced_Ads_Ad_Health_Notices::get_instance()->display_problems();
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
</h3>
|
10 |
<?php
|
11 |
Advanced_Ads_Ad_Health_Notices::get_instance()->display_notices();
|
12 |
|
13 |
?>
|
14 |
-
<p class="adsvads-ad-health-notices-show-hidden" <?php echo ! $ignored_count ? 'style="display: none;"' : '';
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</p>
|
21 |
<?php
|
22 |
|
@@ -24,4 +49,5 @@ if ( Advanced_Ads_Ad_Health_Notices::has_visible_problems() ) {
|
|
24 |
include ADVADS_BASE_PATH . 'admin/views/support-callout.php';
|
25 |
}
|
26 |
|
27 |
-
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render box with problems and notifications on the Advanced Ads overview page
|
4 |
+
*
|
5 |
+
* @var int $has_problems number of problems.
|
6 |
+
* @var int $has_notices number of notices.
|
7 |
+
* @var int $ignored_count number of ignored notices.
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<h3<?php echo ! $has_problems ? ' style="display:none;"' : ''; ?>>
|
11 |
+
<?php
|
12 |
+
esc_attr_e( 'Problems', 'advanceda-ads' );
|
13 |
+
?>
|
14 |
+
</h3>
|
15 |
<?php
|
16 |
Advanced_Ads_Ad_Health_Notices::get_instance()->display_problems();
|
17 |
|
18 |
+
?>
|
19 |
+
<h3<?php echo ! $has_notices ? ' style="display:none;"' : ''; ?>>
|
20 |
+
<?php
|
21 |
+
esc_attr_e( 'Notifications', 'advanceda-ads' );
|
22 |
+
?>
|
23 |
</h3>
|
24 |
<?php
|
25 |
Advanced_Ads_Ad_Health_Notices::get_instance()->display_notices();
|
26 |
|
27 |
?>
|
28 |
+
<p class="adsvads-ad-health-notices-show-hidden" <?php echo ! $ignored_count ? 'style="display: none;"' : ''; ?>>
|
29 |
+
<?php
|
30 |
+
printf(
|
31 |
+
wp_kses(
|
32 |
+
// translators: %s includes a number and markup like <span class="count">6</span>.
|
33 |
+
esc_html__( 'Show %s hidden notices', 'advanced-ads' ),
|
34 |
+
array(
|
35 |
+
'span' => array(
|
36 |
+
'class',
|
37 |
+
),
|
38 |
+
)
|
39 |
+
),
|
40 |
+
'<span class="count">' . absint( $ignored_count ) . '</span>'
|
41 |
+
);
|
42 |
+
?>
|
43 |
+
|
44 |
+
<button type="button"><span class="dashicons dashicons-visibility"></span></button>
|
45 |
</p>
|
46 |
<?php
|
47 |
|
49 |
include ADVADS_BASE_PATH . 'admin/views/support-callout.php';
|
50 |
}
|
51 |
|
52 |
+
?>
|
53 |
+
<div class="advads-loader" style="display: none;"></div>
|
admin/views/overview-widget.php
CHANGED
@@ -1,10 +1,18 @@
|
|
1 |
-
<div id="<?php echo $id; ?>" class="postbox position-<?php echo $position; ?>">
|
2 |
-
<?php if( !empty( $title ) ) : ?>
|
3 |
-
<h2
|
|
|
|
|
|
|
|
|
|
|
4 |
<?php endif; ?>
|
5 |
<div class="inside">
|
6 |
<div class="main">
|
7 |
-
<?php
|
|
|
|
|
|
|
8 |
</div>
|
9 |
</div>
|
10 |
</div>
|
1 |
+
<div id="<?php echo esc_attr( $id ); ?>" class="postbox position-<?php echo esc_attr( $position ); ?>">
|
2 |
+
<?php if ( ! empty( $title ) ) : ?>
|
3 |
+
<h2>
|
4 |
+
<?php
|
5 |
+
// phpcs:ignore
|
6 |
+
echo $title;
|
7 |
+
?>
|
8 |
+
</h2>
|
9 |
<?php endif; ?>
|
10 |
<div class="inside">
|
11 |
<div class="main">
|
12 |
+
<?php
|
13 |
+
// phpcs:ignore
|
14 |
+
echo $content;
|
15 |
+
?>
|
16 |
</div>
|
17 |
</div>
|
18 |
</div>
|
admin/views/overview.php
CHANGED
@@ -3,14 +3,12 @@
|
|
3 |
* Advanced Ads overview page in the dashboard
|
4 |
*/
|
5 |
|
6 |
-
$title = __( 'Ads Dashboard', 'advanced-ads' );
|
7 |
-
|
8 |
?>
|
9 |
<div class="wrap">
|
10 |
-
<h1><?php
|
11 |
|
12 |
<div id="advads-overview">
|
13 |
<?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?>
|
14 |
-
</div
|
15 |
<?php do_action( 'advanced-ads-admin-overview-after' ); ?>
|
16 |
-
</div
|
3 |
* Advanced Ads overview page in the dashboard
|
4 |
*/
|
5 |
|
|
|
|
|
6 |
?>
|
7 |
<div class="wrap">
|
8 |
+
<h1><?php esc_html_e( 'Ads Dashboard', 'advanced-ads' ); ?></h1>
|
9 |
|
10 |
<div id="advads-overview">
|
11 |
<?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?>
|
12 |
+
</div>
|
13 |
<?php do_action( 'advanced-ads-admin-overview-after' ); ?>
|
14 |
+
</div>
|
admin/views/pitch-pro-tab.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<div class="advads-pro-pitch postbox">
|
2 |
-
<h3><?php _e( 'Advanced Ads Pro – test and optimize your ad performance', 'advanced-ads' ); ?></h3>
|
3 |
-
<ul>
|
4 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'Ads for Ad Blockers', 'advanced-ads' ); ?></li>
|
5 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'Click Fraud Protection', 'advanced-ads' ); ?></li>
|
6 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'Lazy Loading', 'advanced-ads' ); ?></li>
|
7 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'support for cached sites', 'advanced-ads' ); ?></li>
|
8 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( '11 more display and visitor conditions', 'advanced-ads' ); ?></li>
|
9 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( '6 more placements', 'advanced-ads' ); ?></li>
|
10 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'placement tests for ad optimization', 'advanced-ads' ); ?></li>
|
11 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'ad grids and many more advanced features', 'advanced-ads' ); ?></li>
|
12 |
-
</ul>
|
13 |
-
<a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-pro" target="_blank"><?php _e( 'See all features and pricing', 'advanced-ads' ); ?></a>
|
14 |
-
</div>
|
15 |
-
<div class="advads-pro-pitch postbox">
|
16 |
-
<?php require ADVADS_BASE_PATH . 'admin/views/pitch-bundle.php'; ?>
|
17 |
-
</div>
|
18 |
-
<div class="clear"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/pitch-tracking.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<div class="advads-pro-pitch postbox">
|
2 |
-
<h3><?php _e( 'Tracking', 'advanced-ads' ); ?></h3>
|
3 |
-
<ul>
|
4 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'track impressions and click on your ads', 'advanced-ads' ); ?></li>
|
5 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'compare ads and periods', 'advanced-ads' ); ?></li>
|
6 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'share reports via link or email', 'advanced-ads' ); ?></li>
|
7 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'limit ads views by overall number of impressions or clicks', 'advanced-ads' ); ?></li>
|
8 |
-
<li><span class="dashicons dashicons-yes"></span><?php _e( 'spread impressions or clicks equally over a given period', 'advanced-ads' ); ?></li>
|
9 |
-
</ul>
|
10 |
-
<a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-tracking" target="_blank"><?php _e( 'See all features and pricing', 'advanced-ads' ); ?></a>
|
11 |
-
</div>
|
12 |
-
<div class="clear"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/{pitch-bundle.php → pitches/all-access.php}
RENAMED
@@ -10,4 +10,4 @@
|
|
10 |
<li><span class="dashicons dashicons-yes"></span><?php echo 'Ad Slider'; ?></li>
|
11 |
</ul>
|
12 |
<p><?php esc_attr_e( 'Risk free with 30-day Money-Back guarantee', 'advanced-ads' ); ?></p>
|
13 |
-
<a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/all-access/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-bundle" target="_blank"><?php esc_attr_e( 'Get All Access', 'advanced-ads' ); ?></a>
|
10 |
<li><span class="dashicons dashicons-yes"></span><?php echo 'Ad Slider'; ?></li>
|
11 |
</ul>
|
12 |
<p><?php esc_attr_e( 'Risk free with 30-day Money-Back guarantee', 'advanced-ads' ); ?></p>
|
13 |
+
<a class="button button-primary" href="<?php echo esc_url( ADVADS_URL ); ?>add-ons/all-access/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-bundle" target="_blank"><?php esc_attr_e( 'Get All Access', 'advanced-ads' ); ?></a>
|
admin/views/pitches/pro-tab.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="advads-pro-pitch postbox">
|
2 |
+
<h3><?php esc_html_e( 'Advanced Ads Pro – test and optimize your ad performance', 'advanced-ads' ); ?></h3>
|
3 |
+
<ul>
|
4 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'Ads for Ad Blockers', 'advanced-ads' ); ?></li>
|
5 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'Click Fraud Protection', 'advanced-ads' ); ?></li>
|
6 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'Lazy Loading', 'advanced-ads' ); ?></li>
|
7 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'support for cached sites', 'advanced-ads' ); ?></li>
|
8 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( '11 more display and visitor conditions', 'advanced-ads' ); ?></li>
|
9 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( '6 more placements', 'advanced-ads' ); ?></li>
|
10 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'placement tests for ad optimization', 'advanced-ads' ); ?></li>
|
11 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'ad grids and many more advanced features', 'advanced-ads' ); ?></li>
|
12 |
+
</ul>
|
13 |
+
<a class="button button-primary" href="<?php echo esc_url( ADVADS_URL ); ?>add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-pro" target="_blank"><?php esc_html_e( 'See all features and pricing', 'advanced-ads' ); ?></a>
|
14 |
+
</div>
|
15 |
+
<div class="advads-pro-pitch postbox">
|
16 |
+
<?php require ADVADS_BASE_PATH . 'admin/views/pitches/all-access.php'; ?>
|
17 |
+
</div>
|
18 |
+
<div class="clear"></div>
|
admin/views/pitches/tracking.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="advads-pro-pitch postbox">
|
2 |
+
<h3><?php esc_html_e( 'Tracking', 'advanced-ads' ); ?></h3>
|
3 |
+
<ul>
|
4 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'track impressions and click on your ads', 'advanced-ads' ); ?></li>
|
5 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'compare ads and periods', 'advanced-ads' ); ?></li>
|
6 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'share reports via link or email', 'advanced-ads' ); ?></li>
|
7 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'limit ads views by overall number of impressions or clicks', 'advanced-ads' ); ?></li>
|
8 |
+
<li><span class="dashicons dashicons-yes"></span><?php esc_html_e( 'spread impressions or clicks equally over a given period', 'advanced-ads' ); ?></li>
|
9 |
+
</ul>
|
10 |
+
<a class="button button-primary" href="<?php echo esc_url( ADVADS_URL ); ?>add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-tracking" target="_blank"><?php esc_html_e( 'See all features and pricing', 'advanced-ads' ); ?></a>
|
11 |
+
</div>
|
12 |
+
<div class="clear"></div>
|
admin/views/placement-form.php
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<form method="POST" action="" onsubmit="return advads_validate_placement_form();" class="advads-placements-new-form" id="advads-placements-new-form"
|
2 |
<?php
|
3 |
if ( isset( $placements ) && count( $placements ) ) {
|
@@ -5,8 +12,23 @@
|
|
5 |
}
|
6 |
?>
|
7 |
>
|
8 |
-
<h3>1. <?php
|
9 |
-
<p class="description"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<div class="advads-new-placement-types advads-buttonset">
|
11 |
<?php
|
12 |
if ( is_array( $placement_types ) ) {
|
@@ -17,45 +39,49 @@
|
|
17 |
$image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
|
18 |
endif;
|
19 |
?>
|
20 |
-
<div class="advads-placement-type"><label
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
<p class="advads-placement-description">
|
25 |
-
<strong><?php echo $_place['title']; ?></strong><br/><?php echo $_place['description']; ?></p>
|
26 |
</div>
|
27 |
-
|
28 |
endforeach;
|
29 |
};
|
30 |
?>
|
31 |
</div>
|
32 |
<div class="clear"></div>
|
33 |
-
<p class="advads-error-message advads-placement-type-error"><?php
|
34 |
<br/>
|
35 |
-
<h3>2. <?php
|
36 |
-
<p class="description"><?php
|
37 |
<p><input name="advads[placement][name]" class="advads-new-placement-name" type="text" value=""
|
38 |
-
placeholder="<?php
|
39 |
-
<p class="advads-error-message advads-placement-name-error"><?php
|
40 |
-
<h3>3. <?php
|
41 |
-
<p class="description"><?php
|
42 |
<p><select name="advads[placement][item]">
|
43 |
-
<option value=""><?php
|
44 |
<?php if ( isset( $items['groups'] ) ) : ?>
|
45 |
-
<optgroup label="<?php
|
46 |
<?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
|
47 |
-
<option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
|
48 |
<?php endforeach; ?>
|
49 |
</optgroup>
|
50 |
<?php endif; ?>
|
51 |
<?php if ( isset( $items['ads'] ) ) : ?>
|
52 |
-
<optgroup label="<?php
|
53 |
<?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
|
54 |
-
<option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
|
55 |
<?php endforeach; ?>
|
56 |
</optgroup>
|
57 |
<?php endif; ?>
|
58 |
</select></p>
|
59 |
<?php wp_nonce_field( 'advads-placement', 'advads_placement', true ); ?>
|
60 |
-
<input type="submit" class="button button-primary" value="<?php
|
61 |
</form>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render form to create new placements.
|
4 |
+
*
|
5 |
+
* @var array $placement_types types of placements.
|
6 |
+
*/
|
7 |
+
?>
|
8 |
<form method="POST" action="" onsubmit="return advads_validate_placement_form();" class="advads-placements-new-form" id="advads-placements-new-form"
|
9 |
<?php
|
10 |
if ( isset( $placements ) && count( $placements ) ) {
|
12 |
}
|
13 |
?>
|
14 |
>
|
15 |
+
<h3>1. <?php esc_html_e( 'Choose a placement type', 'advanced-ads' ); ?></h3>
|
16 |
+
<p class="description">
|
17 |
+
<?php
|
18 |
+
printf(
|
19 |
+
wp_kses(
|
20 |
+
// translators: %s is a URL.
|
21 |
+
__( 'Placement types define where the ad is going to be displayed. Learn more about the different types from the <a href="%s">manual</a>', 'advanced-ads' ),
|
22 |
+
array(
|
23 |
+
'a' => array(
|
24 |
+
'href' => array(),
|
25 |
+
),
|
26 |
+
)
|
27 |
+
),
|
28 |
+
esc_url( ADVADS_URL ) . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements'
|
29 |
+
);
|
30 |
+
?>
|
31 |
+
</p>
|
32 |
<div class="advads-new-placement-types advads-buttonset">
|
33 |
<?php
|
34 |
if ( is_array( $placement_types ) ) {
|
39 |
$image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
|
40 |
endif;
|
41 |
?>
|
42 |
+
<div class="advads-placement-type"><label for="advads-placement-type-<?php echo esc_attr( $_key ); ?>">
|
43 |
+
<?php
|
44 |
+
// phpcs:ignore
|
45 |
+
echo $image;
|
46 |
+
?>
|
47 |
+
</label>
|
48 |
+
<input type="radio" id="advads-placement-type-<?php echo esc_attr( $_key ); ?>" name="advads[placement][type]"
|
49 |
+
value="<?php echo esc_attr( $_key ); ?>"/>
|
50 |
<p class="advads-placement-description">
|
51 |
+
<strong><?php echo esc_html( $_place['title'] ); ?></strong><br/><?php echo esc_html( $_place['description'] ); ?></p>
|
52 |
</div>
|
53 |
+
<?php
|
54 |
endforeach;
|
55 |
};
|
56 |
?>
|
57 |
</div>
|
58 |
<div class="clear"></div>
|
59 |
+
<p class="advads-error-message advads-placement-type-error"><?php esc_html_e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
|
60 |
<br/>
|
61 |
+
<h3>2. <?php esc_html_e( 'Choose a Name', 'advanced-ads' ); ?></h3>
|
62 |
+
<p class="description"><?php esc_html_e( 'The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. <em>Below Post Headline</em>.', 'advanced-ads' ); ?></p>
|
63 |
<p><input name="advads[placement][name]" class="advads-new-placement-name" type="text" value=""
|
64 |
+
placeholder="<?php esc_html_e( 'Placement Name', 'advanced-ads' ); ?>"/></p>
|
65 |
+
<p class="advads-error-message advads-placement-name-error"><?php esc_html_e( 'Please enter a name for your placement.', 'advanced-ads' ); ?></p>
|
66 |
+
<h3>3. <?php esc_html_e( 'Choose the Ad or Group', 'advanced-ads' ); ?></h3>
|
67 |
+
<p class="description"><?php esc_html_e( 'The ad or group that should be displayed.', 'advanced-ads' ); ?></p>
|
68 |
<p><select name="advads[placement][item]">
|
69 |
+
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
|
70 |
<?php if ( isset( $items['groups'] ) ) : ?>
|
71 |
+
<optgroup label="<?php esc_html_e( 'Ad Groups', 'advanced-ads' ); ?>">
|
72 |
<?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
|
73 |
+
<option value="<?php echo esc_attr( $_item_id ); ?>"><?php echo esc_html( $_item_title ); ?></option>
|
74 |
<?php endforeach; ?>
|
75 |
</optgroup>
|
76 |
<?php endif; ?>
|
77 |
<?php if ( isset( $items['ads'] ) ) : ?>
|
78 |
+
<optgroup label="<?php esc_html_e( 'Ads', 'advanced-ads' ); ?>">
|
79 |
<?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
|
80 |
+
<option value="<?php echo esc_attr( $_item_id ); ?>"><?php echo esc_html( $_item_title ); ?></option>
|
81 |
<?php endforeach; ?>
|
82 |
</optgroup>
|
83 |
<?php endif; ?>
|
84 |
</select></p>
|
85 |
<?php wp_nonce_field( 'advads-placement', 'advads_placement', true ); ?>
|
86 |
+
<input type="submit" class="button button-primary" value="<?php esc_html_e( 'Save New Placement', 'advanced-ads' ); ?>"/>
|
87 |
</form>
|
admin/views/placement-injection-top.php
CHANGED
@@ -1,27 +1,57 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
4 |
$is_page_level_ad_in_code_field = ( isset( $ad->type ) && 'plain' === $ad->type && strpos( $ad->content, 'enable_page_level_ads' ) ) || preg_match( '/script[^>]+data-ad-client=/', $ad->content );
|
5 |
|
6 |
if ( isset( $_GET['message'] ) && 6 === $_GET['message'] ) : ?>
|
7 |
<div id="advads-ad-injection-box" class="advads-ad-metabox postbox">
|
8 |
<span class="advads-loader" style="display: none;"></span>
|
9 |
<div id="advads-ad-injection-message-placement-created" class="hidden">
|
10 |
-
<p><?php
|
11 |
-
<a class="advads-placement-link button button-primary" href="<?php echo admin_url( 'admin.php?page=advanced-ads-placements#single-placement-' ); ?>"><?php
|
12 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
</div>
|
14 |
<div id="advads-ad-injection-box-placements">
|
15 |
-
<h2><?php
|
16 |
-
|
17 |
-
// show different placements if this is the AdSense Auto ads code
|
18 |
if ( $is_page_level_ad_in_code_field ) :
|
19 |
if ( Advanced_Ads_AdSense_Data::get_instance()->is_page_level_enabled() ) :
|
20 |
?>
|
21 |
<p>
|
22 |
<?php
|
23 |
sprintf(
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' )
|
26 |
);
|
27 |
?>
|
@@ -31,99 +61,125 @@ if ( isset( $_GET['message'] ) && 6 === $_GET['message'] ) : ?>
|
|
31 |
endif;
|
32 |
?>
|
33 |
<p><?php esc_attr_e( 'Click on the button below to add the Auto ads code to the header of your site.', 'advanced-ads' ); ?></p>
|
34 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="header" style="background-image: url(
|
|
|
35 |
echo ADVADS_BASE_URL . 'admin/assets/img/placements/header.png';
|
36 |
-
?>
|
|
|
37 |
<?php
|
38 |
/**
|
39 |
-
*
|
40 |
* the button has barely space for the original English text, so keep it short
|
41 |
*/
|
42 |
esc_attr_e( 'inject Auto ads', 'advanced-ads' );
|
43 |
?>
|
44 |
</button></div>
|
45 |
<div class="clear"></div>
|
46 |
-
|
47 |
<?php else : ?>
|
48 |
-
<p><?php
|
49 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_top" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-before.png'; ?>)"><?php
|
50 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_content" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-within.png'; ?>)"><?php
|
51 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_bottom" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-after.png'; ?>)"><?php
|
52 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="default" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/manual.png'; ?>)"><?php
|
53 |
-
<a href="<?php echo admin_url( 'widgets.php' ); ?>"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/widget.png'; ?>)"><?php
|
54 |
-
<a href="<?php echo ADVADS_URL . 'place-ads-in-website-header/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-placements'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/ads-in-header.png'; ?>)"><?php
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<a href="<?php echo ADVADS_URL . 'manual/custom-position-placement/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-placements'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/custom-position.png'; ?>)"><?php
|
59 |
-
|
60 |
else :
|
61 |
?>
|
62 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="custom_position" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/custom-position.png'; ?>)"><?php
|
63 |
<?php
|
64 |
endif;
|
65 |
if ( class_exists( 'Advanced_Ads_In_Feed', false ) ) :
|
66 |
?>
|
67 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="adsense_in_feed" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/adsense-in-feed.png'; ?>)"><?php
|
68 |
<?php
|
69 |
endif;
|
70 |
|
71 |
if ( ! defined( 'AASADS_VERSION' ) ) :
|
72 |
?>
|
73 |
-
<a href="<?php echo ADVADS_URL . 'add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-sticky'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/sticky-sidebar-left.png'; ?>)"><?php
|
74 |
<?php
|
75 |
endif;
|
76 |
|
77 |
if ( ! defined( 'AAPLDS_VERSION' ) ) :
|
78 |
?>
|
79 |
-
<a href="<?php echo ADVADS_URL . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-layer'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/layer.png'; ?>)"><?php
|
80 |
<?php
|
81 |
else :
|
82 |
?>
|
83 |
-
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="layer" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/layer.png'; ?>)"><?php
|
84 |
<?php
|
85 |
endif;
|
86 |
|
87 |
?>
|
88 |
-
<a href="<?php echo admin_url( 'admin.php?page=advanced-ads-placements' ); ?>"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/more.png'; ?>)"><?php
|
89 |
-
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
<div class="advads-ad-injection-box-button-wrap">
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
114 |
</div>
|
115 |
-
|
116 |
endforeach;
|
117 |
-
|
118 |
-
|
|
|
119 |
<div class="clear"></div>
|
120 |
-
<p><?php
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
123 |
|
124 |
<div class="clear"></div>
|
125 |
-
<p
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
<?php endif; ?>
|
128 |
</div>
|
129 |
</div>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Render placements after publishing an ad.
|
4 |
+
*
|
5 |
+
* @var array $placements array with placements.
|
6 |
+
*/
|
7 |
+
// show quick injection options.
|
8 |
+
// check if the ad code contains the AdSense verification and Auto ads code.
|
9 |
$is_page_level_ad_in_code_field = ( isset( $ad->type ) && 'plain' === $ad->type && strpos( $ad->content, 'enable_page_level_ads' ) ) || preg_match( '/script[^>]+data-ad-client=/', $ad->content );
|
10 |
|
11 |
if ( isset( $_GET['message'] ) && 6 === $_GET['message'] ) : ?>
|
12 |
<div id="advads-ad-injection-box" class="advads-ad-metabox postbox">
|
13 |
<span class="advads-loader" style="display: none;"></span>
|
14 |
<div id="advads-ad-injection-message-placement-created" class="hidden">
|
15 |
+
<p><?php esc_html_e( 'Congratulations! Your ad is now visible in the frontend.', 'advanced-ads' ); ?></p>
|
16 |
+
<a class="advads-placement-link button button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-placements#single-placement-' ) ); ?>"><?php esc_html_e( 'Adjust the placement options', 'advanced-ads' ); ?></a>
|
17 |
+
<p>
|
18 |
+
<?php
|
19 |
+
printf(
|
20 |
+
wp_kses(
|
21 |
+
// translators: %s is a URL.
|
22 |
+
|
23 |
+
__( 'Ad not showing up? Take a look <a href="%s" target="_blank">here</a>', 'advanced-ads' ),
|
24 |
+
array(
|
25 |
+
'a' => array(
|
26 |
+
'href' => array(),
|
27 |
+
'target' => array(),
|
28 |
+
),
|
29 |
+
)
|
30 |
+
),
|
31 |
+
esc_url( ADVADS_URL ) . 'manual/ads-not-showing-up/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-ad-not-visible'
|
32 |
+
);
|
33 |
+
?>
|
34 |
+
</p>
|
35 |
</div>
|
36 |
<div id="advads-ad-injection-box-placements">
|
37 |
+
<h2><?php esc_html_e( 'Where do you want to display the ad?', 'advanced-ads' ); ?></h2>
|
38 |
+
<?php
|
39 |
+
// show different placements if this is the AdSense Auto ads code.
|
40 |
if ( $is_page_level_ad_in_code_field ) :
|
41 |
if ( Advanced_Ads_AdSense_Data::get_instance()->is_page_level_enabled() ) :
|
42 |
?>
|
43 |
<p>
|
44 |
<?php
|
45 |
sprintf(
|
46 |
+
wp_kses(
|
47 |
+
// translators: %s is a URL.
|
48 |
+
__( 'The AdSense verification and Auto ads code is already activated in the <a href="%s">AdSense settings</a>.', 'advanced-ads' ),
|
49 |
+
array(
|
50 |
+
'a' => array(
|
51 |
+
'href' => array(),
|
52 |
+
),
|
53 |
+
)
|
54 |
+
),
|
55 |
admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' )
|
56 |
);
|
57 |
?>
|
61 |
endif;
|
62 |
?>
|
63 |
<p><?php esc_attr_e( 'Click on the button below to add the Auto ads code to the header of your site.', 'advanced-ads' ); ?></p>
|
64 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="header" style="background-image: url(
|
65 |
+
<?php
|
66 |
echo ADVADS_BASE_URL . 'admin/assets/img/placements/header.png';
|
67 |
+
?>
|
68 |
+
)">
|
69 |
<?php
|
70 |
/**
|
71 |
+
* Translators: this is a label in a button when a user uses an AdSense Auto ads code in a plain code field
|
72 |
* the button has barely space for the original English text, so keep it short
|
73 |
*/
|
74 |
esc_attr_e( 'inject Auto ads', 'advanced-ads' );
|
75 |
?>
|
76 |
</button></div>
|
77 |
<div class="clear"></div>
|
78 |
+
|
79 |
<?php else : ?>
|
80 |
+
<p><?php esc_html_e( 'New placement', 'advanced-ads' ); ?></p>
|
81 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_top" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/content-before.png'; ?>)"><?php esc_html_e( 'Before Content', 'advanced-ads' ); ?></button></div>
|
82 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_content" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/content-within.png'; ?>)"><?php esc_html_e( 'Content', 'advanced-ads' ); ?></button></div>
|
83 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_bottom" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/content-after.png'; ?>)"><?php esc_html_e( 'After Content', 'advanced-ads' ); ?></button></div>
|
84 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="default" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/manual.png'; ?>)"><?php esc_html_e( 'PHP or Shortcode', 'advanced-ads' ); ?></button></div>
|
85 |
+
<a href="<?php echo esc_url( admin_url( 'widgets.php' ) ); ?>"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/widget.png'; ?>)"><?php esc_html_e( 'Manage Sidebar', 'advanced-ads' ); ?></button></div></a>
|
86 |
+
<a href="<?php echo esc_url( ADVADS_URL ) . 'place-ads-in-website-header/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-placements'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/ads-in-header.png'; ?>)"><?php esc_html_e( 'Header (Manual)', 'advanced-ads' ); ?></button></div></a>
|
87 |
+
<?php
|
88 |
+
if ( ! defined( 'AAP_VERSION' ) ) :
|
89 |
+
?>
|
90 |
+
<a href="<?php echo esc_url( ADVADS_URL ) . 'manual/custom-position-placement/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-placements'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/custom-position.png'; ?>)"><?php esc_html_e( 'Custom Position', 'advanced-ads' ); ?></button></div></a><a href="<?php echo esc_url( ADVADS_URL ) . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-pro'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/content-random.png'; ?>)"><?php esc_html_e( 'Show Pro Places', 'advanced-ads' ); ?></button></div></a>
|
91 |
+
<?php
|
92 |
else :
|
93 |
?>
|
94 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="custom_position" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/custom-position.png'; ?>)"><?php esc_html_e( 'Custom Position', 'advanced-ads' ); ?></button></div>
|
95 |
<?php
|
96 |
endif;
|
97 |
if ( class_exists( 'Advanced_Ads_In_Feed', false ) ) :
|
98 |
?>
|
99 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="adsense_in_feed" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/adsense-in-feed.png'; ?>)"><?php esc_html_e( 'AdSense In-feed', 'advanced-ads' ); ?></button></div>
|
100 |
<?php
|
101 |
endif;
|
102 |
|
103 |
if ( ! defined( 'AASADS_VERSION' ) ) :
|
104 |
?>
|
105 |
+
<a href="<?php echo esc_url( ADVADS_URL ) . 'add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-sticky'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/sticky-sidebar-left.png'; ?>)"><?php esc_html_e( 'Show Sticky Places', 'advanced-ads' ); ?></button></div></a>
|
106 |
<?php
|
107 |
endif;
|
108 |
|
109 |
if ( ! defined( 'AAPLDS_VERSION' ) ) :
|
110 |
?>
|
111 |
+
<a href="<?php echo esc_url( ADVADS_URL ) . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-layer'; ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/layer.png'; ?>)"><?php esc_html_e( 'Show PopUp', 'advanced-ads' ); ?></button></div></a>
|
112 |
<?php
|
113 |
else :
|
114 |
?>
|
115 |
+
<div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="layer" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/layer.png'; ?>)"><?php esc_html_e( 'PopUp & Layer', 'advanced-ads' ); ?></button></div>
|
116 |
<?php
|
117 |
endif;
|
118 |
|
119 |
?>
|
120 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-placements' ) ); ?>"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo esc_url( ADVADS_BASE_URL ) . 'admin/assets/img/placements/more.png'; ?>)"><?php esc_html_e( 'see all…', 'advanced-ads' ); ?></button></div></a>
|
121 |
+
<?php
|
122 |
|
123 |
+
ob_start();
|
124 |
+
foreach ( $placements as $_placement_slug => $_placement ) :
|
125 |
+
if ( ! isset( $_placement['type'] ) || ! isset( $_placement['name'] ) ) {
|
126 |
+
continue;
|
127 |
+
}
|
128 |
+
if ( ! isset( $placement_types[ $_placement['type'] ] ) ) {
|
129 |
+
$_placement['type'] = 'default';
|
130 |
+
}
|
131 |
|
132 |
+
$placement_img = '';
|
133 |
+
if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) {
|
134 |
+
$placement_img = 'style="background-image: url(' . $placement_types[ $_placement['type'] ]['image'] . ');"';
|
135 |
+
}
|
136 |
+
?>
|
137 |
|
138 |
<div class="advads-ad-injection-box-button-wrap">
|
139 |
+
<?php
|
140 |
+
printf(
|
141 |
+
'<button type="button" class="advads-ad-injection-button button-primary" data-placement-slug="%s" %s title="%s">%s</button>',
|
142 |
+
esc_attr( $_placement_slug ),
|
143 |
+
// phpcs:ignore
|
144 |
+
$placement_img,
|
145 |
+
esc_html( $_placement['name'] ),
|
146 |
+
esc_html( $placement_types[ $_placement['type'] ]['title'] )
|
147 |
+
);
|
148 |
+
echo esc_html( $_placement['name'] );
|
149 |
+
?>
|
150 |
</div>
|
151 |
+
<?php
|
152 |
endforeach;
|
153 |
+
$existing_p_output = ob_get_clean();
|
154 |
+
if ( $existing_p_output ) :
|
155 |
+
?>
|
156 |
<div class="clear"></div>
|
157 |
+
<p><?php esc_html_e( 'Existing placement', 'advanced-ads' ); ?></p>
|
158 |
+
<?php
|
159 |
+
// phpcs:ignore
|
160 |
+
echo $existing_p_output;
|
161 |
+
?>
|
162 |
+
<?php endif; ?>
|
163 |
|
164 |
<div class="clear"></div>
|
165 |
+
<p>
|
166 |
+
<?php
|
167 |
+
printf(
|
168 |
+
// translators: %s is some HTML.
|
169 |
+
// phpcs:ignore
|
170 |
+
__( 'Or use the shortcode %s to insert the ad into the content manually.', 'advanced-ads' ),
|
171 |
+
'<input id="advads-ad-injection-shortcode" onclick="this.select();" value="[the_ad id=\'' . absint( $post->ID ) . '\']"/>'
|
172 |
+
);
|
173 |
+
?>
|
174 |
+
<?php
|
175 |
+
printf(
|
176 |
+
// translators: %s is a URL.
|
177 |
+
// phpcs:ignore
|
178 |
+
__( 'Learn more about your choices to display an ad in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ),
|
179 |
+
esc_url( ADVADS_URL ) . 'manual/display-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created'
|
180 |
+
);
|
181 |
+
?>
|
182 |
+
</p>
|
183 |
<?php endif; ?>
|
184 |
</div>
|
185 |
</div>
|
admin/views/placements-ad-label-position.php
CHANGED
@@ -1,26 +1,29 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
</label>
|
7 |
-
<label title="<?php
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
<
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<input type="radio" name="advads[placements][<?php echo $_placement_slug; ?>][options][placement_position]" value="right" <?php
|
17 |
-
checked($_position, 'right');
|
18 |
-
?>/><?php _e('right', 'advanced-ads'); ?></label>
|
19 |
<p><label>
|
20 |
-
<input type="checkbox" name="advads[placements][<?php echo $_placement_slug; ?>][options][placement_clearfix]" value="1"<?php
|
21 |
-
checked($_clearfix, 1);
|
22 |
-
?>/>
|
23 |
<?php
|
24 |
-
|
25 |
?>
|
26 |
-
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render ad label position option for placements.
|
4 |
+
*
|
5 |
+
* @var string $_placement_slug slug of the current placement.
|
6 |
+
* @var string $_position value of the position option.
|
7 |
+
* @var bool $_clearfix value of the position clearfix option.
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<br/><br/><p><?php esc_html_e( 'Position', 'advanced-ads' ); ?></p>
|
11 |
+
<label title="<?php esc_html_e( 'default', 'advanced-ads' ); ?>">
|
12 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="" <?php checked( $_position, 'default' ); ?>/>
|
13 |
+
<?php esc_html_e( 'default', 'advanced-ads' ); ?>
|
14 |
</label>
|
15 |
+
<label title="<?php esc_html_e( 'left', 'advanced-ads' ); ?>">
|
16 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="left" <?php checked( $_position, 'left' ); ?>/>
|
17 |
+
<?php esc_html_e( 'left', 'advanced-ads' ); ?></label>
|
18 |
+
<label title="<?php esc_html_e( 'center', 'advanced-ads' ); ?>">
|
19 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="center" <?php checked( $_position, 'center' ); ?>/>
|
20 |
+
<?php esc_html_e( 'center', 'advanced-ads' ); ?></label>
|
21 |
+
<label title="<?php esc_html_e( 'right', 'advanced-ads' ); ?>">
|
22 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="right" <?php checked( $_position, 'right' ); ?>/>
|
23 |
+
<?php esc_html_e( 'right', 'advanced-ads' ); ?></label>
|
|
|
|
|
|
|
24 |
<p><label>
|
25 |
+
<input type="checkbox" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_clearfix]" value="1" <?php checked( $_clearfix, 1 ); ?>/>
|
|
|
|
|
26 |
<?php
|
27 |
+
esc_html_e( 'Check this if you don’t want the following elements to float around the ad. (adds a placement_clearfix)', 'advanced-ads' );
|
28 |
?>
|
29 |
+
</label></p>
|
admin/views/placements-ad-label.php
CHANGED
@@ -1,15 +1,20 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
</label>
|
6 |
-
<label title="<?php
|
7 |
-
|
8 |
-
|
9 |
-
?>/><?php _e('enabled', 'advanced-ads'); ?>
|
10 |
</label>
|
11 |
-
<label title="<?php
|
12 |
-
|
13 |
-
|
14 |
-
?>/><?php _e('disabled', 'advanced-ads'); ?>
|
15 |
</label>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render ad label option for placements.
|
4 |
+
*
|
5 |
+
* @var string $_placement_slug slug of the current placement.
|
6 |
+
* @var string $_label value of the label option.
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<label title="<?php esc_html_e( 'default', 'advanced-ads' ); ?>">
|
10 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][ad_label]" value="default" <?php checked( $_label, 'default' ); ?>/>
|
11 |
+
<?php esc_html_e( 'default', 'advanced-ads' ); ?>
|
12 |
</label>
|
13 |
+
<label title="<?php esc_html_e( 'enabled', 'advanced-ads' ); ?>">
|
14 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][ad_label]" value="enabled" <?php checked( $_label, 'enabled' ); ?>/>
|
15 |
+
<?php esc_html_e( 'enabled', 'advanced-ads' ); ?>
|
|
|
16 |
</label>
|
17 |
+
<label title="<?php esc_html_e( 'disabled', 'advanced-ads' ); ?>">
|
18 |
+
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][ad_label]" value="disabled" <?php checked( $_label, 'disabled' ); ?>/>
|
19 |
+
<?php esc_html_e( 'disabled', 'advanced-ads' ); ?>
|
|
|
20 |
</label>
|
admin/views/placements-content-index.php
CHANGED
@@ -1,30 +1,48 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
'after' => __( 'after', 'advanced-ads' ),
|
3 |
'before' => __( 'before', 'advanced-ads' ),
|
4 |
); ?>
|
5 |
-
<select name="advads[placements][<?php echo $_placement_slug; ?>][options][position]">
|
6 |
<?php foreach ( $_positions as $_pos_key => $_pos ) : ?>
|
7 |
-
<option value="<?php echo $_pos_key; ?>"
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
<?php endforeach; ?>
|
12 |
</select>
|
13 |
|
14 |
-
<input type="number" name="advads[placements][<?php echo $_placement_slug; ?>][options][index]" value="
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
|
18 |
<?php $tags = Advanced_Ads_Placements::tags_for_content_injection(); ?>
|
19 |
-
<select name="advads[placements][<?php echo $_placement_slug; ?>][options][tag]">
|
20 |
<?php foreach ( $tags as $_tag_key => $_tag ) : ?>
|
21 |
-
<option value="<?php echo $_tag_key; ?>"
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
25 |
<?php endforeach; ?>
|
26 |
</select>
|
27 |
|
28 |
-
<p><label><input type="checkbox" name="advads[placements][<?php echo $_placement_slug; ?>][options][start_from_bottom]" value="1"
|
29 |
-
|
30 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render content index option for placements.
|
4 |
+
*
|
5 |
+
* @var string $_placement_slug slug of the current placement.
|
6 |
+
* @var array $_placement information of the current placement.
|
7 |
+
*/
|
8 |
+
$_positions = array(
|
9 |
'after' => __( 'after', 'advanced-ads' ),
|
10 |
'before' => __( 'before', 'advanced-ads' ),
|
11 |
); ?>
|
12 |
+
<select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][position]">
|
13 |
<?php foreach ( $_positions as $_pos_key => $_pos ) : ?>
|
14 |
+
<option value="<?php echo esc_attr( $_pos_key ); ?>"
|
15 |
+
<?php
|
16 |
+
if ( isset( $_placement['options']['position'] ) ) {
|
17 |
+
selected( $_placement['options']['position'], $_pos_key );
|
18 |
+
}
|
19 |
+
?>
|
20 |
+
>
|
21 |
+
<?php echo esc_html( $_pos ); ?></option>
|
22 |
<?php endforeach; ?>
|
23 |
</select>
|
24 |
|
25 |
+
<input type="number" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][index]" value="
|
26 |
+
<?php
|
27 |
+
echo ( isset( $_placement['options']['index'] ) ) ? absint( max( 1, (int) $_placement['options']['index'] ) ) : 1;
|
28 |
+
?>
|
29 |
+
" min="1"/>.
|
30 |
|
31 |
<?php $tags = Advanced_Ads_Placements::tags_for_content_injection(); ?>
|
32 |
+
<select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][tag]">
|
33 |
<?php foreach ( $tags as $_tag_key => $_tag ) : ?>
|
34 |
+
<option value="<?php echo esc_attr( $_tag_key ); ?>"
|
35 |
+
<?php
|
36 |
+
if ( isset( $_placement['options']['tag'] ) ) {
|
37 |
+
selected( $_placement['options']['tag'], $_tag_key ); }
|
38 |
+
?>
|
39 |
+
><?php echo esc_html( $_tag ); ?></option>
|
40 |
<?php endforeach; ?>
|
41 |
</select>
|
42 |
|
43 |
+
<p><label><input type="checkbox" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][start_from_bottom]" value="1"
|
44 |
+
<?php
|
45 |
+
if ( isset( $_placement['options']['start_from_bottom'] ) ) {
|
46 |
+
checked( $_placement['options']['start_from_bottom'], 1 ); }
|
47 |
+
?>
|
48 |
+
/><?php esc_html_e( 'start counting from bottom', 'advanced-ads' ); ?></label></p>
|
admin/views/placements-item.php
CHANGED
@@ -1,32 +1,40 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<?php if ( isset( $items['groups'] ) ) : ?>
|
4 |
-
<optgroup label="<?php
|
5 |
<?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
|
6 |
-
<option value="<?php echo $_item_id; ?>"
|
7 |
<?php
|
8 |
if ( isset( $_placement['item'] ) ) {
|
9 |
selected( $_item_id, $_placement['item'] ); }
|
10 |
?>
|
11 |
-
><?php echo $_item_title; ?></option>
|
12 |
<?php endforeach; ?>
|
13 |
</optgroup>
|
14 |
<?php endif; ?>
|
15 |
<?php if ( isset( $items['ads'] ) ) : ?>
|
16 |
-
<optgroup label="<?php
|
17 |
<?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
|
18 |
-
<option value="<?php echo $_item_id; ?>"
|
19 |
<?php
|
20 |
if ( isset( $_placement['item'] ) ) {
|
21 |
selected( $_item_id, $_placement['item'] ); }
|
22 |
?>
|
23 |
-
><?php echo $_item_title; ?></option>
|
24 |
<?php endforeach; ?>
|
25 |
</optgroup>
|
26 |
<?php endif; ?>
|
27 |
</select>
|
28 |
<?php
|
29 |
-
// link to item
|
30 |
if ( isset( $_placement['item'] ) ) :
|
31 |
$currently_linked_item = explode( '_', $_placement['item'] );
|
32 |
$link_to_item = false;
|
@@ -40,7 +48,7 @@ if ( isset( $_placement['item'] ) ) :
|
|
40 |
endswitch;
|
41 |
if ( $link_to_item ) :
|
42 |
?>
|
43 |
-
<a href="<?php echo $link_to_item; ?>"><span class="dashicons dashicons-external"></span></span></a>
|
44 |
<?php
|
45 |
endif;
|
46 |
endif;
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Render item option for placements.
|
4 |
+
*
|
5 |
+
* @var string $_placement_slug slug of the current placement.
|
6 |
+
* @var array $_placement information of the current placement.
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<select id="advads-placements-item-<?php echo esc_attr( $_placement_slug ); ?>" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][item]">
|
10 |
+
<option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option>
|
11 |
<?php if ( isset( $items['groups'] ) ) : ?>
|
12 |
+
<optgroup label="<?php esc_html_e( 'Ad Groups', 'advanced-ads' ); ?>">
|
13 |
<?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
|
14 |
+
<option value="<?php echo esc_attr( $_item_id ); ?>"
|
15 |
<?php
|
16 |
if ( isset( $_placement['item'] ) ) {
|
17 |
selected( $_item_id, $_placement['item'] ); }
|
18 |
?>
|
19 |
+
><?php echo esc_html( $_item_title ); ?></option>
|
20 |
<?php endforeach; ?>
|
21 |
</optgroup>
|
22 |
<?php endif; ?>
|
23 |
<?php if ( isset( $items['ads'] ) ) : ?>
|
24 |
+
<optgroup label="<?php esc_html_e( 'Ads', 'advanced-ads' ); ?>">
|
25 |
<?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
|
26 |
+
<option value="<?php echo esc_attr( $_item_id ); ?>"
|
27 |
<?php
|
28 |
if ( isset( $_placement['item'] ) ) {
|
29 |
selected( $_item_id, $_placement['item'] ); }
|
30 |
?>
|
31 |
+
><?php echo esc_html( $_item_title ); ?></option>
|
32 |
<?php endforeach; ?>
|
33 |
</optgroup>
|
34 |
<?php endif; ?>
|
35 |
</select>
|
36 |
<?php
|
37 |
+
// link to item.
|
38 |
if ( isset( $_placement['item'] ) ) :
|
39 |
$currently_linked_item = explode( '_', $_placement['item'] );
|
40 |
$link_to_item = false;
|
48 |
endswitch;
|
49 |
if ( $link_to_item ) :
|
50 |
?>
|
51 |
+
<a href="<?php echo esc_url( $link_to_item ); ?>"><span class="dashicons dashicons-external"></span></span></a>
|
52 |
<?php
|
53 |
endif;
|
54 |
endif;
|
admin/views/placements.php
CHANGED
@@ -1,53 +1,70 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* The view for the placements page
|
|
|
|
|
4 |
*/
|
5 |
?><div class="wrap">
|
6 |
<?php
|
7 |
if ( isset( $_GET['message'] ) ) :
|
8 |
-
if ( $_GET['message']
|
9 |
?>
|
10 |
-
<div id="message" class="error"><p><?php
|
11 |
<?php
|
12 |
-
elseif ( $_GET['message']
|
13 |
?>
|
14 |
-
<div id="message" class="updated"><p><?php
|
15 |
<?php
|
16 |
endif;
|
17 |
?>
|
18 |
<?php endif; ?>
|
19 |
<h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1>
|
20 |
-
<a href="#" class="page-title-action" title="<?php
|
21 |
-
|
22 |
-
|
23 |
|
24 |
<hr class="wp-header-end">
|
25 |
|
26 |
-
<p class="description"><?php
|
27 |
-
<p class="description"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<?php
|
29 |
|
30 |
// add placement form.
|
31 |
-
|
32 |
|
33 |
if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
|
34 |
do_action( 'advanced-ads-placements-list-before', $placements );
|
35 |
?>
|
36 |
-
<h2><?php
|
37 |
<form method="POST" action="" id="advanced-ads-placements-form">
|
38 |
<table class="widefat advads-placements-table striped">
|
39 |
<thead>
|
40 |
<tr>
|
41 |
-
<th><?php
|
42 |
-
<th><?php
|
43 |
-
<th><?php
|
44 |
<?php do_action( 'advanced-ads-placements-list-column-header' ); ?>
|
45 |
<th></th>
|
46 |
</tr>
|
47 |
</thead>
|
48 |
<tbody>
|
49 |
<?php
|
50 |
-
// order by slug
|
51 |
ksort( $placements );
|
52 |
foreach ( $placements as $_placement_slug => $_placement ) :
|
53 |
$type_missing = false;
|
@@ -57,59 +74,72 @@ if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
|
|
57 |
$type_missing = true;
|
58 |
}
|
59 |
?>
|
60 |
-
<tr id="single-placement-<?php echo $_placement_slug; ?>" class="advanced-ads-placement-row">
|
61 |
<td>
|
62 |
<?php
|
63 |
-
if ( $type_missing ) : // type is not given
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
?>
|
65 |
-
|
66 |
<?php
|
67 |
elseif ( isset( $_placement['type'] ) ) :
|
68 |
if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) :
|
69 |
?>
|
70 |
<img src="
|
71 |
<?php
|
72 |
-
echo $placement_types[ $_placement['type'] ]['image'];
|
73 |
?>
|
74 |
" title="
|
75 |
<?php
|
76 |
-
echo $placement_types[ $_placement['type'] ]['title'];
|
77 |
?>
|
78 |
-
" alt="<?php echo $placement_types[ $_placement['type'] ]['title']; ?>"/>
|
79 |
<?php
|
80 |
else :
|
81 |
-
echo $placement_types[ $_placement['type'] ]['title'];
|
82 |
endif;
|
83 |
else :
|
84 |
__( 'default', 'advanced-ads' );
|
85 |
endif;
|
86 |
?>
|
87 |
</td>
|
88 |
-
<td><?php echo $_placement['name']; ?><br/>
|
89 |
<?php
|
90 |
if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) :
|
91 |
$_placement['type'] = 'default';
|
92 |
?>
|
93 |
-
<a class="usage-link"><?php
|
94 |
<?php
|
95 |
endif;
|
96 |
?>
|
97 |
</td>
|
98 |
<td class="advads-placements-table-options">
|
99 |
-
<input type="hidden" class="advads-placement-slug" value="<?php echo $_placement_slug; ?>"/>
|
100 |
<?php if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) : ?>
|
101 |
<div class="hidden advads-usage">
|
102 |
-
<label><?php
|
103 |
-
<code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo $_placement_slug; ?>"]'/></code>
|
104 |
</label>
|
105 |
-
<label><?php
|
106 |
-
<code><input type="text" onclick="this.select();" value="if( function_exists('the_ad_placement') ) { the_ad_placement('<?php echo $_placement_slug; ?>'); }"/></code>
|
107 |
</label>
|
108 |
</div>
|
109 |
<?php endif; ?>
|
110 |
-
|
111 |
<?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
|
112 |
-
|
113 |
<?php
|
114 |
ob_start();
|
115 |
include ADVADS_BASE_PATH . 'admin/views/placements-item.php';
|
@@ -136,9 +166,17 @@ if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
|
|
136 |
);
|
137 |
|
138 |
if ( ! extension_loaded( 'dom' ) ) :
|
139 |
-
|
140 |
-
<p><span class="advads-error-message"><?php
|
141 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
endif;
|
143 |
break;
|
144 |
endswitch;
|
@@ -169,26 +207,39 @@ endif;
|
|
169 |
$advanced_options = ob_get_clean();
|
170 |
if ( $advanced_options ) :
|
171 |
?>
|
172 |
-
<a class="advads-toggle-link advads-placement-options-link" data-placement="<?php echo $_placement_slug ?>"><?php
|
173 |
<?php
|
174 |
-
|
175 |
-
|
176 |
-
|
|
|
177 |
<?php
|
178 |
-
|
179 |
-
|
180 |
?>
|
181 |
-
">
|
182 |
-
<?php
|
183 |
-
echo $advanced_options;
|
184 |
-
?>
|
185 |
</div>
|
186 |
<?php
|
187 |
endif;
|
188 |
-
// information after options
|
189 |
if ( isset( $_placement['type'] ) && 'header' === $_placement['type'] ) :
|
190 |
?>
|
191 |
-
<br/><p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
<?php
|
193 |
endif;
|
194 |
|
@@ -196,20 +247,20 @@ endif;
|
|
196 |
</td>
|
197 |
<?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
|
198 |
<td>
|
199 |
-
<input type="checkbox" id="advads-placements-item-delete-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][delete]" value="1"/>
|
200 |
-
<label for="advads-placements-item-delete-<?php echo $_placement_slug; ?>"><?php
|
201 |
</td>
|
202 |
</tr>
|
203 |
<?php endforeach; ?>
|
204 |
</tbody>
|
205 |
</table>
|
206 |
<div class="tablenav bottom">
|
207 |
-
<input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php
|
208 |
<?php wp_nonce_field( 'advads-placement', 'advads_placement', true ); ?>
|
209 |
-
<button type="button" title="<?php
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
</button>
|
214 |
<?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
|
215 |
</div>
|
@@ -219,4 +270,5 @@ endif;
|
|
219 |
do_action( 'advanced-ads-placements-list-after', $placements );
|
220 |
endif;
|
221 |
|
222 |
-
|
|
1 |
<?php
|
2 |
/**
|
3 |
* The view for the placements page
|
4 |
+
*
|
5 |
+
* @var array $placement_types placement types.
|
6 |
*/
|
7 |
?><div class="wrap">
|
8 |
<?php
|
9 |
if ( isset( $_GET['message'] ) ) :
|
10 |
+
if ( 'error' === $_GET['message'] ) :
|
11 |
?>
|
12 |
+
<div id="message" class="error"><p><?php esc_html_e( 'Couldn’t create the new placement. Please check your form field and whether the name is already in use.', 'advanced-ads' ); ?></p></div>
|
13 |
<?php
|
14 |
+
elseif ( 'updated' === $_GET['message'] ) :
|
15 |
?>
|
16 |
+
<div id="message" class="updated"><p><?php esc_html_e( 'Placements updated', 'advanced-ads' ); ?></p></div>
|
17 |
<?php
|
18 |
endif;
|
19 |
?>
|
20 |
<?php endif; ?>
|
21 |
<h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1>
|
22 |
+
<a href="#" class="page-title-action" title="<?php esc_html_e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form'); advads_scroll_to_element('#advads-placements-new-form');">
|
23 |
+
<?php esc_html_e( 'New Placement', 'advanced-ads' ); ?>
|
24 |
+
</a>
|
25 |
|
26 |
<hr class="wp-header-end">
|
27 |
|
28 |
+
<p class="description"><?php esc_html_e( 'Placements are physically places in your theme and posts. You can use them if you plan to change ads and ad groups on the same place without the need to change your templates.', 'advanced-ads' ); ?></p>
|
29 |
+
<p class="description">
|
30 |
+
<?php
|
31 |
+
printf(
|
32 |
+
wp_kses(
|
33 |
+
// translators: %s is a URL.
|
34 |
+
__( 'See also the manual for more information on <a href="%s">placements</a>.', 'advanced-ads' ),
|
35 |
+
array(
|
36 |
+
'a' => array(
|
37 |
+
'href' => array(),
|
38 |
+
),
|
39 |
+
)
|
40 |
+
),
|
41 |
+
esc_url( ADVADS_URL ) . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements'
|
42 |
+
);
|
43 |
+
?>
|
44 |
+
</p>
|
45 |
<?php
|
46 |
|
47 |
// add placement form.
|
48 |
+
require_once ADVADS_BASE_PATH . 'admin/views/placement-form.php';
|
49 |
|
50 |
if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
|
51 |
do_action( 'advanced-ads-placements-list-before', $placements );
|
52 |
?>
|
53 |
+
<h2><?php esc_html_e( 'Placements', 'advanced-ads' ); ?></h2>
|
54 |
<form method="POST" action="" id="advanced-ads-placements-form">
|
55 |
<table class="widefat advads-placements-table striped">
|
56 |
<thead>
|
57 |
<tr>
|
58 |
+
<th><?php esc_html_e( 'Type', 'advanced-ads' ); ?></th>
|
59 |
+
<th><?php esc_html_e( 'Name', 'advanced-ads' ); ?></th>
|
60 |
+
<th><?php esc_html_e( 'Options', 'advanced-ads' ); ?></th>
|
61 |
<?php do_action( 'advanced-ads-placements-list-column-header' ); ?>
|
62 |
<th></th>
|
63 |
</tr>
|
64 |
</thead>
|
65 |
<tbody>
|
66 |
<?php
|
67 |
+
// order by slug.
|
68 |
ksort( $placements );
|
69 |
foreach ( $placements as $_placement_slug => $_placement ) :
|
70 |
$type_missing = false;
|
74 |
$type_missing = true;
|
75 |
}
|
76 |
?>
|
77 |
+
<tr id="single-placement-<?php echo esc_attr( $_placement_slug ); ?>" class="advanced-ads-placement-row">
|
78 |
<td>
|
79 |
<?php
|
80 |
+
if ( $type_missing ) : // type is not given.
|
81 |
+
?>
|
82 |
+
<p class="advads-error-message">
|
83 |
+
<?php
|
84 |
+
printf(
|
85 |
+
wp_kses(
|
86 |
+
// translators: %s is the name of a placement.
|
87 |
+
__( 'Placement type "%s" is missing and was reset to "default".<br/>Please check if the responsible add-on is activated.', 'advanced-ads' ),
|
88 |
+
array(
|
89 |
+
'br' => array(),
|
90 |
+
)
|
91 |
+
),
|
92 |
+
esc_html( $missed_type )
|
93 |
+
);
|
94 |
?>
|
95 |
+
</p>
|
96 |
<?php
|
97 |
elseif ( isset( $_placement['type'] ) ) :
|
98 |
if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) :
|
99 |
?>
|
100 |
<img src="
|
101 |
<?php
|
102 |
+
echo esc_url( $placement_types[ $_placement['type'] ]['image'] );
|
103 |
?>
|
104 |
" title="
|
105 |
<?php
|
106 |
+
echo esc_attr( $placement_types[ $_placement['type'] ]['title'] );
|
107 |
?>
|
108 |
+
" alt="<?php echo esc_attr( $placement_types[ $_placement['type'] ]['title'] ); ?>"/>
|
109 |
<?php
|
110 |
else :
|
111 |
+
echo esc_html( $placement_types[ $_placement['type'] ]['title'] );
|
112 |
endif;
|
113 |
else :
|
114 |
__( 'default', 'advanced-ads' );
|
115 |
endif;
|
116 |
?>
|
117 |
</td>
|
118 |
+
<td><?php echo esc_html( $_placement['name'] ); ?><br/>
|
119 |
<?php
|
120 |
if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) :
|
121 |
$_placement['type'] = 'default';
|
122 |
?>
|
123 |
+
<a class="usage-link"><?php esc_html_e( 'show usage', 'advanced-ads' ); ?></a>
|
124 |
<?php
|
125 |
endif;
|
126 |
?>
|
127 |
</td>
|
128 |
<td class="advads-placements-table-options">
|
129 |
+
<input type="hidden" class="advads-placement-slug" value="<?php echo esc_attr( $_placement_slug ); ?>"/>
|
130 |
<?php if ( ! isset( $_placement['type'] ) || 'default' === $_placement['type'] ) : ?>
|
131 |
<div class="hidden advads-usage">
|
132 |
+
<label><?php esc_html_e( 'shortcode', 'advanced-ads' ); ?>
|
133 |
+
<code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo esc_attr( $_placement_slug ); ?>"]'/></code>
|
134 |
</label>
|
135 |
+
<label><?php esc_html_e( 'template (PHP)', 'advanced-ads' ); ?>
|
136 |
+
<code><input type="text" onclick="this.select();" value="if( function_exists('the_ad_placement') ) { the_ad_placement('<?php echo esc_attr( $_placement_slug ); ?>'); }"/></code>
|
137 |
</label>
|
138 |
</div>
|
139 |
<?php endif; ?>
|
140 |
+
|
141 |
<?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
|
142 |
+
|
143 |
<?php
|
144 |
ob_start();
|
145 |
include ADVADS_BASE_PATH . 'admin/views/placements-item.php';
|
166 |
);
|
167 |
|
168 |
if ( ! extension_loaded( 'dom' ) ) :
|
169 |
+
?>
|
170 |
+
<p><span class="advads-error-message"><?php esc_html_e( 'Important Notice', 'advanced-ads' ); ?>: </span>
|
171 |
+
<?php
|
172 |
+
printf(
|
173 |
+
// translators: %s is a name of a module.
|
174 |
+
esc_html__( 'Missing PHP extensions could cause issues. Please ask your hosting provider to enable them: %s', 'advanced-ads' ),
|
175 |
+
'dom (php_xml)'
|
176 |
+
);
|
177 |
+
?>
|
178 |
+
</p>
|
179 |
+
<?php
|
180 |
endif;
|
181 |
break;
|
182 |
endswitch;
|
207 |
$advanced_options = ob_get_clean();
|
208 |
if ( $advanced_options ) :
|
209 |
?>
|
210 |
+
<a class="advads-toggle-link advads-placement-options-link" data-placement="<?php echo esc_attr( $_placement_slug ); ?>"><?php esc_html_e( 'show all options', 'advanced-ads' ); ?></a>
|
211 |
<?php
|
212 |
+
// phpcs:ignore
|
213 |
+
$hidden = ( isset( $_POST['advads-last-edited-placement'] ) && $_placement_slug === $_POST['advads-last-edited-placement'] ) ? '' : ' hidden';
|
214 |
+
// phpcs:ignore ?>
|
215 |
+
<div class="advads-placements-advanced-options advads-placements-advanced-options-<?php echo esc_attr( $_placement_slug ); echo esc_attr( $hidden ); ?>">
|
216 |
<?php
|
217 |
+
// phpcs:ignore
|
218 |
+
echo $advanced_options;
|
219 |
?>
|
|
|
|
|
|
|
|
|
220 |
</div>
|
221 |
<?php
|
222 |
endif;
|
223 |
+
// information after options.
|
224 |
if ( isset( $_placement['type'] ) && 'header' === $_placement['type'] ) :
|
225 |
?>
|
226 |
+
<br/><p>
|
227 |
+
<?php
|
228 |
+
printf(
|
229 |
+
wp_kses(
|
230 |
+
// translators: %s is a URL.
|
231 |
+
__( 'Tutorial: <a href="%s" target="_blank">How to place visible ads in the header of your website</a>.', 'advanced-ads' ),
|
232 |
+
array(
|
233 |
+
'a' => array(
|
234 |
+
'href' => array(),
|
235 |
+
'target' => array(),
|
236 |
+
),
|
237 |
+
)
|
238 |
+
),
|
239 |
+
esc_url( ADVADS_URL ) . 'place-ads-in-website-header/#utm_source=advanced-ads&utm_medium=link&utm_campaign=header-ad-tutorial'
|
240 |
+
);
|
241 |
+
?>
|
242 |
+
</p>
|
243 |
<?php
|
244 |
endif;
|
245 |
|
247 |
</td>
|
248 |
<?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
|
249 |
<td>
|
250 |
+
<input type="checkbox" id="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>" name="advads[placements][<?php echo esc_url( $_placement_slug ); ?>][delete]" value="1"/>
|
251 |
+
<label for="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>"><?php echo esc_html_x( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
|
252 |
</td>
|
253 |
</tr>
|
254 |
<?php endforeach; ?>
|
255 |
</tbody>
|
256 |
</table>
|
257 |
<div class="tablenav bottom">
|
258 |
+
<input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php esc_html_e( 'Save Placements', 'advanced-ads' ); ?>"/>
|
259 |
<?php wp_nonce_field( 'advads-placement', 'advads_placement', true ); ?>
|
260 |
+
<button type="button" title="<?php esc_html_e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form'); advads_scroll_to_element('#advads-placements-new-form');">
|
261 |
+
<?php
|
262 |
+
esc_html_e( 'New Placement', 'advanced-ads' );
|
263 |
+
?>
|
264 |
</button>
|
265 |
<?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
|
266 |
</div>
|
270 |
do_action( 'advanced-ads-placements-list-after', $placements );
|
271 |
endif;
|
272 |
|
273 |
+
?>
|
274 |
+
</div>
|
admin/views/post-ad-settings-metabox.php
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
-
<p><a href="<?php echo ADVADS_URL ?>how-to-block-ads-on-a-specific-page/#utm_source=advanced-ads&utm_medium=link&utm_campaign=disable-ads-on-specific-pages" target="_blank"><?php
|
2 |
-
<label><input type="checkbox" name="advanced_ads[disable_ads]" value="1"
|
|
|
3 |
if ( isset( $values['disable_ads'] ) ) {
|
4 |
checked( $values['disable_ads'], true ); }
|
5 |
-
|
|
1 |
+
<p><a href="<?php echo esc_url( ADVADS_URL ); ?>how-to-block-ads-on-a-specific-page/#utm_source=advanced-ads&utm_medium=link&utm_campaign=disable-ads-on-specific-pages" target="_blank"><?php esc_html_e( 'How to disable ads on specific pages', 'advanced-ads' ); ?></a></p>
|
2 |
+
<label><input type="checkbox" name="advanced_ads[disable_ads]" value="1"
|
3 |
+
<?php
|
4 |
if ( isset( $values['disable_ads'] ) ) {
|
5 |
checked( $values['disable_ads'], true ); }
|
6 |
+
?>
|
7 |
+
/><?php esc_html_e( 'Disable ads on this page', 'advanced-ads' ); ?></label>
|
admin/views/setting-license.php
CHANGED
@@ -3,6 +3,11 @@
|
|
3 |
* Template for license fields.
|
4 |
*
|
5 |
* Do not move since it could be used by add-ons.
|
|
|
|
|
|
|
|
|
|
|
6 |
*/
|
7 |
$errortext = false;
|
8 |
$expires = Advanced_Ads_Admin_Licenses::get_instance()->get_license_expires( $options_slug );
|
@@ -12,70 +17,87 @@ $expired_error = __( 'Your license expired.', 'advanced-ads' );
|
|
12 |
ob_start();
|
13 |
?>
|
14 |
<button type="button" class="button-secondary advads-license-activate"
|
15 |
-
data-addon="<?php echo $index; ?>"
|
16 |
-
data-pluginname="<?php echo $plugin_name; ?>"
|
17 |
-
data-optionslug="<?php echo $options_slug; ?>"
|
18 |
-
name="advads_license_activate"><?php
|
19 |
<?php
|
20 |
$update_button = ob_get_clean();
|
21 |
|
22 |
-
$license_key_for_expired_link = $license_key ? $license_key :
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
if ( 'lifetime' !== $expires ) {
|
25 |
$expires_time = strtotime( $expires );
|
26 |
$days_left = ( $expires_time - time() ) / DAY_IN_SECONDS;
|
27 |
}
|
|
|
28 |
if ( 'lifetime' === $expires ) {
|
29 |
-
// do nothing
|
30 |
} elseif ( $expired && $days_left <= 0 ) {
|
31 |
$plugin_url = isset( $plugin_url ) ? $plugin_url : ADVADS_URL;
|
32 |
$errortext = $expired_error;
|
33 |
$expired = true;
|
34 |
} elseif ( 0 < $days_left && 31 > $days_left ) {
|
35 |
-
$errortext = sprintf(
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
-
$show_active = (
|
38 |
?>
|
39 |
-
<input type="text" class="regular-text advads-license-key" placeholder="<?php
|
40 |
-
|
41 |
-
|
42 |
<?php
|
43 |
-
if (
|
44 |
?>
|
45 |
readonly="readonly"<?php endif; ?>/>
|
46 |
|
47 |
<button type="button" class="button-secondary advads-license-deactivate"
|
48 |
<?php
|
49 |
-
if (
|
50 |
echo ' style="display: none;" ';
|
51 |
}
|
52 |
?>
|
53 |
-
data-addon="<?php echo $index; ?>"
|
54 |
-
data-pluginname="<?php echo $plugin_name; ?>"
|
55 |
-
data-optionslug="<?php echo $options_slug; ?>"
|
56 |
-
name="advads_license_activate"><?php
|
57 |
|
58 |
<button type="button" class="button-primary advads-license-activate"
|
59 |
-
data-addon="<?php echo $index; ?>"
|
60 |
-
data-pluginname="<?php echo $plugin_name; ?>"
|
61 |
-
data-optionslug="<?php echo $options_slug; ?>"
|
62 |
-
name="advads_license_activate"
|
|
|
|
|
|
|
63 |
<?php
|
64 |
if ( '' === trim( $license_key ) ) {
|
65 |
$errortext = __( 'Please enter a valid license key', 'advanced-ads' );
|
66 |
} elseif ( ! $expired && ! $errortext ) {
|
67 |
-
$errortext = (
|
68 |
}
|
69 |
?>
|
70 |
|
71 |
-
<span class="advads-license-activate-active" <?php
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
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 );
|
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$s is a URL, %2$s is HTML of a button.
|
31 |
+
// phpcs:ignore
|
32 |
+
__( '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' ),
|
33 |
+
esc_url( ADVADS_URL ) . 'checkout/?edd_license_key=' . esc_attr( $license_key_for_expired_link ) . '#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses',
|
34 |
+
$update_button
|
35 |
+
);
|
36 |
if ( 'lifetime' !== $expires ) {
|
37 |
$expires_time = strtotime( $expires );
|
38 |
$days_left = ( $expires_time - time() ) / DAY_IN_SECONDS;
|
39 |
}
|
40 |
+
// phpcs:ignore
|
41 |
if ( 'lifetime' === $expires ) {
|
42 |
+
// do nothing.
|
43 |
} elseif ( $expired && $days_left <= 0 ) {
|
44 |
$plugin_url = isset( $plugin_url ) ? $plugin_url : ADVADS_URL;
|
45 |
$errortext = $expired_error;
|
46 |
$expired = true;
|
47 |
} elseif ( 0 < $days_left && 31 > $days_left ) {
|
48 |
+
$errortext = sprintf(
|
49 |
+
// translators: %d is a number of days.
|
50 |
+
esc_html__( '(%d days left)', 'advanced-ads' ),
|
51 |
+
$days_left
|
52 |
+
);
|
53 |
}
|
54 |
+
$show_active = ( false !== $license_status && 'valid' === $license_status && ! $expired ) ? true : false;
|
55 |
?>
|
56 |
+
<input type="text" class="regular-text advads-license-key" placeholder="<?php esc_html_e( 'License key', 'advanced-ads' ); ?>"
|
57 |
+
name="<?php echo esc_attr( ADVADS_SLUG ) . '-licenses'; ?>[<?php echo esc_attr( $index ); ?>]"
|
58 |
+
value="<?php echo esc_attr( $license_key ); ?>"
|
59 |
<?php
|
60 |
+
if ( false !== $license_status && 'valid' === $license_status && ! $expired ) :
|
61 |
?>
|
62 |
readonly="readonly"<?php endif; ?>/>
|
63 |
|
64 |
<button type="button" class="button-secondary advads-license-deactivate"
|
65 |
<?php
|
66 |
+
if ( 'valid' !== $license_status ) {
|
67 |
echo ' style="display: none;" ';
|
68 |
}
|
69 |
?>
|
70 |
+
data-addon="<?php echo esc_attr( $index ); ?>"
|
71 |
+
data-pluginname="<?php echo esc_attr( $plugin_name ); ?>"
|
72 |
+
data-optionslug="<?php echo esc_attr( $options_slug ); ?>"
|
73 |
+
name="advads_license_activate"><?php esc_html_e( 'Deactivate License', 'advanced-ads' ); ?></button>
|
74 |
|
75 |
<button type="button" class="button-primary advads-license-activate"
|
76 |
+
data-addon="<?php echo esc_attr( $index ); ?>"
|
77 |
+
data-pluginname="<?php echo esc_attr( $plugin_name ); ?>"
|
78 |
+
data-optionslug="<?php echo esc_attr( $options_slug ); ?>"
|
79 |
+
name="advads_license_activate">
|
80 |
+
<?php
|
81 |
+
// phpcs:ignore
|
82 |
+
echo ( 'valid' === $license_status && ! $expired ) ? esc_html__( 'Update License', 'advanced-ads' ) : esc_html__( 'Activate License', 'advanced-ads' ); ?></button>
|
83 |
<?php
|
84 |
if ( '' === trim( $license_key ) ) {
|
85 |
$errortext = __( 'Please enter a valid license key', 'advanced-ads' );
|
86 |
} elseif ( ! $expired && ! $errortext ) {
|
87 |
+
$errortext = ( 'invalid' === $license_status ) ? esc_html__( 'License key invalid', 'advanced-ads' ) : '';
|
88 |
}
|
89 |
?>
|
90 |
|
91 |
+
<span class="advads-license-activate-active" <?php echo ( ! $show_active ) ? 'style="display: none;"' : ''; ?>><?php esc_html_e( 'active', 'advanced-ads' ); ?></span>
|
92 |
+
<span class="advads-license-activate-error" <?php echo ( ! $errortext ) ? 'style="display: none;"' : ''; ?>>
|
93 |
+
<?php
|
94 |
+
// phpcs:ignore
|
95 |
+
echo $errortext;
|
96 |
+
?>
|
97 |
+
</span>
|
98 |
+
<span class="advads-license-expired-error advads-error-message" style="display: none;">
|
99 |
+
<?php
|
100 |
+
// phpcs:ignore
|
101 |
+
echo $expired_error;
|
102 |
+
?>
|
103 |
+
</span>
|
admin/views/settings.php
CHANGED
@@ -3,9 +3,10 @@
|
|
3 |
* the view for the settings page
|
4 |
*/
|
5 |
|
6 |
-
// array with setting tabs for frontend
|
7 |
$setting_tabs = apply_filters(
|
8 |
-
'advanced-ads-setting-tabs',
|
|
|
9 |
'general' => array(
|
10 |
'page' => Advanced_Ads_Admin::get_instance()->plugin_screen_hook_suffix,
|
11 |
'group' => ADVADS_SLUG,
|
@@ -17,19 +18,19 @@ $setting_tabs = apply_filters(
|
|
17 |
?><div class="wrap">
|
18 |
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
|
19 |
<?php Advanced_Ads_Checks::show_issues(); ?>
|
20 |
-
|
21 |
<?php settings_errors(); ?>
|
22 |
<div class="nav-tab-wrapper" id="advads-tabs">
|
23 |
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
|
24 |
-
<a class="nav-tab" id="<?php echo $_setting_tab_id; ?>-tab"
|
25 |
-
href="#top#<?php echo $_setting_tab_id; ?>"><?php echo $_setting_tab['title']; ?></a>
|
26 |
<?php endforeach; ?>
|
27 |
<a class="nav-tab" id="support-tab"
|
28 |
-
href="#top#support"><?php
|
29 |
</div>
|
30 |
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
|
31 |
-
<div id="<?php echo $_setting_tab_id; ?>" class="advads-tab">
|
32 |
-
<div id="advads-sub-menu-<?php echo $_setting_tab_id; ?>" class="advads-tab-sub-menu"></div>
|
33 |
<form class="advads-settings-tab-main-form" method="post" action="options.php">
|
34 |
<?php
|
35 |
if ( isset( $_setting_tab['group'] ) ) {
|
@@ -46,7 +47,7 @@ $setting_tabs = apply_filters(
|
|
46 |
<?php do_action( 'advanced-ads-settings-tab-after-form', $_setting_tab_id, $_setting_tab ); ?>
|
47 |
<?php if ( 'general' === $_setting_tab_id ) : ?>
|
48 |
<ul>
|
49 |
-
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-import-export' ) ); ?>"><?php
|
50 |
</ul>
|
51 |
<?php endif; ?>
|
52 |
</div>
|
@@ -56,7 +57,7 @@ $setting_tabs = apply_filters(
|
|
56 |
</div>
|
57 |
<?php
|
58 |
do_action( 'advanced-ads-additional-settings-form' );
|
59 |
-
// print the filesystem credentials modal if needed
|
60 |
Advanced_Ads_Filesystem::get_instance()->print_request_filesystem_credentials_modal();
|
61 |
?>
|
62 |
|
3 |
* the view for the settings page
|
4 |
*/
|
5 |
|
6 |
+
// array with setting tabs for frontend.
|
7 |
$setting_tabs = apply_filters(
|
8 |
+
'advanced-ads-setting-tabs',
|
9 |
+
array(
|
10 |
'general' => array(
|
11 |
'page' => Advanced_Ads_Admin::get_instance()->plugin_screen_hook_suffix,
|
12 |
'group' => ADVADS_SLUG,
|
18 |
?><div class="wrap">
|
19 |
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
|
20 |
<?php Advanced_Ads_Checks::show_issues(); ?>
|
21 |
+
|
22 |
<?php settings_errors(); ?>
|
23 |
<div class="nav-tab-wrapper" id="advads-tabs">
|
24 |
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
|
25 |
+
<a class="nav-tab" id="<?php echo esc_attr( $_setting_tab_id ); ?>-tab"
|
26 |
+
href="#top#<?php echo esc_attr( $_setting_tab_id ); ?>"><?php echo esc_html( $_setting_tab['title'] ); ?></a>
|
27 |
<?php endforeach; ?>
|
28 |
<a class="nav-tab" id="support-tab"
|
29 |
+
href="#top#support"><?php esc_html_e( 'Support', 'advanced-ads' ); ?></a>
|
30 |
</div>
|
31 |
<?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
|
32 |
+
<div id="<?php echo esc_attr( $_setting_tab_id ); ?>" class="advads-tab">
|
33 |
+
<div id="advads-sub-menu-<?php echo esc_attr( $_setting_tab_id ); ?>" class="advads-tab-sub-menu"></div>
|
34 |
<form class="advads-settings-tab-main-form" method="post" action="options.php">
|
35 |
<?php
|
36 |
if ( isset( $_setting_tab['group'] ) ) {
|
47 |
<?php do_action( 'advanced-ads-settings-tab-after-form', $_setting_tab_id, $_setting_tab ); ?>
|
48 |
<?php if ( 'general' === $_setting_tab_id ) : ?>
|
49 |
<ul>
|
50 |
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-import-export' ) ); ?>"><?php esc_html_e( 'Import & Export', 'advanced-ads' ); ?></a></li>
|
51 |
</ul>
|
52 |
<?php endif; ?>
|
53 |
</div>
|
57 |
</div>
|
58 |
<?php
|
59 |
do_action( 'advanced-ads-additional-settings-form' );
|
60 |
+
// print the filesystem credentials modal if needed.
|
61 |
Advanced_Ads_Filesystem::get_instance()->print_request_filesystem_credentials_modal();
|
62 |
?>
|
63 |
|
admin/views/support-callout.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div id="advads-support-callout">
|
2 |
-
|
3 |
-
<a href="<?php echo Advanced_Ads_Plugin::support_url( '#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-notices-support' ); ?>" target="_blank"><strong><?php
|
4 |
-
|
5 |
</a>
|
6 |
-
|
7 |
-
</div>
|
1 |
<div id="advads-support-callout">
|
2 |
+
<p>
|
3 |
+
<a href="<?php echo esc_url( Advanced_Ads_Plugin::support_url( '#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-notices-support' ) ); ?>" target="_blank"><strong><?php esc_html_e( 'Problems or questions?', 'advanced-ads' ); ?></strong>
|
4 |
+
<?php esc_html_e( 'Save time and get personal support.', 'advanced-ads' ); ?> <strong style="text-decoration: underline;"><?php esc_html_e( 'Ask your question!', 'advanced-ads' ); ?></strong>
|
5 |
</a>
|
6 |
+
</p>
|
7 |
+
</div>
|
admin/views/support.php
CHANGED
@@ -3,27 +3,66 @@
|
|
3 |
* the view for the support page
|
4 |
*/
|
5 |
?><div class="wrap">
|
6 |
-
<p><?php
|
7 |
-
<h2><?php
|
8 |
<ul>
|
9 |
-
<li><a href="<?php echo ADVADS_URL; ?>manual/ads-not-showing-up/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php
|
10 |
-
<li><a href="<?php echo ADVADS_URL; ?>manual-category/purchase-licenses/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php
|
11 |
-
<li><a href="<?php echo ADVADS_URL; ?>manual-category/troubleshooting/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php
|
12 |
-
<li><a href="<?php echo ADVADS_URL; ?>manual-category/add-on-issues/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php
|
13 |
</ul>
|
14 |
-
<p><?php
|
15 |
<form action="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support-form" method="get" class="advads-support-form">
|
16 |
<input type="search" name="s"/>
|
17 |
-
<input type="submit" class="button button-primary" value="<?php
|
18 |
</form>
|
19 |
<?php if ( Advanced_Ads_Admin_Licenses::any_license_valid() ) : ?>
|
20 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<?php else : ?>
|
22 |
-
<p
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<?php endif; ?>
|
24 |
<?php if ( $constants = Advanced_Ads_Checks::get_defined_constants() ) : ?>
|
25 |
-
<h2><?php
|
26 |
-
<ul><li
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</p>
|
28 |
<?php endif; ?>
|
29 |
</div>
|
3 |
* the view for the support page
|
4 |
*/
|
5 |
?><div class="wrap">
|
6 |
+
<p><?php esc_html_e( 'Please fix the red highlighted issues on this page or try to understand their consequences before contacting support.', 'advanced-ads' ); ?></p>
|
7 |
+
<h2><?php esc_html_e( 'Possible Issues', 'advanced-ads' ); ?></h2>
|
8 |
<ul>
|
9 |
+
<li><a href="<?php echo esc_url( ADVADS_URL ); ?>manual/ads-not-showing-up/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php esc_html_e( 'Ads not showing up', 'advanced-ads' ); ?></a></li>
|
10 |
+
<li><a href="<?php echo esc_url( ADVADS_URL ); ?>manual-category/purchase-licenses/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php esc_html_e( 'Purchase & Licenses', 'advanced-ads' ); ?></a></li>
|
11 |
+
<li><a href="<?php echo esc_url( ADVADS_URL ); ?>manual-category/troubleshooting/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php esc_html_e( 'General Issues', 'advanced-ads' ); ?></a></li>
|
12 |
+
<li><a href="<?php echo esc_url( ADVADS_URL ); ?>manual-category/add-on-issues/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support"><?php esc_html_e( 'Issues with Add-Ons', 'advanced-ads' ); ?></a></li>
|
13 |
</ul>
|
14 |
+
<p><?php esc_html_e( 'Use the following form to search for solutions in the manual on wpadvancedads.com', 'advanced-ads' ); ?></p>
|
15 |
<form action="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support-form" method="get" class="advads-support-form">
|
16 |
<input type="search" name="s"/>
|
17 |
+
<input type="submit" class="button button-primary" value="<?php esc_html_e( 'search', 'advanced-ads' ); ?>">
|
18 |
</form>
|
19 |
<?php if ( Advanced_Ads_Admin_Licenses::any_license_valid() ) : ?>
|
20 |
+
<p>
|
21 |
+
<?php
|
22 |
+
printf(
|
23 |
+
wp_kses(
|
24 |
+
// translators: %s is a URL.
|
25 |
+
__( 'Take a look at more common issues or contact us directly through the <a href="%s" target="_blank">support page</a>.', 'advanced-ads' ),
|
26 |
+
array(
|
27 |
+
'a' => array(
|
28 |
+
'href' => array(),
|
29 |
+
'target' => array(),
|
30 |
+
),
|
31 |
+
)
|
32 |
+
),
|
33 |
+
esc_url( ADVADS_URL ) . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support'
|
34 |
+
);
|
35 |
+
?>
|
36 |
+
</p>
|
37 |
<?php else : ?>
|
38 |
+
<p>
|
39 |
+
<?php
|
40 |
+
printf(
|
41 |
+
wp_kses(
|
42 |
+
// translators: %s is a URL.
|
43 |
+
__( 'Upgrade to any premium add-on and get <strong>priority email support</strong> or reach out through the <a href="%s" target="_blank">support forum</a> for individual help.', 'advanced-ads' ),
|
44 |
+
array(
|
45 |
+
'a' => array(
|
46 |
+
'href' => array(),
|
47 |
+
'target' => array(),
|
48 |
+
),
|
49 |
+
)
|
50 |
+
),
|
51 |
+
'https://wordpress.org/support/plugin/advanced-ads'
|
52 |
+
);
|
53 |
+
?>
|
54 |
+
</p>
|
55 |
<?php endif; ?>
|
56 |
<?php if ( $constants = Advanced_Ads_Checks::get_defined_constants() ) : ?>
|
57 |
+
<h2><?php esc_html_e( 'Advanced Ads related constants enabled', 'advanced-ads' ); ?></h2>
|
58 |
+
<ul><li>
|
59 |
+
<?php
|
60 |
+
echo wp_kses(
|
61 |
+
implode( '</li><li>', $constants ),
|
62 |
+
array( 'li' => array() )
|
63 |
+
);
|
64 |
+
?>
|
65 |
+
</li></ul>
|
66 |
</p>
|
67 |
<?php endif; ?>
|
68 |
</div>
|
advanced-ads.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: https://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
-
* Version: 1.17.
|
16 |
* Author: Thomas Maier, Advanced Ads GmbH
|
17 |
* Author URI: https://wpadvancedads.com
|
18 |
* Text Domain: advanced-ads
|
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
|
|
39 |
// general and global slug, e.g. to store options in WP.
|
40 |
define( 'ADVADS_SLUG', 'advanced-ads' );
|
41 |
define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
|
42 |
-
define( 'ADVADS_VERSION', '1.17.
|
43 |
|
44 |
// Autoloading, modules and functions.
|
45 |
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: https://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
+
* Version: 1.17.6
|
16 |
* Author: Thomas Maier, Advanced Ads GmbH
|
17 |
* Author URI: https://wpadvancedads.com
|
18 |
* Text Domain: advanced-ads
|
39 |
// general and global slug, e.g. to store options in WP.
|
40 |
define( 'ADVADS_SLUG', 'advanced-ads' );
|
41 |
define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
|
42 |
+
define( 'ADVADS_VERSION', '1.17.6' );
|
43 |
|
44 |
// Autoloading, modules and functions.
|
45 |
|
classes/ad_placements.php
CHANGED
@@ -515,7 +515,7 @@ class Advanced_Ads_Placements {
|
|
515 |
|
516 |
if ( $options['paragraph_count'] >= $options['paragraph_id'] ) {
|
517 |
$offset = $options['paragraph_select_from_bottom'] ? $options['paragraph_count'] - $options['paragraph_id'] : $options['paragraph_id'] - 1;
|
518 |
-
$offsets = apply_filters( 'advanced-ads-placement-content-offsets', array( $offset ), $options, $placement_opts );
|
519 |
$did_inject = false;
|
520 |
|
521 |
foreach ( $offsets as $offset ) {
|
515 |
|
516 |
if ( $options['paragraph_count'] >= $options['paragraph_id'] ) {
|
517 |
$offset = $options['paragraph_select_from_bottom'] ? $options['paragraph_count'] - $options['paragraph_id'] : $options['paragraph_id'] - 1;
|
518 |
+
$offsets = apply_filters( 'advanced-ads-placement-content-offsets', array( $offset ), $options, $placement_opts, $xpath, $paragraphs, $dom );
|
519 |
$did_inject = false;
|
520 |
|
521 |
foreach ( $offsets as $offset ) {
|
classes/checks.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* @since 1.6.9
|
7 |
*/
|
@@ -14,9 +14,9 @@ class Advanced_Ads_Checks {
|
|
14 |
|
15 |
|
16 |
/**
|
17 |
-
*
|
18 |
*/
|
19 |
-
public static function show_issues(){
|
20 |
include_once ADVADS_BASE_PATH . '/admin/views/checks.php';
|
21 |
}
|
22 |
|
@@ -25,97 +25,97 @@ class Advanced_Ads_Checks {
|
|
25 |
*
|
26 |
* @return bool true if uses the minimum PHP version or higher
|
27 |
*/
|
28 |
-
|
29 |
|
30 |
-
if (version_compare(phpversion(), self::MINIMUM_PHP_VERSION, '>=')) {
|
31 |
return true;
|
32 |
}
|
33 |
|
34 |
return false;
|
35 |
-
|
36 |
|
37 |
/**
|
38 |
-
*
|
39 |
*
|
40 |
* @return bool true if active
|
41 |
*/
|
42 |
-
|
43 |
-
if ( ( defined( 'WP_CACHE' ) && WP_CACHE ) // general cache constant
|
44 |
-
|| defined('W3TC') // W3 Total Cache
|
45 |
-
|| function_exists( 'wp_super_cache_text_domain' ) // WP SUper Cache
|
46 |
-
|| defined( 'WP_ROCKET_SLUG' ) //WP Rocket
|
47 |
-
|| defined( 'WPFC_WP_CONTENT_DIR' ) //WP Fastest Cache
|
48 |
-
|| class_exists( 'HyperCache', false ) // Hyper Cache
|
49 |
-
|| defined( 'CE_CACHE_DIR' ) // Cache Enabler
|
50 |
-
){
|
51 |
return true;
|
52 |
}
|
53 |
|
54 |
return false;
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
$update_data = wp_get_update_data();
|
65 |
-
$count
|
66 |
|
67 |
-
if( $count ){
|
68 |
return true;
|
69 |
}
|
70 |
|
71 |
return false;
|
72 |
-
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
public static function licenses_invalid(){
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
|
91 |
-
|
92 |
-
|
93 |
|
94 |
-
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
|
107 |
-
|
108 |
|
109 |
-
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
}
|
120 |
|
121 |
/**
|
@@ -125,9 +125,9 @@ class Advanced_Ads_Checks {
|
|
125 |
* @link https://wordpress.org/plugins/autoptimize/
|
126 |
* @return bool true if Autoptimize is installed
|
127 |
*/
|
128 |
-
public static function active_autoptimize(){
|
129 |
|
130 |
-
if( defined( 'AUTOPTIMIZE_PLUGIN_VERSION' ) ){
|
131 |
return true;
|
132 |
}
|
133 |
|
@@ -139,26 +139,29 @@ class Advanced_Ads_Checks {
|
|
139 |
*
|
140 |
* @return bool true if WP rocket is installed
|
141 |
*/
|
142 |
-
public static function active_wp_rocket(){
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
|
147 |
-
|
148 |
}
|
149 |
|
150 |
/**
|
151 |
-
*
|
|
|
152 |
* @return boolean true, when "Combine JavaScript files" is enabled
|
153 |
*/
|
154 |
-
public static function is_wp_rocket_combine_js_enabled(){
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
162 |
}
|
163 |
|
164 |
/**
|
@@ -166,19 +169,19 @@ class Advanced_Ads_Checks {
|
|
166 |
*
|
167 |
* @return bool true if AMP plugin is installed
|
168 |
*/
|
169 |
-
public static function active_amp_plugin(){
|
170 |
-
// Accelerated Mobile Pages
|
171 |
-
if( function_exists( 'ampforwp_is_amp_endpoint' ) ){
|
172 |
return true;
|
173 |
}
|
174 |
|
175 |
-
// AMP plugin
|
176 |
-
if( function_exists( 'is_amp_endpoint' ) ){
|
177 |
return true;
|
178 |
}
|
179 |
|
180 |
-
// other plugins
|
181 |
-
if ( function_exists( 'is_wp_amp' ) ){
|
182 |
return true;
|
183 |
}
|
184 |
|
@@ -186,35 +189,36 @@ class Advanced_Ads_Checks {
|
|
186 |
}
|
187 |
|
188 |
/**
|
189 |
-
*
|
|
|
190 |
* @return boolean
|
191 |
*/
|
192 |
-
public static function requires_noptimize_wrapping(){
|
193 |
-
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
-
*
|
198 |
*
|
199 |
-
* @return
|
200 |
*/
|
201 |
-
public static function conflicting_plugins(){
|
202 |
|
203 |
$conflicting_plugins = array();
|
204 |
|
205 |
-
if( defined( 'Publicize_Base' ) ){ // JetPack Publicize module.
|
206 |
$conflicting_plugins[] = 'Jetpack – Publicize';
|
207 |
}
|
208 |
-
if( defined( 'PF__PLUGIN_DIR' ) ){ // Facebook Instant Articles & Google AMP Pages by PageFrog.
|
209 |
$conflicting_plugins[] = 'Facebook Instant Articles & Google AMP Pages by PageFrog';
|
210 |
}
|
211 |
-
if( defined( 'GT_VERSION' ) ){ // GT ShortCodes
|
212 |
$conflicting_plugins[] = 'GT ShortCodes';
|
213 |
}
|
214 |
-
if( class_exists( 'ITSEC_Core', false ) && defined
|
215 |
$conflicting_plugins[] = 'iThemes Security';
|
216 |
}
|
217 |
-
if( class_exists( 'SimilarPosts', false ) ){ // Similar Posts, https://de.wordpress.org/plugins/similar-posts/.
|
218 |
$conflicting_plugins[] = 'Similar Posts';
|
219 |
}
|
220 |
|
@@ -222,18 +226,18 @@ class Advanced_Ads_Checks {
|
|
222 |
}
|
223 |
|
224 |
/**
|
225 |
-
*
|
226 |
* ignore RSS feed setting, because it is standard
|
227 |
*
|
228 |
* @since 1.7.10
|
229 |
* @return bool
|
230 |
*/
|
231 |
-
public static function ads_disabled(){
|
232 |
$options = Advanced_Ads::get_instance()->options();
|
233 |
-
if( isset( $options['disabled-ads'] ) && is_array( $options['disabled-ads'] ) ){
|
234 |
-
foreach( $options['disabled-ads'] as $_key => $_value ){
|
235 |
-
// don’t warn if "RSS Feed"
|
236 |
-
if( !empty( $_value ) && !in_array($_key, array( 'feed', '404') ) ){
|
237 |
return true;
|
238 |
}
|
239 |
}
|
@@ -242,21 +246,20 @@ class Advanced_Ads_Checks {
|
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
-
*
|
246 |
*
|
247 |
-
* @since 1.8.21
|
248 |
* @return array
|
249 |
*/
|
250 |
-
public static function php_extensions(){
|
251 |
|
252 |
$missing_extensions = array();
|
253 |
|
254 |
-
if( !extension_loaded('dom') ){
|
255 |
-
|
256 |
}
|
257 |
|
258 |
if ( ! extension_loaded( 'mbstring' ) ) {
|
259 |
-
|
260 |
}
|
261 |
|
262 |
return $missing_extensions;
|
@@ -268,28 +271,31 @@ class Advanced_Ads_Checks {
|
|
268 |
* @return array
|
269 |
*/
|
270 |
public static function get_defined_constants() {
|
271 |
-
$constants = apply_filters(
|
272 |
-
'
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
293 |
|
294 |
$result = array();
|
295 |
foreach ( $constants as $constant ) {
|
@@ -306,8 +312,8 @@ class Advanced_Ads_Checks {
|
|
306 |
*
|
307 |
* @return bool true if site is hosted by WP Engine
|
308 |
*/
|
309 |
-
public static function wp_engine_hosting(){
|
310 |
-
if( defined( 'WPE_APIKEY' ) ){
|
311 |
return true;
|
312 |
}
|
313 |
|
@@ -318,27 +324,27 @@ class Advanced_Ads_Checks {
|
|
318 |
* Notice for Adblocker module if assets have expired
|
319 |
*/
|
320 |
public static function assets_expired() {
|
321 |
-
$plugin_options
|
322 |
$adblocker_options = Advanced_Ads_Ad_Blocker::get_instance()->options();
|
323 |
|
324 |
-
return ( ! empty
|
325 |
}
|
326 |
|
327 |
/**
|
328 |
-
*
|
329 |
* only script, so no return, but direct output
|
330 |
-
*
|
331 |
*/
|
332 |
-
public static function jquery_ui_conflict(){
|
333 |
-
|
334 |
-
|
335 |
jQuery(document).ready(function(){
|
336 |
var needle = 'prior to initialization;' // A string from jquery-ui source code.
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
});
|
341 |
-
|
|
|
342 |
}
|
343 |
|
344 |
/**
|
@@ -346,12 +352,12 @@ class Advanced_Ads_Checks {
|
|
346 |
*
|
347 |
* @return array
|
348 |
*/
|
349 |
-
public static function ads_txt_plugins(){
|
350 |
|
351 |
$ads_txt_plugins = array();
|
352 |
|
353 |
-
// Ads.txt Manager
|
354 |
-
if( function_exists( 'tenup_display_ads_txt' ) ) {
|
355 |
$ads_txt_plugins[] = 'Ads.txt Manager';
|
356 |
}
|
357 |
|
@@ -360,7 +366,7 @@ class Advanced_Ads_Checks {
|
|
360 |
// simple-ads-txt/bs_ads_txt.php
|
361 |
// ads-txt-manager/adstxtmanager.php
|
362 |
// monetizemore-ads-txt/wp-ads-txt.php
|
363 |
-
// authorized-sellers-manager/ads-txt-publisher.php
|
364 |
|
365 |
return $ads_txt_plugins;
|
366 |
}
|
@@ -370,28 +376,27 @@ class Advanced_Ads_Checks {
|
|
370 |
*
|
371 |
* @return array
|
372 |
*/
|
373 |
-
public static function header_footer_plugins(){
|
374 |
|
375 |
$plugins = array();
|
376 |
|
377 |
-
// Header Footer Code Manager
|
378 |
-
if( function_exists( 'hfcm_options_install' ) ) {
|
379 |
$plugins[] = 'Header Footer Code Manager';
|
380 |
}
|
381 |
-
// Head, Footer and Post Injections
|
382 |
-
if( function_exists( 'hefo_template_redirect' ) ) {
|
383 |
$plugins[] = 'Head, Footer and Post Injections';
|
384 |
}
|
385 |
-
// Insert Headers and Footers /insert-headers-and-footers
|
386 |
-
if( class_exists( 'InsertHeadersAndFooters', false ) ) {
|
387 |
$plugins[] = 'Insert Headers and Footers';
|
388 |
}
|
389 |
-
// Header and Footer Scripts /header-and-footer-scripts
|
390 |
-
if( class_exists( 'HeaderAndFooterScripts', false ) ) {
|
391 |
$plugins[] = 'Header and Footer Scripts';
|
392 |
}
|
393 |
|
394 |
-
|
395 |
return $plugins;
|
396 |
}
|
397 |
}
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Checks for various things
|
5 |
*
|
6 |
* @since 1.6.9
|
7 |
*/
|
14 |
|
15 |
|
16 |
/**
|
17 |
+
* Show the list of potential issues
|
18 |
*/
|
19 |
+
public static function show_issues() {
|
20 |
include_once ADVADS_BASE_PATH . '/admin/views/checks.php';
|
21 |
}
|
22 |
|
25 |
*
|
26 |
* @return bool true if uses the minimum PHP version or higher
|
27 |
*/
|
28 |
+
public static function php_version_minimum() {
|
29 |
|
30 |
+
if ( version_compare( phpversion(), self::MINIMUM_PHP_VERSION, '>=' ) ) {
|
31 |
return true;
|
32 |
}
|
33 |
|
34 |
return false;
|
35 |
+
}
|
36 |
|
37 |
/**
|
38 |
+
* Caching used
|
39 |
*
|
40 |
* @return bool true if active
|
41 |
*/
|
42 |
+
public static function cache() {
|
43 |
+
if ( ( defined( 'WP_CACHE' ) && WP_CACHE ) // general cache constant.
|
44 |
+
|| defined( 'W3TC' ) // W3 Total Cache.
|
45 |
+
|| function_exists( 'wp_super_cache_text_domain' ) // WP SUper Cache.
|
46 |
+
|| defined( 'WP_ROCKET_SLUG' ) // WP Rocket.
|
47 |
+
|| defined( 'WPFC_WP_CONTENT_DIR' ) // WP Fastest Cache.
|
48 |
+
|| class_exists( 'HyperCache', false ) // Hyper Cache.
|
49 |
+
|| defined( 'CE_CACHE_DIR' ) // Cache Enabler.
|
50 |
+
) {
|
51 |
return true;
|
52 |
}
|
53 |
|
54 |
return false;
|
55 |
+
}
|
56 |
|
57 |
+
/**
|
58 |
+
* WordPress update available
|
59 |
+
*
|
60 |
+
* @return bool true if WordPress update available
|
61 |
+
*/
|
62 |
+
public static function wp_update_available() {
|
63 |
|
64 |
$update_data = wp_get_update_data();
|
65 |
+
$count = absint( $update_data['counts']['wordpress'] );
|
66 |
|
67 |
+
if ( $count ) {
|
68 |
return true;
|
69 |
}
|
70 |
|
71 |
return false;
|
72 |
+
}
|
73 |
|
74 |
+
/**
|
75 |
+
* Check if license keys are missing or invalid or expired
|
76 |
+
*
|
77 |
+
* @since 1.6.6
|
78 |
+
* @update 1.6.9 moved from Advanced_Ads_Plugin
|
79 |
+
* @update 1.8.21 also check for expired licenses
|
80 |
+
* @return true if there are missing licenses
|
81 |
+
*/
|
82 |
+
public static function licenses_invalid() {
|
83 |
|
84 |
+
$add_ons = apply_filters( 'advanced-ads-add-ons', array() );
|
85 |
|
86 |
+
if ( array() === $add_ons ) {
|
87 |
+
Advanced_Ads_Ad_Health_Notices::get_instance()->remove( 'license_invalid' );
|
88 |
+
return false;
|
89 |
+
}
|
90 |
|
91 |
+
foreach ( $add_ons as $_add_on_key => $_add_on ) {
|
92 |
+
$status = Advanced_Ads_Admin_Licenses::get_instance()->get_license_status( $_add_on['options_slug'] );
|
93 |
|
94 |
+
// check expiry date.
|
95 |
+
$expiry_date = Advanced_Ads_Admin_Licenses::get_instance()->get_license_expires( $_add_on['options_slug'] );
|
96 |
|
97 |
+
if ( $expiry_date && 'lifetime' !== $expiry_date && strtotime( $expiry_date ) < time() ) {
|
98 |
+
return true;
|
99 |
+
}
|
100 |
|
101 |
+
// don’t check if license is valid.
|
102 |
+
if ( 'valid' === $status ) {
|
103 |
+
continue;
|
104 |
+
}
|
105 |
|
106 |
+
// retrieve our license key from the DB.
|
107 |
+
$licenses = Advanced_Ads_Admin_Licenses::get_instance()->get_licenses();
|
108 |
|
109 |
+
$license_key = isset( $licenses[ $_add_on_key ] ) ? $licenses[ $_add_on_key ] : false;
|
110 |
|
111 |
+
if ( ! $license_key || 'valid' !== $status ) {
|
112 |
+
return true;
|
113 |
+
}
|
114 |
+
}
|
115 |
|
116 |
+
// remove notice, if one is given.
|
117 |
+
Advanced_Ads_Ad_Health_Notices::get_instance()->remove( 'license_invalid' );
|
118 |
+
return false;
|
119 |
}
|
120 |
|
121 |
/**
|
125 |
* @link https://wordpress.org/plugins/autoptimize/
|
126 |
* @return bool true if Autoptimize is installed
|
127 |
*/
|
128 |
+
public static function active_autoptimize() {
|
129 |
|
130 |
+
if ( defined( 'AUTOPTIMIZE_PLUGIN_VERSION' ) ) {
|
131 |
return true;
|
132 |
}
|
133 |
|
139 |
*
|
140 |
* @return bool true if WP rocket is installed
|
141 |
*/
|
142 |
+
public static function active_wp_rocket() {
|
143 |
+
if ( defined( 'WP_ROCKET_SLUG' ) ) {
|
144 |
+
return true;
|
145 |
+
}
|
146 |
|
147 |
+
return false;
|
148 |
}
|
149 |
|
150 |
/**
|
151 |
+
* Checks the settings of wp rocket to find out if combining of javascript files is enabled
|
152 |
+
*
|
153 |
* @return boolean true, when "Combine JavaScript files" is enabled
|
154 |
*/
|
155 |
+
public static function is_wp_rocket_combine_js_enabled() {
|
156 |
+
if ( self::active_wp_rocket() ) {
|
157 |
+
$settings = get_option( 'wp_rocket_settings' );
|
158 |
+
if ( $settings ) {
|
159 |
+
if ( isset( $settings['minify_concatenate_js'] ) && $settings['minify_concatenate_js'] ) {
|
160 |
+
return true;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
return false;
|
165 |
}
|
166 |
|
167 |
/**
|
169 |
*
|
170 |
* @return bool true if AMP plugin is installed
|
171 |
*/
|
172 |
+
public static function active_amp_plugin() {
|
173 |
+
// Accelerated Mobile Pages.
|
174 |
+
if ( function_exists( 'ampforwp_is_amp_endpoint' ) ) {
|
175 |
return true;
|
176 |
}
|
177 |
|
178 |
+
// AMP plugin.
|
179 |
+
if ( function_exists( 'is_amp_endpoint' ) ) {
|
180 |
return true;
|
181 |
}
|
182 |
|
183 |
+
// other plugins.
|
184 |
+
if ( function_exists( 'is_wp_amp' ) ) {
|
185 |
return true;
|
186 |
}
|
187 |
|
189 |
}
|
190 |
|
191 |
/**
|
192 |
+
* Checks if the preconditions are met to wrap an ad with <!--noptimize--> comments
|
193 |
+
*
|
194 |
* @return boolean
|
195 |
*/
|
196 |
+
public static function requires_noptimize_wrapping() {
|
197 |
+
return self::active_autoptimize() || self::is_wp_rocket_combine_js_enabled();
|
198 |
}
|
199 |
|
200 |
/**
|
201 |
+
* Check for additional conflicting plugins
|
202 |
*
|
203 |
+
* @return array $plugins names of conflicting plugins
|
204 |
*/
|
205 |
+
public static function conflicting_plugins() {
|
206 |
|
207 |
$conflicting_plugins = array();
|
208 |
|
209 |
+
if ( defined( 'Publicize_Base' ) ) { // JetPack Publicize module.
|
210 |
$conflicting_plugins[] = 'Jetpack – Publicize';
|
211 |
}
|
212 |
+
if ( defined( 'PF__PLUGIN_DIR' ) ) { // Facebook Instant Articles & Google AMP Pages by PageFrog.
|
213 |
$conflicting_plugins[] = 'Facebook Instant Articles & Google AMP Pages by PageFrog';
|
214 |
}
|
215 |
+
if ( defined( 'GT_VERSION' ) ) { // GT ShortCodes.
|
216 |
$conflicting_plugins[] = 'GT ShortCodes';
|
217 |
}
|
218 |
+
if ( class_exists( 'ITSEC_Core', false ) && defined( 'AAP_VERSION' ) ) { // iThemes Security, but only if Pro is enabled.
|
219 |
$conflicting_plugins[] = 'iThemes Security';
|
220 |
}
|
221 |
+
if ( class_exists( 'SimilarPosts', false ) ) { // Similar Posts, https://de.wordpress.org/plugins/similar-posts/.
|
222 |
$conflicting_plugins[] = 'Similar Posts';
|
223 |
}
|
224 |
|
226 |
}
|
227 |
|
228 |
/**
|
229 |
+
* Check if any of the global hide ads options is set
|
230 |
* ignore RSS feed setting, because it is standard
|
231 |
*
|
232 |
* @since 1.7.10
|
233 |
* @return bool
|
234 |
*/
|
235 |
+
public static function ads_disabled() {
|
236 |
$options = Advanced_Ads::get_instance()->options();
|
237 |
+
if ( isset( $options['disabled-ads'] ) && is_array( $options['disabled-ads'] ) ) {
|
238 |
+
foreach ( $options['disabled-ads'] as $_key => $_value ) {
|
239 |
+
// don’t warn if "RSS Feed", "404", or "REST API" option are enabled, because they are normally not critical.
|
240 |
+
if ( ! empty( $_value ) && ! in_array( $_key, array( 'feed', '404', 'rest-api' ), true ) ) {
|
241 |
return true;
|
242 |
}
|
243 |
}
|
246 |
}
|
247 |
|
248 |
/**
|
249 |
+
* Check for required php extensions
|
250 |
*
|
|
|
251 |
* @return array
|
252 |
*/
|
253 |
+
public static function php_extensions() {
|
254 |
|
255 |
$missing_extensions = array();
|
256 |
|
257 |
+
if ( ! extension_loaded( 'dom' ) ) {
|
258 |
+
$missing_extensions[] = 'dom';
|
259 |
}
|
260 |
|
261 |
if ( ! extension_loaded( 'mbstring' ) ) {
|
262 |
+
$missing_extensions[] = 'mbstring';
|
263 |
}
|
264 |
|
265 |
return $missing_extensions;
|
271 |
* @return array
|
272 |
*/
|
273 |
public static function get_defined_constants() {
|
274 |
+
$constants = apply_filters(
|
275 |
+
'advanced-ads-constants',
|
276 |
+
array(
|
277 |
+
'ADVADS_ADS_DISABLED',
|
278 |
+
'ADVADS_ALLOW_ADSENSE_ON_404',
|
279 |
+
'ADVADS_DISABLE_RESPONSIVE_IMAGES',
|
280 |
+
'ADVANCED_ADS_AD_DEBUG_FOR_ADMIN_ONLY',
|
281 |
+
'ADVANCED_ADS_DISABLE_ANALYTICS_ANONYMIZE_IP',
|
282 |
+
'ADVANCED_ADS_DISABLE_CHANGE',
|
283 |
+
'ADVANCED_ADS_DISABLE_CODE_HIGHLIGHTING',
|
284 |
+
'ADVANCED_ADS_DISABLE_FRONTEND_AD_WEIGHT_UPDATE',
|
285 |
+
'ADVANCED_ADS_DISABLE_SHORTCODE_BUTTON',
|
286 |
+
'ADVANCED_ADS_DISALLOW_PHP',
|
287 |
+
'ADVANCED_ADS_ENABLE_REVISIONS',
|
288 |
+
'ADVANCED_ADS_GEO_TEST_IP',
|
289 |
+
'ADVANCED_ADS_PRO_CUSTOM_POSITION_MOVE_INTO_HIDDEN',
|
290 |
+
'ADVANCED_ADS_PRO_PAGE_IMPR_EXDAYS',
|
291 |
+
'ADVANCED_ADS_PRO_REFERRER_EXDAYS',
|
292 |
+
'ADVANCED_ADS_RESPONSIVE_DISABLE_BROWSER_WIDTH',
|
293 |
+
'ADVANCED_ADS_SHOW_LICENSE_RESPONSE',
|
294 |
+
'ADVANCED_ADS_SUPPRESS_PLUGIN_ERROR_NOTICES',
|
295 |
+
'ADVANCED_ADS_TRACKING_DEBUG',
|
296 |
+
'ADVANCED_ADS_TRACKING_NO_HOURLY_LIMIT',
|
297 |
+
)
|
298 |
+
);
|
299 |
|
300 |
$result = array();
|
301 |
foreach ( $constants as $constant ) {
|
312 |
*
|
313 |
* @return bool true if site is hosted by WP Engine
|
314 |
*/
|
315 |
+
public static function wp_engine_hosting() {
|
316 |
+
if ( defined( 'WPE_APIKEY' ) ) {
|
317 |
return true;
|
318 |
}
|
319 |
|
324 |
* Notice for Adblocker module if assets have expired
|
325 |
*/
|
326 |
public static function assets_expired() {
|
327 |
+
$plugin_options = Advanced_Ads_Plugin::get_instance()->options();
|
328 |
$adblocker_options = Advanced_Ads_Ad_Blocker::get_instance()->options();
|
329 |
|
330 |
+
return ( ! empty( $plugin_options['use-adblocker'] ) && empty( $adblocker_options['module_can_work'] ) );
|
331 |
}
|
332 |
|
333 |
/**
|
334 |
+
* Check for potential jQuery errors
|
335 |
* only script, so no return, but direct output
|
|
|
336 |
*/
|
337 |
+
public static function jquery_ui_conflict() {
|
338 |
+
?>
|
339 |
+
<script>
|
340 |
jQuery(document).ready(function(){
|
341 |
var needle = 'prior to initialization;' // A string from jquery-ui source code.
|
342 |
+
if ( jQuery.fn.button.toString().indexOf( needle ) === -1 || jQuery.fn.tooltip.toString().indexOf( needle ) === -1 ) {
|
343 |
+
advads_push_notice( 'jquery_ui_conflict' );
|
344 |
+
}
|
345 |
});
|
346 |
+
</script>
|
347 |
+
<?php
|
348 |
}
|
349 |
|
350 |
/**
|
352 |
*
|
353 |
* @return array
|
354 |
*/
|
355 |
+
public static function ads_txt_plugins() {
|
356 |
|
357 |
$ads_txt_plugins = array();
|
358 |
|
359 |
+
// Ads.txt Manager.
|
360 |
+
if ( function_exists( 'tenup_display_ads_txt' ) ) {
|
361 |
$ads_txt_plugins[] = 'Ads.txt Manager';
|
362 |
}
|
363 |
|
366 |
// simple-ads-txt/bs_ads_txt.php
|
367 |
// ads-txt-manager/adstxtmanager.php
|
368 |
// monetizemore-ads-txt/wp-ads-txt.php
|
369 |
+
// authorized-sellers-manager/ads-txt-publisher.php.
|
370 |
|
371 |
return $ads_txt_plugins;
|
372 |
}
|
376 |
*
|
377 |
* @return array
|
378 |
*/
|
379 |
+
public static function header_footer_plugins() {
|
380 |
|
381 |
$plugins = array();
|
382 |
|
383 |
+
// Header Footer Code Manager.
|
384 |
+
if ( function_exists( 'hfcm_options_install' ) ) {
|
385 |
$plugins[] = 'Header Footer Code Manager';
|
386 |
}
|
387 |
+
// Head, Footer and Post Injections.
|
388 |
+
if ( function_exists( 'hefo_template_redirect' ) ) {
|
389 |
$plugins[] = 'Head, Footer and Post Injections';
|
390 |
}
|
391 |
+
// Insert Headers and Footers /insert-headers-and-footers/.
|
392 |
+
if ( class_exists( 'InsertHeadersAndFooters', false ) ) {
|
393 |
$plugins[] = 'Insert Headers and Footers';
|
394 |
}
|
395 |
+
// Header and Footer Scripts /header-and-footer-scripts/.
|
396 |
+
if ( class_exists( 'HeaderAndFooterScripts', false ) ) {
|
397 |
$plugins[] = 'Header and Footer Scripts';
|
398 |
}
|
399 |
|
|
|
400 |
return $plugins;
|
401 |
}
|
402 |
}
|
classes/plugin.php
CHANGED
@@ -178,19 +178,22 @@ class Advanced_Ads_Plugin {
|
|
178 |
* } );
|
179 |
*/
|
180 |
|
181 |
-
$
|
|
|
|
|
|
|
182 |
// escaping would break HTML comment tags so we disable checks here.
|
183 |
// phpcs:ignore
|
184 |
-
echo apply_filters( 'advanced-ads-attribution', sprintf( $attribution,
|
185 |
|
186 |
if ( advads_is_amp() ) {
|
187 |
return;
|
188 |
}
|
189 |
|
190 |
ob_start();
|
|
|
191 |
?>
|
192 |
<script>
|
193 |
-
//@formatter:off
|
194 |
<?php
|
195 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
196 |
readfile( ADVADS_BASE_PATH . 'public/assets/js/ready.js' );
|
@@ -199,7 +202,6 @@ class Advanced_Ads_Plugin {
|
|
199 |
advanced_ads_ready=function(){var fns=[],listener,doc=typeof document==="object"&&document,hack=doc&&doc.documentElement.doScroll,domContentLoaded="DOMContentLoaded",loaded=doc&&(hack?/^loaded|^c/:/^loaded|^i|^c/).test(doc.readyState);if(!loaded&&doc){listener=function(){doc.removeEventListener(domContentLoaded,listener);window.removeEventListener("load",listener);loaded=1;while(listener=fns.shift())listener()};doc.addEventListener(domContentLoaded,listener);window.addEventListener("load",listener)}return function(fn){loaded?setTimeout(fn,0):fns.push(fn)}}();
|
200 |
<?php
|
201 |
}
|
202 |
-
// @formatter:on
|
203 |
|
204 |
// Output privacy options.
|
205 |
$privacy_options = Advanced_Ads_Privacy::get_instance()->options();
|
@@ -210,6 +212,7 @@ class Advanced_Ads_Plugin {
|
|
210 |
?>
|
211 |
</script>
|
212 |
<?php
|
|
|
213 |
// escaping would break our HTML here.
|
214 |
// phpcs:ignore
|
215 |
echo Advanced_Ads_Utils::get_inline_asset( ob_get_clean() );
|
@@ -727,7 +730,7 @@ class Advanced_Ads_Plugin {
|
|
727 |
*/
|
728 |
public static function get_group_by_url( $url = '', $ex = 'a' ) {
|
729 |
|
730 |
-
$url =
|
731 |
|
732 |
$code = intval( substr( md5( $url ), - 1 ), 16 );
|
733 |
|
@@ -752,6 +755,12 @@ class Advanced_Ads_Plugin {
|
|
752 |
*/
|
753 |
public static function is_new_user( $timestamp = 0 ) {
|
754 |
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
$timestamp = absint( $timestamp );
|
756 |
|
757 |
$options = self::get_instance()->internal_options();
|
@@ -770,12 +779,30 @@ class Advanced_Ads_Plugin {
|
|
770 |
*/
|
771 |
public static function show_to_new_users( $timestamp, $group = 'a' ) {
|
772 |
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
}
|
778 |
|
779 |
-
|
|
|
|
|
|
|
780 |
}
|
781 |
}
|
178 |
* } );
|
179 |
*/
|
180 |
|
181 |
+
$short_url = self::get_short_url();
|
182 |
+
$attribution = '<!-- ' . $short_url . ' is managing ads with Advanced Ads%1$s%2$s -->';
|
183 |
+
$version = self::is_new_user( 1585224000 ) ? ' ' . ADVADS_VERSION : '';
|
184 |
+
$plugin_url = self::get_group_by_url( $short_url, 'a' ) ? ' – ' . ADVADS_URL : '';
|
185 |
// escaping would break HTML comment tags so we disable checks here.
|
186 |
// phpcs:ignore
|
187 |
+
echo apply_filters( 'advanced-ads-attribution', sprintf( $attribution, $version, $plugin_url ) );
|
188 |
|
189 |
if ( advads_is_amp() ) {
|
190 |
return;
|
191 |
}
|
192 |
|
193 |
ob_start();
|
194 |
+
// @formatter:off
|
195 |
?>
|
196 |
<script>
|
|
|
197 |
<?php
|
198 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
199 |
readfile( ADVADS_BASE_PATH . 'public/assets/js/ready.js' );
|
202 |
advanced_ads_ready=function(){var fns=[],listener,doc=typeof document==="object"&&document,hack=doc&&doc.documentElement.doScroll,domContentLoaded="DOMContentLoaded",loaded=doc&&(hack?/^loaded|^c/:/^loaded|^i|^c/).test(doc.readyState);if(!loaded&&doc){listener=function(){doc.removeEventListener(domContentLoaded,listener);window.removeEventListener("load",listener);loaded=1;while(listener=fns.shift())listener()};doc.addEventListener(domContentLoaded,listener);window.addEventListener("load",listener)}return function(fn){loaded?setTimeout(fn,0):fns.push(fn)}}();
|
203 |
<?php
|
204 |
}
|
|
|
205 |
|
206 |
// Output privacy options.
|
207 |
$privacy_options = Advanced_Ads_Privacy::get_instance()->options();
|
212 |
?>
|
213 |
</script>
|
214 |
<?php
|
215 |
+
// @formatter:on
|
216 |
// escaping would break our HTML here.
|
217 |
// phpcs:ignore
|
218 |
echo Advanced_Ads_Utils::get_inline_asset( ob_get_clean() );
|
730 |
*/
|
731 |
public static function get_group_by_url( $url = '', $ex = 'a' ) {
|
732 |
|
733 |
+
$url = self::get_short_url( $url );
|
734 |
|
735 |
$code = intval( substr( md5( $url ), - 1 ), 16 );
|
736 |
|
755 |
*/
|
756 |
public static function is_new_user( $timestamp = 0 ) {
|
757 |
|
758 |
+
// allow admins to see version for new users in any case.
|
759 |
+
if ( current_user_can( self::user_cap( 'advanced_ads_manage_options' ) )
|
760 |
+
&& isset( $_REQUEST['advads-ignore-timestamp'] ) ) {
|
761 |
+
return true;
|
762 |
+
}
|
763 |
+
|
764 |
$timestamp = absint( $timestamp );
|
765 |
|
766 |
$options = self::get_instance()->internal_options();
|
779 |
*/
|
780 |
public static function show_to_new_users( $timestamp, $group = 'a' ) {
|
781 |
|
782 |
+
return ( self::get_group_by_url( null, $group ) && self::is_new_user( $timestamp ) );
|
783 |
+
}
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Get short version of home_url()
|
787 |
+
* remove protocol and www
|
788 |
+
* remove slash
|
789 |
+
*
|
790 |
+
* @param string $url URL to be shortened.
|
791 |
+
*
|
792 |
+
* @return string
|
793 |
+
*/
|
794 |
+
public static function get_short_url( $url = '' ) {
|
795 |
+
|
796 |
+
$url = empty( $url ) ? home_url() : $url;
|
797 |
+
|
798 |
+
// strip protocols.
|
799 |
+
if ( preg_match( '/^(\w[\w\d]*:\/\/)?(www\.)?(.*)$/', trim( $url ), $matches ) ) {
|
800 |
+
$url = $matches[3];
|
801 |
}
|
802 |
|
803 |
+
// strip slashes.
|
804 |
+
$url = trim( $url, '/' );
|
805 |
+
|
806 |
+
return $url;
|
807 |
}
|
808 |
}
|
languages/advanced-ads.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Advanved Ads\n"
|
5 |
"Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
|
6 |
-
"POT-Creation-Date: 2020-03-
|
7 |
"POT-Revision-Date: Wed Jul 13 2016 13:23:05 GMT+0200 (CEST)\n"
|
8 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
9 |
"Last-Translator: Thomas Maier <post@webzunft.de>\n"
|
@@ -187,7 +187,7 @@ msgstr ""
|
|
187 |
msgid "Injected in Footer (before closing </body> Tag)."
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: classes/ad_placements.php:67 admin/views/placement-injection-top.php:
|
191 |
msgid "Before Content"
|
192 |
msgstr ""
|
193 |
|
@@ -195,7 +195,7 @@ msgstr ""
|
|
195 |
msgid "Injected before the post content."
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: classes/ad_placements.php:78 admin/views/placement-injection-top.php:
|
199 |
msgid "After Content"
|
200 |
msgstr ""
|
201 |
|
@@ -203,7 +203,7 @@ msgstr ""
|
|
203 |
msgid "Injected after the post content."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: classes/ad_placements.php:89 admin/views/placement-injection-top.php:
|
207 |
msgid "Content"
|
208 |
msgstr ""
|
209 |
|
@@ -458,7 +458,7 @@ msgstr ""
|
|
458 |
msgid "Closing the message"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: classes/ad_type_group.php:30 admin/views/ad-group-list-header.php:
|
462 |
msgid "Ad Group"
|
463 |
msgstr ""
|
464 |
|
@@ -763,11 +763,11 @@ msgid "main query"
|
|
763 |
msgstr ""
|
764 |
|
765 |
#: classes/ad-debug.php:118 classes/ad-debug.php:167 classes/ad-debug.php:169
|
766 |
-
#: public/class-advanced-ads.php:
|
767 |
msgid "Ad"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: classes/ad-debug.php:121 public/class-advanced-ads.php:
|
771 |
msgctxt "ad group singular name"
|
772 |
msgid "Ad Group"
|
773 |
msgstr ""
|
@@ -798,23 +798,23 @@ msgid "--empty--"
|
|
798 |
msgstr ""
|
799 |
|
800 |
#: classes/widget.php:78 admin/includes/class-menu.php:131
|
801 |
-
#: admin/includes/class-shortcode-creator.php:115 admin/views/placements.php:
|
802 |
#: modules/gutenberg/includes/class-gutenberg.php:81
|
803 |
#: modules/import-export/views/page.php:25
|
804 |
msgid "Placements"
|
805 |
msgstr ""
|
806 |
|
807 |
#: classes/widget.php:85 admin/includes/class-shortcode-creator.php:108
|
808 |
-
#: admin/views/placements-item.php:
|
809 |
#: modules/gutenberg/includes/class-gutenberg.php:80
|
810 |
msgid "Ad Groups"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: classes/widget.php:92 public/class-advanced-ads.php:
|
814 |
#: admin/includes/class-menu.php:79 admin/includes/class-menu.php:80
|
815 |
#: admin/includes/class-shortcode-creator.php:101
|
816 |
-
#: admin/views/placements-item.php:
|
817 |
-
#: admin/views/placement-form.php:
|
818 |
#: modules/gutenberg/includes/class-gutenberg.php:79
|
819 |
#: modules/import-export/views/page.php:23
|
820 |
msgid "Ads"
|
@@ -895,32 +895,22 @@ msgstr ""
|
|
895 |
msgid "Hide inactive ads"
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: admin/class-advanced-ads-admin.php:
|
899 |
-
msgid "There has been an AJAX error caused by another plugin."
|
900 |
-
msgstr ""
|
901 |
-
|
902 |
-
#. %1$s is an opening link tag, %2$s is a closing one.
|
903 |
-
#: admin/class-advanced-ads-admin.php:234
|
904 |
-
#, php-format
|
905 |
-
msgid "Please contact our %1$ssupport%2$s."
|
906 |
-
msgstr ""
|
907 |
-
|
908 |
-
#: admin/class-advanced-ads-admin.php:347
|
909 |
#, php-format
|
910 |
msgid "time of %s"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: admin/class-advanced-ads-admin.php:
|
914 |
-
#: admin/includes/class-menu.php:158 admin/views/settings.php:
|
915 |
msgid "Support"
|
916 |
msgstr ""
|
917 |
|
918 |
-
#: admin/class-advanced-ads-admin.php:
|
919 |
#: admin/includes/class-overview-widgets.php:71
|
920 |
msgid "Add-Ons"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: admin/class-advanced-ads-admin.php:
|
924 |
#: admin/includes/class-overview-widgets.php:194
|
925 |
#, php-format
|
926 |
msgid ""
|
@@ -937,61 +927,61 @@ msgstr ""
|
|
937 |
msgid "Advanced Ads Error: %s"
|
938 |
msgstr ""
|
939 |
|
940 |
-
#: public/class-advanced-ads.php:
|
941 |
msgctxt "ad group general name"
|
942 |
msgid "Ad Groups & Rotations"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: public/class-advanced-ads.php:
|
946 |
msgid "Search Ad Groups"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: public/class-advanced-ads.php:
|
950 |
msgid "All Ad Groups"
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: public/class-advanced-ads.php:
|
954 |
msgid "Parent Ad Groups"
|
955 |
msgstr ""
|
956 |
|
957 |
-
#: public/class-advanced-ads.php:
|
958 |
msgid "Parent Ad Groups:"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: public/class-advanced-ads.php:
|
962 |
msgid "Edit Ad Group"
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: public/class-advanced-ads.php:
|
966 |
msgid "Update Ad Group"
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: public/class-advanced-ads.php:
|
970 |
msgid "Add New Ad Group"
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: public/class-advanced-ads.php:
|
974 |
msgid "New Ad Groups Name"
|
975 |
msgstr ""
|
976 |
|
977 |
-
#: public/class-advanced-ads.php:
|
978 |
msgid "Groups"
|
979 |
msgstr ""
|
980 |
|
981 |
-
#: public/class-advanced-ads.php:
|
982 |
msgid "No Ad Group found"
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: public/class-advanced-ads.php:
|
986 |
-
#: admin/includes/class-menu.php:112 admin/views/ad-group-list-ads.php:
|
987 |
msgid "New Ad"
|
988 |
msgstr ""
|
989 |
|
990 |
-
#: public/class-advanced-ads.php:
|
991 |
msgid "Add New Ad"
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: public/class-advanced-ads.php:
|
995 |
#: admin/includes/class-ad-groups-list.php:339
|
996 |
#: modules/import-export/classes/import.php:146
|
997 |
#: modules/import-export/classes/import.php:186
|
@@ -999,35 +989,35 @@ msgstr ""
|
|
999 |
msgid "Edit"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
-
#: public/class-advanced-ads.php:
|
1003 |
msgid "Edit Ad"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: public/class-advanced-ads.php:
|
1007 |
msgid "View"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: public/class-advanced-ads.php:
|
1011 |
msgid "View the Ad"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: public/class-advanced-ads.php:
|
1015 |
msgid "Search Ads"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: public/class-advanced-ads.php:
|
1019 |
msgid "No Ads found"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: public/class-advanced-ads.php:
|
1023 |
msgid "No Ads found in Trash"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: public/class-advanced-ads.php:
|
1027 |
msgid "Parent Ad"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
-
#: public/class-advanced-ads.php:
|
1031 |
msgctxt "label above ads"
|
1032 |
msgid "Advertisements"
|
1033 |
msgstr ""
|
@@ -1047,7 +1037,7 @@ msgid ""
|
|
1047 |
"<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
|
1048 |
msgstr ""
|
1049 |
|
1050 |
-
#: admin/includes/ad-health-notices.php:54 admin/views/placements.php:
|
1051 |
#, php-format
|
1052 |
msgid ""
|
1053 |
"Missing PHP extensions could cause issues. Please ask your hosting provider "
|
@@ -1061,7 +1051,7 @@ msgid ""
|
|
1061 |
"href=\"%s\">settings</a>."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: admin/includes/ad-health-notices.php:72 admin/views/support.php:
|
1065 |
msgid "Advanced Ads related constants enabled"
|
1066 |
msgstr ""
|
1067 |
|
@@ -1360,53 +1350,53 @@ msgstr ""
|
|
1360 |
msgid "Ad Stats"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: admin/includes/class-meta-box.php:199 admin/includes/class-meta-box.php:
|
1364 |
-
#: admin/includes/class-meta-box.php:
|
1365 |
#: admin/includes/class-overview-widgets.php:182
|
1366 |
-
#: admin/views/ad-output-metabox.php:
|
1367 |
#: admin/views/settings/general/custom-label.php:9
|
1368 |
#: modules/privacy/admin/views/setting-enable.php:2
|
1369 |
#: modules/ads-txt/admin/views/setting-create.php:11
|
1370 |
msgid "Manual"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
-
#: admin/includes/class-meta-box.php:
|
1374 |
msgid "Video"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
-
#: admin/includes/class-meta-box.php:
|
1378 |
#: admin/includes/class-overview-widgets.php:60
|
1379 |
msgid "Disable"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
-
#: admin/includes/class-meta-box.php:
|
1383 |
msgid "Ad Settings"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
-
#: admin/includes/class-meta-box.php:
|
1387 |
msgid "Ads Dashboard"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
#. %1$d is the number of ads, %2$s and %3$s are URLs.
|
1391 |
-
#: admin/includes/class-meta-box.php:
|
1392 |
#, php-format
|
1393 |
msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
-
#: admin/includes/class-meta-box.php:
|
1397 |
msgid "Get the tutorial via email"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
-
#: admin/includes/class-meta-box.php:
|
1401 |
msgid "Get AdSense tips via email"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: admin/includes/class-meta-box.php:
|
1405 |
msgid "Visit our blog for more articles about ad optimization"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
#. %s is our URL
|
1409 |
-
#: admin/includes/class-meta-box.php:
|
1410 |
msgid "Latest posts on wpadvancedads.com"
|
1411 |
msgstr ""
|
1412 |
|
@@ -1422,7 +1412,7 @@ msgstr ""
|
|
1422 |
msgid "Error while trying to register the license. Please contact support."
|
1423 |
msgstr ""
|
1424 |
|
1425 |
-
#: admin/includes/class-licenses.php:115 admin/views/setting-license.php:
|
1426 |
msgid "Please enter a valid license key"
|
1427 |
msgstr ""
|
1428 |
|
@@ -1547,11 +1537,11 @@ msgstr ""
|
|
1547 |
msgid "Licenses"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: admin/includes/class-menu.php:
|
1551 |
msgid "Sorry, you are not allowed to access this feature."
|
1552 |
msgstr ""
|
1553 |
|
1554 |
-
#: admin/includes/class-menu.php:
|
1555 |
msgid ""
|
1556 |
"You attempted to edit an ad group that doesn’t exist. Perhaps it was "
|
1557 |
"deleted?"
|
@@ -1625,7 +1615,7 @@ msgstr ""
|
|
1625 |
msgid "Pro"
|
1626 |
msgstr ""
|
1627 |
|
1628 |
-
#: admin/includes/class-settings.php:309 admin/views/
|
1629 |
msgid "Tracking"
|
1630 |
msgstr ""
|
1631 |
|
@@ -1643,19 +1633,19 @@ msgid "Ad weight"
|
|
1643 |
msgstr ""
|
1644 |
|
1645 |
#: admin/includes/class-ad-groups-list.php:184
|
1646 |
-
#: admin/views/ad-list-timing-column.php:
|
1647 |
#, php-format
|
1648 |
msgid "starts %s"
|
1649 |
msgstr ""
|
1650 |
|
1651 |
#: admin/includes/class-ad-groups-list.php:205
|
1652 |
-
#: admin/views/ad-list-timing-column.php:
|
1653 |
#, php-format
|
1654 |
msgid "expires %s"
|
1655 |
msgstr ""
|
1656 |
|
1657 |
#: admin/includes/class-ad-groups-list.php:208
|
1658 |
-
#: admin/views/ad-list-timing-column.php:
|
1659 |
#, php-format
|
1660 |
msgid "<strong>expired</strong> %s"
|
1661 |
msgstr ""
|
@@ -1794,7 +1784,7 @@ msgstr ""
|
|
1794 |
|
1795 |
#. %s includes a number and markup like <span class="count">6</span>.
|
1796 |
#: admin/includes/class-overview-widgets.php:218
|
1797 |
-
#: admin/views/overview-notices.php:
|
1798 |
#, php-format
|
1799 |
msgid "Show %s hidden notices"
|
1800 |
msgstr ""
|
@@ -1808,7 +1798,7 @@ msgid "The solution for professional websites."
|
|
1808 |
msgstr ""
|
1809 |
|
1810 |
#: admin/includes/class-overview-widgets.php:471
|
1811 |
-
#: admin/views/
|
1812 |
msgid "support for cached sites"
|
1813 |
msgstr ""
|
1814 |
|
@@ -1825,22 +1815,22 @@ msgid "click fraud protection, lazy load, ad-block ads"
|
|
1825 |
msgstr ""
|
1826 |
|
1827 |
#: admin/includes/class-overview-widgets.php:529
|
1828 |
-
#: admin/views/
|
1829 |
msgid "11 more display and visitor conditions"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
#: admin/includes/class-overview-widgets.php:530
|
1833 |
-
#: admin/views/
|
1834 |
msgid "6 more placements"
|
1835 |
msgstr ""
|
1836 |
|
1837 |
#: admin/includes/class-overview-widgets.php:531
|
1838 |
-
#: admin/views/
|
1839 |
msgid "placement tests for ad optimization"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
#: admin/includes/class-overview-widgets.php:532
|
1843 |
-
#: admin/views/
|
1844 |
msgid "ad grids and many more advanced features"
|
1845 |
msgstr ""
|
1846 |
|
@@ -1940,7 +1930,7 @@ msgstr ""
|
|
1940 |
msgid "Get this add-on"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
-
#: admin/views/gadsense-dashboard.php:
|
1944 |
msgid "There is an error in your AdSense setup."
|
1945 |
msgstr ""
|
1946 |
|
@@ -1960,26 +1950,6 @@ msgstr ""
|
|
1960 |
msgid "all ad groups"
|
1961 |
msgstr ""
|
1962 |
|
1963 |
-
#: admin/views/pitch-pro-tab.php:2
|
1964 |
-
msgid "Advanced Ads Pro – test and optimize your ad performance"
|
1965 |
-
msgstr ""
|
1966 |
-
|
1967 |
-
#: admin/views/pitch-pro-tab.php:4
|
1968 |
-
msgid "Ads for Ad Blockers"
|
1969 |
-
msgstr ""
|
1970 |
-
|
1971 |
-
#: admin/views/pitch-pro-tab.php:5
|
1972 |
-
msgid "Click Fraud Protection"
|
1973 |
-
msgstr ""
|
1974 |
-
|
1975 |
-
#: admin/views/pitch-pro-tab.php:6
|
1976 |
-
msgid "Lazy Loading"
|
1977 |
-
msgstr ""
|
1978 |
-
|
1979 |
-
#: admin/views/pitch-pro-tab.php:13 admin/views/pitch-tracking.php:10
|
1980 |
-
msgid "See all features and pricing"
|
1981 |
-
msgstr ""
|
1982 |
-
|
1983 |
#: admin/views/support.php:6
|
1984 |
msgid ""
|
1985 |
"Please fix the red highlighted issues on this page or try to understand "
|
@@ -2016,14 +1986,14 @@ msgstr ""
|
|
2016 |
msgid "search"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
-
#: admin/views/support.php:
|
2020 |
#, php-format
|
2021 |
msgid ""
|
2022 |
"Take a look at more common issues or contact us directly through the <a "
|
2023 |
"href=\"%s\" target=\"_blank\">support page</a>."
|
2024 |
msgstr ""
|
2025 |
|
2026 |
-
#: admin/views/support.php:
|
2027 |
#, php-format
|
2028 |
msgid ""
|
2029 |
"Upgrade to any premium add-on and get <strong>priority email support</strong>"
|
@@ -2031,52 +2001,32 @@ msgid ""
|
|
2031 |
"for individual help."
|
2032 |
msgstr ""
|
2033 |
|
2034 |
-
#: admin/views/settings.php:
|
2035 |
msgid "General"
|
2036 |
msgstr ""
|
2037 |
|
2038 |
-
#: admin/views/settings.php:
|
2039 |
msgid "Save settings on this page"
|
2040 |
msgstr ""
|
2041 |
|
2042 |
-
#: admin/views/settings.php:
|
2043 |
-
#: modules/import-export/main.php:
|
2044 |
msgid "Import & Export"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
-
#: admin/views/placements-item.php:
|
2048 |
msgid "--not selected--"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
-
#: admin/views/ad-group-list-ads.php:
|
2052 |
msgid "weight"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
-
#: admin/views/ad-group-list-ads.php:
|
2056 |
#: admin/views/conditions/conditions-form.php:37
|
2057 |
msgid "add"
|
2058 |
msgstr ""
|
2059 |
|
2060 |
-
#: admin/views/pitch-tracking.php:4
|
2061 |
-
msgid "track impressions and click on your ads"
|
2062 |
-
msgstr ""
|
2063 |
-
|
2064 |
-
#: admin/views/pitch-tracking.php:5
|
2065 |
-
msgid "compare ads and periods"
|
2066 |
-
msgstr ""
|
2067 |
-
|
2068 |
-
#: admin/views/pitch-tracking.php:6
|
2069 |
-
msgid "share reports via link or email"
|
2070 |
-
msgstr ""
|
2071 |
-
|
2072 |
-
#: admin/views/pitch-tracking.php:7
|
2073 |
-
msgid "limit ads views by overall number of impressions or clicks"
|
2074 |
-
msgstr ""
|
2075 |
-
|
2076 |
-
#: admin/views/pitch-tracking.php:8
|
2077 |
-
msgid "spread impressions or clicks equally over a given period"
|
2078 |
-
msgstr ""
|
2079 |
-
|
2080 |
#: admin/views/ad-info-top.php:2
|
2081 |
msgid "Start Wizard"
|
2082 |
msgstr ""
|
@@ -2085,61 +2035,61 @@ msgstr ""
|
|
2085 |
msgid "Stop Wizard"
|
2086 |
msgstr ""
|
2087 |
|
2088 |
-
#: admin/views/ad-info-top.php:
|
2089 |
msgid "Stop Wizard and show all options"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
-
#: admin/views/ad-group-edit.php:
|
2093 |
msgid "You did not select an item for editing."
|
2094 |
msgstr ""
|
2095 |
|
2096 |
-
#: admin/views/ad-group-edit.php:
|
2097 |
msgctxt "Taxonomy Name"
|
2098 |
msgid "Name"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
-
#: admin/views/ad-group-edit.php:
|
2102 |
msgctxt "Taxonomy Slug"
|
2103 |
msgid "Slug"
|
2104 |
msgstr ""
|
2105 |
|
2106 |
-
#: admin/views/ad-group-edit.php:
|
2107 |
msgid ""
|
2108 |
"An id-like string with only letters in lower case, numbers, and hyphens."
|
2109 |
msgstr ""
|
2110 |
|
2111 |
-
#: admin/views/ad-group-edit.php:
|
2112 |
msgctxt "Taxonomy Description"
|
2113 |
msgid "Description"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
-
#: admin/views/ad-group-edit.php:
|
2117 |
msgid "Create new Ad Group"
|
2118 |
msgstr ""
|
2119 |
|
2120 |
-
#: admin/views/ad-group-edit.php:
|
2121 |
msgid "Update"
|
2122 |
msgstr ""
|
2123 |
|
2124 |
-
#: admin/views/placement-injection-top.php:
|
2125 |
msgid "Congratulations! Your ad is now visible in the frontend."
|
2126 |
msgstr ""
|
2127 |
|
2128 |
-
#: admin/views/placement-injection-top.php:
|
2129 |
msgid "Adjust the placement options"
|
2130 |
msgstr ""
|
2131 |
|
2132 |
-
#: admin/views/placement-injection-top.php:
|
2133 |
#, php-format
|
2134 |
msgid ""
|
2135 |
"Ad not showing up? Take a look <a href=\"%s\" target=\"_blank\">here</a>"
|
2136 |
msgstr ""
|
2137 |
|
2138 |
-
#: admin/views/placement-injection-top.php:
|
2139 |
msgid "Where do you want to display the ad?"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
-
#: admin/views/placement-injection-top.php:
|
2143 |
#: modules/gadsense/admin/admin.php:178
|
2144 |
#, php-format
|
2145 |
msgid ""
|
@@ -2147,14 +2097,14 @@ msgid ""
|
|
2147 |
"href=\"%s\">AdSense settings</a>."
|
2148 |
msgstr ""
|
2149 |
|
2150 |
-
#: admin/views/placement-injection-top.php:
|
2151 |
#: modules/gadsense/admin/admin.php:180
|
2152 |
msgid ""
|
2153 |
"No need to add the code manually here, unless you want to include it into "
|
2154 |
"certain pages only."
|
2155 |
msgstr ""
|
2156 |
|
2157 |
-
#: admin/views/placement-injection-top.php:
|
2158 |
msgid ""
|
2159 |
"Click on the button below to add the Auto ads code to the header of your "
|
2160 |
"site."
|
@@ -2162,125 +2112,125 @@ msgstr ""
|
|
2162 |
|
2163 |
#. this is a label in a button when a user uses an AdSense Auto ads code in a plain code field
|
2164 |
#. the button has barely space for the original English text, so keep it short
|
2165 |
-
#: admin/views/placement-injection-top.php:
|
2166 |
msgid "inject Auto ads"
|
2167 |
msgstr ""
|
2168 |
|
2169 |
-
#: admin/views/placement-injection-top.php:
|
2170 |
msgid "New placement"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
-
#: admin/views/placement-injection-top.php:
|
2174 |
msgid "PHP or Shortcode"
|
2175 |
msgstr ""
|
2176 |
|
2177 |
-
#: admin/views/placement-injection-top.php:
|
2178 |
msgid "Manage Sidebar"
|
2179 |
msgstr ""
|
2180 |
|
2181 |
-
#: admin/views/placement-injection-top.php:
|
2182 |
msgid "Header (Manual)"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
-
#: admin/views/placement-injection-top.php:
|
2186 |
-
#: admin/views/placement-injection-top.php:
|
2187 |
msgid "Custom Position"
|
2188 |
msgstr ""
|
2189 |
|
2190 |
-
#: admin/views/placement-injection-top.php:
|
2191 |
msgid "Show Pro Places"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
-
#: admin/views/placement-injection-top.php:
|
2195 |
msgid "AdSense In-feed"
|
2196 |
msgstr ""
|
2197 |
|
2198 |
-
#: admin/views/placement-injection-top.php:
|
2199 |
msgid "Show Sticky Places"
|
2200 |
msgstr ""
|
2201 |
|
2202 |
-
#: admin/views/placement-injection-top.php:
|
2203 |
msgid "Show PopUp"
|
2204 |
msgstr ""
|
2205 |
|
2206 |
-
#: admin/views/placement-injection-top.php:
|
2207 |
msgid "PopUp & Layer"
|
2208 |
msgstr ""
|
2209 |
|
2210 |
-
#: admin/views/placement-injection-top.php:
|
2211 |
msgid "see all…"
|
2212 |
msgstr ""
|
2213 |
|
2214 |
-
#: admin/views/placement-injection-top.php:
|
2215 |
msgid "Existing placement"
|
2216 |
msgstr ""
|
2217 |
|
2218 |
-
#: admin/views/placement-injection-top.php:
|
2219 |
#, php-format
|
2220 |
msgid "Or use the shortcode %s to insert the ad into the content manually."
|
2221 |
msgstr ""
|
2222 |
|
2223 |
-
#: admin/views/placement-injection-top.php:
|
2224 |
#, php-format
|
2225 |
msgid ""
|
2226 |
"Learn more about your choices to display an ad in the <a href=\"%s\" "
|
2227 |
"target=\"_blank\">manual</a>."
|
2228 |
msgstr ""
|
2229 |
|
2230 |
-
#: admin/views/ad-group-list-form-row.php:
|
2231 |
#: modules/gadsense/admin/views/external-ads-list.php:45
|
2232 |
#: modules/gadsense/admin/views/external-ads-list.php:55
|
2233 |
#: modules/privacy/admin/views/setting-consent-method.php:9
|
2234 |
msgid "Name"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
-
#: admin/views/ad-group-list-form-row.php:
|
2238 |
#: modules/gadsense/admin/views/adsense-ad-parameters.php:105
|
2239 |
msgid "Type"
|
2240 |
msgstr ""
|
2241 |
|
2242 |
-
#: admin/views/ad-group-list-form-row.php:
|
2243 |
msgctxt "option to display all ads in an ad groups"
|
2244 |
msgid "all"
|
2245 |
msgstr ""
|
2246 |
|
2247 |
-
#: admin/views/ad-group-list-form-row.php:
|
2248 |
msgid "Visible ads"
|
2249 |
msgstr ""
|
2250 |
|
2251 |
-
#: admin/views/ad-group-list-form-row.php:
|
2252 |
msgid "Number of ads that are visible at the same time"
|
2253 |
msgstr ""
|
2254 |
|
2255 |
-
#: admin/views/ad-info.php:
|
2256 |
#, php-format
|
2257 |
msgid "Ad Id: %s"
|
2258 |
msgstr ""
|
2259 |
|
2260 |
-
#: admin/views/ad-info.php:
|
2261 |
-
#: admin/views/ad-group-list-row.php:
|
2262 |
msgid "shortcode"
|
2263 |
msgstr ""
|
2264 |
|
2265 |
-
#: admin/views/ad-info.php:
|
2266 |
msgid "theme function"
|
2267 |
msgstr ""
|
2268 |
|
2269 |
-
#: admin/views/ad-info.php:
|
2270 |
#, php-format
|
2271 |
msgid ""
|
2272 |
"Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
|
2273 |
msgstr ""
|
2274 |
|
2275 |
-
#: admin/views/ad-info.php:
|
2276 |
msgid "click to change"
|
2277 |
msgstr ""
|
2278 |
|
2279 |
-
#: admin/views/ad-info.php:
|
2280 |
msgid "Add a description"
|
2281 |
msgstr ""
|
2282 |
|
2283 |
-
#: admin/views/ad-info.php:
|
2284 |
msgid "Internal description or your own notes about this ad."
|
2285 |
msgstr ""
|
2286 |
|
@@ -2296,97 +2246,97 @@ msgstr ""
|
|
2296 |
msgid "Ask your question!"
|
2297 |
msgstr ""
|
2298 |
|
2299 |
-
#: admin/views/placements.php:
|
2300 |
msgid ""
|
2301 |
"Couldn’t create the new placement. Please check your form field and whether "
|
2302 |
"the name is already in use."
|
2303 |
msgstr ""
|
2304 |
|
2305 |
-
#: admin/views/placements.php:
|
2306 |
msgid "Placements updated"
|
2307 |
msgstr ""
|
2308 |
|
2309 |
-
#: admin/views/placements.php:
|
2310 |
msgid "Create a new placement"
|
2311 |
msgstr ""
|
2312 |
|
2313 |
-
#: admin/views/placements.php:
|
2314 |
msgid "New Placement"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
-
#: admin/views/placements.php:
|
2318 |
msgid ""
|
2319 |
"Placements are physically places in your theme and posts. You can use them "
|
2320 |
"if you plan to change ads and ad groups on the same place without the need "
|
2321 |
"to change your templates."
|
2322 |
msgstr ""
|
2323 |
|
2324 |
-
#: admin/views/placements.php:
|
2325 |
#, php-format
|
2326 |
msgid ""
|
2327 |
"See also the manual for more information on <a href=\"%s\">placements</a>."
|
2328 |
msgstr ""
|
2329 |
|
2330 |
-
#: admin/views/placements.php:
|
2331 |
msgid "Options"
|
2332 |
msgstr ""
|
2333 |
|
2334 |
-
#: admin/views/placements.php:
|
2335 |
#, php-format
|
2336 |
msgid ""
|
2337 |
"Placement type \"%s\" is missing and was reset to \"default\".<br/>Please "
|
2338 |
"check if the responsible add-on is activated."
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: admin/views/placements.php:
|
2342 |
-
#: admin/views/placements-ad-label-position.php:
|
2343 |
-
#: admin/views/placements-ad-label-position.php:
|
2344 |
-
#: admin/views/placements-ad-label.php:
|
2345 |
#: modules/gadsense/includes/class-network-adsense.php:239
|
2346 |
msgid "default"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: admin/views/placements.php:
|
2350 |
msgid "show usage"
|
2351 |
msgstr ""
|
2352 |
|
2353 |
-
#: admin/views/placements.php:
|
2354 |
msgid "template (PHP)"
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: admin/views/placements.php:
|
2358 |
msgid "Item"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: admin/views/placements.php:
|
2362 |
msgid "position"
|
2363 |
msgstr ""
|
2364 |
|
2365 |
-
#: admin/views/placements.php:
|
2366 |
msgid "Important Notice"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: admin/views/placements.php:
|
2370 |
msgid "ad label"
|
2371 |
msgstr ""
|
2372 |
|
2373 |
-
#: admin/views/placements.php:
|
2374 |
msgid "show all options"
|
2375 |
msgstr ""
|
2376 |
|
2377 |
-
#: admin/views/placements.php:
|
2378 |
#, php-format
|
2379 |
msgid ""
|
2380 |
"Tutorial: <a href=\"%s\" target=\"_blank\">How to place visible ads in the "
|
2381 |
"header of your website</a>."
|
2382 |
msgstr ""
|
2383 |
|
2384 |
-
#: admin/views/placements.php:
|
2385 |
msgctxt "checkbox to remove placement"
|
2386 |
msgid "delete"
|
2387 |
msgstr ""
|
2388 |
|
2389 |
-
#: admin/views/placements.php:
|
2390 |
msgid "Save Placements"
|
2391 |
msgstr ""
|
2392 |
|
@@ -2394,56 +2344,56 @@ msgstr ""
|
|
2394 |
msgid "No ad types defined"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2398 |
#: modules/privacy/admin/views/setting-consent-method.php:10
|
2399 |
msgid "contains"
|
2400 |
msgstr ""
|
2401 |
|
2402 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2403 |
msgid "starts with"
|
2404 |
msgstr ""
|
2405 |
|
2406 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2407 |
msgid "ends with"
|
2408 |
msgstr ""
|
2409 |
|
2410 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2411 |
msgid "matches"
|
2412 |
msgstr ""
|
2413 |
|
2414 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2415 |
msgid "matches regex"
|
2416 |
msgstr ""
|
2417 |
|
2418 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2419 |
msgid "does not contain"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2423 |
msgid "does not start with"
|
2424 |
msgstr ""
|
2425 |
|
2426 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2427 |
msgid "does not end with"
|
2428 |
msgstr ""
|
2429 |
|
2430 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2431 |
msgid "does not match"
|
2432 |
msgstr ""
|
2433 |
|
2434 |
-
#: admin/views/ad-conditions-string-operators.php:
|
2435 |
msgid "does not match regex"
|
2436 |
msgstr ""
|
2437 |
|
2438 |
-
#: admin/views/placements-content-index.php:
|
2439 |
msgid "after"
|
2440 |
msgstr ""
|
2441 |
|
2442 |
-
#: admin/views/placements-content-index.php:
|
2443 |
msgid "before"
|
2444 |
msgstr ""
|
2445 |
|
2446 |
-
#: admin/views/placements-content-index.php:
|
2447 |
msgid "start counting from bottom"
|
2448 |
msgstr ""
|
2449 |
|
@@ -2459,7 +2409,7 @@ msgstr ""
|
|
2459 |
msgid "height"
|
2460 |
msgstr ""
|
2461 |
|
2462 |
-
#: admin/views/ad-parameters-size.php:
|
2463 |
msgid "reserve this space"
|
2464 |
msgstr ""
|
2465 |
|
@@ -2503,37 +2453,37 @@ msgstr ""
|
|
2503 |
msgid "Update Groups"
|
2504 |
msgstr ""
|
2505 |
|
2506 |
-
#: admin/views/ad-submitbox-meta.php:
|
2507 |
msgid "Set expiry date"
|
2508 |
msgstr ""
|
2509 |
|
2510 |
-
#: admin/views/ad-submitbox-meta.php:
|
2511 |
msgid "Month"
|
2512 |
msgstr ""
|
2513 |
|
2514 |
-
#: admin/views/ad-submitbox-meta.php:
|
2515 |
#, php-format
|
2516 |
msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
|
2517 |
msgid "%1$s-%2$s"
|
2518 |
msgstr ""
|
2519 |
|
2520 |
-
#: admin/views/ad-submitbox-meta.php:
|
2521 |
msgid "Day"
|
2522 |
msgstr ""
|
2523 |
|
2524 |
-
#: admin/views/ad-submitbox-meta.php:
|
2525 |
msgid "Year"
|
2526 |
msgstr ""
|
2527 |
|
2528 |
-
#: admin/views/ad-submitbox-meta.php:
|
2529 |
msgid "Hour"
|
2530 |
msgstr ""
|
2531 |
|
2532 |
-
#: admin/views/ad-submitbox-meta.php:
|
2533 |
msgid "Minute"
|
2534 |
msgstr ""
|
2535 |
|
2536 |
-
#: admin/views/ad-submitbox-meta.php:
|
2537 |
#, php-format
|
2538 |
msgctxt ""
|
2539 |
"order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
|
@@ -2544,70 +2494,68 @@ msgstr ""
|
|
2544 |
msgid "How to disable ads on specific pages"
|
2545 |
msgstr ""
|
2546 |
|
2547 |
-
#: admin/views/post-ad-settings-metabox.php:
|
2548 |
msgid "Disable ads on this page"
|
2549 |
msgstr ""
|
2550 |
|
2551 |
-
#: admin/views/checks.php:
|
2552 |
#, php-format
|
2553 |
msgid ""
|
2554 |
"Advanced Ads detected potential problems with your ad setup. %1$sShow me "
|
2555 |
"these errors%2$s"
|
2556 |
msgstr ""
|
2557 |
|
2558 |
-
#: admin/views/ad-info-after-textarea.php:
|
2559 |
-
msgid ""
|
2560 |
-
"The code of this ad might not work properly with the <em>Content</em> "
|
2561 |
-
"placement."
|
2562 |
msgstr ""
|
2563 |
|
2564 |
-
#: admin/views/ad-info-after-textarea.php:
|
2565 |
#, php-format
|
2566 |
msgid "Reach out to <a href=\"%s\">support</a> to get help."
|
2567 |
msgstr ""
|
2568 |
|
2569 |
-
#: admin/views/placement-form.php:
|
2570 |
msgid "Choose a placement type"
|
2571 |
msgstr ""
|
2572 |
|
2573 |
-
#: admin/views/placement-form.php:
|
2574 |
#, php-format
|
2575 |
msgid ""
|
2576 |
"Placement types define where the ad is going to be displayed. Learn more "
|
2577 |
"about the different types from the <a href=\"%s\">manual</a>"
|
2578 |
msgstr ""
|
2579 |
|
2580 |
-
#: admin/views/placement-form.php:
|
2581 |
msgid "Please select a placement type."
|
2582 |
msgstr ""
|
2583 |
|
2584 |
-
#: admin/views/placement-form.php:
|
2585 |
msgid "Choose a Name"
|
2586 |
msgstr ""
|
2587 |
|
2588 |
-
#: admin/views/placement-form.php:
|
2589 |
msgid ""
|
2590 |
"The name of the placement is only visible to you. Tip: choose a descriptive "
|
2591 |
"one, e.g. <em>Below Post Headline</em>."
|
2592 |
msgstr ""
|
2593 |
|
2594 |
-
#: admin/views/placement-form.php:
|
2595 |
msgid "Placement Name"
|
2596 |
msgstr ""
|
2597 |
|
2598 |
-
#: admin/views/placement-form.php:
|
2599 |
msgid "Please enter a name for your placement."
|
2600 |
msgstr ""
|
2601 |
|
2602 |
-
#: admin/views/placement-form.php:
|
2603 |
msgid "Choose the Ad or Group"
|
2604 |
msgstr ""
|
2605 |
|
2606 |
-
#: admin/views/placement-form.php:
|
2607 |
msgid "The ad or group that should be displayed."
|
2608 |
msgstr ""
|
2609 |
|
2610 |
-
#: admin/views/placement-form.php:
|
2611 |
msgid "Save New Placement"
|
2612 |
msgstr ""
|
2613 |
|
@@ -2628,43 +2576,43 @@ msgstr ""
|
|
2628 |
msgid "Send me free help to %s"
|
2629 |
msgstr ""
|
2630 |
|
2631 |
-
#: admin/views/feedback-disable.php:
|
2632 |
msgid "Ads are not showing up"
|
2633 |
msgstr ""
|
2634 |
|
2635 |
-
#: admin/views/feedback-disable.php:
|
2636 |
msgid "It is only temporary"
|
2637 |
msgstr ""
|
2638 |
|
2639 |
-
#: admin/views/feedback-disable.php:
|
2640 |
msgid "I miss a feature"
|
2641 |
msgstr ""
|
2642 |
|
2643 |
-
#: admin/views/feedback-disable.php:
|
2644 |
msgid "Which one?"
|
2645 |
msgstr ""
|
2646 |
|
2647 |
-
#: admin/views/feedback-disable.php:
|
2648 |
msgid "I stopped using ads on my site."
|
2649 |
msgstr ""
|
2650 |
|
2651 |
-
#: admin/views/feedback-disable.php:
|
2652 |
msgid "I switched to another plugin"
|
2653 |
msgstr ""
|
2654 |
|
2655 |
-
#: admin/views/feedback-disable.php:
|
2656 |
msgid "Send feedback & deactivate"
|
2657 |
msgstr ""
|
2658 |
|
2659 |
-
#: admin/views/feedback-disable.php:
|
2660 |
msgid "Send feedback"
|
2661 |
msgstr ""
|
2662 |
|
2663 |
-
#: admin/views/feedback-disable.php:
|
2664 |
msgid "Only Deactivate"
|
2665 |
msgstr ""
|
2666 |
|
2667 |
-
#: admin/views/feedback-disable.php:
|
2668 |
msgid ""
|
2669 |
"Thanks for submitting your feedback. I will reply within 24 hours on working "
|
2670 |
"days."
|
@@ -2676,16 +2624,16 @@ msgstr ""
|
|
2676 |
msgid "All the best to you and %s."
|
2677 |
msgstr ""
|
2678 |
|
2679 |
-
#: admin/views/feedback-disable.php:
|
2680 |
msgid "Disabling the plugin now…"
|
2681 |
msgstr ""
|
2682 |
|
2683 |
-
#: admin/views/ad-info-bottom.php:
|
2684 |
msgctxt "wizard navigation"
|
2685 |
msgid "previous"
|
2686 |
msgstr ""
|
2687 |
|
2688 |
-
#: admin/views/ad-info-bottom.php:17 admin/views/ad-info-bottom.php:
|
2689 |
msgctxt "wizard navigation"
|
2690 |
msgid "next"
|
2691 |
msgstr ""
|
@@ -2695,173 +2643,154 @@ msgctxt "wizard navigation"
|
|
2695 |
msgid "save"
|
2696 |
msgstr ""
|
2697 |
|
2698 |
-
#: admin/views/ad-output-metabox.php:
|
2699 |
msgid "Everything connected to the ads layout and output."
|
2700 |
msgstr ""
|
2701 |
|
2702 |
-
#: admin/views/ad-output-metabox.php:
|
2703 |
-
#: admin/views/placements-ad-label-position.php:
|
2704 |
msgid "Position"
|
2705 |
msgstr ""
|
2706 |
|
2707 |
-
#: admin/views/ad-output-metabox.php:
|
2708 |
msgid "- default -"
|
2709 |
msgstr ""
|
2710 |
|
2711 |
-
#: admin/views/ad-output-metabox.php:
|
2712 |
-
#: admin/views/placements-ad-label-position.php:
|
2713 |
-
#: admin/views/placements-ad-label-position.php:
|
2714 |
msgid "left"
|
2715 |
msgstr ""
|
2716 |
|
2717 |
-
#: admin/views/ad-output-metabox.php:
|
2718 |
-
#: admin/views/placements-ad-label-position.php:
|
2719 |
-
#: admin/views/placements-ad-label-position.php:
|
2720 |
msgid "center"
|
2721 |
msgstr ""
|
2722 |
|
2723 |
-
#: admin/views/ad-output-metabox.php:
|
2724 |
-
#: admin/views/placements-ad-label-position.php:
|
2725 |
-
#: admin/views/placements-ad-label-position.php:
|
2726 |
msgid "right"
|
2727 |
msgstr ""
|
2728 |
|
2729 |
#: admin/views/ad-output-metabox.php:31
|
2730 |
msgid ""
|
2731 |
-
"Check this if you don
|
2732 |
"(adds a clearfix)"
|
2733 |
msgstr ""
|
2734 |
|
2735 |
-
#: admin/views/ad-output-metabox.php:
|
2736 |
msgid "Margin"
|
2737 |
msgstr ""
|
2738 |
|
2739 |
-
#: admin/views/ad-output-metabox.php:
|
2740 |
msgid "top:"
|
2741 |
msgstr ""
|
2742 |
|
2743 |
-
#: admin/views/ad-output-metabox.php:
|
2744 |
msgid "right:"
|
2745 |
msgstr ""
|
2746 |
|
2747 |
-
#: admin/views/ad-output-metabox.php:
|
2748 |
msgid "bottom:"
|
2749 |
msgstr ""
|
2750 |
|
2751 |
-
#: admin/views/ad-output-metabox.php:
|
2752 |
msgid "left:"
|
2753 |
msgstr ""
|
2754 |
|
2755 |
-
#: admin/views/ad-output-metabox.php:
|
2756 |
msgid "tip: use this to add a margin around the ad"
|
2757 |
msgstr ""
|
2758 |
|
2759 |
-
#: admin/views/ad-output-metabox.php:
|
2760 |
msgid "container ID"
|
2761 |
msgstr ""
|
2762 |
|
2763 |
-
#: admin/views/ad-output-metabox.php:
|
2764 |
msgid "Specify the id of the ad container. Leave blank for random or no id."
|
2765 |
msgstr ""
|
2766 |
|
2767 |
-
#: admin/views/ad-output-metabox.php:
|
2768 |
msgid "container classes"
|
2769 |
msgstr ""
|
2770 |
|
2771 |
-
#: admin/views/ad-output-metabox.php:
|
2772 |
msgid ""
|
2773 |
"Specify one or more classes for the container. Separate multiple classes "
|
2774 |
"with a space"
|
2775 |
msgstr ""
|
2776 |
|
2777 |
-
#: admin/views/ad-output-metabox.php:
|
2778 |
msgid "Enable debug mode"
|
2779 |
msgstr ""
|
2780 |
|
2781 |
-
#: admin/views/pitch-bundle.php:1
|
2782 |
-
msgid "All Access – with all available add-ons"
|
2783 |
-
msgstr ""
|
2784 |
-
|
2785 |
-
#: admin/views/pitch-bundle.php:12
|
2786 |
-
msgid "Risk free with 30-day Money-Back guarantee"
|
2787 |
-
msgstr ""
|
2788 |
-
|
2789 |
-
#: admin/views/pitch-bundle.php:13
|
2790 |
-
msgid "Get All Access"
|
2791 |
-
msgstr ""
|
2792 |
-
|
2793 |
-
#: admin/views/ad-group-list-row.php:22
|
2794 |
-
msgid "template"
|
2795 |
-
msgstr ""
|
2796 |
-
|
2797 |
#: admin/views/ad-group-list-row.php:25
|
2798 |
-
|
2799 |
-
msgid ""
|
2800 |
-
"Learn more about using groups in the <a href=\"%s\" target=\"_blank\">"
|
2801 |
-
"manual</a>."
|
2802 |
msgstr ""
|
2803 |
|
2804 |
-
#: admin/views/ad-group-list-row.php:
|
2805 |
#, php-format
|
2806 |
msgid "Type: %s"
|
2807 |
msgstr ""
|
2808 |
|
2809 |
-
#: admin/views/ad-group-list-row.php:
|
2810 |
#, php-format
|
2811 |
msgid "ID: %s"
|
2812 |
msgstr ""
|
2813 |
|
2814 |
-
#: admin/views/ad-group-list-header.php:
|
2815 |
msgid "Details"
|
2816 |
msgstr ""
|
2817 |
|
2818 |
-
#: admin/views/setting-license.php:
|
2819 |
msgid "Your license expired."
|
2820 |
msgstr ""
|
2821 |
|
2822 |
-
#: admin/views/setting-license.php:
|
2823 |
msgid "Update expiry date"
|
2824 |
msgstr ""
|
2825 |
|
2826 |
-
#: admin/views/setting-license.php:
|
2827 |
#, php-format
|
2828 |
msgid ""
|
2829 |
"Click on %2$s if you renewed it or have a subscription or <a href=\"%1$s\" "
|
2830 |
"class=\"advads-renewal-link\" target=\"_blank\">renew your license</a>."
|
2831 |
msgstr ""
|
2832 |
|
2833 |
-
#: admin/views/setting-license.php:
|
2834 |
#, php-format
|
2835 |
msgid "(%d days left)"
|
2836 |
msgstr ""
|
2837 |
|
2838 |
-
#: admin/views/setting-license.php:
|
2839 |
msgid "License key"
|
2840 |
msgstr ""
|
2841 |
|
2842 |
-
#: admin/views/setting-license.php:
|
2843 |
msgid "Deactivate License"
|
2844 |
msgstr ""
|
2845 |
|
2846 |
-
#: admin/views/setting-license.php:
|
2847 |
msgid "Update License"
|
2848 |
msgstr ""
|
2849 |
|
2850 |
-
#: admin/views/setting-license.php:
|
2851 |
msgid "Activate License"
|
2852 |
msgstr ""
|
2853 |
|
2854 |
-
#: admin/views/setting-license.php:
|
2855 |
msgid "License key invalid"
|
2856 |
msgstr ""
|
2857 |
|
2858 |
-
#: admin/views/setting-license.php:
|
2859 |
msgid "active"
|
2860 |
msgstr ""
|
2861 |
|
2862 |
-
#: admin/views/placements-ad-label-position.php:
|
2863 |
msgid ""
|
2864 |
-
"Check this if you don
|
2865 |
"(adds a placement_clearfix)"
|
2866 |
msgstr ""
|
2867 |
|
@@ -2869,14 +2798,15 @@ msgstr ""
|
|
2869 |
msgid "Watch the “First Ad” Tutorial (Video)"
|
2870 |
msgstr ""
|
2871 |
|
2872 |
-
#: admin/views/placements-ad-label.php:
|
|
|
2873 |
#: modules/ads-txt/admin/views/setting-create.php:2
|
2874 |
#: modules/ads-txt/admin/views/setting-create.php:4
|
2875 |
msgid "enabled"
|
2876 |
msgstr ""
|
2877 |
|
2878 |
-
#: admin/views/placements-ad-label.php:
|
2879 |
-
#: admin/views/placements-ad-label.php:
|
2880 |
#: modules/ads-txt/admin/views/setting-create.php:6
|
2881 |
#: modules/ads-txt/admin/views/setting-create.php:8
|
2882 |
msgid "disabled"
|
@@ -3093,6 +3023,58 @@ msgid ""
|
|
3093 |
"websites."
|
3094 |
msgstr ""
|
3095 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3096 |
#: modules/gadsense/includes/class-mapi.php:338
|
3097 |
#, php-format
|
3098 |
msgid "Error while retrieving ad code for \"%s\"."
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Advanved Ads\n"
|
5 |
"Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
|
6 |
+
"POT-Creation-Date: 2020-03-25 12:18+0000\n"
|
7 |
"POT-Revision-Date: Wed Jul 13 2016 13:23:05 GMT+0200 (CEST)\n"
|
8 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
9 |
"Last-Translator: Thomas Maier <post@webzunft.de>\n"
|
187 |
msgid "Injected in Footer (before closing </body> Tag)."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: classes/ad_placements.php:67 admin/views/placement-injection-top.php:81
|
191 |
msgid "Before Content"
|
192 |
msgstr ""
|
193 |
|
195 |
msgid "Injected before the post content."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: classes/ad_placements.php:78 admin/views/placement-injection-top.php:83
|
199 |
msgid "After Content"
|
200 |
msgstr ""
|
201 |
|
203 |
msgid "Injected after the post content."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: classes/ad_placements.php:89 admin/views/placement-injection-top.php:82
|
207 |
msgid "Content"
|
208 |
msgstr ""
|
209 |
|
458 |
msgid "Closing the message"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: classes/ad_type_group.php:30 admin/views/ad-group-list-header.php:14
|
462 |
msgid "Ad Group"
|
463 |
msgstr ""
|
464 |
|
763 |
msgstr ""
|
764 |
|
765 |
#: classes/ad-debug.php:118 classes/ad-debug.php:167 classes/ad-debug.php:169
|
766 |
+
#: public/class-advanced-ads.php:721 admin/views/ad-group-list-ads.php:20
|
767 |
msgid "Ad"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: classes/ad-debug.php:121 public/class-advanced-ads.php:685
|
771 |
msgctxt "ad group singular name"
|
772 |
msgid "Ad Group"
|
773 |
msgstr ""
|
798 |
msgstr ""
|
799 |
|
800 |
#: classes/widget.php:78 admin/includes/class-menu.php:131
|
801 |
+
#: admin/includes/class-shortcode-creator.php:115 admin/views/placements.php:53
|
802 |
#: modules/gutenberg/includes/class-gutenberg.php:81
|
803 |
#: modules/import-export/views/page.php:25
|
804 |
msgid "Placements"
|
805 |
msgstr ""
|
806 |
|
807 |
#: classes/widget.php:85 admin/includes/class-shortcode-creator.php:108
|
808 |
+
#: admin/views/placements-item.php:12 admin/views/placement-form.php:71
|
809 |
#: modules/gutenberg/includes/class-gutenberg.php:80
|
810 |
msgid "Ad Groups"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: classes/widget.php:92 public/class-advanced-ads.php:720
|
814 |
#: admin/includes/class-menu.php:79 admin/includes/class-menu.php:80
|
815 |
#: admin/includes/class-shortcode-creator.php:101
|
816 |
+
#: admin/views/placements-item.php:24 admin/views/ad-group-list-form-row.php:91
|
817 |
+
#: admin/views/placement-form.php:78 admin/views/ad-group-list-header.php:16
|
818 |
#: modules/gutenberg/includes/class-gutenberg.php:79
|
819 |
#: modules/import-export/views/page.php:23
|
820 |
msgid "Ads"
|
895 |
msgid "Hide inactive ads"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: admin/class-advanced-ads-admin.php:343
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
#, php-format
|
900 |
msgid "time of %s"
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: admin/class-advanced-ads-admin.php:414 admin/includes/class-menu.php:155
|
904 |
+
#: admin/includes/class-menu.php:158 admin/views/settings.php:29
|
905 |
msgid "Support"
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: admin/class-advanced-ads-admin.php:418
|
909 |
#: admin/includes/class-overview-widgets.php:71
|
910 |
msgid "Add-Ons"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: admin/class-advanced-ads-admin.php:689
|
914 |
#: admin/includes/class-overview-widgets.php:194
|
915 |
#, php-format
|
916 |
msgid ""
|
927 |
msgid "Advanced Ads Error: %s"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: public/class-advanced-ads.php:684
|
931 |
msgctxt "ad group general name"
|
932 |
msgid "Ad Groups & Rotations"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: public/class-advanced-ads.php:686
|
936 |
msgid "Search Ad Groups"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: public/class-advanced-ads.php:687
|
940 |
msgid "All Ad Groups"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: public/class-advanced-ads.php:688
|
944 |
msgid "Parent Ad Groups"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: public/class-advanced-ads.php:689
|
948 |
msgid "Parent Ad Groups:"
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: public/class-advanced-ads.php:690
|
952 |
msgid "Edit Ad Group"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: public/class-advanced-ads.php:691
|
956 |
msgid "Update Ad Group"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: public/class-advanced-ads.php:692
|
960 |
msgid "Add New Ad Group"
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: public/class-advanced-ads.php:693
|
964 |
msgid "New Ad Groups Name"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: public/class-advanced-ads.php:694 modules/import-export/views/page.php:24
|
968 |
msgid "Groups"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: public/class-advanced-ads.php:695
|
972 |
msgid "No Ad Group found"
|
973 |
msgstr ""
|
974 |
|
975 |
+
#: public/class-advanced-ads.php:722 public/class-advanced-ads.php:726
|
976 |
+
#: admin/includes/class-menu.php:112 admin/views/ad-group-list-ads.php:36
|
977 |
msgid "New Ad"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: public/class-advanced-ads.php:723 admin/includes/class-menu.php:111
|
981 |
msgid "Add New Ad"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: public/class-advanced-ads.php:724
|
985 |
#: admin/includes/class-ad-groups-list.php:339
|
986 |
#: modules/import-export/classes/import.php:146
|
987 |
#: modules/import-export/classes/import.php:186
|
989 |
msgid "Edit"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: public/class-advanced-ads.php:725
|
993 |
msgid "Edit Ad"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: public/class-advanced-ads.php:727
|
997 |
msgid "View"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: public/class-advanced-ads.php:728
|
1001 |
msgid "View the Ad"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: public/class-advanced-ads.php:729
|
1005 |
msgid "Search Ads"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: public/class-advanced-ads.php:730
|
1009 |
msgid "No Ads found"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: public/class-advanced-ads.php:731
|
1013 |
msgid "No Ads found in Trash"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: public/class-advanced-ads.php:732
|
1017 |
msgid "Parent Ad"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: public/class-advanced-ads.php:871
|
1021 |
msgctxt "label above ads"
|
1022 |
msgid "Advertisements"
|
1023 |
msgstr ""
|
1037 |
"<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: admin/includes/ad-health-notices.php:54 admin/views/placements.php:174
|
1041 |
#, php-format
|
1042 |
msgid ""
|
1043 |
"Missing PHP extensions could cause issues. Please ask your hosting provider "
|
1051 |
"href=\"%s\">settings</a>."
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: admin/includes/ad-health-notices.php:72 admin/views/support.php:57
|
1055 |
msgid "Advanced Ads related constants enabled"
|
1056 |
msgstr ""
|
1057 |
|
1350 |
msgid "Ad Stats"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
+
#: admin/includes/class-meta-box.php:199 admin/includes/class-meta-box.php:218
|
1354 |
+
#: admin/includes/class-meta-box.php:223
|
1355 |
#: admin/includes/class-overview-widgets.php:182
|
1356 |
+
#: admin/views/ad-output-metabox.php:62
|
1357 |
#: admin/views/settings/general/custom-label.php:9
|
1358 |
#: modules/privacy/admin/views/setting-enable.php:2
|
1359 |
#: modules/ads-txt/admin/views/setting-create.php:11
|
1360 |
msgid "Manual"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: admin/includes/class-meta-box.php:217
|
1364 |
msgid "Video"
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: admin/includes/class-meta-box.php:254
|
1368 |
#: admin/includes/class-overview-widgets.php:60
|
1369 |
msgid "Disable"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: admin/includes/class-meta-box.php:401
|
1373 |
msgid "Ad Settings"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
+
#: admin/includes/class-meta-box.php:500 admin/views/overview.php:8
|
1377 |
msgid "Ads Dashboard"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
#. %1$d is the number of ads, %2$s and %3$s are URLs.
|
1381 |
+
#: admin/includes/class-meta-box.php:516
|
1382 |
#, php-format
|
1383 |
msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: admin/includes/class-meta-box.php:529
|
1387 |
msgid "Get the tutorial via email"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: admin/includes/class-meta-box.php:538
|
1391 |
msgid "Get AdSense tips via email"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: admin/includes/class-meta-box.php:547
|
1395 |
msgid "Visit our blog for more articles about ad optimization"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
#. %s is our URL
|
1399 |
+
#: admin/includes/class-meta-box.php:601
|
1400 |
msgid "Latest posts on wpadvancedads.com"
|
1401 |
msgstr ""
|
1402 |
|
1412 |
msgid "Error while trying to register the license. Please contact support."
|
1413 |
msgstr ""
|
1414 |
|
1415 |
+
#: admin/includes/class-licenses.php:115 admin/views/setting-license.php:85
|
1416 |
msgid "Please enter a valid license key"
|
1417 |
msgstr ""
|
1418 |
|
1537 |
msgid "Licenses"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: admin/includes/class-menu.php:281 admin/includes/class-menu.php:306
|
1541 |
msgid "Sorry, you are not allowed to access this feature."
|
1542 |
msgstr ""
|
1543 |
|
1544 |
+
#: admin/includes/class-menu.php:293
|
1545 |
msgid ""
|
1546 |
"You attempted to edit an ad group that doesn’t exist. Perhaps it was "
|
1547 |
"deleted?"
|
1615 |
msgid "Pro"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
+
#: admin/includes/class-settings.php:309 admin/views/pitches/tracking.php:2
|
1619 |
msgid "Tracking"
|
1620 |
msgstr ""
|
1621 |
|
1633 |
msgstr ""
|
1634 |
|
1635 |
#: admin/includes/class-ad-groups-list.php:184
|
1636 |
+
#: admin/views/ad-list-timing-column.php:21
|
1637 |
#, php-format
|
1638 |
msgid "starts %s"
|
1639 |
msgstr ""
|
1640 |
|
1641 |
#: admin/includes/class-ad-groups-list.php:205
|
1642 |
+
#: admin/views/ad-list-timing-column.php:59
|
1643 |
#, php-format
|
1644 |
msgid "expires %s"
|
1645 |
msgstr ""
|
1646 |
|
1647 |
#: admin/includes/class-ad-groups-list.php:208
|
1648 |
+
#: admin/views/ad-list-timing-column.php:69
|
1649 |
#, php-format
|
1650 |
msgid "<strong>expired</strong> %s"
|
1651 |
msgstr ""
|
1784 |
|
1785 |
#. %s includes a number and markup like <span class="count">6</span>.
|
1786 |
#: admin/includes/class-overview-widgets.php:218
|
1787 |
+
#: admin/views/overview-notices.php:33
|
1788 |
#, php-format
|
1789 |
msgid "Show %s hidden notices"
|
1790 |
msgstr ""
|
1798 |
msgstr ""
|
1799 |
|
1800 |
#: admin/includes/class-overview-widgets.php:471
|
1801 |
+
#: admin/views/pitches/pro-tab.php:7
|
1802 |
msgid "support for cached sites"
|
1803 |
msgstr ""
|
1804 |
|
1815 |
msgstr ""
|
1816 |
|
1817 |
#: admin/includes/class-overview-widgets.php:529
|
1818 |
+
#: admin/views/pitches/pro-tab.php:8
|
1819 |
msgid "11 more display and visitor conditions"
|
1820 |
msgstr ""
|
1821 |
|
1822 |
#: admin/includes/class-overview-widgets.php:530
|
1823 |
+
#: admin/views/pitches/pro-tab.php:9
|
1824 |
msgid "6 more placements"
|
1825 |
msgstr ""
|
1826 |
|
1827 |
#: admin/includes/class-overview-widgets.php:531
|
1828 |
+
#: admin/views/pitches/pro-tab.php:10
|
1829 |
msgid "placement tests for ad optimization"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
#: admin/includes/class-overview-widgets.php:532
|
1833 |
+
#: admin/views/pitches/pro-tab.php:11
|
1834 |
msgid "ad grids and many more advanced features"
|
1835 |
msgstr ""
|
1836 |
|
1930 |
msgid "Get this add-on"
|
1931 |
msgstr ""
|
1932 |
|
1933 |
+
#: admin/views/gadsense-dashboard.php:34
|
1934 |
msgid "There is an error in your AdSense setup."
|
1935 |
msgstr ""
|
1936 |
|
1950 |
msgid "all ad groups"
|
1951 |
msgstr ""
|
1952 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1953 |
#: admin/views/support.php:6
|
1954 |
msgid ""
|
1955 |
"Please fix the red highlighted issues on this page or try to understand "
|
1986 |
msgid "search"
|
1987 |
msgstr ""
|
1988 |
|
1989 |
+
#: admin/views/support.php:25
|
1990 |
#, php-format
|
1991 |
msgid ""
|
1992 |
"Take a look at more common issues or contact us directly through the <a "
|
1993 |
"href=\"%s\" target=\"_blank\">support page</a>."
|
1994 |
msgstr ""
|
1995 |
|
1996 |
+
#: admin/views/support.php:43
|
1997 |
#, php-format
|
1998 |
msgid ""
|
1999 |
"Upgrade to any premium add-on and get <strong>priority email support</strong>"
|
2001 |
"for individual help."
|
2002 |
msgstr ""
|
2003 |
|
2004 |
+
#: admin/views/settings.php:14
|
2005 |
msgid "General"
|
2006 |
msgstr ""
|
2007 |
|
2008 |
+
#: admin/views/settings.php:43
|
2009 |
msgid "Save settings on this page"
|
2010 |
msgstr ""
|
2011 |
|
2012 |
+
#: admin/views/settings.php:50 modules/import-export/main.php:17
|
2013 |
+
#: modules/import-export/main.php:17
|
2014 |
msgid "Import & Export"
|
2015 |
msgstr ""
|
2016 |
|
2017 |
+
#: admin/views/placements-item.php:10 admin/views/placement-form.php:69
|
2018 |
msgid "--not selected--"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
+
#: admin/views/ad-group-list-ads.php:22
|
2022 |
msgid "weight"
|
2023 |
msgstr ""
|
2024 |
|
2025 |
+
#: admin/views/ad-group-list-ads.php:45
|
2026 |
#: admin/views/conditions/conditions-form.php:37
|
2027 |
msgid "add"
|
2028 |
msgstr ""
|
2029 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2030 |
#: admin/views/ad-info-top.php:2
|
2031 |
msgid "Start Wizard"
|
2032 |
msgstr ""
|
2035 |
msgid "Stop Wizard"
|
2036 |
msgstr ""
|
2037 |
|
2038 |
+
#: admin/views/ad-info-top.php:27 admin/views/ad-info-bottom.php:21
|
2039 |
msgid "Stop Wizard and show all options"
|
2040 |
msgstr ""
|
2041 |
|
2042 |
+
#: admin/views/ad-group-edit.php:20
|
2043 |
msgid "You did not select an item for editing."
|
2044 |
msgstr ""
|
2045 |
|
2046 |
+
#: admin/views/ad-group-edit.php:41
|
2047 |
msgctxt "Taxonomy Name"
|
2048 |
msgid "Name"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: admin/views/ad-group-edit.php:51
|
2052 |
msgctxt "Taxonomy Slug"
|
2053 |
msgid "Slug"
|
2054 |
msgstr ""
|
2055 |
|
2056 |
+
#: admin/views/ad-group-edit.php:58 admin/views/ad-output-metabox.php:49
|
2057 |
msgid ""
|
2058 |
"An id-like string with only letters in lower case, numbers, and hyphens."
|
2059 |
msgstr ""
|
2060 |
|
2061 |
+
#: admin/views/ad-group-edit.php:65
|
2062 |
msgctxt "Taxonomy Description"
|
2063 |
msgid "Description"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
+
#: admin/views/ad-group-edit.php:77
|
2067 |
msgid "Create new Ad Group"
|
2068 |
msgstr ""
|
2069 |
|
2070 |
+
#: admin/views/ad-group-edit.php:79
|
2071 |
msgid "Update"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
+
#: admin/views/placement-injection-top.php:15
|
2075 |
msgid "Congratulations! Your ad is now visible in the frontend."
|
2076 |
msgstr ""
|
2077 |
|
2078 |
+
#: admin/views/placement-injection-top.php:16
|
2079 |
msgid "Adjust the placement options"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: admin/views/placement-injection-top.php:23
|
2083 |
#, php-format
|
2084 |
msgid ""
|
2085 |
"Ad not showing up? Take a look <a href=\"%s\" target=\"_blank\">here</a>"
|
2086 |
msgstr ""
|
2087 |
|
2088 |
+
#: admin/views/placement-injection-top.php:37
|
2089 |
msgid "Where do you want to display the ad?"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
+
#: admin/views/placement-injection-top.php:48
|
2093 |
#: modules/gadsense/admin/admin.php:178
|
2094 |
#, php-format
|
2095 |
msgid ""
|
2097 |
"href=\"%s\">AdSense settings</a>."
|
2098 |
msgstr ""
|
2099 |
|
2100 |
+
#: admin/views/placement-injection-top.php:60
|
2101 |
#: modules/gadsense/admin/admin.php:180
|
2102 |
msgid ""
|
2103 |
"No need to add the code manually here, unless you want to include it into "
|
2104 |
"certain pages only."
|
2105 |
msgstr ""
|
2106 |
|
2107 |
+
#: admin/views/placement-injection-top.php:63
|
2108 |
msgid ""
|
2109 |
"Click on the button below to add the Auto ads code to the header of your "
|
2110 |
"site."
|
2112 |
|
2113 |
#. this is a label in a button when a user uses an AdSense Auto ads code in a plain code field
|
2114 |
#. the button has barely space for the original English text, so keep it short
|
2115 |
+
#: admin/views/placement-injection-top.php:74
|
2116 |
msgid "inject Auto ads"
|
2117 |
msgstr ""
|
2118 |
|
2119 |
+
#: admin/views/placement-injection-top.php:80
|
2120 |
msgid "New placement"
|
2121 |
msgstr ""
|
2122 |
|
2123 |
+
#: admin/views/placement-injection-top.php:84
|
2124 |
msgid "PHP or Shortcode"
|
2125 |
msgstr ""
|
2126 |
|
2127 |
+
#: admin/views/placement-injection-top.php:85
|
2128 |
msgid "Manage Sidebar"
|
2129 |
msgstr ""
|
2130 |
|
2131 |
+
#: admin/views/placement-injection-top.php:86
|
2132 |
msgid "Header (Manual)"
|
2133 |
msgstr ""
|
2134 |
|
2135 |
+
#: admin/views/placement-injection-top.php:90
|
2136 |
+
#: admin/views/placement-injection-top.php:94
|
2137 |
msgid "Custom Position"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
+
#: admin/views/placement-injection-top.php:90
|
2141 |
msgid "Show Pro Places"
|
2142 |
msgstr ""
|
2143 |
|
2144 |
+
#: admin/views/placement-injection-top.php:99
|
2145 |
msgid "AdSense In-feed"
|
2146 |
msgstr ""
|
2147 |
|
2148 |
+
#: admin/views/placement-injection-top.php:105
|
2149 |
msgid "Show Sticky Places"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
+
#: admin/views/placement-injection-top.php:111
|
2153 |
msgid "Show PopUp"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
+
#: admin/views/placement-injection-top.php:115
|
2157 |
msgid "PopUp & Layer"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
+
#: admin/views/placement-injection-top.php:120
|
2161 |
msgid "see all…"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: admin/views/placement-injection-top.php:157
|
2165 |
msgid "Existing placement"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: admin/views/placement-injection-top.php:170
|
2169 |
#, php-format
|
2170 |
msgid "Or use the shortcode %s to insert the ad into the content manually."
|
2171 |
msgstr ""
|
2172 |
|
2173 |
+
#: admin/views/placement-injection-top.php:178
|
2174 |
#, php-format
|
2175 |
msgid ""
|
2176 |
"Learn more about your choices to display an ad in the <a href=\"%s\" "
|
2177 |
"target=\"_blank\">manual</a>."
|
2178 |
msgstr ""
|
2179 |
|
2180 |
+
#: admin/views/ad-group-list-form-row.php:31 admin/views/placements.php:59
|
2181 |
#: modules/gadsense/admin/views/external-ads-list.php:45
|
2182 |
#: modules/gadsense/admin/views/external-ads-list.php:55
|
2183 |
#: modules/privacy/admin/views/setting-consent-method.php:9
|
2184 |
msgid "Name"
|
2185 |
msgstr ""
|
2186 |
|
2187 |
+
#: admin/views/ad-group-list-form-row.php:56 admin/views/placements.php:58
|
2188 |
#: modules/gadsense/admin/views/adsense-ad-parameters.php:105
|
2189 |
msgid "Type"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
+
#: admin/views/ad-group-list-form-row.php:72
|
2193 |
msgctxt "option to display all ads in an ad groups"
|
2194 |
msgid "all"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
+
#: admin/views/ad-group-list-form-row.php:79
|
2198 |
msgid "Visible ads"
|
2199 |
msgstr ""
|
2200 |
|
2201 |
+
#: admin/views/ad-group-list-form-row.php:81
|
2202 |
msgid "Number of ads that are visible at the same time"
|
2203 |
msgstr ""
|
2204 |
|
2205 |
+
#: admin/views/ad-info.php:4
|
2206 |
#, php-format
|
2207 |
msgid "Ad Id: %s"
|
2208 |
msgstr ""
|
2209 |
|
2210 |
+
#: admin/views/ad-info.php:7 admin/views/placements.php:132
|
2211 |
+
#: admin/views/ad-group-list-row.php:22
|
2212 |
msgid "shortcode"
|
2213 |
msgstr ""
|
2214 |
|
2215 |
+
#: admin/views/ad-info.php:9
|
2216 |
msgid "theme function"
|
2217 |
msgstr ""
|
2218 |
|
2219 |
+
#: admin/views/ad-info.php:16
|
2220 |
#, php-format
|
2221 |
msgid ""
|
2222 |
"Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
|
2223 |
msgstr ""
|
2224 |
|
2225 |
+
#: admin/views/ad-info.php:31
|
2226 |
msgid "click to change"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: admin/views/ad-info.php:38
|
2230 |
msgid "Add a description"
|
2231 |
msgstr ""
|
2232 |
|
2233 |
+
#: admin/views/ad-info.php:42
|
2234 |
msgid "Internal description or your own notes about this ad."
|
2235 |
msgstr ""
|
2236 |
|
2246 |
msgid "Ask your question!"
|
2247 |
msgstr ""
|
2248 |
|
2249 |
+
#: admin/views/placements.php:12
|
2250 |
msgid ""
|
2251 |
"Couldn’t create the new placement. Please check your form field and whether "
|
2252 |
"the name is already in use."
|
2253 |
msgstr ""
|
2254 |
|
2255 |
+
#: admin/views/placements.php:16
|
2256 |
msgid "Placements updated"
|
2257 |
msgstr ""
|
2258 |
|
2259 |
+
#: admin/views/placements.php:22 admin/views/placements.php:260
|
2260 |
msgid "Create a new placement"
|
2261 |
msgstr ""
|
2262 |
|
2263 |
+
#: admin/views/placements.php:23 admin/views/placements.php:262
|
2264 |
msgid "New Placement"
|
2265 |
msgstr ""
|
2266 |
|
2267 |
+
#: admin/views/placements.php:28
|
2268 |
msgid ""
|
2269 |
"Placements are physically places in your theme and posts. You can use them "
|
2270 |
"if you plan to change ads and ad groups on the same place without the need "
|
2271 |
"to change your templates."
|
2272 |
msgstr ""
|
2273 |
|
2274 |
+
#: admin/views/placements.php:34
|
2275 |
#, php-format
|
2276 |
msgid ""
|
2277 |
"See also the manual for more information on <a href=\"%s\">placements</a>."
|
2278 |
msgstr ""
|
2279 |
|
2280 |
+
#: admin/views/placements.php:60 modules/import-export/views/page.php:26
|
2281 |
msgid "Options"
|
2282 |
msgstr ""
|
2283 |
|
2284 |
+
#: admin/views/placements.php:87
|
2285 |
#, php-format
|
2286 |
msgid ""
|
2287 |
"Placement type \"%s\" is missing and was reset to \"default\".<br/>Please "
|
2288 |
"check if the responsible add-on is activated."
|
2289 |
msgstr ""
|
2290 |
|
2291 |
+
#: admin/views/placements.php:114 admin/views/ad-output-metabox.php:18
|
2292 |
+
#: admin/views/placements-ad-label-position.php:11
|
2293 |
+
#: admin/views/placements-ad-label-position.php:13
|
2294 |
+
#: admin/views/placements-ad-label.php:9 admin/views/placements-ad-label.php:11
|
2295 |
#: modules/gadsense/includes/class-network-adsense.php:239
|
2296 |
msgid "default"
|
2297 |
msgstr ""
|
2298 |
|
2299 |
+
#: admin/views/placements.php:123
|
2300 |
msgid "show usage"
|
2301 |
msgstr ""
|
2302 |
|
2303 |
+
#: admin/views/placements.php:135
|
2304 |
msgid "template (PHP)"
|
2305 |
msgstr ""
|
2306 |
|
2307 |
+
#: admin/views/placements.php:150
|
2308 |
msgid "Item"
|
2309 |
msgstr ""
|
2310 |
|
2311 |
+
#: admin/views/placements.php:164
|
2312 |
msgid "position"
|
2313 |
msgstr ""
|
2314 |
|
2315 |
+
#: admin/views/placements.php:170
|
2316 |
msgid "Important Notice"
|
2317 |
msgstr ""
|
2318 |
|
2319 |
+
#: admin/views/placements.php:200
|
2320 |
msgid "ad label"
|
2321 |
msgstr ""
|
2322 |
|
2323 |
+
#: admin/views/placements.php:210
|
2324 |
msgid "show all options"
|
2325 |
msgstr ""
|
2326 |
|
2327 |
+
#: admin/views/placements.php:231
|
2328 |
#, php-format
|
2329 |
msgid ""
|
2330 |
"Tutorial: <a href=\"%s\" target=\"_blank\">How to place visible ads in the "
|
2331 |
"header of your website</a>."
|
2332 |
msgstr ""
|
2333 |
|
2334 |
+
#: admin/views/placements.php:251
|
2335 |
msgctxt "checkbox to remove placement"
|
2336 |
msgid "delete"
|
2337 |
msgstr ""
|
2338 |
|
2339 |
+
#: admin/views/placements.php:258
|
2340 |
msgid "Save Placements"
|
2341 |
msgstr ""
|
2342 |
|
2344 |
msgid "No ad types defined"
|
2345 |
msgstr ""
|
2346 |
|
2347 |
+
#: admin/views/ad-conditions-string-operators.php:15
|
2348 |
#: modules/privacy/admin/views/setting-consent-method.php:10
|
2349 |
msgid "contains"
|
2350 |
msgstr ""
|
2351 |
|
2352 |
+
#: admin/views/ad-conditions-string-operators.php:16
|
2353 |
msgid "starts with"
|
2354 |
msgstr ""
|
2355 |
|
2356 |
+
#: admin/views/ad-conditions-string-operators.php:17
|
2357 |
msgid "ends with"
|
2358 |
msgstr ""
|
2359 |
|
2360 |
+
#: admin/views/ad-conditions-string-operators.php:18
|
2361 |
msgid "matches"
|
2362 |
msgstr ""
|
2363 |
|
2364 |
+
#: admin/views/ad-conditions-string-operators.php:19
|
2365 |
msgid "matches regex"
|
2366 |
msgstr ""
|
2367 |
|
2368 |
+
#: admin/views/ad-conditions-string-operators.php:20
|
2369 |
msgid "does not contain"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
+
#: admin/views/ad-conditions-string-operators.php:21
|
2373 |
msgid "does not start with"
|
2374 |
msgstr ""
|
2375 |
|
2376 |
+
#: admin/views/ad-conditions-string-operators.php:22
|
2377 |
msgid "does not end with"
|
2378 |
msgstr ""
|
2379 |
|
2380 |
+
#: admin/views/ad-conditions-string-operators.php:23
|
2381 |
msgid "does not match"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: admin/views/ad-conditions-string-operators.php:24
|
2385 |
msgid "does not match regex"
|
2386 |
msgstr ""
|
2387 |
|
2388 |
+
#: admin/views/placements-content-index.php:9
|
2389 |
msgid "after"
|
2390 |
msgstr ""
|
2391 |
|
2392 |
+
#: admin/views/placements-content-index.php:10
|
2393 |
msgid "before"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
+
#: admin/views/placements-content-index.php:48
|
2397 |
msgid "start counting from bottom"
|
2398 |
msgstr ""
|
2399 |
|
2409 |
msgid "height"
|
2410 |
msgstr ""
|
2411 |
|
2412 |
+
#: admin/views/ad-parameters-size.php:22
|
2413 |
msgid "reserve this space"
|
2414 |
msgstr ""
|
2415 |
|
2453 |
msgid "Update Groups"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
+
#: admin/views/ad-submitbox-meta.php:10
|
2457 |
msgid "Set expiry date"
|
2458 |
msgstr ""
|
2459 |
|
2460 |
+
#: admin/views/ad-submitbox-meta.php:15
|
2461 |
msgid "Month"
|
2462 |
msgstr ""
|
2463 |
|
2464 |
+
#: admin/views/ad-submitbox-meta.php:21
|
2465 |
#, php-format
|
2466 |
msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
|
2467 |
msgid "%1$s-%2$s"
|
2468 |
msgstr ""
|
2469 |
|
2470 |
+
#: admin/views/ad-submitbox-meta.php:28
|
2471 |
msgid "Day"
|
2472 |
msgstr ""
|
2473 |
|
2474 |
+
#: admin/views/ad-submitbox-meta.php:29
|
2475 |
msgid "Year"
|
2476 |
msgstr ""
|
2477 |
|
2478 |
+
#: admin/views/ad-submitbox-meta.php:30
|
2479 |
msgid "Hour"
|
2480 |
msgstr ""
|
2481 |
|
2482 |
+
#: admin/views/ad-submitbox-meta.php:31
|
2483 |
msgid "Minute"
|
2484 |
msgstr ""
|
2485 |
|
2486 |
+
#: admin/views/ad-submitbox-meta.php:40
|
2487 |
#, php-format
|
2488 |
msgctxt ""
|
2489 |
"order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
|
2494 |
msgid "How to disable ads on specific pages"
|
2495 |
msgstr ""
|
2496 |
|
2497 |
+
#: admin/views/post-ad-settings-metabox.php:7
|
2498 |
msgid "Disable ads on this page"
|
2499 |
msgstr ""
|
2500 |
|
2501 |
+
#: admin/views/checks.php:16
|
2502 |
#, php-format
|
2503 |
msgid ""
|
2504 |
"Advanced Ads detected potential problems with your ad setup. %1$sShow me "
|
2505 |
"these errors%2$s"
|
2506 |
msgstr ""
|
2507 |
|
2508 |
+
#: admin/views/ad-info-after-textarea.php:17
|
2509 |
+
msgid "The code of this ad might not work properly with the Content placement."
|
|
|
|
|
2510 |
msgstr ""
|
2511 |
|
2512 |
+
#: admin/views/ad-info-after-textarea.php:24
|
2513 |
#, php-format
|
2514 |
msgid "Reach out to <a href=\"%s\">support</a> to get help."
|
2515 |
msgstr ""
|
2516 |
|
2517 |
+
#: admin/views/placement-form.php:15
|
2518 |
msgid "Choose a placement type"
|
2519 |
msgstr ""
|
2520 |
|
2521 |
+
#: admin/views/placement-form.php:21
|
2522 |
#, php-format
|
2523 |
msgid ""
|
2524 |
"Placement types define where the ad is going to be displayed. Learn more "
|
2525 |
"about the different types from the <a href=\"%s\">manual</a>"
|
2526 |
msgstr ""
|
2527 |
|
2528 |
+
#: admin/views/placement-form.php:59
|
2529 |
msgid "Please select a placement type."
|
2530 |
msgstr ""
|
2531 |
|
2532 |
+
#: admin/views/placement-form.php:61
|
2533 |
msgid "Choose a Name"
|
2534 |
msgstr ""
|
2535 |
|
2536 |
+
#: admin/views/placement-form.php:62
|
2537 |
msgid ""
|
2538 |
"The name of the placement is only visible to you. Tip: choose a descriptive "
|
2539 |
"one, e.g. <em>Below Post Headline</em>."
|
2540 |
msgstr ""
|
2541 |
|
2542 |
+
#: admin/views/placement-form.php:64
|
2543 |
msgid "Placement Name"
|
2544 |
msgstr ""
|
2545 |
|
2546 |
+
#: admin/views/placement-form.php:65
|
2547 |
msgid "Please enter a name for your placement."
|
2548 |
msgstr ""
|
2549 |
|
2550 |
+
#: admin/views/placement-form.php:66
|
2551 |
msgid "Choose the Ad or Group"
|
2552 |
msgstr ""
|
2553 |
|
2554 |
+
#: admin/views/placement-form.php:67
|
2555 |
msgid "The ad or group that should be displayed."
|
2556 |
msgstr ""
|
2557 |
|
2558 |
+
#: admin/views/placement-form.php:86
|
2559 |
msgid "Save New Placement"
|
2560 |
msgstr ""
|
2561 |
|
2576 |
msgid "Send me free help to %s"
|
2577 |
msgstr ""
|
2578 |
|
2579 |
+
#: admin/views/feedback-disable.php:21
|
2580 |
msgid "Ads are not showing up"
|
2581 |
msgstr ""
|
2582 |
|
2583 |
+
#: admin/views/feedback-disable.php:22
|
2584 |
msgid "It is only temporary"
|
2585 |
msgstr ""
|
2586 |
|
2587 |
+
#: admin/views/feedback-disable.php:23
|
2588 |
msgid "I miss a feature"
|
2589 |
msgstr ""
|
2590 |
|
2591 |
+
#: admin/views/feedback-disable.php:24
|
2592 |
msgid "Which one?"
|
2593 |
msgstr ""
|
2594 |
|
2595 |
+
#: admin/views/feedback-disable.php:25
|
2596 |
msgid "I stopped using ads on my site."
|
2597 |
msgstr ""
|
2598 |
|
2599 |
+
#: admin/views/feedback-disable.php:26
|
2600 |
msgid "I switched to another plugin"
|
2601 |
msgstr ""
|
2602 |
|
2603 |
+
#: admin/views/feedback-disable.php:31
|
2604 |
msgid "Send feedback & deactivate"
|
2605 |
msgstr ""
|
2606 |
|
2607 |
+
#: admin/views/feedback-disable.php:32
|
2608 |
msgid "Send feedback"
|
2609 |
msgstr ""
|
2610 |
|
2611 |
+
#: admin/views/feedback-disable.php:34
|
2612 |
msgid "Only Deactivate"
|
2613 |
msgstr ""
|
2614 |
|
2615 |
+
#: admin/views/feedback-disable.php:37
|
2616 |
msgid ""
|
2617 |
"Thanks for submitting your feedback. I will reply within 24 hours on working "
|
2618 |
"days."
|
2624 |
msgid "All the best to you and %s."
|
2625 |
msgstr ""
|
2626 |
|
2627 |
+
#: admin/views/feedback-disable.php:44
|
2628 |
msgid "Disabling the plugin now…"
|
2629 |
msgstr ""
|
2630 |
|
2631 |
+
#: admin/views/ad-info-bottom.php:13
|
2632 |
msgctxt "wizard navigation"
|
2633 |
msgid "previous"
|
2634 |
msgstr ""
|
2635 |
|
2636 |
+
#: admin/views/ad-info-bottom.php:17 admin/views/ad-info-bottom.php:20
|
2637 |
msgctxt "wizard navigation"
|
2638 |
msgid "next"
|
2639 |
msgstr ""
|
2643 |
msgid "save"
|
2644 |
msgstr ""
|
2645 |
|
2646 |
+
#: admin/views/ad-output-metabox.php:12
|
2647 |
msgid "Everything connected to the ads layout and output."
|
2648 |
msgstr ""
|
2649 |
|
2650 |
+
#: admin/views/ad-output-metabox.php:14
|
2651 |
+
#: admin/views/placements-ad-label-position.php:10
|
2652 |
msgid "Position"
|
2653 |
msgstr ""
|
2654 |
|
2655 |
+
#: admin/views/ad-output-metabox.php:16
|
2656 |
msgid "- default -"
|
2657 |
msgstr ""
|
2658 |
|
2659 |
+
#: admin/views/ad-output-metabox.php:19
|
2660 |
+
#: admin/views/placements-ad-label-position.php:15
|
2661 |
+
#: admin/views/placements-ad-label-position.php:17
|
2662 |
msgid "left"
|
2663 |
msgstr ""
|
2664 |
|
2665 |
+
#: admin/views/ad-output-metabox.php:22
|
2666 |
+
#: admin/views/placements-ad-label-position.php:18
|
2667 |
+
#: admin/views/placements-ad-label-position.php:20
|
2668 |
msgid "center"
|
2669 |
msgstr ""
|
2670 |
|
2671 |
+
#: admin/views/ad-output-metabox.php:25
|
2672 |
+
#: admin/views/placements-ad-label-position.php:21
|
2673 |
+
#: admin/views/placements-ad-label-position.php:23
|
2674 |
msgid "right"
|
2675 |
msgstr ""
|
2676 |
|
2677 |
#: admin/views/ad-output-metabox.php:31
|
2678 |
msgid ""
|
2679 |
+
"Check this if you don’t want the following elements to float around the ad. "
|
2680 |
"(adds a clearfix)"
|
2681 |
msgstr ""
|
2682 |
|
2683 |
+
#: admin/views/ad-output-metabox.php:36
|
2684 |
msgid "Margin"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
+
#: admin/views/ad-output-metabox.php:38
|
2688 |
msgid "top:"
|
2689 |
msgstr ""
|
2690 |
|
2691 |
+
#: admin/views/ad-output-metabox.php:39
|
2692 |
msgid "right:"
|
2693 |
msgstr ""
|
2694 |
|
2695 |
+
#: admin/views/ad-output-metabox.php:40
|
2696 |
msgid "bottom:"
|
2697 |
msgstr ""
|
2698 |
|
2699 |
+
#: admin/views/ad-output-metabox.php:41
|
2700 |
msgid "left:"
|
2701 |
msgstr ""
|
2702 |
|
2703 |
+
#: admin/views/ad-output-metabox.php:42
|
2704 |
msgid "tip: use this to add a margin around the ad"
|
2705 |
msgstr ""
|
2706 |
|
2707 |
+
#: admin/views/ad-output-metabox.php:45
|
2708 |
msgid "container ID"
|
2709 |
msgstr ""
|
2710 |
|
2711 |
+
#: admin/views/ad-output-metabox.php:48
|
2712 |
msgid "Specify the id of the ad container. Leave blank for random or no id."
|
2713 |
msgstr ""
|
2714 |
|
2715 |
+
#: admin/views/ad-output-metabox.php:52
|
2716 |
msgid "container classes"
|
2717 |
msgstr ""
|
2718 |
|
2719 |
+
#: admin/views/ad-output-metabox.php:55
|
2720 |
msgid ""
|
2721 |
"Specify one or more classes for the container. Separate multiple classes "
|
2722 |
"with a space"
|
2723 |
msgstr ""
|
2724 |
|
2725 |
+
#: admin/views/ad-output-metabox.php:58
|
2726 |
msgid "Enable debug mode"
|
2727 |
msgstr ""
|
2728 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2729 |
#: admin/views/ad-group-list-row.php:25
|
2730 |
+
msgid "template"
|
|
|
|
|
|
|
2731 |
msgstr ""
|
2732 |
|
2733 |
+
#: admin/views/ad-group-list-row.php:37
|
2734 |
#, php-format
|
2735 |
msgid "Type: %s"
|
2736 |
msgstr ""
|
2737 |
|
2738 |
+
#: admin/views/ad-group-list-row.php:45
|
2739 |
#, php-format
|
2740 |
msgid "ID: %s"
|
2741 |
msgstr ""
|
2742 |
|
2743 |
+
#: admin/views/ad-group-list-header.php:15
|
2744 |
msgid "Details"
|
2745 |
msgstr ""
|
2746 |
|
2747 |
+
#: admin/views/setting-license.php:15
|
2748 |
msgid "Your license expired."
|
2749 |
msgstr ""
|
2750 |
|
2751 |
+
#: admin/views/setting-license.php:23
|
2752 |
msgid "Update expiry date"
|
2753 |
msgstr ""
|
2754 |
|
2755 |
+
#: admin/views/setting-license.php:32
|
2756 |
#, php-format
|
2757 |
msgid ""
|
2758 |
"Click on %2$s if you renewed it or have a subscription or <a href=\"%1$s\" "
|
2759 |
"class=\"advads-renewal-link\" target=\"_blank\">renew your license</a>."
|
2760 |
msgstr ""
|
2761 |
|
2762 |
+
#: admin/views/setting-license.php:50
|
2763 |
#, php-format
|
2764 |
msgid "(%d days left)"
|
2765 |
msgstr ""
|
2766 |
|
2767 |
+
#: admin/views/setting-license.php:56
|
2768 |
msgid "License key"
|
2769 |
msgstr ""
|
2770 |
|
2771 |
+
#: admin/views/setting-license.php:73
|
2772 |
msgid "Deactivate License"
|
2773 |
msgstr ""
|
2774 |
|
2775 |
+
#: admin/views/setting-license.php:82
|
2776 |
msgid "Update License"
|
2777 |
msgstr ""
|
2778 |
|
2779 |
+
#: admin/views/setting-license.php:82
|
2780 |
msgid "Activate License"
|
2781 |
msgstr ""
|
2782 |
|
2783 |
+
#: admin/views/setting-license.php:87
|
2784 |
msgid "License key invalid"
|
2785 |
msgstr ""
|
2786 |
|
2787 |
+
#: admin/views/setting-license.php:91
|
2788 |
msgid "active"
|
2789 |
msgstr ""
|
2790 |
|
2791 |
+
#: admin/views/placements-ad-label-position.php:27
|
2792 |
msgid ""
|
2793 |
+
"Check this if you don’t want the following elements to float around the ad. "
|
2794 |
"(adds a placement_clearfix)"
|
2795 |
msgstr ""
|
2796 |
|
2798 |
msgid "Watch the “First Ad” Tutorial (Video)"
|
2799 |
msgstr ""
|
2800 |
|
2801 |
+
#: admin/views/placements-ad-label.php:13
|
2802 |
+
#: admin/views/placements-ad-label.php:15
|
2803 |
#: modules/ads-txt/admin/views/setting-create.php:2
|
2804 |
#: modules/ads-txt/admin/views/setting-create.php:4
|
2805 |
msgid "enabled"
|
2806 |
msgstr ""
|
2807 |
|
2808 |
+
#: admin/views/placements-ad-label.php:17
|
2809 |
+
#: admin/views/placements-ad-label.php:19
|
2810 |
#: modules/ads-txt/admin/views/setting-create.php:6
|
2811 |
#: modules/ads-txt/admin/views/setting-create.php:8
|
2812 |
msgid "disabled"
|
3023 |
"websites."
|
3024 |
msgstr ""
|
3025 |
|
3026 |
+
#: admin/views/pitches/pro-tab.php:2
|
3027 |
+
msgid "Advanced Ads Pro – test and optimize your ad performance"
|
3028 |
+
msgstr ""
|
3029 |
+
|
3030 |
+
#: admin/views/pitches/pro-tab.php:4
|
3031 |
+
msgid "Ads for Ad Blockers"
|
3032 |
+
msgstr ""
|
3033 |
+
|
3034 |
+
#: admin/views/pitches/pro-tab.php:5
|
3035 |
+
msgid "Click Fraud Protection"
|
3036 |
+
msgstr ""
|
3037 |
+
|
3038 |
+
#: admin/views/pitches/pro-tab.php:6
|
3039 |
+
msgid "Lazy Loading"
|
3040 |
+
msgstr ""
|
3041 |
+
|
3042 |
+
#: admin/views/pitches/pro-tab.php:13 admin/views/pitches/tracking.php:10
|
3043 |
+
msgid "See all features and pricing"
|
3044 |
+
msgstr ""
|
3045 |
+
|
3046 |
+
#: admin/views/pitches/all-access.php:1
|
3047 |
+
msgid "All Access – with all available add-ons"
|
3048 |
+
msgstr ""
|
3049 |
+
|
3050 |
+
#: admin/views/pitches/all-access.php:12
|
3051 |
+
msgid "Risk free with 30-day Money-Back guarantee"
|
3052 |
+
msgstr ""
|
3053 |
+
|
3054 |
+
#: admin/views/pitches/all-access.php:13
|
3055 |
+
msgid "Get All Access"
|
3056 |
+
msgstr ""
|
3057 |
+
|
3058 |
+
#: admin/views/pitches/tracking.php:4
|
3059 |
+
msgid "track impressions and click on your ads"
|
3060 |
+
msgstr ""
|
3061 |
+
|
3062 |
+
#: admin/views/pitches/tracking.php:5
|
3063 |
+
msgid "compare ads and periods"
|
3064 |
+
msgstr ""
|
3065 |
+
|
3066 |
+
#: admin/views/pitches/tracking.php:6
|
3067 |
+
msgid "share reports via link or email"
|
3068 |
+
msgstr ""
|
3069 |
+
|
3070 |
+
#: admin/views/pitches/tracking.php:7
|
3071 |
+
msgid "limit ads views by overall number of impressions or clicks"
|
3072 |
+
msgstr ""
|
3073 |
+
|
3074 |
+
#: admin/views/pitches/tracking.php:8
|
3075 |
+
msgid "spread impressions or clicks equally over a given period"
|
3076 |
+
msgstr ""
|
3077 |
+
|
3078 |
#: modules/gadsense/includes/class-mapi.php:338
|
3079 |
#, php-format
|
3080 |
msgid "Error while retrieving ad code for \"%s\"."
|
modules/import-export/main.php
CHANGED
@@ -3,16 +3,18 @@
|
|
3 |
class_exists( 'Advanced_Ads', false ) || exit();
|
4 |
|
5 |
if ( is_admin() ) {
|
6 |
-
add_action( 'advanced-ads-submenu-pages', 'advads_add_import_export_submenu' );
|
7 |
Advanced_Ads_Export::get_instance();
|
8 |
|
9 |
/**
|
10 |
* Add import & export page
|
11 |
*
|
|
|
|
|
12 |
*/
|
13 |
-
function advads_add_import_export_submenu( $plugin_slug ) {
|
14 |
add_submenu_page(
|
15 |
-
|
16 |
);
|
17 |
}
|
18 |
|
3 |
class_exists( 'Advanced_Ads', false ) || exit();
|
4 |
|
5 |
if ( is_admin() ) {
|
6 |
+
add_action( 'advanced-ads-submenu-pages', 'advads_add_import_export_submenu', 10, 2 );
|
7 |
Advanced_Ads_Export::get_instance();
|
8 |
|
9 |
/**
|
10 |
* Add import & export page
|
11 |
*
|
12 |
+
* @param string $plugin_slug The slug slug used to add a visible page.
|
13 |
+
* @param string $hidden_page_slug The slug slug used to add a hidden page.
|
14 |
*/
|
15 |
+
function advads_add_import_export_submenu( $plugin_slug, $hidden_page_slug = null ) {
|
16 |
add_submenu_page(
|
17 |
+
$hidden_page_slug, __( 'Import & Export', 'advanced-ads' ), __( 'Import & Export', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options' ), $plugin_slug . '-import-export', 'advads_display_import_export_page'
|
18 |
);
|
19 |
}
|
20 |
|
readme.txt
CHANGED
@@ -4,11 +4,11 @@ Tags: ads, ad manager, ad rotation, adsense, banner
|
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 1.17.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Manage and optimize
|
12 |
|
13 |
== Description ==
|
14 |
|
@@ -304,6 +304,13 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
|
|
304 |
|
305 |
== Changelog ==
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
= 1.17.5 =
|
308 |
|
309 |
* fixed ads being injected multiple times when using the Newspaper theme or multiple the_content filters
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 1.17.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Manage and optimize all ad types. Support for Google AdSense Auto ads, Amazon, image banners, HTML, page builder, ad widget, ad rotations, ads.txt
|
12 |
|
13 |
== Description ==
|
14 |
|
304 |
|
305 |
== Changelog ==
|
306 |
|
307 |
+
= 1.17.6 =
|
308 |
+
|
309 |
+
* improved coding style in backend templates
|
310 |
+
* prepared for option to allow minimum number of words between ads in Advanced Ads Pro
|
311 |
+
* hide notice that warns if the "Disable ads in REST API" option was selected
|
312 |
+
* Renad theme: fixed a bug that caused menu item to point to incorrect url instead of theme options
|
313 |
+
|
314 |
= 1.17.5 =
|
315 |
|
316 |
* fixed ads being injected multiple times when using the Newspaper theme or multiple the_content filters
|