Astra_Meta_Boxes::load_classic_editor_styles()

Enqueue metabox CSS for classic editor pages (non-block-editor).


Description


Return

(void)


Source

File: inc/metabox/class-astra-meta-boxes.php

		public function load_classic_editor_styles() {
			if ( ! is_admin() ) {
				return;
			}
			$screen = get_current_screen();
			if ( ! $screen || $screen->is_block_editor() ) {
				return;
			}
			$post_type           = get_post_type();
			$excluded_post_types = self::get_excluded_meta_post_types();
			if ( $post_type && in_array( $post_type, $excluded_post_types, true ) ) {
				return;
			}
			$file_prefix  = is_rtl() ? '-rtl' : '';
			$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 );
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.