Browse Source

Init commit

master
Amir Reza Mehrbakhsh 2 years ago
commit
6ce97a6577
12 changed files with 27422 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +68
    -0
      Planist.php
  3. +24
    -0
      assets/css/block-style.css
  4. +25
    -0
      assets/images/planist-full.svg
  5. +1
    -0
      assets/planist-block/build/index.asset.php
  6. +273
    -0
      assets/planist-block/build/index.js
  7. +1
    -0
      assets/planist-block/build/index.js.map
  8. +26863
    -0
      assets/planist-block/package-lock.json
  9. +24
    -0
      assets/planist-block/package.json
  10. +5
    -0
      assets/planist-block/src/icons.js
  11. +84
    -0
      assets/planist-block/src/index.js
  12. +53
    -0
      readme.txt

+ 1
- 0
.gitignore View File

@ -0,0 +1 @@
./idea

+ 68
- 0
Planist.php View File

@ -0,0 +1,68 @@
<?php
/**
* Plugin Name: Planist
* Plugin URI: https://planist.live
* Description: Planist Shortcode and Block
* Version: 1.0
* Author: Parsa Kafi
* Author URI: https://parsa.ws
*/
class Planist
{
function __construct()
{
add_shortcode('planist', [$this, 'shortcode']);
add_action('enqueue_block_editor_assets', [$this, 'gutenbergBlocks']);
}
function gutenbergBlocks()
{
wp_enqueue_style(
'planist-block-style',
plugins_url('/assets/css/block-style.css', __FILE__),
array(),
'1.0'
);
$assetFile = include(dirname(__FILE__) . '/assets/planist-block/build/index.asset.php');
wp_enqueue_script(
'planist-block-editor',
plugins_url('assets/planist-block/build/index.js', __FILE__),
$assetFile['dependencies'],
$assetFile['version']
);
$data = array();
wp_localize_script('planist-block-editor', 'planist', $data);
}
function shortcode($atts)
{
$atts = shortcode_atts(array(
'username' => '',
'duration' => ''
), $atts, 'planist');
if (empty($atts['username']))
return '';
return $this->iframe($atts['username'], $atts['duration']);
}
private function iframe($username, $duration)
{
$url = 'https://app.planist.fr/' . $username;
if (!empty($duration))
$url .= '/' . $duration;
$style = 'border: none;min-height: 500px;width: 100%;';
$style = apply_filters('planist_iframe_style', $style, $username, $duration);
return '<iframe src="' . $url . '" title="' . ucwords($username) . ' Booking Page" width="100%" height="100%" style="' . $style . '"></iframe>';
}
}
new Planist();

+ 24
- 0
assets/css/block-style.css View File

@ -0,0 +1,24 @@
.planist-block {
direction: ltr;
text-align: left;
background-color: #fff;
border: 2px solid #000;
color: #555;
border-radius: 10px;
padding: 15px;
cursor: default;
font-size: 25px;
font-weight: bold;
line-height: 1;
}
.planist-block div {
display: flex;
align-items: center;
flex-direction: row;
}
.planist-block svg {
max-width: 100px;
margin-right: 20px;
}

+ 25
- 0
assets/images/planist-full.svg View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1120.2 281.9" style="enable-background:new 0 0 1120.2 281.9;" xml:space="preserve">
<style type="text/css">
.st0{fill:#002395;}
.st1{fill:#00235A;}
.st2{fill:#DE2029;}
.st3{fill:#ED2939;}
</style>
<rect x="226.2" y="19.3" width="60.8" height="262.5"/>
<path d="M414.8,88.4c-53.4,0-96.7,43.3-96.7,96.7s43.3,96.7,96.7,96.7s96.7-43.3,96.7-96.7c0,0,0,0,0,0 C511.5,131.7,468.3,88.4,414.8,88.4z M414.8,221.1c-19.8,0-35.9-16.1-35.9-35.9c0-19.8,16.1-35.9,35.9-35.9 c19.8,0,35.9,16.1,35.9,35.9c0,0,0,0,0,0C450.7,205,434.7,221,414.8,221.1z"/>
<path class="st0" d="M456.1,272.6v9.1h55.3v-90.6C509.2,226.4,488,257.6,456.1,272.6z"/>
<path class="st1" d="M456.1,272.6c31.9-15.1,53.1-46.3,55.3-81.5V185h-55.3V272.6z"/>
<path d="M634.9,88.4L634.9,88.4c-50.9,0-92.2,41.3-92.2,92.2v101.2h55.3v-98.1c0-20.4,16.6-37,37-37s37,16.6,37,37v98.1h55.3V180.7 C727.2,129.7,685.9,88.4,634.9,88.4C634.9,88.4,634.9,88.4,634.9,88.4z"/>
<rect x="758.2" y="88.5" width="60.8" height="193.3"/>
<circle class="st2" cx="788.6" cy="30.4" r="30.4"/>
<rect y="137.1" width="60.8" height="144.8"/>
<path d="M105.9,19.3H0v60.8h105.9c15.7,0.3,28.2,13.3,27.9,29c-0.3,15.3-12.6,27.6-27.9,27.9H0v60.8h105.9c49.3,0,89.2-40,89.2-89.2 l0,0C195.1,59.3,155.2,19.3,105.9,19.3z"/>
<rect y="137.1" class="st3" width="60.8" height="60.8"/>
<rect y="19.3" class="st0" width="60.8" height="60.8"/>
<rect x="1041.9" y="96.1" class="st0" width="60.8" height="41.4"/>
<path d="M1094.6,229.4h-0.3c-12.6-1.1-22-12-22-24.6V159l0.2-0.2h-0.2V47h-60.8v173.3l0,0c0,34,27.5,61.5,61.5,61.5 c18.2,0,35.5-8.1,47.2-22L1094.6,229.4z"/>
<rect x="1011.5" y="96.1" class="st1" width="60.8" height="41.4"/>
<path d="M899.6,209.4c25.4,3.4,30.1,15.7,30.7,21.6c0.3,3.3-1.5,6.4-4.5,7.8c-18.6,9.2-48.9-15.2-48.9-15.2l-26.8,39 c0,0,67,39.1,109.2,5.9c16.5-13,24.6-34.6,19.5-55c-6.9-27.8-47.9-41.3-47.9-41.3c-24.9-6.2-30.1-15.7-30.7-21.6 c-0.3-3.3,1.5-6.4,4.4-7.8c18.6-9.2,48.9,15.2,48.9,15.2l26.8-39c0,0-67-39.1-109.2-5.9c-16.5,13-24.7,34.6-19.5,55 C851.7,168.1,857.5,203.8,899.6,209.4z"/>
</svg>

+ 1
- 0
assets/planist-block/build/index.asset.php View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element'), 'version' => 'fb0652384638c8e38554');

+ 273
- 0
assets/planist-block/build/index.js View File

@ -0,0 +1,273 @@
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/icons.js":
/*!**********************!*\
!*** ./src/icons.js ***!
\**********************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__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__);
const icons = {};
icons.planist = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
version: "1.1",
id: "prefix__Layer_1",
xmlns: "http://www.w3.org/2000/svg",
x: "0",
y: "0",
viewBox: "0 0 1120.2 281.9",
"enable-background": "new 0 0 1120.2 281.9"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M226.2 19.3H287V281.8H226.2z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M414.8 88.4a96.7 96.7 0 1 0 96.7 96.7 96.6 96.6 0 0 0-96.7-96.7zm0 132.7a36 36 0 1 1 35.9-35.9 36 36 0 0 1-35.9 35.9z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "prefix__st0",
d: "M456.1 272.6v9.1h55.3v-90.6a96.6 96.6 0 0 1-55.3 81.5z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "prefix__st1",
d: "M456.1 272.6a96.9 96.9 0 0 0 55.3-81.5V185h-55.3v87.6z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M634.9 88.4a92.2 92.2 0 0 0-92.2 92.2v101.2H598v-98.1a37 37 0 0 1 74 0v98.1h55.3V180.7a92.4 92.4 0 0 0-92.4-92.3z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M758.2 88.5H819V281.8H758.2z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", {
cx: "788.6",
cy: "30.4",
r: "30.4",
fill: "#de2029"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M0 137.1H60.8V281.9H0z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M105.9 19.3H0v60.8h105.9a28.5 28.5 0 0 1 0 56.9H0v60.8h105.9a89.2 89.2 0 0 0 0-178.5z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
fill: "#ed2939",
d: "M0 137.1H60.8V197.9H0z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "prefix__st0",
d: "M0 19.3H60.8V80.1H0z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "prefix__st0",
d: "M1041.9 96.1H1102.7V137.5H1041.9z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M1094.6 229.4h-.3c-12.6-1.1-22-12-22-24.6V159l.2-.2h-.2V47h-60.8v173.3a61.5 61.5 0 0 0 108.7 39.5l-25.6-30.4z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
class: "prefix__st1",
d: "M1011.5 96.1H1072.3V137.5H1011.5z"
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
d: "M899.6 209.4c25.4 3.4 30.1 15.7 30.7 21.6a7.8 7.8 0 0 1-4.5 7.8c-18.6 9.2-48.9-15.2-48.9-15.2l-26.8 39s67 39.1 109.2 5.9a54 54 0 0 0 19.5-55c-6.9-27.8-47.9-41.3-47.9-41.3-24.9-6.2-30.1-15.7-30.7-21.6a7.9 7.9 0 0 1 4.4-7.8c18.6-9.2 48.9 15.2 48.9 15.2l26.8-39s-67-39.1-109.2-5.9a53.8 53.8 0 0 0-19.5 55c.1 0 5.9 35.7 48 41.3z"
}));
/* harmony default export */ __webpack_exports__["default"] = (icons);
/***/ }),
/***/ "@wordpress/block-editor":
/*!*************************************!*\
!*** external ["wp","blockEditor"] ***!
\*************************************/
/***/ (function(module) {
module.exports = window["wp"]["blockEditor"];
/***/ }),
/***/ "@wordpress/blocks":
/*!********************************!*\
!*** external ["wp","blocks"] ***!
\********************************/
/***/ (function(module) {
module.exports = window["wp"]["blocks"];
/***/ }),
/***/ "@wordpress/components":
/*!************************************!*\
!*** external ["wp","components"] ***!
\************************************/
/***/ (function(module) {
module.exports = window["wp"]["components"];
/***/ }),
/***/ "@wordpress/element":
/*!*********************************!*\
!*** external ["wp","element"] ***!
\*********************************/
/***/ (function(module) {
module.exports = window["wp"]["element"];
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // 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 });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
__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_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons */ "./src/icons.js");
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('planist-gutenberg/planist-block', {
title: 'Planist',
icon: _icons__WEBPACK_IMPORTED_MODULE_4__["default"].planist,
category: 'widgets',
keyword: ['planist', 'event', 'schedule', 'calender'],
attributes: {
username: {
type: 'string',
default: ''
},
duration: {
type: 'string',
default: '30m'
}
},
example: {
attributes: {
username: 'mohsen',
duration: '45m'
}
},
edit: props => {
const {
className,
attributes: {
username,
duration
},
setAttributes
} = props;
const onChangeUsername = value => {
setAttributes({
username: value
});
};
const onChangeDuration = value => {
setAttributes({
duration: value
});
};
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, {
key: "setting"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: className,
style: {
padding: '10px'
}
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, {
label: "Username",
value: username,
onChange: onChangeUsername
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, {
label: "Duration",
value: duration,
onChange: onChangeDuration
}))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "planist-block"
}, username ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, _icons__WEBPACK_IMPORTED_MODULE_4__["default"].planist, "/", username, duration ? '/' + duration : '') : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, _icons__WEBPACK_IMPORTED_MODULE_4__["default"].planist, " Set username and duration")));
},
save: props => {
const {
className,
attributes: {
username,
duration
}
} = props;
return `[planist username="${username}" duration="${duration}"]`;
}
});
}();
/******/ })()
;
//# sourceMappingURL=index.js.map

+ 1
- 0
assets/planist-block/build/index.js.map
File diff suppressed because it is too large
View File


+ 26863
- 0
assets/planist-block/package-lock.json
File diff suppressed because it is too large
View File


+ 24
- 0
assets/planist-block/package.json View File

@ -0,0 +1,24 @@
{
"name": "planist-block",
"version": "1.0.0",
"private": true,
"description": "Planist Block",
"author": "Parsa Kafi",
"license": "",
"keywords": [
"question",
"answer"
],
"homepage": "https://planist.fr",
"main": "build/index.js",
"devDependencies": {
"@wordpress/scripts": "^24.6.0"
},
"scripts": {
"build": "wp-scripts build",
"format:js": "wp-scripts format",
"lint:js": "wp-scripts lint-js",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start"
}
}

+ 5
- 0
assets/planist-block/src/icons.js View File

@ -0,0 +1,5 @@
const icons = {};
icons.planist = <svg version="1.1" id="prefix__Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 1120.2 281.9" enable-background="new 0 0 1120.2 281.9"><path d="M226.2 19.3H287V281.8H226.2z"/><path d="M414.8 88.4a96.7 96.7 0 1 0 96.7 96.7 96.6 96.6 0 0 0-96.7-96.7zm0 132.7a36 36 0 1 1 35.9-35.9 36 36 0 0 1-35.9 35.9z"/><path class="prefix__st0" d="M456.1 272.6v9.1h55.3v-90.6a96.6 96.6 0 0 1-55.3 81.5z"/><path class="prefix__st1" d="M456.1 272.6a96.9 96.9 0 0 0 55.3-81.5V185h-55.3v87.6z"/><path d="M634.9 88.4a92.2 92.2 0 0 0-92.2 92.2v101.2H598v-98.1a37 37 0 0 1 74 0v98.1h55.3V180.7a92.4 92.4 0 0 0-92.4-92.3z"/><path d="M758.2 88.5H819V281.8H758.2z"/><circle cx="788.6" cy="30.4" r="30.4" fill="#de2029"/><path d="M0 137.1H60.8V281.9H0z"/><path d="M105.9 19.3H0v60.8h105.9a28.5 28.5 0 0 1 0 56.9H0v60.8h105.9a89.2 89.2 0 0 0 0-178.5z"/><path fill="#ed2939" d="M0 137.1H60.8V197.9H0z"/><path class="prefix__st0" d="M0 19.3H60.8V80.1H0z"/><path class="prefix__st0" d="M1041.9 96.1H1102.7V137.5H1041.9z"/><path d="M1094.6 229.4h-.3c-12.6-1.1-22-12-22-24.6V159l.2-.2h-.2V47h-60.8v173.3a61.5 61.5 0 0 0 108.7 39.5l-25.6-30.4z"/><path class="prefix__st1" d="M1011.5 96.1H1072.3V137.5H1011.5z"/><path d="M899.6 209.4c25.4 3.4 30.1 15.7 30.7 21.6a7.8 7.8 0 0 1-4.5 7.8c-18.6 9.2-48.9-15.2-48.9-15.2l-26.8 39s67 39.1 109.2 5.9a54 54 0 0 0 19.5-55c-6.9-27.8-47.9-41.3-47.9-41.3-24.9-6.2-30.1-15.7-30.7-21.6a7.9 7.9 0 0 1 4.4-7.8c18.6-9.2 48.9 15.2 48.9 15.2l26.8-39s-67-39.1-109.2-5.9a53.8 53.8 0 0 0-19.5 55c.1 0 5.9 35.7 48 41.3z"/></svg>
export default icons;

+ 84
- 0
assets/planist-block/src/index.js View File

@ -0,0 +1,84 @@
import { registerBlockType } from '@wordpress/blocks';
import {
InspectorControls,
useBlockProps,
} from '@wordpress/block-editor';
import { TextControl } from '@wordpress/components';
import icons from './icons';
registerBlockType('planist-gutenberg/planist-block', {
title: 'Planist',
icon: icons.planist,
category: 'widgets',
keyword: ['planist', 'event', 'schedule', 'calender'],
attributes: {
username: {
type: 'string',
default: ''
},
duration: {
type: 'string',
default: '30m'
}
},
example: {
attributes: {
username: 'mohsen',
duration: '45m',
},
},
edit: (props) => {
const {
className,
attributes: {
username,
duration
},
setAttributes,
} = props;
const onChangeUsername = (value) => {
setAttributes({ username: value });
};
const onChangeDuration = (value) => {
setAttributes({ duration: value });
};
return (
<div {...useBlockProps()}>
<InspectorControls key="setting">
<div className={className} style={{ padding: '10px' }}>
<TextControl
label="Username"
value={username}
onChange={onChangeUsername}
/>
<TextControl
label="Duration"
value={duration}
onChange={onChangeDuration}
/>
</div>
</InspectorControls>
<div className="planist-block">
{username ? (<div>{icons.planist}/{username}{duration ? '/' + duration : ''}</div>) : (<div>{icons.planist} Set username and duration</div>)}
</div>
</div>
);
},
save: (props) => {
const {
className,
attributes: {
username,
duration
},
} = props;
return `[planist username="${username}" duration="${duration}"]`;
},
});

+ 53
- 0
readme.txt View File

@ -0,0 +1,53 @@
=== Planist ===
Contributors: amirrezam75
Tags: schedule, calendar, event
Donate link: https://pages.donately.com/theplanist/form/frm_4d6eb571422c
Requires at least: 4.6
Tested up to: 6.1.1
Requires PHP: 5.2.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Free scheduling meetings software with crypto payment gateway
== Description ==
We shorten the time to set up your meetings to be together.
The magic of Planist for freelance consultants, mentors and all content creators is that you can easily use the crypto payment gateway and earn money for your sessions.
We aren't first scheduling platform but in less than a year since the launch of the second version, we have been able to give users in more than 42 different countries a user experience that distinguishes us from other platforms in the market.
We have provided you with all the main features related to scheduling meetings, including support for unlimited simultaneous calendars, support for unlimited events, and customization of your business brand and logo for free, and this part of Planist will never go out of free mode.
= How it Works: =
- Visit [Planist](https://app.planist.fr/register) and create a new account or login to your account
- Then create an event type or edit existing one.
== Installation ==
This section describes how to install the plugin and get it working.
1. Upload the planist plugin folder to your /wp-content/plugins/ directory
2. Activate the plugin through the "Plugins" menu in WordPress
3.
== Frequently Asked Questions ==
= Why should I install this plugin? =
Set your availability and choose the type of meeting you want to have, then Planist coordinates everything with your invitees – before and after the face-to-face.
= There are a lot of other plugins for this, why should I install <em>this</em> one? =
We know that the time of independent consultants, tutors and professionals is priceless and cannot be sold. However, based on artificial intelligence algorithms, during the pricing of non-free sessions, we can offer each expert the real price of his consultation hour, so that they have a better chance of earning more.
== Screenshots ==
1. Configuration options screen
2. Login screen once configured
== Changelog ==
= 1.0.0 =
* Initial release.
== Upgrade Notice ==
= 1.0.0 =
* Initial release.

Loading…
Cancel
Save