diff --git a/frontblocks.php b/frontblocks.php index a16caf0..656cfc2 100644 --- a/frontblocks.php +++ b/frontblocks.php @@ -58,7 +58,7 @@ function frbl_plugin_activation_redirect() { // Redirect to settings page. if ( get_option( 'frbl_activation_redirect', false ) ) { delete_option( 'frbl_activation_redirect' ); - wp_safe_redirect( admin_url( 'admin.php?page=frontblocks-settings' ) ); + wp_safe_redirect( admin_url( 'themes.php?page=frontblocks-settings' ) ); exit; } } diff --git a/includes/Admin/Settings.php b/includes/Admin/Settings.php index 031abae..26845bd 100644 --- a/includes/Admin/Settings.php +++ b/includes/Admin/Settings.php @@ -198,7 +198,7 @@ public function add_menu_icon_styles() { * @return void */ public function enqueue_admin_styles( $hook ) { - if ( 'toplevel_page_' . $this->page_slug !== $hook ) { + if ( 'appearance_page_' . $this->page_slug !== $hook ) { return; } @@ -382,19 +382,12 @@ function updateEventsTypeVisibility() { * @return void */ public function register_menu() { - // Use SVG icon if available, otherwise fallback to dashicon. - $icon_url = FRBL_PLUGIN_URL . 'assets/admin/icons/icon-menu.svg'; - $icon_path = FRBL_PLUGIN_PATH . 'assets/admin/icons/icon-menu.svg'; - $menu_icon = file_exists( $icon_path ) ? $icon_url : 'dashicons-block-default'; - - add_menu_page( + add_theme_page( __( 'FrontBlocks Settings', 'frontblocks' ), __( 'FrontBlocks', 'frontblocks' ), 'edit_theme_options', $this->page_slug, - array( $this, 'render_page' ), - $menu_icon, - 81 + array( $this, 'render_page' ) ); }