Astra_Addon_Update::v_1_0_0_beta_6()
Update options of older version than 1.0.0-beta.6.
Description
Return
(void)
Source
File: classes/class-astra-addon-update.php
public static function v_1_0_0_beta_6() {
$options = array(
'footer-adv' => 'layout-3',
'footer-adv-area-padding' => array(
'top' => 50,
'right' => '',
'bottom' => 50,
'left' => '',
),
);
// Get all supported post Types. [excluding 'page', 'post'].
$post_types = astra_get_supported_posts();
foreach ( $post_types as $slug => $label ) {
$options[ 'single-' . esc_attr( $slug ) . '-content-layout' ] = 'content-boxed-container';
}
// Get all supported post Types which HAVE TAXONOMIES. [excluding 'page', 'post'].
$post_types_tax = astra_get_supported_posts( true );
foreach ( $post_types_tax as $index => $slug ) {
$options[ 'archive-' . esc_attr( $slug ) . '-content-layout' ] = 'content-boxed-container';
}
$astra_options = get_option( 'astra-settings', array() );
foreach ( $options as $key => $value ) {
if ( ! isset( $astra_options[ $key ] ) ) {
$astra_options[ $key ] = $value;
}
}
update_option( 'astra-settings', $astra_options );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.6 | Introduced. |