Astra_Addon_Update::v_1_0_0_beta_7()
Update options of older version than 1.0.0-beta.7.
Description
Return
(void)
Source
File: classes/class-astra-addon-update.php
public static function v_1_0_0_beta_7() {
$options = array(
'footer-adv' => 'disabled',
);
// 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 ) . '-sidebar-layout' ] = 'right-sidebar';
}
// 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 ) . '-sidebar-layout' ] = 'right-sidebar';
}
$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.7 | Introduced. |