Skip to content

Commit

Permalink
Updates for version 0.29.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Jun 5, 2024
1 parent bc5674b commit 2c51234
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# gatherpress-alpha
# Gatherpress Alpha

As we continue to refine and develop GatherPress, please use the GatherPress Alpha plugin alongside the core GatherPress plugin. The Alpha plugin manages breaking changes easily: just make sure GatherPress Alpha is the same version as GatherPress, activate both plugins, go to the Alpha section under GatherPress Settings, and click "Fix GatherPress!" after updating GatherPress. This process helps us avoid technical debt as we work towards launching version 1.0.0 of the plugin.
23 changes: 21 additions & 2 deletions gatherpress-alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Powering Communities with WordPress.
* Author: The GatherPress Community
* Author URI: https://gatherpress.org/
* Version: 0.0.1
* Version: 0.29.0
* Requires PHP: 7.4
* Text Domain: gatherpress-alpha
* Domain Path: /languages
Expand All @@ -14,6 +14,25 @@
* @package GatherPress
*/

define( 'GATHERPRESS_ALPHA_VERSION', current( get_file_data( __FILE__, array( 'Version' ), 'plugin' ) ) );

function gatherpress_alpha_admin_notice() {
if ( defined( 'GATHERPRESS_VERSION' ) && GATHERPRESS_VERSION !== GATHERPRESS_ALPHA_VERSION ) {
$message = __( 'GatherPress and GatherPress Alpha must be the same version.', 'gatherpress-alpha' );
} else {
return;
}

?>
<div class="notice notice-error">
<p>
<?php echo esc_html( $message ); ?>
</p>
</div>
<?php
}
add_action( 'admin_notices', 'gatherpress_alpha_admin_notice' );

function gatherpress_alpha_sub_page( $sub_pages ) {
$sub_pages['alpha'] = array(
'name' => __( 'Alpha', 'gp-meetup-importer' ),
Expand All @@ -37,7 +56,7 @@ function gatherpress_alpha_settings_section( $page ) {
<h2><?php esc_html_e( 'Alpha', 'gatherpress-alpha' ); ?></h2>
<p class="description"><?php esc_html_e( 'Fix breaking changes to GatherPress', 'gatherpress-alpha' ); ?></p>
<p class="submit">
<button id="gatherpress-alpha" class="button button-primary"><?php esc_html_e( 'Fix GatherPress!', 'gatherpress-alpha' ); ?></button>
<button id="gatherpress-alpha" <?php echo GATHERPRESS_VERSION !== GATHERPRESS_ALPHA_VERSION ? 'disabled': ''; ?> class="button button-primary"><?php esc_html_e( 'Fix GatherPress!', 'gatherpress-alpha' ); ?></button>
</p>
<script>
const gatherPressAlphaButton = document.getElementById('gatherpress-alpha');
Expand Down

0 comments on commit 2c51234

Please sign in to comment.