forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Import Largo 0.3->0.5.5.3 update functions #1429
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That's a question for when we start writing post-1.0 update functions. |
Still to do on this:
|
…reate new updates section for when Largo is migrating from optionsframework to theme_mods
… improved logic on when to run what update functions
This is ready for review. For testing purposes on the site_blurb portion of the script, I used an old copy of the c-hit.org database. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This imports the old Largo update scripts.
inc/update.php
from Largo 0.5.53of_get_option()
function so we can read from the Options Frameworkof_set_option()
function so existing largo update functions can operate upon the Options Framework before we import those options into the new settingslargo_perform_update()
ajax call, create a section for all optionsframework functions so that we only run those if there is an optionsframework instance in the databaseof_set_option( 'largo_version', largo_version() )
to store the post-1.0 largo version number in the Options Framework. Any other place/time would break the update logic.largo_optionsframework_to_theme_mods()
: an optionsframework -> theme_mods update function, with Theme Modification API detection so that it runs iff there is no theme_mods set yet.largo_need_updates()
check to uselargo_need_updates_0()
for versions of Largo using the options framework andlargo_need_updates_1()
for versions of Largo using the Theme Mods API. These functions were named based off of their respective Largo versions.largo_activatIon_maybe_setup
, change the conditions to:Questions