Changeset 3044104
- Timestamp:
- 03/02/2024 05:52:00 PM (2 years ago)
- Location:
- textbuilder
- Files:
-
- 60 added
- 15 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/Includes (added)
-
tags/1.1.0/Includes/Admin (added)
-
tags/1.1.0/Includes/Admin/SettingsPanel.php (added)
-
tags/1.1.0/Includes/Admin/View (added)
-
tags/1.1.0/Includes/Admin/View/TokenTable.php (added)
-
tags/1.1.0/Includes/AjaxController.php (added)
-
tags/1.1.0/Includes/Api (added)
-
tags/1.1.0/Includes/Api/AuthorizationController.php (added)
-
tags/1.1.0/Includes/Api/CategoriesController.php (added)
-
tags/1.1.0/Includes/Api/MediaController.php (added)
-
tags/1.1.0/Includes/Api/PostsController.php (added)
-
tags/1.1.0/Includes/Api/RestAuthenticationController.php (added)
-
tags/1.1.0/Includes/Api/TagsController.php (added)
-
tags/1.1.0/Includes/FrontPage.php (added)
-
tags/1.1.0/Includes/Helpers (added)
-
tags/1.1.0/Includes/Helpers/Request.php (added)
-
tags/1.1.0/Includes/Helpers/Str.php (added)
-
tags/1.1.0/Includes/TextBuilder.php (added)
-
tags/1.1.0/README.md (added)
-
tags/1.1.0/languages (added)
-
tags/1.1.0/languages/textbuilder.pot (added)
-
tags/1.1.0/public (added)
-
tags/1.1.0/public/dist (added)
-
tags/1.1.0/public/dist/adminMain.bundle.css (added)
-
tags/1.1.0/public/dist/adminMain.bundle.css.map (added)
-
tags/1.1.0/public/dist/adminMain.bundle.js (added)
-
tags/1.1.0/public/dist/adminMain.bundle.js.map (added)
-
tags/1.1.0/public/dist/index.bundle.js (added)
-
tags/1.1.0/public/dist/index.bundle.js.map (added)
-
tags/1.1.0/public/dist/main.bundle.js (added)
-
tags/1.1.0/public/editor.scss (added)
-
tags/1.1.0/public/img (added)
-
tags/1.1.0/public/img/intro-menu-logo.png (added)
-
tags/1.1.0/public/img/tb-logo.png (added)
-
tags/1.1.0/public/index.js (added)
-
tags/1.1.0/public/js (added)
-
tags/1.1.0/public/js/admin (added)
-
tags/1.1.0/public/js/admin/scripts.js (added)
-
tags/1.1.0/public/js/scripts.js (added)
-
tags/1.1.0/public/scss (added)
-
tags/1.1.0/public/scss/admin (added)
-
tags/1.1.0/public/scss/admin/styles.scss (added)
-
tags/1.1.0/public/scss/styles.scss (added)
-
tags/1.1.0/public/style.scss (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/textBuilder.php (added)
-
tags/1.1.0/vendor (added)
-
tags/1.1.0/vendor/autoload.php (added)
-
tags/1.1.0/vendor/composer (added)
-
tags/1.1.0/vendor/composer/ClassLoader.php (added)
-
tags/1.1.0/vendor/composer/InstalledVersions.php (added)
-
tags/1.1.0/vendor/composer/LICENSE (added)
-
tags/1.1.0/vendor/composer/autoload_classmap.php (added)
-
tags/1.1.0/vendor/composer/autoload_namespaces.php (added)
-
tags/1.1.0/vendor/composer/autoload_psr4.php (added)
-
tags/1.1.0/vendor/composer/autoload_real.php (added)
-
tags/1.1.0/vendor/composer/autoload_static.php (added)
-
tags/1.1.0/vendor/composer/installed.json (added)
-
tags/1.1.0/vendor/composer/installed.php (added)
-
trunk/Includes/Admin/SettingsPanel.php (modified) (4 diffs)
-
trunk/Includes/AjaxController.php (modified) (1 diff)
-
trunk/Includes/Api/AuthorizationController.php (modified) (2 diffs)
-
trunk/Includes/FrontPage.php (modified) (1 diff)
-
trunk/public/dist/adminMain.bundle.css (modified) (1 diff)
-
trunk/public/dist/adminMain.bundle.css.map (modified) (1 diff)
-
trunk/public/dist/index.bundle.js (modified) (2 diffs)
-
trunk/public/dist/index.bundle.js.map (modified) (1 diff)
-
trunk/public/scss/admin/styles.scss (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/textBuilder.php (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
textbuilder/trunk/Includes/Admin/SettingsPanel.php
r2908705 r3044104 4 4 5 5 use TextBuilder\AjaxController; 6 use TextBuilder\Api\AuthorizationController; 6 7 7 8 if (!defined('ABSPATH')) { … … 85 86 public function content() 86 87 { 88 //BC - Remove already authorised users 89 if ($this->isAuthorize() && $this->isApache() && !$this->isHtaccessValid()) { 90 $authorizationController = new AuthorizationController(); 91 $authorizationController->revokeAllTokens(true); 92 } 93 87 94 $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"> 110 116 <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"> 112 163 <?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 125 169 } 126 170 … … 145 189 ); 146 190 } 147 148 191 149 192 /** … … 227 270 delete_user_meta($id, 'tb_token_created'); 228 271 } 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 } 229 310 } -
textbuilder/trunk/Includes/AjaxController.php
r2908705 r3044104 138 138 protected function output($response, $rawResponse) 139 139 { 140 //TODO:: Change this141 140 if (vcIsBadResponse($rawResponse)) { 142 141 echo wp_json_encode( -
textbuilder/trunk/Includes/Api/AuthorizationController.php
r2908705 r3044104 93 93 * @return void 94 94 */ 95 public function revokeAllTokens( )95 public function revokeAllTokens($background = false) 96 96 { 97 97 $response = false; 98 98 $users = get_users(['meta_key' => 'tb_token',]); 99 99 100 if (current_user_can('remove_users') && !empty($users)) { 100 101 $token = get_user_meta($users[0]->ID, 'tb_token', true); … … 126 127 } 127 128 } 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 } 129 132 } 130 133 131 wp_redirect(esc_url_raw($redirectUrl)); 132 exit; 134 if (!$background) { 135 wp_redirect(esc_url_raw($redirectUrl)); 136 exit; 137 } 133 138 } 134 139 -
textbuilder/trunk/Includes/FrontPage.php
r2908705 r3044104 44 44 wp_enqueue_style( 45 45 'textbuilder', 46 plugins_url('public/dist/ main.bundle.css', TEXTBUILDER_ROOT),46 plugins_url('public/dist/style.bundle.css', TEXTBUILDER_ROOT), 47 47 [], 48 48 TEXTBUILDER_VERSION, -
textbuilder/trunk/public/dist/adminMain.bundle.css
r2908705 r3044104 12 12 flex-direction: column; 13 13 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; 14 26 } 15 27 .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 1 1 /******/ (function() { // webpackBootstrap 2 2 /******/ "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__ = {}; 164 5 /******/ 165 6 /************************************************************************/ 166 /******/ /* webpack/runtime/define property getters */167 /******/ !function() {168 /******/ // define getter functions for harmony exports169 /******/ __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 /******/183 7 /******/ /* webpack/runtime/make namespace object */ 184 8 /******/ !function() { … … 194 18 /************************************************************************/ 195 19 var __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() {198 20 /*!******************!*\ 199 21 !*** ./index.js ***! 200 22 \******************/ 201 23 __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");24 Object(function webpackMissingModule() { var e = new Error("Cannot find module './blocks/first-block'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()); 203 25 204 }();205 26 /******/ })() 206 27 ; -
textbuilder/trunk/public/dist/index.bundle.js.map
r2908705 r3044104 1 {"version":3,"file":"index.bundle.js","mappings":";; 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","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 9 9 flex-direction: column; 10 10 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 } 11 25 12 26 img { -
textbuilder/trunk/readme.txt
r2908705 r3044104 2 2 Contributors: textbuilder 3 3 Tags: Ai, ai writer, ai content, content, gpt, gpt3, textbuilder, builder 4 Tested up to: 6. 15 Stable tag: 1. 0.04 Tested up to: 6.4 5 Stable tag: 1.1.0 6 6 License: GPLV3 7 7 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 17 17 == Changelog == 18 18 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 19 25 = 1.0.0 = 20 26 *Release Date - 2023-04-08* 21 27 22 *Initial release28 - Initial release -
textbuilder/trunk/textBuilder.php
r2908705 r3044104 4 4 * Plugin URI: https://textbuilder.ai 5 5 * 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. 06 * Version: 1.1.0 7 7 * Author: TextBuilder.ai 8 8 * Author URI: https://textbuilder.ai/about/ … … 15 15 */ 16 16 17 define('TEXTBUILDER_VERSION', '1. 0');17 define('TEXTBUILDER_VERSION', '1.1.0'); 18 18 define('TEXTBUILDER_ROOT', __FILE__); 19 19 define('TEXTBUILDER_ROOT_DIRNAME', basename(dirname(TEXTBUILDER_ROOT))); … … 28 28 } 29 29 30 add_action('init', 'my_register_block');31 function my_register_block() {32 // register our JavaScript33 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 styles39 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 styles45 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 block51 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 59 30 textBuilder(); -
textbuilder/trunk/vendor/autoload.php
r2908705 r3044104 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 16869684acb00f90016cfe9b45535b76::getLoader();25 return ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20::getLoader(); -
textbuilder/trunk/vendor/composer/autoload_real.php
r2908705 r3044104 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 16869684acb00f90016cfe9b45535b765 class ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 16869684acb00f90016cfe9b45535b76', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 16869684acb00f90016cfe9b45535b76', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit05aa5475d25687d18674a4305a7f8c20', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 16869684acb00f90016cfe9b45535b76::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
textbuilder/trunk/vendor/composer/autoload_static.php
r2908705 r3044104 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 16869684acb00f90016cfe9b45535b767 class ComposerStaticInit05aa5475d25687d18674a4305a7f8c20 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit 16869684acb00f90016cfe9b45535b76::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit 16869684acb00f90016cfe9b45535b76::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit 16869684acb00f90016cfe9b45535b76::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInit05aa5475d25687d18674a4305a7f8c20::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
textbuilder/trunk/vendor/composer/installed.php
r2908705 r3044104 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 55040ebde6442dfcc6cce5af309cbd324c99ad97',6 'reference' => 'c5ca2eeaab5fe4a0a3d4b582cd828a58bb002c95', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 55040ebde6442dfcc6cce5af309cbd324c99ad97',16 'reference' => 'c5ca2eeaab5fe4a0a3d4b582cd828a58bb002c95', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.