Quick Adsense - Version 2.0.1

Version Description

  • Bug Fix: Fixed a bug which caused a JS error in specific use cases.
  • Date: 19-December-2017
Download this release

Release Info

Developer quickadsense
Plugin Icon 128x128 Quick Adsense
Version 2.0.1
Comparing to
See all releases

Code changes from version 1.9.4 to 2.0.1

includes/ads.php CHANGED
@@ -13,7 +13,7 @@ function quick_adsense_2_admin_print_footer_scripts() {
13
  global $QData;
14
  global $wpvcomp;
15
  $options = quick_adsense_2_get_options_with_defaults();
16
- if ($options['QckTags']) { ?>
17
  <script type="text/javascript">
18
  wpvcomp = <?php echo(($wpvcomp==1)?"true":"false"); ?>;
19
  edaddID = new Array();
13
  global $QData;
14
  global $wpvcomp;
15
  $options = quick_adsense_2_get_options_with_defaults();
16
+ if (isset($options['QckTags']) && $options['QckTags']) { ?>
17
  <script type="text/javascript">
18
  wpvcomp = <?php echo(($wpvcomp==1)?"true":"false"); ?>;
19
  edaddID = new Array();
includes/migrate.php CHANGED
@@ -3,7 +3,7 @@ global $QData;
3
  $QData['AdsWid'] = 10;
4
  $QData['Ads'] = 10;
5
  $QData['Name'] = 'Quick Adsense';
6
- $QData['Version'] = '1.9.4';
7
  $QData['URI'] = 'http://quickadsense.com/';
8
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
9
  $QData['Default'] = array(
@@ -72,7 +72,90 @@ function quick_adsense_2_get_options_with_defaults() {
72
  $options = get_option('quick_adsense_2_options');
73
  if(!is_array($options) || (count($options) < 1)) {
74
  $oldData = get_option('AdsDisp');
75
- if(!isset($oldData) && is_bool($oldData)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  $options = array (
77
  'AdsDisp' => $QData['Default']['AdsDisp'],
78
  'BegnAds' => $QData['Default']['BegnAds'],
@@ -155,91 +238,7 @@ function quick_adsense_2_get_options_with_defaults() {
155
  'WidCode9' => '',
156
  'WidCode10' => ''
157
  );
158
- } else {
159
- $options = array (
160
- 'AdsDisp' => get_option('AdsDisp'),
161
- 'BegnAds' => get_option('BegnAds'),
162
- 'BegnRnd' => get_option('BegnRnd'),
163
- 'MiddAds' => get_option('MiddAds'),
164
- 'MiddRnd' => get_option('MiddRnd'),
165
- 'EndiAds' => get_option('EndiAds'),
166
- 'EndiRnd' => get_option('EndiRnd'),
167
- 'MoreAds' => get_option('MoreAds'),
168
- 'MoreRnd' => get_option('MoreRnd'),
169
- 'LapaAds' => get_option('LapaAds'),
170
- 'LapaRnd' => get_option('LapaRnd'),
171
- 'Par1Ads' => get_option('Par1Ads'),
172
- 'Par1Rnd' => get_option('Par1Rnd'),
173
- 'Par1Nup' => get_option('Par1Nup'),
174
- 'Par1Con' => get_option('Par1Con'),
175
- 'Par2Ads' => get_option('Par2Ads'),
176
- 'Par2Rnd' => get_option('Par2Rnd'),
177
- 'Par2Nup' => get_option('Par2Nup'),
178
- 'Par2Con' => get_option('Par2Con'),
179
- 'Par3Ads' => get_option('Par3Ads'),
180
- 'Par3Rnd' => get_option('Par3Rnd'),
181
- 'Par3Nup' => get_option('Par3Nup'),
182
- 'Par3Con' => get_option('Par3Con'),
183
- 'Img1Ads' => get_option('Img1Ads'),
184
- 'Img1Rnd' => get_option('Img1Rnd'),
185
- 'Img1Nup' => get_option('Img1Nup'),
186
- 'Img1Con' => get_option('Img1Con'),
187
- 'AppPost' => get_option('AppPost'),
188
- 'AppPage' => get_option('AppPage'),
189
- 'AppHome' => get_option('AppHome'),
190
- 'AppCate' => get_option('AppCate'),
191
- 'AppArch' => get_option('AppArch'),
192
- 'AppTags' => get_option('AppTags'),
193
- 'AppMaxA' => get_option('AppMaxA'),
194
- 'AppSide' => get_option('AppSide'),
195
- 'AppLogg' => get_option('AppLogg'),
196
- 'QckTags' => get_option('QckTags'),
197
- 'QckRnds' => get_option('QckRnds'),
198
- 'QckOffs' => get_option('QckOffs'),
199
- 'QckOfPs' => get_option('QckOfPs'),
200
- 'AdsCode1' => get_option('AdsCode1'),
201
- 'AdsAlign1' => get_option('AdsAlign1'),
202
- 'AdsMargin1' => get_option('AdsMargin1'),
203
- 'AdsCode2' => get_option('AdsCode2'),
204
- 'AdsAlign2' => get_option('AdsAlign2'),
205
- 'AdsMargin2' => get_option('AdsMargin2'),
206
- 'AdsCode3' => get_option('AdsCode3'),
207
- 'AdsAlign3' => get_option('AdsAlign3'),
208
- 'AdsMargin3' => get_option('AdsMargin3'),
209
- 'AdsCode4' => get_option('AdsCode4'),
210
- 'AdsAlign4' => get_option('AdsAlign4'),
211
- 'AdsMargin4' => get_option('AdsMargin4'),
212
- 'AdsCode5' => get_option('AdsCode5'),
213
- 'AdsAlign5' => get_option('AdsAlign5'),
214
- 'AdsMargin5' => get_option('AdsMargin5'),
215
- 'AdsCode6' => get_option('AdsCode6'),
216
- 'AdsAlign6' => get_option('AdsAlign6'),
217
- 'AdsMargin6' => get_option('AdsMargin6'),
218
- 'AdsCode7' => get_option('AdsCode7'),
219
- 'AdsAlign7' => get_option('AdsAlign7'),
220
- 'AdsMargin7' => get_option('AdsMargin7'),
221
- 'AdsCode8' => get_option('AdsCode8'),
222
- 'AdsAlign8' => get_option('AdsAlign8'),
223
- 'AdsMargin8' => get_option('AdsMargin8'),
224
- 'AdsCode9' => get_option('AdsCode9'),
225
- 'AdsAlign9' => get_option('AdsAlign9'),
226
- 'AdsMargin9' => get_option('AdsMargin9'),
227
- 'AdsCode10' => get_option('AdsCode10'),
228
- 'AdsAlign10' => get_option('AdsAlign10'),
229
- 'AdsMargin10' => get_option('AdsMargin10'),
230
- 'WidCode1' => get_option('WidCode1'),
231
- 'WidCode2' => get_option('WidCode2'),
232
- 'WidCode3' => get_option('WidCode3'),
233
- 'WidCode4' => get_option('WidCode4'),
234
- 'WidCode5' => get_option('WidCode5'),
235
- 'WidCode6' => get_option('WidCode6'),
236
- 'WidCode7' => get_option('WidCode7'),
237
- 'WidCode8' => get_option('WidCode8'),
238
- 'WidCode9' => get_option('WidCode9'),
239
- 'WidCode10' => get_option('WidCode10')
240
- );
241
  }
242
- delete_option('AdsDisp');
243
  update_option('quick_adsense_2_options', $options);
244
  }
245
  return $options;
3
  $QData['AdsWid'] = 10;
4
  $QData['Ads'] = 10;
5
  $QData['Name'] = 'Quick Adsense';
6
+ $QData['Version'] = '2.0';
7
  $QData['URI'] = 'http://quickadsense.com/';
8
  $QData['AdsWidName'] = 'AdsWidget%d (Quick Adsense)';
9
  $QData['Default'] = array(
72
  $options = get_option('quick_adsense_2_options');
73
  if(!is_array($options) || (count($options) < 1)) {
74
  $oldData = get_option('AdsDisp');
75
+ if(isset($oldData) && in_array($oldData, array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'))) {
76
+ $options = array ();
77
+ $temp = get_option('AdsDisp'); if(isset($temp) && ($temp != '')) { $options['AdsDisp'] = $temp; }
78
+ $temp = get_option('BegnAds'); if(isset($temp) && ($temp != '')) { $options['BegnAds'] = $temp; }
79
+ $temp = get_option('BegnRnd'); if(isset($temp) && ($temp != '')) { $options['BegnRnd'] = $temp; }
80
+ $temp = get_option('MiddAds'); if(isset($temp) && ($temp != '')) { $options['MiddAds'] = $temp; }
81
+ $temp = get_option('MiddRnd'); if(isset($temp) && ($temp != '')) { $options['MiddRnd'] = $temp; }
82
+ $temp = get_option('EndiAds'); if(isset($temp) && ($temp != '')) { $options['EndiAds'] = $temp; }
83
+ $temp = get_option('EndiRnd'); if(isset($temp) && ($temp != '')) { $options['EndiRnd'] = $temp; }
84
+ $temp = get_option('MoreAds'); if(isset($temp) && ($temp != '')) { $options['MoreAds'] = $temp; }
85
+ $temp = get_option('MoreRnd'); if(isset($temp) && ($temp != '')) { $options['MoreRnd'] = $temp; }
86
+ $temp = get_option('LapaAds'); if(isset($temp) && ($temp != '')) { $options['LapaAds'] = $temp; }
87
+ $temp = get_option('LapaRnd'); if(isset($temp) && ($temp != '')) { $options['LapaRnd'] = $temp; }
88
+ $temp = get_option('Par1Ads'); if(isset($temp) && ($temp != '')) { $options['Par1Ads'] = $temp; }
89
+ $temp = get_option('Par1Rnd'); if(isset($temp) && ($temp != '')) { $options['Par1Rnd'] = $temp; }
90
+ $temp = get_option('Par1Nup'); if(isset($temp) && ($temp != '')) { $options['Par1Nup'] = $temp; }
91
+ $temp = get_option('Par1Con'); if(isset($temp) && ($temp != '')) { $options['Par1Con'] = $temp; }
92
+ $temp = get_option('Par2Ads'); if(isset($temp) && ($temp != '')) { $options['Par2Ads'] = $temp; }
93
+ $temp = get_option('Par2Rnd'); if(isset($temp) && ($temp != '')) { $options['Par2Rnd'] = $temp; }
94
+ $temp = get_option('Par2Nup'); if(isset($temp) && ($temp != '')) { $options['Par2Nup'] = $temp; }
95
+ $temp = get_option('Par2Con'); if(isset($temp) && ($temp != '')) { $options['Par2Con'] = $temp; }
96
+ $temp = get_option('Par3Ads'); if(isset($temp) && ($temp != '')) { $options['Par3Ads'] = $temp; }
97
+ $temp = get_option('Par3Rnd'); if(isset($temp) && ($temp != '')) { $options['Par3Rnd'] = $temp; }
98
+ $temp = get_option('Par3Nup'); if(isset($temp) && ($temp != '')) { $options['Par3Nup'] = $temp; }
99
+ $temp = get_option('Par3Con'); if(isset($temp) && ($temp != '')) { $options['Par3Con'] = $temp; }
100
+ $temp = get_option('Img1Ads'); if(isset($temp) && ($temp != '')) { $options['Img1Ads'] = $temp; }
101
+ $temp = get_option('Img1Rnd'); if(isset($temp) && ($temp != '')) { $options['Img1Rnd'] = $temp; }
102
+ $temp = get_option('Img1Nup'); if(isset($temp) && ($temp != '')) { $options['Img1Nup'] = $temp; }
103
+ $temp = get_option('Img1Con'); if(isset($temp) && ($temp != '')) { $options['Img1Con'] = $temp; }
104
+ $temp = get_option('AppPost'); if(isset($temp) && ($temp != '')) { $options['AppPost'] = $temp; }
105
+ $temp = get_option('AppPage'); if(isset($temp) && ($temp != '')) { $options['AppPage'] = $temp; }
106
+ $temp = get_option('AppHome'); if(isset($temp) && ($temp != '')) { $options['AppHome'] = $temp; }
107
+ $temp = get_option('AppCate'); if(isset($temp) && ($temp != '')) { $options['AppCate'] = $temp; }
108
+ $temp = get_option('AppArch'); if(isset($temp) && ($temp != '')) { $options['AppArch'] = $temp; }
109
+ $temp = get_option('AppTags'); if(isset($temp) && ($temp != '')) { $options['AppTags'] = $temp; }
110
+ $temp = get_option('AppMaxA'); if(isset($temp) && ($temp != '')) { $options['AppMaxA'] = $temp; }
111
+ $temp = get_option('AppSide'); if(isset($temp) && ($temp != '')) { $options['AppSide'] = $temp; }
112
+ $temp = get_option('AppLogg'); if(isset($temp) && ($temp != '')) { $options['AppLogg'] = $temp; }
113
+ $temp = get_option('QckTags'); if(isset($temp) && ($temp != '')) { $options['QckTags'] = $temp; }
114
+ $temp = get_option('QckRnds'); if(isset($temp) && ($temp != '')) { $options['QckRnds'] = $temp; }
115
+ $temp = get_option('QckOffs'); if(isset($temp) && ($temp != '')) { $options['QckOffs'] = $temp; }
116
+ $temp = get_option('QckOfPs'); if(isset($temp) && ($temp != '')) { $options['QckOfPs'] = $temp; }
117
+ $temp = get_option('AdsCode1'); if(isset($temp)) { $options['AdsCode1'] = $temp; }
118
+ $temp = get_option('AdsAlign1'); if(isset($temp) && ($temp != '')) { $options['AdsAlign1'] = $temp; }
119
+ $temp = get_option('AdsMargin1'); if(isset($temp) && ($temp != '')) { $options['AdsMargin1'] = $temp; }
120
+ $temp = get_option('AdsCode2'); if(isset($temp)) { $options['AdsCode2'] = $temp; }
121
+ $temp = get_option('AdsAlign2'); if(isset($temp) && ($temp != '')) { $options['AdsAlign2'] = $temp; }
122
+ $temp = get_option('AdsMargin2'); if(isset($temp) && ($temp != '')) { $options['AdsMargin2'] = $temp; }
123
+ $temp = get_option('AdsCode3'); if(isset($temp)) { $options['AdsCode3'] = $temp; }
124
+ $temp = get_option('AdsAlign3'); if(isset($temp) && ($temp != '')) { $options['AdsAlign3'] = $temp; }
125
+ $temp = get_option('AdsMargin3'); if(isset($temp) && ($temp != '')) { $options['AdsMargin3'] = $temp; }
126
+ $temp = get_option('AdsCode4'); if(isset($temp)) { $options['AdsCode4'] = $temp; }
127
+ $temp = get_option('AdsAlign4'); if(isset($temp) && ($temp != '')) { $options['AdsAlign4'] = $temp; }
128
+ $temp = get_option('AdsMargin4'); if(isset($temp) && ($temp != '')) { $options['AdsMargin4'] = $temp; }
129
+ $temp = get_option('AdsCode5'); if(isset($temp)) { $options['AdsCode5'] = $temp; }
130
+ $temp = get_option('AdsAlign5'); if(isset($temp) && ($temp != '')) { $options['AdsAlign5'] = $temp; }
131
+ $temp = get_option('AdsMargin5'); if(isset($temp) && ($temp != '')) { $options['AdsMargin5'] = $temp; }
132
+ $temp = get_option('AdsCode6'); if(isset($temp)) { $options['AdsCode6'] = $temp; }
133
+ $temp = get_option('AdsAlign6'); if(isset($temp) && ($temp != '')) { $options['AdsAlign6'] = $temp; }
134
+ $temp = get_option('AdsMargin6'); if(isset($temp) && ($temp != '')) { $options['AdsMargin6'] = $temp; }
135
+ $temp = get_option('AdsCode7'); if(isset($temp)) { $options['AdsCode7'] = $temp; }
136
+ $temp = get_option('AdsAlign7'); if(isset($temp) && ($temp != '')) { $options['AdsAlign7'] = $temp; }
137
+ $temp = get_option('AdsMargin7'); if(isset($temp) && ($temp != '')) { $options['AdsMargin7'] = $temp; }
138
+ $temp = get_option('AdsCode8'); if(isset($temp)) { $options['AdsCode8'] = $temp; }
139
+ $temp = get_option('AdsAlign8'); if(isset($temp) && ($temp != '')) { $options['AdsAlign8'] = $temp; }
140
+ $temp = get_option('AdsMargin8'); if(isset($temp) && ($temp != '')) { $options['AdsMargin8'] = $temp; }
141
+ $temp = get_option('AdsCode9'); if(isset($temp)) { $options['AdsCode9'] = $temp; }
142
+ $temp = get_option('AdsAlign9'); if(isset($temp) && ($temp != '')) { $options['AdsAlign9'] = $temp; }
143
+ $temp = get_option('AdsMargin9'); if(isset($temp) && ($temp != '')) { $options['AdsMargin9'] = $temp; }
144
+ $temp = get_option('AdsCode10'); if(isset($temp)) { $options['AdsCode10'] = $temp; }
145
+ $temp = get_option('AdsAlign10'); if(isset($temp) && ($temp != '')) { $options['AdsAlign10'] = $temp; }
146
+ $temp = get_option('AdsMargin10'); if(isset($temp) && ($temp != '')) { $options['AdsMargin10'] = $temp; }
147
+ $temp = get_option('WidCode1'); if(isset($temp)) { $options['WidCode1'] = $temp; }
148
+ $temp = get_option('WidCode2'); if(isset($temp)) { $options['WidCode2'] = $temp; }
149
+ $temp = get_option('WidCode3'); if(isset($temp)) { $options['WidCode3'] = $temp; }
150
+ $temp = get_option('WidCode4'); if(isset($temp)) { $options['WidCode4'] = $temp; }
151
+ $temp = get_option('WidCode5'); if(isset($temp)) { $options['WidCode5'] = $temp; }
152
+ $temp = get_option('WidCode6'); if(isset($temp)) { $options['WidCode6'] = $temp; }
153
+ $temp = get_option('WidCode7'); if(isset($temp)) { $options['WidCode7'] = $temp; }
154
+ $temp = get_option('WidCode8'); if(isset($temp)) { $options['WidCode8'] = $temp; }
155
+ $temp = get_option('WidCode9'); if(isset($temp)) { $options['WidCode9'] = $temp; }
156
+ $temp = get_option('WidCode10'); if(isset($temp)) { $options['WidCode10'] = $temp; }
157
+ delete_option('AdsDisp');
158
+ } else {
159
  $options = array (
160
  'AdsDisp' => $QData['Default']['AdsDisp'],
161
  'BegnAds' => $QData['Default']['BegnAds'],
238
  'WidCode9' => '',
239
  'WidCode10' => ''
240
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  }
 
242
  update_option('quick_adsense_2_options', $options);
243
  }
244
  return $options;
includes/settings.php CHANGED
@@ -20,7 +20,7 @@ function quick_adsense_2_plugin_action_links($links, $file) {
20
 
21
  function quick_adsense_2_settings_page() { ?>
22
  <div class="wrap">
23
- <h2>Quick Adsense Setting <span style="font-size: 9pt; font-style: italic">( Version 2.0 )</span></h2>
24
  <form method="post" action="options.php" name="wp_auto_commenter_form">
25
  <?php settings_fields('quick_adsense_2_options'); ?>
26
  <?php do_settings_sections('quick-adsense-2'); ?>
@@ -141,7 +141,7 @@ function quick_adsense_2_section_text() {
141
  <tr valign="top">
142
  <td style="width:110px"><?php _e('Position :<br/>(Default)'); ?></td>
143
  <td>
144
- <input type="checkbox" id="BegnAds" name="quick_adsense_2_options[BegnAds]" value="true" <?php if(isset($options['BegnAds']) && ($options['BegnAds'] == 'true')){echo('checked');} ?> onchange="checkinfo1('BegnRnd',this)" />
145
  <?php _e('Assign') ; ?>
146
  <select id="BegnRnd" name="quick_adsense_2_options[BegnRnd]" onchange="selectinfo(this)">
147
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -150,7 +150,7 @@ function quick_adsense_2_section_text() {
150
  </select>
151
  <?php _e('to <b>Beginning of Post</b>') ?><br/>
152
 
153
- <input type="checkbox" id="MiddAds" name="quick_adsense_2_options[MiddAds]" value="false" <?php if(isset($options['MiddAds']) && ($options['MiddAds'] == 'false')){echo('checked');} ?> onchange="checkinfo1('MiddRnd',this)" />
154
  <?php _e('Assign') ; ?>
155
  <select id="MiddRnd" name="quick_adsense_2_options[MiddRnd]" onchange="selectinfo(this)">
156
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -159,7 +159,7 @@ function quick_adsense_2_section_text() {
159
  </select>
160
  <?php _e('to <b>Middle of Post</b>') ?><br/>
161
 
162
- <input type="checkbox" id="EndiAds" name="quick_adsense_2_options[EndiAds]" value="false" <?php if(isset($options['EndiAds']) && ($options['EndiAds'] == 'false')){echo('checked');} ?> onchange="checkinfo1('EndiRnd',this)" />
163
  <?php _e('Assign') ; ?>
164
  <select id="EndiRnd" name="quick_adsense_2_options[EndiRnd]" onchange="selectinfo(this)">
165
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -168,7 +168,7 @@ function quick_adsense_2_section_text() {
168
  </select>
169
  <?php _e('to <b>End of Post</b>') ?><br/>
170
 
171
- <input type="checkbox" id="MoreAds" name="quick_adsense_2_options[MoreAds]" value="false" <?php if(isset($options['MoreAds']) && ($options['MoreAds'] == 'false')){echo('checked');} ?> onchange="checkinfo1('MoreRnd',this)" />
172
  <?php _e('Assign') ; ?>
173
  <select id="MoreRnd" name="quick_adsense_2_options[MoreRnd]" onchange="selectinfo(this)">
174
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -178,7 +178,7 @@ function quick_adsense_2_section_text() {
178
  <?php _e('right after <b>the') ?>
179
  <span style="font-family:Courier New,Courier,Fixed;">&lt;!--more--&gt;</span> <?php _e('tag') ?></b><br/>
180
 
181
- <input type="checkbox" id="LapaAds" name="quick_adsense_2_options[LapaAds]" value="false" <?php if(isset($options['LapaAds']) && ($options['LapaAds'] == 'false')){echo('checked');} ?> onchange="checkinfo1('LapaRnd',this)" />
182
  <?php _e('Assign') ; ?>
183
  <select id="LapaRnd" name="quick_adsense_2_options[LapaRnd]" onchange="selectinfo(this)">
184
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
@@ -188,7 +188,7 @@ function quick_adsense_2_section_text() {
188
  <?php _e('right before <b>the last Paragraph</b>') ?><span style="color:#a00;"> <b>(New)</b></span><br/>
189
 
190
  <?php for($j = 1; $j <= 3; $j++) { ?>
191
- <input type="checkbox" id="Par<?php echo $j; ?>Ads" name="quick_adsense_2_options[Par<?php echo $j; ?>Ads]" value="false" <?php if(isset($options['Par'.$j.'Ads']) && ($options['Par'.$j.'Ads'] == 'false')){echo('checked');} ?> onchange="checkinfo2(this,'Par<?php echo $j; ?>Rnd','Par<?php echo $j; ?>Nup','Par<?php echo $j; ?>Con')" />
192
  <?php _e('Assign') ; ?>
193
  <select id="Par<?php echo $j; ?>Rnd" name="quick_adsense_2_options[Par<?php echo $j; ?>Rnd]" onchange="selectinfo(this)">
194
  <?php for ($i = 0; $i <= $QData['Ads']; $i++) { ?>
@@ -203,11 +203,11 @@ function quick_adsense_2_section_text() {
203
  <?php } ?>
204
  </select> &rarr;
205
 
206
- <input type="checkbox" id="Par<?php echo $j; ?>Con" name="quick_adsense_2_options[Par<?php echo $j; ?>Con]" value="false" <?php if(isset($options['Par'.$j.'Con']) && ($options['Par'.$j.'Con'] == 'false')){echo('checked');} ?> />
207
  <?php _e('to <b>End of Post</b> if fewer paragraphs are found.') ; ?><br/>
208
  <?php } ?>
209
 
210
- <input type="checkbox" id="Img1Ads" name="quick_adsense_2_options[Img1Ads]" value="false" <?php if(isset($options['Img1Ads']) && ($options['Img1Ads'] == 'false')){echo('checked');} ?> onchange="checkinfo2(this,'Img1Rnd','Img1Nup','Img1Con')" />
211
  <?php _e('Assign') ; ?>
212
  <select id="Img1Rnd" name="quick_adsense_2_options[Img1Rnd]" onchange="selectinfo(this)">
213
  <?php for ($i = 0; $i <= $QData['Ads']; $i++) { ?>
@@ -220,7 +220,7 @@ function quick_adsense_2_section_text() {
220
  <option id="Opt1Im<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if(isset($options['Img1Nup']) && $options['Img1Nup']==(string)$i){echo('selected');} ?>><?php echo $i; ?></option>
221
  <?php } ?>
222
  </select> &rarr;
223
- <input type="checkbox" id="Img1Con" name="quick_adsense_2_options[Img1Con]" value="false" <?php if(isset($options['Img1Con']) && ($options['Img1Con'] == 'false')){echo('checked');} ?> />
224
  <?php _e('after <b>Image&#39;s outer</b>'); ?>
225
  <b><span style="font-family:Courier New,Courier,Fixed;"> &lt;div&gt; wp-caption</span></b> if any.<span style="color:#a00;"> <b>(New)</b></span><br/><br/>
226
  <script type="text/javascript">deftcheckinfo();</script>
@@ -230,21 +230,21 @@ function quick_adsense_2_section_text() {
230
  <td style="width:110px"><?php _e('Appearance :'); ?></td>
231
  <td>
232
  <span>[ </span>
233
- <input type="checkbox" id="AppPost" name="quick_adsense_2_options[AppPost]" value="true" <?php if(isset($options['AppPost']) && ($options['AppPost'] == 'true')){echo('checked');} ?> /> <?php _e('Posts'); ?>
234
- <input type="checkbox" id="AppPage" name="quick_adsense_2_options[AppPage]" value="true" <?php if(isset($options['AppPage']) && ($options['AppPage'] == 'true')){echo('checked');} ?> /> <?php _e('Pages'); ?>
235
  <span> ]</span><br/>
236
  <span>[ </span>
237
- <input type="checkbox" id="AppHome" name="quick_adsense_2_options[AppHome]" value="true" <?php if(isset($options['AppHome']) && ($options['AppHome'] == 'true')){echo('checked');} ?> /> <?php _e('Homepage'); ?>
238
- <input type="checkbox" id="AppCate" name="quick_adsense_2_options[AppCate]" value="true" <?php if(isset($options['AppCate']) && ($options['AppCate'] == 'true')){echo('checked');} ?> /> <?php _e('Categories'); ?>
239
- <input type="checkbox" id="AppArch" name="quick_adsense_2_options[AppArch]" value="true" <?php if(isset($options['AppArch']) && ($options['AppArch'] == 'true')){echo('checked');} ?> /> <?php _e('Archives'); ?>
240
- <input type="checkbox" id="AppTags" name="quick_adsense_2_options[AppTags]" value="true" <?php if(isset($options['AppTags']) && ($options['AppTags'] == 'true')){echo('checked');} ?> /> <?php _e('Tags'); ?>
241
  <span> ] &rarr; </span>
242
- <input type="checkbox" id="AppMaxA" name="quick_adsense_2_options[AppMaxA]" value="true" <?php if(isset($options['AppMaxA']) && ($options['AppMaxA'] == 'true')){echo('checked');} ?> /> <?php _e('Place all possible Ads on these pages.'); ?><br/>
243
  <span>[ </span>
244
- <input type="checkbox" id="AppSide" name="quick_adsense_2_options[AppSide]" value="true" <?php if(isset($options['AppSide']) && ($options['AppSide'] == 'true')){echo('checked');} ?> /> <?php _e('Disable AdsWidget on Homepage'); ?>
245
  <span> ]</span><br/>
246
  <span>[ </span>
247
- <input type="checkbox" id="AppLogg" name="quick_adsense_2_options[AppLogg]" value="true" <?php if(isset($options['AppLogg']) && ($options['AppLogg'] == 'true')){echo('checked');} ?> /> <?php _e('Hide Ads when user is logged in to Wordpress'); ?>
248
  <span> ]</span><br/><br/>
249
  </td>
250
  </tr>
@@ -264,10 +264,10 @@ function quick_adsense_2_section_text() {
264
  <li><?php _e('Insert <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBegin--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffMiddle--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffEnd--&gt;</span> to <b>disable Ads at Beginning, Middle</b> or <b>End of Post</b>.'); ?><span style="color:#a00;"> <b>(New)</b></span></li>
265
  <li><?php _e('Insert <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffAfMore--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBfLastPara--&gt;</span> to <b>disable Ads right after the <span style="font-family:Courier New,Courier,Fixed;">&lt;!--more--&gt;</span> tag</b>, or <b>right before the last Paragraph</b>.'); ?><span style="color:#a00;"> <b>(New)</b></span></li>
266
  </ol>
267
- [ <input type="checkbox" id="QckTags" name="quick_adsense_2_options[QckTags]" value="true" <?php if(isset($options['QckTags']) && ($options['QckTags'] == 'true')){echo('checked');} ?> /> <?php _e('Show Quicktag Buttons on the HTML Edit Post SubPanel'); ?> ]<br/>
268
- [ <input type="checkbox" id="QckRnds" name="quick_adsense_2_options[QckRnds]" value="true" <?php if(isset($options['QckRnds']) && ($options['QckRnds'] == 'true')){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--RndAds--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
269
- [ <input type="checkbox" id="QckOffs" name="quick_adsense_2_options[QckOffs]" value="true" <?php if(isset($options['QckOffs']) && ($options['QckOffs'] == 'true')){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--NoAds--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffDef--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffWidget--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
270
- [ <input type="checkbox" id="QckOfPs" name="quick_adsense_2_options[QckOfPs]" value="true" <?php if(isset($options['QckOfPs']) && ($options['QckOfPs'] == 'true')){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBegin--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffMiddle--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffEnd--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffAfMore--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBfLastPara--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
271
  <span class="description" style="display:block;font-style:italic;padding-top:10px"><?php _e('Tags can be inserted into a post via the additional Quicktag Buttons at the HTML Edit Post SubPanel.'); ?></span><br/>
272
  </td>
273
  </tr>
20
 
21
  function quick_adsense_2_settings_page() { ?>
22
  <div class="wrap">
23
+ <h2>Quick Adsense Setting <span style="font-size: 9pt; font-style: italic">( Version 2.0.1 )</span></h2>
24
  <form method="post" action="options.php" name="wp_auto_commenter_form">
25
  <?php settings_fields('quick_adsense_2_options'); ?>
26
  <?php do_settings_sections('quick-adsense-2'); ?>
141
  <tr valign="top">
142
  <td style="width:110px"><?php _e('Position :<br/>(Default)'); ?></td>
143
  <td>
144
+ <input type="checkbox" id="BegnAds" name="quick_adsense_2_options[BegnAds]" value="true" <?php if(isset($options['BegnAds'])){echo('checked');} ?> onchange="checkinfo1('BegnRnd',this)" />
145
  <?php _e('Assign') ; ?>
146
  <select id="BegnRnd" name="quick_adsense_2_options[BegnRnd]" onchange="selectinfo(this)">
147
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
150
  </select>
151
  <?php _e('to <b>Beginning of Post</b>') ?><br/>
152
 
153
+ <input type="checkbox" id="MiddAds" name="quick_adsense_2_options[MiddAds]" value="false" <?php if(isset($options['MiddAds'])){echo('checked');} ?> onchange="checkinfo1('MiddRnd',this)" />
154
  <?php _e('Assign') ; ?>
155
  <select id="MiddRnd" name="quick_adsense_2_options[MiddRnd]" onchange="selectinfo(this)">
156
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
159
  </select>
160
  <?php _e('to <b>Middle of Post</b>') ?><br/>
161
 
162
+ <input type="checkbox" id="EndiAds" name="quick_adsense_2_options[EndiAds]" value="false" <?php if(isset($options['EndiAds'])){echo('checked');} ?> onchange="checkinfo1('EndiRnd',this)" />
163
  <?php _e('Assign') ; ?>
164
  <select id="EndiRnd" name="quick_adsense_2_options[EndiRnd]" onchange="selectinfo(this)">
165
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
168
  </select>
169
  <?php _e('to <b>End of Post</b>') ?><br/>
170
 
171
+ <input type="checkbox" id="MoreAds" name="quick_adsense_2_options[MoreAds]" value="false" <?php if(isset($options['MoreAds'])){echo('checked');} ?> onchange="checkinfo1('MoreRnd',this)" />
172
  <?php _e('Assign') ; ?>
173
  <select id="MoreRnd" name="quick_adsense_2_options[MoreRnd]" onchange="selectinfo(this)">
174
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
178
  <?php _e('right after <b>the') ?>
179
  <span style="font-family:Courier New,Courier,Fixed;">&lt;!--more--&gt;</span> <?php _e('tag') ?></b><br/>
180
 
181
+ <input type="checkbox" id="LapaAds" name="quick_adsense_2_options[LapaAds]" value="false" <?php if(isset($options['LapaAds'])){echo('checked');} ?> onchange="checkinfo1('LapaRnd',this)" />
182
  <?php _e('Assign') ; ?>
183
  <select id="LapaRnd" name="quick_adsense_2_options[LapaRnd]" onchange="selectinfo(this)">
184
  <?php for ($i=0;$i<=$QData['Ads'];$i++) { ?>
188
  <?php _e('right before <b>the last Paragraph</b>') ?><span style="color:#a00;"> <b>(New)</b></span><br/>
189
 
190
  <?php for($j = 1; $j <= 3; $j++) { ?>
191
+ <input type="checkbox" id="Par<?php echo $j; ?>Ads" name="quick_adsense_2_options[Par<?php echo $j; ?>Ads]" value="false" <?php if(isset($options['Par'.$j.'Ads'])){echo('checked');} ?> onchange="checkinfo2(this,'Par<?php echo $j; ?>Rnd','Par<?php echo $j; ?>Nup','Par<?php echo $j; ?>Con')" />
192
  <?php _e('Assign') ; ?>
193
  <select id="Par<?php echo $j; ?>Rnd" name="quick_adsense_2_options[Par<?php echo $j; ?>Rnd]" onchange="selectinfo(this)">
194
  <?php for ($i = 0; $i <= $QData['Ads']; $i++) { ?>
203
  <?php } ?>
204
  </select> &rarr;
205
 
206
+ <input type="checkbox" id="Par<?php echo $j; ?>Con" name="quick_adsense_2_options[Par<?php echo $j; ?>Con]" value="false" <?php if(isset($options['Par'.$j.'Con'])){echo('checked');} ?> />
207
  <?php _e('to <b>End of Post</b> if fewer paragraphs are found.') ; ?><br/>
208
  <?php } ?>
209
 
210
+ <input type="checkbox" id="Img1Ads" name="quick_adsense_2_options[Img1Ads]" value="false" <?php if(isset($options['Img1Ads'])){echo('checked');} ?> onchange="checkinfo2(this,'Img1Rnd','Img1Nup','Img1Con')" />
211
  <?php _e('Assign') ; ?>
212
  <select id="Img1Rnd" name="quick_adsense_2_options[Img1Rnd]" onchange="selectinfo(this)">
213
  <?php for ($i = 0; $i <= $QData['Ads']; $i++) { ?>
220
  <option id="Opt1Im<?php echo $i; ?>" value="<?php echo $i; ?>" <?php if(isset($options['Img1Nup']) && $options['Img1Nup']==(string)$i){echo('selected');} ?>><?php echo $i; ?></option>
221
  <?php } ?>
222
  </select> &rarr;
223
+ <input type="checkbox" id="Img1Con" name="quick_adsense_2_options[Img1Con]" value="false" <?php if(isset($options['Img1Con'])){echo('checked');} ?> />
224
  <?php _e('after <b>Image&#39;s outer</b>'); ?>
225
  <b><span style="font-family:Courier New,Courier,Fixed;"> &lt;div&gt; wp-caption</span></b> if any.<span style="color:#a00;"> <b>(New)</b></span><br/><br/>
226
  <script type="text/javascript">deftcheckinfo();</script>
230
  <td style="width:110px"><?php _e('Appearance :'); ?></td>
231
  <td>
232
  <span>[ </span>
233
+ <input type="checkbox" id="AppPost" name="quick_adsense_2_options[AppPost]" value="true" <?php if(isset($options['AppPost'])){echo('checked');} ?> /> <?php _e('Posts'); ?>
234
+ <input type="checkbox" id="AppPage" name="quick_adsense_2_options[AppPage]" value="true" <?php if(isset($options['AppPage'])){echo('checked');} ?> /> <?php _e('Pages'); ?>
235
  <span> ]</span><br/>
236
  <span>[ </span>
237
+ <input type="checkbox" id="AppHome" name="quick_adsense_2_options[AppHome]" value="true" <?php if(isset($options['AppHome'])){echo('checked');} ?> /> <?php _e('Homepage'); ?>
238
+ <input type="checkbox" id="AppCate" name="quick_adsense_2_options[AppCate]" value="true" <?php if(isset($options['AppCate'])){echo('checked');} ?> /> <?php _e('Categories'); ?>
239
+ <input type="checkbox" id="AppArch" name="quick_adsense_2_options[AppArch]" value="true" <?php if(isset($options['AppArch'])){echo('checked');} ?> /> <?php _e('Archives'); ?>
240
+ <input type="checkbox" id="AppTags" name="quick_adsense_2_options[AppTags]" value="true" <?php if(isset($options['AppTags'])){echo('checked');} ?> /> <?php _e('Tags'); ?>
241
  <span> ] &rarr; </span>
242
+ <input type="checkbox" id="AppMaxA" name="quick_adsense_2_options[AppMaxA]" value="true" <?php if(isset($options['AppMaxA'])){echo('checked');} ?> /> <?php _e('Place all possible Ads on these pages.'); ?><br/>
243
  <span>[ </span>
244
+ <input type="checkbox" id="AppSide" name="quick_adsense_2_options[AppSide]" value="true" <?php if(isset($options['AppSide'])){echo('checked');} ?> /> <?php _e('Disable AdsWidget on Homepage'); ?>
245
  <span> ]</span><br/>
246
  <span>[ </span>
247
+ <input type="checkbox" id="AppLogg" name="quick_adsense_2_options[AppLogg]" value="true" <?php if(isset($options['AppLogg'])){echo('checked');} ?> /> <?php _e('Hide Ads when user is logged in to Wordpress'); ?>
248
  <span> ]</span><br/><br/>
249
  </td>
250
  </tr>
264
  <li><?php _e('Insert <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBegin--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffMiddle--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffEnd--&gt;</span> to <b>disable Ads at Beginning, Middle</b> or <b>End of Post</b>.'); ?><span style="color:#a00;"> <b>(New)</b></span></li>
265
  <li><?php _e('Insert <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffAfMore--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBfLastPara--&gt;</span> to <b>disable Ads right after the <span style="font-family:Courier New,Courier,Fixed;">&lt;!--more--&gt;</span> tag</b>, or <b>right before the last Paragraph</b>.'); ?><span style="color:#a00;"> <b>(New)</b></span></li>
266
  </ol>
267
+ [ <input type="checkbox" id="QckTags" name="quick_adsense_2_options[QckTags]" value="true" <?php if(isset($options['QckTags'])){echo('checked');} ?> /> <?php _e('Show Quicktag Buttons on the HTML Edit Post SubPanel'); ?> ]<br/>
268
+ [ <input type="checkbox" id="QckRnds" name="quick_adsense_2_options[QckRnds]" value="true" <?php if(isset($options['QckRnds'])){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--RndAds--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
269
+ [ <input type="checkbox" id="QckOffs" name="quick_adsense_2_options[QckOffs]" value="true" <?php if(isset($options['QckOffs'])){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--NoAds--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffDef--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffWidget--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
270
+ [ <input type="checkbox" id="QckOfPs" name="quick_adsense_2_options[QckOfPs]" value="true" <?php if(isset($options['QckOfPs'])){echo('checked');} ?> /> <?php _e('Hide <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBegin--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffMiddle--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffEnd--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffAfMore--&gt;</span>, <span style="font-family:Courier New,Courier,Fixed;color:#050">&lt;!--OffBfLastPara--&gt;</span> from Quicktag Buttons'); ?> ]<br/>
271
  <span class="description" style="display:block;font-style:italic;padding-top:10px"><?php _e('Tags can be inserted into a post via the additional Quicktag Buttons at the HTML Edit Post SubPanel.'); ?></span><br/>
272
  </td>
273
  </tr>
quick-adsense.php CHANGED
@@ -3,8 +3,8 @@
3
  Plugin Name: Quick Adsense
4
  Plugin URI: http://quickadsense.com/
5
  Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
6
- Author: quickadsense
7
- Version: 1.9.4
8
  Author URI: http://quickadsense.com/
9
  */
10
  /*
3
  Plugin Name: Quick Adsense
4
  Plugin URI: http://quickadsense.com/
5
  Description: Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
6
+ Author: Quicksense
7
+ Version: 2.0.1
8
  Author URI: http://quickadsense.com/
9
  */
10
  /*
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: quickadsense
3
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
4
  Requires at least: 4.0
5
- Tested up to: 4.8.1
6
- Stable tag: 1.9.4
7
 
8
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
9
 
@@ -47,13 +47,16 @@ Sign up for a [Google Adsense Account](http://adsense.google.com/) to generate r
47
 
48
  Please feedback to [http://quickadsense.com/](http://quickadsense.com/) for any bug you might have found, or any suggestion you like to add.
49
 
50
- == Change Log ==
 
 
 
 
51
 
52
- = 1.9.4 =
53
- * The number of individual database calls has been reduced from 80 to just 1, also almost all of the legacy code has been altered and code base re-structured to be better understandable.
54
- * Security: improved.
55
  * Info update.
56
- * Date: 20-September-2017
57
 
58
  = 1.9.3 =
59
  * Info update.
2
  Contributors: quickadsense
3
  Tags: WordPress Plugin, adsense, google adsense, random adsense, random ads, advertising, adsense insertion, ad manager, ad, yahoo, google, ads, text insertion, widget, sidebar, admin, posts, plugin
4
  Requires at least: 4.0
5
+ Tested up to: 4.9.1
6
+ Stable tag: 2.0.1
7
 
8
  Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.
9
 
47
 
48
  Please feedback to [http://quickadsense.com/](http://quickadsense.com/) for any bug you might have found, or any suggestion you like to add.
49
 
50
+ == Change Log ==
51
+
52
+ = 2.0.1 =
53
+ * Bug Fix: Fixed a bug which caused a JS error in specific use cases.
54
+ * Date: 19-December-2017
55
 
56
+ = 2.0 =
57
+ * The number of individual database calls has been reduced from 80 to just 1, also almost all of the legacy code has been altered and code base re-structured to be better understandable.
 
58
  * Info update.
59
+ * Date: 14-September-2017
60
 
61
  = 1.9.3 =
62
  * Info update.
screenshot-1.png CHANGED
File without changes
screenshot-2.png CHANGED
File without changes