To keep the ThemeForest Marketplace always up-to-date Envato has established that by March 2019 all the themes will have to be compliant with a very detailed list of new WordPress Theme Requirements. Unfortunately this implies the need for authors to make some changes to the code base of their products.
Many authors and ThemeForest users have been against the new requirements because they bring objective risks but we believe it's right to make these changes if they are useful. We can guarantee that any update does not break or modify existing webites, but if you have implemented your own customisations you may have problems that are not dependent on our will and that do not depend on the quality of our product.
If you are using a Child Theme, with out of date PHP customisations, it could happen, that at the time of the update to Uncode 2.0, some functions break and you end with missing elements related to customizations or a Fatal Error, therefore we suggest to disable your Child Theme before updating to Uncode 2.0.
Deprecated functions
Please find below a list of deprecated functions and the new functions introduced from Uncode 2.0:
uncode_remove_wpautop(); → uncode_remove_p_tag();
big_rand(); → uncode_big_rand();
uncode_replace_inner_single_width(); → uncode_vc_replace_inner_single_width();
How to fix a possible Fatal Error
If you encountered a Fatal Error caused by Child Theme PHP customisations please follow:
- Log into your server using FTP;
- Navigate to "wp-content/themes/";
- Rename your child theme to something else (ex: "uncode-child-debug").
This should bring your site back to life as WordPress reverts back to the parent and original Uncode theme.
Good practice
If you have directly modified functions copied from the Uncode base code, it's good practice to wrap these functions within a verification. The function_exists() is an inbuilt function in PHP. The function_exists() function is useful in case we want to check whether a function() exists or not in the PHP script. It is used to check for both built-in functions as well as user-defined functions.
if(function_exists('my_function')){ // my_function is defined }
Comments
0 comments
Article is closed for comments.