'styles' => [],
'general' => [],
],
-
+ // Deprecations for style-only modules
+ 'styledeprecations' => [],
];
foreach ( $this->modules as $name ) {
$data['styles'][] = $name;
}
}
+ $deprecation = $module->getDeprecationInformation();
+ if ( $deprecation ) {
+ $data['styledeprecations'][] = $deprecation;
+ }
}
foreach ( $this->moduleScripts as $name ) {
);
}
- // External stylesheets
+ // Deprecations for only=styles modules
+ if ( $data['styledeprecations'] ) {
+ $chunks[] = ResourceLoader::makeInlineScript(
+ implode( '', $data['styledeprecations'] ),
+ $nonce
+ );
+ }
+
+ // External stylesheets (only=styles)
if ( $data['styles'] ) {
$chunks[] = $this->getLoad(
$data['styles'],