Plugin Directory

Changeset 3165845


Ignore:
Timestamp:
10/09/2024 02:12:09 PM (18 months ago)
Author:
HoltesDesign
Message:

Updated to version 1.7.12 with fixes for type error on array_map() argument two and updated documentation.

Location:
hellodialog/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hellodialog/trunk/index.php

    r2984270 r3165845  
    44 * Plugin URI: https://www.hellodialog.com
    55 * Description: This plugin connects Wordpress to the Hellodialog API.
    6  * Version: 1.7.11
     6 * Version: 1.7.12
    77 * Author: Webreact
    88 * Author URI: https://www.webreact.nl
     
    369369        }
    370370
     371        /**
     372         * Cast variable to array.
     373         *
     374         * @param $variable
     375         * @return array
     376         */
     377        function hd_to_array($variable) {
     378            return (array) $variable;
     379        }
     380
    371381        /**
    372382         * Save the metadate when the custom post type is mutated.
     
    404414             */
    405415            if( isset ( $_POST['custom-meta-box2'] ) ) {
    406                 $custom2   = $_POST['custom-meta-box2'];
    407                 $old_meta2 = get_post_meta($post->ID, '_custom-meta-box2', true);
     416                $custom2   = hd_to_array($_POST['custom-meta-box2']);
     417                $old_meta2 = hd_to_array(get_post_meta($post->ID, '_custom-meta-box2', true));
    408418
    409419                $custom2 = array_map( 'sanitize_text_field', $custom2 );
     
    429439            if( isset ( $_POST['custom-meta-box'] ) ) {
    430440                // Get input & sanitize after
    431                 $custom   = $_POST['custom-meta-box'];
    432                 $old_meta = get_post_meta($post->ID, '_custom-meta-box', true);
     441                $custom   = hd_to_array($_POST['custom-meta-box']);
     442                $old_meta = hd_to_array(get_post_meta($post->ID, '_custom-meta-box', true));
    433443
    434444                // Sanitize input
  • hellodialog/trunk/readme.txt

    r2984270 r3165845  
    55Requires at least: 4.8
    66Tested up to: 6.4
    7 Stable tag: 1.7.11
     7Stable tag: 1.7.12
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     50= 1.7.12 =
     51* Fixed type error on array_map() argument two.
     52
     53= 1.7.11 =
     54* WordPress 6.4 compatibility.
     55
    5056= 1.7.10 =
    5157* Added a fix where usage of the shortcode would throw warnings.
Note: See TracChangeset for help on using the changeset viewer.