File manager - Edit - /home/matthif/www/wp-content/plugins/advanced-gutenberg/assets/blocks/editor.js.map
Back
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/editor.jsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","domReady","advgb_blocks_vars","blocks","active_blocks","length","gutenberg_init_function","window","_wpLoadBlockEditor","then","original_settings","allowedBlockTypes","list_blocks","granted_blocks","missing_block","getBlockTypes","savedBlocks","values","inactive_blocks","block","blockItemIcon","blockItem","icon","src","title","category","parent","savedIcon","undefined","foreground","iconColor","element","renderToString","createElement","replace","components","Dashicon","push","indexOf","console","error","log","setTimeout","data","dispatch","updateEditorSettings","list_categories","getCategories","jQuery","ajax","url","ajaxurl","method","action","blocksList","JSON","stringify","categoriesList","nonce","success","e"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,K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C,EAAYE,gBAAgBoB,QAAQnC,EAAOgB,GAAO5C,OAAS,IAIlEsC,EAAewB,KAAKlC,EAAOgB,GAAO5C,MAClCuC,GAAgB,GAIxB,GAAIA,EAAe,MACCc,IAAZW,cAA2CX,IAAlBW,QAAQC,OAEjCD,QAAQE,IAAI,kDAMhBC,YAAY,WACR1C,GAAG2C,KAAKC,SAAS,eAAeC,qBAAqB,CACjDlC,kBAAmBE,MAExB,KAEH,IAAIiC,EAAkB9C,GAAGG,OAAO4C,gBAEhC,IAEIC,OAAOC,KAAK,CACRC,IAAKhD,kBAAkBiD,QACvBC,OAAQ,OACRT,KAAM,CACFU,OAAQ,2BACRC,WAAYC,KAAKC,UAAU5C,GAC3B6C,eAAgBF,KAAKC,UAAUV,GAC/BY,MAAOxD,kBAAkBwD,OAE7BC,QAAS,SAAUhB,OAIzB,MAAOiB","file":"editor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","if (typeof wp !== 'undefined' && typeof wp.domReady !== 'undefined'){\n wp.domReady(()=>{\n\n if(advgb_blocks_vars.blocks.active_blocks === 'undefined' || advgb_blocks_vars.blocks.active_blocks.length === 0) {\n // No Block Access defined for this role, so we stop the process here\n return;\n }\n\n let gutenberg_init_function = null;\n if (typeof window._wpLoadBlockEditor !== 'undefined') {\n gutenberg_init_function = window._wpLoadBlockEditor;\n }\n\n if (gutenberg_init_function !== null) {\n // Wait for Gutenberg editor to be ready\n gutenberg_init_function.then(() => {\n if (advgb_blocks_vars.original_settings.allowedBlockTypes !== true) {\n // allowed_block_types filter has been used, in this case we do nothing as we don't know why blocks have been filtered\n return;\n }\n\n let list_blocks = [];\n let granted_blocks = [];\n let missing_block = false;\n // Retrieve all registered blocks\n let blocks = wp.blocks.getBlockTypes();\n const savedBlocks = {\n active_blocks: Object.values(advgb_blocks_vars.blocks.active_blocks),\n inactive_blocks: Object.values(advgb_blocks_vars.blocks.inactive_blocks),\n };\n\n for (let block in blocks) {\n var blockItemIcon = '';\n var blockItem = {\n name: blocks[block].name,\n icon: blocks[block].icon.src,\n title: blocks[block].title,\n category: blocks[block].category,\n parent: blocks[block].parent\n };\n\n var savedIcon = !!blocks[block].icon.src ? blocks[block].icon.src : blocks[block].icon;\n\n if (blocks[block].icon.foreground !== undefined) blockItem.iconColor = blocks[block].icon.foreground;\n\n if (typeof savedIcon === 'function') {\n if(typeof savedIcon.prototype !== 'undefined') {\n blockItem.icon = wp.element.renderToString(wp.element.createElement(savedIcon));\n blockItem.icon = blockItem.icon.replace(/stopcolor/g, 'stop-color');\n blockItem.icon = blockItem.icon.replace(/stopopacity/g, 'stop-opacity');\n } else {\n blockItemIcon = wp.element.createElement(wp.components.Dashicon, {icon: 'block-default'});\n blockItem.icon = wp.element.renderToString(blockItemIcon);\n }\n } else if (typeof savedIcon === 'object') {\n blockItem.icon = wp.element.renderToString(savedIcon);\n blockItem.icon = blockItem.icon.replace(/stopcolor/g, 'stop-color');\n blockItem.icon = blockItem.icon.replace(/stopopacity/g, 'stop-opacity');\n } else if (typeof savedIcon === 'string') {\n blockItemIcon = wp.element.createElement(wp.components.Dashicon, {icon: savedIcon});\n blockItem.icon = wp.element.renderToString(blockItemIcon);\n }\n list_blocks.push(blockItem);\n\n\n // Compare current block with the list of blocks we have\n if (savedBlocks.active_blocks.indexOf(blocks[block].name) >= 0) {\n // Block is active\n granted_blocks.push(blocks[block].name);\n } else if (savedBlocks.inactive_blocks.indexOf(blocks[block].name) >= 0) {\n // Block is inactive\n } else {\n // This block is not in our database yet, but by default we allow the usage\n granted_blocks.push(blocks[block].name);\n missing_block = true;\n }\n }\n\n if (missing_block) {\n if (console !== undefined && console.error !== undefined) {\n // Let's output as log instead of error\n console.log('Reloading editor by PublishPress Blocks plugin');\n }\n\n /* It seems the best approach to update editor settings, however is overriden\n * https://github.com/WordPress/gutenberg/issues/15993#issuecomment-1487007071\n * We're adding 3 seconds delay to bypass the override */\n setTimeout( function() {\n wp.data.dispatch('core/editor').updateEditorSettings({\n allowedBlockTypes: granted_blocks\n });\n }, 3000 );\n\n var list_categories = wp.blocks.getCategories();\n\n try {\n // Use this ajax query to update the block list in db\n jQuery.ajax({\n url: advgb_blocks_vars.ajaxurl,\n method: 'POST',\n data: {\n action: 'advgb_update_blocks_list',\n blocksList: JSON.stringify(list_blocks),\n categoriesList: JSON.stringify(list_categories),\n nonce: advgb_blocks_vars.nonce\n },\n success: function (data) {\n //console.log(data);\n }\n });\n } catch (e) {\n //console.log(e);\n }\n }\n });\n }\n });\n\n}\n"],"sourceRoot":""}
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings