Shortcodes are plain text wrapper made exactly for cases when PHP code is not available or should not be used.
- You can concatenate that to string and evaluate it with
do_shortcode()
. - You can look up function that powers shortcode (set up with
add_shortcode()
) and use it in PHP code directly.