Astra_Theme_Update::v_1_0_8()
Update options of older version than 1.0.8.
Description
Source
File: inc/theme-update/class-astra-theme-update.php
public static function v_1_0_8() { $options = array( 'body-line-height', // Addon Options. 'footer-adv-wgt-title-line-height', 'footer-adv-wgt-content-line-height', 'line-height-related-post', 'title-bar-title-line-height', 'title-bar-breadcrumb-line-height', 'line-height-page-title', 'line-height-post-meta', 'line-height-h1', 'line-height-h2', 'line-height-h3', 'line-height-h4', 'line-height-h5', 'line-height-h6', 'line-height-footer-content', 'line-height-site-title', 'line-height-site-tagline', 'line-height-primary-menu', 'line-height-primary-dropdown-menu', 'line-height-widget-title', 'line-height-widget-content', 'line-height-entry-title', ); $astra_options = get_option( ASTRA_THEME_SETTINGS, array() ); if ( 0 < count( $astra_options ) ) { foreach ( $options as $key ) { if ( array_key_exists( $key, $astra_options ) && is_array( $astra_options[ $key ] ) ) { if ( in_array( $astra_options[ $key ]['desktop-unit'], array( '', 'em' ) ) ) { $astra_options[ $key ] = $astra_options[ $key ]['desktop']; } else { $astra_options[ $key ] = ''; } } } } update_option( ASTRA_THEME_SETTINGS, $astra_options ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.8 | Introduced. |