remove_control( 'hide_front_page_title');
}
add_action( 'customize_register', 'bradford_wpcom_customize_update', 11 );
/**
* Enqueue CSS for Customizer message.
*/
function bradford_customizer_enqueue() {
wp_enqueue_style( 'bradford-customizer-style', get_stylesheet_directory_uri() . '/inc/wpcom-customizer.css', array(), wp_get_theme()->get( 'Version' ) );
}
add_action( 'customize_controls_enqueue_scripts', 'bradford_customizer_enqueue' );
/**
* Register WP.com-only block patterns.
*/
if ( ! function_exists( 'bradford_register_wpcom_block_patterns' ) ) :
function bradford_register_wpcom_block_patterns() {
if ( function_exists( 'register_block_pattern' ) ) {
/* This pattern is WP.com-only because it relies on the Layout Grid block. */
register_block_pattern(
'bradford/card',
array(
'title' => __( 'Card', 'bradford' ),
'categories' => array( 'bradford' ),
'content' => '
' . __( 'Kate Adams', 'bradford' ) . '
'. esc_html__( 'Hi! I’m a lead strategist for growing sustainable revenue streams for integrated fundraising.', 'bradford' ) . '
',
)
);
/* This pattern is WP.com-only because it relies on the Contact Form block. */
register_block_pattern(
'bradford/email-signup',
array(
'title' => __( 'Email Signup', 'bradford' ),
'categories' => array( 'bradford' ),
'content' => '
'. esc_html__( 'Virtual Art Classes', 'bradford' ) . '
'. esc_html__( 'Join instructor Jaime Adams for a series of virtual classes aimed at helping you hone your drawing skills. We will focus on composition, perspective, contour, representing volume, and more!', 'bradford' ) . '
',
)
);
/*
* @TODO: This is commented out until the following Jetpack issue is resolved:
* https://github.com/Automattic/jetpack/issues/19113
*
* This pattern is WP.com-only because it relies on the Jetpack Subscription block.
register_block_pattern(
'bradford/links-subscription-form',
array(
'title' => __( 'Subscription Form and Links', 'bradford' ),
'categories' => array( 'link-in-bio' ),
'content' => '
'. esc_html__( 'Narrow Dog', 'bradford' ) . '
'. esc_html__( 'Noise Rock from Milwaukee, WI', 'bradford' ) . '
[jetpack_subscription_form subscribe_placeholder="Enter your email address" show_subscribers_total="false" button_on_newline="false" custom_font_size="undefinedpx" custom_border_radius="0" custom_border_weight="1" custom_padding="16" custom_spacing="10" submit_button_classes="has-undefinedpx-font-size has-text-color has-primary-color has-background has-background-background-color" email_field_classes="has-undefinedpx-font-size" show_only_email_and_button="true"]
',
)
); */
register_block_pattern(
'bradford/coming-soon-solid-color',
array(
'title' => __( 'Coming Soon: Solid Color', 'bradford' ),
'categories' => array( 'coming-soon' ),
'content' => '
' . esc_html__( 'Coming Soon', 'bradford' ) . '
' . esc_html__( 'Sign up to hear when my journey begins.', 'bradford' ) . '
[jetpack_subscription_form show_subscribers_total="false" button_on_newline="false" custom_font_size="16px" custom_border_radius="6" custom_border_weight="1" custom_border_color="#000000" custom_padding="15" custom_spacing="10" submit_button_classes="has-000000-border-color has-text-color has-background-color has-background has-primary-background-color" email_field_classes="has-000000-border-color" show_only_email_and_button="true"]
',
)
);
register_block_pattern(
'bradford/coming-soon-simple',
array(
'title' => __( 'Coming Soon: Simple', 'bradford' ),
'categories' => array( 'coming-soon' ),
'content' => '
' . esc_html__( 'Coming Soon', 'bradford' ) . '
' . esc_html__( 'A new blog by MindStomp. Sign up to be notified when we launch.', 'bradford' ) . '
[jetpack_subscription_form show_subscribers_total="false" button_on_newline="false" custom_font_size="16px" custom_border_radius="0" custom_border_weight="3" custom_border_color="#000000" custom_padding="15" custom_spacing="10" submit_button_classes="no-border-radius has-000000-border-color has-text-color has-primary-color has-background has-background-background-color" email_field_classes="no-border-radius has-000000-border-color" show_only_email_and_button="true"]
',
)
);
register_block_pattern(
'bradford/coming-soon-app',
array(
'title' => __( 'Coming Soon: App', 'bradford' ),
'categories' => array( 'coming-soon' ),
'content' => '
' . esc_html__( 'A new app for designers', 'bradford' ) . '
' . esc_html__( 'We’re launching soon. Be the first to sign up!', 'bradford' ) . '
[jetpack_subscription_form show_subscribers_total="false" button_on_newline="false" submit_button_text="' . esc_html__( 'SUBSCRIBE', 'bradford' ) . ' " custom_background_button_color="#dfcbda" custom_font_size="16px" custom_border_radius="4" custom_border_weight="1" custom_padding="20" custom_spacing="10" submit_button_classes="has-text-color has-primary-color" email_field_classes="" show_only_email_and_button="true"]
',
)
);
}
}
endif;
add_action( 'after_setup_theme', 'bradford_register_wpcom_block_patterns', 12 );