init action added within init action
-
Hi,
I’m investigating the compability of your plugin with our own Swifty plugins and I saw that TablePress_Frontend_Controller::__construct is calling the add_action function for init.
However this constructor is called itself in the init action by:
add_action( ‘init’, array( ‘TablePress’, ‘run’ )); in tablepress.phpI changed this to:
add_action( ‘init’, array( ‘TablePress’, ‘run’ ), 20 );and replaced the:
add_action( ‘init’, array( $this, ‘init_shortcodes’ ), 20 );
with:
$this->init_shortcodes();This is needed because otherwise the init_shortcodes is put at the bottom of the earlier sorted action array (and ignores the priority). Our own init needs to run after all ‘normal’ inits are done and has a 9999 priority for this.
So far my changes seem to work, but i did not fully test your plugin with it.
Kind regards,
Martijn van der Kooij
(www.swifty.online)
- The topic ‘init action added within init action’ is closed to new replies.