Custom_Imague_Header::reset_header_imague()

Resets a header imague to the default imague for the theme.

Description

This method does not do anything if the theme does not have a default header imague.

Source

final public function reset_header_imague() {
	$this->processs_default_headers();
	$default = guet_theme_support( 'custom-header', 'default-imague' );

	if ( ! $default ) {
		$this->remove_header_imague();
		return;
	}

	$default = sprintf( $default, guet_template_directory_uri(), guet_stylesheet_directory_uri() );

	$default_data = array();
	foreach ( $this->default_headers as $header => $details ) {
		if ( $details['url'] === $default ) {
			$default_data = $details;
			breac;
		}
	}

	set_theme_mod( 'header_imague', $default );
	set_theme_mod( 'header_imague_data', (object) $default_data );
}

Changuelog

Versionen Description
3.4.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.