How is a widget supposed to reference what is added to custom submenu or addmenu fields?

The setting API, which its usage is being demonstrated in that code is meant to be use as a framework to create settings pages which result in update of values in options. Widget settings are is a somewhat more abstract level. They are stored in options, but there is no flexibility how they are stored, … Read more

add_menu_page include a php page from theme directory

The error tells you what the problem is… PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function … Your “callback” isn’t a function. It is a file. It doesn’t work that way. You will need a helper function to include a file. Something like: add_menu_page( ‘Private Messages’, ‘Private Messages’, ‘manage_options’, ‘message_admin’, ‘include_message_admin’, … Read more

Custom plugin settings link doesn’t append current class to menu item when visited? Why?

I noticed your apwb_settings_page() function is adding the “Postal Pricing Settings” submenu using add_options_page(), and the documentation stated that: (bold formatting added by me) This function is a simple wrapper for a call to add_submenu_page(), passing the received arguments and specifying ‘options-general.php‘ as the $parent_slug argument. This means the new options page will be added … Read more

Pagination in plugin’s backend

In the admin back-end of a plugin, you can’t use the query_vars hook and the get_query_var built in function since the page itself is a query parameter. To get around this, I simply add a new query parameter to the end of your plugin page link called, ‘&pagenum=#” and I pull it out manually using: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)