2

While seeing the source code of some themes or plugins, I have noticed that, sometimes these two words are used to denote/indicate other functions.

What's the difference between them? Which function should be called callback function and which is fallback?

Can you give me an example?

Thanks in advance.

1 Answer 1

5

That is not really a question in the focus of WordPress, is also in other programming languages and in our speaking language a topic. Maybe I can clear the difference between these words with a non coding example.

Callback

A return of a situation to a state. Like a call with the telephone to a message of the phone or the answering machine to a defect of a product.

In the coding context is a callback a function/method which executed after the current effect is finished.

Fallback

An act of falling back. Like an alternative plan to the current idea, progress.

In context of the computer is a fallback typically a backup of the current data to fallback to a time stamp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.