%3C%3Fphp%0A%2F%2A%2A%0A+%2A+Sample+implementation+of+the+Custom+Header+feature%0A+%2A+http%3A%2F%2Fcodex.wordpress.org%2FCustom_Headers%0A+%2A%0A+%2A+You+can+add+an+optional+custom+header+image+to+header.php+like+so+...%0A%0A%09%3C%3Fphp+%24header_image+%3D+get_header_image%28%29%3B%0A%09if+%28+%21+empty%28+%24header_image+%29+%29+%7B+%3F%3E%0A%09%09%3Ca+href%3D%22%3C%3Fphp+echo+esc_url%28+home_url%28+%27%2F%27+%29+%29%3B+%3F%3E%22+title%3D%22%3C%3Fphp+echo+esc_attr%28+get_bloginfo%28+%27name%27%2C+%27display%27+%29+%29%3B+%3F%3E%22+rel%3D%22home%22%3E%0A%09%09%09%3Cimg+src%3D%22%3C%3Fphp+header_image%28%29%3B+%3F%3E%22+width%3D%22%3C%3Fphp+echo+get_custom_header%28%29-%3Ewidth%3B+%3F%3E%22+height%3D%22%3C%3Fphp+echo+get_custom_header%28%29-%3Eheight%3B+%3F%3E%22+alt%3D%22%22%3E%0A%09%09%3C%2Fa%3E%0A%09%3C%3Fphp+%7D+%2F%2F+if+%28+%21+empty%28+%24header_image+%29+%29+%3F%3E%0A%0A+%2A%0A+%2A+%40package+NARGA%0A+%2A+since+NARGA+v1.5.1%0A+%2A%2F%0A%0A%2F%2A%2A%0A+%2A+Setup+the+WordPress+core+custom+header+feature.%0A+%2A%0A+%2A+%40uses+narga_header_style%28%29%0A+%2A+%40uses+narga_admin_header_style%28%29%0A+%2A+%40uses+narga_admin_header_image%28%29%0A+%2A%0A+%2A+%40package+NARGA%0A+%2A%2F%0Afunction+narga_custom_header_setup%28%29+%7B%0A++++add_theme_support%28+%27custom-header%27%2C+apply_filters%28+%27narga_custom_header_args%27%2C+array%28%0A++++++++%27default-image%27++++++++++%3D%3E+%27%27%2C%0A%09%27random-default%27+++++++++%3D%3E+false%2C%0A%09%27width%27++++++++++++++++++%3D%3E+0%2C%0A%09%27height%27+++++++++++++++++%3D%3E+0%2C%0A%09%27flex-height%27++++++++++++%3D%3E+true%2C%0A%09%27flex-width%27+++++++++++++%3D%3E+false%2C%0A%09%27default-text-color%27+++++%3D%3E+%27%27%2C%0A%09%27header-text%27++++++++++++%3D%3E+true%2C%0A++++++++%27uploads%27++++++++++++++++%3D%3E+true%2C%0A++++++++%27default-text-color%27+++++%3D%3E+%27%27%2C%0A++++++++%27wp-head-callback%27+++++++%3D%3E+%27narga_header_style%27%2C%0A++++++++%27admin-head-callback%27++++%3D%3E+%27narga_admin_header_style%27%2C%0A++++++++%27admin-preview-callback%27+%3D%3E+%27narga_admin_header_image%27%2C%0A++++%29+%29+%29%3B%0A%7D%0Aadd_action%28+%27after_setup_theme%27%2C+%27narga_custom_header_setup%27+%29%3B%0A%0A%2F%2A%2A%0A+%2A+Function+to+generate+blog+name+and+subheader+for+custom+as+users%0A+%2A+want+without+copy+the+header.php+file+in+child+theme%0A+%2A+Since+NARGA+v1.1%0A+%2A%2F%0Aif+%28%21function_exists%28%27narga_header%27%29%29+%3A++%0A++++function+narga_header%28%29+%7B%0A++++++++%24header_image+%3D+get_header_image%28%29%3B%0A++++++++echo+%27%3Cheader+id%3D%22header%22+class%3D%22row+site-header%22+role%3D%22banner%22%3E%0A++++++++++++%3Cdiv+class%3D%22site-branding+large-12+columns%22%3E%27%3B%0A++++++++echo+%27%3Ch1+class%3D%22site-title%22%3E%3Ca+href%3D%22%27+.+esc_url%28+home_url%28+%27%2F%27+%29+%29+.+%27%22+title%3D%22%27+.+esc_attr%28+get_bloginfo%28+%27name%27%2C+%27display%27+%29+%29+.+%27%22+rel%3D%22home%22%3E%27+.+get_bloginfo%28%27name%27%29+.+%27%3C%2Fa%3E%3C%2Fh1%3E%0A++++++++++++%3Ch4+id%3D%22tagline%22+class%3D%22subheader+site-description+hide-for-small%22%3E%27+.+get_bloginfo%28%27description%27%29+.+%27%3C%2Fh4%3E%27%3B%0A++++++++if+%28+%21+empty%28+%24header_image+%29+%29+%3A%0A++++++++++++echo+%27%3Ca+href%3D%22%27+.+esc_url%28+home_url%28+%27%2F%27+%29+%29+.+%27%22%3E%3Cimg+src%3D%22%27+.+esc_url%28+get_header_image%28%29+%29+.+%27%22+class%3D%22header-image%22+width%3D%22%27+.+get_custom_header%28%29-%3Ewidth+.+%27%22+height%3D%22%27+.+get_custom_header%28%29-%3Eheight+.+%27%22+alt%3D%22%22+%2F%3E%3C%2Fa%3E%27%3B%0A++++++++endif%3B%0A++++++++echo+%27%3C%2Fdiv%3E%0A++++++++++++%3C%2Fheader%3E%27%3B%0A++++%7D++%0Aendif%3B%0A++%0A%2F%2A%2A%0A+%2A+Styles+the+header+image+and+text+displayed+on+the+blog%0A+%2A+%40see+narga_custom_header_setup%28%29.%0A+%2A+Since+NARGA+v1.5%0A+%2A%2F%0Aif+%28+%21+function_exists%28+%27narga_header_style%27+%29+%29+%3A%0Afunction+narga_header_style%28%29+%7B%0A%09%24header_text_color+%3D+get_header_textcolor%28%29%3B%0A%0A%09%2F%2F+If+no+custom+options+for+text+are+set%2C+let%27s+bail%0A%09%2F%2F+get_header_textcolor%28%29+options%3A+HEADER_TEXTCOLOR+is+default%2C+hide+text+%28returns+%27blank%27%29+or+any+hex+value%0A%09if+%28+HEADER_TEXTCOLOR+%3D%3D+%24header_text_color+%29%0A%09%09return%3B%0A%0A%09%2F%2F+If+we+get+this+far%2C+we+have+custom+styles.+Let%27s+do+this.%0A%09%3F%3E%0A%09%3Cstyle+type%3D%22text%2Fcss%22%3E%0A%09%3C%3Fphp%0A%09%09%2F%2F+Has+the+text+been+hidden%3F%0A%09%09if+%28+%27blank%27+%3D%3D+%24header_text_color+%29+%3A%0A%09%3F%3E%0A%09%09.site-title%2C%0A%09%09.site-description+%7B%0A%09%09%09position%3A+absolute%3B%0A%09%09%09clip%3A+rect%281px%2C+1px%2C+1px%2C+1px%29%3B%0A%09%09%7D%0A%09%3C%3Fphp%0A%09%09%2F%2F+If+the+user+has+set+a+custom+color+for+the+text+use+that%0A%09%09else+%3A%0A%09%3F%3E%0A%09%09.site-title+a%2C%0A%09%09.site-description+%7B%0A%09%09%09color%3A+%23%3C%3Fphp+echo+%24header_text_color%3B+%3F%3E%3B%0A%09%09%7D%0A%09%3C%3Fphp+endif%3B+%3F%3E%0A%09%3C%2Fstyle%3E%0A%09%3C%3Fphp%0A%7D%0Aendif%3B+%2F%2F+narga_header_style%0A%2F%2A%2A%0A+%2A+Styles+the+header+image+displayed+on+the+Appearance+%3E+Header+admin+panel.%0A+%2A%0A+%2A+%40see+narga_custom_header_setup%28%29.%0A+%2A+Since+NARGA+v1.5%0A+%2A%2F%0Aif+%28+%21+function_exists%28+%27narga_admin_header_style%27+%29+%29+%3A%0Afunction+narga_admin_header_style%28%29+%7B%0A%3F%3E%0A%09%3Cstyle+type%3D%22text%2Fcss%22%3E%0A%09%09.appearance_page_custom-header+%23headimg+%7B%0A%09%09%09border%3A+none%3B%0A%09%09%7D%0A%09%09%23headimg+h1%2C%0A%09%09%23desc+%7B%0A%09%09%7D%0A%09%09%23headimg+h1+%7B%0A%09%09%7D%0A%09%09%23headimg+h1+a+%7B%0A%09%09%7D%0A%09%09%23desc+%7B%0A%09%09%7D%0A%09%09%23headimg+img+%7B%0A%09%09%7D%0A%09%3C%2Fstyle%3E%0A%3C%3Fphp%0A%7D%0Aendif%3B+%2F%2F+narga_admin_header_style%0A%0Aif+%28+%21+function_exists%28+%27narga_admin_header_image%27+%29+%29+%3A%0A%2F%2A%2A%0A+%2A+Custom+header+image+markup+displayed+on+the+Appearance+%3E+Header+admin+panel.%0A+%2A%0A+%2A+%40see+narga_custom_header_setup%28%29.%0A+%2A+Since+NARGA+v1.5%0A+%2A%2F%0Afunction+narga_admin_header_image%28%29+%7B%0A%09%24style++++++++%3D+sprintf%28+%27+style%3D%22color%3A%23%25s%3B%22%27%2C+get_header_textcolor%28%29+%29%3B%0A%09%24header_image+%3D+get_header_image%28%29%3B%0A%3F%3E%0A%09%3Cdiv+id%3D%22headimg%22%3E%0A%09%09%3Ch1+class%3D%22displaying-header-text%22%3E%3Ca+id%3D%22name%22%3C%3Fphp+echo+%24style%3B+%3F%3E+onclick%3D%22return+false%3B%22+href%3D%22%3C%3Fphp+echo+esc_url%28+home_url%28+%27%2F%27+%29+%29%3B+%3F%3E%22%3E%3C%3Fphp+bloginfo%28+%27name%27+%29%3B+%3F%3E%3C%2Fa%3E%3C%2Fh1%3E%0A%09%09%3Cdiv+class%3D%22displaying-header-text%22+id%3D%22desc%22%3C%3Fphp+echo+%24style%3B+%3F%3E%3E%3C%3Fphp+bloginfo%28+%27description%27+%29%3B+%3F%3E%3C%2Fdiv%3E%0A%09%09%3C%3Fphp+if+%28+%21+empty%28+%24header_image+%29+%29+%3A+%3F%3E%0A%09%09%09%3Cimg+src%3D%22%3C%3Fphp+echo+esc_url%28+%24header_image+%29%3B+%3F%3E%22+alt%3D%22%22%3E%0A%09%09%3C%3Fphp+endif%3B+%3F%3E%0A%09%3C%2Fdiv%3E%0A%3C%3Fphp%0A%7D%0Aendif%3B+%2F%2F+narga_admin_header_image%0A