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
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
PUM_Admin_Themes::process_deprecated_saves( $post_id, $post )
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
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
Parameters Parameters
- $post_id
-
(Required)
- $post
-
(Required)
Source Source
File: classes/Admin/Themes.php
public static function process_deprecated_saves( $post_id, $post ) { $field_prefix = 'popup_theme_'; $old_fields = (array) apply_filters( 'popmake_popup_theme_fields', array( 'overlay' => array(), 'container' => array(), 'title' => array(), 'content' => array(), 'close' => array(), ) ); foreach ( $old_fields as $section => $fields ) { $section_prefix = "{$field_prefix}{$section}"; $meta_values = array(); foreach ( $fields as $field => $args ) { $field_name = "{$section_prefix}_{$field}"; if ( isset( $_POST[ $field_name ] ) ) { $meta_values[ $field ] = apply_filters( 'popmake_metabox_save_' . $field_name, $_POST[ $field_name ] ); } } update_post_meta( $post_id, "popup_theme_{$section}", $meta_values ); } // TODO Remove this and all other code here. This should be clean and all code more compartmentalized. foreach ( self::deprecated_meta_fields() as $field ) { if ( isset( $_POST[ $field ] ) ) { $new = apply_filters( 'popmake_metabox_save_' . $field, $_POST[ $field ] ); update_post_meta( $post_id, $field, $new ); } else { delete_post_meta( $post_id, $field ); } } }
Expand full source code Collapse full source code View on Trac