3 | | add_filter('custom_background_style', 'slug_full_screen_bg', 10, 2 ); |
4 | | function slug_full_screen_bg( $style, $background ) { |
5 | | if ( $background != '' ) { |
6 | | $style = "background-repeat: no-repeat; -webkit-background-size: cover;-moz-background-size: cover;-o- background-size: cover;background-size: cover;background-attachment:fixed;background-position:center;"; |
7 | | $style .= " background-image: url('$background');"; |
8 | | } |
9 | | return $style; |
10 | | } |
| 3 | {{{ |
| 4 | #!php |
| 5 | add_filter('custom_background_style', 'slug_full_screen_bg', 10, 2 ); |
| 6 | function slug_full_screen_bg( $style, $background ) { |
| 7 | if ( $background != '' ) { |
| 8 | $style = "background-repeat: no-repeat; -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-attachment:fixed;background-position:center;"; |
| 9 | $style .= " background-image: url('$background');"; |
| 10 | } |
| 11 | return $style; |
| 12 | } |
| 13 | }}} |