Hot answers tagged

1

Generally speaking, you can typically take PHP code and place a comment at the top: <?php /* Plugin Name: My SOAP Plugin */ ?> You can then create a folder for the plugin inside /wp-content/plugins/ (for example, /wp-conten/plugins/my-soap-plugin/) and place the PHP file inside that folder. At that point, you can activate the plugin from wp-admin. ...


1

You can store field values and error messages in session or transient and use them when (re)displaying your form. In your callback action, if data is not valid, save error message and submitted field values. In admin_notices hook check for saved error message. If there is one, show it as error notice. Don't forget to remove saved session/transient value. ...


1

Just use $_SERVER['REQUEST_URI']; instead of home_url(add_query_arg(array(), $wp->request));


Only top voted, non community-wiki answers of a minimum length are eligible