Merge branch 'master' into rewrite-followers
This commit is contained in:
commit
26e5a1d3f6
5 changed files with 10 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
||||||
**Contributors:** [pfefferle](https://profiles.wordpress.org/pfefferle/), [mediaformat](https://profiles.wordpress.org/mediaformat/), [akirk](https://profiles.wordpress.org/akirk/), [automattic](https://profiles.wordpress.org/automattic/)
|
**Contributors:** [pfefferle](https://profiles.wordpress.org/pfefferle/), [mediaformat](https://profiles.wordpress.org/mediaformat/), [akirk](https://profiles.wordpress.org/akirk/), [automattic](https://profiles.wordpress.org/automattic/)
|
||||||
**Tags:** OStatus, fediverse, activitypub, activitystream
|
**Tags:** OStatus, fediverse, activitypub, activitystream
|
||||||
**Requires at least:** 4.7
|
**Requires at least:** 4.7
|
||||||
**Tested up to:** 6.1
|
**Tested up to:** 6.2
|
||||||
**Stable tag:** 0.17.0
|
**Stable tag:** 0.17.0
|
||||||
**Requires PHP:** 5.6
|
**Requires PHP:** 5.6
|
||||||
**License:** MIT
|
**License:** MIT
|
||||||
|
@ -111,7 +111,11 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
|
||||||
|
|
||||||
## Changelog ##
|
## Changelog ##
|
||||||
|
|
||||||
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
|
Project maintained on GitHub at [automattic/wordpress-activitypub](https://github.com/automattic/wordpress-activitypub).
|
||||||
|
|
||||||
|
### Next ###
|
||||||
|
|
||||||
|
* Compatibility: indicate that the plugin is compatible and has been tested with the latest version of WordPress, 6.2.
|
||||||
|
|
||||||
### 0.17.0 ###
|
### 0.17.0 ###
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,8 @@ function init() {
|
||||||
\defined( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS' ) || \define( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS', 3 );
|
\defined( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS' ) || \define( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS', 3 );
|
||||||
\defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=<p>)|(?<=<br>)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' );
|
\defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=<p>)|(?<=<br>)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' );
|
||||||
\defined( 'ACTIVITYPUB_USERNAME_REGEXP' ) || \define( 'ACTIVITYPUB_USERNAME_REGEXP', '(?:([A-Za-z0-9_-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))' );
|
\defined( 'ACTIVITYPUB_USERNAME_REGEXP' ) || \define( 'ACTIVITYPUB_USERNAME_REGEXP', '(?:([A-Za-z0-9_-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+))' );
|
||||||
\defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '<strong><a><p><ul><ol><li><code><blockquote><pre><img>' );
|
|
||||||
\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "<p><strong>[ap_title]</strong></p>\n\n[ap_content]\n\n<p>[ap_hashtags]</p>\n\n<p>[ap_shortlink]</p>" );
|
\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "<p><strong>[ap_title]</strong></p>\n\n[ap_content]\n\n<p>[ap_hashtags]</p>\n\n<p>[ap_shortlink]</p>" );
|
||||||
\defined( 'ACTIVITYPUB_USER_DESCRIPTION_KEY' ) || \define( 'ACTIVITYPUB_USER_DESCRIPTION_KEY', 'activitypub_user_description' );
|
|
||||||
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||||
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||||
\define( 'ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
\define( 'ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Admin {
|
||||||
if ( ! current_user_can( 'edit_user', $user_id ) ) {
|
if ( ! current_user_can( 'edit_user', $user_id ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
update_user_meta( $user_id, ACTIVITYPUB_USER_DESCRIPTION_KEY, sanitize_text_field( $_POST['activitypub-user-description'] ) );
|
update_user_meta( $user_id, 'activitypub_user_description', sanitize_text_field( $_POST['activitypub-user-description'] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function enqueue_scripts( $hook_suffix ) {
|
public static function enqueue_scripts( $hook_suffix ) {
|
||||||
|
|
|
@ -205,7 +205,7 @@ function url_to_authorid( $url ) {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_author_description( $user_id ) {
|
function get_author_description( $user_id ) {
|
||||||
$description = get_user_meta( $user_id, ACTIVITYPUB_USER_DESCRIPTION_KEY, true );
|
$description = get_user_meta( $user_id, 'activitypub_user_description', true );
|
||||||
if ( empty( $description ) ) {
|
if ( empty( $description ) ) {
|
||||||
$description = get_user_meta( $user_id, 'description', true );
|
$description = get_user_meta( $user_id, 'description', true );
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
|
Project maintained on GitHub at [automattic/wordpress-activitypub](https://github.com/automattic/wordpress-activitypub).
|
||||||
|
|
||||||
= Next =
|
= Next =
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue