Skip to content

Commit dd8a965

Browse files
committed
Fix RTL layout on Connectors admin screen
1 parent b00c4ac commit dd8a965

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

src/wp-admin/options-connectors.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,41 @@
3030
$title = __( 'Connectors' );
3131

3232
// Set parent file for menu highlighting.
33-
$parent_file = 'options-general.php';
33+
$parent_file = 'options-general.php';
34+
$submenu_file = 'options-connectors.php';
35+
36+
add_action(
37+
'admin_head-options-connectors.php', // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
38+
static function () {
39+
?>
40+
<style>
41+
#wpcontent {
42+
background-color: #fff;
43+
}
44+
</style>
45+
<?php
46+
}
47+
);
3448

3549
require_once ABSPATH . 'wp-admin/admin-header.php';
3650

3751
// Render the Connectors page.
3852
wp_options_connectors_wp_admin_render_page();
3953

54+
if ( is_rtl() ) {
55+
?>
56+
<style>
57+
.rtl .admin-ui-page__header > div > div:first-child {
58+
justify-content: start;
59+
}
60+
61+
.rtl ul#adminmenu a.wp-has-current-submenu::after,
62+
.rtl ul#adminmenu > li.current > a.current::after {
63+
border-right-color: transparent;
64+
border-left-color: #fff;
65+
}
66+
</style>
67+
<?php
68+
}
69+
4070
require_once ABSPATH . 'wp-admin/admin-footer.php';

0 commit comments

Comments
 (0)