Changes to LCP Gallery Meta
This commit is contained in:
@ -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' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user