이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

occupied

설명

custom page locking for WordPress admin screens

usage

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

developers

This plugin is developed on github

license

GPLv3

스크린샷

  • Demonstration

설치

put this plugin in the plugins directory of your wordpress installation

or

include the plugin in the root folder of your own plugin and require it with

require_once('occupied-installation-folder/occupied.php');

FAQ

Installation Instructions

put this plugin in the plugins directory of your wordpress installation

or

include the plugin in the root folder of your own plugin and require it with

require_once('occupied-installation-folder/occupied.php');

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“occupied”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “occupied”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

  • Initial upload