1

Is there any api or system to reset internal cycle?

I need this, cause when I use wp-cli in the shell I need to call for instance get_header more times in one session.

The fast is when I call this function for the first time after I need to quit from the shell and recall another request to start WordPress once more time.

Can I stop and resetting current session without go out from the wp-cli shell command?

0

The general answer is "no". Wordpress has too many globals (and new ones are being added in every new release :( ) to be able to "reset" the general state in a sane way, and there is no "api" to do that. (and this without even talking about themes and plugins which are a can of worms probably bigger than core).

But... it depends on what are your specific needs. WP-CLI as it is now might not be able to reset things in the way you would like it to do, but you can always try to extend it with the "reset" functionality in the areas important to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.