Changeset 3049153
- Timestamp:
- 03/11/2024 01:09:54 PM (2 years ago)
- Location:
- tagembed-widget
- Files:
-
- 28 edited
-
tags/4.7/assets/js/account/tagembed.account.script.js (modified) (2 diffs)
-
tags/4.7/assets/js/customize/tagembed.customize.script.js (modified) (2 diffs)
-
tags/4.7/assets/js/editor/editor.js (modified) (1 diff)
-
tags/4.7/assets/js/feed/tagembed.feed.create.script.js (modified) (1 diff)
-
tags/4.7/assets/js/feed/tagembed.feed.script.js (modified) (10 diffs)
-
tags/4.7/assets/js/lazyload.js (modified) (9 diffs)
-
tags/4.7/assets/js/network/tagembed.networks.script.js (modified) (2 diffs)
-
tags/4.7/assets/js/tagembed.common.js (modified) (7 diffs)
-
tags/4.7/assets/js/tagembed.deactive.js (modified) (1 diff)
-
tags/4.7/assets/js/theme/tagembed.theme.script.js (modified) (2 diffs)
-
tags/4.7/assets/js/upgrade/tagembed.upgrade.script.js (modified) (3 diffs)
-
tags/4.7/assets/js/widget/tagembed.widget.script.js (modified) (3 diffs)
-
tags/4.7/tagembed.php (modified) (17 diffs)
-
tags/4.7/views/includes/headView.php (modified) (2 diffs)
-
tags/4.8/assets/js/editor/editor.js (modified) (1 diff)
-
tags/4.8/assets/js/lazyload.js (modified) (1 diff)
-
tags/4.8/assets/js/tagembed.deactive.js (modified) (1 diff)
-
tags/4.8/assets/js/widget/tagembed.widget.script.js (modified) (3 diffs)
-
tags/4.8/readme.txt (modified) (2 diffs)
-
tags/4.8/tagembed.php (modified) (17 diffs)
-
tags/4.9/assets/js/lazyload.js (modified) (1 diff)
-
tags/4.9/assets/js/tagembed.deactive.js (modified) (1 diff)
-
tags/4.9/assets/js/widget/tagembed.widget.script.js (modified) (3 diffs)
-
tags/4.9/tagembed.php (modified) (16 diffs)
-
trunk/assets/js/lazyload.js (modified) (1 diff)
-
trunk/assets/js/tagembed.deactive.js (modified) (1 diff)
-
trunk/assets/js/widget/tagembed.widget.script.js (modified) (3 diffs)
-
trunk/tagembed.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tagembed-widget/tags/4.7/assets/js/account/tagembed.account.script.js
r3040127 r3049153 65 65 formData = new FormData(formData); 66 66 formData.append('action', 'data'); 67 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 67 68 formData.append('__tagembed__ajax_action', '__tagembed__register'); 68 69 fetch(__tagembed__ajax_url, { … … 126 127 formData = new FormData(formData); 127 128 formData.append('action', 'data'); 129 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 128 130 formData.append('__tagembed__ajax_action', '__tagembed__login'); 129 131 fetch(__tagembed__ajax_url, { -
tagembed-widget/tags/4.7/assets/js/customize/tagembed.customize.script.js
r3040127 r3049153 26 26 formData.append('action', 'data'); 27 27 formData.append('widgetId', widgetId); 28 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 28 29 formData.append('__tagembed__ajax_action', '__tagembed__get_customization_option'); 29 30 __tagembed__open_loader(); … … 285 286 formData.append('action', 'data'); 286 287 formData.append('widgetId', widgetId); 288 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 287 289 formData.append('__tagembed__ajax_action', '__tagembed__update_' + __tagembed__optionType + '_customization_option'); 288 290 __tagembed__open_loader(); -
tagembed-widget/tags/4.7/assets/js/editor/editor.js
r3040127 r3049153 63 63 } 64 64 function __showPreview(event) { 65 if (props.attributes.__widgetId !== '' && props.attributes.__widgetId !== null && typeof (props.attributes.__widgetId) != "undefined") { 65 let regex = /^\d+(px|%|)$/; 66 let extraParameter = (props.attributes.__width !== '' && !regex.test(props.attributes.__width)) || (props.attributes.__height !== '' && !regex.test(props.attributes.__height)); 67 if (!extraParameter && props.attributes.__widgetId !== '' && props.attributes.__widgetId !== null && typeof (props.attributes.__widgetId) != "undefined" && !isNaN(props.attributes.__widgetId)) { 66 68 var parent = jQuery(event.target).closest(".is-selected"); 67 69 parent.children(".__tagembed__tagembed-preview").show(); -
tagembed-widget/tags/4.7/assets/js/feed/tagembed.feed.create.script.js
r3040127 r3049153 51 51 formData.append('filterId', __tagembed__feed_data.filterId); 52 52 formData.append('filterName', __tagembed__feed_data.filterName); 53 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 53 54 formData.append('__tagembed__ajax_action', '__tagembed__create_feed'); 54 55 fetch(__tagembed__ajax_url, { -
tagembed-widget/tags/4.7/assets/js/feed/tagembed.feed.script.js
r3040127 r3049153 196 196 formData.append('action', 'data'); 197 197 formData.append('connectedAccountsId', __tagembed__connected_accountsId); 198 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 198 199 formData.append('__tagembed__ajax_action', '__tagembed__get_facebook_page_albums'); 199 200 fetch(__tagembed__ajax_url, { … … 276 277 formData.append('action', 'data'); 277 278 formData.append('facebookPageData', __tagembed__facebook_search_page); 279 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 278 280 formData.append('__tagembed__ajax_action', '__tagembed__search_facebook_page'); 279 281 fetch(__tagembed__ajax_url, {method: 'POST', headers: {'x-requested-with': 'XMLHttpRequest'}, body: formData, … … 354 356 formData.append('action', 'data'); 355 357 formData.append('googleLocationName', __tagembed__google_location); 358 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 356 359 formData.append('__tagembed__ajax_action', '__tagembed__search_google_location'); 357 360 fetch(__tagembed__ajax_url, { … … 516 519 formData.append('action', 'data'); 517 520 formData.append('youtubeChannelData', __tagembed__youtube_channel_data); 521 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 518 522 formData.append('__tagembed__ajax_action', '__tagembed__search_youtube_channel'); 519 523 fetch(__tagembed__ajax_url, { … … 581 585 let formData = new FormData(); 582 586 formData.append('action', 'data'); 587 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 583 588 formData.append('__tagembed__ajax_action', '__tagembed__get_youtube_playlist'); 584 589 formData.append('youtubeId', youtubeId); … … 802 807 formData.append('connectedAccountsId', __tagembed__get_connected_accountsId); 803 808 formData.append('__tagembed__ajax_action', '__tagembed__get_slack_channel_list'); 809 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 804 810 fetch(__tagembed__ajax_url, {method: 'POST', headers: {'x-requested-with': 'XMLHttpRequest'}, body: formData, 805 811 }).then(response => { … … 955 961 formData.append('action', 'data'); 956 962 formData.append('vkCommunitiesName', __tagembed__vk_communities); 963 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 957 964 formData.append('__tagembed__ajax_action', '__tagembed__search_vk_communities'); 958 965 fetch(__tagembed__ajax_url, { … … 1132 1139 formData.append('status', __tagembed__feed_status); 1133 1140 formData.append('action', 'data'); 1141 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 1134 1142 formData.append('__tagembed__ajax_action', '__tagembed__update_feed_status'); 1135 1143 __tagembed__open_loader(); … … 1180 1188 formData.append('widgetId', __tagembed__widget_id); 1181 1189 formData.append('action', 'data'); 1190 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 1182 1191 formData.append('__tagembed__ajax_action', '__tagembed__delete_feed'); 1183 1192 __tagembed__open_loader(); … … 1224 1233 let formData = new FormData(); 1225 1234 formData.append('action', 'data'); 1235 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 1226 1236 formData.append('__tagembed__ajax_action', '__tagembed__get_feed'); 1227 1237 formData.append('widgetId', __tagembed__widgetId); -
tagembed-widget/tags/4.7/assets/js/lazyload.js
r3040127 r3049153 1 /*!2 * Lazy Load - JavaScript plugin for lazy loading images3 *4 * Copyright (c) 2007-2019 Mika Tuupola5 *6 * Licensed under the MIT license:7 * http://www.opensource.org/licenses/mit-license.php8 *9 * Project home:10 * https://appelsiini.net/projects/lazyload11 *12 * Version: 2.0.0-rc.213 *14 */15 16 1 (function (root, factory) { 17 2 if (typeof exports === "object") { … … 22 7 root.LazyLoad = factory(root); 23 8 } 24 }) (typeof global !== "undefined" ? global : this.window || this.global, function (root) { 25 9 })(typeof global !== "undefined" ? global : this.window || this.global, function (root) { 26 10 "use strict"; 27 28 if (typeof define === "function" && define.amd){ 11 if (typeof define === "function" && define.amd) { 29 12 root = window; 30 13 } 31 32 14 const defaults = { 33 15 src: "data-src", … … 38 20 threshold: 0 39 21 }; 40 41 /** 42 * Merge two or more objects. Returns a new object. 43 * @private 44 * @param {Boolean} deep If true, do a deep (or recursive) merge [optional] 45 * @param {Object} objects The objects to merge together 46 * @returns {Object} Merged values of defaults and options 47 */ 48 const extend = function () { 49 22 const extend = function () { 50 23 let extended = {}; 51 24 let deep = false; 52 25 let i = 0; 53 26 let length = arguments.length; 54 55 /* Check if a deep merge */56 27 if (Object.prototype.toString.call(arguments[0]) === "[object Boolean]") { 57 28 deep = arguments[0]; 58 29 i++; 59 30 } 60 61 /* Merge the object into the extended object */62 31 let merge = function (obj) { 63 32 for (let prop in obj) { … … 72 41 } 73 42 }; 74 75 /* Loop through each object and conduct a merge */76 43 for (; i < length; i++) { 77 44 let obj = arguments[i]; 78 45 merge(obj); 79 46 } 80 81 47 return extended; 82 48 }; 83 84 49 function LazyLoad(images, options) { 85 50 this.settings = extend(defaults, options || {}); … … 88 53 this.init(); 89 54 } 90 91 55 LazyLoad.prototype = { 92 init: function() { 93 94 /* Without observers load everything and bail out early. */ 56 init: function () { 95 57 if (!root.IntersectionObserver) { 96 58 this.loadImages(); 97 59 return; 98 60 } 99 100 61 let self = this; 101 62 let observerConfig = { … … 104 65 threshold: [this.settings.threshold] 105 66 }; 106 107 this.observer = new IntersectionObserver(function(entries) { 67 this.observer = new IntersectionObserver(function (entries) { 108 68 Array.prototype.forEach.call(entries, function (entry) { 109 69 if (entry.isIntersecting) { … … 124 84 }); 125 85 }, observerConfig); 126 127 86 Array.prototype.forEach.call(this.images, function (image) { 128 87 self.observer.observe(image); 129 88 }); 130 89 }, 131 132 90 loadAndDestroy: function () { 133 if (!this.settings) { return; } 91 if (!this.settings) { 92 return; 93 } 134 94 this.loadImages(); 135 95 this.destroy(); 136 96 }, 137 138 97 loadImages: function () { 139 if (!this.settings) { return; } 140 98 if (!this.settings) { 99 return; 100 } 141 101 let self = this; 142 102 Array.prototype.forEach.call(this.images, function (image) { … … 155 115 }); 156 116 }, 157 158 117 destroy: function () { 159 if (!this.settings) { return; } 118 if (!this.settings) { 119 return; 120 } 160 121 this.observer.disconnect(); 161 122 this.settings = null; 162 123 } 163 124 }; 164 165 root.lazyload = function(images, options) { 125 root.lazyload = function (images, options) { 166 126 return new LazyLoad(images, options); 167 127 }; 168 169 128 if (root.jQuery) { 170 129 const $ = root.jQuery; … … 176 135 }; 177 136 } 178 179 137 return LazyLoad; 180 138 }); -
tagembed-widget/tags/4.7/assets/js/network/tagembed.networks.script.js
r3040127 r3049153 9 9 let formData = new FormData(); 10 10 formData.append('action', 'data'); 11 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 11 12 formData.append('__tagembed__ajax_action', '__tagembed__source_networks'); 12 13 __tagembed__open_loader(); … … 55 56 formData.append('networkId', networkId); 56 57 formData.append('action', 'data'); 58 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 57 59 formData.append('__tagembed__ajax_action', '__tagembed__get_network_filter'); 58 60 fetch(__tagembed__ajax_url, { -
tagembed-widget/tags/4.7/assets/js/tagembed.common.js
r3040127 r3049153 31 31 let formData = new FormData(); 32 32 formData.append('action', 'data'); 33 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 33 34 formData.append('__tagembed__ajax_action', '__tagembed__plugin_version'); 34 35 fetch(__tagembed__ajax_url, { … … 146 147 let formData = new FormData(); 147 148 formData.append('action', 'data'); 149 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 148 150 formData.append('__tagembed__ajax_action', '__tagembed__logout'); 149 151 __tagembed__open_loader(); … … 183 185 formData.append('action', 'data'); 184 186 formData.append('menueId', __tagembed__menu_id); 187 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 185 188 formData.append('__tagembed__ajax_action', '__tagembed__menue'); 186 189 fetch(__tagembed__ajax_url, { … … 214 217 formData.append('networkId', __tagembed__network_id); 215 218 formData.append('action', 'data'); 219 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 216 220 formData.append('__tagembed__ajax_action', '__tagembed__get_already_exist_auth'); 217 221 fetch(__tagembed__ajax_url, { … … 258 262 let formData = new FormData(); 259 263 formData.append('action', 'data'); 264 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 260 265 formData.append('__tagembed__ajax_action', '__tagembed__manage_active_widget'); 261 266 formData.append('widgetId', __tagembed__widgetId); … … 307 312 let __tagembed__toast = new TagembedToast; 308 313 formData.append('action', 'data'); 314 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 309 315 formData.append('__tagembed__ajax_action', '__tagembed__create_widget'); 310 316 fetch(__tagembed__ajax_url, { … … 375 381 let formData = new FormData(); 376 382 formData.append('action', 'data'); 383 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 377 384 formData.append('__tagembed__ajax_action', '__tagembed__add_or_update_account'); 378 385 formData.append('type', __tagembed__type); -
tagembed-widget/tags/4.7/assets/js/tagembed.deactive.js
r3040127 r3049153 91 91 formData.append('action', 'data'); 92 92 formData.append('__tagembed__ajax_action', '__tagembed__plugin_deactivate'); 93 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_security_nones_object.__tagembed__ajax_call_security_nones); 93 94 formData.append('betterPlugin', __tagembed__better_plugin_input); 94 95 formData.append('otherReason', __tagembed__other_reason_input); -
tagembed-widget/tags/4.7/assets/js/theme/tagembed.theme.script.js
r3040127 r3049153 12 12 formData.append('action', 'data'); 13 13 formData.append('widgetId', widgetId); 14 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 14 15 formData.append('__tagembed__ajax_action', '__tagembed__get_themes'); 15 16 __tagembed__open_loader(); … … 69 70 formData.append('widgetId', __tagembed__widget_id); 70 71 formData.append('themeId', __tagembed__theme_id); 72 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 71 73 formData.append('__tagembed__ajax_action', '__tagembed__edit_themes'); 72 74 __tagembed__open_loader(); -
tagembed-widget/tags/4.7/assets/js/upgrade/tagembed.upgrade.script.js
r3040127 r3049153 61 61 let formData = new FormData(); 62 62 formData.append('action', 'data'); 63 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 63 64 formData.append('__tagembed__ajax_action', '__tagembed__get_account_details'); 64 65 __tagembed__open_loader(); … … 207 208 let formData = new FormData(); 208 209 formData.append('action', 'data'); 210 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 209 211 formData.append('__tagembed__ajax_action', '__tagembed__make_payment'); 210 212 formData.append('planId', planId); … … 241 243 formData.append('planId', planId); 242 244 formData.append('action', 'data'); 245 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 243 246 formData.append('__tagembed__ajax_action', '__tagembed__cancel_subscription'); 244 247 __tagembed__open_loader(); -
tagembed-widget/tags/4.7/assets/js/widget/tagembed.widget.script.js
r3040127 r3049153 18 18 formData.append('action', 'data'); 19 19 formData.append('widgetId', __tagembed__widget_id); 20 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 20 21 formData.append('__tagembed__ajax_action', '__tagembed__edit_widget'); 21 22 fetch(__tagembed__ajax_url, { … … 73 74 formData.append('status', __tagembed__widget_status); 74 75 formData.append('action', 'data'); 76 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 75 77 formData.append('__tagembed__ajax_action', '__tagembed__update_widget_status'); 76 78 __tagembed__open_loader(); … … 119 121 formData.append('widgetId', __tagembed__widget_id); 120 122 formData.append('action', 'data'); 123 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 121 124 formData.append('__tagembed__ajax_action', '__tagembed__delete_widget'); 122 125 __tagembed__open_loader(); -
tagembed-widget/tags/4.7/tagembed.php
r3040127 r3049153 40 40 wp_enqueue_script('__tagembed__tagemedLoaderJs', TAGEMBED_PLUGIN_URL . '/assets/js/loader.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 41 41 wp_enqueue_script('__tagembed__deactive-js', TAGEMBED_PLUGIN_URL . '/assets/js/tagembed.deactive.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 42 $__tagembed__ajax_call_security_nones = wp_create_nonce('__tagembed__ajax_call_security_nones'); 43 wp_localize_script('__tagembed__deactive-js', '__tagembed__ajax_call_security_nones_object', ['__tagembed__ajax_call_security_nones' => $__tagembed__ajax_call_security_nones]); 42 44 wp_enqueue_script('__tagembed__tagembedDialogFormJs', TAGEMBED_PLUGIN_URL . '/assets/js/dialog.form.js', ["jquery"], TAGEMBED_PLUGIN_VERSION, true); 43 45 /* --Start-- Gutenberge */ … … 78 80 function __tagembed__view() { 79 81 if (!empty(__tagembed__user()->isLogin) && __tagembed__user()->isLogin == 'yes'): 80 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); 82 /* Remove This */ /* $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); */ 83 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 1]); 81 84 if (empty($__tagembed__menus)): 82 85 include_once TAGEMBED_PLUGIN_DIR_PATH . "views/widget/widgetView.php"; … … 96 99 $data = __tagembed__sanitizeRequestData($_REQUEST); 97 100 $data = (object) $data; 101 /* --Start-- Manage Ajax call Request Security */ 102 $__tagembed__ajaxCallSecurityNones = isset($data->__tagembed__ajax_call_nones) ? sanitize_text_field($data->__tagembed__ajax_call_nones) : ''; 103 if (!wp_verify_nonce($__tagembed__ajaxCallSecurityNones, "__tagembed__ajax_call_security_nones")) 104 return __tagembed__exitWithDanger(); 105 /* --End-- Manage Ajax call Request Security */ 106 98 107 /* --Start__ Sanetize All Input */ 99 108 foreach ($data as $key => $value): … … 162 171 return __tagembed__exitWithDanger(); 163 172 break; 173 164 174 case "__tagembed__menue": 165 175 if (empty($data->menueId)) … … 169 179 return __tagembed__exitWithDanger(); 170 180 break; 181 171 182 case "__tagembed__create_widget": 172 183 if (empty($__tagembed__user_details) || empty($data->name)) … … 1072 1083 $user = __tagembed__user($response->emailId); 1073 1084 if (empty($user->email)): 1074 if ($wpdb-> insert('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes"])):1085 if ($wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_user (userId, name, email, accessToken, isLogin) VALUES (%d, %s, %s, %s, %s)", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes'))): 1075 1086 $return = true; 1076 1087 endif; 1077 1088 else: 1078 if ($wpdb-> update('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes",], ['email' => $response->emailId])):1089 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET userId = %d, name = %s, email = %s, accessToken = %s, isLogin = %s WHERE email = %s", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes', $response->emailId))): 1079 1090 $return = true; 1080 1091 endif; … … 1092 1103 global $wpdb; 1093 1104 if ($email == null && $other != null): 1094 $wpdb-> update('wp_tagembed_active_options', ["isLogin" => $other], ['id' => 1]);1105 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET isLogin = %s WHERE id = %d", $other, 1)); 1095 1106 else: 1096 $__tagembed__activeOptions = $wpdb->get_results( "SELECT email FROM wp_tagembed_active_options WHERE(id = 1)");1107 $__tagembed__activeOptions = $wpdb->get_results($wpdb->prepare("SELECT email FROM wp_tagembed_active_options WHERE id = %d", 1)); 1097 1108 if (empty($__tagembed__activeOptions[0]->email)): 1098 $wpdb-> insert('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other]);1109 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_options (email, isLogin) VALUES (%s, %s)", $email, $other)); 1099 1110 else: 1100 $wpdb-> update('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other], ['id' => 1]);1111 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET email = %s, isLogin = %s WHERE id = %d", $email, $other, 1)); 1101 1112 endif; 1102 1113 endif; … … 1106 1117 function __tagembed__getActiveOptions() { 1107 1118 global $wpdb; 1108 $ __tagembed__activeOptions = $wpdb->get_results("SELECT email,isLogin FROM wp_tagembed_active_options WHERE(id = 1)");1119 $results = $wpdb->get_results($wpdb->prepare("SELECT email, isLogin FROM wp_tagembed_active_options WHERE id = %d", 1)); 1109 1120 return $__tagembed__activeOptions; 1110 1121 } … … 1113 1124 function tagembed_logout() { 1114 1125 global $wpdb; 1115 if ($wpdb-> update('wp_tagembed_user', ["isLogin" => "no"], ["isLogin" => "yes"])):1126 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET isLogin = %s WHERE isLogin = %s", "no", "yes"))): 1116 1127 __tagembed__manageActiveOptions(null, "no"); /* Manage Active Options */ 1117 1128 return true; … … 1126 1137 return $wpdb->get_results("SELECT * FROM wp_tagembed_menus"); 1127 1138 if (array_key_exists('__tagembed__menu_condation', $__tagembed__menu_condatation)) 1128 return $wpdb->get_results( "SELECT * FROM wp_tagembed_menus WHERE " . $__tagembed__menu_condatation['__tagembed__menu_condation']);1139 return $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_menus WHERE status = %s", $__tagembed__menu_condatation['__tagembed__menu_condation'])); 1129 1140 if (array_key_exists('__tagembed__menu_id', $__tagembed__menu_condatation)): 1130 if ($wpdb-> update('wp_tagembed_menus', ["status" => 0], ["status" => 1]) && $wpdb->update('wp_tagembed_menus', ["status" => 1], ["id" => $__tagembed__menu_condatation['__tagembed__menu_id']]))1141 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE status = %d", 0, 1)) && $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE id = %d", 1, $__tagembed__menu_condatation['__tagembed__menu_id']))) 1131 1142 return true; 1132 1143 return false; … … 1139 1150 $__tagembed__userResponse = ""; 1140 1151 if (empty($email)): 1141 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(isLogin = 'yes')");1152 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE isLogin = %s", 'yes')); 1142 1153 else: 1143 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(email = '" . $email . "')");1154 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE email = %s", $email)); 1144 1155 endif; 1145 1156 if (!empty($__tagembed__userResponse)) … … 1189 1200 return true; 1190 1201 if (empty($activeWidgetUserId)): 1191 $wpdb-> insert('wp_tagembed_active_widget', ["widgetId" => $widgetId]);1202 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget (widgetId) VALUES (%s)", $widgetId)); 1192 1203 return true; 1193 1204 else: 1194 $wpdb-> update('wp_tagembed_active_widget', ["widgetId" => $widgetId], ['id' => 1]);1205 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget SET widgetId = %s WHERE id = %d", $widgetId, 1)); 1195 1206 return true; 1196 1207 endif; … … 1217 1228 return true; 1218 1229 if (empty($activeWidgetUserId)): 1219 $wpdb-> insert('wp_tagembed_active_widget_user', ["userId" => $userId]);1230 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget_user (userId) VALUES (%d)", $userId)); 1220 1231 return true; 1221 1232 else: 1222 $wpdb-> update('wp_tagembed_active_widget_user', ["userId" => $userId], ['id' => 1]);1233 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget_user SET userId = %d WHERE id = %d", $userId, 1)); 1223 1234 return true; 1224 1235 endif; … … 1242 1253 $__tagembed__menus = [['name' => 'Widget', 'status' => 0, 'path' => 'widget/widgetView'], ['name' => 'Feed', 'status' => 1, 'path' => 'feed/addView'], ['name' => 'Choose Theme', 'status' => 0, 'path' => 'theme/themeView'], ['name' => 'Filter', 'status' => 0, 'path' => 'filter/filterView'], ['name' => 'Customize', 'status' => 0, 'path' => 'customize/customizeView'], ['name' => 'Display', 'status' => 0, 'path' => 'display/displayView'], ['name' => 'Social Accounts', 'status' => 0, 'path' => 'socialAccount/socialAccountView'], ['name' => 'Support', 'status' => 0, 'path' => 'support/supportView'], ['name' => 'Upgrade', 'status' => 0, 'path' => 'upgrade/upgradeView'], ['name' => 'Analytics', 'status' => 0, 'path' => 'analytics/analyticsView']]; 1243 1254 foreach ($__tagembed__menus as $__tagembed__menu): 1244 $wpdb-> insert('wp_tagembed_menus', ["name" => $__tagembed__menu['name'], "status" => $__tagembed__menu['status'], "path" => $__tagembed__menu['path']]);1255 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_menus (name, status, path) VALUES (%s, %s, %s)", $__tagembed__menu['name'], $__tagembed__menu['status'], $__tagembed__menu['path'])); 1245 1256 endforeach; 1246 1257 endif; … … 1289 1300 add_filter("plugin_action_links_" . plugin_basename(__FILE__), '__tagembed__settingsLink'); 1290 1301 /* --End--Manage Setting Link */ 1291 1292 1302 /* --Start--Manage Database On Plugin Update Time */ 1293 1303 function __tagembed__manageDatabaseOnPluginUpdateTime() { … … 1298 1308 add_action('upgrader_process_complete', '__tagembed__manageDatabaseOnPluginUpdateTime', 10, 2); 1299 1309 /* --End--Manage Database On Plugin Update Time */ 1300 1301 1310 /* --Sart--Manage Chat Hide And Show */ 1302 1311 function __tagembed__chat() { … … 1393 1402 /* --End-- Drop Database Table */ 1394 1403 /* --Start-- Create Short Code */ 1404 function __tagembed__PluginShortCode($attr) { 1405 extract(shortcode_atts(['width' => '', 'height' => '',], $attr, 'tagembed')); 1406 $widgetId = (isset($attr[1]) ? $attr[1] : ''); 1407 if (!empty($widgetId) && is_numeric($widgetId) && (($width === '' || preg_match('/^\d+(px|%|)$/', $width)) && ($height === '' || preg_match('/^\d+(px|%|)$/', $height)))): 1408 $output = '<span class=""></span>'; 1409 $output .= '<div style="width:' . $width . '; height:' . $height . ';overflow: auto;" class="tagembed-container">'; 1410 $output .= '<div style="width:100%; height:100%;" class="tagembed-socialwall tagembed-analystic" data-wall-id="' . $widgetId . '"></div>'; 1411 $output .= '</div>'; 1412 else: 1413 $output = '<span style="display: block;text-align: center;border: 1px solid #eee;padding: 5px 15px;background-color: #fafafa;">Invalid Parameters Provided In The Tagembed Shortcode.</span>'; 1414 endif; 1415 return $output; 1416 } 1395 1417 add_shortcode("tagembed", "__tagembed__PluginShortCode"); 1396 function __tagembed__PluginShortCode($attr) {1397 $widgetId = (isset($attr[1]) ? $attr[1] : '');1398 $width = (isset($attr['width']) ? $attr['width'] : '');1399 $height = (isset($attr['height']) ? $attr['height'] : '');1400 $code = '<span class=""></span>';1401 $code .= '<div style="width:' . $width . '; height:' . $height . ';overflow: auto;" class="tagembed-container">';1402 $code .= '<div style="width:100%; height:100%;" class="tagembed-socialwall tagembed-analystic" data-wall-id="' . $widgetId . '"></div>';1403 $code .= '</div>';1404 return $code;1405 }1406 1418 /* --End-- Create Short Code */ 1407 1419 -
tagembed-widget/tags/4.7/views/includes/headView.php
r3040127 r3049153 1 1 <script type="text/javascript"> 2 var __tagembed__ajax_call_nones = "<?php echo wp_create_nonce("__tagembed__ajax_call_security_nones"); ?>"; 2 3 var __tagembed__ajax_url = "<?php echo esc_html(admin_url('admin-ajax.php')); ?>"; 3 4 var __tagembed__plugin_server_url = "<?php echo esc_html(TAGEMBED_PLUGIN_SERVER_URL); ?>"; … … 40 41 let formData = new FormData(); 41 42 formData.append('action', 'data'); 43 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 42 44 formData.append('__tagembed__ajax_action', '__tagembed__check_user_token'); 43 45 fetch(__tagembed__ajax_url, { -
tagembed-widget/tags/4.8/assets/js/editor/editor.js
r3047140 r3049153 63 63 } 64 64 function __showPreview(event) { 65 if (props.attributes.__widgetId !== '' && props.attributes.__widgetId !== null && typeof (props.attributes.__widgetId) != "undefined") { 65 let regex = /^\d+(px|%|)$/; 66 let extraParameter = (props.attributes.__width !== '' && !regex.test(props.attributes.__width)) || (props.attributes.__height !== '' && !regex.test(props.attributes.__height)); 67 if (!extraParameter && props.attributes.__widgetId !== '' && props.attributes.__widgetId !== null && typeof (props.attributes.__widgetId) != "undefined" && !isNaN(props.attributes.__widgetId)) { 66 68 var parent = jQuery(event.target).closest(".is-selected"); 67 69 parent.children(".__tagembed__tagembed-preview").show(); -
tagembed-widget/tags/4.8/assets/js/lazyload.js
r3047140 r3049153 21 21 }; 22 22 const extend = function () { 23 24 23 let extended = {}; 25 24 let deep = false; -
tagembed-widget/tags/4.8/assets/js/tagembed.deactive.js
r3047140 r3049153 91 91 formData.append('action', 'data'); 92 92 formData.append('__tagembed__ajax_action', '__tagembed__plugin_deactivate'); 93 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_security_nones_object.__tagembed__ajax_call_security_nones); 93 94 formData.append('betterPlugin', __tagembed__better_plugin_input); 94 95 formData.append('otherReason', __tagembed__other_reason_input); -
tagembed-widget/tags/4.8/assets/js/widget/tagembed.widget.script.js
r3047140 r3049153 18 18 formData.append('action', 'data'); 19 19 formData.append('widgetId', __tagembed__widget_id); 20 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 20 21 formData.append('__tagembed__ajax_action', '__tagembed__edit_widget'); 21 22 fetch(__tagembed__ajax_url, { … … 73 74 formData.append('status', __tagembed__widget_status); 74 75 formData.append('action', 'data'); 76 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 75 77 formData.append('__tagembed__ajax_action', '__tagembed__update_widget_status'); 76 78 __tagembed__open_loader(); … … 119 121 formData.append('widgetId', __tagembed__widget_id); 120 122 formData.append('action', 'data'); 123 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 121 124 formData.append('__tagembed__ajax_action', '__tagembed__delete_widget'); 122 125 __tagembed__open_loader(); -
tagembed-widget/tags/4.8/readme.txt
r3047140 r3049153 259 259 == Changelog == 260 260 = 4.8 = 261 * Fix Security Nounce 261 * Fix Security Nounce - for Instagram Feed, Facebook Feed, Twitter Feed, Google Reviews, Rss Feed, YouTube Gallery, and more. 262 262 263 263 = 4.7 = … … 504 504 == Upgrade Notice == 505 505 = 4.8 = 506 * Fix Security Nounce 506 * Fix Security Nounce - for Instagram Feed, Facebook Feed, Twitter Feed, Google Reviews, Rss Feed, YouTube Gallery, and more. 507 507 508 508 = 4.7 = -
tagembed-widget/tags/4.8/tagembed.php
r3047140 r3049153 40 40 wp_enqueue_script('__tagembed__tagemedLoaderJs', TAGEMBED_PLUGIN_URL . '/assets/js/loader.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 41 41 wp_enqueue_script('__tagembed__deactive-js', TAGEMBED_PLUGIN_URL . '/assets/js/tagembed.deactive.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 42 $__tagembed__ajax_call_security_nones = wp_create_nonce('__tagembed__ajax_call_security_nones'); 43 wp_localize_script('__tagembed__deactive-js', '__tagembed__ajax_call_security_nones_object', ['__tagembed__ajax_call_security_nones' => $__tagembed__ajax_call_security_nones]); 42 44 wp_enqueue_script('__tagembed__tagembedDialogFormJs', TAGEMBED_PLUGIN_URL . '/assets/js/dialog.form.js', ["jquery"], TAGEMBED_PLUGIN_VERSION, true); 43 45 /* --Start-- Gutenberge */ … … 78 80 function __tagembed__view() { 79 81 if (!empty(__tagembed__user()->isLogin) && __tagembed__user()->isLogin == 'yes'): 80 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); 82 /* Remove This */ /* $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); */ 83 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 1]); 81 84 if (empty($__tagembed__menus)): 82 85 include_once TAGEMBED_PLUGIN_DIR_PATH . "views/widget/widgetView.php"; … … 96 99 $data = __tagembed__sanitizeRequestData($_REQUEST); 97 100 $data = (object) $data; 98 99 101 /* --Start-- Manage Ajax call Request Security */ 100 102 $__tagembed__ajaxCallSecurityNones = isset($data->__tagembed__ajax_call_nones) ? sanitize_text_field($data->__tagembed__ajax_call_nones) : ''; … … 169 171 return __tagembed__exitWithDanger(); 170 172 break; 173 171 174 case "__tagembed__menue": 172 175 if (empty($data->menueId)) … … 176 179 return __tagembed__exitWithDanger(); 177 180 break; 181 178 182 case "__tagembed__create_widget": 179 183 if (empty($__tagembed__user_details) || empty($data->name)) … … 1079 1083 $user = __tagembed__user($response->emailId); 1080 1084 if (empty($user->email)): 1081 if ($wpdb-> insert('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes"])):1085 if ($wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_user (userId, name, email, accessToken, isLogin) VALUES (%d, %s, %s, %s, %s)", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes'))): 1082 1086 $return = true; 1083 1087 endif; 1084 1088 else: 1085 if ($wpdb-> update('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes",], ['email' => $response->emailId])):1089 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET userId = %d, name = %s, email = %s, accessToken = %s, isLogin = %s WHERE email = %s", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes', $response->emailId))): 1086 1090 $return = true; 1087 1091 endif; … … 1099 1103 global $wpdb; 1100 1104 if ($email == null && $other != null): 1101 $wpdb-> update('wp_tagembed_active_options', ["isLogin" => $other], ['id' => 1]);1105 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET isLogin = %s WHERE id = %d", $other, 1)); 1102 1106 else: 1103 $__tagembed__activeOptions = $wpdb->get_results( "SELECT email FROM wp_tagembed_active_options WHERE(id = 1)");1107 $__tagembed__activeOptions = $wpdb->get_results($wpdb->prepare("SELECT email FROM wp_tagembed_active_options WHERE id = %d", 1)); 1104 1108 if (empty($__tagembed__activeOptions[0]->email)): 1105 $wpdb-> insert('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other]);1109 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_options (email, isLogin) VALUES (%s, %s)", $email, $other)); 1106 1110 else: 1107 $wpdb-> update('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other], ['id' => 1]);1111 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET email = %s, isLogin = %s WHERE id = %d", $email, $other, 1)); 1108 1112 endif; 1109 1113 endif; … … 1113 1117 function __tagembed__getActiveOptions() { 1114 1118 global $wpdb; 1115 $ __tagembed__activeOptions = $wpdb->get_results("SELECT email,isLogin FROM wp_tagembed_active_options WHERE(id = 1)");1119 $results = $wpdb->get_results($wpdb->prepare("SELECT email, isLogin FROM wp_tagembed_active_options WHERE id = %d", 1)); 1116 1120 return $__tagembed__activeOptions; 1117 1121 } … … 1120 1124 function tagembed_logout() { 1121 1125 global $wpdb; 1122 if ($wpdb-> update('wp_tagembed_user', ["isLogin" => "no"], ["isLogin" => "yes"])):1126 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET isLogin = %s WHERE isLogin = %s", "no", "yes"))): 1123 1127 __tagembed__manageActiveOptions(null, "no"); /* Manage Active Options */ 1124 1128 return true; … … 1133 1137 return $wpdb->get_results("SELECT * FROM wp_tagembed_menus"); 1134 1138 if (array_key_exists('__tagembed__menu_condation', $__tagembed__menu_condatation)) 1135 return $wpdb->get_results( "SELECT * FROM wp_tagembed_menus WHERE " . $__tagembed__menu_condatation['__tagembed__menu_condation']);1139 return $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_menus WHERE status = %s", $__tagembed__menu_condatation['__tagembed__menu_condation'])); 1136 1140 if (array_key_exists('__tagembed__menu_id', $__tagembed__menu_condatation)): 1137 if ($wpdb-> update('wp_tagembed_menus', ["status" => 0], ["status" => 1]) && $wpdb->update('wp_tagembed_menus', ["status" => 1], ["id" => $__tagembed__menu_condatation['__tagembed__menu_id']]))1141 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE status = %d", 0, 1)) && $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE id = %d", 1, $__tagembed__menu_condatation['__tagembed__menu_id']))) 1138 1142 return true; 1139 1143 return false; … … 1146 1150 $__tagembed__userResponse = ""; 1147 1151 if (empty($email)): 1148 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(isLogin = 'yes')");1152 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE isLogin = %s", 'yes')); 1149 1153 else: 1150 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(email = '" . $email . "')");1154 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE email = %s", $email)); 1151 1155 endif; 1152 1156 if (!empty($__tagembed__userResponse)) … … 1196 1200 return true; 1197 1201 if (empty($activeWidgetUserId)): 1198 $wpdb-> insert('wp_tagembed_active_widget', ["widgetId" => $widgetId]);1202 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget (widgetId) VALUES (%s)", $widgetId)); 1199 1203 return true; 1200 1204 else: 1201 $wpdb-> update('wp_tagembed_active_widget', ["widgetId" => $widgetId], ['id' => 1]);1205 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget SET widgetId = %s WHERE id = %d", $widgetId, 1)); 1202 1206 return true; 1203 1207 endif; … … 1224 1228 return true; 1225 1229 if (empty($activeWidgetUserId)): 1226 $wpdb-> insert('wp_tagembed_active_widget_user', ["userId" => $userId]);1230 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget_user (userId) VALUES (%d)", $userId)); 1227 1231 return true; 1228 1232 else: 1229 $wpdb-> update('wp_tagembed_active_widget_user', ["userId" => $userId], ['id' => 1]);1233 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget_user SET userId = %d WHERE id = %d", $userId, 1)); 1230 1234 return true; 1231 1235 endif; … … 1249 1253 $__tagembed__menus = [['name' => 'Widget', 'status' => 0, 'path' => 'widget/widgetView'], ['name' => 'Feed', 'status' => 1, 'path' => 'feed/addView'], ['name' => 'Choose Theme', 'status' => 0, 'path' => 'theme/themeView'], ['name' => 'Filter', 'status' => 0, 'path' => 'filter/filterView'], ['name' => 'Customize', 'status' => 0, 'path' => 'customize/customizeView'], ['name' => 'Display', 'status' => 0, 'path' => 'display/displayView'], ['name' => 'Social Accounts', 'status' => 0, 'path' => 'socialAccount/socialAccountView'], ['name' => 'Support', 'status' => 0, 'path' => 'support/supportView'], ['name' => 'Upgrade', 'status' => 0, 'path' => 'upgrade/upgradeView'], ['name' => 'Analytics', 'status' => 0, 'path' => 'analytics/analyticsView']]; 1250 1254 foreach ($__tagembed__menus as $__tagembed__menu): 1251 $wpdb-> insert('wp_tagembed_menus', ["name" => $__tagembed__menu['name'], "status" => $__tagembed__menu['status'], "path" => $__tagembed__menu['path']]);1255 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_menus (name, status, path) VALUES (%s, %s, %s)", $__tagembed__menu['name'], $__tagembed__menu['status'], $__tagembed__menu['path'])); 1252 1256 endforeach; 1253 1257 endif; … … 1296 1300 add_filter("plugin_action_links_" . plugin_basename(__FILE__), '__tagembed__settingsLink'); 1297 1301 /* --End--Manage Setting Link */ 1298 1299 1302 /* --Start--Manage Database On Plugin Update Time */ 1300 1303 function __tagembed__manageDatabaseOnPluginUpdateTime() { … … 1305 1308 add_action('upgrader_process_complete', '__tagembed__manageDatabaseOnPluginUpdateTime', 10, 2); 1306 1309 /* --End--Manage Database On Plugin Update Time */ 1307 1308 1310 /* --Sart--Manage Chat Hide And Show */ 1309 1311 function __tagembed__chat() { … … 1400 1402 /* --End-- Drop Database Table */ 1401 1403 /* --Start-- Create Short Code */ 1404 function __tagembed__PluginShortCode($attr) { 1405 extract(shortcode_atts(['width' => '', 'height' => '',], $attr, 'tagembed')); 1406 $widgetId = (isset($attr[1]) ? $attr[1] : ''); 1407 if (!empty($widgetId) && is_numeric($widgetId) && (($width === '' || preg_match('/^\d+(px|%|)$/', $width)) && ($height === '' || preg_match('/^\d+(px|%|)$/', $height)))): 1408 $output = '<span class=""></span>'; 1409 $output .= '<div style="width:' . $width . '; height:' . $height . ';overflow: auto;" class="tagembed-container">'; 1410 $output .= '<div style="width:100%; height:100%;" class="tagembed-socialwall tagembed-analystic" data-wall-id="' . $widgetId . '"></div>'; 1411 $output .= '</div>'; 1412 else: 1413 $output = '<span style="display: block;text-align: center;border: 1px solid #eee;padding: 5px 15px;background-color: #fafafa;">Invalid Parameters Provided In The Tagembed Shortcode.</span>'; 1414 endif; 1415 return $output; 1416 } 1402 1417 add_shortcode("tagembed", "__tagembed__PluginShortCode"); 1403 function __tagembed__PluginShortCode($attr) {1404 $widgetId = (isset($attr[1]) ? $attr[1] : '');1405 $width = (isset($attr['width']) ? $attr['width'] : '');1406 $height = (isset($attr['height']) ? $attr['height'] : '');1407 $code = '<span class=""></span>';1408 $code .= '<div style="width:' . $width . '; height:' . $height . ';overflow: auto;" class="tagembed-container">';1409 $code .= '<div style="width:100%; height:100%;" class="tagembed-socialwall tagembed-analystic" data-wall-id="' . $widgetId . '"></div>';1410 $code .= '</div>';1411 return $code;1412 }1413 1418 /* --End-- Create Short Code */ 1414 1419 -
tagembed-widget/tags/4.9/assets/js/lazyload.js
r3047774 r3049153 21 21 }; 22 22 const extend = function () { 23 24 23 let extended = {}; 25 24 let deep = false; -
tagembed-widget/tags/4.9/assets/js/tagembed.deactive.js
r3047774 r3049153 91 91 formData.append('action', 'data'); 92 92 formData.append('__tagembed__ajax_action', '__tagembed__plugin_deactivate'); 93 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_security_nones_object.__tagembed__ajax_call_security_nones); 93 94 formData.append('betterPlugin', __tagembed__better_plugin_input); 94 95 formData.append('otherReason', __tagembed__other_reason_input); -
tagembed-widget/tags/4.9/assets/js/widget/tagembed.widget.script.js
r3047774 r3049153 18 18 formData.append('action', 'data'); 19 19 formData.append('widgetId', __tagembed__widget_id); 20 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 20 21 formData.append('__tagembed__ajax_action', '__tagembed__edit_widget'); 21 22 fetch(__tagembed__ajax_url, { … … 73 74 formData.append('status', __tagembed__widget_status); 74 75 formData.append('action', 'data'); 76 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 75 77 formData.append('__tagembed__ajax_action', '__tagembed__update_widget_status'); 76 78 __tagembed__open_loader(); … … 119 121 formData.append('widgetId', __tagembed__widget_id); 120 122 formData.append('action', 'data'); 123 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 121 124 formData.append('__tagembed__ajax_action', '__tagembed__delete_widget'); 122 125 __tagembed__open_loader(); -
tagembed-widget/tags/4.9/tagembed.php
r3047774 r3049153 40 40 wp_enqueue_script('__tagembed__tagemedLoaderJs', TAGEMBED_PLUGIN_URL . '/assets/js/loader.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 41 41 wp_enqueue_script('__tagembed__deactive-js', TAGEMBED_PLUGIN_URL . '/assets/js/tagembed.deactive.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 42 $__tagembed__ajax_call_security_nones = wp_create_nonce('__tagembed__ajax_call_security_nones'); 43 wp_localize_script('__tagembed__deactive-js', '__tagembed__ajax_call_security_nones_object', ['__tagembed__ajax_call_security_nones' => $__tagembed__ajax_call_security_nones]); 42 44 wp_enqueue_script('__tagembed__tagembedDialogFormJs', TAGEMBED_PLUGIN_URL . '/assets/js/dialog.form.js', ["jquery"], TAGEMBED_PLUGIN_VERSION, true); 43 45 /* --Start-- Gutenberge */ … … 78 80 function __tagembed__view() { 79 81 if (!empty(__tagembed__user()->isLogin) && __tagembed__user()->isLogin == 'yes'): 80 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); 82 /* Remove This */ /* $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); */ 83 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 1]); 81 84 if (empty($__tagembed__menus)): 82 85 include_once TAGEMBED_PLUGIN_DIR_PATH . "views/widget/widgetView.php"; … … 96 99 $data = __tagembed__sanitizeRequestData($_REQUEST); 97 100 $data = (object) $data; 98 99 101 /* --Start-- Manage Ajax call Request Security */ 100 102 $__tagembed__ajaxCallSecurityNones = isset($data->__tagembed__ajax_call_nones) ? sanitize_text_field($data->__tagembed__ajax_call_nones) : ''; … … 169 171 return __tagembed__exitWithDanger(); 170 172 break; 173 171 174 case "__tagembed__menue": 172 175 if (empty($data->menueId)) … … 176 179 return __tagembed__exitWithDanger(); 177 180 break; 181 178 182 case "__tagembed__create_widget": 179 183 if (empty($__tagembed__user_details) || empty($data->name)) … … 1079 1083 $user = __tagembed__user($response->emailId); 1080 1084 if (empty($user->email)): 1081 if ($wpdb-> insert('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes"])):1085 if ($wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_user (userId, name, email, accessToken, isLogin) VALUES (%d, %s, %s, %s, %s)", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes'))): 1082 1086 $return = true; 1083 1087 endif; 1084 1088 else: 1085 if ($wpdb-> update('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes",], ['email' => $response->emailId])):1089 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET userId = %d, name = %s, email = %s, accessToken = %s, isLogin = %s WHERE email = %s", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes', $response->emailId))): 1086 1090 $return = true; 1087 1091 endif; … … 1099 1103 global $wpdb; 1100 1104 if ($email == null && $other != null): 1101 $wpdb-> update('wp_tagembed_active_options', ["isLogin" => $other], ['id' => 1]);1105 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET isLogin = %s WHERE id = %d", $other, 1)); 1102 1106 else: 1103 $__tagembed__activeOptions = $wpdb->get_results( "SELECT email FROM wp_tagembed_active_options WHERE(id = 1)");1107 $__tagembed__activeOptions = $wpdb->get_results($wpdb->prepare("SELECT email FROM wp_tagembed_active_options WHERE id = %d", 1)); 1104 1108 if (empty($__tagembed__activeOptions[0]->email)): 1105 $wpdb-> insert('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other]);1109 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_options (email, isLogin) VALUES (%s, %s)", $email, $other)); 1106 1110 else: 1107 $wpdb-> update('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other], ['id' => 1]);1111 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET email = %s, isLogin = %s WHERE id = %d", $email, $other, 1)); 1108 1112 endif; 1109 1113 endif; … … 1113 1117 function __tagembed__getActiveOptions() { 1114 1118 global $wpdb; 1115 $ __tagembed__activeOptions = $wpdb->get_results("SELECT email,isLogin FROM wp_tagembed_active_options WHERE(id = 1)");1119 $results = $wpdb->get_results($wpdb->prepare("SELECT email, isLogin FROM wp_tagembed_active_options WHERE id = %d", 1)); 1116 1120 return $__tagembed__activeOptions; 1117 1121 } … … 1120 1124 function tagembed_logout() { 1121 1125 global $wpdb; 1122 if ($wpdb-> update('wp_tagembed_user', ["isLogin" => "no"], ["isLogin" => "yes"])):1126 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET isLogin = %s WHERE isLogin = %s", "no", "yes"))): 1123 1127 __tagembed__manageActiveOptions(null, "no"); /* Manage Active Options */ 1124 1128 return true; … … 1133 1137 return $wpdb->get_results("SELECT * FROM wp_tagembed_menus"); 1134 1138 if (array_key_exists('__tagembed__menu_condation', $__tagembed__menu_condatation)) 1135 return $wpdb->get_results( "SELECT * FROM wp_tagembed_menus WHERE " . $__tagembed__menu_condatation['__tagembed__menu_condation']);1139 return $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_menus WHERE status = %s", $__tagembed__menu_condatation['__tagembed__menu_condation'])); 1136 1140 if (array_key_exists('__tagembed__menu_id', $__tagembed__menu_condatation)): 1137 if ($wpdb-> update('wp_tagembed_menus', ["status" => 0], ["status" => 1]) && $wpdb->update('wp_tagembed_menus', ["status" => 1], ["id" => $__tagembed__menu_condatation['__tagembed__menu_id']]))1141 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE status = %d", 0, 1)) && $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE id = %d", 1, $__tagembed__menu_condatation['__tagembed__menu_id']))) 1138 1142 return true; 1139 1143 return false; … … 1146 1150 $__tagembed__userResponse = ""; 1147 1151 if (empty($email)): 1148 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(isLogin = 'yes')");1152 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE isLogin = %s", 'yes')); 1149 1153 else: 1150 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(email = '" . $email . "')");1154 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE email = %s", $email)); 1151 1155 endif; 1152 1156 if (!empty($__tagembed__userResponse)) … … 1196 1200 return true; 1197 1201 if (empty($activeWidgetUserId)): 1198 $wpdb-> insert('wp_tagembed_active_widget', ["widgetId" => $widgetId]);1202 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget (widgetId) VALUES (%s)", $widgetId)); 1199 1203 return true; 1200 1204 else: 1201 $wpdb-> update('wp_tagembed_active_widget', ["widgetId" => $widgetId], ['id' => 1]);1205 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget SET widgetId = %s WHERE id = %d", $widgetId, 1)); 1202 1206 return true; 1203 1207 endif; … … 1224 1228 return true; 1225 1229 if (empty($activeWidgetUserId)): 1226 $wpdb-> insert('wp_tagembed_active_widget_user', ["userId" => $userId]);1230 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget_user (userId) VALUES (%d)", $userId)); 1227 1231 return true; 1228 1232 else: 1229 $wpdb-> update('wp_tagembed_active_widget_user', ["userId" => $userId], ['id' => 1]);1233 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget_user SET userId = %d WHERE id = %d", $userId, 1)); 1230 1234 return true; 1231 1235 endif; … … 1249 1253 $__tagembed__menus = [['name' => 'Widget', 'status' => 0, 'path' => 'widget/widgetView'], ['name' => 'Feed', 'status' => 1, 'path' => 'feed/addView'], ['name' => 'Choose Theme', 'status' => 0, 'path' => 'theme/themeView'], ['name' => 'Filter', 'status' => 0, 'path' => 'filter/filterView'], ['name' => 'Customize', 'status' => 0, 'path' => 'customize/customizeView'], ['name' => 'Display', 'status' => 0, 'path' => 'display/displayView'], ['name' => 'Social Accounts', 'status' => 0, 'path' => 'socialAccount/socialAccountView'], ['name' => 'Support', 'status' => 0, 'path' => 'support/supportView'], ['name' => 'Upgrade', 'status' => 0, 'path' => 'upgrade/upgradeView'], ['name' => 'Analytics', 'status' => 0, 'path' => 'analytics/analyticsView']]; 1250 1254 foreach ($__tagembed__menus as $__tagembed__menu): 1251 $wpdb-> insert('wp_tagembed_menus', ["name" => $__tagembed__menu['name'], "status" => $__tagembed__menu['status'], "path" => $__tagembed__menu['path']]);1255 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_menus (name, status, path) VALUES (%s, %s, %s)", $__tagembed__menu['name'], $__tagembed__menu['status'], $__tagembed__menu['path'])); 1252 1256 endforeach; 1253 1257 endif; … … 1296 1300 add_filter("plugin_action_links_" . plugin_basename(__FILE__), '__tagembed__settingsLink'); 1297 1301 /* --End--Manage Setting Link */ 1298 1299 1302 /* --Start--Manage Database On Plugin Update Time */ 1300 1303 function __tagembed__manageDatabaseOnPluginUpdateTime() { … … 1305 1308 add_action('upgrader_process_complete', '__tagembed__manageDatabaseOnPluginUpdateTime', 10, 2); 1306 1309 /* --End--Manage Database On Plugin Update Time */ 1307 1308 1310 /* --Sart--Manage Chat Hide And Show */ 1309 1311 function __tagembed__chat() { -
tagembed-widget/trunk/assets/js/lazyload.js
r3047140 r3049153 21 21 }; 22 22 const extend = function () { 23 24 23 let extended = {}; 25 24 let deep = false; -
tagembed-widget/trunk/assets/js/tagembed.deactive.js
r2833563 r3049153 91 91 formData.append('action', 'data'); 92 92 formData.append('__tagembed__ajax_action', '__tagembed__plugin_deactivate'); 93 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_security_nones_object.__tagembed__ajax_call_security_nones); 93 94 formData.append('betterPlugin', __tagembed__better_plugin_input); 94 95 formData.append('otherReason', __tagembed__other_reason_input); -
tagembed-widget/trunk/assets/js/widget/tagembed.widget.script.js
r2833563 r3049153 18 18 formData.append('action', 'data'); 19 19 formData.append('widgetId', __tagembed__widget_id); 20 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 20 21 formData.append('__tagembed__ajax_action', '__tagembed__edit_widget'); 21 22 fetch(__tagembed__ajax_url, { … … 73 74 formData.append('status', __tagembed__widget_status); 74 75 formData.append('action', 'data'); 76 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 75 77 formData.append('__tagembed__ajax_action', '__tagembed__update_widget_status'); 76 78 __tagembed__open_loader(); … … 119 121 formData.append('widgetId', __tagembed__widget_id); 120 122 formData.append('action', 'data'); 123 formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); 121 124 formData.append('__tagembed__ajax_action', '__tagembed__delete_widget'); 122 125 __tagembed__open_loader(); -
tagembed-widget/trunk/tagembed.php
r3047774 r3049153 40 40 wp_enqueue_script('__tagembed__tagemedLoaderJs', TAGEMBED_PLUGIN_URL . '/assets/js/loader.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 41 41 wp_enqueue_script('__tagembed__deactive-js', TAGEMBED_PLUGIN_URL . '/assets/js/tagembed.deactive.js', ['jquery'], TAGEMBED_PLUGIN_VERSION, true); 42 $__tagembed__ajax_call_security_nones = wp_create_nonce('__tagembed__ajax_call_security_nones'); 43 wp_localize_script('__tagembed__deactive-js', '__tagembed__ajax_call_security_nones_object', ['__tagembed__ajax_call_security_nones' => $__tagembed__ajax_call_security_nones]); 42 44 wp_enqueue_script('__tagembed__tagembedDialogFormJs', TAGEMBED_PLUGIN_URL . '/assets/js/dialog.form.js', ["jquery"], TAGEMBED_PLUGIN_VERSION, true); 43 45 /* --Start-- Gutenberge */ … … 78 80 function __tagembed__view() { 79 81 if (!empty(__tagembed__user()->isLogin) && __tagembed__user()->isLogin == 'yes'): 80 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); 82 /* Remove This */ /* $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 'STATUS = 1']); */ 83 $__tagembed__menus = __tagembed__menus(['__tagembed__menu_condation' => 1]); 81 84 if (empty($__tagembed__menus)): 82 85 include_once TAGEMBED_PLUGIN_DIR_PATH . "views/widget/widgetView.php"; … … 96 99 $data = __tagembed__sanitizeRequestData($_REQUEST); 97 100 $data = (object) $data; 98 99 101 /* --Start-- Manage Ajax call Request Security */ 100 102 $__tagembed__ajaxCallSecurityNones = isset($data->__tagembed__ajax_call_nones) ? sanitize_text_field($data->__tagembed__ajax_call_nones) : ''; … … 169 171 return __tagembed__exitWithDanger(); 170 172 break; 173 171 174 case "__tagembed__menue": 172 175 if (empty($data->menueId)) … … 176 179 return __tagembed__exitWithDanger(); 177 180 break; 181 178 182 case "__tagembed__create_widget": 179 183 if (empty($__tagembed__user_details) || empty($data->name)) … … 1079 1083 $user = __tagembed__user($response->emailId); 1080 1084 if (empty($user->email)): 1081 if ($wpdb-> insert('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes"])):1085 if ($wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_user (userId, name, email, accessToken, isLogin) VALUES (%d, %s, %s, %s, %s)", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes'))): 1082 1086 $return = true; 1083 1087 endif; 1084 1088 else: 1085 if ($wpdb-> update('wp_tagembed_user', ["userId" => $response->userId, "name" => $response->name, "email" => $response->emailId, "accessToken" => $response->accessToken, "isLogin" => "yes",], ['email' => $response->emailId])):1089 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET userId = %d, name = %s, email = %s, accessToken = %s, isLogin = %s WHERE email = %s", $response->userId, $response->name, $response->emailId, $response->accessToken, 'yes', $response->emailId))): 1086 1090 $return = true; 1087 1091 endif; … … 1099 1103 global $wpdb; 1100 1104 if ($email == null && $other != null): 1101 $wpdb-> update('wp_tagembed_active_options', ["isLogin" => $other], ['id' => 1]);1105 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET isLogin = %s WHERE id = %d", $other, 1)); 1102 1106 else: 1103 $__tagembed__activeOptions = $wpdb->get_results( "SELECT email FROM wp_tagembed_active_options WHERE(id = 1)");1107 $__tagembed__activeOptions = $wpdb->get_results($wpdb->prepare("SELECT email FROM wp_tagembed_active_options WHERE id = %d", 1)); 1104 1108 if (empty($__tagembed__activeOptions[0]->email)): 1105 $wpdb-> insert('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other]);1109 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_options (email, isLogin) VALUES (%s, %s)", $email, $other)); 1106 1110 else: 1107 $wpdb-> update('wp_tagembed_active_options', ["email" => $email, "isLogin" => $other], ['id' => 1]);1111 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_options SET email = %s, isLogin = %s WHERE id = %d", $email, $other, 1)); 1108 1112 endif; 1109 1113 endif; … … 1113 1117 function __tagembed__getActiveOptions() { 1114 1118 global $wpdb; 1115 $ __tagembed__activeOptions = $wpdb->get_results("SELECT email,isLogin FROM wp_tagembed_active_options WHERE(id = 1)");1119 $results = $wpdb->get_results($wpdb->prepare("SELECT email, isLogin FROM wp_tagembed_active_options WHERE id = %d", 1)); 1116 1120 return $__tagembed__activeOptions; 1117 1121 } … … 1120 1124 function tagembed_logout() { 1121 1125 global $wpdb; 1122 if ($wpdb-> update('wp_tagembed_user', ["isLogin" => "no"], ["isLogin" => "yes"])):1126 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_user SET isLogin = %s WHERE isLogin = %s", "no", "yes"))): 1123 1127 __tagembed__manageActiveOptions(null, "no"); /* Manage Active Options */ 1124 1128 return true; … … 1133 1137 return $wpdb->get_results("SELECT * FROM wp_tagembed_menus"); 1134 1138 if (array_key_exists('__tagembed__menu_condation', $__tagembed__menu_condatation)) 1135 return $wpdb->get_results( "SELECT * FROM wp_tagembed_menus WHERE " . $__tagembed__menu_condatation['__tagembed__menu_condation']);1139 return $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_menus WHERE status = %s", $__tagembed__menu_condatation['__tagembed__menu_condation'])); 1136 1140 if (array_key_exists('__tagembed__menu_id', $__tagembed__menu_condatation)): 1137 if ($wpdb-> update('wp_tagembed_menus', ["status" => 0], ["status" => 1]) && $wpdb->update('wp_tagembed_menus', ["status" => 1], ["id" => $__tagembed__menu_condatation['__tagembed__menu_id']]))1141 if ($wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE status = %d", 0, 1)) && $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_menus SET status = %d WHERE id = %d", 1, $__tagembed__menu_condatation['__tagembed__menu_id']))) 1138 1142 return true; 1139 1143 return false; … … 1146 1150 $__tagembed__userResponse = ""; 1147 1151 if (empty($email)): 1148 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(isLogin = 'yes')");1152 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE isLogin = %s", 'yes')); 1149 1153 else: 1150 $__tagembed__userResponse = $wpdb->get_results( "SELECT * FROM wp_tagembed_user WHERE(email = '" . $email . "')");1154 $__tagembed__userResponse = $wpdb->get_results($wpdb->prepare("SELECT * FROM wp_tagembed_user WHERE email = %s", $email)); 1151 1155 endif; 1152 1156 if (!empty($__tagembed__userResponse)) … … 1196 1200 return true; 1197 1201 if (empty($activeWidgetUserId)): 1198 $wpdb-> insert('wp_tagembed_active_widget', ["widgetId" => $widgetId]);1202 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget (widgetId) VALUES (%s)", $widgetId)); 1199 1203 return true; 1200 1204 else: 1201 $wpdb-> update('wp_tagembed_active_widget', ["widgetId" => $widgetId], ['id' => 1]);1205 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget SET widgetId = %s WHERE id = %d", $widgetId, 1)); 1202 1206 return true; 1203 1207 endif; … … 1224 1228 return true; 1225 1229 if (empty($activeWidgetUserId)): 1226 $wpdb-> insert('wp_tagembed_active_widget_user', ["userId" => $userId]);1230 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_active_widget_user (userId) VALUES (%d)", $userId)); 1227 1231 return true; 1228 1232 else: 1229 $wpdb-> update('wp_tagembed_active_widget_user', ["userId" => $userId], ['id' => 1]);1233 $wpdb->query($wpdb->prepare("UPDATE wp_tagembed_active_widget_user SET userId = %d WHERE id = %d", $userId, 1)); 1230 1234 return true; 1231 1235 endif; … … 1249 1253 $__tagembed__menus = [['name' => 'Widget', 'status' => 0, 'path' => 'widget/widgetView'], ['name' => 'Feed', 'status' => 1, 'path' => 'feed/addView'], ['name' => 'Choose Theme', 'status' => 0, 'path' => 'theme/themeView'], ['name' => 'Filter', 'status' => 0, 'path' => 'filter/filterView'], ['name' => 'Customize', 'status' => 0, 'path' => 'customize/customizeView'], ['name' => 'Display', 'status' => 0, 'path' => 'display/displayView'], ['name' => 'Social Accounts', 'status' => 0, 'path' => 'socialAccount/socialAccountView'], ['name' => 'Support', 'status' => 0, 'path' => 'support/supportView'], ['name' => 'Upgrade', 'status' => 0, 'path' => 'upgrade/upgradeView'], ['name' => 'Analytics', 'status' => 0, 'path' => 'analytics/analyticsView']]; 1250 1254 foreach ($__tagembed__menus as $__tagembed__menu): 1251 $wpdb-> insert('wp_tagembed_menus', ["name" => $__tagembed__menu['name'], "status" => $__tagembed__menu['status'], "path" => $__tagembed__menu['path']]);1255 $wpdb->query($wpdb->prepare("INSERT INTO wp_tagembed_menus (name, status, path) VALUES (%s, %s, %s)", $__tagembed__menu['name'], $__tagembed__menu['status'], $__tagembed__menu['path'])); 1252 1256 endforeach; 1253 1257 endif; … … 1296 1300 add_filter("plugin_action_links_" . plugin_basename(__FILE__), '__tagembed__settingsLink'); 1297 1301 /* --End--Manage Setting Link */ 1298 1299 1302 /* --Start--Manage Database On Plugin Update Time */ 1300 1303 function __tagembed__manageDatabaseOnPluginUpdateTime() { … … 1305 1308 add_action('upgrader_process_complete', '__tagembed__manageDatabaseOnPluginUpdateTime', 10, 2); 1306 1309 /* --End--Manage Database On Plugin Update Time */ 1307 1308 1310 /* --Sart--Manage Chat Hide And Show */ 1309 1311 function __tagembed__chat() {
Note: See TracChangeset
for help on using the changeset viewer.