Title: Switch from admin_init to init
Last modified: August 30, 2016

---

# Switch from admin_init to init

 *  [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * (@jchristopher)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/)
 * Hi there, great plugin! I’m wondering if you would consider switching from the`
   admin_init` hook and instead using `init`, it would make it easier for other 
   code that operates outside the WordPress admin to know that Tag Pages has added
   Tags to Pages. Thank you!
 * [https://wordpress.org/plugins/tag-pages/](https://wordpress.org/plugins/tag-pages/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [BjornW](https://wordpress.org/support/users/bjornw/)
 * (@bjornw)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/#post-6568400)
 * Thanks!
 * My apologizes for not responding sooner. Somehow wordpress.org does not seem 
   to send out notices of forum posts anymore?
 * I prefer not to do this since this would mean my code would also run when it’s
   not needed. See [http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init](http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init)
   versus [http://codex.wordpress.org/Plugin_API/Action_Reference/init](http://codex.wordpress.org/Plugin_API/Action_Reference/init)
 * A possible alternative solution for your problem might be to use is_plugin_active()(
   see: [http://codex.wordpress.org/Function_Reference/is_plugin_active](http://codex.wordpress.org/Function_Reference/is_plugin_active))
   or check for the existence of a function name within my plugin. This would indicate
   if the plugin is active or not.
 * I hope this helps,
 *  Thread Starter [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * (@jchristopher)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/#post-6568401)
 * Hi Bjorn,
 * In my use case I was supporting a user of one of my plugins that utilizes tags(
   on any WordPress object, not just Pages) but since your plugin only applies it’s
   logic when in the admin, my code wouldn’t work, it didn’t realize the taxonomy
   had been registered in the first place.
 * It wasn’t so much a matter of checking for your plugin specifically, just that
   the taxonomy had been registered. When that only happens in the admin, it’s impossible
   for other plugins to utilize that registered taxonomy or know it exists.
 * This would also come into play with themes that output Tags based on registered
   taxonomies. Since Tag Pages only “works” in the admin, the theme wouldn’t know
   to output any Tags because the taxonomy registration doesn’t exist outside the
   admin.
 * I hope that helps explain the use case, thanks again for the plugin!
 *  Plugin Author [BjornW](https://wordpress.org/support/users/bjornw/)
 * (@bjornw)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/#post-6568402)
 * Hi Jonathan,
 * Thanks for your quick reply & explanation. I think I understand your use case.
 * I need to do some pondering and testing to see what the implications would be
   of such a change, but if this would expand the plugin’s use without any significant
   issues I’ll implement it.
 *  Thread Starter [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * (@jchristopher)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/#post-6568403)
 * Sounds good!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Switch from admin_init to init’ is closed to new replies.

 * ![](https://ps.w.org/tag-pages/assets/icon.svg?rev=2751082)
 * [Tag Pages](https://wordpress.org/plugins/tag-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tag-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tag-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/tag-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tag-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tag-pages/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/switch-from-admin_init-to-init/#post-6568403)
 * Status: not resolved