Astra_Meta_Boxes::load_scripts()
Enqueue Script for Meta settings.
Description
Return
(void)
Source
File: inc/metabox/class-astra-meta-boxes.php
public function load_scripts() {
$post_type = get_post_type();
$metabox_name = sprintf(
// Translators: %s is the theme name.
__( '%s Settings', 'astra' ),
astra_get_theme_name()
);
$settings_title = $metabox_name;
/* Directory and Extension */
$file_prefix = ( true === SCRIPT_DEBUG ) ? '' : '.min';
$dir_name = ( true === SCRIPT_DEBUG ) ? 'unminified' : 'minified';
$css_uri = ASTRA_THEME_URI . '/inc/metabox/extend-metabox/css/' . $dir_name;
wp_enqueue_style( 'astra-meta-box', $css_uri . '/metabox' . $file_prefix . '.css', array(), ASTRA_THEME_VERSION );
wp_enqueue_script( 'astra-meta-settings' );
wp_localize_script(
'astra-meta-settings',
'astMetaParams',
array(
'post_type' => $post_type,
'title' => $settings_title,
'sidebar_options' => $this->get_sidebar_options(),
'sidebar_title' => __( 'Sidebar', 'astra' ),
'content_layout' => $this->get_content_layout_options(),
'content_layout_title' => __( 'Content Layout', 'astra' ),
'disable_sections_title' => __( 'Disable Sections', 'astra' ),
'disable_sections' => $this->get_disable_section_fields(),
'sticky_header_title' => __( 'Sticky Header', 'astra' ),
'sticky_header_options' => $this->get_sticky_header_options(),
'transparent_header_title' => __( 'Transparent Header', 'astra' ),
'page_header_title' => __( 'Page Header', 'astra' ),
'header_options' => $this->get_header_enabled_options(),
'page_header_options' => $this->get_page_header_options(),
'is_bb_themer_layout' => ! astra_check_is_bb_themer_layout(), // Show page header option only when bb is not activated.
'is_addon_activated' => defined( 'ASTRA_EXT_VER' ) ? true : false,
)
);
}
Expand full source code Collapse full source code View on Trac