PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/functions-user.php +0 -31 8.3.08.0.2 View file →
@@ -139,39 +139,8 @@
139 139 return apply_filters( 'activitypub_user_can_activitypub', $enabled, $user_id );
140 140 }
141 141
142 142 /**
143 - * Whether the current user is allowed to act on behalf of the blog actor.
144 - *
145 - * The blog actor is virtual (no `wp_users` row), so ownership and authoring
146 - * checks against `BLOG_USER_ID = 0` cannot rely on identity equality. This
147 - * helper centralizes the "can the current user post / read as the blog?"
148 - * decision: administrators by default, filterable for integrations.
149 - *
150 - * @since 8.3.0
151 - *
152 - * @return bool True if the current user can act as the blog actor.
153 - */
154 -function user_can_act_as_blog() {
155 - /**
156 - * Filters whether the current user is allowed to act as the blog actor.
157 - *
158 - * Defaults to true for users with the `manage_options` capability (administrators).
159 - * Filter to broaden the allow-list, for example to editors on multi-author sites.
160 - *
161 - * Security note: returning a static `true` (e.g. via `__return_true`) grants
162 - * EVERY authenticated user the right to post as, read private outbox items of,
163 - * and view stats for the blog actor. Always inspect the current user inside
164 - * the callback (`current_user_can()`, role, allowlist) before returning `true`.
165 - *
166 - * @since 8.3.0
167 - *
168 - * @param bool $can_act_as_blog Whether the current user can act as the blog actor.
169 - */
170 - return (bool) \apply_filters( 'activitypub_user_can_act_as_blog', \current_user_can( 'manage_options' ) );
171 -}
172 -
173 -/**
174 143 * Checks if a User-Type is disabled for ActivityPub.
175 144 *
176 145 * This function is used to check if the 'blog' or 'user'
177 146 * type is disabled for ActivityPub.