PluginProbe
Taboola / 1.0.2
Taboola v1.0.2
1.0.4 1.0.5 1.0.6 1.0.8 2.0.1 2.0.2 2.1.0 2.1.1 2.2.2 2.2.3 3.0.0 3.0.1 3.0.2 3.1.0 trunk 1.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.2 1.0.3
← All changes | settings.php +12 -99 1.0.141.0.2 View file →
@@ -85,26 +85,8 @@
85 85 margin-top: 10px;
86 86 color: red;
87 87 }
88 88
89 - .toggle_icon{
90 - background: url(<?php echo $this->plugin_url.'img/arrow_right_32.png' ?>) no-repeat;
91 - background-size:contain;
92 - width:24px;
93 - height:24px;
94 - display:inline-block;
95 - vertical-align: middle;
96 - }
97 -
98 - .toggle_icon_on{
99 - -ms-transform: rotate(90deg); /* IE 9 */
100 - -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */
101 - transform: rotate(90deg);
102 - }
103 - .apply_button{
104 - margin-top: 20px !important;
105 - }
106 -
107 89 </style>
108 90
109 91 <div class="taboola-container">
110 92 <img src='<?php echo $this->plugin_url.'img/taboola.png' ?>' style='width:200px;'/>
@@ -114,9 +96,9 @@
114 96 <table>
115 97 <tr>
116 98 <td>Publisher ID</td>
117 99 <td>
118 - <input type="text" name="publisher_id" placeholder="publisher" value="<?php echo !empty($settings->publisher_id) ? htmlspecialchars($settings->publisher_id) : '' ?>"/>
100 + <input type="text" name="publisher_id" placeholder="publisher" value="<?php echo htmlspecialchars($settings->publisher_id) ?>"/>
119 101 </td>
120 102 <td class='tooltip'>
121 103 <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
122 104 <div>Please contact your Taboola representative to receive the Publisher ID </div>
@@ -124,9 +106,9 @@
124 106 </tr>
125 107 <tr>
126 108 <td colspan='2' style='line-height: 26px; font-size: 13px;'>
127 109 Don't have a Publisher ID?
128 - <a style='float: inherit; margin-left:5px;' class='request_link' href=' https://taboola.com/contact' target='_blank'>Contact Taboola</a>
110 + <a style='float: inherit; margin-left:5px; class='request_link' href=' http://taboola.com/contact' target='_blank'>Contact Taboola here</a>
129 111 </td>
130 112 </tr>
131 113 </table>
132 114
@@ -132,9 +114,9 @@
132 114
133 115 <hr style='margin-bottom: 25px; margin-top: 5px;'>
134 116
135 117 <div class='checkbox'>
136 - <input id="first_bc_enabled" type="checkbox" <?php echo !empty($settings->first_bc_enabled) ? "checked='checked'" : "" ?> name="first_bc_enabled"/>
118 + <input id="first_bc_enabled" type="checkbox" <?php echo $settings->first_bc_enabled ? "checked='checked'" : "" ?> name="first_bc_enabled"/>
137 119 Below Article
138 120 </div>
139 121 <table>
140 122 <tr>
@@ -139,9 +121,9 @@
139 121 <table>
140 122 <tr>
141 123 <td>Widget ID</td>
142 124 <td>
143 - <input type="text" value="<?php echo !empty($settings->first_bc_widget_id) ? htmlspecialchars($settings->first_bc_widget_id) : '' ?>" name="first_bc_widget_id" placeholder="Widget ID" />
125 + <input type="text" value="<?php echo $settings->first_bc_widget_id ?>" name="first_bc_widget_id" placeholder="Widget ID" />
144 126 </td>
145 127 <td class='tooltip'>
146 128 <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
147 129 <div>Please contact your Taboola representative to receive the Widget ID</div>
@@ -151,9 +133,9 @@
151 133 </table>
152 134 <hr>
153 135
154 136 <div class='checkbox'>
155 - <input id="second_bc_enabled" type="checkbox" <?php echo !empty($settings->second_bc_enabled) ? "checked='checked'" : "" ?> name="second_bc_enabled"/>
137 + <input id="second_bc_enabled" type="checkbox" <?php echo $settings->second_bc_enabled ? "checked='checked'" : "" ?> name="second_bc_enabled"/>
156 138 Below Article 2nd
157 139 </div>
158 140
159 141 <table>
@@ -159,9 +141,9 @@
159 141 <table>
160 142 <tr>
161 143 <td>Widget ID</td>
162 144 <td>
163 - <input type="text" value="<?php echo !empty($settings->second_bc_widget_id) ? htmlspecialchars($settings->second_bc_widget_id) : '' ?>" name="second_bc_widget_id" placeholder="Widget ID" />
145 + <input type="text" value="<?php echo htmlspecialchars($settings->second_bc_widget_id) ?>" name="second_bc_widget_id" placeholder="Widget ID" />
164 146 </td>
165 147 <td class='tooltip'>
166 148 <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
167 149 <div>Please contact your Taboola representative to receive the Widget ID</div>
@@ -170,71 +152,16 @@
170 152
171 153 </table>
172 154 <hr style='border-bottom: 1px solid #fafafa;'>
173 155
174 - <?php $location_defined = !empty($settings->location_string); ?>
175 -
176 -
177 - <div class='toggle_intercept checkbox'>
178 - <?php if ($location_defined): ?>
179 - <div class='toggle_icon toggle_icon_on'></div>
180 - Advanced Settings
181 - </div>
182 - <table class='location_section'>
183 -
184 - <?php else: ?>
185 - <div class='toggle_icon'></div>
186 - Advanced Settings
187 - </div>
188 - <table class='location_section' style='display:none'>
189 -
190 - <?php endif; ?>
191 -
192 - <tr>
193 - <td>Location</td>
194 - <td>
195 - <input type="text" value="<?php echo !empty($settings->location_string) ? htmlspecialchars($settings->location_string) : '' ?>" name="location_string" placeholder="" />
196 - </td>
197 - <td class='tooltip'>
198 - <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
199 - <div>This field controls the location of these widgets on the page. If you would like to move your widget from its default location directly below the article a Taboola representative will provide you with the necessary information.</div>
200 - </td>
201 - </tr>
202 - <tr>
203 - <td colspan="2"> <div class='checkbox'>
204 - <input id="out_of_content_enabled" type="checkbox" <?php echo !empty($settings->out_of_content_enabled) ? "checked='checked'" : "" ?> name="out_of_content_enabled"/>
205 - Place widget after main content DOM element
206 - </div></td>
207 - <td class='tooltip'>
208 - <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
209 - <div>This may be disabled if your website doesn't use Taboola's "Read more" feature, or if the widget is not placed correctly. DO NOT disable it if your widget includes "Read More"</div>
210 - </td>
211 -
212 - </tr>
213 -
214 - </table>
215 - <input class='button-secondary apply_button' type="submit" value="Apply Changes ✔"/>
216 - <!-- <a class='request_link' href=' https://taboola.com/contact' target='_blank'>Request Widget</a> -->
156 + <input class='button-secondary' type="submit" value="Apply Changes ✔"/>
157 + <!-- <a class='request_link' href=' http://taboola.com/contact' target='_blank'>Request Widget</a> -->
217 158 </form>
218 159 <div style='clear:both'></div>
219 -
220 160 <?php
221 - $logPublisher = empty($settings->publisher_id) ? "wordpressplugin" : $settings->publisher_id;
222 - $userDetails = wp_get_current_user();
223 - $detailsString = $userDetails->first_name." ".$userDetails->last_name;
224 - ?>
225 - <img src="https://logs-01.loggly.com/inputs/d14862f3-64ad-49ca-b28d-1b5d155414ec.gif?source=wp&type=settings&pub=<?=$logPublisher?>&user=<?=urlencode($detailsString)?>&email=<?=urlencode($userDetails->user_email)?>&url=<?=urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}")?>"/>
226 - <!-- <form name="install_log" style="display:none;" method="post" action="http://logs-01.loggly.com/inputs/d14862f3-64ad-49ca-b28d-1b5d155414ec/tag/http/">
227 - <input name="tim" type="hidden" value="<?=date("H:i:s.000")?>">
228 - <input name="pub" type="hidden" value="<?=$logPublisher?>">
229 - <input name="data" type="hideen" value="WORDPRESS_PLUGIN_INSTALL|<?="//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}|{$detailsString}"?>">
230 - </form> -->
231 -
232 - <?php
233 161 if($_SERVER['REQUEST_METHOD'] == 'POST' && count($taboola_errors) == 0){
234 162 echo "<span class='label-success'>Your changes have been made! You can now see them on your site</span>";
235 163 }
236 -
237 164 if(count($taboola_errors) > 0){
238 165 for($i = 0; $i < count($taboola_errors); $i++){
239 166 echo "<span class='label-error'>".$taboola_errors[$i]."</span>";
240 167 }
@@ -243,12 +170,12 @@
243 170 </div>
244 171 <script>
245 172 function sync_checkboxes(){
246 173 if(jQuery('#first_bc_enabled').attr("checked")){
247 - jQuery('#second_bc_enabled').attr('disabled',false)
174 + jQuery('#second_bc_enabled').prop('disabled',false)
248 175 } else {
249 - jQuery('#second_bc_enabled').attr('checked', false);
250 - jQuery('#second_bc_enabled').attr('disabled',true)
176 + jQuery('#second_bc_enabled').prop('checked', false);
177 + jQuery('#second_bc_enabled').prop('disabled',true)
251 178 }
252 179 }
253 180 jQuery('#first_bc_enabled').change(sync_checkboxes);
254 181 setTimeout(function(){jQuery('.label-success').fadeOut()}, 6000);
@@ -253,19 +180,5 @@
253 180 jQuery('#first_bc_enabled').change(sync_checkboxes);
254 181 setTimeout(function(){jQuery('.label-success').fadeOut()}, 6000);
255 182 setTimeout(function(){jQuery('.label-error').fadeOut()}, 6000);
256 183 sync_checkboxes()
257 -
258 - jQuery('.toggle_intercept').click(function(){
259 - if (jQuery('.location_section').fadeToggle != undefined){
260 - jQuery('.location_section').fadeToggle('fast');
261 - }else{
262 - jQuery('.location_section').toggle();
263 - }
264 - jQuery('.toggle_icon').toggleClass('toggle_icon_on');
265 - });
266 -
267 - window.onload = function(){
268 - document.forms['install_log'].submit()
269 -
270 - }
271 -</script>
184 +</script>