From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- inc/compatibility/class-astra-beaver-builder.php | 113 +++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 inc/compatibility/class-astra-beaver-builder.php (limited to 'inc/compatibility/class-astra-beaver-builder.php') diff --git a/inc/compatibility/class-astra-beaver-builder.php b/inc/compatibility/class-astra-beaver-builder.php new file mode 100644 index 0000000..c372683 --- /dev/null +++ b/inc/compatibility/class-astra-beaver-builder.php @@ -0,0 +1,113 @@ +post_content ) && $do_render && FLBuilderModel::is_builder_enabled() ) { + + update_post_meta( $id, '_astra_content_layout_flag', 'disabled' ); + update_post_meta( $id, 'site-post-title', 'disabled' ); + update_post_meta( $id, 'ast-title-bar-display', 'disabled' ); + update_post_meta( $id, 'ast-featured-img', 'disabled' ); + + $content_layout = get_post_meta( $id, 'site-content-layout', true ); + if ( empty( $content_layout ) || 'default' == $content_layout ) { + update_post_meta( $id, 'site-content-layout', 'page-builder' ); + } + + $sidebar_layout = get_post_meta( $id, 'site-sidebar-layout', true ); + if ( empty( $sidebar_layout ) || 'default' == $sidebar_layout ) { + update_post_meta( $id, 'site-sidebar-layout', 'no-sidebar' ); + } + } + } + } + + /** + * Add assets in theme + * + * @param array $assets list of theme assets (JS & CSS). + * @return array List of updated assets. + * @since 3.5.0 + */ + public function add_styles( $assets ) { + + if ( ! empty( $assets['css'] ) ) { + $assets['css'] = array( 'astra-bb-builder' => 'compatibility/page-builder/bb-plugin' ) + $assets['css']; + } + return $assets; + } + + } + +endif; + +/** + * Kicking this off by calling 'get_instance()' method + */ +Astra_Beaver_Builder::get_instance(); -- cgit v1.2.3-60-g2f50