Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter for customising the WordPress logo animation for preview #12238

Closed
noisysocks opened this issue Nov 22, 2018 · 1 comment · Fixed by #12463
Closed

Add filter for customising the WordPress logo animation for preview #12238

noisysocks opened this issue Nov 22, 2018 · 1 comment · Fixed by #12463
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.

Comments

@noisysocks
Copy link
Member

In #10896, we added an animated WordPress logo to indicate that the post preview was loading.

screen shot 2018-11-23 at 08 45 12

There's been repeated requests for the ability to customise this logo using e.g. a filter.

Such a filter could wrap around the .editor-post-preview-button__interstitial-message component, allowing developers to completely swap out the Generating preview… UI:

wp.hooks.addFilter( 'editor.interstitialMessage', function() {
    return wp.element.createElement( 'div', { className: 'my-custom-message' },
        wp.element.createElement( 'p', null, 'Post preview is being generated! 💃' )
    );
} );
@vs999
Copy link

vs999 commented Jan 12, 2021

Where should I put this code?
I tried in the functions.php of my theme but it broke my site.
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants