Changeset 3424781
- Timestamp:
- 12/21/2025 04:22:55 PM (3 months ago)
- Location:
- wpmktgengine/trunk
- Files:
-
- 13 edited
-
libs/WPME/Customizer/TemplateStorage.php (modified) (2 diffs)
-
libs/WPME/Utils/FastImage.php (modified) (2 diffs)
-
libs/WPMKTENGINE/CTA.php (modified) (1 diff)
-
libs/WPMKTENGINE/Frontend.php (modified) (1 diff)
-
libs/WPMKTENGINE/HtmlForm.php (modified) (3 diffs)
-
libs/WPMKTENGINE/Table.php (modified) (1 diff)
-
libs/WPMKTENGINE/Utils/Strings.php (modified) (1 diff)
-
libs/WPMKTENGINE/WidgetCTAVisible.php (modified) (1 diff)
-
libs/WPMKTENGINE/Wordpress/Metabox.php (modified) (2 diffs)
-
libs/WPMKTENGINE/Wordpress/MetaboxCTA.php (modified) (1 diff)
-
libs/WPMKTENGINE/Wordpress/TableLite.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wpmktgengine.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpmktgengine/trunk/libs/WPME/Customizer/TemplateStorage.php
r2242169 r3424781 338 338 public function removeSpecificStyleAttributes(&$form) 339 339 { 340 // Handle null input to prevent PHP 8.1+ deprecation warnings 341 if ($form === null) { 342 $form = ''; 343 return $form; 344 } 340 345 // $form = preg_replace('%style="[^"]+"%i', '', $form, -1); 341 346 $form = preg_replace('/background-color:[ ]{0,1}(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))[;]{0,1}/m', '', $form); … … 377 382 public function __cleanUpForCustomizer($html, $blockElements = true) 378 383 { 384 // Handle null input to prevent PHP 8.1+ deprecation warnings 385 if ($html === null) { 386 $html = ''; 387 } 379 388 $html = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html); 380 389 if($blockElements){ -
wpmktgengine/trunk/libs/WPME/Utils/FastImage.php
r1949494 r3424781 33 33 { 34 34 private $strpos = 0; 35 private $str ;35 private $str = ''; 36 36 private $type; 37 37 private $handle; … … 54 54 $this->handle = null; 55 55 $this->type = null; 56 $this->str = null;56 $this->str = ''; 57 57 } 58 58 } -
wpmktgengine/trunk/libs/WPMKTENGINE/CTA.php
r3222520 r3424781 33 33 /** @var array post types */ 34 34 public $postTypes; 35 /** @var int|string|null CTA ID */ 36 public $id = null; 35 37 /** @var bool */ 36 38 public $has = false; -
wpmktgengine/trunk/libs/WPMKTENGINE/Frontend.php
r3320257 r3424781 45 45 /** @var Cache */ 46 46 var $cache; 47 /** @var bool Whether the current post has multiple CTAs */ 48 var $hasMultipleCTAs = false; 47 49 48 50 /** -
wpmktgengine/trunk/libs/WPMKTENGINE/HtmlForm.php
r1784532 r3424781 29 29 /** @var \DOMDocument */ 30 30 private $dom; 31 /** @var */31 /** @var \DOMElement|null */ 32 32 private $form; 33 /** @var */ 33 /** @var \DOMElement|null */ 34 private $msg; 35 /** @var string|null */ 34 36 private $form_key; 35 /** @var */37 /** @var string|null */ 36 38 private $form_return = NULL; 37 /** @var */39 /** @var string|null */ 38 40 private $form_id; 39 41 /** @var string */ 40 42 private $unique; 41 /** @var string */43 /** @var string|null */ 42 44 private $validator; 43 45 /** @var int */ … … 289 291 { 290 292 static $counter = 1; 291 $data = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $this->dom->saveHTML()); 293 $html = $this->dom->saveHTML(); 294 $data = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $html !== false ? $html : ''); 292 295 $unique_id = '_' . $counter . '_' . sha1($data); 293 296 $counter++; … … 304 307 { 305 308 // Get data 306 $data = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $this->dom->saveHTML()); 309 $html = $this->dom->saveHTML(); 310 $data = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $html !== false ? $html : ''); 307 311 // Add uniqe form identificator 308 312 if(isset($this->form_key) && !empty($this->form_key) && (isset($this->form_id) && (!empty($this->form_id)))){ -
wpmktgengine/trunk/libs/WPMKTENGINE/Table.php
r3320257 r3424781 41 41 /** @var string */ 42 42 var $searchQuery; 43 /** @var string Screen ID */ 44 var $screenId; 45 /** @var bool Screen options flag */ 46 var $screenOptions; 47 /** @var int|bool User per page setting */ 48 var $userPerpage; 49 /** @var int Items per page */ 50 var $perPage; 51 /** @var array Found data for pagination */ 52 var $found_data = array(); 43 53 44 54 /** -
wpmktgengine/trunk/libs/WPMKTENGINE/Utils/Strings.php
r3340460 r3424781 178 178 public static function toAscii($s) 179 179 { 180 // Handle null input to avoid PHP 8.1+ deprecation warning 181 if ($s === null) { 182 return ''; 183 } 180 184 $s = \preg_replace('#[^\x09\x0A\x0D\x20-\x7E\xA0-\x{2FF}\x{370}-\x{10FFFF}]#u', '', $s); 181 185 $s = \strtr($s, '`\'"^~', "\x01\x02\x03\x04\x05"); -
wpmktgengine/trunk/libs/WPMKTENGINE/WidgetCTAVisible.php
r1603372 r3424781 34 34 class WidgetCTAVisible extends \WPMKTENGINE\WidgetCTA 35 35 { 36 /** @var array List of available CTAs */ 37 var $ctas = array(); 38 /** @var array Selected CTA IDs */ 39 var $selected = array(); 40 36 41 /** 37 42 * Constructor registers widget in WordPress -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Metabox.php
r3320257 r3424781 120 120 if(is_array($this->fields) && !empty($this->fields)){ 121 121 foreach($this->fields as $field){ 122 // Skip fields without required label (needed to generate fieldId) 123 if(!isset($field['id']) && !isset($field['label'])){ 124 continue; 125 } 122 126 $fieldId = isset($field['id']) ? $field['id'] : str_replace('-', '_', Strings::lower(Strings::webalize($field['label']))); 123 127 if(!empty($_POST[$fieldId])){ … … 149 153 if(is_array($this->fields) && !empty($this->fields)){ 150 154 foreach($this->fields as $field){ 155 // Skip fields without required type and label 156 if(!isset($field['type']) || !isset($field['label'])){ 157 continue; 158 } 151 159 $fieldId = isset($field['id']) ? $field['id'] : str_replace('-', '_', Strings::lower(Strings::webalize($field['label']))); 152 if(isset($field['type']) && (isset($field['label']))){ 153 $fieldRow = '<tr class="themeMetaboxRow" id="themeMetaboxRow'. $fieldId .'" >'; 154 $fieldValue = get_post_meta($post->ID, $fieldId, true); 155 $fieldLabel = '<td class="genooLabel"><label for="' . $fieldId . '">' . $field['label'] . '</label></td><td>'; 156 $fieldOptions = isset($field['options']) ? $field['options'] : array(); 157 $fieldAtts = ''; 158 } 160 $fieldRow = '<tr class="themeMetaboxRow" id="themeMetaboxRow'. $fieldId .'" >'; 161 $fieldValue = get_post_meta($post->ID, $fieldId, true); 162 $fieldLabel = '<td class="genooLabel"><label for="' . $fieldId . '">' . $field['label'] . '</label></td><td>'; 163 $fieldOptions = isset($field['options']) ? $field['options'] : array(); 164 $fieldAtts = ''; 159 165 $fieldDesc = ''; 160 166 if(isset($field['desc'])){ -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/MetaboxCTA.php
r3320257 r3424781 239 239 $r = array(); 240 240 if(isset($_POST[$this->id]) && is_array($_POST[$this->id])){ 241 foreach($_POST[$this->id] as $key => $value){ 242 $_POST[$this->id][$key] = sanitize_text_field($value); 243 } 241 // Process and sanitize the nested array structure 242 // $_POST[$this->id] structure: ['cta' => [...], 'sidebar' => [...], 'position' => [...]] 244 243 foreach($_POST[$this->id] as $key => $value){ 245 244 $current = $key; 246 245 if(is_array($value)){ 247 246 foreach($value as $row => $field){ 248 if(!empty($field)){ 249 $r[$row][$current] = $field; 247 // Sanitize each individual field value 248 $sanitized_field = sanitize_text_field($field); 249 if(!empty($sanitized_field)){ 250 $r[$row][$current] = $sanitized_field; 250 251 } 251 252 } -
wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/TableLite.php
r3320257 r3424781 86 86 */ 87 87 private $_pagination; 88 89 /** 90 * Cached column headers 91 * 92 * @since 3.1.0 93 * @var array 94 * @access protected 95 */ 96 protected $_column_headers; 88 97 89 98 /** -
wpmktgengine/trunk/readme.txt
r3241019 r3424781 3 3 Tags: email marketing automation, landing page builder, email marketing, lead generation, online marketing, CRM 4 4 Requires at least: 4.6.0 5 Tested up to: 6. 7.25 Tested up to: 6.9 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
wpmktgengine/trunk/wpmktgengine.php
r3340460 r3424781 6 6 Author URI: http://www.genoo.com/ 7 7 Author Email: info@genoo.com 8 Version: 4.0.3 18 Version: 4.0.32 9 9 License: GPLv2 10 10 Text Domain: wpmktgengine
Note: See TracChangeset
for help on using the changeset viewer.