WordPress 3.4新的Custom Backgrounds和Custom Headers方法
今天收到WordPress官方邮件通知,WordPress 3.4会用新的方法实现Custom Backgrounds(自定义背景)和Custom Headers(自定义头部-一般是图片),老方法可以继续使用但不提倡。
Custom Backgrounds
原来的方法:
add_custom_background();
新的方法:
add_theme_support('custom-background');
新方法加了数组参数,定义更容易:add_theme_support('custom-background', $args ),$args 默认参数如下: