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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -