Astra_Builder_Admin::migrate_to_builder()
Migrate to New Header Builder
Description
Source
File: inc/core/builder/class-astra-builder-admin.php
public function migrate_to_builder() { check_ajax_referer( 'astra-builder-module-nonce', 'nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You don\'t have the access', 'astra' ) ); } $migrate = isset( $_POST['value'] ) ? sanitize_key( $_POST['value'] ) : ''; $migrate = ( $migrate ) ? true : false; /** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migration_flag = astra_get_option( 'v3-option-migration', false ); astra_update_option( 'is-header-footer-builder', $migrate ); if ( $migrate && false === $migration_flag ) { astra_header_builder_migration(); } wp_send_json_success(); }
Expand full source code Collapse full source code View on Trac