weixin_39884144
weixin_39884144
2020-12-08 23:22

Change the name of the menu page

Case example: I create a page with add_menu_page and set as name the Plugin name. Freemius transform that menu page in a parent menu page, so in the sidebar we have the plugin name and in that a sub menu with a page with the name of the plugin name. In my case I want that page have a different name like settings.

Actual situation: screenshot6

What I want: screenshot7

该提问来源于开源项目:Freemius/wordpress-sdk

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39522170 weixin_39522170 5月前

    I'm not sure I understand, do you say that Freemius rename the first submenu item to the top level menu title?

    Here's a plugin that uses Freemius and has the same situation, the menu item's title is RatingWidget while the first submenu item is Settings: image

    点赞 评论 复制链接分享
  • weixin_39884144 weixin_39884144 5月前

    Uhm because that plugin have sub menu page but my plugin have only add_menu_page like the screenshot.

    点赞 评论 复制链接分享
  • weixin_39522170 weixin_39522170 5月前

    I see. How about adding a submenu page, in addition to the page, and naming it 'Settings'. I know it doesn't make sense if not using Freemius, but in the current case, it should do the job. What do you think?

    点赞 评论 复制链接分享
  • weixin_39884144 weixin_39884144 5月前

    Well for me is more simple do like the screenshot, rename the page on the fly with the plugin name in settings (get that value from fs_dynamic_init)

    点赞 评论 复制链接分享

相关推荐