Add upgrade notice
This commit is contained in:
parent
3c0ee1aeba
commit
2ba6f6b8a7
3 changed files with 42 additions and 2 deletions
|
@ -388,6 +388,12 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
|
||||||
|
|
||||||
* initial
|
* initial
|
||||||
|
|
||||||
|
## Upgrade Notice ##
|
||||||
|
|
||||||
|
### 1.0.0 ###
|
||||||
|
|
||||||
|
For version 1.0.0 we have completely rebuilt the followers lists. There is a migration from the old format to the new, but it may take some time until the migration is complete. No data will be lost in the process, please give the migration some time.
|
||||||
|
|
||||||
## Installation ##
|
## Installation ##
|
||||||
|
|
||||||
Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/support/article/managing-plugins/).
|
Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/support/article/managing-plugins/).
|
||||||
|
|
|
@ -31,6 +31,8 @@ class Activitypub {
|
||||||
\add_action( 'init', array( self::class, 'add_rewrite_rules' ), 11 );
|
\add_action( 'init', array( self::class, 'add_rewrite_rules' ), 11 );
|
||||||
|
|
||||||
\add_action( 'after_setup_theme', array( self::class, 'theme_compat' ), 99 );
|
\add_action( 'after_setup_theme', array( self::class, 'theme_compat' ), 99 );
|
||||||
|
|
||||||
|
\add_action( 'in_plugin_update_message-' . ACTIVITYPUB_PLUGIN_BASENAME, array( self::class, 'plugin_update_message' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,9 +180,9 @@ class Activitypub {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store permalink in meta, to send delete Activity
|
* Store permalink in meta, to send delete Activity.
|
||||||
*
|
*
|
||||||
* @param string $post_id The Post ID
|
* @param string $post_id The Post ID.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -276,4 +278,30 @@ class Activitypub {
|
||||||
add_theme_support( 'custom-header', $custom_header_args );
|
add_theme_support( 'custom-header', $custom_header_args );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display plugin upgrade notice to users
|
||||||
|
*
|
||||||
|
* @param array $data The plugin data
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public static function plugin_update_message( $data ) {
|
||||||
|
if ( ! isset( $data['upgrade_notice'] ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf(
|
||||||
|
'<div class="update-message">%s</div>',
|
||||||
|
wp_kses(
|
||||||
|
wpautop( $data['upgrade_notice '] ),
|
||||||
|
array(
|
||||||
|
'p' => array(),
|
||||||
|
'a' => array( 'href', 'title' ),
|
||||||
|
'strong' => array(),
|
||||||
|
'em' => array(),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,6 +388,12 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
|
||||||
|
|
||||||
* initial
|
* initial
|
||||||
|
|
||||||
|
== Upgrade Notice ==
|
||||||
|
|
||||||
|
= 1.0.0 =
|
||||||
|
|
||||||
|
For version 1.0.0 we have completely rebuilt the followers lists. There is a migration from the old format to the new, but it may take some time until the migration is complete. No data will be lost in the process, please give the migration some time.
|
||||||
|
|
||||||
== Installation ==
|
== Installation ==
|
||||||
|
|
||||||
Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/support/article/managing-plugins/).
|
Follow the normal instructions for [installing WordPress plugins](https://wordpress.org/support/article/managing-plugins/).
|
||||||
|
|
Loading…
Reference in a new issue