| 1 |
/** |
| 2 |
* Displays an alert for anonymous users at the top of pages marked 'public' |
| 3 |
* instructing them to log in. Example alert: "Notice: You are browsing this |
| 4 |
* site anonymously, and only have access to a portion of its content." |
| 5 |
*/ |
| 6 |
|
| 7 |
/* global document, auth */ |
| 8 |
( function( $ ) { |
| 9 |
|
| 10 |
$( document ).ready( function() { |
| 11 |
$( '#main' ).prepend( |
| 12 |
'<div id="alert" class="alert alert-info auth-alert" style="margin: 0 0 20px;">' + |
| 13 |
'<button type="button" class="close" data-dismiss="alert">×</button>' + |
| 14 |
auth.anonymousNotice + |
| 15 |
'<a class="button" href="' + auth.wpLoginUrl + '">' + auth.logIn + '</a>' + |
| 16 |
'</div>' |
| 17 |
); |
| 18 |
} ); |
| 19 |
|
| 20 |
} )( jQuery ); |
| 21 |
|