From 6651f67254d4ccb877e12c3da52067cc10aa470e Mon Sep 17 00:00:00 2001 From: leogermani Date: Thu, 21 Nov 2024 16:04:27 -0300 Subject: [PATCH] feat: add Bluesky to the profile fields (#2413) --- newspack-theme/functions.php | 7 ++++ newspack-theme/inc/template-tags.php | 1 + .../inc/yoast-bluesky-contact-method.php | 27 +++++++++++++++ newspack-theme/inc/yoast.php | 34 +++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 newspack-theme/inc/yoast-bluesky-contact-method.php create mode 100644 newspack-theme/inc/yoast.php diff --git a/newspack-theme/functions.php b/newspack-theme/functions.php index 23fcf6dcb..8063830b0 100755 --- a/newspack-theme/functions.php +++ b/newspack-theme/functions.php @@ -1362,3 +1362,10 @@ function newspack_dequeue_mediaelement() { * Woo Templates cache handling */ require get_template_directory() . '/woocommerce/templates.php'; + +/** + * Yoast customizations + */ +if ( class_exists( 'WPSEO_Options' ) ) { + require get_template_directory() . '/inc/yoast.php'; +} diff --git a/newspack-theme/inc/template-tags.php b/newspack-theme/inc/template-tags.php index 1e5aa3bae..45b0db48f 100755 --- a/newspack-theme/inc/template-tags.php +++ b/newspack-theme/inc/template-tags.php @@ -199,6 +199,7 @@ function newspack_author_get_social_links( $author_id, $size = 24 ) { 'tumblr', 'youtube', 'wikipedia', + 'bluesky', ); // Create empty string for links. diff --git a/newspack-theme/inc/yoast-bluesky-contact-method.php b/newspack-theme/inc/yoast-bluesky-contact-method.php new file mode 100644 index 000000000..c040d5bf4 --- /dev/null +++ b/newspack-theme/inc/yoast-bluesky-contact-method.php @@ -0,0 +1,27 @@ +get_key() ) { + return $contact_methods; + } + } + $contact_methods[] = new Newspack_Theme_Bluesky(); + return $contact_methods; + } + ); + } +}