Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Jun 10 #175

Merged
merged 14 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# [1.9.0-alpha.1](https://github.com/Automattic/newspack-block-theme/compare/v1.8.0...v1.9.0-alpha.1) (2024-05-31)


### Bug Fixes

* disqus captcha cropping ([#163](https://github.com/Automattic/newspack-block-theme/issues/163)) ([93d6d06](https://github.com/Automattic/newspack-block-theme/commit/93d6d066c6e2371dc1460861b2697bbc95417741))


### Features

* add basic styles for input submit ([#157](https://github.com/Automattic/newspack-block-theme/issues/157)) ([df2ace1](https://github.com/Automattic/newspack-block-theme/commit/df2ace1317b354d0c493cc8969eb53f7e3df2fe7))
* add blank page template ([#158](https://github.com/Automattic/newspack-block-theme/issues/158)) ([b56d2b6](https://github.com/Automattic/newspack-block-theme/commit/b56d2b65b1d77b0c90f826c27fb79235a06576a6))
* add jetpack compatibility file ([#160](https://github.com/Automattic/newspack-block-theme/issues/160)) ([dce13dd](https://github.com/Automattic/newspack-block-theme/commit/dce13dd29dfa798acad232b01d76970ffa76da93))
* add post-meta pattern ([#148](https://github.com/Automattic/newspack-block-theme/issues/148)) ([67d3860](https://github.com/Automattic/newspack-block-theme/commit/67d38600bfa128707c060ef510ce39271542a1d0))
* add specific styles for media & text block ([#154](https://github.com/Automattic/newspack-block-theme/issues/154)) ([99e77c9](https://github.com/Automattic/newspack-block-theme/commit/99e77c90226b26d86ef57d98185c9c859e5e0d84))
* add support for jetpack top posts ([#161](https://github.com/Automattic/newspack-block-theme/issues/161)) ([492538b](https://github.com/Automattic/newspack-block-theme/commit/492538b0ef5b30b7dde6f0c4a8b04359faa9a08d))
* add support for table block ([#166](https://github.com/Automattic/newspack-block-theme/issues/166)) ([1b3d85f](https://github.com/Automattic/newspack-block-theme/commit/1b3d85f2d60b3c6c8194f5eefdfb5ab240c577b8))
* **post-comments:** improve style for pingback and trackbacks ([#162](https://github.com/Automattic/newspack-block-theme/issues/162)) ([1f7cc01](https://github.com/Automattic/newspack-block-theme/commit/1f7cc012c5d26a6ea4b53e4f5e06524ef1c2cc21))

# [1.8.0](https://github.com/Automattic/newspack-block-theme/compare/v1.7.0...v1.8.0) (2024-05-28)


Expand Down
5 changes: 3 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Newspack Block Theme functions and definitions
* Version: 1.8.0
* Version: 1.9.0-alpha.1
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
Expand All @@ -16,9 +16,10 @@
define( 'NEWSPACK_BLOCK_THEME_FILE', __FILE__ );
define( 'NEWSPACK_BLOCK_THEME_FILE_PATH', plugin_dir_path( NEWSPACK_BLOCK_THEME_FILE ) );
define( 'NEWSPACK_BLOCK_THEME_URL', plugin_dir_url( NEWSPACK_BLOCK_THEME_FILE ) );
define( 'NEWSPACK_BLOCK_THEME_VERSION', '1.8.0' );
define( 'NEWSPACK_BLOCK_THEME_VERSION', '1.9.0-alpha.1' );
}


// Include theme resources.
require_once NEWSPACK_BLOCK_THEME_FILE_PATH . '/includes/class-core.php';
require_once NEWSPACK_BLOCK_THEME_FILE_PATH . '/includes/class-jetpack.php';
17 changes: 12 additions & 5 deletions includes/class-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ final class Core {
protected static $instance = null;

/**
* Main Newspack_Block_Theme instance.
* Ensures only one instance of Newspack_Block_Theme is loaded or can be loaded.
* Main Core instance.
* Ensures only one instance of Core is loaded or can be loaded.
*
* @return Core - Main instance.
*/
Expand Down Expand Up @@ -135,12 +135,19 @@ public static function block_pattern_categories() {
register_block_pattern_category(
'newspack-block-theme',
array(
'label' => __( 'Newspack Block Theme', 'text-domain' ),
'description' => __( 'Patterns bundled with the Newspack Block Theme.', 'text-domain' ),
'label' => __( 'Newspack Theme', 'newspack-block-theme' ),
'description' => __( 'Patterns bundled with the Newspack Block Theme.', 'newspack-block-theme' ),
)
);

register_block_pattern_category(
'newspack-block-theme-post-meta',
array(
'label' => __( 'Newspack Theme - Post Meta', 'newspack-block-theme' ),
'description' => __( 'Patterns bundled with the Newspack Block Theme, specifically built for the post meta.', 'newspack-block-theme' ),
)
);
}
}


Core::instance();
60 changes: 60 additions & 0 deletions includes/class-jetpack.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Jetpack compatibility file.
* See: http://jetpack.com/
*
* @package Newspack_Block_Theme
*/

namespace Newspack_Block_Theme;

defined( 'ABSPATH' ) || exit;

/**
* Main Jetpack class.
*/
final class Jetpack {
/**
* The single instance of the class.
*
* @var Jetpack
*/
protected static $instance = null;

/**
* Main Jetpack instance.
* Ensures only one instance of Jetpack is loaded or can be loaded.
*
* @return Jetpack - Main instance.
*/
public static function instance() {
if ( is_null( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}

/**
* Constructor.
*/
public function __construct() {
\add_action( 'after_setup_theme', [ __CLASS__, 'theme_support' ] );
\add_filter( 'sharing_show', '__return_false' );
\add_filter( 'sharing_enqueue_scripts', '__return_false' );
\add_filter( 'post_flair_disable', '__return_true' );
}

/**
* Registers support for various Jetpack features.
*
* @since Newspack Block Theme 1.0
*
* @return void
*/
public static function theme_support() {
// Add theme support for geo-location.
\add_theme_support( 'jetpack-geo-location' );
}
}

Jetpack::instance();
Loading