Plugin Directory

Changeset 3424781


Ignore:
Timestamp:
12/21/2025 04:22:55 PM (3 months ago)
Author:
Genoo
Message:

Release $SOURCE_TAG

Location:
wpmktgengine/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • wpmktgengine/trunk/libs/WPME/Customizer/TemplateStorage.php

    r2242169 r3424781  
    338338    public function removeSpecificStyleAttributes(&$form)
    339339    {
     340        // Handle null input to prevent PHP 8.1+ deprecation warnings
     341        if ($form === null) {
     342            $form = '';
     343            return $form;
     344        }
    340345        // $form = preg_replace('%style="[^"]+"%i', '', $form, -1);
    341346        $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);
     
    377382    public function __cleanUpForCustomizer($html, $blockElements = true)
    378383    {
     384        // Handle null input to prevent PHP 8.1+ deprecation warnings
     385        if ($html === null) {
     386            $html = '';
     387        }
    379388        $html = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html);
    380389        if($blockElements){
  • wpmktgengine/trunk/libs/WPME/Utils/FastImage.php

    r1949494 r3424781  
    3333{
    3434    private $strpos = 0;
    35     private $str;
     35    private $str = '';
    3636    private $type;
    3737    private $handle;
     
    5454            $this->handle = null;
    5555            $this->type = null;
    56             $this->str = null;
     56            $this->str = '';
    5757        }
    5858    }
  • wpmktgengine/trunk/libs/WPMKTENGINE/CTA.php

    r3222520 r3424781  
    3333    /** @var array post types */
    3434    public $postTypes;
     35    /** @var int|string|null CTA ID */
     36    public $id = null;
    3537    /** @var bool */
    3638    public $has = false;
  • wpmktgengine/trunk/libs/WPMKTENGINE/Frontend.php

    r3320257 r3424781  
    4545    /** @var Cache */
    4646    var $cache;
     47    /** @var bool Whether the current post has multiple CTAs */
     48    var $hasMultipleCTAs = false;
    4749
    4850    /**
  • wpmktgengine/trunk/libs/WPMKTENGINE/HtmlForm.php

    r1784532 r3424781  
    2929    /** @var \DOMDocument */
    3030    private $dom;
    31     /** @var */
     31    /** @var \DOMElement|null */
    3232    private $form;
    33     /** @var */
     33    /** @var \DOMElement|null */
     34    private $msg;
     35    /** @var string|null */
    3436    private $form_key;
    35     /** @var */
     37    /** @var string|null */
    3638    private $form_return = NULL;
    37     /** @var */
     39    /** @var string|null */
    3840    private $form_id;
    3941    /** @var string */
    4042    private $unique;
    41     /** @var string */
     43    /** @var string|null */
    4244    private $validator;
    4345    /** @var int */
     
    289291    {
    290292        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 : '');
    292295        $unique_id = '_' . $counter . '_' . sha1($data);
    293296        $counter++;
     
    304307    {
    305308        // 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 : '');
    307311        // Add uniqe form identificator
    308312        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  
    4141    /** @var string */
    4242    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();
    4353
    4454    /**
  • wpmktgengine/trunk/libs/WPMKTENGINE/Utils/Strings.php

    r3340460 r3424781  
    178178    public static function toAscii($s)
    179179    {
     180        // Handle null input to avoid PHP 8.1+ deprecation warning
     181        if ($s === null) {
     182            return '';
     183        }
    180184        $s = \preg_replace('#[^\x09\x0A\x0D\x20-\x7E\xA0-\x{2FF}\x{370}-\x{10FFFF}]#u', '', $s);
    181185        $s = \strtr($s, '`\'"^~', "\x01\x02\x03\x04\x05");
  • wpmktgengine/trunk/libs/WPMKTENGINE/WidgetCTAVisible.php

    r1603372 r3424781  
    3434class WidgetCTAVisible extends \WPMKTENGINE\WidgetCTA
    3535{
     36    /** @var array List of available CTAs */
     37    var $ctas = array();
     38    /** @var array Selected CTA IDs */
     39    var $selected = array();
     40
    3641    /**
    3742     * Constructor registers widget in WordPress
  • wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/Metabox.php

    r3320257 r3424781  
    120120        if(is_array($this->fields) && !empty($this->fields)){
    121121            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                }
    122126                $fieldId = isset($field['id']) ? $field['id'] : str_replace('-', '_', Strings::lower(Strings::webalize($field['label'])));
    123127                if(!empty($_POST[$fieldId])){
     
    149153        if(is_array($this->fields) && !empty($this->fields)){
    150154            foreach($this->fields as $field){
     155                // Skip fields without required type and label
     156                if(!isset($field['type']) || !isset($field['label'])){
     157                    continue;
     158                }
    151159                $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 = '';
    159165                $fieldDesc = '';
    160166                if(isset($field['desc'])){
  • wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/MetaboxCTA.php

    r3320257 r3424781  
    239239        $r = array();
    240240        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' => [...]]
    244243            foreach($_POST[$this->id] as $key => $value){
    245244                $current = $key;
    246245                if(is_array($value)){
    247246                    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;
    250251                        }
    251252                    }
  • wpmktgengine/trunk/libs/WPMKTENGINE/Wordpress/TableLite.php

    r3320257 r3424781  
    8686     */
    8787    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;
    8897
    8998    /**
  • wpmktgengine/trunk/readme.txt

    r3241019 r3424781  
    33Tags: email marketing automation, landing page builder, email marketing, lead generation, online marketing, CRM
    44Requires at least: 4.6.0
    5 Tested up to: 6.7.2
     5Tested up to: 6.9
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wpmktgengine/trunk/wpmktgengine.php

    r3340460 r3424781  
    66    Author URI: http://www.genoo.com/
    77    Author Email: info@genoo.com
    8     Version: 4.0.31
     8    Version: 4.0.32
    99    License: GPLv2
    1010    Text Domain: wpmktgengine
Note: See TracChangeset for help on using the changeset viewer.