Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_logo_switcher($html)
- {
- $timezone = "Europe/Warsaw";
- date_default_timezone_set($timezone);
- $godzina = date('H');
- $godzina_od = 22;
- $godzina_do = 6;
- $identyfikator_obrazka_w_galerii_wp = 45;
- if($godzina >= $godzina_od || $godzina <= $godzina_do)
- {
- $html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
- esc_url( home_url( '/' ) ),
- wp_get_attachment_image( $identyfikator_obrazka_w_galerii_wp, 'full', false, array(
- 'class' => 'custom-logo',
- 'itemprop' => 'logo',
- ) )
- );
- }
- return $html;
- }
- add_filter('get_custom_logo', 'my_logo_switcher');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement