' );
\defined( 'ACTIVITYPUB_CUSTOM_POST_CONTENT' ) || \define( 'ACTIVITYPUB_CUSTOM_POST_CONTENT', "[ap_title]
\n\n[ap_content]\n\n[ap_hashtags]
\n\n[ap_shortlink]
" );
- \defined( 'ACTIVITYPUB_USER_DESCRIPTION_KEY' ) || \define( 'ACTIVITYPUB_USER_DESCRIPTION_KEY', 'activitypub_user_description' );
+
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
\define( 'ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
diff --git a/includes/class-admin.php b/includes/class-admin.php
index 66966f9..5329d3a 100644
--- a/includes/class-admin.php
+++ b/includes/class-admin.php
@@ -156,7 +156,7 @@ class Admin {
}
public static function add_fediverse_profile( $user ) {
- $description = get_user_meta( $user->ID, ACTIVITYPUB_USER_DESCRIPTION_KEY, true );
+ $description = get_user_meta( $user->ID, 'activitypub_user_description', true );
\load_template(
ACTIVITYPUB_PLUGIN_DIR . 'templates/user-settings.php',
@@ -174,7 +174,7 @@ class Admin {
if ( ! current_user_can( 'edit_user', $user_id ) ) {
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 ) {
diff --git a/includes/functions.php b/includes/functions.php
index 4d44853..e115c70 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -312,7 +312,7 @@ function url_to_authorid( $url ) {
* @return string
*/
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 ) ) {
$description = get_user_meta( $user_id, 'description', true );
}