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
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds 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.
Create a TDEE Calculator that helps visitors estimate daily calorie needs and make informed decisions.
Enhance titles with highlighted headlines that use custom colors, animations, and styles to draw attention and help visitors notice key messages.
Add an MP3 Player to your website and engage visitors with music, podcasts, and spoken audio without any setup complexity.
Create and customize product catalogs with a catalog widget that organizes items clearly, improves browsing, and helps visitors explore your offerings easily.
Create course listings with a course catalog widget that displays programs clearly, supports easy organization, and helps visitors explore courses effectively.
Create a mega footer that organizes navigation links, contact info, logos, social icons and improves usability and site structure.
Showcase content with a card slider that presents images, text, and buttons in a smooth, customizable layout to keep visitors engaged.
Show key stats with an animated number counter that draws attention, adds social proof, and helps increase trust and conversions.
Use an image accordion to show pictures in collapsible panels that save space, highlight key visuals, and keep visitors engaged.
Show Sitejabber reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
Use a process widget to present tasks in a clear visual sequence, showing each step with images and text to improve understanding and user engagement.
Showcase clips with a video slider that plays videos from multiple sources in a smooth slideshow, improving design and keeping visitors engaged.
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!
