add_submenu_page was called incorrectly
-
Actually, this is a Notice, that shows up when WP_DEBUG is enable
d in the siteThe full error is:
Notice: add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information.
WordPress: 5.7.2
Instant Indexing for Google : 1.0.0So to fix this, i removed ‘none’ in this file:
the function name is admin_menu()
fast-indexing-api/includes/class-instant-indexing.php #379Actually the position param is optional, so i just removed int 76 also.
After removing my code looks like this:$this->dashboard_menu_hook_suffix = add_submenu_page( 'instant-indexing-dashboard', 'Rank Math', __( 'Dashboard', 'fast-indexing-api' ), apply_filters( 'rank_math/indexing_api/capability', 'manage_options' ), 'instant-indexing-dashboard', array( $this, 'show_dashboard' ) );
After this, the Notice in php should disappear.
Regards.
- The topic ‘add_submenu_page was called incorrectly’ is closed to new replies.