Skip to content

Commit b6fc7bb

Browse files
authored
fix duplicate entries in featured tab (#307)
Signed-off-by: Andy Fragen <[email protected]>
1 parent 47ab200 commit b6fc7bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inc/packages/admin/namespace.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ function bootstrap() {
4141
add_filter( 'wp_list_table_class_name', __NAMESPACE__ . '\\maybe_override_list_table' );
4242

4343
// Needed for pre WordPress 6.9 compatibility.
44-
add_action( 'install_plugins_featured', __NAMESPACE__ . '\\replace_featured_message', 5 );
44+
global $wp_version;
45+
if ( version_compare( $wp_version, '6.9-beta1', '<' ) ) {
46+
add_action( 'install_plugins_featured', __NAMESPACE__ . '\\replace_featured_message' );
47+
add_action( 'admin_init', fn() => remove_action( 'install_plugins_featured', 'install_dashboard' ) );
48+
}
4549
}
4650

4751
/**

0 commit comments

Comments
 (0)