get( 'Version' ) // this only works if you have Version in the style header ); } } if ( !function_exists( "degruchy_org_disable_archive_prefix" ) ) { /** * Removes the archive prefix title from any listing-style pages that are auto-generated, these sorts of prefixes, * while helpful, feel more annoying to me. * * @param string $title Title string to be manipulated. * * @return string The mangled string. * @since 1.1 */ function degruchy_org_disable_archive_prefix( string $title ) :string { if ( is_category() ) { $title = single_cat_title( '', FALSE ); } else if ( is_tag() ) { $title = single_tag_title( '', FALSE ); } else if ( is_author() ) { $title = '' . get_the_author() . ''; } else if ( is_post_type_archive() ) { $title = post_type_archive_title( '', FALSE ); } else if ( is_tax() ) { $title = single_term_title( '', FALSE ); } return $title; } } if( !function_exists( "degruchy_twenty_twenty_one_social_icons_map" ) ) { /** * Add mastodon support in social icons * @param Array $icons List of existing social icons to append * @link https://wordpress.org/support/topic/2021-social-icons/ * @since 1.1.3 * @return array An array of icons for the social menu */ function degruchy_twenty_twenty_one_social_icons_map( array $icons ): Array { $icons[ 'mastodon' ] = array( 'fosstodon.org', // this only maps fosstodon, you could add more here ); return $icons; } } if( !function_exists( "degruchy_twenty_twenty_one_svg_icons_social" )) { /** * @param $icons array List of existing social icons svg content * @since 1.1.3 * @return array an updated repository of SVG icons for the social menu */ function degruchy_twenty_twenty_one_svg_icons_social( array $icons ): Array { $icons[ 'mastodon' ] = ''; return $icons; } } /** * Prints HTML with meta information for the categories, tags and comments. * Footer entry meta is displayed differently in archives and single posts. * * @since Twenty Twenty-One 1.0 * * @return void */ function twenty_twenty_one_entry_meta_footer() { // Early exit if not a post. if ('post' !== get_post_type()) { return; } // Hide meta information on pages. if (!is_single()) { if (is_sticky()) { echo '
' . esc_html_x('Featured post', 'Label for sticky posts', 'twentytwentyone') . '
'; } $post_format = get_post_format(); if ('aside' === $post_format || 'status' === $post_format) { echo '' . twenty_twenty_one_continue_reading_text() . '
'; // phpcs:ignore WordPress.Security.EscapeOutput } // Posted on. twenty_twenty_one_posted_on(); // Edit post link. edit_post_link( sprintf( /* translators: %s: Name of current post. Only visible to screen readers. */ esc_html__('Edit %s', 'twentytwentyone'), '' . get_the_title() . '' ), '', '