Changeset 4673
- Timestamp:
- 01/03/2007 11:49:34 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r4546 r4673 456 456 } 457 457 458 function remove_theme_mod( $name ) { 459 $theme = get_current_theme(); 460 461 $mods = get_option("mods_$theme"); 462 463 if ( !isset($mods[$name]) ) 464 return; 465 466 unset($mods[$name]); 467 468 if ( empty($mods) ) 469 return remove_theme_mods(); 470 471 update_option("mods_$theme", $mods); 472 wp_cache_delete("mods_$theme", 'options'); 473 } 474 458 475 function remove_theme_mods() { 459 476 $theme = get_current_theme(); … … 462 479 } 463 480 481 function get_header_textcolor() { 482 return get_theme_mod('header_textcolor', HEADER_TEXTCOLOR); 483 } 484 485 function header_textcolor() { 486 echo get_header_textcolor(); 487 } 488 489 function get_header_image() { 490 return get_theme_mod('header_image', HEADER_IMAGE); 491 } 492 493 function header_image() { 494 echo get_header_image(); 495 } 496 497 function add_custom_image_header($header_callback, $admin_header_callback) { 498 if ( ! empty($header_callback) ) 499 add_action('wp_head', $header_callback); 500 501 if ( ! is_admin() ) 502 return; 503 require_once(ABSPATH . 'wp-admin/custom-header.php'); 504 $GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback); 505 add_action('admin_menu', array(&$GLOBALS['custom_image_header'], 'init')); 506 } 507 464 508 ?>
Note: See TracChangeset
for help on using the changeset viewer.