=' ) && version_compare( $wp_version, ORBITSTEM_SEO_MIN_WP, '>=' ); } /** * Admin notice shown when requirements are not met. */ function orbitstem_seo_requirements_notice() { printf( '

%s

', esc_html( sprintf( /* translators: 1: minimum PHP version, 2: minimum WordPress version */ __( 'Orbitstem SEO requires PHP %1$s and WordPress %2$s or newer. It is installed but not running.', 'orbitstem-seo' ), ORBITSTEM_SEO_MIN_PHP, ORBITSTEM_SEO_MIN_WP ) ) ); } if ( ! orbitstem_seo_requirements_met() ) { add_action( 'admin_notices', 'orbitstem_seo_requirements_notice' ); return; } spl_autoload_register( static function ( $class_name ) { $prefix = 'Orbitstem\\SEO\\'; if ( 0 !== strpos( $class_name, $prefix ) ) { return; } $file = ORBITSTEM_SEO_DIR . 'src/' . str_replace( '\\', '/', substr( $class_name, strlen( $prefix ) ) ) . '.php'; if ( is_readable( $file ) ) { require $file; } } ); register_activation_hook( __FILE__, array( 'Orbitstem\\SEO\\Plugin', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Orbitstem\\SEO\\Plugin', 'deactivate' ) ); add_action( 'plugins_loaded', array( 'Orbitstem\\SEO\\Plugin', 'boot' ) ); /** * Prints or returns breadcrumbs for the current page. For use in theme templates. * * @param bool $display Print (true) or return (false). * @return string HTML. */ function orbitstem_seo_breadcrumbs( $display = true ) { $plugin = Orbitstem\SEO\Plugin::instance(); $html = $plugin ? $plugin->trail->shortcode() : ''; if ( $display ) { echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped in Trail::render(). } return $html; }