__( 'Primary' ), 'bottom' =>__( 'Bottom' ), 'top' =>__( 'Top' ) )); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'caption', )); add_theme_support( 'customize-selective-refresh-widgets' ); } add_action( 'after_setup_theme', 'boot23_setup' ); /************************************ ######### WordPress Widgets ######### *************************************/ function boot23_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Homepage', 'hp-theme' ), 'id' => 'homepage-widget', 'description' => esc_html__( 'Add widgets here.', 'hp-theme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'hp-theme' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'hp-theme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 1', 'hp-theme' ), 'id' => 'footer-1', 'description' => esc_html__( 'Add widgets here.', 'hp-theme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 2', 'hp-theme' ), 'id' => 'footer-2', 'description' => esc_html__( 'Add widgets here.', 'hp-theme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer 3', 'hp-theme' ), 'id' => 'footer-3', 'description' => esc_html__( 'Add widgets here.', 'hp-theme' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'boot23_widgets_init' ); /********************************** ######## Gutenberg Editor ######### ***********************************/ function boot23_gutenberg_scripts() { wp_enqueue_script( 'hp-editor', get_stylesheet_directory_uri() . '/js/editor.js', array( 'wp-blocks', 'wp-dom' ), filemtime( get_stylesheet_directory() . '/js/editor.js' ), true ); } add_action( 'enqueue_block_editor_assets', 'boot23_gutenberg_scripts' ); function boot23_add_editor_styles() { add_theme_support( 'editor-styles' ); add_editor_style([ 'css/custom.css', 'style.css' ]); } add_action( 'after_setup_theme', 'boot23_add_editor_styles' ); function boot23_gutenberg_filter_block( $block_content, $block ) { $block_content = str_replace( 'wp-block-button__link', 'wp-block-button__link btn', $block_content ); return $block_content; } add_filter( 'render_block', 'boot23_gutenberg_filter_block', 10, 2);