array( 'type' => 'array' ), 'count' => array( 'type' => 'integer' ), ); } protected function required_input(): array { return array(); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true ); } /** * @param array $input * @return array|WP_Error */ protected function run( array $input ) { $result = Status_Tools_Repository::detect_seo_plugins(); if ( is_wp_error( $result ) ) { return $result; } $result['message'] = 0 === $result['count'] ? __( 'No other SEO plugin data was detected on this site.', 'acrossai-abilities-manager' ) : sprintf( /* translators: %d: number of plugins detected */ _n( 'Detected importable data from %d other SEO plugin.', 'Detected importable data from %d other SEO plugins.', $result['count'], 'acrossai-abilities-manager' ), $result['count'] ); return $result; } }