PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.7
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.7
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / helpers / curl-helper.php

curl-helper.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.7, at src/helpers/curl-helper.php

34 lines 653 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Helpers;
4
5 /**
6 * Helper class for getting information about the installed cURL version.
7 */
8 class Curl_Helper {
9
10 /**
11 * Checks is cURL is installed.
12 *
13 * @return bool Returns true if cURL is installed.
14 */
15 public function is_installed() {
16 return function_exists( 'curl_version' );
17 }
18
19 /**
20 * Returns the currently installed cURL version.
21 *
22 * @return string|null Returns a string containing the cURL version, or null if cURL is not installed.
23 */
24 public function get_version() {
25 $version = curl_version();
26
27 if ( ! isset( $version['version'] ) ) {
28 return null;
29 }
30
31 return $version['version'];
32 }
33 }
34