Question about the code and the correlation table
-
Hi,
I had to modify your plugin a bit as it is not fully compliant with PolyLang on my WordPress installation.
Actually your plugin created automatically “enhanced posts” for other types than categories (especially translation “links”).
So I took a look at your code and immediately saw an empty function named “is_valid_taxonomy”. So I modified a bit the content of this function in order to return FALSE for special posts and called is_valid_taxonomy() in every {CRUD}_category() functions of your WP_Integration.php file.
I don’t know if it is the only place where I must check the taxonomy in order to make sure your plugin won’t create unnecessary enhancedposts (hints ?) but it would be nice to be able to configure that using the WordPress plugins page.
I have another question regarding the correlation table. Why do you use it rather than the ‘post_category’ field (that is furthermore commented in your code in add_new_from_category()) ? Indeed if you use the post_category you can then match with the category ID and the correlation table is then not necessary anymore. Furthermore I think there is a problem with import/export as the correlation table’s data won’t be included in the WRX file.
Thanks in advance for your help and answers!
https://www.ads-software.com/plugins/enhanced-category-pages/
- The topic ‘Question about the code and the correlation table’ is closed to new replies.