/**
* Twenty Twenty-Five functions and definitions.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package WordPress
* @subpackage Twenty_Twenty_Five
* @since Twenty Twenty-Five 1.0
*/
if ( ! function_exists( 'twentytwentyfive_post_format_setup' ) ) :
/**
* Adds theme support for post formats.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_post_format_setup() {
add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
}
endif;
add_action( 'after_setup_theme', 'twentytwentyfive_post_format_setup' );
if ( ! function_exists( 'twentytwentyfive_editor_style' ) ) :
/**
* Enqueues editor-style.css in the editors.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_editor_style() {
add_editor_style( 'assets/css/editor-style.css' );
}
endif;
add_action( 'after_setup_theme', 'twentytwentyfive_editor_style' );
if ( ! function_exists( 'twentytwentyfive_enqueue_styles' ) ) :
/**
* Enqueues the theme stylesheet on the front.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_enqueue_styles() {
$suffix = SCRIPT_DEBUG ? '' : '.min';
$src = 'style' . $suffix . '.css';
wp_enqueue_style(
'twentytwentyfive-style',
get_parent_theme_file_uri( $src ),
array(),
wp_get_theme()->get( 'Version' )
);
wp_style_add_data(
'twentytwentyfive-style',
'path',
get_parent_theme_file_path( $src )
);
}
endif;
add_action( 'wp_enqueue_scripts', 'twentytwentyfive_enqueue_styles' );
if ( ! function_exists( 'twentytwentyfive_block_styles' ) ) :
/**
* Registers custom block styles.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_block_styles() {
register_block_style(
'core/list',
array(
'name' => 'checkmark-list',
'label' => __( 'Checkmark', 'twentytwentyfive' ),
'inline_style' => '
ul.is-style-checkmark-list {
list-style-type: "\2713";
}
ul.is-style-checkmark-list li {
padding-inline-start: 1ch;
}',
)
);
}
endif;
add_action( 'init', 'twentytwentyfive_block_styles' );
if ( ! function_exists( 'twentytwentyfive_pattern_categories' ) ) :
/**
* Registers pattern categories.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_pattern_categories() {
register_block_pattern_category(
'twentytwentyfive_page',
array(
'label' => __( 'Pages', 'twentytwentyfive' ),
'description' => __( 'A collection of full page layouts.', 'twentytwentyfive' ),
)
);
register_block_pattern_category(
'twentytwentyfive_post-format',
array(
'label' => __( 'Post formats', 'twentytwentyfive' ),
'description' => __( 'A collection of post format patterns.', 'twentytwentyfive' ),
)
);
}
endif;
add_action( 'init', 'twentytwentyfive_pattern_categories' );
if ( ! function_exists( 'twentytwentyfive_register_block_bindings' ) ) :
/**
* Registers the post format block binding source.
*
* @since Twenty Twenty-Five 1.0
*
* @return void
*/
function twentytwentyfive_register_block_bindings() {
register_block_bindings_source(
'twentytwentyfive/format',
array(
'label' => _x( 'Post format name', 'Label for the block binding placeholder in the editor', 'twentytwentyfive' ),
'get_value_callback' => 'twentytwentyfive_format_binding',
)
);
}
endif;
add_action( 'init', 'twentytwentyfive_register_block_bindings' );
if ( ! function_exists( 'twentytwentyfive_format_binding' ) ) :
/**
* Callback function for the post format name block binding source.
*
* @since Twenty Twenty-Five 1.0
*
* @return string|void Post format name, or nothing if the format is 'standard'.
*/
function twentytwentyfive_format_binding() {
$post_format_slug = get_post_format();
if ( $post_format_slug && 'standard' !== $post_format_slug ) {
return get_post_format_string( $post_format_slug );
}
}
endif;
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/banner-about-book.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/banner-cover-big-heading.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/binding-format.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/comments.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/cta-grid-products-link.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/cta-heading-search.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/footer-social.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/header.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/heading-and-paragraph-with-image.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/hero-book.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/hero-full-width-image.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-business-home.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-coming-soon.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-cv-bio.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-landing-podcast.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-link-in-bio-with-tight-margins.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/page-portfolio-home.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-404-vertical-header-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-home-vertical-header-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-query-loop-text-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-search-photo-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-search-text-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/template-single-text-blog.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/testimonials-2-col.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Notice: Function get_block_patterns was called incorrectly. Could not register file "/dom1148200/wp-content/themes/twentytwentyfive/patterns/vertical-header.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in /dom1148200/wp-includes/functions.php on line 6085
Warning: Cannot modify header information - headers already sent by (output started at /dom1148200/wp-content/themes/twentytwentyfive/functions.php:2) in /dom1148200/wp-includes/sitemaps/class-wp-sitemaps-renderer.php on line 126