Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Upgrade old version of framework to the new one

Open maiakhoa opened this issue 11 years ago • 3 comments

Hi team,

Do you have any plan to upgrade the old version of framework with new functions of plugin version ? I developed my theme with the old one, so could you guide me how to upgrade it with new functions ?

Thanks,

maiakhoa avatar Dec 09 '14 07:12 maiakhoa

Hi @maiakhoa

Do you have any plan to upgrade the old version of framework with new functions of plugin version ?

We can't do it because v1 is not compatible with v2.

I developed my theme with the old one, so could you guide me how to upgrade it with new functions ?

The major changes that was made in v2 are:

  • The theme must work without framework. If you disable/delete the framework, the theme must not throw errors. So in the theme code, before calling a framework function or method, first you must check if it exists.

    if (defined('FW')) { ... }
    
  • The theme must work without any framework extension installed. So in the theme code, before calling an extension function or method, first you must check if it exists.

    if (defined('FW') && fw_ext('breadcrumbs')) { fw_ext_breadcrumbs(); }
    

    or

    if (function_exists('fw_ext_breadcrumbs')) { fw_ext_breadcrumbs(); }
    
  • Most of the files that was in the framework-customizations/theme/ directory was moved to Theme Includes, because if the framework is not enabled, all that files must be included, the theme can't work without them. Theme Includes has nothing with the framework, It's just a way of organizing theme files, you can use/change it however you want.

  • The page builder saves the shortcodes attributes values (in the database) in different format (not in base64 like in v1). Also there are some changes in shortcodes, check out the documentation.

ghost avatar Dec 09 '14 10:12 ghost

Thank @moldcraft for your guideline. I'm working to upgrade to version 2

maiakhoa avatar Dec 09 '14 11:12 maiakhoa

If you have any questions related to this issue, feel free to reopen it. I'm closing it for now.

ghost avatar Dec 09 '14 11:12 ghost