Astra_Web_Stories::web_stories_css( string $dynamic_css, string $dynamic_css_filtered = '' )

Add dynamic CSS for the webstories.


Description


Parameters

$dynamic_css

(string) (Required) Astra Dynamic CSS.

$dynamic_css_filtered

(string) (Optional) Astra Dynamic CSS Filters.

Default value: ''


Return

(String) Generated dynamic CSS for Heading Colors.


Source

File: inc/compatibility/class-astra-web-stories.php

	public function web_stories_css( $dynamic_css, $dynamic_css_filtered = '' ) {
		// Using function check instead of class as there can be changes in the web stories plugin later, see 1.7.1 release https://github.com/google/web-stories-wp/pull/7266/files.
		if ( ! function_exists( '\Google\Web_Stories\render_theme_stories' ) ) {
			return $dynamic_css;
		}

		$options = get_option( 'web_stories_customizer_settings' );

		// bail if web stories are not enabled on the frontend.
		if ( empty( $options['show_stories'] ) || true !== $options['show_stories'] ) {
			return $dynamic_css;
		}

		$stories_css_array = array(
			'.web-stories-list.web-stories-list--customizer.is-view-type-circles' => array(
				'border-bottom' => '1px solid #ccc',
				'padding'       => '15px 0',
				'margin-bottom' => '0',
			),
		);

		$dynamic_css .= astra_parse_css( $stories_css_array );

		return $dynamic_css;
	}

Changelog

Changelog
Version Description
3.2.0 Introduced.


User Contributed Notes

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