Add a migration that updates the blog actor
This commit is contained in:
parent
8d335bf3da
commit
814ecec9a9
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace pterotype\schema;
|
||||
|
||||
require plugin_dir_path( __FILE__ ) . 'client/identity.php';
|
||||
|
||||
function get_previous_version() {
|
||||
$previous_version = get_option( 'pterotype_previously_migrated_version' );
|
||||
if ( !$previous_version ) {
|
||||
@ -18,6 +20,7 @@ function run_migrations() {
|
||||
apply_migration( '1.1.0', 'migration_1_1_0' );
|
||||
apply_migration( '1.1.1', 'migration_1_1_1' );
|
||||
apply_migration( '1.2.0', 'migration_1_2_0' );
|
||||
apply_migration( '1.2.1', 'migration_1_2_0' );
|
||||
update_option( 'pterotype_previously_migrated_version', PTEROTYPE_VERSION );
|
||||
}
|
||||
|
||||
@ -279,4 +282,8 @@ function migration_1_2_0() {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function migration_1_2_1() {
|
||||
\pterotype\identity\update_identity( PTEROTYPE_BLOG_ACTOR_SLUG );
|
||||
}
|
||||
?>
|
||||
|
@ -3,7 +3,7 @@
|
||||
Plugin Name: Pterotype
|
||||
Plugin URI: https://getpterotype.com
|
||||
Description: Pterotype expands your audience by giving your blog an ActivityPub stream, making it a part of the Fediverse.
|
||||
Version: 1.2.0
|
||||
Version: 1.2.1
|
||||
Author: Jeremy Dormitzer
|
||||
Author URI: https://jeremydormitzer.com
|
||||
License: MIT
|
||||
@ -12,7 +12,7 @@ License URI: https://github.com/jdormit/blob/master/LICENSE
|
||||
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
|
||||
require_once plugin_dir_path( __FILE__ ) . 'includes/init.php';
|
||||
|
||||
define( 'PTEROTYPE_VERSION', '1.2.0' );
|
||||
define( 'PTEROTYPE_VERSION', '1.2.1' );
|
||||
define( 'PTEROTYPE_BLOG_ACTOR_SLUG', '-blog' );
|
||||
define( 'PTEROTYPE_BLOG_ACTOR_USERNAME', 'blog' );
|
||||
|
||||
@ -30,7 +30,7 @@ function pterotype_load() {
|
||||
do_action( 'pterotype_load' );
|
||||
}
|
||||
|
||||
add_action( 'plugins_loaded', 'pterotype_load' );
|
||||
add_action( 'setup_theme', 'pterotype_load' );
|
||||
register_activation_hook( __FILE__, 'pterotype_init' );
|
||||
register_deactivation_hook( __FILE__, 'pterotype_deactivate' );
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user