You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Make sure a record existsadd_action('plugins_loaded', 'AppOption::createDefaultInstanceIfNecessary');
This is never fired, because the earliest hook available to themes is after_setup_theme. However, I question its usefulness. If we changed the hook to after_setup_theme, this method would be called on the front-end as well as in the admin, and it in turn calls getCount(). That seems a little wasteful in exchange for the convenience of automatically handling a critical piece of functionality being missing.
I would be in favor of removing this action and its method. Thoughts?
The text was updated successfully, but these errors were encountered:
At the bottom of
AppOption.php
, we have this:This is never fired, because the earliest hook available to themes is
after_setup_theme
. However, I question its usefulness. If we changed the hook toafter_setup_theme
, this method would be called on the front-end as well as in the admin, and it in turn callsgetCount()
. That seems a little wasteful in exchange for the convenience of automatically handling a critical piece of functionality being missing.I would be in favor of removing this action and its method. Thoughts?
The text was updated successfully, but these errors were encountered: