Total Complexity | 4 |
Complexity/F | 2 |
Lines of Code | 14 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** global: GLSR, jQuery */ |
||
2 | ;(function( x ) { |
||
3 | |||
4 | 'use strict'; |
||
5 | |||
6 | GLSR.Notices = function( notices ) { // string |
||
7 | if( !notices )return; |
||
8 | if( !x( '#glsr-notices' ).length ) { |
||
9 | x( '#message.notice' ).remove(); |
||
10 | x( 'form#post' ).before( '<div id="glsr-notices" />' ); |
||
11 | } |
||
12 | x( '#glsr-notices' ).html( notices ); |
||
13 | x( document ).trigger( 'wp-updates-notice-added' ); |
||
14 | }; |
||
15 | })( jQuery ); |
||
16 |