| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public static function get_user_agent() { |
||
| 10 | |||
| 11 | // Get WL version. |
||
| 12 | $wl_version = Wordlift::get_instance()->get_version(); |
||
| 13 | |||
| 14 | // Get the WP version. |
||
| 15 | $wp_version = get_bloginfo( 'version' ); |
||
| 16 | |||
| 17 | // Get the home url. |
||
| 18 | $home_url = home_url( '/' ); |
||
| 19 | |||
| 20 | // Get the locale flag. |
||
| 21 | $locale = apply_filters( 'core_version_check_locale', get_locale() ); |
||
| 22 | |||
| 23 | // Get the multisite flag. |
||
| 24 | $multisite = is_multisite() ? 'yes' : 'no'; |
||
| 25 | |||
| 26 | // Get the PHP version. |
||
| 27 | $php_version = phpversion(); |
||
| 28 | |||
| 29 | /** @var string $wp_version The variable is defined in `version.php`. */ |
||
| 30 | return "WordLift/$wl_version WordPress/$wp_version (multisite:$multisite, url:$home_url, locale:$locale) PHP/$php_version"; |
||
| 31 | } |
||
| 32 | |||
| 33 | } |