関数 is_random_header_image()
2014/12/17
関数 is_random_header_image()
定義ファイル : /blog/wp-includes/theme.php 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function is_random_header_image( $type = 'any' ) { $header_image_mod = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); if ( 'any' == $type ) { if ( 'random-default-image' == $header_image_mod || 'random-uploaded-image' == $header_image_mod || ( '' != get_random_header_image() && empty( $header_image_mod ) ) ) return true; } else { if ( "random-$type-image" == $header_image_mod ) return true; elseif ( 'default' == $type && empty( $header_image_mod ) && '' != get_random_header_image() ) return true; } return false; } |