| @@ -100,9 +100,9 @@ | ||
| 100 | 100 | // inserting all the data to datbase |
| 101 | 101 | // ---------------------------------------------- |
| 102 | 102 | |
| 103 | 103 | $plugin_data = $array_key_name . "***" . $array_item_value; |
| 104 | - $plugin_data = yydev_phone_btn_mysql_prep($plugin_data); | |
| 104 | + $plugin_data = sanitize_text_field($plugin_data); | |
| 105 | 105 | |
| 106 | 106 | // update optuon on the database into wp_options |
| 107 | 107 | update_option($wp_options_name, $plugin_data); |
| 108 | 108 | |
| @@ -166,25 +166,25 @@ | ||
| 166 | 166 | </div><!--yydev_phone_btn_line--> |
| 167 | 167 | |
| 168 | 168 | <div class="yydev_phone_btn_line"> |
| 169 | 169 | <label for="phone_number">Phone Number: </label> |
| 170 | - <input type="text" id="phone_number" class="input-short" name="phone_number" value="<?php echo $plugin_data_array['phone_number']; ?>" /> | |
| 170 | + <input type="text" id="phone_number" class="input-short" name="phone_number" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['phone_number']); ?>" /> | |
| 171 | 171 | <small>Example: 0999999999</small> |
| 172 | 172 | </div><!--yydev_phone_btn_line--> |
| 173 | 173 | |
| 174 | 174 | <div class="yydev_phone_btn_line"> |
| 175 | 175 | <label for="button_width">Button Width: </label> |
| 176 | - <input type="text" id="button_width" class="input-very-short" name="button_width" value="<?php echo $plugin_data_array['button_width']; ?>" /> PX | |
| 176 | + <input type="text" id="button_width" class="input-very-short" name="button_width" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['button_width']); ?>" /> PX | |
| 177 | 177 | </div><!--yydev_phone_btn_line--> |
| 178 | 178 | |
| 179 | 179 | <div class="yydev_phone_btn_line"> |
| 180 | 180 | <label for="button_height">Button Height: </label> |
| 181 | - <input type="text" id="button_height" class="input-very-short" name="button_height" value="<?php echo $plugin_data_array['button_height']; ?>" /> PX | |
| 181 | + <input type="text" id="button_height" class="input-very-short" name="button_height" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['button_height']); ?>" /> PX | |
| 182 | 182 | </div><!--yydev_phone_btn_line--> |
| 183 | 183 | |
| 184 | 184 | <div class="yydev_phone_btn_line"> |
| 185 | 185 | <label for="border_radius">Border Radius (Button Roundness): </label> |
| 186 | - <input type="text" id="border_radius" class="input-very-short" name="border_radius" value="<?php echo $plugin_data_array['border_radius']; ?>" /> | |
| 186 | + <input type="text" id="border_radius" class="input-very-short" name="border_radius" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['border_radius']); ?>" /> | |
| 187 | 187 | <small>Examples: 10px, 50%</small> |
| 188 | 188 | </div><!--yydev_phone_btn_line--> |
| 189 | 189 | |
| 190 | 190 | <div class="yydev_phone_btn_line"> |
| @@ -195,9 +195,9 @@ | ||
| 195 | 195 | <option value="right" <?php if ($plugin_data_array['horizontal_position'] == "right") {echo "selected";} ?> >Right</option> |
| 196 | 196 | </select> |
| 197 | 197 | |
| 198 | 198 | <label for="horizontal_spacing">Horizontal Spacing: </label> |
| 199 | - <input type="text" id="horizontal_spacing" class="input-very-short" name="horizontal_spacing" value="<?php echo $plugin_data_array['horizontal_spacing']; ?>" /> | |
| 199 | + <input type="text" id="horizontal_spacing" class="input-very-short" name="horizontal_spacing" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['horizontal_spacing']); ?>" /> | |
| 200 | 200 | <small>Examples: 10px, 50%</small> |
| 201 | 201 | </div><!--yydev_phone_btn_line--> |
| 202 | 202 | |
| 203 | 203 | |
| @@ -209,40 +209,40 @@ | ||
| 209 | 209 | <option value="bottom" <?php if ($plugin_data_array['vertical_position'] == "bottom") {echo "selected";} ?> >Bottom</option> |
| 210 | 210 | </select> |
| 211 | 211 | |
| 212 | 212 | <label for="vertical_spacing">Vertical Spacing: </label> |
| 213 | - <input type="text" id="vertical_spacing" class="input-very-short" name="vertical_spacing" value="<?php echo $plugin_data_array['vertical_spacing']; ?>" /> | |
| 213 | + <input type="text" id="vertical_spacing" class="input-very-short" name="vertical_spacing" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['vertical_spacing']); ?>" /> | |
| 214 | 214 | <small>Examples: 10px, 50%</small> |
| 215 | 215 | </div><!--yydev_phone_btn_line--> |
| 216 | 216 | |
| 217 | 217 | <div class="yydev_phone_btn_line"> |
| 218 | 218 | <label for="background_color">Background color hex: </label> |
| 219 | - <input type="text" id="background_color" class="input-long" name="background_color" value="<?php echo $plugin_data_array['background_color']; ?>" /> | |
| 219 | + <input type="text" id="background_color" class="input-long" name="background_color" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['background_color']); ?>" /> | |
| 220 | 220 | <small>Example: #09547c</small> |
| 221 | 221 | </div><!--yydev_phone_btn_line--> |
| 222 | 222 | |
| 223 | 223 | <div class="yydev_phone_btn_line"> |
| 224 | 224 | <label for="background_position">Background icon position: </label> |
| 225 | - <input type="text" id="background_position" class="input-short" name="background_position" value="<?php echo $plugin_data_array['background_position']; ?>" /> | |
| 225 | + <input type="text" id="background_position" class="input-short" name="background_position" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['background_position']); ?>" /> | |
| 226 | 226 | <small>Example: 50% 50%, 10px 10px</small> |
| 227 | 227 | </div><!--yydev_phone_btn_line--> |
| 228 | 228 | |
| 229 | 229 | <div class="yydev_phone_btn_line"> |
| 230 | 230 | <label for="button_z_index">Z-index: </label> |
| 231 | - <input type="text" id="button_z_index" class="input-very-short" name="button_z_index" value="<?php echo $plugin_data_array['button_z_index']; ?>" /> | |
| 231 | + <input type="text" id="button_z_index" class="input-very-short" name="button_z_index" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['button_z_index']); ?>" /> | |
| 232 | 232 | <small>Example: 9999</small> |
| 233 | 233 | </div><!--yydev_phone_btn_line--> |
| 234 | 234 | |
| 235 | 235 | <div class="yydev_phone_btn_line"> |
| 236 | 236 | <label for="button_border">Border Settings: </label> |
| 237 | - <input type="text" id="button_border" class="input-short" name="button_border" value="<?php echo $plugin_data_array['button_border']; ?>" /> | |
| 237 | + <input type="text" id="button_border" class="input-short" name="button_border" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['button_border']); ?>" /> | |
| 238 | 238 | <small>Example: 2px solid #bbdeff, none</small> |
| 239 | 239 | </div><!--yydev_phone_btn_line--> |
| 240 | 240 | |
| 241 | 241 | <div class="yydev_phone_btn_line"> |
| 242 | - <img class="yydev_light_img_bg" style="background:<?php echo $plugin_data_array['background_color']; ?>" src="<?php echo $plugin_data_array['icon_image_url']; ?>" alt="" /> | |
| 242 | + <img class="yydev_light_img_bg" style="background:<?php echo $plugin_data_array['background_color']; ?>" src="<?php echo esc_url($plugin_data_array['icon_image_url']); ?>" alt="" /> | |
| 243 | 243 | <label for="icon_image_url">Custom Icon Url: </label> |
| 244 | - <input type="text" id="icon_image_url" class="input-very-long yydev_image_input" name="icon_image_url" value="<?php echo $plugin_data_array['icon_image_url']; ?>" /> | |
| 244 | + <input type="text" id="icon_image_url" class="input-very-long yydev_image_input" name="icon_image_url" value="<?php echo esc_url($plugin_data_array['icon_image_url']); ?>" /> | |
| 245 | 245 | <input type="button" name="yydev_upload_image" class="yydev_upload_image button-secondary" value="Choose Image..." /> |
| 246 | 246 | |
| 247 | 247 | <div class="clear"></div> |
| 248 | 248 | </div><!--yydev_phone_btn_line--> |
| @@ -262,9 +262,9 @@ | ||
| 262 | 262 | </div><!--yydev_phone_btn_line--> |
| 263 | 263 | |
| 264 | 264 | <div class="yydev_phone_btn_line"> |
| 265 | 265 | <label for="mobile_width">Define mobile screen resolution (affect the 2 checkboxes above): </label> |
| 266 | - <input type="text" id="mobile_width" class="input-very-short" name="mobile_width" value="<?php echo $plugin_data_array['mobile_width']; ?>" /> PX | |
| 266 | + <input type="text" id="mobile_width" class="input-very-short" name="mobile_width" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['mobile_width']); ?>" /> PX | |
| 267 | 267 | </div><!--yydev_phone_btn_line--> |
| 268 | 268 | |
| 269 | 269 | |
| 270 | 270 | <br /> |
| @@ -284,9 +284,9 @@ | ||
| 284 | 284 | <option value="right" <?php if ($plugin_data_array['mobile_horizontal_position'] == "right") {echo "selected";} ?> >Right</option> |
| 285 | 285 | </select> |
| 286 | 286 | |
| 287 | 287 | <label for="mobile_horizontal_spacing">Horizontal Spacing: </label> |
| 288 | - <input type="text" id="mobile_horizontal_spacing" class="input-very-short" name="mobile_horizontal_spacing" value="<?php echo $plugin_data_array['mobile_horizontal_spacing']; ?>" /> | |
| 288 | + <input type="text" id="mobile_horizontal_spacing" class="input-very-short" name="mobile_horizontal_spacing" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['mobile_horizontal_spacing']); ?>" /> | |
| 289 | 289 | <small>Examples: 10px, 50%</small> |
| 290 | 290 | </div><!--yydev_phone_btn_line--> |
| 291 | 291 | |
| 292 | 292 | |
| @@ -298,9 +298,9 @@ | ||
| 298 | 298 | <option value="bottom" <?php if ($plugin_data_array['mobile_vertical_position'] == "bottom") {echo "selected";} ?> >Bottom</option> |
| 299 | 299 | </select> |
| 300 | 300 | |
| 301 | 301 | <label for="mobile_vertical_spacing">Vertical Spacing: </label> |
| 302 | - <input type="text" id="mobile_vertical_spacing" class="input-very-short" name="mobile_vertical_spacing" value="<?php echo $plugin_data_array['mobile_vertical_spacing']; ?>" /> | |
| 302 | + <input type="text" id="mobile_vertical_spacing" class="input-very-short" name="mobile_vertical_spacing" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['mobile_vertical_spacing']); ?>" /> | |
| 303 | 303 | <small>Examples: 10px, 50%</small> |
| 304 | 304 | </div><!--yydev_phone_btn_line--> |
| 305 | 305 | |
| 306 | 306 | <br /> |
| @@ -320,9 +320,9 @@ | ||
| 320 | 320 | <option value="exclude" <?php if($plugin_data_array['exclude_option'] == "exclude") {echo "selected";} ?> >Exclude Pages By ID</option> |
| 321 | 321 | <option value="include" <?php if ($plugin_data_array['exclude_option'] == "include") {echo "selected";} ?> >Include Only On Pages</option> |
| 322 | 322 | </select> |
| 323 | 323 | |
| 324 | - <input type="text" id="exclude_ids" class="input-short" name="exclude_ids" value="<?php echo $plugin_data_array['exclude_ids']; ?>" /> | |
| 324 | + <input type="text" id="exclude_ids" class="input-short" name="exclude_ids" value="<?php echo yydev_phone_btn_html_output($plugin_data_array['exclude_ids']); ?>" /> | |
| 325 | 325 | |
| 326 | 326 | </div><!--yydev_phone_btn_line--> |
| 327 | 327 | |
| 328 | 328 | <br /> |
| @@ -336,6 +336,8 @@ | ||
| 336 | 336 | |
| 337 | 337 | </form> |
| 338 | 338 | |
| 339 | 339 | <br /><br /><br /> |
| 340 | -<span id="footer-thankyou-code">This plugin was create by <a target="_blank" href="https://www.yydevelopment.com">YYDevelopment</a>. If you liked the plugin please give it a <a target="_blank" href="https://wordpress.org/plugins/phone-button/#reviews">5 stars review</a>.</span> | |
| 340 | +<span id="footer-thankyou-code">This plugin was create by <a target="_blank" href="https://www.yydevelopment.com">YYDevelopment</a>. If you liked the plugin please give it a <a target="_blank" href="https://wordpress.org/plugins/phone-button/#reviews">5 stars review</a>. | |
| 341 | +If you want to help support this FREE plugin <a target="_blank" href="https://www.yydevelopment.com/coffee-break/?plugin=phone-button">buy us a coffee</a>.</span> | |
| 342 | +</span> | |
| 341 | 343 | </div><!--wrap--> |