-
-
Save inc2734/95c8e76bcea8564441c7 to your computer and use it in GitHub Desktop.
How to use habakiri_theme_mods_defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function habakiri_child_theme_setup() { | |
class Habakiri extends Habakiri_Base_Functions { | |
public function __construct() { | |
parent::__construct(); | |
add_action( 'habakiri_theme_mods_defaults', array( $this, 'habakiri_theme_mods_defaults' ) ); | |
} | |
/** | |
* Set default values of customizer | |
* | |
* @param array $pre_defaults | |
* @return array | |
*/ | |
public function habakiri_theme_mods_defaults( $pre_defaults ) { | |
$defaults = shotcode_atts( | |
$pre_defaults, | |
array( | |
'link_color' => '#f00', | |
'blog_template' => 'left-sidebar', | |
) | |
); | |
return $defaults; | |
} | |
} | |
} | |
add_action( 'after_setup_theme', 'habakiri_child_theme_setup' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment