Changes to blocks

This commit is contained in:
Jeremy Rangel
2024-12-22 15:20:12 -08:00
parent cfbb860bf9
commit f3fbe0fa32
25 changed files with 612 additions and 1035 deletions

View File

@ -3,15 +3,16 @@
/* Blocks */
//include get_template_directory(). '/includes/blocks/lcp-gallery/lcp-gallery.php';
//include get_template_directory(). '/includes/blocks/lcp-gallery/lcp-gallery.php';
include get_template_directory() . '/includes/classes/blocks.php';
new Lcp_Blocks();
function lcp_block_theme_setup() {
add_theme_support( 'block-templates' );
}
@ -26,6 +27,15 @@ function lcp_enqueue() {
add_action('wp_enqueue_scripts', 'lcp_enqueue');
function lcp_backend_enqueue() {
// Enqueue the theme's main stylesheet (style.css)
wp_enqueue_style('lcp-style', get_stylesheet_uri());
wp_enqueue_script('lcp-script', get_template_directory_uri() . '/script.js');
}
add_action('admin_enqueue_scripts', 'lcp_enqueue');
// Backend enqueue
function lcp_enqueue_svg_repeater_script($hook) {
// Only enqueue on the theme settings page
@ -164,6 +174,11 @@ add_action('save_post', 'save_key_points_meta_box');
/* BACKEND PAGES */
// Create backend pages
@ -250,7 +265,7 @@ function lcp_custom_svgs_field() {
<?php
}
// Enqueue the JavaScript for handling the repeater functionality
@ -438,3 +453,5 @@ function add_login_form_to_footer() {
add_action( 'wp_footer', 'add_login_form_to_footer' );