php page not found for plugin options menu

Looking at an old commit on a plugin I am writing, I am seeing a couple of things that jump out at me. First is your options page declaration. I had mine as follows, using your labels: function settings_menu_email() { add_menu_page( ‘Set Email’, ‘Set Email’, ‘manage_options’, ’email_admin_menu’, ’email_admin_menu_callback’, ); add_submenu_page( ’email_admin_menu’, __( ‘Options’, ‘textdomain’ ), … Read more

How to inform the user that the save was not successful?

Handling admin notice on Edit Post When action related to post or editpost, we will be faced with redirect_post function. There are two filters you can use to handle the post messages, redirect_post_location and post_updated_messages ( see the list messages at https://core.trac.wordpress.org/browser/tags/4.8/src/wp-admin/edit-form-advanced.php#L135 ). Here the sample code how to handle the messages. Create new message … Read more

WordPress + JavaScipt + AJAX + MySQL: insert query for form

I’ve cleaned everything a little bit. Now it looks like that: ajax.js function ajaxSubmit(e){ var nazwa_szkolenia = document.getElementById(“nazwa_szkolenia”).value; var Data_szkolenia = document.getElementById(“Data_szkolenia”).value; var Godzina = document.getElementById(“Godzina”).value; var Max_pacjent = document.getElementById(“Max_pacjent”).value; var dataString = []; dataString[‘nazwa_szkolenia1’] = nazwa_szkolenia; dataString[‘Data_szkolenia1’] = Data_szkolenia; dataString[‘Godzina1’] = Godzina; dataString[‘Max_pacjent1’] = Max_pacjent; if (nazwa_szkolenia == ” || Data_szkolenia == ” || … Read more