Changes to LCP Gallery Meta

This commit is contained in:
Jeremy Rangel
2025-01-09 17:50:32 -08:00
parent ceb37fc5af
commit ae31fec647
14 changed files with 651 additions and 35 deletions

View File

@ -82,4 +82,31 @@ function lcp_after_setup_theme() {
lcp_register_custom_image_sizes();
}
add_action('after_setup_theme', 'lcp_after_setup_theme');
add_action('after_setup_theme', 'lcp_after_setup_theme');
function lcp_init_hooks() {
lcp_register_pattern_categories();
lcp_register_patterns();
}
add_action('init', 'lcp_init_hooks');
// Register pattern categories
function lcp_register_pattern_categories() {
register_block_pattern_category( 'lcp/customss', array(
'label' => __( 'Theme Name: Local Content Pro', 'lcp' ),
'description' => __( 'Custom patterns for Local Content Pro.', 'lcp' )
) );
}
// Register block pattern
function lcp_register_patterns() {
register_block_pattern(
'lcp/post-content', // Unique slug
array(
'title' => __( 'Post Content', 'lcp' ),
'description' => __( 'A pattern for displaying post content', 'lcp' ),
'content' => file_get_contents( get_template_directory() . '/patterns/post-content.php' ),
)
);
}