Lines:
1 to 61 of 61
<?php /** * Functions which enhance the theme by hooking into WordPress * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /* function twenty_twenty_one_body_classes() – Adds custom classes to the array of body classes. */ add_filter( 'body_class', 'twenty_twenty_one_body_classes' ); /* function twenty_twenty_one_post_classes() – Adds custom class to the array of posts classes. */ add_filter( 'post_class', 'twenty_twenty_one_post_classes', 10, 3 ); /* function twenty_twenty_one_pingback_header() – Add a pingback url auto-discovery header for single posts, pages, or attachments. */ add_action( 'wp_head', 'twenty_twenty_one_pingback_header' ); /* function twenty_twenty_one_supports_js() – Remove the `no-js` class from body if JS is supported. */ add_action( 'wp_footer', 'twenty_twenty_one_supports_js' ); /* function twenty_twenty_one_comment_form_defaults() – Changes comment form default fields. */ add_filter( 'comment_form_defaults', 'twenty_twenty_one_comment_form_defaults' ); /* function twenty_twenty_one_can_show_post_thumbnail() – Determines if post thumbnail can be displayed. */ /* function twenty_twenty_one_get_avatar_size() – Returns the size for avatars used in the theme. */ /* function twenty_twenty_one_continue_reading_text() – Creates continue reading text */ /* function twenty_twenty_one_continue_reading_link_excerpt() – Create the continue reading link for excerpt. */ // Filter the excerpt more link. add_filter( 'excerpt_more', 'twenty_twenty_one_continue_reading_link_excerpt' ); /* function twenty_twenty_one_continue_reading_link() – Create the continue reading link. */ // Filter the content more link. add_filter( 'the_content_more_link', 'twenty_twenty_one_continue_reading_link' ); if ( ! function_exists( 'twenty_twenty_one_post_title' ) ) { /* function twenty_twenty_one_post_title() – Add a title to posts and pages that are missing titles. */ } add_filter( 'the_title', 'twenty_twenty_one_post_title' ); /* function twenty_twenty_one_get_icon_svg() – Gets the SVG code for a given icon. */ /* function twenty_twenty_one_change_calendar_nav_arrows() – Changes the default navigation arrows to svg icons */ add_filter( 'get_calendar', 'twenty_twenty_one_change_calendar_nav_arrows' ); /* function twenty_twenty_one_get_non_latin_css() – Get custom CSS. */ /* function twenty_twenty_one_print_first_instance_of_block() – Print the first instance of a block in the content, and then break away. */ /* function twenty_twenty_one_password_form() – Retrieve protected post password form content. */ add_filter( 'the_password_form', 'twenty_twenty_one_password_form', 10, 2 ); /* function twenty_twenty_one_get_attachment_image_attributes() – Filters the list of attachment image attributes. */ add_filter( 'wp_get_attachment_image_attributes', 'twenty_twenty_one_get_attachment_image_attributes', 10, 3 );