Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In the-bootstrap parent theme there is the following function:

function the_bootstrap_custom_background_setup() {

$args = apply_filters( 'the_bootstrap_custom_background_args',  array(
    'default-color' =>  'efefef',
) );

add_theme_support( 'custom-background', $args );

if ( ! function_exists( 'wp_get_theme' ) ) {
    // Compat: Versions of WordPress prior to 3.4.
    define( 'BACKGROUND_COLOR', $args['default-color'] );
    add_custom_background();
}
}
add_action( 'after_setup_theme', 'the_bootstrap_custom_background_setup' );

I would like to change default-color and add additional defaults including: 'default-image', 'wp-head-callback', 'admin-head-callback', 'admin-preview-callback'.

I've read the Codex and some tutorials, but I am having difficulties understanding how to make use of apply_filters to change the defaults. Any guidance would be greatly appreciated!

Thank you

share|improve this question
    
Ok, I believe I figured it out. Would love a sanity check to see if this is correct: function my_custom_background_args($args) { $the_defaults = array( 'default-color' => 'cccc99', ); return $the_defaults; } add_filter( 'the_bootstrap_custom_background_args', 'my_custom_background_args', 10, 2 ); –  user3145409 Mar 4 at 2:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.