Changeset 3320257
- Timestamp:
- 06/30/2025 10:06:45 PM (9 months ago)
- Location:
- wpmktgengine/trunk
- Files:
-
- 2 added
- 22 edited
-
PRIORITY-1-TESTING-GUIDE.md (added)
-
libs/WPME/Extensions/CTAs.php (modified) (2 diffs)
-
libs/WPME/Extensions/Clever/Plugins.php (modified) (2 diffs)
-
libs/WPME/Nag/Nag.php (modified) (1 diff)
-
libs/WPMKTENGINE/Admin.php (modified) (11 diffs)
-
libs/WPMKTENGINE/Cache.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Frontend.php (modified) (7 diffs)
-
libs/WPMKTENGINE/Import.php (modified) (5 diffs)
-
libs/WPMKTENGINE/RepositoryLumens.php (modified) (1 diff)
-
libs/WPMKTENGINE/Table.php (modified) (1 diff)
-
libs/WPMKTENGINE/Users.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Utils/Strings.php (modified) (1 diff)
-
libs/WPMKTENGINE/Wordpress/Ajax.php (modified) (1 diff)
-
libs/WPMKTENGINE/Wordpress/Cron.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Wordpress/Http.php (modified) (5 diffs)
-
libs/WPMKTENGINE/Wordpress/Metabox.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Wordpress/MetaboxCTA.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Wordpress/Settings.php (modified) (1 diff)
-
libs/WPMKTENGINE/Wordpress/TableLite.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Wordpress/Utils.php (modified) (1 diff)
-
verify-security-fixes.php (added)
-
wpmktgengine-init.php (modified) (2 diffs)
-
wpmktgengine-requirements.php (modified) (1 diff)
-
wpmktgengine.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpmktgengine/trunk/libs/WPME/Extensions/CTAs.php
r2544682 r3320257 442 442 // Check 443 443 if (!current_user_can('edit_posts')) return; 444 check_ajax_referer(' Genoo');444 check_ajax_referer('wpmktgengine'); 445 445 // Code 446 446 $count = \WPME\Extensions\CTAs::getCTAsNotInWordPress(); … … 457 457 // Check 458 458 if (!current_user_can('edit_posts')) return; 459 check_ajax_referer(' Genoo');459 check_ajax_referer('wpmktgengine'); 460 460 // Code 461 461 // Things -
wpmktgengine/trunk/libs/WPME/Extensions/Clever/Plugins.php
r2791846 r3320257 30 30 { 31 31 /** @var array */ 32 var $notifications = array(); 33 34 /** @var array|mixed */ 35 var $supportedPlugins = array(); 36 37 /** @var array */ 38 var $installedPlugins = array(); 39 32 private $supportedPlugins; 40 33 /** @var array */ 41 var $remotePlugins = array( 34 private $installedPlugins; 35 /** @var array */ 36 private $notifications = array(); 37 /** @var array */ 38 private $remotePlugins = array( 42 39 'wp-gravity-forms-extension-master', 43 40 'wp-genoo-elementor-addon-master', 44 41 'wp-genoo-auto-segmentation-master' 45 42 ); 43 /** @var \WPME\Nag\Nag */ 44 private $nag; 46 45 47 46 /** … … 323 322 'connection' => '', 324 323 'slug' => 'wp-genoo-auto-segmentation-master', 325 'message' => 'Since you are using Genoo/WPMktgEngine plugin, we have an extension that will automatically segment your leads based upon their views of your blog posts. You set a lead type by category and everything else is taken care of.',326 'desc' => 'Easily segment your leads by their behavior. This plugin allows you to identify Lead Types associated with Blog Categories, so as leads visit your blog pages, automatically segment them.',324 'message' => 'Since you are using Genoo/WPMktgEngine plugin, we have an extension that will automatically segment your leads based upon their views of your blog posts. You set a lead type by category and everything else is taken care of.', 325 'desc' => 'Easily segment your leads by their behavior. This plugin allows you to identify Lead Types associated with Blog Categories, so as leads visit your blog pages, automatically segment them.', 327 326 'name' => '', 328 327 'file' => 'wp-genoo-auto-segmentation-master/wp-genoo-auto-segmentation.php', -
wpmktgengine/trunk/libs/WPME/Nag/Nag.php
r1678243 r3320257 35 35 /** @var \WPMKTENGINE\Wordpress\Nag */ 36 36 public $dummyNag; 37 38 /** @var \WPMKTENGINE\RepositoryUser */ 39 public $userRepository; 37 40 38 41 /** -
wpmktgengine/trunk/libs/WPMKTENGINE/Admin.php
r3198471 r3320257 84 84 var $repositaryCTAs; 85 85 /** @var \WPME\Extensions\RepositorySurveys */ 86 var $reposit orySurveys;86 var $repositarySurveys; 87 87 /** @var \WPMKTENGINE\RepositoryUser */ 88 88 var $user; … … 99 99 /** @var \WPMKTENGINE\TablePages */ 100 100 var $tablePages; 101 /** @var \WPME\Extensions\TableSurveys */ 102 var $tableSurveys; 101 103 102 104 … … 146 148 // Check 147 149 if (!current_user_can('edit_posts')) return; 148 check_ajax_referer(' Genoo');150 check_ajax_referer('wpmktgengine'); 149 151 // Code 150 152 $option = sanitize_text_field($_POST['option']); … … 168 170 // Check 169 171 if (!current_user_can('edit_posts')) return; 170 check_ajax_referer(' Genoo');172 check_ajax_referer('wpmktgengine'); 171 173 // Code 172 174 try { … … 188 190 // Check 189 191 if (!current_user_can('edit_posts')) return; 190 check_ajax_referer(' Genoo');192 check_ajax_referer('wpmktgengine'); 191 193 // Code 192 194 try { … … 203 205 die; 204 206 }); 205 // Update option api 206 Action::add('wp_ajax_refresh_surveys', function(){ 207 // Check 207 // Flush surveys cache 208 Action::add('wp_ajax_flush_surveys_cache', function(){ 208 209 if (!current_user_can('edit_posts')) return; 209 check_ajax_referer(' Genoo');210 check_ajax_referer('wpmktgengine'); 210 211 // Code 211 212 try { … … 226 227 // Check 227 228 if (!current_user_can('edit_posts')) return; 228 check_ajax_referer(' Genoo');229 check_ajax_referer('wpmktgengine'); 229 230 // Code 230 231 $url = esc_url($_POST['url']); … … 307 308 'DOMAIN' => WPMKTENGINE_DOMAIN, 308 309 'AJAX' => admin_url('admin-ajax.php'), 309 'AJAX_NONCE' => wp_create_nonce(' Genoo'),310 'AJAX_NONCE' => wp_create_nonce('wpmktgengine'), 310 311 'GenooPluginUrl' => WPMKTENGINE_ASSETS, 311 312 'GenooMessages' => array( … … 337 338 'DOMAIN' => WPMKTENGINE_DOMAIN, 338 339 'AJAX' => admin_url('admin-ajax.php'), 339 'AJAX_NONCE' => wp_create_nonce(' Genoo'),340 'AJAX_NONCE' => wp_create_nonce('wpmktgengine'), 340 341 'GenooPluginUrl' => WPMKTENGINE_ASSETS, 341 342 'GenooMessages' => array( … … 358 359 global $wp_version; 359 360 if(isset($_REQUEST['page'])){ 360 if(Strings::contains($_REQUEST['page'], 'WPMKTENGINE')){ 361 $page = sanitize_text_field($_REQUEST['page']); 362 if(Strings::contains($page, 'WPMKTENGINE')){ 361 363 $classes .= ' WPMKTENGINE '; 362 364 } … … 411 413 $msgPluginLink = ' ' . Nag::adminLink(__('WPMKTGENGINE Login Page.', 'wpmktengine'), 'WPMKTENGINELogin&reset=true') . ' | '; 412 414 $msgHideLink = Nag::hideLink(__('Hide this warning.', 'wpmktengine'), 'hideGenooNag'); 413 if(!isset($_GET['page']) && (isset($_GET['page']) && $_GET['page']!== 'WPMKTENGINELogin')){415 if(!isset($_GET['page']) && (isset($_GET['page']) && sanitize_text_field($_GET['page']) !== 'WPMKTENGINELogin')){ 414 416 $this->addNotice('error', sprintf(__('WPMKTGENGINE plugin requires setting up. To finish your setup please login to your account.', 'wpmktengine')) . $msgPluginLink . $msgHideLink); 415 417 } -
wpmktgengine/trunk/libs/WPMKTENGINE/Cache.php
r2191147 r3320257 43 43 /** @var array */ 44 44 private $userConfig = array(); 45 /** @var int Cache time for dynamic property (legacy support) */ 46 private $_cache_time = 6000; 45 47 46 48 … … 320 322 $this->cacheDir = $data['cacheDir']; 321 323 $this->cacheName = $data['cacheName']; 322 $this->_cache_ti nme = $data['cacheTime'];324 $this->_cache_time = $data['cacheTime']; 323 325 $this->hardFind = $data['hardFind']; 324 326 return $this; -
wpmktgengine/trunk/libs/WPMKTENGINE/Frontend.php
r2902099 r3320257 263 263 if((isset($_GET['genooIframeLumenSrc']) && !empty($_GET['genooIframeLumenSrc'])) && (!empty($wp->query_vars['genooIframeLumen']))){ 264 264 // Seems like a winner, display content 265 Frontend::renderPreviewLumenIframe($wp->query_vars['genooIframeLumen'], $_GET['genooIframeLumenSrc']); 265 $src = sanitize_text_field($_GET['genooIframeLumenSrc']); 266 Frontend::renderPreviewLumenIframe($wp->query_vars['genooIframeLumen'], $src); 266 267 } 267 268 } … … 271 272 // Only when query parsed do this 272 273 try { 273 error_reporting(0); 274 ini_set('error_reporting', 0); 274 // Only suppress error reporting for production, allow debugging in development 275 if (!defined('WP_DEBUG') || !WP_DEBUG) { 276 $error_reporting_level = error_reporting(); 277 error_reporting(0); 278 ini_set('error_reporting', 0); 279 } 280 275 281 // Set through widget 276 282 $widget = new WidgetCTA(false); … … 296 302 // TODO: Discover what's causing issue with the above line 297 303 Frontend::renderMobileWindow('Preview', $r, 'genooPreviewModal'); 304 305 // Restore error reporting if it was suppressed 306 if (!defined('WP_DEBUG') || !WP_DEBUG) { 307 error_reporting($error_reporting_level); 308 } 298 309 } catch (\Exception $e){ 299 310 echo $e->getMessage(); … … 678 689 // Please wp.org reviewers although nothing runs after this method, as it exits 679 690 $restoreReporting = error_reporting(); 680 // Turn off errors 681 @error_reporting(0); 682 @ini_set('error_reporting', 0); 691 692 // Only suppress errors in production, allow debugging in development 693 if (!defined('WP_DEBUG') || !WP_DEBUG) { 694 error_reporting(0); 695 ini_set('error_reporting', 0); 696 } 697 683 698 // Render tracking in header instead of footer? 684 699 $pageRenderTrackingInHead = … … 763 778 ); 764 779 } catch (\Exception $e){ 765 echo $e->getMessage(); 766 } 767 // Yup, makes no sense :) 780 // Log error in production, show in development 781 if (defined('WP_DEBUG') && WP_DEBUG) { 782 echo $e->getMessage(); 783 } else { 784 error_log('WPMKTGENGINE Landing Page Error: ' . $e->getMessage()); 785 echo 'An error occurred while rendering the landing page.'; 786 } 787 } 788 // Restore error reporting 768 789 error_reporting($restoreReporting); 769 790 ini_restore('error_reporting'); … … 779 800 { 780 801 header('Content-Type: text/html; charset=utf-8'); 781 try { 782 // Error reporting 802 803 // Only suppress errors in production, allow debugging in development 804 $restoreReporting = error_reporting(); 805 if (!defined('WP_DEBUG') || !WP_DEBUG) { 783 806 error_reporting(0); 784 807 ini_set('error_reporting', 0); 808 } 809 810 try { 785 811 $pages = new RepositoryPages($this->cache, $this->api); 786 812 $page = $pages->getPage($id); … … 814 840 } 815 841 } catch (\Exception $e){ 816 echo $e->getMessage(); 817 } 842 // Log error in production, show in development 843 if (defined('WP_DEBUG') && WP_DEBUG) { 844 echo $e->getMessage(); 845 } else { 846 error_log('WPMKTGENGINE Page Template Error: ' . $e->getMessage()); 847 echo 'An error occurred while rendering the page template.'; 848 } 849 } 850 851 // Restore error reporting 852 error_reporting($restoreReporting); 853 ini_restore('error_reporting'); 818 854 } 819 855 -
wpmktgengine/trunk/libs/WPMKTENGINE/Import.php
r2115344 r3320257 57 57 { 58 58 $restoreReporting = error_reporting(); 59 // don't break us down lad 60 @error_reporting(0); 61 @ini_set('display_errors', 0); 59 60 // Only suppress errors in production, allow debugging in development 61 if (!defined('WP_DEBUG') || !WP_DEBUG) { 62 error_reporting(0); 63 ini_set('display_errors', 0); 64 } 65 62 66 // return arra\` 63 67 $arr = array(); … … 114 118 return $arr; 115 119 } catch(\Exception $e){ 116 return array(__('Error while importing lead: ', 'wpmktengine'). $e->getMessage()); 120 // Log error in production, show in development 121 if (defined('WP_DEBUG') && WP_DEBUG) { 122 return array(__('Error while importing lead: ', 'wpmktengine'). $e->getMessage()); 123 } else { 124 error_log('WPMKTGENGINE Import Error: ' . $e->getMessage()); 125 return array(__('Error while importing lead. Check error logs for details.', 'wpmktengine')); 126 } 117 127 } 118 128 } else { … … 123 133 } 124 134 } 135 136 // Restore error reporting 125 137 error_reporting($restoreReporting); 126 138 ini_restore('display_errors'); … … 138 150 public function importSubscribers($subscribers, $leadType) 139 151 { 140 @error_reporting(0); 141 @ini_set('display_errors', 0); 152 // Only suppress errors in production, allow debugging in development 153 $restoreReporting = error_reporting(); 154 if (!defined('WP_DEBUG') || !WP_DEBUG) { 155 error_reporting(0); 156 ini_set('display_errors', 0); 157 } 158 142 159 // return array 143 160 $arr = array(); … … 173 190 return $arr; 174 191 } catch(\Exception $e){ 175 return array(__('Error while importing lead: ', 'wpmktengine'). $e->getMessage()); 176 } 177 } 192 // Log error in production, show in development 193 if (defined('WP_DEBUG') && WP_DEBUG) { 194 return array(__('Error while importing lead: ', 'wpmktengine'). $e->getMessage()); 195 } else { 196 error_log('WPMKTGENGINE Subscriber Import Error: ' . $e->getMessage()); 197 return array(__('Error while importing lead. Check error logs for details.', 'wpmktengine')); 198 } 199 } 200 } 201 202 // Restore error reporting 203 error_reporting($restoreReporting); 204 ini_restore('display_errors'); 178 205 return array(__('No subscribers provided.', 'wpmktengine')); 179 206 } -
wpmktgengine/trunk/libs/WPMKTENGINE/RepositoryLumens.php
r2191147 r3320257 51 51 */ 52 52 private $api; 53 /** 54 * @var bool 55 */ 56 private $empty = false; 53 57 54 58 const REPO_TIMER = '3600'; -
wpmktgengine/trunk/libs/WPMKTENGINE/Table.php
r2243770 r3320257 77 77 if(isset($_POST['wp_screen_options'])){ 78 78 if(isset($_POST['wp_screen_options']['option']) && $_POST['wp_screen_options']['option'] == 'genoo_per_page'){ 79 return $_POST['wp_screen_options']['value'];79 return sanitize_text_field($_POST['wp_screen_options']['value']); 80 80 } 81 81 } -
wpmktgengine/trunk/libs/WPMKTENGINE/Users.php
r1905876 r3320257 126 126 { 127 127 if(isset($_POST)){ 128 @$first = isset($_POST['billing_first_name']) ? $_POST['billing_first_name']: null;128 @$first = isset($_POST['billing_first_name']) ? sanitize_text_field($_POST['billing_first_name']) : null; 129 129 if($first === null){ 130 @$first = isset($_POST['shipping_first_name']) ? $_POST['shipping_first_name']: null;130 @$first = isset($_POST['shipping_first_name']) ? sanitize_text_field($_POST['shipping_first_name']) : null; 131 131 if($first === null){ 132 @$first = isset($_POST['first_name']) ? $_POST['first_name']: null;132 @$first = isset($_POST['first_name']) ? sanitize_text_field($_POST['first_name']) : null; 133 133 } 134 134 } … … 146 146 { 147 147 if(isset($_POST)){ 148 @$first = isset($_POST['billing_last_name']) ? $_POST['billing_last_name']: null;148 @$first = isset($_POST['billing_last_name']) ? sanitize_text_field($_POST['billing_last_name']) : null; 149 149 if($first === null){ 150 @$first = isset($_POST['shipping_last_name']) ? $_POST['shipping_last_name']: null;150 @$first = isset($_POST['shipping_last_name']) ? sanitize_text_field($_POST['shipping_last_name']) : null; 151 151 if($first === null){ 152 @$first = isset($_POST['last_name']) ? $_POST['last_name']: null;152 @$first = isset($_POST['last_name']) ? sanitize_text_field($_POST['last_name']) : null; 153 153 } 154 154 } -
wpmktgengine/trunk/libs/WPMKTENGINE/Utils/Strings.php
r2761866 r3320257 371 371 public static function length($s) 372 372 { 373 return strlen(utf8_decode($s)); // fastest way 373 // Replace deprecated utf8_decode with modern alternative 374 if (function_exists('mb_strlen')) { 375 return mb_strlen($s, 'UTF-8'); 376 } else { 377 // Fallback for systems without mbstring 378 return strlen($s); 379 } 374 380 } 375 381 -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Ajax.php
r1573240 r3320257 143 143 public static function onReturn($data) 144 144 { 145 @error_reporting(0); // don't break json 145 // Only suppress error reporting for production, allow debugging in development 146 $restoreReporting = error_reporting(); 147 if (!defined('WP_DEBUG') || !WP_DEBUG) { 148 error_reporting(0); 149 } 150 146 151 header('Content-type: application/json'); 147 152 try{ 148 die(Json::encode($data)); 149 } catch (\Exception $e){} // as of this moment, we don't do anything with exceptions, it's ajax call 150 // they would just break the thang 153 $json_data = Json::encode($data); 154 if (json_last_error() !== JSON_ERROR_NONE) { 155 throw new \Exception('JSON encoding error: ' . json_last_error_msg()); 156 } 157 die($json_data); 158 } catch (\Exception $e){ 159 // Log the exception for debugging but don't expose it to the client 160 error_log('WPMKTGENGINE AJAX Error: ' . $e->getMessage()); 161 162 // Return a generic error response 163 $error_response = array('error' => 'Internal server error'); 164 if (defined('WP_DEBUG') && WP_DEBUG) { 165 $error_response['debug_message'] = $e->getMessage(); 166 } 167 die(Json::encode($error_response)); 168 } finally { 169 // Restore error reporting 170 error_reporting($restoreReporting); 171 } 151 172 } 152 173 } -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Cron.php
r1573240 r3320257 117 117 { 118 118 $events = self::getEvents(); 119 error_reporting(0); 119 120 // Only suppress error reporting for production, allow debugging in development 121 $restoreReporting = error_reporting(); 122 if (!defined('WP_DEBUG') || !WP_DEBUG) { 123 error_reporting(0); 124 } 125 120 126 if(!empty($events)){ 121 127 foreach($events as $time => $cron){ … … 131 137 } 132 138 } 139 140 // Restore error reporting 141 error_reporting($restoreReporting); 133 142 } 134 143 -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Http.php
r2106417 r3320257 16 16 * http://www.wpmktgengine.com/terms-of-service 17 17 * Copyright 2016 Genoo LLC. All rights reserved worldwide. 18 * 19 * SECURITY NOTE: 20 * SSL verification is enabled by default for security. To disable SSL verification 21 * (only for development/testing), use the filter: add_filter('wpmktgengine_ssl_verify', '__return_false'); 22 * WARNING: Disabling SSL verification in production is a security risk. 18 23 */ 19 24 … … 28 33 var $response; 29 34 /** @var array */ 30 var $args = array('sslverify' => false, 'timeout' => 120);35 var $args = array('sslverify' => true, 'timeout' => 120); 31 36 /** @var */ 32 37 var $url; … … 45 50 $this->url = $url; 46 51 $this->apikeySetup(); 52 // Allow SSL verification to be configured via filter 53 $sslVerify = apply_filters('wpmktgengine_ssl_verify', true); 54 $this->args['sslverify'] = $sslVerify; 47 55 return $this; 48 56 } … … 149 157 150 158 /** 159 * Configure SSL verification for cURL operations 160 * 161 * @param resource $ch cURL handle 162 */ 163 private function configureCurlSSL($ch) 164 { 165 $sslVerify = apply_filters('wpmktgengine_ssl_verify', true); 166 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $sslVerify); 167 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $sslVerify ? 2 : 0); 168 } 169 170 /** 151 171 * Couldn't get working with WP_Http, 152 172 * so changed to work with curl … … 170 190 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 171 191 curl_setopt($ch, CURLOPT_HTTPHEADER, $headersNew); 192 // Configure SSL verification 193 $this->configureCurlSSL($ch); 172 194 // Set body 173 195 curl_setopt($ch, CURLOPT_POST, 1); -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Metabox.php
r2549298 r3320257 110 110 if (!isset($_POST[$this->nonceKey])){ return $post_id; } 111 111 // nonce key 112 $nonce = $_POST[$this->nonceKey];112 $nonce = sanitize_text_field($_POST[$this->nonceKey]); 113 113 // verify that the nonce is valid. 114 114 if (!wp_verify_nonce($nonce, $this->id)){ return $post_id; } … … 125 125 update_post_meta($post_id, $fieldId, $_POST[$fieldId]); 126 126 } else { 127 update_post_meta($post_id, $fieldId, (sanitize_text_field($_POST[$fieldId])));127 update_post_meta($post_id, $fieldId, sanitize_text_field($_POST[$fieldId])); 128 128 } 129 129 } elseif(empty($_POST[$fieldId])) { -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/MetaboxCTA.php
r1603372 r3320257 38 38 /** @var */ 39 39 var $ctas; 40 /** @var array */ 41 var $fields; 42 /** @var array */ 43 var $fieldsSanatized; 40 44 41 45 … … 236 240 if(isset($_POST[$this->id]) && is_array($_POST[$this->id])){ 237 241 foreach($_POST[$this->id] as $key => $value){ 242 $_POST[$this->id][$key] = sanitize_text_field($value); 243 } 244 foreach($_POST[$this->id] as $key => $value){ 238 245 $current = $key; 239 246 if(is_array($value)){ -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Settings.php
r1801691 r3320257 139 139 if (isset($section['desc']) && !empty($section['desc'])){ 140 140 $section['desc'] = '<div class="inside">'.$section['desc'].'</div>'; 141 $callback = create_function('', 'echo "'.str_replace('"', '\"', $section['desc']).'";'); 141 $callback = function() use ($section) { 142 echo str_replace('"', '\"', $section['desc']); 143 }; 142 144 } else { 143 145 $callback = '__return_false'; -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/TableLite.php
r2761866 r3320257 95 95 */ 96 96 protected $modes = array(); 97 98 /** 99 * Screen ID for dynamic property support 100 * 101 * @var string 102 */ 103 public $screenId; 104 105 /** 106 * Screen options for dynamic property support 107 * 108 * @var array 109 */ 110 public $screenOptions; 111 112 /** 113 * User per page setting for dynamic property support 114 * 115 * @var int 116 */ 117 public $userPerpage; 118 119 /** 120 * Per page setting for dynamic property support 121 * 122 * @var int 123 */ 124 public $perPage; 97 125 98 126 /** … … 785 813 $current_orderby = ''; 786 814 787 if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'])815 if ( isset( $_GET['order'] ) && 'desc' == sanitize_text_field($_GET['order']) ) 788 816 $current_order = 'desc'; 789 817 else -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Utils.php
r2526947 r3320257 163 163 public static function underscoreToCamelCase($string, $firstCaps = true) 164 164 { 165 if($firstCaps == true){$string[0] = strtoupper($string[0]); } $func = create_function('$c', 'return strtoupper($c[1]);'); 166 return preg_replace_callback('/_([a-z])/', $func, $string); 165 if($firstCaps == true){$string[0] = strtoupper($string[0]); } 166 return preg_replace_callback('/_([a-z])/', function($c) { 167 return strtoupper($c[1]); 168 }, $string); 167 169 } 168 170 -
wpmktgengine/trunk/wpmktgengine-init.php
r2544682 r3320257 88 88 // Dropins 89 89 require_once WPMKTENGINE_ROOT . '/extensions/dropins.php'; 90 90 91 // initialize 91 92 $this->repositarySettings = new \WPME\RepositorySettingsFactory(); … … 289 290 function genoo_wpme_on_return($data) 290 291 { 291 @error_reporting(0); // don't break json 292 // Only suppress error reporting for production, allow debugging in development 293 if (!defined('WP_DEBUG') || !WP_DEBUG) { 294 // In production, suppress errors but log them 295 $error_reporting_level = error_reporting(); 296 error_reporting(0); 297 298 // Log any errors that might occur during JSON encoding 299 $json_data = json_encode($data); 300 if (json_last_error() !== JSON_ERROR_NONE) { 301 error_log('WPMKTGENGINE JSON encoding error: ' . json_last_error_msg()); 302 $data = array('error' => 'Data encoding failed'); 303 $json_data = json_encode($data); 304 } 305 306 // Restore error reporting level 307 error_reporting($error_reporting_level); 308 } else { 309 // In development, let errors show but ensure clean JSON output 310 $json_data = json_encode($data); 311 if (json_last_error() !== JSON_ERROR_NONE) { 312 wp_die('JSON encoding error: ' . json_last_error_msg()); 313 } 314 } 315 292 316 header('Content-type: application/json'); 293 die( json_encode($data));317 die($json_data); 294 318 } 295 319 } -
wpmktgengine/trunk/wpmktgengine-requirements.php
r2195197 r3320257 33 33 // minimum versions 34 34 $checkMinWp = '4.5'; 35 $checkMinPHP = ' 5.5.0';35 $checkMinPHP = '7.4.0'; 36 36 $checkMinMemory = 20 * (1024 * 1024); 37 37 // recover hideLink -
wpmktgengine/trunk/wpmktgengine.php
r3241019 r3320257 6 6 Author URI: http://www.genoo.com/ 7 7 Author Email: info@genoo.com 8 Version: 4.0. 298 Version: 4.0.30 9 9 License: GPLv2 10 10 Text Domain: wpmktgengine 11 Requires at least: 4.5 12 Tested up to: 6.8.1 13 Requires PHP: 7.4 14 Tested up to PHP: 8.3 11 15 */ 12 16 /**
Note: See TracChangeset
for help on using the changeset viewer.