What is the very earliest action hook you can call?

muplugins_loaded is the earliest hook. Depending on your wordpress setup, you may not have any plugins in the MU_PLUGINS directory. In that case this hook may not fire. The next best hook to trigger is plugins_loaded. RESOURCES WordPress Codex – Action Reference List Q/A: How to get WordPress’ hook run sequence? Q/A: Make sense of … Read more

Inheritance and init method in Python

In the first situation, Num2 is extending the class Num and since you are not redefining the special method named __init__() in Num2, it gets inherited from Num. When a class defines an __init__() method, class instantiation automatically invokes __init__() for the newly-created class instance. In the second situation, since you are redefining __init__() in Num2 you need to explicitly call the one in the super class (Num) if you want … Read more