=' ) && version_compare( get_bloginfo( 'version' ), PAGECORE_MIN_WP, '>=' ); } /** * Human readable descriptions of every unmet requirement. * * @return string[] */ public static function failures() { $failures = array(); if ( version_compare( PHP_VERSION, PAGECORE_MIN_PHP, '<' ) ) { $failures[] = sprintf( /* translators: 1: required PHP version, 2: PHP version running on this site. */ __( 'PageCore needs PHP %1$s or newer. This site runs PHP %2$s.', 'pagecore' ), PAGECORE_MIN_PHP, PHP_VERSION ); } if ( version_compare( get_bloginfo( 'version' ), PAGECORE_MIN_WP, '<' ) ) { $failures[] = sprintf( /* translators: 1: required WordPress version, 2: WordPress version running on this site. */ __( 'PageCore needs WordPress %1$s or newer. This site runs WordPress %2$s.', 'pagecore' ), PAGECORE_MIN_WP, get_bloginfo( 'version' ) ); } return $failures; } /** * Print the admin notice explaining why the plugin did not load. * * @return void */ public static function render_notice() { // The one capability check in the plugin that does not go through // Capabilities, because this class is loaded before the autoloader is // registered and cannot reach it. if ( ! current_user_can( 'activate_plugins' ) ) { return; } $failures = self::failures(); if ( ! $failures ) { return; } echo '
'; echo esc_html__( 'PageCore is installed but not running.', 'pagecore' ); echo '