Code Snippets – run all the time
-
Snippets – did google myself blue
Maybe s Stupid Question for some, but I will appreciate some advice.
I have snippets that I created and placed in the “Code Snuppits” plugin.
all of them use the same method just different function depending on the need:
add_action(‘frm_display_form_action’, ‘check_user_count’, 1, 3);
function check_user_count($params, $fields, $form){
if($form->id == 34) {
I have a display before each ADD_ACTION so I can see whats happening. Plus Displayes to see the values.
I know in other programming languages you have an IF statement to and if true that code will execute.
But with snippets it looks like the are running the whole time instead of just when I go into that specific page on the website….See error log image below, I am doing nothing on the system yet they run which in my opinion will cause issues.
Do I Miss unerstand how to use them…..
I did put priorities to each but they then just run in that sequence. I did a lot of googling just get examples not explaining my issues.
Thanks in advance.
- This topic was modified 4 years, 10 months ago by . Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
The page I need help with: [log in to see the link]
- The topic ‘Code Snippets – run all the time’ is closed to new replies.