Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Admin_Popups::sanitize_meta( array $meta = array() )
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Parameters Parameters
- $meta
-
(Optional)
Default value: array()
Return Return
(array)
Source Source
File: classes/Admin/Popups.php
public static function sanitize_meta( $meta = array() ) { if ( ! empty( $meta ) ) { foreach ( $meta as $key => $value ) { if ( is_array( $value ) ) { $meta[ $key ] = self::sanitize_meta( $value ); } else if ( is_string( $value ) ) { try { $value = json_decode( stripslashes( $value ) ); if ( is_object( $value ) || is_array( $value ) ) { $meta[ $key ] = PUM_Admin_Helpers::object_to_array( $value ); } } catch ( Exception $e ) { } } } } return $meta; }
Expand full source code Collapse full source code View on Trac