| 1 |
<?php |
| 2 |
namespace Elementor\Core\Admin\Notices; |
| 3 |
|
| 4 |
use Elementor\Core\Admin\Notices\Base_Notice; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; // Exit if accessed directly. |
| 8 |
} |
| 9 |
|
| 10 |
class Update_Php_Notice extends Base_Notice { |
| 11 |
|
| 12 |
/** |
| 13 |
* Notice ID. |
| 14 |
*/ |
| 15 |
const ID = 'elementor_update_php_warning'; |
| 16 |
|
| 17 |
/** |
| 18 |
* @inheritDoc |
| 19 |
*/ |
| 20 |
public function should_print() { |
| 21 |
return ! is_php_version_compatible( '7.0' ); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* @inheritDoc |
| 26 |
*/ |
| 27 |
public function get_config() { |
| 28 |
return [ |
| 29 |
'id' => static::ID, |
| 30 |
'title' => esc_html__( 'Update your PHP to keep getting Elementor updates', 'elementor' ), |
| 31 |
'description' => esc_html__( 'Elementor\'s upcoming v3.7 will include a deprecation of PHP v5.6 that prevents you from receiving future updates. Make sure you update now - either manually or with your hosting provider.', 'elementor' ), |
| 32 |
'button' => [ |
| 33 |
'text' => '<i class="dashicons dashicons-update" aria-hidden="true"></i>' . esc_html__( 'Show me how', 'elementor' ), |
| 34 |
'url' => 'https://go.elementor.com/wp-dash-php-deprecated/', |
| 35 |
'new_tab' => true, |
| 36 |
'type' => 'cta', |
| 37 |
], |
| 38 |
]; |
| 39 |
} |
| 40 |
} |
| 41 |
|