| @@ -25,9 +25,9 @@ | ||
| 25 | 25 | public static function init() { |
| 26 | 26 | \add_filter( 'nodeinfo_data', array( self::class, 'add_nodeinfo_data' ), 10, 2 ); |
| 27 | 27 | \add_filter( 'nodeinfo2_data', array( self::class, 'add_nodeinfo2_data' ) ); |
| 28 | 28 | |
| 29 | - \add_filter( 'nodeinfo_discovery', array( self::class, 'add_wellknown_nodeinfo_data' ) ); | |
| 29 | + \add_filter( 'wellknown_nodeinfo_data', array( self::class, 'add_wellknown_nodeinfo_data' ) ); | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Extend NodeInfo data. |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | * |
| 38 | 38 | * @return array The extended array. |
| 39 | 39 | */ |
| 40 | 40 | public static function add_nodeinfo_data( $nodeinfo, $version ) { |
| 41 | - $nodeinfo = \wp_parse_args( | |
| 41 | + $nodeinfo = wp_parse_args( | |
| 42 | 42 | $nodeinfo, |
| 43 | 43 | array( |
| 44 | 44 | 'version' => $version, |
| 45 | 45 | 'software' => array(), |
| @@ -65,13 +65,13 @@ | ||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $nodeinfo['protocols'][] = 'activitypub'; |
| 68 | 68 | |
| 69 | - $nodeinfo['services']['inbound'] = \array_merge( | |
| 69 | + $nodeinfo['services']['inbound'] = array_merge( | |
| 70 | 70 | $nodeinfo['services']['inbound'], |
| 71 | 71 | array( 'gnusocial' ) |
| 72 | 72 | ); |
| 73 | - $nodeinfo['services']['outbound'] = \array_merge( | |
| 73 | + $nodeinfo['services']['outbound'] = array_merge( | |
| 74 | 74 | $nodeinfo['services']['outbound'], |
| 75 | 75 | array( 'friendica', 'gnusocial', 'mediagoblin', 'wordpress' ) |
| 76 | 76 | ); |
| 77 | 77 | |
| @@ -128,9 +128,9 @@ | ||
| 128 | 128 | * @return array List of staff accounts in WebFinger resource format. |
| 129 | 129 | */ |
| 130 | 130 | private static function get_staff() { |
| 131 | 131 | // Get all admin users with the cap activitypub. |
| 132 | - $admins = \get_users( | |
| 132 | + $admins = get_users( | |
| 133 | 133 | array( |
| 134 | 134 | 'role' => 'administrator', |
| 135 | 135 | 'orderby' => 'ID', |
| 136 | 136 | 'order' => 'ASC', |
| @@ -137,9 +137,9 @@ | ||
| 137 | 137 | 'cap' => 'activitypub', |
| 138 | 138 | 'fields' => 'ID', |
| 139 | 139 | ) |
| 140 | 140 | ); |
| 141 | - $admins = \array_map( array( Webfinger::class, 'get_user_resource' ), $admins ); | |
| 141 | + $admins = array_map( array( Webfinger::class, 'get_user_resource' ), $admins ); | |
| 142 | 142 | |
| 143 | - return \array_values( \array_filter( $admins ) ); | |
| 143 | + return array_values( array_filter( $admins ) ); | |
| 144 | 144 | } |
| 145 | 145 | } |