# authorizer/3.3.2/js/authorizer-public.js

Authorizer, version 3.3.2. 21 lines.

- Page: https://pluginprobe.com/plugins/authorizer/3.3.2/code/js/authorizer-public.js
- Raw: https://pluginprobe.com/plugins/authorizer/3.3.2/raw/js/authorizer-public.js
- Modified: 2022-01-06T20:00:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/authorizer/3.3.2/code/js/authorizer-public.js#L10-L20`.

```javascript
/**
 * Displays an alert for anonymous users at the top of pages marked 'public'
 * instructing them to log in. Example alert: "Notice: You are browsing this
 * site anonymously, and only have access to a portion of its content."
 */

/* global document, auth */
( function( $ ) {

	$( document ).ready( function() {
		$( '#main' ).prepend(
			'<div id="alert" class="alert alert-info auth-alert" style="margin: 0 0 20px;">' +
				'<button type="button" class="close" data-dismiss="alert">&times;</button>' +
				auth.anonymousNotice +
				'<a class="button" href="' + auth.wpLoginUrl + '">' + auth.logIn + '</a>' +
			'</div>'
		);
	} );

} )( jQuery );

```
