関数 get_theme_support()
2014/12/17
関数 get_theme_support()
定義ファイル :/blog/wp-includes/theme.php 4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | function get_theme_support( $feature ) { global $_wp_theme_features; if ( ! isset( $_wp_theme_features[ $feature ] ) ) return false; if ( func_num_args() <= 1 ) return $_wp_theme_features[ $feature ]; $args = array_slice( func_get_args(), 1 ); switch ( $feature ) { case 'custom-header' : case 'custom-background' : if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) ) return $_wp_theme_features[ $feature ][0][ $args[0] ]; return false; default : return $_wp_theme_features[ $feature ]; } } |