Convert to Gutenberg blocks
This commit is contained in:
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
define( 'HOGELANDLINUX_VERSION', '1.0.1' );
|
||||
define( 'HOGELANDLINUX_VERSION', '1.1.0' );
|
||||
define( 'HOGELANDLINUX_URL', get_template_directory_uri() );
|
||||
define( 'HOGELANDLINUX_PATH', get_template_directory() );
|
||||
|
||||
@@ -23,6 +23,8 @@ if ( ! function_exists( 'hogelandlinux_setup' ) ) {
|
||||
add_theme_support( 'title-tag' );
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
add_theme_support( 'customize-selective-refresh-widgets' );
|
||||
add_theme_support( 'editor-styles' );
|
||||
add_editor_style( array( 'assets/css/style.css', 'assets/css/patterns.css' ) );
|
||||
add_theme_support(
|
||||
'html5',
|
||||
array(
|
||||
@@ -57,6 +59,13 @@ function hogelandlinux_scripts() {
|
||||
HOGELANDLINUX_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'hogelandlinux-patterns',
|
||||
HOGELANDLINUX_URL . '/assets/css/patterns.css',
|
||||
array( 'hogelandlinux-style' ),
|
||||
HOGELANDLINUX_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_script(
|
||||
'hogelandlinux-navigation',
|
||||
HOGELANDLINUX_URL . '/assets/js/main.js',
|
||||
@@ -379,3 +388,36 @@ function hogelandlinux_shortcode_disclaimer( $atts, $content = null ) {
|
||||
return '<details class="disclaimer"><summary>' . esc_html( $atts['summary'] ) . '</summary><div class="disclaimer-body">' . do_shortcode( $content ) . '</div></details>';
|
||||
}
|
||||
add_shortcode( 'disclaimer', 'hogelandlinux_shortcode_disclaimer' );
|
||||
|
||||
/**
|
||||
* Register custom button block styles.
|
||||
*/
|
||||
function hogelandlinux_register_block_styles() {
|
||||
register_block_style(
|
||||
'core/button',
|
||||
array(
|
||||
'name' => 'hl-primary',
|
||||
'label' => __( 'Hogeland Primary', 'hogelandlinux' ),
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/button',
|
||||
array(
|
||||
'name' => 'hl-secondary',
|
||||
'label' => __( 'Hogeland Secondary', 'hogelandlinux' ),
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/button',
|
||||
array(
|
||||
'name' => 'hl-on-dark',
|
||||
'label' => __( 'Hogeland On Dark', 'hogelandlinux' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'hogelandlinux_register_block_styles' );
|
||||
|
||||
/**
|
||||
* Block patterns (Gutenberg).
|
||||
*/
|
||||
require HOGELANDLINUX_PATH . '/inc/block-patterns.php';
|
||||
|
||||
Reference in New Issue
Block a user