Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show no update nag upon initial activation of Largo #1363

Merged
merged 5 commits into from
Oct 25, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Oct 24, 2016

Changes

  • Create new hook on after_switch_theme, the activation hook, that:
    • doesn't run if there is already saved theme options for any version of Largo
    • requires the default Largo options from options.php, which are otherwise not included in the theme outside of the options framework pages
    • runs the options framework initiation function
    • sets the defaults using Largo's function to do so
    • sets the version number to the current version
    • removes the update nag from its enqueued action, for the single page load where after_switch_theme runs, because at page generation time apparently the Largo version is not set in the database even though it is set during this function that appears to run before everything else on the page. (I checked with subsequent page reloads, and with some var_logging, and the variable is set on page reload but not yet on page load. 🙁 )
    • removes the theme options menu link hijacker from the menus, for the single page load where after_switch_theme runs, for the same reason
  • if of_get_option is called in a situation where the database doesn't contain all the information it needs to work properly, it complains to the debug log.

Why

#690

@aschweigert
Copy link

This seems fine to me. I'd say we should clean up the updates file generally, but probably ok to leave as-is for now as long as it works.

@aschweigert aschweigert merged commit 3ec869f into develop Oct 25, 2016
@benlk benlk deleted the 690-no-show-update-nag-on-initial-activation branch February 7, 2018 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants