partner-discount-sdk
3 weeks ago
CdataStrategy.php
3 weeks ago
CdataStrategyAlways.php
3 weeks ago
CdataStrategyFactory.php
3 weeks ago
CdataStrategyIllegalCharacters.php
3 weeks ago
CdataStrategyIllegalCharactersHtmlEntities.php
3 weeks ago
CdataStrategyNever.php
3 weeks ago
XMLWriter.php
3 weeks ago
chunk.php
3 weeks ago
config.php
3 years ago
download.php
3 weeks ago
handler.php
3 weeks ago
helper.php
3 weeks ago
input.php
3 weeks ago
installer.php
3 weeks ago
session.php
10 years ago
wpallimport.php
3 weeks ago
zip.php
4 years ago
installer.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | class PMXE_Installer |
| 4 | { |
| 5 | const MIN_PHP_VERSION = "5.3.0"; |
| 6 | |
| 7 | const WRONG_PHP_VERSION_MESSAGE = "WP All Export requires PHP %1s or greater, you are using PHP %2s. Please contact your host and tell them to update your server to at least PHP %1s."; |
| 8 | |
| 9 | public function checkActivationConditions() |
| 10 | { |
| 11 | if (version_compare(phpversion(), self::MIN_PHP_VERSION , "<")) { |
| 12 | $this->error(sprintf( |
| 13 | self::WRONG_PHP_VERSION_MESSAGE, |
| 14 | self::MIN_PHP_VERSION, |
| 15 | phpversion(), |
| 16 | self::MIN_PHP_VERSION |
| 17 | )); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | private function error($message){ |
| 22 | |
| 23 | $message = esc_html($message); |
| 24 | $error = '<style type="text/css"> |
| 25 | body, html { |
| 26 | margin: 0; |
| 27 | padding: 0; |
| 28 | } |
| 29 | </style> |
| 30 | <div class="error"> |
| 31 | <p style="padding-left:2px; font-size:13px; color: #444; font-family: \'Open Sans\',sans-serif; -webkit-font-smoothing: subpixel-antialiased;"> |
| 32 | ' . $message . ' |
| 33 | </p> |
| 34 | </div>'; |
| 35 | echo wp_kses_post($error); |
| 36 | die; |
| 37 | } |
| 38 | } |