Add support for creating styles from block attributes e.g., text alignment styles
MAILPOET-5643
This commit is contained in:
committed by
Jan Lysý
parent
4567c6d3c1
commit
0d771a7fc5
@ -91,6 +91,8 @@ class SettingsController {
|
||||
],
|
||||
];
|
||||
|
||||
private $availableStylesheets = '';
|
||||
|
||||
public function getSettings(): array {
|
||||
$coreDefaultSettings = get_default_block_editor_settings();
|
||||
$coreThemeData = \WP_Theme_JSON_Resolver::get_core_data();
|
||||
@ -113,6 +115,13 @@ class SettingsController {
|
||||
return self::DEFAULT_EMAIL_CONTENT_STYLES;
|
||||
}
|
||||
|
||||
public function getAvailableStylesheets(): string {
|
||||
if ($this->availableStylesheets) return $this->availableStylesheets;
|
||||
$coreThemeData = \WP_Theme_JSON_Resolver::get_core_data();
|
||||
$this->availableStylesheets = $coreThemeData->get_stylesheet();
|
||||
return $this->availableStylesheets;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{width: string, background: string, padding: array{bottom: string, left: string, right: string, top: string}}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user