custom page locking for WordPress admin screens
In the function for your custom page, just use Occupied::protect() to enable locking on that page.
<?php add_action('admin_menu', 'register_my_plugin_menu'); function register_my_plugin_menu(){ add_menu_page("My Cool Plugin", "cool-plugin", "manage_options", "my_cool_plugin_page", "render_my_cool_plugin", "dashicons-heart", 7); } function render_my_cool_plugin(){ // Occupied::protect enables locking on this page // and returns a lock array // optional: pass a message to the protect method to appear on the lock modal. $lock = Occupied::protect("Cool Plugin Occupied!"); echo "<h1>My Cool Plugin!</h1>"; } ?> In another action, you can check whether a screen is occupied by the current user
<?php function some_other_action(){ if(Occupied::is_authorized('toplevel_page_my_cool_plugin_page')){ // business logic, save to database, etc.. }else{ // return error } } ?><h3>todo</h3> * break out styles
* add locking hooks
* rethink using vue for a modal and some event handlers
This plugin is developed on github
GPLv3
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Sean Gregory
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
A scroll to top button that helps visitors move back to the top of long pages quickly, improving navigation and overall browsing flow.
Detect ad blockers on your site to maintain visibility into user behavior and support sustainable ad-based monetization.
Show Instagram posts in a responsive carousel layout to enhance social proof and keep your site content visually fresh.
Show Vimeo videos with a Vimeo carousel that displays clips in a smooth, flexible layout to boost visibility and engagement.
Add collapsible content sections to your site to organize information and help users navigate content more efficiently.
Display a cookies consent bar that explains usage and supports GDPR compliance, enhancing user trust and legal clarity.
Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.
Create engaging stop motion displays with a stop motion player that turns image sequences into interactive animations to boost creativity and visitor engagement.
Show inspiring quotes with a quotes carousel that rotates messages, enhances design, and keeps visitors engaged.
Show Capterra reviews to build trust, strengthen credibility, and help visitors make confident software buying decisions that support higher sales.
Add a no-code audio player to your site and boost engagement with music, podcasts, and voice content effortlessly.
Show eBay reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
