php - WordPress plugin custom file -
php - WordPress plugin custom file -
i used shiba-example-plugin
starting point wordpress plugin , added filter redirect after login can check before letting user access website.
so redirect with: plugins_url() . '/shiba-example-plugin/check.php?id=' . $user_id;
how can construction 'check.php' file access wordpress variables , have top admin bar displayed on it?
for considered plain php file.
you need include wp-blog header
in order utilize wordpress global variables.
require($_server['document_root'] . '/wp-blog-header.php');
php wordpress wordpress-plugin
Comments
Post a Comment