[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 this["wp"] = this["wp"] || {}; this["wp"]["plugins"] = 2 /******/ (function(modules) { // webpackBootstrap 3 /******/ // The module cache 4 /******/ var installedModules = {}; 5 /******/ 6 /******/ // The require function 7 /******/ function __webpack_require__(moduleId) { 8 /******/ 9 /******/ // Check if module is in cache 10 /******/ if(installedModules[moduleId]) { 11 /******/ return installedModules[moduleId].exports; 12 /******/ } 13 /******/ // Create a new module (and put it into the cache) 14 /******/ var module = installedModules[moduleId] = { 15 /******/ i: moduleId, 16 /******/ l: false, 17 /******/ exports: {} 18 /******/ }; 19 /******/ 20 /******/ // Execute the module function 21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 22 /******/ 23 /******/ // Flag the module as loaded 24 /******/ module.l = true; 25 /******/ 26 /******/ // Return the exports of the module 27 /******/ return module.exports; 28 /******/ } 29 /******/ 30 /******/ 31 /******/ // expose the modules object (__webpack_modules__) 32 /******/ __webpack_require__.m = modules; 33 /******/ 34 /******/ // expose the module cache 35 /******/ __webpack_require__.c = installedModules; 36 /******/ 37 /******/ // define getter function for harmony exports 38 /******/ __webpack_require__.d = function(exports, name, getter) { 39 /******/ if(!__webpack_require__.o(exports, name)) { 40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 41 /******/ } 42 /******/ }; 43 /******/ 44 /******/ // define __esModule on exports 45 /******/ __webpack_require__.r = function(exports) { 46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 48 /******/ } 49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 50 /******/ }; 51 /******/ 52 /******/ // create a fake namespace object 53 /******/ // mode & 1: value is a module id, require it 54 /******/ // mode & 2: merge all properties of value into the ns 55 /******/ // mode & 4: return value when already ns object 56 /******/ // mode & 8|1: behave like require 57 /******/ __webpack_require__.t = function(value, mode) { 58 /******/ if(mode & 1) value = __webpack_require__(value); 59 /******/ if(mode & 8) return value; 60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 61 /******/ var ns = Object.create(null); 62 /******/ __webpack_require__.r(ns); 63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 65 /******/ return ns; 66 /******/ }; 67 /******/ 68 /******/ // getDefaultExport function for compatibility with non-harmony modules 69 /******/ __webpack_require__.n = function(module) { 70 /******/ var getter = module && module.__esModule ? 71 /******/ function getDefault() { return module['default']; } : 72 /******/ function getModuleExports() { return module; }; 73 /******/ __webpack_require__.d(getter, 'a', getter); 74 /******/ return getter; 75 /******/ }; 76 /******/ 77 /******/ // Object.prototype.hasOwnProperty.call 78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 79 /******/ 80 /******/ // __webpack_public_path__ 81 /******/ __webpack_require__.p = ""; 82 /******/ 83 /******/ 84 /******/ // Load entry module and return exports 85 /******/ return __webpack_require__(__webpack_require__.s = "./node_modules/@wordpress/plugins/build-module/index.js"); 86 /******/ }) 87 /************************************************************************/ 88 /******/ ({ 89 90 /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": 91 /*!**************************************************************************!*\ 92 !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! 93 \**************************************************************************/ 94 /*! exports provided: default */ 95 /***/ (function(module, __webpack_exports__, __webpack_require__) { 96 97 "use strict"; 98 __webpack_require__.r(__webpack_exports__); 99 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; }); 100 function _assertThisInitialized(self) { 101 if (self === void 0) { 102 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 103 } 104 105 return self; 106 } 107 108 /***/ }), 109 110 /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": 111 /*!*******************************************************************!*\ 112 !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! 113 \*******************************************************************/ 114 /*! exports provided: default */ 115 /***/ (function(module, __webpack_exports__, __webpack_require__) { 116 117 "use strict"; 118 __webpack_require__.r(__webpack_exports__); 119 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; }); 120 function _classCallCheck(instance, Constructor) { 121 if (!(instance instanceof Constructor)) { 122 throw new TypeError("Cannot call a class as a function"); 123 } 124 } 125 126 /***/ }), 127 128 /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": 129 /*!****************************************************************!*\ 130 !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! 131 \****************************************************************/ 132 /*! exports provided: default */ 133 /***/ (function(module, __webpack_exports__, __webpack_require__) { 134 135 "use strict"; 136 __webpack_require__.r(__webpack_exports__); 137 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createClass; }); 138 function _defineProperties(target, props) { 139 for (var i = 0; i < props.length; i++) { 140 var descriptor = props[i]; 141 descriptor.enumerable = descriptor.enumerable || false; 142 descriptor.configurable = true; 143 if ("value" in descriptor) descriptor.writable = true; 144 Object.defineProperty(target, descriptor.key, descriptor); 145 } 146 } 147 148 function _createClass(Constructor, protoProps, staticProps) { 149 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 150 if (staticProps) _defineProperties(Constructor, staticProps); 151 return Constructor; 152 } 153 154 /***/ }), 155 156 /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": 157 /*!*******************************************************************!*\ 158 !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! 159 \*******************************************************************/ 160 /*! exports provided: default */ 161 /***/ (function(module, __webpack_exports__, __webpack_require__) { 162 163 "use strict"; 164 __webpack_require__.r(__webpack_exports__); 165 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; }); 166 function _defineProperty(obj, key, value) { 167 if (key in obj) { 168 Object.defineProperty(obj, key, { 169 value: value, 170 enumerable: true, 171 configurable: true, 172 writable: true 173 }); 174 } else { 175 obj[key] = value; 176 } 177 178 return obj; 179 } 180 181 /***/ }), 182 183 /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": 184 /*!************************************************************!*\ 185 !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! 186 \************************************************************/ 187 /*! exports provided: default */ 188 /***/ (function(module, __webpack_exports__, __webpack_require__) { 189 190 "use strict"; 191 __webpack_require__.r(__webpack_exports__); 192 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _extends; }); 193 function _extends() { 194 _extends = Object.assign || function (target) { 195 for (var i = 1; i < arguments.length; i++) { 196 var source = arguments[i]; 197 198 for (var key in source) { 199 if (Object.prototype.hasOwnProperty.call(source, key)) { 200 target[key] = source[key]; 201 } 202 } 203 } 204 205 return target; 206 }; 207 208 return _extends.apply(this, arguments); 209 } 210 211 /***/ }), 212 213 /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": 214 /*!*******************************************************************!*\ 215 !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! 216 \*******************************************************************/ 217 /*! exports provided: default */ 218 /***/ (function(module, __webpack_exports__, __webpack_require__) { 219 220 "use strict"; 221 __webpack_require__.r(__webpack_exports__); 222 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getPrototypeOf; }); 223 function _getPrototypeOf(o) { 224 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 225 return o.__proto__ || Object.getPrototypeOf(o); 226 }; 227 return _getPrototypeOf(o); 228 } 229 230 /***/ }), 231 232 /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": 233 /*!*************************************************************!*\ 234 !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! 235 \*************************************************************/ 236 /*! exports provided: default */ 237 /***/ (function(module, __webpack_exports__, __webpack_require__) { 238 239 "use strict"; 240 __webpack_require__.r(__webpack_exports__); 241 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; }); 242 /* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); 243 244 function _inherits(subClass, superClass) { 245 if (typeof superClass !== "function" && superClass !== null) { 246 throw new TypeError("Super expression must either be null or a function"); 247 } 248 249 subClass.prototype = Object.create(superClass && superClass.prototype, { 250 constructor: { 251 value: subClass, 252 writable: true, 253 configurable: true 254 } 255 }); 256 if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); 257 } 258 259 /***/ }), 260 261 /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js": 262 /*!*****************************************************************!*\ 263 !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! 264 \*****************************************************************/ 265 /*! exports provided: default */ 266 /***/ (function(module, __webpack_exports__, __webpack_require__) { 267 268 "use strict"; 269 __webpack_require__.r(__webpack_exports__); 270 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread; }); 271 /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); 272 273 function _objectSpread(target) { 274 for (var i = 1; i < arguments.length; i++) { 275 var source = arguments[i] != null ? arguments[i] : {}; 276 var ownKeys = Object.keys(source); 277 278 if (typeof Object.getOwnPropertySymbols === 'function') { 279 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { 280 return Object.getOwnPropertyDescriptor(source, sym).enumerable; 281 })); 282 } 283 284 ownKeys.forEach(function (key) { 285 Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); 286 }); 287 } 288 289 return target; 290 } 291 292 /***/ }), 293 294 /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": 295 /*!******************************************************************************!*\ 296 !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! 297 \******************************************************************************/ 298 /*! exports provided: default */ 299 /***/ (function(module, __webpack_exports__, __webpack_require__) { 300 301 "use strict"; 302 __webpack_require__.r(__webpack_exports__); 303 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; }); 304 /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); 305 /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); 306 307 308 function _possibleConstructorReturn(self, call) { 309 if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { 310 return call; 311 } 312 313 return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(self); 314 } 315 316 /***/ }), 317 318 /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": 319 /*!*******************************************************************!*\ 320 !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! 321 \*******************************************************************/ 322 /*! exports provided: default */ 323 /***/ (function(module, __webpack_exports__, __webpack_require__) { 324 325 "use strict"; 326 __webpack_require__.r(__webpack_exports__); 327 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _setPrototypeOf; }); 328 function _setPrototypeOf(o, p) { 329 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { 330 o.__proto__ = p; 331 return o; 332 }; 333 334 return _setPrototypeOf(o, p); 335 } 336 337 /***/ }), 338 339 /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": 340 /*!***********************************************************!*\ 341 !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! 342 \***********************************************************/ 343 /*! exports provided: default */ 344 /***/ (function(module, __webpack_exports__, __webpack_require__) { 345 346 "use strict"; 347 __webpack_require__.r(__webpack_exports__); 348 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; }); 349 function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } 350 351 function _typeof(obj) { 352 if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { 353 _typeof = function _typeof(obj) { 354 return _typeof2(obj); 355 }; 356 } else { 357 _typeof = function _typeof(obj) { 358 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); 359 }; 360 } 361 362 return _typeof(obj); 363 } 364 365 /***/ }), 366 367 /***/ "./node_modules/@wordpress/plugins/build-module/api/index.js": 368 /*!*******************************************************************!*\ 369 !*** ./node_modules/@wordpress/plugins/build-module/api/index.js ***! 370 \*******************************************************************/ 371 /*! exports provided: registerPlugin, unregisterPlugin, getPlugin, getPlugins */ 372 /***/ (function(module, __webpack_exports__, __webpack_require__) { 373 374 "use strict"; 375 __webpack_require__.r(__webpack_exports__); 376 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return registerPlugin; }); 377 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return unregisterPlugin; }); 378 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlugin", function() { return getPlugin; }); 379 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlugins", function() { return getPlugins; }); 380 /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); 381 /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); 382 /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); 383 /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); 384 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); 385 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); 386 387 388 389 /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */ 390 391 /** 392 * WordPress dependencies 393 */ 394 395 /** 396 * External dependencies 397 */ 398 399 400 /** 401 * Plugin definitions keyed by plugin name. 402 * 403 * @type {Object.<string,WPPlugin>} 404 */ 405 406 var plugins = {}; 407 /** 408 * Registers a plugin to the editor. 409 * 410 * @param {string} name The name of the plugin. 411 * @param {Object} settings The settings for this plugin. 412 * @param {Function} settings.render The function that renders the plugin. 413 * @param {string|WPElement|Function} settings.icon An icon to be shown in the UI. 414 * 415 * @return {Object} The final plugin settings object. 416 */ 417 418 function registerPlugin(name, settings) { 419 if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__["default"])(settings) !== 'object') { 420 console.error('No settings object provided!'); 421 return null; 422 } 423 424 if (typeof name !== 'string') { 425 console.error('Plugin names must be strings.'); 426 return null; 427 } 428 429 if (!/^[a-z][a-z0-9-]*$/.test(name)) { 430 console.error('Plugin names must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'); 431 return null; 432 } 433 434 if (plugins[name]) { 435 console.error("Plugin \"".concat(name, "\" is already registered.")); 436 } 437 438 settings = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__["applyFilters"])('plugins.registerPlugin', settings, name); 439 440 if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(settings.render)) { 441 console.error('The "render" property must be specified and must be a valid function.'); 442 return null; 443 } 444 445 plugins[name] = Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({ 446 name: name, 447 icon: 'admin-plugins' 448 }, settings); 449 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__["doAction"])('plugins.pluginRegistered', settings, name); 450 return settings; 451 } 452 /** 453 * Unregisters a plugin by name. 454 * 455 * @param {string} name Plugin name. 456 * 457 * @return {?WPPlugin} The previous plugin settings object, if it has been 458 * successfully unregistered; otherwise `undefined`. 459 */ 460 461 function unregisterPlugin(name) { 462 if (!plugins[name]) { 463 console.error('Plugin "' + name + '" is not registered.'); 464 return; 465 } 466 467 var oldPlugin = plugins[name]; 468 delete plugins[name]; 469 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__["doAction"])('plugins.pluginUnregistered', oldPlugin, name); 470 return oldPlugin; 471 } 472 /** 473 * Returns a registered plugin settings. 474 * 475 * @param {string} name Plugin name. 476 * 477 * @return {?Object} Plugin setting. 478 */ 479 480 function getPlugin(name) { 481 return plugins[name]; 482 } 483 /** 484 * Returns all registered plugins. 485 * 486 * @return {Array} Plugin settings. 487 */ 488 489 function getPlugins() { 490 return Object.values(plugins); 491 } 492 493 494 /***/ }), 495 496 /***/ "./node_modules/@wordpress/plugins/build-module/components/index.js": 497 /*!**************************************************************************!*\ 498 !*** ./node_modules/@wordpress/plugins/build-module/components/index.js ***! 499 \**************************************************************************/ 500 /*! exports provided: PluginArea, withPluginContext */ 501 /***/ (function(module, __webpack_exports__, __webpack_require__) { 502 503 "use strict"; 504 __webpack_require__.r(__webpack_exports__); 505 /* harmony import */ var _plugin_area__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./plugin-area */ "./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js"); 506 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginArea", function() { return _plugin_area__WEBPACK_IMPORTED_MODULE_0__["default"]; }); 507 508 /* harmony import */ var _plugin_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./plugin-context */ "./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js"); 509 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return _plugin_context__WEBPACK_IMPORTED_MODULE_1__["withPluginContext"]; }); 510 511 512 513 514 515 /***/ }), 516 517 /***/ "./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js": 518 /*!**************************************************************************************!*\ 519 !*** ./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js ***! 520 \**************************************************************************************/ 521 /*! exports provided: default */ 522 /***/ (function(module, __webpack_exports__, __webpack_require__) { 523 524 "use strict"; 525 __webpack_require__.r(__webpack_exports__); 526 /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); 527 /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); 528 /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); 529 /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); 530 /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); 531 /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); 532 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 533 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__); 534 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash */ "lodash"); 535 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_7__); 536 /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); 537 /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); 538 /* harmony import */ var _plugin_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../plugin-context */ "./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js"); 539 /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../api */ "./node_modules/@wordpress/plugins/build-module/api/index.js"); 540 541 542 543 544 545 546 547 548 /** 549 * External dependencies 550 */ 551 552 /** 553 * WordPress dependencies 554 */ 555 556 557 558 /** 559 * Internal dependencies 560 */ 561 562 563 564 /** 565 * A component that renders all plugin fills in a hidden div. 566 * 567 * @return {WPElement} Plugin area. 568 */ 569 570 var PluginArea = 571 /*#__PURE__*/ 572 function (_Component) { 573 Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(PluginArea, _Component); 574 575 function PluginArea() { 576 var _this; 577 578 Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, PluginArea); 579 580 _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(PluginArea).apply(this, arguments)); 581 _this.setPlugins = _this.setPlugins.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this))); 582 _this.state = _this.getCurrentPluginsState(); 583 return _this; 584 } 585 586 Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(PluginArea, [{ 587 key: "getCurrentPluginsState", 588 value: function getCurrentPluginsState() { 589 return { 590 plugins: Object(lodash__WEBPACK_IMPORTED_MODULE_7__["map"])(Object(_api__WEBPACK_IMPORTED_MODULE_10__["getPlugins"])(), function (_ref) { 591 var icon = _ref.icon, 592 name = _ref.name, 593 render = _ref.render; 594 return { 595 Plugin: render, 596 context: { 597 name: name, 598 icon: icon 599 } 600 }; 601 }) 602 }; 603 } 604 }, { 605 key: "componentDidMount", 606 value: function componentDidMount() { 607 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__["addAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered', this.setPlugins); 608 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__["addAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered', this.setPlugins); 609 } 610 }, { 611 key: "componentWillUnmount", 612 value: function componentWillUnmount() { 613 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__["removeAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered'); 614 Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__["removeAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered'); 615 } 616 }, { 617 key: "setPlugins", 618 value: function setPlugins() { 619 this.setState(this.getCurrentPluginsState); 620 } 621 }, { 622 key: "render", 623 value: function render() { 624 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", { 625 style: { 626 display: 'none' 627 } 628 }, Object(lodash__WEBPACK_IMPORTED_MODULE_7__["map"])(this.state.plugins, function (_ref2) { 629 var context = _ref2.context, 630 Plugin = _ref2.Plugin; 631 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_plugin_context__WEBPACK_IMPORTED_MODULE_9__["PluginContextProvider"], { 632 key: context.name, 633 value: context 634 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(Plugin, null)); 635 })); 636 } 637 }]); 638 639 return PluginArea; 640 }(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]); 641 642 /* harmony default export */ __webpack_exports__["default"] = (PluginArea); 643 644 645 /***/ }), 646 647 /***/ "./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js": 648 /*!*****************************************************************************************!*\ 649 !*** ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js ***! 650 \*****************************************************************************************/ 651 /*! exports provided: PluginContextProvider, withPluginContext */ 652 /***/ (function(module, __webpack_exports__, __webpack_require__) { 653 654 "use strict"; 655 __webpack_require__.r(__webpack_exports__); 656 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PluginContextProvider", function() { return Provider; }); 657 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return withPluginContext; }); 658 /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); 659 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 660 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); 661 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); 662 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); 663 664 665 666 /** 667 * WordPress dependencies 668 */ 669 670 671 672 var _createContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createContext"])({ 673 name: null, 674 icon: null 675 }), 676 Consumer = _createContext.Consumer, 677 Provider = _createContext.Provider; 678 679 680 /** 681 * A Higher Order Component used to inject Plugin context to the 682 * wrapped component. 683 * 684 * @param {Function} mapContextToProps Function called on every context change, 685 * expected to return object of props to 686 * merge with the component's own props. 687 * 688 * @return {Component} Enhanced component with injected context as props. 689 */ 690 691 var withPluginContext = function withPluginContext(mapContextToProps) { 692 return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["createHigherOrderComponent"])(function (OriginalComponent) { 693 return function (props) { 694 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(Consumer, null, function (context) { 695 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(OriginalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, mapContextToProps(context, props))); 696 }); 697 }; 698 }, 'withPluginContext'); 699 }; 700 701 702 /***/ }), 703 704 /***/ "./node_modules/@wordpress/plugins/build-module/index.js": 705 /*!***************************************************************!*\ 706 !*** ./node_modules/@wordpress/plugins/build-module/index.js ***! 707 \***************************************************************/ 708 /*! exports provided: PluginArea, withPluginContext, registerPlugin, unregisterPlugin, getPlugin, getPlugins */ 709 /***/ (function(module, __webpack_exports__, __webpack_require__) { 710 711 "use strict"; 712 __webpack_require__.r(__webpack_exports__); 713 /* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components */ "./node_modules/@wordpress/plugins/build-module/components/index.js"); 714 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PluginArea", function() { return _components__WEBPACK_IMPORTED_MODULE_0__["PluginArea"]; }); 715 716 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return _components__WEBPACK_IMPORTED_MODULE_0__["withPluginContext"]; }); 717 718 /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./api */ "./node_modules/@wordpress/plugins/build-module/api/index.js"); 719 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["registerPlugin"]; }); 720 721 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["unregisterPlugin"]; }); 722 723 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPlugin", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["getPlugin"]; }); 724 725 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getPlugins", function() { return _api__WEBPACK_IMPORTED_MODULE_1__["getPlugins"]; }); 726 727 728 729 730 731 /***/ }), 732 733 /***/ "@wordpress/compose": 734 /*!******************************************!*\ 735 !*** external {"this":["wp","compose"]} ***! 736 \******************************************/ 737 /*! no static exports found */ 738 /***/ (function(module, exports) { 739 740 (function() { module.exports = this["wp"]["compose"]; }()); 741 742 /***/ }), 743 744 /***/ "@wordpress/element": 745 /*!******************************************!*\ 746 !*** external {"this":["wp","element"]} ***! 747 \******************************************/ 748 /*! no static exports found */ 749 /***/ (function(module, exports) { 750 751 (function() { module.exports = this["wp"]["element"]; }()); 752 753 /***/ }), 754 755 /***/ "@wordpress/hooks": 756 /*!****************************************!*\ 757 !*** external {"this":["wp","hooks"]} ***! 758 \****************************************/ 759 /*! no static exports found */ 760 /***/ (function(module, exports) { 761 762 (function() { module.exports = this["wp"]["hooks"]; }()); 763 764 /***/ }), 765 766 /***/ "lodash": 767 /*!*************************!*\ 768 !*** external "lodash" ***! 769 \*************************/ 770 /*! no static exports found */ 771 /***/ (function(module, exports) { 772 773 (function() { module.exports = this["lodash"]; }()); 774 775 /***/ }) 776 777 /******/ }); 778 //# sourceMappingURL=plugins.js.map
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Jan 7 01:00:05 2019 | Cross-referenced by PHPXref 0.7.1 |