sprintf is similar to printf however is used to return the result as a value for a variable to be used later rather than output
Learn PHP Code for Beginners - Educate Yourself!
Beginners guide to learning PHP code. The course teaches you how to read, modify & write code commonly used in WordPress theme customisation, specifically Genesis & StudioPress child themes.
add_action
add_action is a function which you'll see in WordPress, Genesis & other theme files. You've probably seen code in a file which looks
printf
You've probably seen code in your files which looks like this: [code] printf('%s World', $var ); [/code] This code includes a function
variable
You've probably seen code which includes the $ dollar sign like this: [code] $output [/code] This is whats called in PHP language, a
Ternary Operator
There's at least 3 ways to code if conditionals and else statements in WordPress using PHP. In the first 2 examples below, we'll use the