Move GP core function to init hook to fix translation error - Take two#1055
Conversation
PR Summary
|
| * @return void | ||
| */ | ||
| protected function setup_hooks(): void { | ||
| add_action( 'init', array( $this, 'set_main_sub_page' ) ); |
There was a problem hiding this comment.
Why did you add this and the empty callbacks?
Preview changes with PlaygroundYou can preview the recent changes for PR#1055 with the following PHP versions: PHP Version 8.3
PHP Version 7.4
Download Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions. |
Description of the Change
Move sub pages core function to init hook to remove translations notice.
Closes #1021
How to test the Change
Switch your language setting to Dutch and turn on
debugmode and ensure you don't get a notice about the translation functionality loading too late.Changelog Entry
Credits
Props @mauteri, @jmarx