{"id":2930446,"date":"2012-07-30T19:04:07","date_gmt":"2012-07-30T19:04:07","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/metabox-showcase-plugin-menu-problem\/"},"modified":"2016-08-20T14:08:43","modified_gmt":"2016-08-20T14:08:43","slug":"metabox-showcase-plugin-menu-problem","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/metabox-showcase-plugin-menu-problem\/","title":{"rendered":"Metabox Showcase Plugin &#8211; Menu Problem"},"content":{"rendered":"<p>Hello there,<\/p>\n<p>I&#8217;m writing a small plugin to track my computer repairs through the wordpress admin area.<\/p>\n<p>I&#8217;m trying to recreate similiar functions of the wordpress dashboard in my own plugin.  I&#8217;m currently using the following: http:\/\/www.code-styling.de\/english\/how-to-use-wordpress-metaboxes-at-own-plugins<br \/>\nHere is the pastebin of the sourcecode of that plugin. <a href=\"http:\/\/pastebin.com\/uTS6jVEK\">http:\/\/pastebin.com\/uTS6jVEK<\/a><\/p>\n<p>However I&#8217;m trying to edit the following line:<\/p>\n<p><code>$this-&gt;pagehook = add_options_page(&#039;Howto Metabox Page Title&#039;, &quot;HowTo Metaboxes&quot;, &#039;manage_options&#039;, &#039;howto_metaboxes&#039;, array(&amp;$this, &#039;on_show_page&#039;));<\/code><\/p>\n<p>Into:<\/p>\n<p><code>add_submenu_page(&#039;pctracker_dashboard&#039;, &#039;Dashboard&#039;, &#039;Dashboard&#039;, 10, &#039;pctracker_dashboard&#039;, &#039;pctracker_dashboard&#039;);<\/code><\/p>\n<p>I&#8217;m receiving the following error:<br \/>\n<code>Warning: call_user_func_array() expects parameter 1 to be a valid callback, function &#039;pctracker_dashboard&#039; not found or invalid function name in \/home\/sites\/jmitservices.co.uk\/public_html\/pctracker\/wp-includes\/plugin.php on line 403<\/code><\/p>\n<p>Can anyone help?<br \/>\nThanks very much,<br \/>\nJason<\/p>\n","protected":false},"template":"","class_list":["post-2930446","topic","type-topic","status-closed","hentry","topic-tag-dashboard"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2930446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2930446\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2930446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}