) ) { $urls = explode( PHP_EOL, $model->sh_feature_policy_urls ); $urls = array_map( 'trim', $urls ); // Wrap strings in quotes. array_walk( $urls, function ( &$x ) { $x = '"' . $x . '"'; } ); $urls = implode( ' ', $urls ); array_walk( $features, function ( &$value ) use ( $urls ) { $value .= '=(' . $urls . ')'; } ); $headers = 'Permissions-Policy: ' . implode( ', ', $features ); } break; case 'none': array_walk( $features, function ( &$value ) { $value .= '=()'; } ); $headers = 'Permissions-Policy: ' . implode( ', ', $features ); break; default: break; } if ( strlen( $headers ) > 0 ) { header( trim( $headers ) ); } } } /** * Retrieves the title of the Permissions-Policy. * * @return string The title of the Permissions-Policy. */ public function get_title() { return esc_html__( 'Permissions-Policy', 'wpdef' ); } }