PluginProbe
ActivityPub / 7.7.0
ActivityPub v7.7.0
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/class-moderation.php +0 -32 9.2.07.7.0 View file →
@@ -223,40 +223,8 @@
223 223 return true; // Already blocked.
224 224 }
225 225
226 226 /**
227 - * Add multiple site-wide blocks at once.
228 - *
229 - * More efficient than calling add_site_block() in a loop as it
230 - * performs a single database update.
231 - *
232 - * @param string $type The block type (domain or keyword only).
233 - * @param array $values Array of values to block.
234 - */
235 - public static function add_site_blocks( $type, $values ) {
236 - if ( ! \in_array( $type, array( self::TYPE_DOMAIN, self::TYPE_KEYWORD ), true ) ) {
237 - return;
238 - }
239 -
240 - if ( empty( $values ) ) {
241 - return;
242 - }
243 -
244 - foreach ( $values as $value ) {
245 - /**
246 - * Fired when a domain or keyword is blocked site-wide.
247 - *
248 - * @param string $value The blocked domain or keyword.
249 - * @param string $type The block type (actor, domain, keyword).
250 - */
251 - \do_action( 'activitypub_add_site_block', $value, $type );
252 - }
253 -
254 - $existing = \get_option( self::OPTION_KEYS[ $type ], array() );
255 - \update_option( self::OPTION_KEYS[ $type ], \array_unique( \array_merge( $existing, $values ) ) );
256 - }
257 -
258 - /**
259 227 * Remove a site-wide block.
260 228 *
261 229 * @param string $type The block type (actor, domain, keyword).
262 230 * @param string $value The value to unblock.