@@ -143,7 +143,7 @@ public static function register_inbox_post_type() {
143143 'description ' => 'The type of the activity ' ,
144144 'single ' => true ,
145145 'show_in_rest ' => true ,
146- 'sanitize_callback ' => function ( $ value ) {
146+ 'sanitize_callback ' => static function ( $ value ) {
147147 $ schema = array (
148148 'type ' => 'string ' ,
149149 'enum ' => Activity::TYPES ,
@@ -177,7 +177,7 @@ public static function register_inbox_post_type() {
177177 'type ' => 'string ' ,
178178 'single ' => true ,
179179 'show_in_rest ' => true ,
180- 'sanitize_callback ' => function ( $ value ) {
180+ 'sanitize_callback ' => static function ( $ value ) {
181181 $ schema = array (
182182 'type ' => 'string ' ,
183183 'enum ' => array ( ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_PRIVATE , ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ),
@@ -246,7 +246,7 @@ public static function register_outbox_post_type() {
246246 'description ' => 'The type of the activity ' ,
247247 'single ' => true ,
248248 'show_in_rest ' => true ,
249- 'sanitize_callback ' => function ( $ value ) {
249+ 'sanitize_callback ' => static function ( $ value ) {
250250 $ schema = array (
251251 'type ' => 'string ' ,
252252 'enum ' => Activity::TYPES ,
@@ -269,7 +269,7 @@ public static function register_outbox_post_type() {
269269 'type ' => 'string ' ,
270270 'single ' => true ,
271271 'show_in_rest ' => true ,
272- 'sanitize_callback ' => function ( $ value ) {
272+ 'sanitize_callback ' => static function ( $ value ) {
273273 $ schema = array (
274274 'type ' => 'string ' ,
275275 'enum ' => array ( 'application ' , 'blog ' , 'user ' ),
@@ -315,7 +315,7 @@ public static function register_outbox_post_type() {
315315 'type ' => 'string ' ,
316316 'single ' => true ,
317317 'show_in_rest ' => true ,
318- 'sanitize_callback ' => function ( $ value ) {
318+ 'sanitize_callback ' => static function ( $ value ) {
319319 $ schema = array (
320320 'type ' => 'string ' ,
321321 'enum ' => array ( ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_PRIVATE , ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ),
@@ -470,7 +470,7 @@ public static function register_activitypub_post_meta() {
470470 'type ' => 'string ' ,
471471 'single ' => true ,
472472 'show_in_rest ' => true ,
473- 'sanitize_callback ' => function ( $ value ) {
473+ 'sanitize_callback ' => static function ( $ value ) {
474474 $ schema = array (
475475 'type ' => 'string ' ,
476476 'enum ' => array ( ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC , ACTIVITYPUB_CONTENT_VISIBILITY_PRIVATE , ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ),
@@ -505,7 +505,7 @@ public static function register_activitypub_post_meta() {
505505 'type ' => 'string ' ,
506506 'single ' => true ,
507507 'show_in_rest ' => true ,
508- 'sanitize_callback ' => function ( $ value ) {
508+ 'sanitize_callback ' => static function ( $ value ) {
509509 $ schema = array (
510510 'type ' => 'string ' ,
511511 'enum ' => array ( ACTIVITYPUB_INTERACTION_POLICY_ANYONE , ACTIVITYPUB_INTERACTION_POLICY_FOLLOWERS , ACTIVITYPUB_INTERACTION_POLICY_ME ),
@@ -528,7 +528,7 @@ public static function register_activitypub_post_meta() {
528528 'type ' => 'string ' ,
529529 'single ' => true ,
530530 'show_in_rest ' => true ,
531- 'sanitize_callback ' => function ( $ value ) {
531+ 'sanitize_callback ' => static function ( $ value ) {
532532 $ schema = array (
533533 'type ' => 'string ' ,
534534 'enum ' => array ( 'pending ' , 'federated ' , 'failed ' ),
@@ -560,7 +560,7 @@ public static function register_ap_actor_rest_field() {
560560 * @param array $response Prepared response array.
561561 * @return string The raw post content.
562562 */
563- 'get_callback ' => function ( $ response ) {
563+ 'get_callback ' => static function ( $ response ) {
564564 return \get_post_field ( 'post_content ' , $ response ['id ' ] );
565565 },
566566 'schema ' => array (
0 commit comments