Jelajahi Sumber

updated custom background code

eddiemachado 13 tahun lalu
induk
melakukan
87d70f1b69
1 mengubah file dengan 10 tambahan dan 2 penghapusan
  1. 10 2
      library/bones.php

+ 10 - 2
library/bones.php

@@ -152,8 +152,16 @@ function bones_theme_support() {
 	// default thumb size   
 	// default thumb size   
 	set_post_thumbnail_size(125, 125, true);   
 	set_post_thumbnail_size(125, 125, true);   
 	
 	
-	// wp custom background
-	add_custom_background();        
+	// wp custom background (thx to @bransonwerner for update)
+	add_theme_support( 'custom-background',
+	    array( 
+	    'default-image' => '',  // background image default
+	    'default-color' => '', // background color default (dont add the #)
+	    'wp-head-callback' => '_custom_background_cb',
+	    'admin-head-callback' => '',
+	    'admin-preview-callback' => ''
+	    )
+	);      
 	
 	
 	// rss thingy           
 	// rss thingy           
 	add_theme_support('automatic-feed-links'); 
 	add_theme_support('automatic-feed-links');