Unverified

Name

Stop the Scroll! Float the Admin Notice Above the Editor in Code Snippets Pro [SnipSnip.pro]

About

<p>Make the admin notice in Code Snippet Pro float above the editor so your page doesn't scroll away every time you save a snippet. <a href="https://snipsnip.pro/s/787" target="_blank" rel="nofollow noopener">https://snipsnip.pro/s/787</a></p>

Language

PHP

Rating

Voted: 1 by 1 user(s)

Link for further information:

The author has provided the following URL that may be helpful to setting up or using this snippet:

https://snipsnip.pro/s/787

Codevault

brandonjp

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Snippet Source:

https://snipsnip.pro/s/787

History

Last modified:

06/09/2024

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

Stop the Scroll! Float the Admin Notice Above the Editor in Code Snippets Pro [SnipSnip.pro]

 
                    
1if (!class_exists('MakeTheSnippetNoticeFloat')) {
2 // Make the Admin Notice on Code Snippet Pro float above the editor - https://snipsnip.pro/s/787
3 class MakeTheSnippetNoticeFloat {
4 public function __construct() {
5 add_action('admin_enqueue_scripts', [$this, 'add_snippet_page_css']);
6 // Disable scroll-to-top when editing snippets - https://codesnippets.cloud/snippet/shea/no-scroll-to-top
7 add_filter( 'code_snippets/scroll_to_notices', '__return_false' );
8 }
9 
10 public function add_snippet_page_css($hook) {
11 if ($hook === 'snippets_page_add-snippet' || $hook === 'snippets_page_edit-snippet') {
12 echo '<style>
13 div#edit-snippet-form-container div#message {
14 position: sticky;
15 top: 40px;
16 z-index: 999;
17 }
18 </style>';
19 }
20 }
21 }
22 
23 new MakeTheSnippetNoticeFloat();
24}

1

Related Snippets

Please see some snippets below related to this snippet..

WordPress Admin

Unverified

0

Barebones

Added: 3 weeks ago

Last Updated: 3 weeks ago

Minimal version

WordPress Admin

AI Verified

0

Stay Logged In for 1 Year

Added: 11 months ago

Last Updated: 11 months ago

<p><a href="https://digwp.com/2023/01/stay-logged-in-to-wordpress/#:~:text=of%20custom%20code..-,Add%20custom%20code,-For%20more%20flexibility" target="_blank" rel="noopener">Stay Logged in to WordPre...

WordPress Admin

Unverified

0

WPengine remove Dashboard

Added: 1 year ago

Last Updated: 1 year ago

Remove WPengine Dashboard in WordPress AdminMenu

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

Unverified

1

Stop the Scroll! Float the Admin Notice Above the Editor in Code Snippets Pro [SnipSnip.pro]

Added: 10 months ago

Last Updated: 1 week ago

<p>Make the admin notice in Code Snippet Pro float above the editor so your page doesn't scroll away every time you save a snippet. <a href="https://snipsnip.pro/s/787" target="_blank" rel="nofollow n...

Security

Unverified

1

Users: Create & Delete n New Users in WP Admin [SnipSnip.pro] - SET TO RUN ONCE!

Added: 10 months ago

Last Updated: 1 week ago

<p>CHANGE TO 'ONLY RUN ONCE' – Users: Create &amp; Delete n New Users in WP Admin [SnipSnip.pro] - <a href="https://snipsnip.pro/s/799" target="_blank" rel="nofollow noopener">https://snipsnip.pro/s/7...

WordPress Admin

AI Verified

1

Randomize a Post Publish Date in the Classic Editor [SnipSnip.pro]

Added: 10 months ago

Last Updated: 10 months ago

<p>Randomize a Post Publish Date in the Classic Editor. Choose between the past 1, 3, 6, 12 months... or customize it to other options. Works in the Classic Editor only for now. <a href="https://snips...