';
if ( function_exists( 'mc4wp' ) ) {
$forms = mc4wp_get_forms();
if ( $forms && ! empty( $forms ) ) {
$form_id = ( isset( $forms[0] ) ? $forms[0]->ID : 0 );
$form = '
';
}
}
return $form;
}
}
/*
-----------------------------------------------------------
// Site logo fallback
------------------------------------------------------------*/
if ( ! function_exists( 'block_aarambha_get_custom_logo' ) ) {
function block_aarambha_get_custom_logo( $html ) {
if ( has_custom_logo() ) {
return $html;
} else {
$site_title = get_bloginfo( 'name' );
$html .= '';
if ( ( is_front_page() || is_home() ) && ! is_page() ) {
$html .= '' . esc_html( $site_title ) . '
';
} else {
$html .= '' . esc_html( $site_title ) . '
';
}
$html .= '';
return $html;
}
}
}
add_filter( 'get_custom_logo', 'block_aarambha_get_custom_logo' );
/*
-----------------------------------------------------------
// how custom image sizes in the editor image size dropdown.
------------------------------------------------------------*/
if ( ! function_exists( 'block_aarambha_custom_image_sizes' ) ) {
function block_aarambha_custom_image_sizes( $sizes ) {
return array_merge(
$sizes,
array(
'block_aarambha_blog' => esc_html__( 'Blog Item', 'block-aarambha' ),
)
);
}
}
add_filter( 'image_size_names_choose', 'block_aarambha_custom_image_sizes' );