Skip to content

Commit 8449cc5

Browse files
committed
Merge pull request #35 from material-components/fix/13-dialog-styles
Fix/13 dialog styles
2 parents b18b26d + 151a243 commit 8449cc5

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

plugin/assets/css/src/settings/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
@import "@material/dialog/dist/mdc.dialog.css";
1718
@import "./base.css";
1819
@import "./updater.css";
1920
@import "./switch.css";

plugin/assets/src/common/components/dialog/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*/
2020
import classNames from 'classnames';
2121
import { MDCDialog } from '@material/dialog';
22-
import '@material/dialog/dist/mdc.dialog.css';
2322

2423
/**
2524
* WordPress dependencies

plugin/assets/src/settings/constants.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const ACTIONS = {
3434
SET_UPDATED: 'SET_UPDATED',
3535
};
3636

37-
export const UPDATERS = {
37+
const ASSET_UPDATES = {
3838
FONTS: {
3939
title: __( 'Google Fonts', 'material-design' ),
4040
type: 'FONTS',
@@ -51,6 +51,9 @@ export const UPDATERS = {
5151
updateAvailable: 'update' === getConfig( 'iconsUpdateStatus' ),
5252
autoUpdates: parseInt( getConfig( 'iconsAutoUpdate' ), 10 ),
5353
},
54+
};
55+
56+
const CORE_UPDATES = {
5457
PLUGIN: {
5558
title: __( 'Material Design Plugin', 'material-design' ),
5659
type: 'PLUGIN',
@@ -73,4 +76,9 @@ export const UPDATERS = {
7376
},
7477
};
7578

79+
export const UPDATERS = {
80+
...ASSET_UPDATES,
81+
...( getConfig( 'coreUpdatesEnabled' ) ? CORE_UPDATES : {} ),
82+
};
83+
7684
export const KEY_PLACEHOLDER = '•••••••••••••••••••••••••••••';

plugin/php/class-admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ public function enqueue_assets() {
319319
'themeAutoUpdate' => in_array( Plugin::THEME_SLUG, get_site_option( 'auto_update_themes', [] ), true ),
320320
'pluginUpdateStatus' => $plugin_status,
321321
'themeUpdateStatus' => $theme_status,
322+
'coreUpdatesEnabled' => version_compare( get_bloginfo( 'version' ), '5.5', '>=' ),
322323
'coreUpdateUrl' => admin_url( 'update-core.php' ),
323324
'autoUpdateNonce' => wp_create_nonce( 'updates' ),
324325
'autoUpdateUrl' => admin_url( 'admin-ajax.php' ),

0 commit comments

Comments
 (0)