Sorry if I am asking stupid questions. While I do have a software development background, I am new to the WordPress world and don't fully understand much about plugins and themes activation yet. Does WordPress look for activation files in a standard directory that it expects to find with each plugin or does the plugin set its activation directory path through some kind of path variable? In the case of visual composer, is it a different challenge/answer everytime and is that answer dependent on a specific installation? I will probably have more question as I continue reading. Thanks for your patience.
About the plugins, all of them normally sit in the "/wp-content/plugins/" folder. The information of the plugin is directly parsed from the main file in the plugin where the information is presented as comments at the top of the file, like this:
Code:
/**
* Plugin Name: WooCommerce
* Plugin URI: https://woo.com/
* Description: An eCommerce toolkit that helps you sell anything. Beautifully.
* Version: 8.4.0
* Author: Automattic
* Author URI: https://woo.com
* Text Domain: woocommerce
* Domain Path: /i18n/languages/
* Requires at least: 6.3
* Requires PHP: 7.4
*
* @package WooCommerce
*/
As for the activation, it is done in the database. There is a table or row in the db with the activated plugins and WordPress goes from there.
There are other methods (not standard) that you may lay a plugin file (not a folder) in the "wp-content" folder, where it will be automatically activated by WP and the end user will have no control over it. Those are called "Drop-in" plugins and are necessary in very few cases, like in a cache plugin.
Developing for WordPress is not hard, as it is PHP, JS, and MySQL. However, the only thing that was shocking for me in the beginning was that I was ready and cocky with my knowledge of PHP when I hit a wall by realizing that WP has its own set of functions and it was like learning PHP again, lol. That is, you still have all the PHP functions that you can use but also have a full set of functions developed by and for WP. So, in short, WP is a framework.
The standard method used for programming is object-oriented (OOP) but you may also use the procedural method in small projects.
To keep the WP structure when developing, get used to using their special functions called "hooks". Those are a bunch of "filters" and "actions" that can modify data without modifying the structure (hard coding) of WP. That way, every time there is an update, nothing is broken (mostly).
Hey
@zilog357
Any update?
I am sorry mate. How this works is, you provide the plugin or theme and I work with it in an attempt to help. I cannot get the product for you, though if I have it, I will, but in this case, I do not have it.
Thanks, i really appreciate your feedback and time, this is the theme.zip, the particular issue is with the ThemeRex addons plugin, which executes a code block and action hook named do_delay_action, causing the infinite loop preventing the theme from being used, i got chatgpt to analyze the problem, see my efforts in link attached. but didn't give me useful codes to fix the problem.
https://chat.openai.com/share/23a316f8-b1ea-47c8-bee8-76dee3eeeb2a
-link to the theme Zip file!
https://workupload.com/file/HxmcFKuWD6s
Ok. I will take a look and will let you know.
Ok. I will take a look and will let you know.
Ok, my report.
The "do_delayed_action" is normal for saving data when you click on save of anything in the theme.
I installed the theme and the plugin and it ran smoothly.
What I did:
1. I installed the theme and the updated "trx_addons" plugin (v2.28.0 instead of the supplied v2.27.1). All done in a clean install sandbox environment in my localhost.
2. I activated the theme and "trx_addons" plugin to see if all was ok and it was. It ran smoothly.
3. I installed all the recommended plugins to see if there could be a conflict. There were none and no errors on the server.
4. I used a slightly different code for the modification:
In the theme's folder, in the "functions.php" file, instead of the actual code below:
Code:
update_option( 'trx_addons_theme_anesta_activated' , 1);
update_option( 'purchase_code_anesta' , '5875-2457-6892-4125-7547' );
update_option( 'purchase_code_src_anesta' , 'env-elements' );
I used this instead:
Code:
update_option( 'trx_addons_theme_anesta_activated', true );
update_option( 'purchase_code_anesta', 'L12345678' );
update_option( 'purchase_code_src_anesta', 'L12345678' );
There should be no functional difference though. I just mentioned it in case you want to try if the problem persists.
What I found:
The modified codes are in the theme "functions.php" file instead of the plugins "trx_addons" folder, in the "trx_addons.php" file. That is clever because if you update the "trx_addons" plugin, the modifications are not lost. However, they are if the theme is updated, but the plugin is more likely to be updated more often than the theme anyway.
What it could be then:
If the problem persists, it could be a conflict with another plugin, or an issue with the server, or you can try updating the "trx_addons" plugin..
For the server part, in the theme panel, make sure that the "system check" parameters of the server meet all the requirements. All under the column "current" should be in green. As an example, a low memory amount allocation will cause endless loops.
For the plugins, if you have other plugins, the usual method of deactivating all of them and trying one by one should be done to determine which one is the culprit.
Conclusion:
1. The theme, the plugins, and the modifications are working perfectly in a clean install. No loops at all and runs smoothly. If the problem persists, it is a variable beyond those components.
2. Chat GPT is gay.