Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
13 changes: 3 additions & 10 deletions includes/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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' )
);
}

Expand Down
Loading