balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

class-notices.php (1258B)


      1 <?php // phpcs:ignore WordPress.Files.FileName
      2 
      3 /**
      4  * Notices class to ensure WP is the proper version (block editor exists).
      5  *
      6  * @since 4.0.0
      7  * @package Redux Framework
      8  */
      9 
     10 
     11 namespace ReduxTemplates;
     12 
     13 if ( ! defined( 'ABSPATH' ) ) {
     14 	exit; // Exit if accessed directly.
     15 }
     16 
     17 /**
     18  * ReduxTemplates Notices.
     19  *
     20  * @since 4.0.0
     21  */
     22 class Notices {
     23 
     24 	/**
     25 	 * PHP Error Notice.
     26 	 *
     27 	 * @return void
     28 	 * @since 4.0.0
     29 	 */
     30 	public static function php_error_notice() {
     31 		$message      = sprintf( /* translators: %s: php version number */
     32 			esc_html__( 'ReduxTemplates requires PHP version %s or more.', 'redux-framework' ),
     33 			'7.1'
     34 		);
     35 		$html_message = sprintf( '<div class="notice notice-error is-dismissible">%s</div>', wpautop( $message ) );
     36 		echo wp_kses_post( $html_message );
     37 	}
     38 
     39 	/**
     40 	 * WordPress version error notice.
     41 	 *
     42 	 * @return void
     43 	 * @since 4.0.0
     44 	 */
     45 	public static function wordpress_error_notice() {
     46 		$message      = sprintf( /* translators: %s: WordPress version number */
     47 			esc_html__( 'ReduxTemplates requires WordPress version %s or more.', 'redux-framework' ),
     48 			'4.7'
     49 		);
     50 		$html_message = sprintf( '<div class="notice notice-error is-dismissible">%s</div>', wpautop( $message ) );
     51 		echo wp_kses_post( $html_message );
     52 	}
     53 }
     54