Changeset 3165848
- Timestamp:
- 10/09/2024 02:19:05 PM (18 months ago)
- Location:
- hellodialog/trunk
- Files:
-
- 2 edited
-
index.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hellodialog/trunk/index.php
r3165845 r3165848 4 4 * Plugin URI: https://www.hellodialog.com 5 5 * Description: This plugin connects Wordpress to the Hellodialog API. 6 * Version: 1.7.1 26 * Version: 1.7.13 7 7 * Author: Webreact 8 8 * Author URI: https://www.webreact.nl … … 369 369 } 370 370 371 /**372 * Cast variable to array.373 *374 * @param $variable375 * @return array376 */377 function hd_to_array($variable) {378 return (array) $variable;379 }380 381 371 /** 382 372 * Save the metadate when the custom post type is mutated. … … 414 404 */ 415 405 if( isset ( $_POST['custom-meta-box2'] ) ) { 416 $custom2 = hd_to_array($_POST['custom-meta-box2']);417 $old_meta2 = hd_to_array(get_post_meta($post->ID, '_custom-meta-box2', true));406 $custom2 = (array) $_POST['custom-meta-box2']; 407 $old_meta2 = (array) get_post_meta($post->ID, '_custom-meta-box2', true); 418 408 419 409 $custom2 = array_map( 'sanitize_text_field', $custom2 ); … … 439 429 if( isset ( $_POST['custom-meta-box'] ) ) { 440 430 // Get input & sanitize after 441 $custom = hd_to_array($_POST['custom-meta-box']);442 $old_meta = hd_to_array(get_post_meta($post->ID, '_custom-meta-box', true));431 $custom = (array) $_POST['custom-meta-box']; 432 $old_meta = (array) get_post_meta($post->ID, '_custom-meta-box', true); 443 433 444 434 // Sanitize input -
hellodialog/trunk/readme.txt
r3165845 r3165848 5 5 Requires at least: 4.8 6 6 Tested up to: 6.4 7 Stable tag: 1.7.1 27 Stable tag: 1.7.13 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 = 1.7.13 = 51 * Fixed type error on array_map() argument two with default php casting. 52 50 53 = 1.7.12 = 51 54 * Fixed type error on array_map() argument two.
Note: See TracChangeset
for help on using the changeset viewer.