You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Post meta: Update meta keys to be private
WordPress convention states that meta keys prefixed with an underscore are
considered private and hidden from the custom fields UI. Since our meta keys
are for internal plugin use only, they should follow this convention.
This change helps prevent accidental modification of ActivityPub meta data
through WordPress's custom fields interface while maintaining the expected
pattern for plugin developers.
See: https://developer.wordpress.org/plugins/metadata/managing-post-metadata/#hidden-custom-fields
* Add changelog
* Fix phpcs
* Don't make activitypub_content_visibility private
* Add missing bits
* Also remove content_warning
Needs to be editable in editor
* update phpcs
@@ -106,7 +106,7 @@ public static function get_follower( $user_id, $actor ) {
106
106
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
107
107
$post_id = $wpdb->get_var(
108
108
$wpdb->prepare(
109
-
"SELECT DISTINCT p.ID FROM $wpdb->posts p INNER JOIN $wpdb->postmeta pm ON p.ID = pm.post_id WHERE p.post_type = %s AND pm.meta_key = 'activitypub_user_id' AND pm.meta_value = %d AND p.guid = %s",
109
+
"SELECT DISTINCT p.ID FROM $wpdb->posts p INNER JOIN $wpdb->postmeta pm ON p.ID = pm.post_id WHERE p.post_type = %s AND pm.meta_key = '_activitypub_user_id' AND pm.meta_value = %d AND p.guid = %s",
110
110
array(
111
111
esc_sql( self::POST_TYPE ),
112
112
esc_sql( $user_id ),
@@ -188,7 +188,7 @@ public static function get_followers_with_count( $user_id, $number = -1, $page =
0 commit comments