• Resolved eriktailor

    (@eriktailor)


    Hello!

    I would like to hide the “Import demo data” item from the WordPress admin menu, after the import was completed.

    Yes I tried the ocdi/after_import filter with remove_submenu_page( 'themes.php', 'one-click-demo-import' ); but it doesn’t seem to work…

    Can somebody write a code for this purpose?

    Thanks!
    Erik

Viewing 1 replies (of 1 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi Erik,

    I would advise against it, because you could prevent your users to access our plugin in cases when their import did not finish successfully and they would need to run it once more…

    We don’t have any custom code for this particular use case, but I guess you would have to create a WP Option flag, which would be set after the OCDI import hook, and then if that flag is set, you would remove the submenu page in the correct WP menu hook (with correct priority).

    Take care!

Viewing 1 replies (of 1 total)
  • The topic ‘Remove from menu’ is closed to new replies.