开发者

How do you not show the WordPress plugins directory path in the browser?

Let's say you have a plugin shortcode that generates a form in your post/page, and that form's action attribute is set to a script located in the same plugins directory as the shortcode that generated the form. How do you make it so WP does not expose the path to the plugins directory when it submits the form?

Basically, I want domain.com/wp-install-dir/wp-content/plugins/plugin-name/process_form.php to map to domain.com/plugin-name/process_form.php开发者_开发技巧, so that the wp-install-dir/wp-content/plugins part of the url path isn't exposed to the user.

Is there a WordPress way of specifying a path to a script in the plugins directory that does not expose the location of the plugins directory in the browser, or is this something I have to set up with .htaccess/mod_rewrite? I hope I'm asking my question clearly.


http://codex.wordpress.org/Class_Reference/WP_Rewrite

Working with the rewrite/routing system is about as advanced as it gets for a WordPress plugin developer. You should be a competent programmer and comfortable reading others' code and debugging your own.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜