Plugin Directory

Changeset 3044104


Ignore:
Timestamp:
03/02/2024 05:52:00 PM (2 years ago)
Author:
textbuilder
Message:

Release 1.1.0

Location:
textbuilder
Files:
60 added
15 edited

Legend:

Unmodified
Added
Removed
  • textbuilder/trunk/Includes/Admin/SettingsPanel.php

    r2908705 r3044104  
    44
    55use TextBuilder\AjaxController;
     6use TextBuilder\Api\AuthorizationController;
    67
    78if (!defined('ABSPATH')) {
     
    8586    public function content()
    8687    {
     88        //BC - Remove already authorised users
     89        if ($this->isAuthorize() && $this->isApache() && !$this->isHtaccessValid()) {
     90            $authorizationController = new AuthorizationController();
     91            $authorizationController->revokeAllTokens(true);
     92        }
     93
    8794        $ajaxController = new AjaxController(); ?>
    88         <div class="textbuilder-settings"><?php
    89             if ($this->isAuthorize() || current_user_can('remove_users')) {
    90                 if (current_user_can('remove_users')) {
    91                     $users = get_users(['meta_key' => 'tb_token',]);
    92                 } elseif (!current_user_can('remove_users')) {
    93                     $user = wp_get_current_user();
    94                     $users = get_users(['meta_key' => 'tb_token', 'include' => [$user->ID],]);
    95                 }
    96                 if (!empty($users)) {
    97                     require_once 'View/TokenTable.php';
    98                 }
    99             }
    100 
    101             if (!$this->isAuthorize()) {
    102                 $authorizeUrl = $ajaxController->adminAjax(
    103                     ['tb-action' => 'api-authorize-token-adminNonce', 'tb-nonce' => $ajaxController->admin()]
    104                 );
    105             }
    106             ?>
    107 
    108             <?php if (!$this->isAuthorize() && !wp_is_site_protected_by_basic_auth('front')) : ?>
    109             <div class="tb-authorize-wrapper">
     95        <div class="textbuilder-settings">
     96        <?php
     97        if ($this->isAuthorize() || current_user_can('remove_users')) {
     98            if (current_user_can('remove_users')) {
     99                $users = get_users(['meta_key' => 'tb_token',]);
     100            } elseif (!current_user_can('remove_users')) {
     101                $user = wp_get_current_user();
     102                $users = get_users(['meta_key' => 'tb_token', 'include' => [$user->ID],]);
     103            }
     104            if (!empty($users)) {
     105                require_once 'View/TokenTable.php';
     106            }
     107        }
     108
     109        if (!$this->isAuthorize()) {
     110            $authorizeUrl = $ajaxController->adminAjax(
     111                ['tb-action' => 'api-authorize-token-adminNonce', 'tb-nonce' => $ajaxController->admin()]
     112            );
     113        }
     114        ?>
     115            <div class="tb-authorize-wrapper">
    110116                <img src="<?php echo esc_url(plugins_url(TEXTBUILDER_ROOT_DIRNAME . '/public/img/intro-menu-logo.png')); ?>">
    111                 <a href="<?php echo esc_url($authorizeUrl); ?>" class="tb-authorize-button">
     117                <div class="tb-content-wrapper">
     118                    <?php if (wp_is_site_protected_by_basic_auth('front')) : ?>
     119                        <p>
     120                            <?php esc_html_e(
     121                                'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.',
     122                                'textbuilder'
     123                            ); ?>
     124                        </p>
     125                    <?php elseif ($this->isApache() && !$this->isHtaccessValid()) : ?>
     126                    <p>
     127                        <?php printf(
     128                            esc_html__(
     129                                'It appears that your website is hosted on an Apache web server. To ensure proper functionality of the plugin, it is essential to have the %sauthorization header%s detected. Currently, we were unable to detect this header.',
     130                                'textbuilder'
     131                            ),
     132                            '<strong>',
     133                            '</strong>'
     134                        ); ?>
     135                    </p>
     136                    <p>
     137                        <?php printf(
     138                            esc_html__(
     139                                'To resolve this, please make adjustments to your %s.htaccess%s file before proceeding with the authorization process. We recommend reaching out to your hosting provider\'s support team for assistance in implementing the necessary changes.',
     140                                'textbuilder'
     141                            ),
     142                            '<strong>',
     143                            '</strong>'
     144                        ); ?>
     145                    </p>
     146                    <p>
     147                        <?php printf(
     148                            esc_html__(
     149                                'The required modifications involve adding the following lines to your %s.htaccess%s file:',
     150                                'textbuilder'
     151                            ),
     152                            '<strong>',
     153                            '</strong>'
     154                        ); ?>
     155                    </p>
     156                    <pre>
     157                        RewriteEngine On
     158                        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
     159                    </pre>
     160                </div>
     161                <?php elseif (!$this->isAuthorize()) : ?>
     162                <a href="<?php echo esc_url($authorizeUrl); ?>" class="tb-authorize-button">
    112163                    <?php esc_html_e('Connect to TextBuilder', 'textbuilder'); ?>
    113                 </a>
    114             </div>
    115             <?php elseif (wp_is_site_protected_by_basic_auth('front')): ?>
    116                 <div class="notice notice-error inline">
    117                     <p><?php esc_html_e(
    118                             'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.',
    119                             'textbuilder'
    120                         ); ?></p>
    121                 </div>
    122             <?php endif; ?>
    123         </div>
    124     <?php
     164                </a>
     165                <?php endif; ?>
     166            </div>
     167        </div>
     168        <?php
    125169    }
    126170
     
    145189        );
    146190    }
    147    
    148191
    149192    /**
     
    227270        delete_user_meta($id, 'tb_token_created');
    228271    }
     272
     273    /**
     274     * Check if .htaccess file contais HTTP_AUTHORIZATION.
     275     *
     276     * @return false
     277     */
     278    public function isHtaccessValid()
     279    {
     280        $found = false;
     281
     282        if (is_file(ABSPATH . '.htaccess')) {
     283            $htaccessContent = file(ABSPATH . '.htaccess', FILE_IGNORE_NEW_LINES);
     284
     285            foreach ($htaccessContent as $line) {
     286                if (strpos($line, 'HTTP_AUTHORIZATION') !== false && strpos($line, '#') !== 0) {
     287                    $found = true;
     288                    break;
     289                }
     290            }
     291        }
     292
     293        return $found;
     294    }
     295
     296    /**
     297     * Check if Apache is used
     298     *
     299     * @return bool
     300     */
     301    public function isApache()
     302    {
     303        if ((isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false)
     304            || (function_exists('php_sapi_name') && strpos(php_sapi_name(), 'apache') !== false)) {
     305            return true;
     306        }
     307
     308        return false;
     309    }
    229310}
  • textbuilder/trunk/Includes/AjaxController.php

    r2908705 r3044104  
    138138    protected function output($response, $rawResponse)
    139139    {
    140         //TODO:: Change this
    141140        if (vcIsBadResponse($rawResponse)) {
    142141            echo wp_json_encode(
  • textbuilder/trunk/Includes/Api/AuthorizationController.php

    r2908705 r3044104  
    9393     * @return void
    9494     */
    95     public function revokeAllTokens()
     95    public function revokeAllTokens($background = false)
    9696    {
    9797        $response = false;
    9898        $users = get_users(['meta_key' => 'tb_token',]);
     99
    99100        if (current_user_can('remove_users') && !empty($users)) {
    100101            $token = get_user_meta($users[0]->ID, 'tb_token', true);
     
    126127            }
    127128        } else {
    128             $redirectUrl = add_query_arg(['tb-error' => 'invalid-response'], $redirectUrl);
     129            if (!$background) {
     130                $redirectUrl = add_query_arg(['tb-error' => 'invalid-response'], $redirectUrl);
     131            }
    129132        }
    130133
    131         wp_redirect(esc_url_raw($redirectUrl));
    132         exit;
     134        if (!$background) {
     135            wp_redirect(esc_url_raw($redirectUrl));
     136            exit;
     137        }
    133138    }
    134139
  • textbuilder/trunk/Includes/FrontPage.php

    r2908705 r3044104  
    4444        wp_enqueue_style(
    4545            'textbuilder',
    46             plugins_url('public/dist/main.bundle.css', TEXTBUILDER_ROOT),
     46            plugins_url('public/dist/style.bundle.css', TEXTBUILDER_ROOT),
    4747            [],
    4848            TEXTBUILDER_VERSION,
  • textbuilder/trunk/public/dist/adminMain.bundle.css

    r2908705 r3044104  
    1212  flex-direction: column;
    1313  align-items: center;
     14}
     15.textbuilder-settings .tb-authorize-wrapper .tb-content-wrapper {
     16  display: flex;
     17  flex-direction: column;
     18  align-items: flex-start;
     19}
     20.textbuilder-settings .tb-authorize-wrapper .tb-content-wrapper pre {
     21  white-space: pre-line;
     22  background-color: #d7d7d7;
     23  padding: 10px;
     24  border-radius: 5px;
     25  margin: 0 auto;
    1426}
    1527.textbuilder-settings .tb-authorize-wrapper img {
  • textbuilder/trunk/public/dist/adminMain.bundle.css.map

    r2908705 r3044104  
    1 {"version":3,"file":"adminMain.bundle.css","mappings":";;;AAAA;EACE;AACF;AACE;EACE;EACA;EACA;EACA;EACA;EACA;AACJ;AACI;EACE;EACA;AACN;AAGM;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AADR;AAGQ;EACE;AADV;AAIQ;EACE;AAFV;AAKQ;EACE;AAHV,C","sources":["webpack:///./scss/admin/styles.scss"],"sourcesContent":[".textbuilder-settings {\n  margin: 10px 20px 0 2px;\n\n  .tb-authorize-wrapper {\n    display: flex;\n    max-width: 500px;\n    margin: 0 auto;\n    justify-content: space-between;\n    flex-direction: column;\n    align-items: center;\n\n    img {\n      margin: 30px;\n      max-width: 250px;\n    }\n\n    a {\n      &.tb-authorize-button {\n        padding: 15px 100px;\n        text-transform: uppercase;\n        font-size: 18px;\n        background: radial-gradient(88.24% 252.31% at 87.6% 0, #{'hsl(0 0% 100% / 40%)'} 0, hsla(0, 0%, 100%, 0) 100%), linear-gradient(76.35deg, #4348d7 40.09%, #b629ff 125.4%);\n        border: none;\n        font-weight: bold;\n        box-shadow: 6px 4px 10px 0 #{'rgb(167 167 167 / 39%)'};\n        color: #fff;\n        display: inline-block;\n        line-height: 1.5;\n        text-align: center;\n        text-decoration: none;\n        vertical-align: middle;\n        border-radius: 0.25rem;\n\n        &:focus {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n\n        &:active {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n\n        &:hover {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n      }\n    }\n  }\n\n\n}\n"],"names":[],"sourceRoot":""}
     1{"version":3,"file":"adminMain.bundle.css","mappings":";;;AAAA;EACE;AACF;AACE;EACE;EACA;EACA;EACA;EACA;EACA;AACJ;AACI;EACE;EACA;EACA;AACN;AACM;EACE;EACA;EACA;EACA;EACA;AACR;AAGI;EACE;EACA;AADN;AAKM;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAHR;AAKQ;EACE;AAHV;AAMQ;EACE;AAJV;AAOQ;EACE;AALV,C","sources":["webpack:///./scss/admin/styles.scss"],"sourcesContent":[".textbuilder-settings {\n  margin: 10px 20px 0 2px;\n\n  .tb-authorize-wrapper {\n    display: flex;\n    max-width: 500px;\n    margin: 0 auto;\n    justify-content: space-between;\n    flex-direction: column;\n    align-items: center;\n\n    .tb-content-wrapper {\n      display: flex;\n      flex-direction: column;\n      align-items: flex-start;\n\n      pre {\n        white-space: pre-line;\n        background-color: #d7d7d7;\n        padding: 10px;\n        border-radius: 5px;\n        margin: 0 auto;\n      }\n    }\n\n    img {\n      margin: 30px;\n      max-width: 250px;\n    }\n\n    a {\n      &.tb-authorize-button {\n        padding: 15px 100px;\n        text-transform: uppercase;\n        font-size: 18px;\n        background: radial-gradient(88.24% 252.31% at 87.6% 0, #{'hsl(0 0% 100% / 40%)'} 0, hsla(0, 0%, 100%, 0) 100%), linear-gradient(76.35deg, #4348d7 40.09%, #b629ff 125.4%);\n        border: none;\n        font-weight: bold;\n        box-shadow: 6px 4px 10px 0 #{'rgb(167 167 167 / 39%)'};\n        color: #fff;\n        display: inline-block;\n        line-height: 1.5;\n        text-align: center;\n        text-decoration: none;\n        vertical-align: middle;\n        border-radius: 0.25rem;\n\n        &:focus {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n\n        &:active {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n\n        &:hover {\n          box-shadow: 0 0 0 0.25rem #{'rgb(49 132 253 / 50%)'};\n        }\n      }\n    }\n  }\n\n\n}\n"],"names":[],"sourceRoot":""}
  • textbuilder/trunk/public/dist/index.bundle.js

    r2908705 r3044104  
    11/******/ (function() { // webpackBootstrap
    22/******/    "use strict";
    3 /******/    var __webpack_modules__ = ({
    4 
    5 /***/ "./blocks/first-block/edit.js":
    6 /*!************************************!*\
    7   !*** ./blocks/first-block/edit.js ***!
    8   \************************************/
    9 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
    10 
    11 __webpack_require__.r(__webpack_exports__);
    12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
    13 /* harmony export */   "default": function() { return /* binding */ Edit; }
    14 /* harmony export */ });
    15 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./block.json */ "./blocks/first-block/block.json");
    16 function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
    17 
    18 var _wp$i18n = wp.i18n,
    19   __ = _wp$i18n.__,
    20   setLocaleData = _wp$i18n.setLocaleData;
    21 var _wp$blockEditor = wp.blockEditor,
    22   useBlockProps = _wp$blockEditor.useBlockProps,
    23   RichText = _wp$blockEditor.RichText,
    24   AlignmentControl = _wp$blockEditor.AlignmentControl,
    25   BlockControls = _wp$blockEditor.BlockControls;
    26 function Edit(_ref) {
    27   var attributes = _ref.attributes,
    28     setAttributes = _ref.setAttributes;
    29   var blockProps = useBlockProps();
    30   var align = attributes.align,
    31     content = attributes.content;
    32   var onChangeContent = function onChangeContent(newContent) {
    33     setAttributes({
    34       content: newContent
    35     });
    36   };
    37   var onChangeAlign = function onChangeAlign(newAlign) {
    38     setAttributes({
    39       align: newAlign === undefined ? 'none' : newAlign
    40     });
    41   };
    42   return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(AlignmentControl, {
    43     value: align,
    44     onChange: onChangeAlign
    45   })), /*#__PURE__*/React.createElement(RichText, _extends({}, blockProps, {
    46     tagName: "p",
    47     onChange: onChangeContent,
    48     allowedFormats: ['core/bold', 'core/italic'],
    49     value: content,
    50     placeholder: __('Write your text...'),
    51     style: {
    52       textAlign: align
    53     }
    54   })));
    55 }
    56 
    57 /***/ }),
    58 
    59 /***/ "./blocks/first-block/index.js":
    60 /*!*************************************!*\
    61   !*** ./blocks/first-block/index.js ***!
    62   \*************************************/
    63 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
    64 
    65 __webpack_require__.r(__webpack_exports__);
    66 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./edit */ "./blocks/first-block/edit.js");
    67 /* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save */ "./blocks/first-block/save.js");
    68 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./blocks/first-block/block.json");
    69 
    70 
    71 
    72 var registerBlockType = wp.blocks.registerBlockType;
    73 var name = _block_json__WEBPACK_IMPORTED_MODULE_2__.name,
    74   title = _block_json__WEBPACK_IMPORTED_MODULE_2__.title,
    75   icon = _block_json__WEBPACK_IMPORTED_MODULE_2__.icon,
    76   category = _block_json__WEBPACK_IMPORTED_MODULE_2__.category;
    77 registerBlockType(name, {
    78   title: title,
    79   icon: icon,
    80   // https://developer.wordpress.org/resource/dashicons/#heading
    81   category: category,
    82   /**
    83    * @see ./edit.js
    84    */
    85   edit: _edit__WEBPACK_IMPORTED_MODULE_0__["default"],
    86   /**
    87    * @see ./save.js
    88    */
    89   save: _save__WEBPACK_IMPORTED_MODULE_1__["default"]
    90 });
    91 
    92 /***/ }),
    93 
    94 /***/ "./blocks/first-block/save.js":
    95 /*!************************************!*\
    96   !*** ./blocks/first-block/save.js ***!
    97   \************************************/
    98 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
    99 
    100 __webpack_require__.r(__webpack_exports__);
    101 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
    102 /* harmony export */   "default": function() { return /* binding */ save; }
    103 /* harmony export */ });
    104 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./block.json */ "./blocks/first-block/block.json");
    105 function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
    106 
    107 var _wp$i18n = wp.i18n,
    108   __ = _wp$i18n.__,
    109   setLocaleData = _wp$i18n.setLocaleData;
    110 var _wp$blockEditor = wp.blockEditor,
    111   useBlockProps = _wp$blockEditor.useBlockProps,
    112   RichText = _wp$blockEditor.RichText;
    113 function save(_ref) {
    114   var attributes = _ref.attributes;
    115   var blockProps = useBlockProps.save();
    116   var align = attributes.align,
    117     content = attributes.content;
    118   return /*#__PURE__*/React.createElement(RichText.Content, _extends({}, blockProps, {
    119     tagName: "p",
    120     value: content,
    121     style: {
    122       textAlign: align
    123     }
    124   }));
    125 }
    126 
    127 /***/ }),
    128 
    129 /***/ "./blocks/first-block/block.json":
    130 /*!***************************************!*\
    131   !*** ./blocks/first-block/block.json ***!
    132   \***************************************/
    133 /***/ (function(module) {
    134 
    135 module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"textbuilder/blockname","title":"TextBuilder","category":"text","parent":["core/group"],"icon":"screenoptions","description":"Shows warning, error or success notices...","keywords":["alert","message"],"version":"1.0.0","textdomain":"textbuilder","attributes":{"content":{"type":"string","source":"html","selector":"p"},"align":{"type":"string","default":"none"}},"editorScript":"file:./index.bundle.js","editorStyle":"file:./editor.bundle.css","style":"file:./style.bundle.css"}');
    136 
    137 /***/ })
    138 
    139 /******/    });
    140 /************************************************************************/
    141 /******/    // The module cache
    142 /******/    var __webpack_module_cache__ = {};
    143 /******/   
    144 /******/    // The require function
    145 /******/    function __webpack_require__(moduleId) {
    146 /******/        // Check if module is in cache
    147 /******/        var cachedModule = __webpack_module_cache__[moduleId];
    148 /******/        if (cachedModule !== undefined) {
    149 /******/            return cachedModule.exports;
    150 /******/        }
    151 /******/        // Create a new module (and put it into the cache)
    152 /******/        var module = __webpack_module_cache__[moduleId] = {
    153 /******/            // no module.id needed
    154 /******/            // no module.loaded needed
    155 /******/            exports: {}
    156 /******/        };
    157 /******/   
    158 /******/        // Execute the module function
    159 /******/        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
    160 /******/   
    161 /******/        // Return the exports of the module
    162 /******/        return module.exports;
    163 /******/    }
     3/******/    // The require scope
     4/******/    var __webpack_require__ = {};
    1645/******/   
    1656/************************************************************************/
    166 /******/    /* webpack/runtime/define property getters */
    167 /******/    !function() {
    168 /******/        // define getter functions for harmony exports
    169 /******/        __webpack_require__.d = function(exports, definition) {
    170 /******/            for(var key in definition) {
    171 /******/                if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    172 /******/                    Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    173 /******/                }
    174 /******/            }
    175 /******/        };
    176 /******/    }();
    177 /******/   
    178 /******/    /* webpack/runtime/hasOwnProperty shorthand */
    179 /******/    !function() {
    180 /******/        __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
    181 /******/    }();
    182 /******/   
    1837/******/    /* webpack/runtime/make namespace object */
    1848/******/    !function() {
     
    19418/************************************************************************/
    19519var __webpack_exports__ = {};
    196 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
    197 !function() {
    19820/*!******************!*\
    19921  !*** ./index.js ***!
    20022  \******************/
    20123__webpack_require__.r(__webpack_exports__);
    202 /* harmony import */ var _blocks_first_block__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blocks/first-block */ "./blocks/first-block/index.js");
     24Object(function webpackMissingModule() { var e = new Error("Cannot find module './blocks/first-block'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
    20325
    204 }();
    20526/******/ })()
    20627;
  • textbuilder/trunk/public/dist/index.bundle.js.map

    r2908705 r3044104  
    1 {"version":3,"file":"index.bundle.js","mappings":";;;;;;;;;;;;;;;;AAAsC;AAEtC,IAAAC,QAAA,GAA8BC,EAAE,CAACC,IAAI;EAA7BC,EAAE,GAAAH,QAAA,CAAFG,EAAE;EAAEC,aAAa,GAAAJ,QAAA,CAAbI,aAAa;AACzB,IAAA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;;;;;;UCjBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack:///./blocks/first-block/edit.js","webpack:///./blocks/first-block/index.js","webpack:///./blocks/first-block/save.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./index.js"],"sourcesContent":["import attributes from './block.json';\n\nconst { __, setLocaleData } = wp.i18n;\nconst { useBlockProps, RichText, AlignmentControl, BlockControls } = wp.blockEditor;\n\nexport default function Edit ({ attributes, setAttributes }) {\n  const blockProps = useBlockProps();\n  const { align, content } = attributes;\n\n  const onChangeContent = (newContent) => {\n    setAttributes({ content: newContent })\n  }\n\n  const onChangeAlign = (newAlign) => {\n    setAttributes({\n      align: newAlign === undefined ? 'none' : newAlign,\n    })\n  }\n\n  return (\n    <>\n      <BlockControls>\n        <AlignmentControl\n          value={align}\n          onChange={onChangeAlign}\n        />\n      </BlockControls>\n      <RichText\n        {...blockProps}\n        tagName='p'\n        onChange={onChangeContent}\n        allowedFormats={['core/bold', 'core/italic']}\n        value={content}\n        placeholder={__('Write your text...')}\n        style={{\n          textAlign: align\n        }}\n      />\n    </>\n  );\n}","import Edit from './edit';\nimport save from './save';\nimport attributes from './block.json';\n\nconst { registerBlockType } = wp.blocks;\nconst { name, title, icon, category } = attributes;\n\nregisterBlockType( name, {\n  title: title,\n  icon: icon, // https://developer.wordpress.org/resource/dashicons/#heading\n  category: category,\n\n  /**\n   * @see ./edit.js\n   */\n  edit: Edit,\n\n  /**\n   * @see ./save.js\n   */\n  save,\n} );","import attributes from './block.json';\n\nconst { __, setLocaleData } = wp.i18n;\nconst { useBlockProps, RichText } = wp.blockEditor;\n\nexport default function save ({ attributes }) {\n  const blockProps = useBlockProps.save();\n  const { align, content } = attributes;\n\n  return (\n    <RichText.Content\n      {...blockProps}\n      tagName=\"p\"\n      value={content}\n      style={{ textAlign: align }}\n    />\n  );\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './blocks/first-block';"],"names":["attributes","_wp$i18n","wp","i18n","__","setLocaleData","_wp$blockEditor","blockEditor","useBlockProps","RichText","AlignmentControl","BlockControls","Edit","_ref","setAttributes","blockProps","align","content","onChangeContent","newContent","onChangeAlign","newAlign","undefined","React","createElement","Fragment","value","onChange","_extends","tagName","allowedFormats","placeholder","style","textAlign","save","registerBlockType","blocks","name","title","icon","category","edit","Content"],"sourceRoot":""}
     1{"version":3,"file":"index.bundle.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/make namespace object","webpack:///./index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './blocks/first-block';"],"names":[],"sourceRoot":""}
  • textbuilder/trunk/public/scss/admin/styles.scss

    r2908705 r3044104  
    99    flex-direction: column;
    1010    align-items: center;
     11
     12    .tb-content-wrapper {
     13      display: flex;
     14      flex-direction: column;
     15      align-items: flex-start;
     16
     17      pre {
     18        white-space: pre-line;
     19        background-color: #d7d7d7;
     20        padding: 10px;
     21        border-radius: 5px;
     22        margin: 0 auto;
     23      }
     24    }
    1125
    1226    img {
  • textbuilder/trunk/readme.txt

    r2908705 r3044104  
    22Contributors: textbuilder
    33Tags: Ai, ai writer, ai content, content, gpt, gpt3, textbuilder, builder
    4 Tested up to: 6.1
    5 Stable tag: 1.0.0
     4Tested up to: 6.4
     5Stable tag: 1.1.0
    66License: GPLV3
    77License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1717== Changelog ==
    1818
     19= 1.1.0 =
     20*Release Date - 2024-03-02*
     21
     22- Update: Added additional check for Apache web servers
     23- Fix: Fixed main style file name
     24
    1925= 1.0.0 =
    2026*Release Date - 2023-04-08*
    2127
    22 * Initial release
     28- Initial release
  • textbuilder/trunk/textBuilder.php

    r2908705 r3044104  
    44 * Plugin URI: https://textbuilder.ai
    55 * Description: With the TextBuilder.ai WordPress Plugin, you can quickly create content and post it directly to your blog without any manual effort.
    6  * Version: 1.0
     6 * Version: 1.1.0
    77 * Author: TextBuilder.ai
    88 * Author URI: https://textbuilder.ai/about/
     
    1515 */
    1616
    17 define('TEXTBUILDER_VERSION', '1.0');
     17define('TEXTBUILDER_VERSION', '1.1.0');
    1818define('TEXTBUILDER_ROOT', __FILE__);
    1919define('TEXTBUILDER_ROOT_DIRNAME', basename(dirname(TEXTBUILDER_ROOT)));
     
    2828}
    2929
    30 add_action('init', 'my_register_block');
    31 function my_register_block() {
    32     // register our JavaScript
    33     wp_register_script(
    34         'my-block',
    35         plugins_url('/public/dist/index.bundle.js', __FILE__),
    36         array('wp-blocks', 'wp-element', 'wp-editor')
    37     );
    38     // register our front-end styles
    39     wp_register_style(
    40         'my-block-style',
    41         plugins_url('/public/dist/style.bundle.css', __FILE__),
    42         array('wp-block-library')
    43     );
    44     // register our editor styles
    45     wp_register_style(
    46         'my-block-edit-style',
    47         plugins_url('/public/dist/editor.bundle.css', __FILE__),
    48         array('wp-edit-blocks')
    49     );
    50     // register our block
    51     register_block_type('my/blockname', array(
    52         'editor_script' => 'my-block',
    53         'editor_style' => 'my-block-edit-style',
    54         'style' => 'my-block-style'
    55     ));
    56 }
    57 
    58 
    5930textBuilder();
  • textbuilder/trunk/vendor/autoload.php

    r2908705 r3044104  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit16869684acb00f90016cfe9b45535b76::getLoader();
     25return ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20::getLoader();
  • textbuilder/trunk/vendor/composer/autoload_real.php

    r2908705 r3044104  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit16869684acb00f90016cfe9b45535b76
     5class ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit16869684acb00f90016cfe9b45535b76', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit16869684acb00f90016cfe9b45535b76', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInit16869684acb00f90016cfe9b45535b76::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • textbuilder/trunk/vendor/composer/autoload_static.php

    r2908705 r3044104  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit16869684acb00f90016cfe9b45535b76
     7class ComposerStaticInit05aa5475d25687d18674a4305a7f8c20
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2828    {
    2929        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInit16869684acb00f90016cfe9b45535b76::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInit16869684acb00f90016cfe9b45535b76::$prefixDirsPsr4;
    32             $loader->classMap = ComposerStaticInit16869684acb00f90016cfe9b45535b76::$classMap;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$classMap;
    3333
    3434        }, null, ClassLoader::class);
  • textbuilder/trunk/vendor/composer/installed.php

    r2908705 r3044104  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '55040ebde6442dfcc6cce5af309cbd324c99ad97',
     6        'reference' => 'c5ca2eeaab5fe4a0a3d4b582cd828a58bb002c95',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '55040ebde6442dfcc6cce5af309cbd324c99ad97',
     16            'reference' => 'c5ca2eeaab5fe4a0a3d4b582cd828a58bb002c95',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.