File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change 9
9
require_once __DIR__ . '/admin-bar.php ' ;
10
10
11
11
add_action ( 'init ' , __NAMESPACE__ . '\register_block_types ' );
12
- add_action ( 'admin_bar_init ' , __NAMESPACE__ . '\remove_admin_bar_callback ' , 15 );
13
12
add_action ( 'rest_api_init ' , __NAMESPACE__ . '\register_routes ' );
14
13
add_filter ( 'wp_enqueue_scripts ' , __NAMESPACE__ . '\register_block_assets ' , 200 ); // Always last.
15
14
add_action ( 'wp_enqueue_scripts ' , __NAMESPACE__ . '\enqueue_compat_wp4_styles ' , 5 ); // Before any theme CSS.
@@ -83,16 +82,6 @@ function register_block_assets() {
83
82
);
84
83
}
85
84
86
- /**
87
- * Remove the default margin-top added when the admin bar is used.
88
- *
89
- * The core handling uses `!important`, which overrides the sticky header offset in `common.pcss`.
90
- */
91
- function remove_admin_bar_callback () {
92
- remove_action ( 'gp_head ' , '_admin_bar_bump_cb ' );
93
- remove_action ( 'wp_head ' , '_admin_bar_bump_cb ' );
94
- }
95
-
96
85
/**
97
86
* Register REST API routes, so non-WP applications can integrate it.
98
87
*/
Original file line number Diff line number Diff line change 21
21
html {
22
22
--wp--custom--alignment--scroll-bar-width : 8 px ;
23
23
24
- /* Offset from the top of the page which is covered by "stuck" items (admin bar & header). */
25
- --wp-global-header-offset : calc (var (--wp-global-header-height, 0 px ) + var (--wp-admin--admin-bar--height, 0 px ));
26
- margin-top : var (--wp-admin--admin-bar--height, 0 );
27
24
height : unset; /* Let height use default browser height. */
28
25
}
29
26
You can’t perform that action at this time.
0 commit comments