@@ -30,8 +30,8 @@ |
||
30 | 30 | 'admin-preview-callback' => 'strip_admin_header_image', |
31 | 31 | ) ) ); |
32 | 32 | /** |
33 | - * Register default header image |
|
34 | - */ |
|
33 | + * Register default header image |
|
34 | + */ |
|
35 | 35 | register_default_headers( array( |
36 | 36 | 'DefaultHeader' => array( |
37 | 37 | 'url' => get_template_directory_uri() . '/assets/images/Default-header.png', |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @package strip |
19 | 19 | */ |
20 | 20 | function strip_custom_header_setup() { |
21 | - add_theme_support( 'custom-header', apply_filters( 'strip_custom_header_args', array( |
|
21 | + add_theme_support('custom-header', apply_filters('strip_custom_header_args', array( |
|
22 | 22 | 'default-image' => get_template_directory_uri() . '/assets/images/Default-header.png', |
23 | 23 | 'default-text-color' => '000', |
24 | 24 | 'flex-width' => true, |
@@ -28,24 +28,24 @@ discard block |
||
28 | 28 | 'wp-head-callback' => 'strip_header_style', |
29 | 29 | 'admin-head-callback' => 'strip_admin_header_style', |
30 | 30 | 'admin-preview-callback' => 'strip_admin_header_image', |
31 | - ) ) ); |
|
31 | + ))); |
|
32 | 32 | /** |
33 | 33 | * Register default header image |
34 | 34 | */ |
35 | - register_default_headers( array( |
|
35 | + register_default_headers(array( |
|
36 | 36 | 'DefaultHeader' => array( |
37 | 37 | 'url' => get_template_directory_uri() . '/assets/images/Default-header.png', |
38 | 38 | 'thumbnail_url' => get_template_directory_uri() . '/assets/images/Default-header.png', |
39 | - 'description' => _x( 'DefaultHeader', 'header image description', 'strip' ), |
|
39 | + 'description' => _x('DefaultHeader', 'header image description', 'strip'), |
|
40 | 40 | ), |
41 | 41 | ) |
42 | 42 | ); |
43 | 43 | |
44 | 44 | } |
45 | 45 | |
46 | -add_action( 'after_setup_theme', 'strip_custom_header_setup' ); |
|
46 | +add_action('after_setup_theme', 'strip_custom_header_setup'); |
|
47 | 47 | |
48 | -if ( ! function_exists( 'strip_header_style' ) ) : |
|
48 | +if ( ! function_exists('strip_header_style')) : |
|
49 | 49 | /** |
50 | 50 | * Styles the header image and text displayed on the blog |
51 | 51 | * |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $header_text_color = get_header_textcolor(); |
58 | 58 | |
59 | 59 | /* Header image. */ |
60 | - $header_image = esc_url( get_header_image() ); |
|
60 | + $header_image = esc_url(get_header_image()); |
|
61 | 61 | |
62 | 62 | /* Start header styles. */ |
63 | 63 | $style = ''; |
@@ -69,28 +69,28 @@ discard block |
||
69 | 69 | $header_width = get_custom_header()->width; |
70 | 70 | |
71 | 71 | /* When to show header image. */ |
72 | - $min_width = absint( apply_filters( 'strip_header_bg_show', 1 ) ); |
|
72 | + $min_width = absint(apply_filters('strip_header_bg_show', 1)); |
|
73 | 73 | |
74 | 74 | /* Background arguments. */ |
75 | - $background_arguments = esc_attr( apply_filters( 'strip_header_bg_arguments', 'no-repeat 50% 50%' ) ); |
|
75 | + $background_arguments = esc_attr(apply_filters('strip_header_bg_arguments', 'no-repeat 50% 50%')); |
|
76 | 76 | |
77 | - if ( ! empty( $header_image ) ) { |
|
77 | + if ( ! empty($header_image)) { |
|
78 | 78 | $style .= "@media screen and (min-width: {$min_width}px) { body.custom-header-image .site-header { background: url({$header_image}) {$background_arguments}; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } }"; |
79 | 79 | } |
80 | 80 | |
81 | 81 | /* Site title styles. */ |
82 | - if ( display_header_text() ) { |
|
82 | + if (display_header_text()) { |
|
83 | 83 | $style .= ".site-title, .site-title a, .site-description, .site-description a { color: #{$header_text_color} }"; |
84 | 84 | $style .= ".site-title { border-color: #{$header_text_color} }"; |
85 | 85 | } |
86 | 86 | |
87 | - if ( ! display_header_text() ) { |
|
87 | + if ( ! display_header_text()) { |
|
88 | 88 | $style .= '.site-title, .site-title a, .site-description, .site-description a { clip: rect(1px, 1px, 1px, 1px); position: absolute; }'; |
89 | 89 | } |
90 | 90 | |
91 | 91 | /* Echo styles if it's not empty. */ |
92 | - if ( ! empty( $style ) ) { |
|
93 | - echo "\n" . '<style type="text/css" id="custom-header-css">' . trim( $style ) . '</style>' . "\n"; |
|
92 | + if ( ! empty($style)) { |
|
93 | + echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n"; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | } |