Version Description
(7th March 2022) = * Improvements: Added The Publisher Desk Support #5213 * Fixed: Displaying a blank white screen when embed URLs are used #5193
1.0.77.37.1 (4TH March 2022) * Improvements: Added new infinite scrolling experience #4791 * Fixed: The links in embed URLs are not clickable #5193
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.77.38 |
Comparing to | |
See all releases |
Code changes from version 1.0.77.37.1 to 1.0.77.38
- README.md +6 -2
- accelerated-moblie-pages.php +2 -3
- changelog.txt +5 -1
- includes/admin-script.js +2 -2
- includes/deactivate-feedback.php +8 -8
- includes/features/advertisement/adpushup-ads-functions.php +0 -258
- includes/features/advertisement/ads-options.php +9 -219
- includes/features/functions.php +27 -27
- includes/features/performance/performance-functions.php +0 -3
- includes/make-better-admin.css +2 -2
- includes/make-better-admin.js +4 -1
- includes/options/admin-config.php +8 -0
- includes/options/redux-core/assets/css/redux-admin.css +3 -3
- readme.txt +6 -2
- templates/features.php +50 -1
- uninstall.php +1 -1
README.md
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.9.1
|
7 |
-
Stable tag: 1.0.77.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -197,7 +197,11 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
200 |
-
= 1.0.77.
|
|
|
|
|
|
|
|
|
201 |
* Improvements: Added new infinite scrolling experience #4791
|
202 |
* Fixed: The links in embed URLs are not clickable #5193
|
203 |
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.9.1
|
7 |
+
Stable tag: 1.0.77.38
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
197 |
|
198 |
== Changelog ==
|
199 |
|
200 |
+
= 1.0.77.38 (7th March 2022) =
|
201 |
+
* Improvements: Added The Publisher Desk Support #5213
|
202 |
+
* Fixed: Displaying a blank white screen when embed URLs are used #5193
|
203 |
+
|
204 |
+
1.0.77.37.1 (4TH March 2022)
|
205 |
* Improvements: Added new infinite scrolling experience #4791
|
206 |
* Fixed: The links in embed URLs are not clickable #5193
|
207 |
|
accelerated-moblie-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 1.0.77.
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
-
define('AMPFORWP_VERSION','1.0.77.
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
@@ -634,7 +634,6 @@ if ( ! class_exists( 'Ampforwp_Init', false ) ) {
|
|
634 |
//Other Features
|
635 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/ads-functions.php";
|
636 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/mgid-ads-functions.php";
|
637 |
-
require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/adpushup-ads-functions.php";
|
638 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/performance/performance-functions.php";
|
639 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/analytics/analytics-functions.php";
|
640 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
+
Version: 1.0.77.38
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
+
define('AMPFORWP_VERSION','1.0.77.38');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
634 |
//Other Features
|
635 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/ads-functions.php";
|
636 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/advertisement/mgid-ads-functions.php";
|
|
|
637 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/performance/performance-functions.php";
|
638 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/analytics/analytics-functions.php";
|
639 |
require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-data-functions.php";
|
changelog.txt
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
== Changelog ==
|
2 |
|
3 |
-
= 1.0.77.
|
|
|
|
|
|
|
|
|
4 |
* Improvements: Added new infinite scrolling experience #4791
|
5 |
* Fixed: The links in embed URLs are not clickable #5193
|
6 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.77.38 (7th March 2022) =
|
4 |
+
* Improvements: Added The Publisher Desk Support #5213
|
5 |
+
* Fixed: Displaying a blank white screen when embed URLs are used #5193
|
6 |
+
|
7 |
+
1.0.77.37.1 (4TH March 2022)
|
8 |
* Improvements: Added new infinite scrolling experience #4791
|
9 |
* Fixed: The links in embed URLs are not clickable #5193
|
10 |
|
includes/admin-script.js
CHANGED
@@ -2760,9 +2760,9 @@ $("#subscribe-newsletter-form").on('submit',function(e){
|
|
2760 |
$(".ampforwp_remove_notice").remove();
|
2761 |
});
|
2762 |
});
|
2763 |
-
|
2764 |
var data = {
|
2765 |
-
action: '
|
2766 |
};
|
2767 |
$.post(ajaxurl, data, function(response) {
|
2768 |
$(".ampforwp_remove_notice").remove();
|
2760 |
$(".ampforwp_remove_notice").remove();
|
2761 |
});
|
2762 |
});
|
2763 |
+
$("#ampforwp-close-ad-notice").on("click", function(){
|
2764 |
var data = {
|
2765 |
+
action: 'ampforwp_tpd_remove_notice',
|
2766 |
};
|
2767 |
$.post(ajaxurl, data, function(response) {
|
2768 |
$(".ampforwp_remove_notice").remove();
|
includes/deactivate-feedback.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
$reasons = array(
|
3 |
1 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="temporary"/>' . esc_html__('It is only temporary', 'accelerated-mobile-pages') . '</label></li>',
|
4 |
-
2 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="stopped
|
5 |
-
3 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="missing
|
6 |
-
<li><input type="text" name="ampforwp_disable_text[]" value="" placeholder="Please describe the feature"/></li>',
|
7 |
-
4 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="technical
|
8 |
-
<li><textarea name="ampforwp_disable_text[]" placeholder="' . esc_html__('Can we help? Please describe your problem', 'accelerated-mobile-pages') . '"></textarea></li>',
|
9 |
-
5 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="
|
10 |
-
<li><input type="text" name="ampforwp_disable_text[]" value="" placeholder="Name of the plugin"/></li>',
|
11 |
6 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="other"/>' . esc_html__('Other reason', 'accelerated-mobile-pages') . '</label></li>
|
12 |
-
<li><textarea name="ampforwp_disable_text[]" placeholder="' . esc_html__('Please specify, if possible', 'accelerated-mobile-pages') . '"></textarea></li>',
|
13 |
);
|
14 |
shuffle($reasons);
|
15 |
?>
|
1 |
<?php
|
2 |
$reasons = array(
|
3 |
1 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="temporary"/>' . esc_html__('It is only temporary', 'accelerated-mobile-pages') . '</label></li>',
|
4 |
+
2 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="stopped"/>' . esc_html__('I stopped using AMP on my site', 'accelerated-mobile-pages') . '</label></li>',
|
5 |
+
3 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="missing"/>' . esc_html__('I miss a feature', 'accelerated-mobile-pages') . '</label></li>
|
6 |
+
<li><input type="text" class="mb-box missing" name="ampforwp_disable_text[]" value="" placeholder="Please describe the feature"/></li>',
|
7 |
+
4 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="technical"/>' . esc_html__('Technical Issue', 'accelerated-mobile-pages') . '</label></li>
|
8 |
+
<li><textarea class="mb-box technical" name="ampforwp_disable_text[]" placeholder="' . esc_html__('How Can we help? Please describe your problem', 'accelerated-mobile-pages') . '"></textarea></li>',
|
9 |
+
5 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="another"/>' . esc_html__('I switched to another plugin', 'accelerated-mobile-pages') . '</label></li>
|
10 |
+
<li><input type="text" class="mb-box another" name="ampforwp_disable_text[]" value="" placeholder="Name of the plugin"/></li>',
|
11 |
6 => '<li><label><input type="radio" name="ampforwp_disable_reason" value="other"/>' . esc_html__('Other reason', 'accelerated-mobile-pages') . '</label></li>
|
12 |
+
<li><textarea class="mb-box other" name="ampforwp_disable_text[]" placeholder="' . esc_html__('Please specify, if possible', 'accelerated-mobile-pages') . '"></textarea></li>',
|
13 |
);
|
14 |
shuffle($reasons);
|
15 |
?>
|
includes/features/advertisement/adpushup-ads-functions.php
DELETED
@@ -1,258 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit;
|
4 |
-
}
|
5 |
-
|
6 |
-
add_filter('ampforwp_modify_ad_1','ampforwp_adpushup_ad_1');
|
7 |
-
add_filter('ampforwp_modify_ad_2','ampforwp_adpushup_ad_2',10,1);
|
8 |
-
add_filter('ampforwp_modify_ad_3','ampforwp_adpushup_ad_3',10,1);
|
9 |
-
add_filter('ampforwp_modify_ad_4','ampforwp_adpushup_ad_4',10,1);
|
10 |
-
add_filter('ampforwp_modify_ad_5','ampforwp_adpushup_ad_5',10,1);
|
11 |
-
add_filter('ampforwp_modify_ad_6','ampforwp_adpushup_ad_6',10,1);
|
12 |
-
|
13 |
-
function ampforwp_adpushup_ad_1($output){
|
14 |
-
if( ampforwp_get_setting('enable-amp-ads-1') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-1') ) {
|
15 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
16 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-1');
|
17 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-1') == 1) {
|
18 |
-
$width = '300';
|
19 |
-
$height = '250';
|
20 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 2) {
|
21 |
-
$width = '336';
|
22 |
-
$height = '280';
|
23 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 3) {
|
24 |
-
$width = '728';
|
25 |
-
$height = '90';
|
26 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 4) {
|
27 |
-
$width = '300';
|
28 |
-
$height = '600';
|
29 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 5) {
|
30 |
-
$width = '320';
|
31 |
-
$height = '100';
|
32 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 6) {
|
33 |
-
$width = '200';
|
34 |
-
$height = '50';
|
35 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-1') == 7) {
|
36 |
-
$width = '320';
|
37 |
-
$height = '50';
|
38 |
-
}
|
39 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
40 |
-
$output = '<div class="amp-ad-wrapper amp_ad_1">
|
41 |
-
<amp-ad class="amp-ad-1"
|
42 |
-
width="'.esc_attr( $width ).'"
|
43 |
-
height="'.esc_attr( $height ).'"
|
44 |
-
type="adpushup"
|
45 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
46 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
47 |
-
</amp-ad>
|
48 |
-
'.ampforwp_ads_sponsorship().'
|
49 |
-
</div>';
|
50 |
-
}
|
51 |
-
}
|
52 |
-
return $output;
|
53 |
-
}
|
54 |
-
function ampforwp_adpushup_ad_2($output){
|
55 |
-
if( ampforwp_get_setting('enable-amp-ads-2') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-2') ) {
|
56 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
57 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-2');
|
58 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-2') == 1) {
|
59 |
-
$width = '300';
|
60 |
-
$height = '250';
|
61 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 2) {
|
62 |
-
$width = '336';
|
63 |
-
$height = '280';
|
64 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 3) {
|
65 |
-
$width = '728';
|
66 |
-
$height = '90';
|
67 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 4) {
|
68 |
-
$width = '300';
|
69 |
-
$height = '600';
|
70 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 5) {
|
71 |
-
$width = '320';
|
72 |
-
$height = '100';
|
73 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 6) {
|
74 |
-
$width = '200';
|
75 |
-
$height = '50';
|
76 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-2') == 7) {
|
77 |
-
$width = '320';
|
78 |
-
$height = '50';
|
79 |
-
}
|
80 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
81 |
-
$output = '<div class="amp-ad-wrapper amp_ad_2">
|
82 |
-
<amp-ad class="amp-ad-2"
|
83 |
-
width="'.esc_attr( $width ).'"
|
84 |
-
height="'.esc_attr( $height ).'"
|
85 |
-
type="adpushup"
|
86 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
87 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
88 |
-
</amp-ad>
|
89 |
-
'.ampforwp_ads_sponsorship().'
|
90 |
-
</div>';
|
91 |
-
}
|
92 |
-
}
|
93 |
-
return $output;
|
94 |
-
}
|
95 |
-
function ampforwp_adpushup_ad_3($output){
|
96 |
-
if( ampforwp_get_setting('enable-amp-ads-3') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-3') ) {
|
97 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
98 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-3');
|
99 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-3') == 1) {
|
100 |
-
$width = '300';
|
101 |
-
$height = '250';
|
102 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 2) {
|
103 |
-
$width = '336';
|
104 |
-
$height = '280';
|
105 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 3) {
|
106 |
-
$width = '728';
|
107 |
-
$height = '90';
|
108 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 4) {
|
109 |
-
$width = '300';
|
110 |
-
$height = '600';
|
111 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 5) {
|
112 |
-
$width = '320';
|
113 |
-
$height = '100';
|
114 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 6) {
|
115 |
-
$width = '200';
|
116 |
-
$height = '50';
|
117 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-3') == 7) {
|
118 |
-
$width = '320';
|
119 |
-
$height = '50';
|
120 |
-
}
|
121 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
122 |
-
$output = '<div class="amp-ad-wrapper amp_ad_3">
|
123 |
-
<amp-ad class="amp-ad-3"
|
124 |
-
width="'.esc_attr( $width ).'"
|
125 |
-
height="'.esc_attr( $height ).'"
|
126 |
-
type="adpushup"
|
127 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
128 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
129 |
-
</amp-ad>
|
130 |
-
'.ampforwp_ads_sponsorship().'
|
131 |
-
</div>';
|
132 |
-
}
|
133 |
-
}
|
134 |
-
return $output;
|
135 |
-
}
|
136 |
-
function ampforwp_adpushup_ad_4($output){
|
137 |
-
if( ampforwp_get_setting('enable-amp-ads-4') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-4') ) {
|
138 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
139 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-4');
|
140 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-4') == 1) {
|
141 |
-
$width = '300';
|
142 |
-
$height = '250';
|
143 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 2) {
|
144 |
-
$width = '336';
|
145 |
-
$height = '280';
|
146 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 3) {
|
147 |
-
$width = '728';
|
148 |
-
$height = '90';
|
149 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 4) {
|
150 |
-
$width = '300';
|
151 |
-
$height = '600';
|
152 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 5) {
|
153 |
-
$width = '320';
|
154 |
-
$height = '100';
|
155 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 6) {
|
156 |
-
$width = '200';
|
157 |
-
$height = '50';
|
158 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-4') == 7) {
|
159 |
-
$width = '320';
|
160 |
-
$height = '50';
|
161 |
-
}
|
162 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
163 |
-
$output = '<div class="amp-ad-wrapper amp_ad_4">
|
164 |
-
<amp-ad class="amp-ad-4"
|
165 |
-
width="'.esc_attr( $width ).'"
|
166 |
-
height="'.esc_attr( $height ).'"
|
167 |
-
type="adpushup"
|
168 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
169 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
170 |
-
</amp-ad>
|
171 |
-
'.ampforwp_ads_sponsorship().'
|
172 |
-
</div>';
|
173 |
-
}
|
174 |
-
}
|
175 |
-
return $output;
|
176 |
-
}
|
177 |
-
function ampforwp_adpushup_ad_5($output){
|
178 |
-
if( ampforwp_get_setting('enable-amp-ads-5') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-5') ) {
|
179 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
180 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-5');
|
181 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-5') == 1) {
|
182 |
-
$width = '300';
|
183 |
-
$height = '250';
|
184 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 2) {
|
185 |
-
$width = '336';
|
186 |
-
$height = '280';
|
187 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 3) {
|
188 |
-
$width = '728';
|
189 |
-
$height = '90';
|
190 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 4) {
|
191 |
-
$width = '300';
|
192 |
-
$height = '600';
|
193 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 5) {
|
194 |
-
$width = '320';
|
195 |
-
$height = '100';
|
196 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 6) {
|
197 |
-
$width = '200';
|
198 |
-
$height = '50';
|
199 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-5') == 7) {
|
200 |
-
$width = '320';
|
201 |
-
$height = '50';
|
202 |
-
}
|
203 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
204 |
-
$output = '<div class="amp-ad-wrapper amp_ad_5">
|
205 |
-
<amp-ad class="amp-ad-5"
|
206 |
-
width="'.esc_attr( $width ).'"
|
207 |
-
height="'.esc_attr( $height ).'"
|
208 |
-
type="adpushup"
|
209 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
210 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
211 |
-
</amp-ad>
|
212 |
-
'.ampforwp_ads_sponsorship().'
|
213 |
-
</div>';
|
214 |
-
}
|
215 |
-
}
|
216 |
-
return $output;
|
217 |
-
}
|
218 |
-
function ampforwp_adpushup_ad_6($output){
|
219 |
-
if( ampforwp_get_setting('enable-amp-ads-6') && 'adpushup' == ampforwp_get_setting('enable-amp-ads-type-6') ) {
|
220 |
-
$site_id = ampforwp_get_setting('ampforwp-adpushup-site-id');
|
221 |
-
$slotpath = ampforwp_get_setting('ampforwp-adpushup-slotpath-6');
|
222 |
-
if(ampforwp_get_setting('ampforwp-adpushup-select-6') == 1) {
|
223 |
-
$width = '300';
|
224 |
-
$height = '250';
|
225 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 2) {
|
226 |
-
$width = '336';
|
227 |
-
$height = '280';
|
228 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 3) {
|
229 |
-
$width = '728';
|
230 |
-
$height = '90';
|
231 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 4) {
|
232 |
-
$width = '300';
|
233 |
-
$height = '600';
|
234 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 5) {
|
235 |
-
$width = '320';
|
236 |
-
$height = '100';
|
237 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 6) {
|
238 |
-
$width = '200';
|
239 |
-
$height = '50';
|
240 |
-
} elseif (ampforwp_get_setting('ampforwp-adpushup-select-6') == 7) {
|
241 |
-
$width = '320';
|
242 |
-
$height = '50';
|
243 |
-
}
|
244 |
-
if (!empty($site_id) && !empty($slotpath)) {
|
245 |
-
$output = '<div class="amp-ad-wrapper amp_ad_6">
|
246 |
-
<amp-ad class="amp-ad-6"
|
247 |
-
width="'.esc_attr( $width ).'"
|
248 |
-
height="'.esc_attr( $height ).'"
|
249 |
-
type="adpushup"
|
250 |
-
data-siteid="'.esc_attr( $site_id ).'"
|
251 |
-
data-slotpath="'.esc_attr( $slotpath ).'" >
|
252 |
-
</amp-ad>
|
253 |
-
'.ampforwp_ads_sponsorship().'
|
254 |
-
</div>';
|
255 |
-
}
|
256 |
-
}
|
257 |
-
return $output;
|
258 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/features/advertisement/ads-options.php
CHANGED
@@ -98,30 +98,30 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
98 |
$fields[] = array(
|
99 |
'id' => 'amp-ads_0',
|
100 |
'type' => 'section',
|
101 |
-
'title' => esc_html__('Optimize Your Revenue
|
102 |
'indent' => true,
|
103 |
'layout_type' => 'accordion',
|
104 |
'accordion-open'=> 1,
|
105 |
);
|
106 |
|
107 |
$fields[] = array(
|
108 |
-
'id' =>'ampforwp-ads-
|
109 |
'type' => 'switch',
|
110 |
'title' => esc_html__('Ad Revenue Optimization', 'accelerated-mobile-pages'),
|
111 |
'desc' => sprintf('%s <a href="%s" target="_blank">%s</a>',
|
112 |
-
esc_html__('
|
113 |
'default' => 0,
|
114 |
);
|
115 |
$fields[] = array(
|
116 |
'class' => 'child_opt',
|
117 |
-
'id' =>'ampforwp-
|
118 |
'type' => 'text',
|
119 |
-
'required' => array('ampforwp-ads-
|
120 |
-
'title' => esc_html__('
|
121 |
'desc' => sprintf('%s <a href="%s" target="_blank">%s</a>',
|
122 |
-
esc_html__('
|
123 |
'default' => '',
|
124 |
-
'placeholder'=> '
|
125 |
);
|
126 |
|
127 |
$fields[] = array(
|
@@ -151,7 +151,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
151 |
// Must provide key => value pairs for select options
|
152 |
'options' => array(
|
153 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
154 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
155 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
156 |
),
|
157 |
'default' => 'adsense',
|
@@ -213,40 +212,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
213 |
array('enable-amp-ads-type-1', '=' , 'adsense'),
|
214 |
),
|
215 |
);
|
216 |
-
// AdPushup fields
|
217 |
-
$fields[] = array(
|
218 |
-
'class' => 'child_opt child_opt_arrow',
|
219 |
-
'id' => 'ampforwp-adpushup-select-1',
|
220 |
-
'type' => 'select',
|
221 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
222 |
-
'required' => array(
|
223 |
-
array('enable-amp-ads-1', '=' , '1'),
|
224 |
-
array('enable-amp-ads-type-1', '=' , 'adpushup'),
|
225 |
-
),
|
226 |
-
// Must provide key => value pairs for select options
|
227 |
-
'options' => array(
|
228 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
229 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
230 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
231 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
232 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
233 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
234 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
235 |
-
'default' => '1',
|
236 |
-
);
|
237 |
-
|
238 |
-
$fields[] = array(
|
239 |
-
'class' => 'child_opt',
|
240 |
-
'id' =>'ampforwp-adpushup-slotpath-1',
|
241 |
-
'type' => 'text',
|
242 |
-
'required' => array(
|
243 |
-
array('enable-amp-ads-1', '=' , '1'),
|
244 |
-
array('enable-amp-ads-type-1', '=' , 'adpushup'),
|
245 |
-
),
|
246 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
247 |
-
'default' => '',
|
248 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
249 |
-
);
|
250 |
// MGID fields
|
251 |
$fields[] = array(
|
252 |
'class' => 'child_opt',
|
@@ -346,7 +311,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
346 |
// Must provide key => value pairs for select options
|
347 |
'options' => array(
|
348 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
349 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
350 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
351 |
),
|
352 |
'default' => 'adsense',
|
@@ -409,40 +373,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
409 |
array('enable-amp-ads-type-2', '=' , 'adsense'),
|
410 |
),
|
411 |
);
|
412 |
-
// AdPushup fields
|
413 |
-
$fields[] = array(
|
414 |
-
'class' => 'child_opt child_opt_arrow',
|
415 |
-
'id' => 'ampforwp-adpushup-select-2',
|
416 |
-
'type' => 'select',
|
417 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
418 |
-
'required' => array(
|
419 |
-
array('enable-amp-ads-2', '=' , '1'),
|
420 |
-
array('enable-amp-ads-type-2', '=' , 'adpushup'),
|
421 |
-
),
|
422 |
-
// Must provide key => value pairs for select options
|
423 |
-
'options' => array(
|
424 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
425 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
426 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
427 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
428 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
429 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
430 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
431 |
-
'default' => '1',
|
432 |
-
);
|
433 |
-
|
434 |
-
$fields[] = array(
|
435 |
-
'class' => 'child_opt',
|
436 |
-
'id' =>'ampforwp-adpushup-slotpath-2',
|
437 |
-
'type' => 'text',
|
438 |
-
'required' => array(
|
439 |
-
array('enable-amp-ads-2', '=' , '1'),
|
440 |
-
array('enable-amp-ads-type-2', '=' , 'adpushup'),
|
441 |
-
),
|
442 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
443 |
-
'default' => '',
|
444 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
445 |
-
);
|
446 |
// MGID fields
|
447 |
$fields[] = array(
|
448 |
'class' => 'child_opt',
|
@@ -542,7 +472,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
542 |
// Must provide key => value pairs for select options
|
543 |
'options' => array(
|
544 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
545 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
546 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
547 |
),
|
548 |
'default' => 'adsense',
|
@@ -621,40 +550,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
621 |
array('enable-amp-ads-type-3', '=' , 'adsense'),
|
622 |
),
|
623 |
);
|
624 |
-
// AdPushup fields
|
625 |
-
$fields[] = array(
|
626 |
-
'class' => 'child_opt child_opt_arrow',
|
627 |
-
'id' => 'ampforwp-adpushup-select-3',
|
628 |
-
'type' => 'select',
|
629 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
630 |
-
'required' => array(
|
631 |
-
array('enable-amp-ads-3', '=' , '1'),
|
632 |
-
array('enable-amp-ads-type-3', '=' , 'adpushup'),
|
633 |
-
),
|
634 |
-
// Must provide key => value pairs for select options
|
635 |
-
'options' => array(
|
636 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
637 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
638 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
639 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
640 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
641 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
642 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
643 |
-
'default' => '1',
|
644 |
-
);
|
645 |
-
|
646 |
-
$fields[] = array(
|
647 |
-
'class' => 'child_opt',
|
648 |
-
'id' =>'ampforwp-adpushup-slotpath-3',
|
649 |
-
'type' => 'text',
|
650 |
-
'required' => array(
|
651 |
-
array('enable-amp-ads-3', '=' , '1'),
|
652 |
-
array('enable-amp-ads-type-3', '=' , 'adpushup'),
|
653 |
-
),
|
654 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
655 |
-
'default' => '',
|
656 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
657 |
-
);
|
658 |
// MGID fields
|
659 |
$fields[] = array(
|
660 |
'class' => 'child_opt',
|
@@ -754,7 +649,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
754 |
// Must provide key => value pairs for select options
|
755 |
'options' => array(
|
756 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
757 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
758 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
759 |
),
|
760 |
'default' => 'adsense',
|
@@ -817,40 +711,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
817 |
array('enable-amp-ads-type-4', '=' , 'adsense'),
|
818 |
),
|
819 |
);
|
820 |
-
// AdPushup fields
|
821 |
-
$fields[] = array(
|
822 |
-
'class' => 'child_opt child_opt_arrow',
|
823 |
-
'id' => 'ampforwp-adpushup-select-4',
|
824 |
-
'type' => 'select',
|
825 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
826 |
-
'required' => array(
|
827 |
-
array('enable-amp-ads-4', '=' , '1'),
|
828 |
-
array('enable-amp-ads-type-4', '=' , 'adpushup'),
|
829 |
-
),
|
830 |
-
// Must provide key => value pairs for select options
|
831 |
-
'options' => array(
|
832 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
833 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
834 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
835 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
836 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
837 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
838 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
839 |
-
'default' => '1',
|
840 |
-
);
|
841 |
-
|
842 |
-
$fields[] = array(
|
843 |
-
'class' => 'child_opt',
|
844 |
-
'id' =>'ampforwp-adpushup-slotpath-4',
|
845 |
-
'type' => 'text',
|
846 |
-
'required' => array(
|
847 |
-
array('enable-amp-ads-4', '=' , '1'),
|
848 |
-
array('enable-amp-ads-type-4', '=' , 'adpushup'),
|
849 |
-
),
|
850 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
851 |
-
'default' => '',
|
852 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
853 |
-
);
|
854 |
// MGID fields
|
855 |
$fields[] = array(
|
856 |
'class' => 'child_opt',
|
@@ -950,7 +810,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
950 |
// Must provide key => value pairs for select options
|
951 |
'options' => array(
|
952 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
953 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
954 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
955 |
),
|
956 |
'default' => 'adsense',
|
@@ -1013,40 +872,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
1013 |
array('enable-amp-ads-type-5', '=' , 'adsense'),
|
1014 |
),
|
1015 |
);
|
1016 |
-
// AdPushup fields
|
1017 |
-
$fields[] = array(
|
1018 |
-
'class' => 'child_opt child_opt_arrow',
|
1019 |
-
'id' => 'ampforwp-adpushup-select-5',
|
1020 |
-
'type' => 'select',
|
1021 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
1022 |
-
'required' => array(
|
1023 |
-
array('enable-amp-ads-5', '=' , '1'),
|
1024 |
-
array('enable-amp-ads-type-5', '=' , 'adpushup'),
|
1025 |
-
),
|
1026 |
-
// Must provide key => value pairs for select options
|
1027 |
-
'options' => array(
|
1028 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
1029 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
1030 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
1031 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
1032 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
1033 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
1034 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
1035 |
-
'default' => '1',
|
1036 |
-
);
|
1037 |
-
|
1038 |
-
$fields[] = array(
|
1039 |
-
'class' => 'child_opt',
|
1040 |
-
'id' =>'ampforwp-adpushup-slotpath-5',
|
1041 |
-
'type' => 'text',
|
1042 |
-
'required' => array(
|
1043 |
-
array('enable-amp-ads-5', '=' , '1'),
|
1044 |
-
array('enable-amp-ads-type-5', '=' , 'adpushup'),
|
1045 |
-
),
|
1046 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
1047 |
-
'default' => '',
|
1048 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
1049 |
-
);
|
1050 |
// MGID fields
|
1051 |
$fields[] = array(
|
1052 |
'class' => 'child_opt',
|
@@ -1145,7 +970,6 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
1145 |
// Must provide key => value pairs for select options
|
1146 |
'options' => array(
|
1147 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
1148 |
-
'adpushup' => esc_html__('AdPushup', 'accelerated-mobile-pages'),
|
1149 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
1150 |
),
|
1151 |
'default' => 'adsense',
|
@@ -1207,41 +1031,7 @@ if (!function_exists('adsforwp_admin_notice')) {
|
|
1207 |
array('enable-amp-ads-6', '=' , '1'),
|
1208 |
array('enable-amp-ads-type-6', '=' , 'adsense'),
|
1209 |
),
|
1210 |
-
);
|
1211 |
-
// AdPushup fields
|
1212 |
-
$fields[] = array(
|
1213 |
-
'class' => 'child_opt child_opt_arrow',
|
1214 |
-
'id' => 'ampforwp-adpushup-select-6',
|
1215 |
-
'type' => 'select',
|
1216 |
-
'title' => esc_html__('AD Size', 'accelerated-mobile-pages'),
|
1217 |
-
'required' => array(
|
1218 |
-
array('enable-amp-ads-6', '=' , '1'),
|
1219 |
-
array('enable-amp-ads-type-6', '=' , 'adpushup'),
|
1220 |
-
),
|
1221 |
-
// Must provide key => value pairs for select options
|
1222 |
-
'options' => array(
|
1223 |
-
'1' => esc_html__('300x250','accelerated-mobile-pages'),
|
1224 |
-
'2' => esc_html__('336x280','accelerated-mobile-pages'),
|
1225 |
-
'3' => esc_html__('728x90','accelerated-mobile-pages'),
|
1226 |
-
'4' => esc_html__('300x600','accelerated-mobile-pages'),
|
1227 |
-
'5' => esc_html__('320x100','accelerated-mobile-pages'),
|
1228 |
-
'6' => esc_html__('200x50','accelerated-mobile-pages'),
|
1229 |
-
'7' => esc_html__('320x50','accelerated-mobile-pages'), ),
|
1230 |
-
'default' => '1',
|
1231 |
-
);
|
1232 |
-
|
1233 |
-
$fields[] = array(
|
1234 |
-
'class' => 'child_opt',
|
1235 |
-
'id' =>'ampforwp-adpushup-slotpath-6',
|
1236 |
-
'type' => 'text',
|
1237 |
-
'required' => array(
|
1238 |
-
array('enable-amp-ads-6', '=' , '1'),
|
1239 |
-
array('enable-amp-ads-type-6', '=' , 'adpushup'),
|
1240 |
-
),
|
1241 |
-
'title' => esc_html__('Slotpath', 'accelerated-mobile-pages'),
|
1242 |
-
'default' => '',
|
1243 |
-
'placeholder'=> '/103512698/AMP_COMPONENT_TEST_1'
|
1244 |
-
);
|
1245 |
// MGID fields
|
1246 |
$fields[] = array(
|
1247 |
'class' => 'child_opt',
|
98 |
$fields[] = array(
|
99 |
'id' => 'amp-ads_0',
|
100 |
'type' => 'section',
|
101 |
+
'title' => esc_html__('Optimize Your Revenue With The Publisher Desk', 'accelerated-mobile-pages'),
|
102 |
'indent' => true,
|
103 |
'layout_type' => 'accordion',
|
104 |
'accordion-open'=> 1,
|
105 |
);
|
106 |
|
107 |
$fields[] = array(
|
108 |
+
'id' =>'ampforwp-ads-publisherdesk',
|
109 |
'type' => 'switch',
|
110 |
'title' => esc_html__('Ad Revenue Optimization', 'accelerated-mobile-pages'),
|
111 |
'desc' => sprintf('%s <a href="%s" target="_blank">%s</a>',
|
112 |
+
esc_html__('Integrate Ads Through The Publisher Desk', 'accelerated-mobile-pages'), esc_url('https://www.publisherdesk.com/amp-for-wp/'),esc_html__('Learn more','accelerated-mobile-pages')),
|
113 |
'default' => 0,
|
114 |
);
|
115 |
$fields[] = array(
|
116 |
'class' => 'child_opt',
|
117 |
+
'id' =>'ampforwp-publisherdesk-id',
|
118 |
'type' => 'text',
|
119 |
+
'required' => array('ampforwp-ads-publisherdesk', '=' , '1'),
|
120 |
+
'title' => esc_html__('Publisher ID', 'accelerated-mobile-pages'),
|
121 |
'desc' => sprintf('%s <a href="%s" target="_blank">%s</a>',
|
122 |
+
esc_html__('Obtain your Publisher ID through', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-the-publisher-desk-ads-in-amp/'), esc_html__('these steps','accelerated-mobile-pages')),
|
123 |
'default' => '',
|
124 |
+
'placeholder'=> '337'
|
125 |
);
|
126 |
|
127 |
$fields[] = array(
|
151 |
// Must provide key => value pairs for select options
|
152 |
'options' => array(
|
153 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
154 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
155 |
),
|
156 |
'default' => 'adsense',
|
212 |
array('enable-amp-ads-type-1', '=' , 'adsense'),
|
213 |
),
|
214 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
// MGID fields
|
216 |
$fields[] = array(
|
217 |
'class' => 'child_opt',
|
311 |
// Must provide key => value pairs for select options
|
312 |
'options' => array(
|
313 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
314 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
315 |
),
|
316 |
'default' => 'adsense',
|
373 |
array('enable-amp-ads-type-2', '=' , 'adsense'),
|
374 |
),
|
375 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
// MGID fields
|
377 |
$fields[] = array(
|
378 |
'class' => 'child_opt',
|
472 |
// Must provide key => value pairs for select options
|
473 |
'options' => array(
|
474 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
475 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
476 |
),
|
477 |
'default' => 'adsense',
|
550 |
array('enable-amp-ads-type-3', '=' , 'adsense'),
|
551 |
),
|
552 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
// MGID fields
|
554 |
$fields[] = array(
|
555 |
'class' => 'child_opt',
|
649 |
// Must provide key => value pairs for select options
|
650 |
'options' => array(
|
651 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
652 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
653 |
),
|
654 |
'default' => 'adsense',
|
711 |
array('enable-amp-ads-type-4', '=' , 'adsense'),
|
712 |
),
|
713 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
// MGID fields
|
715 |
$fields[] = array(
|
716 |
'class' => 'child_opt',
|
810 |
// Must provide key => value pairs for select options
|
811 |
'options' => array(
|
812 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
813 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
814 |
),
|
815 |
'default' => 'adsense',
|
872 |
array('enable-amp-ads-type-5', '=' , 'adsense'),
|
873 |
),
|
874 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
875 |
// MGID fields
|
876 |
$fields[] = array(
|
877 |
'class' => 'child_opt',
|
970 |
// Must provide key => value pairs for select options
|
971 |
'options' => array(
|
972 |
'adsense' => esc_html__('Adsense', 'accelerated-mobile-pages'),
|
|
|
973 |
'mgid' => esc_html__('MGID','accelerated-mobile-pages'),
|
974 |
),
|
975 |
'default' => 'adsense',
|
1031 |
array('enable-amp-ads-6', '=' , '1'),
|
1032 |
array('enable-amp-ads-type-6', '=' , 'adsense'),
|
1033 |
),
|
1034 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1035 |
// MGID fields
|
1036 |
$fields[] = array(
|
1037 |
'class' => 'child_opt',
|
includes/features/functions.php
CHANGED
@@ -39,7 +39,7 @@ function ampforwp_add_admin_styling($hook_suffix){
|
|
39 |
$redux_data = array();
|
40 |
global $pagenow;
|
41 |
if ('plugins.php' == $pagenow) {
|
42 |
-
add_action('admin_notices', '
|
43 |
}
|
44 |
if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
|
45 |
$redux_data = $redux_builder_amp;
|
@@ -74,7 +74,7 @@ function ampforwp_add_admin_styling($hook_suffix){
|
|
74 |
add_action('admin_notices', 'ampforwp_mobile_redirection_notice' );
|
75 |
add_action('admin_notices', 'ampforwp_category_base_remove_notice' );
|
76 |
add_action('admin_notices', 'ampforwp_internal_feedback_notice' );
|
77 |
-
add_action('admin_notices', '
|
78 |
if ( defined('AMPFORWPPRO_PLUGIN_DIR') ) {
|
79 |
$license_info = get_option( 'ampforwppro_license_info');
|
80 |
if (!$license_info) {
|
@@ -1522,23 +1522,40 @@ function ampforwp_feedback_remove_notice(){
|
|
1522 |
}
|
1523 |
add_action('wp_ajax_ampforwp_feedback_remove_notice', 'ampforwp_feedback_remove_notice');
|
1524 |
|
1525 |
-
function
|
1526 |
-
|
1527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1528 |
<div class="updated notice ampforwp_remove_notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);background-color:white;">
|
1529 |
<p>
|
1530 |
-
<?php echo sprintf( 'We have integrated <a href="https://
|
1531 |
-
<a href="<?php echo esc_url('admin.php?page=amp_options&tab=4') ?>" class="button-primary" target="_self" style="font-weight:bold;" title="Ok, you deserved it"> <?php echo esc_html__('Setup
|
1532 |
<a class="button-primary" id="ampforwp-close-ad-notice" style="font-weight:bold;"><?php echo esc_html__('Dismiss', 'accelerated-mobile-pages') ?></a>
|
1533 |
</p>
|
1534 |
</div>
|
1535 |
<?php }
|
1536 |
}
|
1537 |
|
1538 |
-
function
|
1539 |
$result = '';
|
1540 |
if(current_user_can( 'manage_options' )){
|
1541 |
-
$result = update_option( "
|
1542 |
}
|
1543 |
if($result){
|
1544 |
echo json_encode(array('status'=>'t'));
|
@@ -1547,21 +1564,4 @@ function ampforwp_adpushup_remove_notice(){
|
|
1547 |
}
|
1548 |
wp_die();
|
1549 |
}
|
1550 |
-
add_action('
|
1551 |
-
|
1552 |
-
function ampforwp_pro_extension_manager_notice(){?>
|
1553 |
-
<div class="updated notice ampforwp_remove_notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);background-color:white;">
|
1554 |
-
<p>
|
1555 |
-
<?php echo esc_html__('AMP Pro Extension Manager has been activated, Please enter your license key', 'accelerated-mobile-pages'); ?>
|
1556 |
-
<a href="<?php echo esc_url(admin_url('admin.php?page=amp-extension-manager')) ?>" style="font-weight:bold;"> <?php echo esc_html__('here', 'accelerated-mobile-pages') ?></a>
|
1557 |
-
</p>
|
1558 |
-
</div>
|
1559 |
-
<?php }
|
1560 |
-
|
1561 |
-
function ampforwp_incomplate_setup_notice(){?>
|
1562 |
-
<div class="updated notice ampforwp_remove_notice">
|
1563 |
-
<p>
|
1564 |
-
<?php esc_html_e('Your setup is not completed. Please setup for better AMP Experience', 'accelerated-mobile-pages'); ?>
|
1565 |
-
</p>
|
1566 |
-
</div>
|
1567 |
-
<?php }
|
39 |
$redux_data = array();
|
40 |
global $pagenow;
|
41 |
if ('plugins.php' == $pagenow) {
|
42 |
+
add_action('admin_notices', 'ampforwp_tpd_notice' );
|
43 |
}
|
44 |
if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
|
45 |
$redux_data = $redux_builder_amp;
|
74 |
add_action('admin_notices', 'ampforwp_mobile_redirection_notice' );
|
75 |
add_action('admin_notices', 'ampforwp_category_base_remove_notice' );
|
76 |
add_action('admin_notices', 'ampforwp_internal_feedback_notice' );
|
77 |
+
add_action('admin_notices', 'ampforwp_tpd_notice' );
|
78 |
if ( defined('AMPFORWPPRO_PLUGIN_DIR') ) {
|
79 |
$license_info = get_option( 'ampforwppro_license_info');
|
80 |
if (!$license_info) {
|
1522 |
}
|
1523 |
add_action('wp_ajax_ampforwp_feedback_remove_notice', 'ampforwp_feedback_remove_notice');
|
1524 |
|
1525 |
+
function ampforwp_pro_extension_manager_notice(){?>
|
1526 |
+
<div class="updated notice ampforwp_remove_notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);background-color:white;">
|
1527 |
+
<p>
|
1528 |
+
<?php echo esc_html__('AMP Pro Extension Manager has been activated, Please enter your license key', 'accelerated-mobile-pages'); ?>
|
1529 |
+
<a href="<?php echo esc_url(admin_url('admin.php?page=amp-extension-manager')) ?>" style="font-weight:bold;"> <?php echo esc_html__('here', 'accelerated-mobile-pages') ?></a>
|
1530 |
+
</p>
|
1531 |
+
</div>
|
1532 |
+
<?php }
|
1533 |
+
|
1534 |
+
function ampforwp_incomplate_setup_notice(){?>
|
1535 |
+
<div class="updated notice ampforwp_remove_notice">
|
1536 |
+
<p>
|
1537 |
+
<?php esc_html_e('Your setup is not completed. Please setup for better AMP Experience', 'accelerated-mobile-pages'); ?>
|
1538 |
+
</p>
|
1539 |
+
</div>
|
1540 |
+
<?php }
|
1541 |
+
|
1542 |
+
function ampforwp_tpd_notice(){
|
1543 |
+
$remove_notice = get_option("ampforwp_tpd_remove_notice");
|
1544 |
+
if ($remove_notice !='remove' && !ampforwp_get_setting('ampforwp-ads-publisherdesk')) { ?>
|
1545 |
<div class="updated notice ampforwp_remove_notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);background-color:white;">
|
1546 |
<p>
|
1547 |
+
<?php echo sprintf( 'We have integrated <a href="https://www.publisherdesk.com/amp-for-wp/" target="_blank">%s</a> in our AMP plugin, it is a revenue optimization platform that helps publishers increase their ad revenue with fast fetch ad delivery and publishers can get upto 2x of the revenue compared to non-optimized pages',esc_html__('The Publisher Desk','accelerated-mobile-pages' ));?></p>
|
1548 |
+
<a href="<?php echo esc_url('admin.php?page=amp_options&tab=4') ?>" class="button-primary" target="_self" style="font-weight:bold;" title="Ok, you deserved it"> <?php echo esc_html__('Setup The Publisher Desk in AMP', 'accelerated-mobile-pages') ?></a>
|
1549 |
<a class="button-primary" id="ampforwp-close-ad-notice" style="font-weight:bold;"><?php echo esc_html__('Dismiss', 'accelerated-mobile-pages') ?></a>
|
1550 |
</p>
|
1551 |
</div>
|
1552 |
<?php }
|
1553 |
}
|
1554 |
|
1555 |
+
function ampforwp_tpd_remove_notice(){
|
1556 |
$result = '';
|
1557 |
if(current_user_can( 'manage_options' )){
|
1558 |
+
$result = update_option( "ampforwp_tpd_remove_notice", 'remove');
|
1559 |
}
|
1560 |
if($result){
|
1561 |
echo json_encode(array('status'=>'t'));
|
1564 |
}
|
1565 |
wp_die();
|
1566 |
}
|
1567 |
+
add_action('wp_ajax_ampforwp_tpd_remove_notice', 'ampforwp_tpd_remove_notice');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/features/performance/performance-functions.php
CHANGED
@@ -91,9 +91,6 @@ function ampforwp_minify_html_output($content_buffer){
|
|
91 |
if(preg_match('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', $content_buffer)){
|
92 |
$content_buffer = preg_replace('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', '', $content_buffer);
|
93 |
}
|
94 |
-
if(preg_match('/<figure\sclass="wp-block-embed(.*?)<a href="(.*?)"(.*?)<\/figure>/s', $content_buffer)){
|
95 |
-
$content_buffer = preg_replace('/<figure\sclass="wp-block-embed(.*?)<a href="(.*?)"(.*?)<\/figure>/s', '<amp-wordpress-embed width="400" height="400" data-url="$2" ></amp-wordpress-embed>', $content_buffer);
|
96 |
-
}
|
97 |
|
98 |
if(preg_match('/<blockquote\sclass="wp-embedded-content"(.*?)<a href="(.*?)"(.*?)<\/blockquote>/', $content_buffer)){
|
99 |
$content_buffer = preg_replace('/<blockquote\sclass="wp-embedded-content"(.*?)<a href="(.*?)"(.*?)<\/blockquote>/', '<amp-wordpress-embed width="400" height="400" data-url="$2" ></amp-wordpress-embed>', $content_buffer);
|
91 |
if(preg_match('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', $content_buffer)){
|
92 |
$content_buffer = preg_replace('/<fw-embed-feed(.*?)<\/fw-embed-feed>/', '', $content_buffer);
|
93 |
}
|
|
|
|
|
|
|
94 |
|
95 |
if(preg_match('/<blockquote\sclass="wp-embedded-content"(.*?)<a href="(.*?)"(.*?)<\/blockquote>/', $content_buffer)){
|
96 |
$content_buffer = preg_replace('/<blockquote\sclass="wp-embedded-content"(.*?)<a href="(.*?)"(.*?)<\/blockquote>/', '<amp-wordpress-embed width="400" height="400" data-url="$2" ></amp-wordpress-embed>', $content_buffer);
|
includes/make-better-admin.css
CHANGED
@@ -26,12 +26,12 @@
|
|
26 |
background-color: #fff;
|
27 |
overflow-y: auto;
|
28 |
}
|
29 |
-
|
30 |
-
#ampforwp-reloaded-feedback-content input[type="text"] { display:none;width:100%; }
|
31 |
.ampforwp-for-wp-feedback-not-deactivate { display: block; text-align: right; }
|
32 |
|
33 |
#ampforwp-reloaded-feedback-content h3{
|
34 |
margin:5px;
|
|
|
35 |
}
|
36 |
|
37 |
@media screen and (max-width:400px){
|
26 |
background-color: #fff;
|
27 |
overflow-y: auto;
|
28 |
}
|
29 |
+
.mb-box{display: none;width:100%;}
|
|
|
30 |
.ampforwp-for-wp-feedback-not-deactivate { display: block; text-align: right; }
|
31 |
|
32 |
#ampforwp-reloaded-feedback-content h3{
|
33 |
margin:5px;
|
34 |
+
font-size: 1em;
|
35 |
}
|
36 |
|
37 |
@media screen and (max-width:400px){
|
includes/make-better-admin.js
CHANGED
@@ -24,7 +24,10 @@ jQuery(document).ready(function ($) {
|
|
24 |
// show text fields
|
25 |
$('#ampforwp-reloaded-feedback-content input[type="radio"]').click(function () {
|
26 |
// show text field if there is one
|
27 |
-
$(this).
|
|
|
|
|
|
|
28 |
});
|
29 |
// send form or close it
|
30 |
$('#ampforwp-reloaded-feedback-content .button').click(function (e) {
|
24 |
// show text fields
|
25 |
$('#ampforwp-reloaded-feedback-content input[type="radio"]').click(function () {
|
26 |
// show text field if there is one
|
27 |
+
var input_value = $(this).attr("value");
|
28 |
+
var target_box = $("." + input_value);
|
29 |
+
$(".mb-box").not(target_box).hide();
|
30 |
+
$(target_box).show();
|
31 |
});
|
32 |
// send form or close it
|
33 |
$('#ampforwp-reloaded-feedback-content .button').click(function (e) {
|
includes/options/admin-config.php
CHANGED
@@ -4631,6 +4631,14 @@ Redux::setSection( $opt_name, array(
|
|
4631 |
'default' => false,
|
4632 |
'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
|
4633 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4634 |
array(
|
4635 |
'id' => 'google-icons',
|
4636 |
'type' => 'section',
|
4631 |
'default' => false,
|
4632 |
'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
|
4633 |
),
|
4634 |
+
array(
|
4635 |
+
'id' => 'ampforwp-infinite-scroll-new-features',
|
4636 |
+
'type' => 'switch',
|
4637 |
+
'class' => 'child_opt child_opt_arrow',
|
4638 |
+
'title' => esc_html__('New Features', 'accelerated-mobile-pages'),
|
4639 |
+
'default' => false,
|
4640 |
+
'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
|
4641 |
+
),
|
4642 |
array(
|
4643 |
'id' => 'google-icons',
|
4644 |
'type' => 'section',
|
includes/options/redux-core/assets/css/redux-admin.css
CHANGED
@@ -1568,12 +1568,12 @@ div#\34_section_group.amp-ads .redux-section-desc {
|
|
1568 |
}
|
1569 |
|
1570 |
#section-amp-ads_0.afw-accordion-header > h3 {
|
1571 |
-
background: #
|
1572 |
-
border-color: #
|
1573 |
color: #fff;
|
1574 |
}
|
1575 |
table#section-table-amp-ads_0 {
|
1576 |
-
border-color: #
|
1577 |
}
|
1578 |
#pa-feild-ul a.deletion.redux-multi-text-remove , #redux_builder_amp-pa-feild a.button.button-primary.redux-multi-text-add{
|
1579 |
display: none;
|
1568 |
}
|
1569 |
|
1570 |
#section-amp-ads_0.afw-accordion-header > h3 {
|
1571 |
+
background: #200305 !important;
|
1572 |
+
border-color: #200305 !important;
|
1573 |
color: #fff;
|
1574 |
}
|
1575 |
table#section-table-amp-ads_0 {
|
1576 |
+
border-color: #000;
|
1577 |
}
|
1578 |
#pa-feild-ul a.deletion.redux-multi-text-remove , #redux_builder_amp-pa-feild a.button.button-primary.redux-multi-text-add{
|
1579 |
display: none;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.9.1
|
7 |
-
Stable tag: 1.0.77.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -194,7 +194,11 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
-
= 1.0.77.
|
|
|
|
|
|
|
|
|
198 |
* Improvements: Added new infinite scrolling experience #4791
|
199 |
* Fixed: The links in embed URLs are not clickable #5193
|
200 |
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.9.1
|
7 |
+
Stable tag: 1.0.77.38
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= 1.0.77.38 (7th March 2022) =
|
198 |
+
* Improvements: Added The Publisher Desk Support #5213
|
199 |
+
* Fixed: Displaying a blank white screen when embed URLs are used #5193
|
200 |
+
|
201 |
+
1.0.77.37.1 (4TH March 2022)
|
202 |
* Improvements: Added new infinite scrolling experience #4791
|
203 |
* Fixed: The links in embed URLs are not clickable #5193
|
204 |
|
templates/features.php
CHANGED
@@ -2407,7 +2407,7 @@ function ampforwp_footer_html_output() {
|
|
2407 |
if (empty($lang)) {
|
2408 |
$lang = 'en';
|
2409 |
}
|
2410 |
-
|
2411 |
if (!empty($id) && !empty($hashcode) && !empty($country) && !empty($name) ) {?>
|
2412 |
<amp-consent id="quantcast" layout="nodisplay">
|
2413 |
<script type="application/json">
|
@@ -9665,4 +9665,53 @@ if (ampforwp_get_setting('amp-core-end-point') && function_exists('get_rocket_ca
|
|
9665 |
function ampforwp_rocket_cache_query_string($query_strings){
|
9666 |
array_push($query_strings,"amp");
|
9667 |
return $query_strings;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9668 |
}
|
2407 |
if (empty($lang)) {
|
2408 |
$lang = 'en';
|
2409 |
}
|
2410 |
+
|
2411 |
if (!empty($id) && !empty($hashcode) && !empty($country) && !empty($name) ) {?>
|
2412 |
<amp-consent id="quantcast" layout="nodisplay">
|
2413 |
<script type="application/json">
|
9665 |
function ampforwp_rocket_cache_query_string($query_strings){
|
9666 |
array_push($query_strings,"amp");
|
9667 |
return $query_strings;
|
9668 |
+
}
|
9669 |
+
|
9670 |
+
|
9671 |
+
function ampforwp_publisher_desk_ads_insert( $ads, $content ) {
|
9672 |
+
if ( ! is_array( $ads ) ) {
|
9673 |
+
return $content;
|
9674 |
+
}
|
9675 |
+
|
9676 |
+
$closing_p = '</p>';
|
9677 |
+
$paragraphs = explode( $closing_p, $content );
|
9678 |
+
|
9679 |
+
foreach ($paragraphs as $index => $paragraph) {
|
9680 |
+
if ( trim( $paragraph ) ) {
|
9681 |
+
$paragraphs[$index] .= $closing_p;
|
9682 |
+
}
|
9683 |
+
|
9684 |
+
$n = $index + 1;
|
9685 |
+
if ( isset( $ads[ $n ] ) ) {
|
9686 |
+
$paragraphs[$index] .= $ads[ $n ];
|
9687 |
+
}
|
9688 |
+
}
|
9689 |
+
|
9690 |
+
return implode( '', $paragraphs );
|
9691 |
+
}
|
9692 |
+
|
9693 |
+
add_filter( 'ampforwp_modify_the_content', 'ampforwp_publisher_desk_ads' );
|
9694 |
+
function ampforwp_publisher_desk_ads( $content ) {
|
9695 |
+
if (!ampforwp_get_setting('ampforwp-ads-publisherdesk')) {
|
9696 |
+
return $content;
|
9697 |
+
}
|
9698 |
+
$pub_id = $url = '';
|
9699 |
+
$pub_id = ampforwp_get_setting('ampforwp-publisherdesk-id');
|
9700 |
+
if (!empty($pub_id)) {
|
9701 |
+
$url = 'https://publisher-desk.herokuapp.com/api/tpd-amp-tags-by-publisher-id?publisherId='. esc_html($pub_id);
|
9702 |
+
}
|
9703 |
+
|
9704 |
+
$data_api = wp_remote_get($url);
|
9705 |
+
$json_data_api = json_decode( $data_api['body'] );
|
9706 |
+
if ( is_single() && !empty($pub_id) && !empty($json_data_api) ) {
|
9707 |
+
$content = ampforwp_publisher_desk_ads_insert( array(
|
9708 |
+
'3' => $json_data_api->customHTMLInContentAds[0],
|
9709 |
+
'6' => $json_data_api->customHTMLInContentAds[1],
|
9710 |
+
'9' => $json_data_api->customHTMLInContentAds[2]
|
9711 |
+
), $content );
|
9712 |
+
$content .= $json_data_api->stickyCustomHTMLAd[0];
|
9713 |
+
$content = preg_replace('/json="/', 'json=\"' , $content);
|
9714 |
+
$content = preg_replace('/rtc-config="/', 'rtc-config=\"' , $content);
|
9715 |
+
}
|
9716 |
+
return $content;
|
9717 |
}
|
uninstall.php
CHANGED
@@ -74,6 +74,6 @@ if(isset($redux_builder_amp['ampforwp-delete-on-uninstall']) && $redux_builder_a
|
|
74 |
delete_option('ampforwp_option_panel_view_type');
|
75 |
delete_option("ampforwp_feedback_remove_notice");
|
76 |
delete_option("ampforwp_dismiss_discount_btn");
|
77 |
-
delete_option("
|
78 |
}
|
79 |
}
|
74 |
delete_option('ampforwp_option_panel_view_type');
|
75 |
delete_option("ampforwp_feedback_remove_notice");
|
76 |
delete_option("ampforwp_dismiss_discount_btn");
|
77 |
+
delete_option("ampforwp_tpd_remove_notice");
|
78 |
}
|
79 |
}
|