Support » Plugin: Recently Registered » Suggestion: Run on backend only?

  • Resolved Dominic

    (@dominicp)


    Thanks for sharing this great plugin. I took a quick look at the code, and it looks like it currently runs on all requests (front end and back end). Since it’s only designed to work on the admin side, could a conditional be added at the end to only instantiate the main plugin class for back end requests?

    Something like:

    if ( is_admin() ) new RRHE();

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Plugin Review Team Rep

    Sure! That’s a great idea!

    Probably should also change add_action( 'init', array( &$this, 'init' ) ); to admin_init πŸ˜€

    Thread Starter Dominic

    (@dominicp)

    Thanks for the quick reply. Yeah, I was looking at the init hook as well, but it may not be necessary to change that one if you conditionally load the class. Of course, changing it shouldn’t hurt either. πŸ™‚

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.