|
@@ -0,0 +1,260 @@
|
|
|
|
+/******/ (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, { enumerable: true, get: getter });
|
|
|
|
+/******/ }
|
|
|
|
+/******/ };
|
|
|
|
+/******/
|
|
|
|
+/******/ // define __esModule on exports
|
|
|
|
+/******/ __webpack_require__.r = function(exports) {
|
|
|
|
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
|
|
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
+/******/ }
|
|
|
|
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
+/******/ };
|
|
|
|
+/******/
|
|
|
|
+/******/ // create a fake namespace object
|
|
|
|
+/******/ // mode & 1: value is a module id, require it
|
|
|
|
+/******/ // mode & 2: merge all properties of value into the ns
|
|
|
|
+/******/ // mode & 4: return value when already ns object
|
|
|
|
+/******/ // mode & 8|1: behave like require
|
|
|
|
+/******/ __webpack_require__.t = function(value, mode) {
|
|
|
|
+/******/ if(mode & 1) value = __webpack_require__(value);
|
|
|
|
+/******/ if(mode & 8) return value;
|
|
|
|
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
|
|
+/******/ var ns = Object.create(null);
|
|
|
|
+/******/ __webpack_require__.r(ns);
|
|
|
|
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
|
|
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
|
|
+/******/ return ns;
|
|
|
|
+/******/ };
|
|
|
|
+/******/
|
|
|
|
+/******/ // 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 = "./src/index.js");
|
|
|
|
+/******/ })
|
|
|
|
+/************************************************************************/
|
|
|
|
+/******/ ({
|
|
|
|
+
|
|
|
|
+/***/ "./src/index.js":
|
|
|
|
+/*!**********************!*\
|
|
|
|
+ !*** ./src/index.js ***!
|
|
|
|
+ \**********************/
|
|
|
|
+/*! no exports provided */
|
|
|
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
+
|
|
|
|
+"use strict";
|
|
|
|
+__webpack_require__.r(__webpack_exports__);
|
|
|
|
+/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
|
|
|
+/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
+/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
|
|
|
|
+/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
+/* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
|
|
|
|
+/* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
+/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
|
|
|
+/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
|
+/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
|
|
|
+/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
|
+/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
|
|
|
+/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+var PluginMetaFields = function PluginMetaFields(props) {
|
|
|
|
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], {
|
|
|
|
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])("Media URL", "textdomain"),
|
|
|
|
+ icon: "format-video",
|
|
|
|
+ intialOpen: true
|
|
|
|
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["TextControl"], {
|
|
|
|
+ value: props.text_metafield,
|
|
|
|
+ label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])("meta property og:video meta", "textdomain"),
|
|
|
|
+ help: "postmeta:media absolute url to video",
|
|
|
|
+ onChange: function onChange(value) {
|
|
|
|
+ return props.onMetaFieldChange(value);
|
|
|
|
+ }
|
|
|
|
+ })));
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+var PluginMetaFields_desc = function PluginMetaFields_desc(props) {
|
|
|
|
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], {
|
|
|
|
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])("Meta Excerpt", "textdomain"),
|
|
|
|
+ icon: "format-aside",
|
|
|
|
+ intialOpen: true
|
|
|
|
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["TextareaControl"], {
|
|
|
|
+ value: props.text_metafield_desc,
|
|
|
|
+ label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])("meta name=description", "textdomain"),
|
|
|
|
+ help: "postmeta:meta-desc alternative to post excerpt from the function dw_good_excerpt",
|
|
|
|
+ onChange: function onChange(value) {
|
|
|
|
+ return props.onMetaFieldChange_desc(value);
|
|
|
|
+ }
|
|
|
|
+ })));
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+PluginMetaFields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) {
|
|
|
|
+ return {
|
|
|
|
+ text_metafield: select('core/editor').getEditedPostAttribute('meta')['media']
|
|
|
|
+ };
|
|
|
|
+})(PluginMetaFields);
|
|
|
|
+PluginMetaFields_desc = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withSelect"])(function (select) {
|
|
|
|
+ return {
|
|
|
|
+ text_metafield_desc: select('core/editor').getEditedPostAttribute('meta')['meta_desc']
|
|
|
|
+ };
|
|
|
|
+})(PluginMetaFields_desc);
|
|
|
|
+PluginMetaFields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) {
|
|
|
|
+ return {
|
|
|
|
+ onMetaFieldChange: function onMetaFieldChange(value) {
|
|
|
|
+ dispatch('core/editor').editPost({
|
|
|
|
+ meta: {
|
|
|
|
+ media: value
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+})(PluginMetaFields);
|
|
|
|
+PluginMetaFields_desc = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__["withDispatch"])(function (dispatch) {
|
|
|
|
+ return {
|
|
|
|
+ onMetaFieldChange_desc: function onMetaFieldChange_desc(value) {
|
|
|
|
+ dispatch('core/editor').editPost({
|
|
|
|
+ meta: {
|
|
|
|
+ meta_desc: value
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+})(PluginMetaFields_desc);
|
|
|
|
+Object(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__["registerPlugin"])('dw-sidebar', {
|
|
|
|
+ icon: 'welcome-widgets-menus',
|
|
|
|
+ render: function render() {
|
|
|
|
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__["PluginSidebarMoreMenuItem"], {
|
|
|
|
+ target: "dw-sidebar"
|
|
|
|
+ }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Meta Options', 'textdomain')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__["PluginSidebar"], {
|
|
|
|
+ name: "dw-sidebar",
|
|
|
|
+ title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Post Meta', 'textdomain')
|
|
|
|
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(PluginMetaFields, null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(PluginMetaFields_desc, null)));
|
|
|
|
+ }
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/components":
|
|
|
|
+/*!*********************************************!*\
|
|
|
|
+ !*** external {"this":["wp","components"]} ***!
|
|
|
|
+ \*********************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["components"]; }());
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/data":
|
|
|
|
+/*!***************************************!*\
|
|
|
|
+ !*** external {"this":["wp","data"]} ***!
|
|
|
|
+ \***************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["data"]; }());
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/edit-post":
|
|
|
|
+/*!*******************************************!*\
|
|
|
|
+ !*** external {"this":["wp","editPost"]} ***!
|
|
|
|
+ \*******************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["editPost"]; }());
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/element":
|
|
|
|
+/*!******************************************!*\
|
|
|
|
+ !*** external {"this":["wp","element"]} ***!
|
|
|
|
+ \******************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["element"]; }());
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/i18n":
|
|
|
|
+/*!***************************************!*\
|
|
|
|
+ !*** external {"this":["wp","i18n"]} ***!
|
|
|
|
+ \***************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["i18n"]; }());
|
|
|
|
+
|
|
|
|
+/***/ }),
|
|
|
|
+
|
|
|
|
+/***/ "@wordpress/plugins":
|
|
|
|
+/*!******************************************!*\
|
|
|
|
+ !*** external {"this":["wp","plugins"]} ***!
|
|
|
|
+ \******************************************/
|
|
|
|
+/*! no static exports found */
|
|
|
|
+/***/ (function(module, exports) {
|
|
|
|
+
|
|
|
|
+(function() { module.exports = this["wp"]["plugins"]; }());
|
|
|
|
+
|
|
|
|
+/***/ })
|
|
|
|
+
|
|
|
|
+/******/ });
|
|
|
|
+//# sourceMappingURL=index.js.map
|