|
/******/ (function(modules) { // webpackBootstrap |
|
/******/ // The module cache |
|
/******/ var installedModules = {}; |
|
/******/ |
|
/******/ // The require function |
|
/******/ function __webpack_require__(moduleId) { |
|
/******/ |
|
/******/ // Check if module is in cache |
|
/******/ if(installedModules[moduleId]) { |
|
/******/ return installedModules[moduleId].exports; |
|
/******/ } |
|
/******/ // Create a new module (and put it into the cache) |
|
/******/ var module = installedModules[moduleId] = { |
|
/******/ i: moduleId, |
|
/******/ l: false, |
|
/******/ exports: {} |
|
/******/ }; |
|
/******/ |
|
/******/ // Execute the module function |
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
|
/******/ |
|
/******/ // Flag the module as loaded |
|
/******/ module.l = true; |
|
/******/ |
|
/******/ // Return the exports of the module |
|
/******/ return module.exports; |
|
/******/ } |
|
/******/ |
|
/******/ |
|
/******/ // expose the modules object (__webpack_modules__) |
|
/******/ __webpack_require__.m = modules; |
|
/******/ |
|
/******/ // expose the module cache |
|
/******/ __webpack_require__.c = installedModules; |
|
/******/ |
|
/******/ // define getter function for harmony exports |
|
/******/ __webpack_require__.d = function(exports, name, getter) { |
|
/******/ if(!__webpack_require__.o(exports, name)) { |
|
/******/ Object.defineProperty(exports, name, { |
|
/******/ configurable: false, |
|
/******/ enumerable: true, |
|
/******/ get: getter |
|
/******/ }); |
|
/******/ } |
|
/******/ }; |
|
/******/ |
|
/******/ // getDefaultExport function for compatibility with non-harmony modules |
|
/******/ __webpack_require__.n = function(module) { |
|
/******/ var getter = module && module.__esModule ? |
|
/******/ function getDefault() { return module['default']; } : |
|
/******/ function getModuleExports() { return module; }; |
|
/******/ __webpack_require__.d(getter, 'a', getter); |
|
/******/ return getter; |
|
/******/ }; |
|
/******/ |
|
/******/ // Object.prototype.hasOwnProperty.call |
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
|
/******/ |
|
/******/ // __webpack_public_path__ |
|
/******/ __webpack_require__.p = ""; |
|
/******/ |
|
/******/ // Load entry module and return exports |
|
/******/ return __webpack_require__(__webpack_require__.s = 0); |
|
/******/ }) |
|
/************************************************************************/ |
|
/******/ ([ |
|
/* 0 */ |
|
/***/ (function(module, exports) { |
|
|
|
/** |
|
* BLOCK: Basic with ESNext |
|
* |
|
* Registering a basic block with Gutenberg. |
|
* Simple block, renders and saves the same content without any interactivity. |
|
* |
|
* Using inline styles - no external stylesheet needed. Not recommended! |
|
* because all of these styles will appear in `post_content`. |
|
*/ |
|
|
|
var __ = wp.i18n.__; |
|
var registerBlockType = wp.blocks.registerBlockType; |
|
|
|
/** |
|
* Register Basic Block. |
|
* |
|
* Registers a new block provided a unique name and an object defining its |
|
* behavior. Once registered, the block is made available as an option to any |
|
* editor interface where blocks are implemented. |
|
* |
|
* @param {string} name Block name. |
|
* @param {Object} settings Block settings. |
|
* @return {?WPBlock} The block, if it has been successfully |
|
* registered; otherwise `undefined`. |
|
*/ |
|
|
|
registerBlockType('gb/02-basic-esnext', { // Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block. |
|
title: __('Basic ESNext', 'GB'), // Block title. |
|
icon: 'shield', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/. |
|
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed. |
|
|
|
// The "edit" property must be a valid function. |
|
edit: function edit(props) { |
|
// Creates a <p class='wp-block-gb-01-basic'></p>. |
|
return wp.element.createElement( |
|
'p', |
|
{ className: props.className }, |
|
'Hello World! \u2014 from the editor (02 Basic Block ESNext).' |
|
); |
|
}, |
|
|
|
// The "save" property must be specified and must be a valid function. |
|
save: function save(props) { |
|
return wp.element.createElement( |
|
'p', |
|
{ className: props.className }, |
|
'Hello World! \u2014 from the frontend (02 Basic Block ESNext).' |
|
); |
|
} |
|
}); |
|
|
|
/***/ }) |
|
/******/ ]); |