Astra_Addon_Theme_Builder::theme_builder_admin_enqueue_scripts()
Enqueue scripts and styles.
Description
Return
(void)
Source
File: addons/advanced-hooks/classes/class-astra-addon-theme-builder.php
public function theme_builder_admin_enqueue_scripts() { $file_prefix = ''; if ( is_rtl() ) { $file_prefix .= '.rtl'; } wp_enqueue_style( 'astra-theme-builder-style', ASTRA_ADDON_EXT_ADVANCED_HOOKS_URL . 'theme-builder/build/index' . $file_prefix . '.css', array(), ASTRA_EXT_VER ); wp_enqueue_script( 'astra-theme-builder-script', ASTRA_ADDON_EXT_ADVANCED_HOOKS_URL . 'theme-builder/build/index.js', array( 'wp-element' ), ASTRA_EXT_VER, true ); wp_enqueue_style( 'dashicons' ); if ( function_exists( 'astra_is_white_labelled' ) ) { $white_labelled = astra_is_white_labelled(); } $localized_data = array( 'title' => __( 'Site Builder', 'astra', 'astra-addon' ), 'rest_url' => get_rest_url( '', '/astra-addon/v1/custom-layouts/' ), 'new_custom_layout_base_url' => admin_url( 'post-new.php?post_type=astra-advanced-hook' ), 'astra_pricing_page_url' => 'https://wpastra.com/pricing/', 'astra_docs_page_url' => 'https://wpastra.com/docs/custom-layouts-pro/', 'admin_url' => admin_url(), 'spectra_pro_url' => 'https://wpspectra.com/pricing/', 'uae_pro_url' => 'https://ultimateelementor.com/pricing/', 'show_notice_for' => $this->show_theme_builder_notice(), 'table_view_url' => admin_url( 'edit.php?post_type=astra-advanced-hook&view=table-view' ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'logo_url' => apply_filters( 'astra_admin_menu_icon', '' ), 'white_labelled' => isset( $white_labelled ) ? $white_labelled : false, ); wp_localize_script( 'astra-theme-builder-script', 'astra_theme_builder', $localized_data ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |