Skip to content

Commit 8456d66

Browse files
committed
Opt to make Yoast adminbar CSS dependent on core admin-bar CSS
1 parent b7f8306 commit 8456d66

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

admin/class-admin-asset-manager.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ protected function styles_to_be_registered() {
706706
array(
707707
'name' => 'adminbar',
708708
'src' => 'adminbar-' . $flat_version,
709+
'deps' => array(
710+
'admin-bar',
711+
),
709712
),
710713
array(
711714
'name' => 'primary-category',

inc/class-wpseo-admin-bar-menu.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,6 @@ public function enqueue_assets() {
115115
$this->asset_manager->enqueue_style( 'adminbar' );
116116
}
117117

118-
/**
119-
* Filter the XPaths for which elements should get the data-ampdevmode attribute.
120-
*
121-
* Note that the data-ampdevmode attribute could alternatively be added via the style_loader_tag filter.
122-
*
123-
* @param string[] $xpaths XPaths.
124-
* @return string[] XPaths.
125-
*/
126-
public function filter_amp_dev_mode_element_xpaths( $xpaths ) {
127-
$xpaths[] = '//link[ @id = "yoast-seo-adminbar-css" ]';
128-
return $xpaths;
129-
}
130-
131118
/**
132119
* Registers the hooks.
133120
*
@@ -142,8 +129,6 @@ public function register_hooks() {
142129

143130
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );
144131
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
145-
146-
add_filter( 'amp_dev_mode_element_xpaths', array( $this, 'filter_amp_dev_mode_element_xpaths' ) );
147132
}
148133

149134
/**

0 commit comments

Comments
 (0)