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_Model_Theme::setup( WP_Post $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
Parameters Parameters
- $post
-
(Required)
Source Source
File: classes/Model/Theme.php
public function setup( $post ) { parent::setup( $post ); if ( ! $this->is_valid() ) { return; } if ( $this->ID === 5 ) { $test = '1'; } if ( ! isset( $this->data_version ) ) { $this->data_version = (int) $this->get_meta( 'popup_theme_data_version' ); if ( ! $this->data_version ) { $theme_overlay_v1 = $this->get_meta( 'popup_theme_overlay_background_color' ); $theme_overlay_v2 = $this->get_meta( 'popup_theme_overlay' ); // If there are existing settings set the data version to 1/2 so they can be updated. // Otherwise set to the current version as this is a new popup. if ( ! empty( $theme_overlay_v1 ) ) { $this->data_version = 1; } else if ( ! empty( $theme_overlay_v2 ) && is_array( $theme_overlay_v2 ) ) { $this->data_version = 2; } else { $this->data_version = $this->model_version; } $this->update_meta( 'popup_theme_data_version', $this->data_version ); } } if ( $this->data_version < $this->model_version && pum_passive_theme_upgrades_enabled() ) { /** * Process passive settings migration as each popup is loaded. The will only run each migration routine once for each popup. */ $this->passive_migration(); } }
Expand full source code Collapse full source code View on Trac