-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
follow up fixes and minor updates #13
- Loading branch information
1 parent
255993b
commit ce9d306
Showing
3 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
( function( wp ) { | ||
msg = wp.i18n.__( 'You are editing the BIP main page.', 'bip-pages' ) + ' ' + | ||
wp.i18n.__( 'Parts of this page are automatically generated. The text you enter below will be displayed between the automatic BIP header and footer.', 'bip-pages' ); | ||
if ( bip_pages_vars['bip_current_id'] == bip_pages_vars['bip_main_page'] ) { | ||
msg = wp.i18n.__( 'You are editing the BIP main page.', 'bip-pages' ) + ' ' + | ||
wp.i18n.__( 'Parts of this page are automatically generated. The text you enter below will be displayed between the automatic BIP header and footer.', 'bip-pages' ); | ||
|
||
wp.data.dispatch('core/notices').createWarningNotice( | ||
msg, | ||
{ isDismissible: true, } | ||
); | ||
wp.data.dispatch('core/notices').createInfoNotice( | ||
msg, | ||
{ isDismissible: true, } | ||
); | ||
} | ||
} )( window.wp ); | ||
|
||
window.onload = (event) => { | ||
el = '<div class="bip-footer-container components-notice is-info is-dismissible">' + | ||
wp.i18n.__( 'A footer containing the author and publication date will be added here automatically.', 'bip-pages' ) + | ||
'</div>'; | ||
jQuery('.edit-post-visual-editor').append( el ); | ||
wf = jQuery('.editor-writing-flow'); | ||
pt = jQuery('.editor-post-title'); | ||
footer = jQuery('.bip-footer-container'); | ||
}; |