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