Skip to content

Commit

Permalink
fix(theme): update selector to hide unused preview menu buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
rpeterman-gp committed Apr 30, 2024
1 parent 6904619 commit 44c37a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wp-content/themes/the-world/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ function tw_allowed_redirect_hosts( $hosts ) {
function tw_admin_styles() {
// Fixes layout heights of some accordion containers after WP 6.3 update.
echo '<style>
.components-panel__body { display: grid; }
.wpseo-meta-section, .wpseo-meta-section-react { min-height: unset; }
</style>';

// Hides device options from preview menu dropdown. They are basically useless and confusing.
echo '<style>
.edit-post-post-preview-dropdown .components-menu-group:first-child { display: none; }
.edit-post-post-preview-dropdown .components-menu-group + .components-menu-group { border-top: none; margin-top: -8px; }
.components-form-token-field__token-text { white-space: unset; }
.components-dropdown-menu__menu:has(a[target^="wp-preview"]) .components-menu-group:not(:has(a[target^="wp-preview"])) { display: none; }
.components-dropdown-menu__menu:has(a[target^="wp-preview"]) .components-menu-group:has(a[target^="wp-preview"]) { border-top: none; margin-top: -8px; }
</style>';
}
endif;
Expand Down

0 comments on commit 44c37a8

Please sign in to comment.