Skip to content

Commit

Permalink
Merge pull request #2416 from Automattic/alpha
Browse files Browse the repository at this point in the history
Release Nov 25
  • Loading branch information
dkoo authored Nov 25, 2024
2 parents 43375b1 + 783a55e commit b847de4
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 15 deletions.
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
## [2.2.1](https://github.com/Automattic/newspack-theme/compare/v2.2.0...v2.2.1) (2024-11-19)
# [2.3.0-alpha.3](https://github.com/Automattic/newspack-theme/compare/v2.3.0-alpha.2...v2.3.0-alpha.3) (2024-11-21)


### Features

* add Bluesky to the profile fields ([#2413](https://github.com/Automattic/newspack-theme/issues/2413)) ([a4eb21b](https://github.com/Automattic/newspack-theme/commit/a4eb21b46e15c54c35df6d87bfcca95cb523145e))
* add Bluesky to the Social Links menu ([#2412](https://github.com/Automattic/newspack-theme/issues/2412)) ([e32f604](https://github.com/Automattic/newspack-theme/commit/e32f6046677945f7b4d1d1c6be2c38945b37a9c3))

# [2.3.0-alpha.2](https://github.com/Automattic/newspack-theme/compare/v2.3.0-alpha.1...v2.3.0-alpha.2) (2024-11-19)


### Bug Fixes

* getting translations to load again ([#2411](https://github.com/Automattic/newspack-theme/issues/2411)) ([110b039](https://github.com/Automattic/newspack-theme/commit/110b039b5c7d90b13c98753f8c8146071169b2bd))

## [2.2.1](https://github.com/Automattic/newspack-theme/compare/v2.2.0...v2.2.1) (2024-11-19)

### Bug Fixes

* getting translations to load again ([#2411](https://github.com/Automattic/newspack-theme/issues/2411)) ([110b039](https://github.com/Automattic/newspack-theme/commit/110b039b5c7d90b13c98753f8c8146071169b2bd))


# [2.3.0-alpha.1](https://github.com/Automattic/newspack-theme/compare/v2.2.0...v2.3.0-alpha.1) (2024-11-15)

### Bug Fixes

* make button background styles more specific ([#2407](https://github.com/Automattic/newspack-theme/issues/2407)) ([21f6a4e](https://github.com/Automattic/newspack-theme/commit/21f6a4ed62affb29854b8a8ad17dbfd42ba66cff))

### Features

* **author-archive:** replace twitter icon with x ([2f4709a](https://github.com/Automattic/newspack-theme/commit/2f4709a9aa935d53d8e0aac4d205ece1865a96f1))

# [2.2.0](https://github.com/Automattic/newspack-theme/compare/v2.1.1...v2.2.0) (2024-11-12)


Expand Down
2 changes: 1 addition & 1 deletion newspack-joseph/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: newspack-theme
Expand Down
2 changes: 1 addition & 1 deletion newspack-katharine/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: newspack-theme
Expand Down
2 changes: 1 addition & 1 deletion newspack-nelson/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: newspack-theme
Expand Down
2 changes: 1 addition & 1 deletion newspack-sacha/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: newspack-theme
Expand Down
2 changes: 1 addition & 1 deletion newspack-scott/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: newspack-theme
Expand Down
8 changes: 8 additions & 0 deletions newspack-theme/classes/class-newspack-svg-icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ public static function get_social_icons_map() {
'behance' => array(
'behance.net',
),
'bluesky' => array(
'bsky.app',
),
'codepen' => array(
'codepen.io',
),
Expand Down Expand Up @@ -343,6 +346,11 @@ public static function get_social_icons_map() {
<path d="M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"></path>
</svg>',

'bluesky' => '
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M6.33525 4.1443C8.6282 5.80613 11.0944 9.17571 12 10.9838C12.9056 9.17571 15.3718 5.80613 17.6648 4.1443C19.3192 2.94521 22 2.01741 22 4.96972C22 5.55931 21.6498 9.92278 21.4444 10.6312C20.7305 13.0941 18.1291 13.7222 15.815 13.342C19.8599 14.0066 20.8889 16.2079 18.6667 18.4093C14.4462 22.59 12.6007 17.3603 12.1279 16.0203C12.0412 15.7746 12.0006 15.6597 12 15.7574C11.9994 15.6597 11.9588 15.7746 11.8721 16.0203C11.3993 17.3603 9.55377 22.59 5.33333 18.4093C3.11111 16.2079 4.14006 14.0066 8.18496 13.342C5.87088 13.7222 3.26949 13.0941 2.55556 10.6312C2.35018 9.92278 2 5.55931 2 4.96972C2 2.01741 4.68079 2.94521 6.33525 4.1443Z"/>
</svg>',

'chain' => '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M19.647,16.706a1.134,1.134,0,0,0-.343-.833l-2.549-2.549a1.134,1.134,0,0,0-.833-.343,1.168,1.168,0,0,0-.883.392l.233.226q.2.189.264.264a2.922,2.922,0,0,1,.184.233.986.986,0,0,1,.159.312,1.242,1.242,0,0,1,.043.337,1.172,1.172,0,0,1-1.176,1.176,1.237,1.237,0,0,1-.337-.043,1,1,0,0,1-.312-.159,2.76,2.76,0,0,1-.233-.184q-.073-.068-.264-.264l-.226-.233a1.19,1.19,0,0,0-.4.895,1.134,1.134,0,0,0,.343.833L15.837,19.3a1.13,1.13,0,0,0,.833.331,1.18,1.18,0,0,0,.833-.318l1.8-1.789a1.12,1.12,0,0,0,.343-.821Zm-8.615-8.64a1.134,1.134,0,0,0-.343-.833L8.163,4.7a1.134,1.134,0,0,0-.833-.343,1.184,1.184,0,0,0-.833.331L4.7,6.473a1.12,1.12,0,0,0-.343.821,1.134,1.134,0,0,0,.343.833l2.549,2.549a1.13,1.13,0,0,0,.833.331,1.184,1.184,0,0,0,.883-.38L8.728,10.4q-.2-.189-.264-.264A2.922,2.922,0,0,1,8.28,9.9a.986.986,0,0,1-.159-.312,1.242,1.242,0,0,1-.043-.337A1.172,1.172,0,0,1,9.254,8.079a1.237,1.237,0,0,1,.337.043,1,1,0,0,1,.312.159,2.761,2.761,0,0,1,.233.184q.073.068.264.264l.226.233a1.19,1.19,0,0,0,.4-.895ZM22,16.706a3.343,3.343,0,0,1-1.042,2.488l-1.8,1.789a3.536,3.536,0,0,1-4.988-.025l-2.525-2.537a3.384,3.384,0,0,1-1.017-2.488,3.448,3.448,0,0,1,1.078-2.561l-1.078-1.078a3.434,3.434,0,0,1-2.549,1.078,3.4,3.4,0,0,1-2.5-1.029L3.029,9.794A3.4,3.4,0,0,1,2,7.294,3.343,3.343,0,0,1,3.042,4.806l1.8-1.789A3.384,3.384,0,0,1,7.331,2a3.357,3.357,0,0,1,2.5,1.042l2.525,2.537a3.384,3.384,0,0,1,1.017,2.488,3.448,3.448,0,0,1-1.078,2.561l1.078,1.078a3.551,3.551,0,0,1,5.049-.049l2.549,2.549A3.4,3.4,0,0,1,22,16.706Z"></path>
Expand Down
7 changes: 7 additions & 0 deletions newspack-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
3 changes: 2 additions & 1 deletion newspack-theme/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function newspack_author_get_social_links( $author_id, $size = 24 ) {
'tumblr',
'youtube',
'wikipedia',
'bluesky',
);

// Create empty string for links.
Expand All @@ -207,7 +208,7 @@ function newspack_author_get_social_links( $author_id, $size = 24 ) {
foreach ( $social_profiles as $profile ) {
if ( '' !== get_the_author_meta( $profile, $author_id ) ) {
if ( 'twitter' === $profile ) {
$links .= '<li class="twitter"><a href="https://twitter.com/' . esc_attr( get_the_author_meta( $profile, $author_id ) ) . '" target="_blank">' . newspack_get_social_icon_svg( $profile, $size, $profile ) . '</a></li>';
$links .= '<li class="twitter"><a href="https://x.com/' . esc_attr( get_the_author_meta( $profile, $author_id ) ) . '" target="_blank">' . newspack_get_social_icon_svg( 'x', $size, 'x' ) . '</a></li>';
} else {
$links .= '<li class="' . esc_attr( $profile ) . '"><a href="' . esc_url( get_the_author_meta( $profile, $author_id ) ) . '" target="_blank">' . newspack_get_social_icon_svg( $profile, $size, $profile ) . '</a></li>';
}
Expand Down
27 changes: 27 additions & 0 deletions newspack-theme/inc/yoast-bluesky-contact-method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php // phpcs:disable

use Yoast\WP\SEO\User_Meta\Domain\Additional_Contactmethod_Interface;

/**
* The Facebook contactmethod.
*/
class Newspack_Theme_Bluesky implements Additional_Contactmethod_Interface {

/**
* Returns the key of the Bluesky contactmethod.
*
* @return string The key of the Bluesky contactmethod.
*/
public function get_key(): string {
return 'bluesky';
}

/**
* Returns the label of the Bluesky field.
*
* @return string The label of the Bluesky field.
*/
public function get_label(): string {
return \__( 'Bluesky profile URL', 'newspack-theme' );
}
}
34 changes: 34 additions & 0 deletions newspack-theme/inc/yoast.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* Newspack Theme: Yoast customizations.
*
* @package Newspack
*/

add_action( 'after_setup_theme', 'newspack_theme_yoast_init', 20 );

/**
* Add support for the Bluesky contact method while Yoast doesn't.
*
* @return void
*/
function newspack_theme_yoast_init() {

if ( class_exists( 'Yoast\WP\SEO\User_Meta\Framework\Additional_Contactmethods\Facebook' ) ) {
require_once get_template_directory() . '/inc/yoast-bluesky-contact-method.php';
add_filter(
'wpseo_additional_contactmethods',
function( $contact_methods ) {

// Bail if the Bluesky contact method is already registered.
foreach ( $contact_methods as $contact_method ) {
if ( 'bluesky' === $contact_method->get_key() ) {
return $contact_methods;
}
}
$contact_methods[] = new Newspack_Theme_Bluesky();
return $contact_methods;
}
);
}
}
8 changes: 4 additions & 4 deletions newspack-theme/sass/forms/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ input[type="submit"],
.wp-block-search__button {
@include utilities.button-transition;

background: var(--newspack-theme-color-secondary);
background-color: var(--newspack-theme-color-secondary);
border: none;
border-radius: 5px;
box-sizing: border-box;
Expand All @@ -26,7 +26,7 @@ input[type="submit"],

&:hover,
&:hover:visited {
background: var(--newspack-theme-color-bg-button-hover);
background-color: var(--newspack-theme-color-bg-button-hover);
color: var(--newspack-theme-color-bg-body);
cursor: pointer;
}
Expand All @@ -37,15 +37,15 @@ input[type="submit"],
}

&:focus {
background: var(--newspack-theme-color-bg-button-hover);
background-color: var(--newspack-theme-color-bg-button-hover);
color: var(--newspack-theme-color-bg-body);
outline: thin dotted;
outline-offset: -4px;
}

&[disabled],
&[disabled]:hover {
background: var(--newspack-ui-color-neutral-30, #ddd);
background-color: var(--newspack-ui-color-neutral-30, #ddd);
color: var(--newspack-ui-color-neutral-0, #fff);
cursor: default;
}
Expand Down
2 changes: 1 addition & 1 deletion newspack-theme/sass/theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Author URI: https://newspack.com
Description: The official theme for Newspack, an all-in-one platform that simplifies publishing and drives audience and revenue right out of the box.
Requires at least: 6.6
Tested up to: 6.7
Version: 2.2.1
Version: 2.3.0-alpha.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspack
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "newspack",
"version": "2.2.1",
"version": "2.3.0-alpha.3",
"description": "A theme for Newspack. https://newspack.com",
"bugs": {
"url": "https://github.com/Automattic/newspack-theme/issues"
Expand Down

0 comments on commit b847de4

Please sign in to comment.