|
7 | 7 |
|
8 | 8 | namespace Activitypub\WP_Admin; |
9 | 9 |
|
10 | | -use function Activitypub\site_supports_blocks; |
11 | 10 | use function Activitypub\user_can_activitypub; |
12 | 11 |
|
13 | 12 | /** |
@@ -36,19 +35,16 @@ public static function admin_menu() { |
36 | 35 | if ( user_can_activitypub( \get_current_user_id() ) ) { |
37 | 36 | $capability = ACTIVITYPUB_BLOG_MODE === \get_option( 'activitypub_actor_mode' ) ? 'manage_options' : 'activitypub'; |
38 | 37 |
|
39 | | - // Check for block support and WP version. |
40 | | - if ( site_supports_blocks() && \version_compare( \get_bloginfo( 'version' ), '6.9', '>=' ) ) { |
41 | | - $app_hook = \add_dashboard_page( |
42 | | - \__( 'Social Web', 'activitypub' ), |
43 | | - \__( 'Social Web', 'activitypub' ), |
44 | | - $capability, |
45 | | - 'activitypub-social-web', |
46 | | - array( Social_Web::class, 'render_page' ) |
47 | | - ); |
| 38 | + $social_web_hook = \add_dashboard_page( |
| 39 | + \__( 'Social Web', 'activitypub' ), |
| 40 | + \__( 'Social Web', 'activitypub' ), |
| 41 | + $capability, |
| 42 | + 'activitypub-social-web', |
| 43 | + array( Social_Web::class, 'render_page' ) |
| 44 | + ); |
48 | 45 |
|
49 | | - \add_action( 'load-' . $app_hook, array( Social_Web::class, 'remove_admin_notices' ) ); |
50 | | - \add_action( 'admin_print_scripts-' . $app_hook, array( Social_Web::class, 'enqueue_scripts' ) ); |
51 | | - } |
| 46 | + \add_action( 'load-' . $social_web_hook, array( Social_Web::class, 'remove_admin_notices' ) ); |
| 47 | + \add_action( 'admin_print_scripts-' . $social_web_hook, array( Social_Web::class, 'enqueue_scripts' ) ); |
52 | 48 |
|
53 | 49 | $followers_list_page = \add_users_page( |
54 | 50 | \__( 'Followers ⁂', 'activitypub' ), |
|
0 commit comments