Title: [Plugin: Dynamic Widgets] Error: PHP Fatal error:  Call to undefined function add_submenu_page()
Last modified: August 20, 2016

---

# [Plugin: Dynamic Widgets] Error: PHP Fatal error: Call to undefined function add_submenu_page()

 *  Resolved anonymized-9246034
 * (@anonymized-9246034)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/)
 * Hi,
 * I have an error and wondered if anyone could help.
 * The error is
 * PHP Fatal error: Call to undefined function add_submenu_page() in /wp-content/
   plugins/dynamic-widgets/dynamic-widgets.php on line 559
 * Thanks.
 * [http://wordpress.org/extend/plugins/dynamic-widgets/](http://wordpress.org/extend/plugins/dynamic-widgets/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Contributor [Qurl](https://wordpress.org/support/users/qurl/)
 * (@qurl)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791489)
 * It looks like you’re not using the latest version of Dynamic Widgets. Please 
   make sure you do. [http://downloads.wordpress.org/plugin/dynamic-widgets.1.5.2.zip](http://downloads.wordpress.org/plugin/dynamic-widgets.1.5.2.zip)
 *  Thread Starter anonymized-9246034
 * (@anonymized-9246034)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791491)
 * Thanks for the reply. I am using 1.5.2
 *  Plugin Contributor [Qurl](https://wordpress.org/support/users/qurl/)
 * (@qurl)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791493)
 * I’m sorry, but that’s almost impossible. The call to the function `add_submenu_page()`
   is in version 1.5.2 not on line 559 in dynamic-widgets.php.
 *  Thread Starter anonymized-9246034
 * (@anonymized-9246034)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791495)
 * I double checked and it is 1.5.2 I also downloaded it just now to check with 
   my version on the site and it’s the same.
 * Maybe my editor reads the lines slightly different, but here is my line 550 to
   573
 * #550# add_action(‘sidebar_admin_setup’, ‘dynwid_add_widget_control’);
    } } else{
   if ( $DW->enabled ) { add_action(‘wp_head’, ‘dynwid_filter_widgets’); } } } else{//
   Show errors in the admin page add_submenu_page(‘themes.php’, __(‘Dynamic Widgets’,
   DW_L10N_DOMAIN), __(‘Dynamic Widgets’, DW_L10N_DOMAIN), ‘edit_theme_options’,‘
   dynwid-config’, ‘dynwid_disabled_page’); } } /** * dynwid_install() Installation*
   [@since](https://wordpress.org/support/users/since/) 1.3.1 */ function dynwid_install(){
   if ( function_exists(‘is_multisite’) ) { if ( is_multisite() && isset($_GET[‘
   networkwide’]) && $_GET[‘networkwide’] == ‘1’ ) { $plugin = plugin_basename(__FILE__);
   deactivate_plugins($plugin); } else { dynwid_activate(); #573# }
 *  Plugin Contributor [Qurl](https://wordpress.org/support/users/qurl/)
 * (@qurl)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791500)
 * That is extremely weird. If you look in the Trac explorer at [http://plugins.trac.wordpress.org/browser/dynamic-widgets/trunk/dynamic-widgets.php?rev=532983](http://plugins.trac.wordpress.org/browser/dynamic-widgets/trunk/dynamic-widgets.php?rev=532983)
   you will see the line is in 626.
 * In this case it doesn’t matter so much, because that line of code is there just
   to show you an error message saying you’re host is not meeting the requirements
   needed for Dynamic Widgets to run. DW needs at least PHP 5.1.0 and WordPress 
   3.
 *  Thread Starter anonymized-9246034
 * (@anonymized-9246034)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791501)
 * PHP Version 5.3.8
    Wordpress 3.3.2
 * Yup, not making sense to me either 🙂
 *  Plugin Contributor [Qurl](https://wordpress.org/support/users/qurl/)
 * (@qurl)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791504)
 * Making it even more weird. Something very strange is going on at your host.
    - PHP complains about not able to find the function `add_submenu_page()` which
      is a [common WP function](http://codex.wordpress.org/Function_Reference/add_submenu_page).
    - DW complains about not meeting minimum requirements, so either `PHP_VERSION`
      and/or `$GLOBALS['wp_version']` is not reporting the correct value or the 
      PHP function `version_compare()` is acting funny.
 * I’d almost suspect a broken PHP version, but then WordPress would not work either
   I guess. I really have no idea what’s going on.
 *  Thread Starter anonymized-9246034
 * (@anonymized-9246034)
 * [14 years ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791506)
 * LOL, interesting.
 * I will look over those points you mentioned and see if it corrects the issue.
 * I do have a custom php.ini in the account and there was an odd issue with the
   site and magic quotes before moving it to this server. Pretty much everything
   was fixed so I was even surprised to see these errors.
 *  [ksnyde](https://wordpress.org/support/users/ksnyde/)
 * (@ksnyde)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791802)
 * [@omega](https://wordpress.org/support/users/omega/) did you ever solve this?
   I’ve run into this today in a plugin that I created but never had any issues 
   with it before. Bizzare.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Dynamic Widgets] Error: PHP Fatal error: Call to undefined function
add_submenu_page()’ is closed to new replies.

 * ![](https://ps.w.org/dynamic-widgets/assets/icon-256x256.png?rev=2968917)
 * [Dynamic Widgets](https://wordpress.org/plugins/dynamic-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dynamic-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dynamic-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/dynamic-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dynamic-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dynamic-widgets/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [ksnyde](https://wordpress.org/support/users/ksnyde/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-dynamic-widgets-error-php-fatal-error-call-to-undefined-function-add_submenu_page/#post-2791802)
 * Status: resolved