, optional) Raw header lines sent verbatim. * home_link (bool, optional, default true) Render a "Return to {site}" link. * * @param int $status HTTP status code. * @param string $heading Pre-translated heading. * @param array $paragraphs Pre-translated body paragraphs. * @param array $extra Optional overrides (see above). * @return never */ public static function render( int $status, string $heading, array $paragraphs, array $extra = array() ): void { status_header( $status ); CacheHeaders::send_no_store(); if ( ! empty( $extra['headers'] ) && is_array( $extra['headers'] ) ) { foreach ( $extra['headers'] as $header_line ) { header( (string) $header_line ); } } header( 'Content-Type: text/html; charset=utf-8' ); $message_heading = $heading; $message_paragraphs = array_values( array_filter( array_map( 'strval', $paragraphs ) ) ); $message_icon_url = array_key_exists( 'icon_url', $extra ) ? (string) $extra['icon_url'] : (string) get_site_icon_url( 64 ); $message_home_link = ! isset( $extra['home_link'] ) || false !== $extra['home_link']; $message_home_url = home_url( '/' ); $message_site_name = get_bloginfo( 'name' ); $template = plugin_dir_path( __DIR__ ) . '../templates/oauth/message.php'; if ( ! file_exists( $template ) ) { // Fallback path relative to includes/OAuth/. $template = dirname( __DIR__, 2 ) . '/templates/oauth/message.php'; } require $template; exit; } }