Robust
Well-known member
Hey,
In XenForo_Dependencies_Public, there's this:
I want to add one more notice to this. Looking at the code, if I added one more notice here, it'd be loaded as all references to here use a foreach. Not really any template editing either, just creating my new one.
Problem is, I'm not sure how to inject a new field value pair to this array. I know the init_dependencies hook exists, but I'm not sure it'll work in my scenario. Just a normal load_class might?
In XenForo_Dependencies_Public, there's this:
Code:
/**
* List of notice templates and phrases to load if the specified param is set
*
* @var array [param => template/phrase key]
*/
public $notices = array(
'showUpgradePendingNotice' => 'notice_upgrade_pending',
'showBoardClosedNotice' => 'notice_board_closed',
'isAwaitingEmailConfirmation' => 'notice_confirm_email',
'isEmailBouncing' => 'notice_email_bounce',
'showCookieNotice' => 'notice_cookies'
);
I want to add one more notice to this. Looking at the code, if I added one more notice here, it'd be loaded as all references to here use a foreach. Not really any template editing either, just creating my new one.
Problem is, I'm not sure how to inject a new field value pair to this array. I know the init_dependencies hook exists, but I'm not sure it'll work in my scenario. Just a normal load_class might?