How is this code working?
-
Hi,
I am fairly new to WordPress and recently got a project handed down to me to modify. There is something in the code which I can’t figure out how it’s working.
Normally in PHP, you use variables to show value. The below code does not have any variable or hardcoded value. However when I load the code, there is a value (some dollar value) shown where the fullstop is in the code. However, in this code there is only a <span> wrapped around <td>, with both of them having class reference to ‘total’. I found nothing special about other parts of this code, and there is no reference to the word ‘total’ anywhere in the whole site’s code (I checked using windows grep).
`<tr>
<td class=”total”>Total</td>
<td class=”total money”><span class=”total”>.</span></td>
</tr>I asked around and someone suggested it must be doing it via ajax or javascript. But if that’s the case, wouldn’t they still need to have the word ‘total’ in their code somewhere? I never encountered something like this outside of wordpress, so I was wondering if someone could suggest how this could be working.
Thank you
The topic ‘How is this code working?’ is closed to new replies.