skip to Main Content

Php versions – Defining functions with a for loop

I have a section of code that looks as follows: function macro_ad_short_code_function(){ return wp_get_attachment_image(get_option('macro_ad_image_uploader')); } function pods_ad_short_code_function(){ return wp_get_attachment_image(get_option('pods_ad_image_uploader')); } function live_foods_ad_short_code_function(){ return wp_get_attachment_image(get_option('live_foods_ad_image_uploader')); } function captive_fish_ad_short_code_function(){ return wp_get_attachment_image(get_option('captive_fish_ad_image_uploader')); } function captive_inverts_ad_short_code_function(){ return wp_get_attachment_image(get_option('captive_inverts_ad_image_uploader')); } function refugium_ad_short_code_function(){ return wp_get_attachment_image(get_option('refugium_ad_image_uploader')); }…

VIEW QUESTION
Back To Top
Search