Changeset 3095970
- Timestamp:
- 06/01/2024 08:27:40 AM (22 months ago)
- Location:
- fluentform-block
- Files:
-
- 59 added
- 3 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/app (added)
-
tags/1.0.6/app/Block (added)
-
tags/1.0.6/app/Block/BlockBase.php (added)
-
tags/1.0.6/app/Block/Fluentform.php (added)
-
tags/1.0.6/app/Block/fluentform (added)
-
tags/1.0.6/app/Block/fluentform/block.json (added)
-
tags/1.0.6/app/Ctrl (added)
-
tags/1.0.6/app/Ctrl/Asset (added)
-
tags/1.0.6/app/Ctrl/Asset/AssetCtrl.php (added)
-
tags/1.0.6/app/Ctrl/BlockCtrl.php (added)
-
tags/1.0.6/app/Ctrl/Dependencies.php (added)
-
tags/1.0.6/app/Ctrl/FontLoader.php (added)
-
tags/1.0.6/app/Ctrl/Hook (added)
-
tags/1.0.6/app/Ctrl/Hook/HookCtrl.php (added)
-
tags/1.0.6/app/Ctrl/Hook/Type (added)
-
tags/1.0.6/app/Ctrl/Hook/Type/Action.php (added)
-
tags/1.0.6/app/Ctrl/Hook/Type/Filter.php (added)
-
tags/1.0.6/app/Ctrl/Installation.php (added)
-
tags/1.0.6/app/Ctrl/MainCtrl.php (added)
-
tags/1.0.6/app/Ctrl/StyleGenerator.php (added)
-
tags/1.0.6/app/FFBlock.php (added)
-
tags/1.0.6/app/Helper (added)
-
tags/1.0.6/app/Helper/Constant.php (added)
-
tags/1.0.6/app/Helper/Fns.php (added)
-
tags/1.0.6/app/Helper/Installation.php (added)
-
tags/1.0.6/app/Traits (added)
-
tags/1.0.6/app/Traits/Singleton.php (added)
-
tags/1.0.6/assets (added)
-
tags/1.0.6/assets/blocks (added)
-
tags/1.0.6/assets/blocks/index.asset.php (added)
-
tags/1.0.6/assets/blocks/index.css (added)
-
tags/1.0.6/assets/blocks/index.css.map (added)
-
tags/1.0.6/assets/blocks/index.js (added)
-
tags/1.0.6/assets/blocks/index.js.map (added)
-
tags/1.0.6/assets/blocks/style-index.css (added)
-
tags/1.0.6/assets/blocks/style-index.css.map (added)
-
tags/1.0.6/fluentform-block.php (added)
-
tags/1.0.6/index.php (added)
-
tags/1.0.6/languages (added)
-
tags/1.0.6/languages/fluentform-block.pot (added)
-
tags/1.0.6/package.json (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/uninstall.php (added)
-
tags/1.0.6/vendor (added)
-
tags/1.0.6/vendor/autoload.php (added)
-
tags/1.0.6/vendor/composer (added)
-
tags/1.0.6/vendor/composer/ClassLoader.php (added)
-
tags/1.0.6/vendor/composer/InstalledVersions.php (added)
-
tags/1.0.6/vendor/composer/LICENSE (added)
-
tags/1.0.6/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.6/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.6/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.6/vendor/composer/autoload_real.php (added)
-
tags/1.0.6/vendor/composer/autoload_static.php (added)
-
tags/1.0.6/vendor/composer/installed.json (added)
-
tags/1.0.6/vendor/composer/installed.php (added)
-
tags/1.0.6/views (added)
-
tags/1.0.6/views/fluentform.php (added)
-
trunk/app/Block/Fluentform.php (modified) (2 diffs)
-
trunk/fluentform-block.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fluentform-block/trunk/app/Block/Fluentform.php
r3022517 r3095970 3 3 namespace FFBlock\Block; 4 4 5 if ( !defined('ABSPATH')) {6 exit; // Exit if accessed directly5 if ( ! defined( 'ABSPATH' ) ) { 6 exit; 7 7 } 8 9 use FFBlock\Block\BlockBase;10 8 use FFBlock\Helper\Fns; 11 9 /** 10 * Fluentform attribute class 11 */ 12 12 class Fluentform extends BlockBase { 13 14 /** 15 * Block Attributes 16 * 17 * @return mixed|null 18 */ 13 19 public function block_attributes() { 14 20 $attributes = [ 15 'layout' => array(21 'layout' => [ 16 22 'type' => 'string', 17 23 'default' => '1', 18 ),19 20 'formId' => array(21 'type' => 'string',22 'default' => '1' 23 ),24 25 'isHtml' => array(26 'type' => 'boolean',27 'default' => false 28 ),29 'formJson' => array(24 ], 25 26 'formId' => [ 27 'type' => 'string', 28 'default' => '1', 29 ], 30 31 'isHtml' => [ 32 'type' => 'boolean', 33 'default' => false, 34 ], 35 'formJson' => [ 30 36 'type' => 'object', 31 37 'default' => null, 32 ),33 34 'formName' => array(35 'type' => 'string',36 'default' => 'basic_contact_form' 37 ),38 39 'labelEnable' => array(38 ], 39 40 'formName' => [ 41 'type' => 'string', 42 'default' => 'basic_contact_form', 43 ], 44 45 'labelEnable' => [ 40 46 'type' => 'boolean', 41 47 'default' => true, 42 ),43 'placeholderEnable' => array(48 ], 49 'placeholderEnable' => [ 44 50 'type' => 'boolean', 45 51 'default' => true, 46 ),47 'errorMessageEnable' => array(52 ], 53 'errorMessageEnable' => [ 48 54 'type' => 'boolean', 49 55 'default' => true, 50 ),51 52 // form box53 'formAlignment' => array(56 ], 57 58 // form box 59 'formAlignment' => [ 54 60 'type' => 'object', 55 61 'default' => [], 56 ), 57 58 'formMaxWidth' => [ 59 'type' => 'object', 60 'default' => (object)[ 61 'lg' => '', 62 'unit' => 'px' 63 ], 64 ], 65 66 //label style 67 'labelTypo' => [ 68 'type' => 'object', 69 'default' => (object)[ 70 'openTypography' => 1, 71 'size' => (object)['lg' => '', 'unit' => 'px'], 72 'spacing' => (object)['lg' => '', 'unit' => 'px'], 73 'height' => (object)['lg' => '', 'unit' => 'px'], 74 'transform' => '', 75 'weight' => '' 76 ], 77 ], 78 79 'labelColor' => array( 80 'type' => 'string', 81 'default' => '', 82 ), 83 84 "labelSpace" => array( 85 "type" => "object", 86 "default" => array( 87 'lg' => [ 88 "isLinked" => true, 89 "unit" => "px", 90 "value" => '' 91 ] 92 ) 93 ), 94 //input & textarea style 95 'inputTATypo' => [ 96 'type' => 'object', 97 'default' => (object)[ 98 'openTypography' => 1, 99 'size' => (object)['lg' => '', 'unit' => 'px'], 100 'spacing' => (object)['lg' => '', 'unit' => 'px'], 101 'height' => (object)['lg' => '', 'unit' => 'px'], 102 'transform' => '', 103 'weight' => '' 104 ], 105 ], 106 107 'inputTAColor' => array( 108 'type' => 'string', 109 'default' => '', 110 ), 111 'inputTABGColor' => array( 112 'type' => 'string', 113 'default' => '', 114 ), 115 116 'inputWidth' => [ 117 'type' => 'object', 118 'default' => (object)[ 119 'lg' => '', 120 'unit' => 'px' 121 ], 122 ], 123 124 'inputHeight' => [ 125 'type' => 'object', 126 'default' => (object)[ 127 'lg' => '', 128 'unit' => 'px' 129 ], 130 ], 131 132 'textareaWidth' => [ 133 'type' => 'object', 134 'default' => (object)[ 135 'lg' => '', 136 'unit' => 'px' 137 ], 138 ], 139 140 'textareaHeight' => [ 141 'type' => 'object', 142 'default' => (object)[ 143 'lg' => '', 144 'unit' => 'px' 145 ], 146 ], 147 148 "inputTAPadding" => array( 149 "type" => "object", 150 "default" => array( 151 'lg' => [ 152 "isLinked" => true, 153 "unit" => "px", 154 "value" => '' 155 ] 156 ), 157 ), 158 "inputTAMargin" => array( 159 "type" => "object", 160 "default" => array( 161 'lg' => [ 162 "isLinked" => true, 163 "unit" => "px", 164 "value" => '' 165 ] 166 ), 167 ), 168 "inputTABorder" => array( 169 "type" => "object", 170 "default" => array( 62 ], 63 64 'formMaxWidth' => [ 65 'type' => 'object', 66 'default' => (object) [ 67 'lg' => '', 68 'unit' => 'px', 69 ], 70 ], 71 72 // label style 73 'labelTypo' => [ 74 'type' => 'object', 75 'default' => (object) [ 76 'openTypography' => 1, 77 'size' => (object) [ 78 'lg' => '', 79 'unit' => 'px', 80 ], 81 'spacing' => (object) [ 82 'lg' => '', 83 'unit' => 'px', 84 ], 85 'height' => (object) [ 86 'lg' => '', 87 'unit' => 'px', 88 ], 89 'transform' => '', 90 'weight' => '', 91 ], 92 ], 93 94 'labelColor' => [ 95 'type' => 'string', 96 'default' => '', 97 ], 98 99 'labelSpace' => [ 100 'type' => 'object', 101 'default' => [ 102 'lg' => [ 103 'isLinked' => true, 104 'unit' => 'px', 105 'value' => '', 106 ], 107 ], 108 ], 109 // input & textarea style 110 'inputTATypo' => [ 111 'type' => 'object', 112 'default' => (object) [ 113 'openTypography' => 1, 114 'size' => (object) [ 115 'lg' => '', 116 'unit' => 'px', 117 ], 118 'spacing' => (object) [ 119 'lg' => '', 120 'unit' => 'px', 121 ], 122 'height' => (object) [ 123 'lg' => '', 124 'unit' => 'px', 125 ], 126 'transform' => '', 127 'weight' => '', 128 ], 129 ], 130 131 'inputTAColor' => [ 132 'type' => 'string', 133 'default' => '', 134 ], 135 'inputTABGColor' => [ 136 'type' => 'string', 137 'default' => '', 138 ], 139 140 'inputWidth' => [ 141 'type' => 'object', 142 'default' => (object) [ 143 'lg' => '', 144 'unit' => 'px', 145 ], 146 ], 147 148 'inputHeight' => [ 149 'type' => 'object', 150 'default' => (object) [ 151 'lg' => '', 152 'unit' => 'px', 153 ], 154 ], 155 156 'textareaWidth' => [ 157 'type' => 'object', 158 'default' => (object) [ 159 'lg' => '', 160 'unit' => 'px', 161 ], 162 ], 163 164 'textareaHeight' => [ 165 'type' => 'object', 166 'default' => (object) [ 167 'lg' => '', 168 'unit' => 'px', 169 ], 170 ], 171 172 'inputTAPadding' => [ 173 'type' => 'object', 174 'default' => [ 175 'lg' => [ 176 'isLinked' => true, 177 'unit' => 'px', 178 'value' => '', 179 ], 180 ], 181 ], 182 'inputTAMargin' => [ 183 'type' => 'object', 184 'default' => [ 185 'lg' => [ 186 'isLinked' => true, 187 'unit' => 'px', 188 'value' => '', 189 ], 190 ], 191 ], 192 'inputTABorder' => [ 193 'type' => 'object', 194 'default' => [ 171 195 'borderStyle' => '', 172 196 'borderColor' => '', 173 'lg' => [174 "isLinked"=> true,175 "unit" => "px",176 "value" => ''177 ] 178 )179 ),180 181 "inputTAHoverBorder" => array(182 "type" => "object",183 "default" => array(197 'lg' => [ 198 'isLinked' => true, 199 'unit' => 'px', 200 'value' => '', 201 ], 202 ], 203 ], 204 205 'inputTAHoverBorder' => [ 206 'type' => 'object', 207 'default' => [ 184 208 'borderStyle' => '', 185 209 'borderColor' => '', 186 'lg' => [ 187 "isLinked" => true, 188 "unit" => "px", 189 "value" => '' 190 ] 191 ) 192 ), 193 194 "inputTARadius" => array( 195 "type" => "object", 196 "default" => array( 197 'lg' => [ 198 "isLinked" => true, 199 "unit" => "px", 200 "value" => '' 201 ] 202 ), 203 ), 204 205 "inputTAHoverRadius" => array( 206 "type" => "object", 207 "default" => array( 208 'lg' => [ 209 "isLinked" => true, 210 "unit" => "px", 211 "value" => '' 212 ] 213 ), 214 ), 215 216 //checkbox & radio 217 'checkboxRSize' => [ 218 'type' => 'object', 219 'default' => (object)[ 220 'lg' => '', 221 'unit' => 'px' 222 ], 223 ], 224 225 "checkboxRItemLabelSpace" => array( 226 'type' => 'object', 227 'default' => (object)[ 228 'lg' => '', 229 'unit' => 'px' 230 ], 231 ), 232 233 "checkboxRItemSpace" => array( 234 'type' => 'object', 235 'default' => (object)[ 236 'lg' => '', 237 'unit' => 'px' 238 ], 239 ), 240 241 'optionLabelColor' => array( 242 'type' => 'string', 243 'default' => '', 244 ), 245 'checkboxRBgColor' => array( 246 'type' => 'string', 247 'default' => '', 248 ), 249 250 'checkboxRCheckedColor' => array( 251 'type' => 'string', 252 'default' => '', 253 ), 254 255 "checkboxRBorderWidth" => array( 256 'type' => 'object', 257 'default' => (object)[ 258 'lg' => '', 259 'unit' => 'px' 260 ], 261 ), 262 263 'checkboxRBorderColor' => array( 264 'type' => 'string', 265 'default' => '', 266 ), 267 268 "checkboxRounded" => array( 269 'type' => 'object', 270 'default' => (object)[ 271 'lg' => '', 272 'unit' => 'px' 273 ], 274 ), 275 276 //placeholder 277 'placeholderTypo' => [ 278 'type' => 'object', 279 'default' => (object)[ 280 'openTypography' => 1, 281 'size' => (object)['lg' => '', 'unit' => 'px'], 282 'spacing' => (object)['lg' => '', 'unit' => 'px'], 283 'height' => (object)['lg' => '', 'unit' => 'px'], 284 'transform' => '', 285 'weight' => '' 286 ], 287 ], 288 'placeholderColor' => array( 289 'type' => 'string', 290 'default' => '', 291 ), 292 293 //section break 294 'sectionBGColor' => array( 295 'type' => 'string', 296 'default' => '', 297 ), 298 "sectionMargin" => array( 299 "type" => "object", 300 "default" => array( 301 'lg' => [ 302 "isLinked" => true, 303 "unit" => "px", 304 "value" => '' 305 ] 306 ), 307 ), 308 309 "sectionPadding" => array( 310 "type" => "object", 311 "default" => array( 312 'lg' => [ 313 "isLinked" => true, 314 "unit" => "px", 315 "value" => '' 316 ] 317 ), 318 ), 319 'sectionHTypo' => [ 320 'type' => 'object', 321 'default' => (object)[ 322 'openTypography' => 1, 323 'size' => (object)['lg' => '', 'unit' => 'px'], 324 'spacing' => (object)['lg' => '', 'unit' => 'px'], 325 'height' => (object)['lg' => '', 'unit' => 'px'], 326 'transform' => '', 327 'weight' => '' 328 ], 329 ], 330 'sectionHTextColor' => array( 331 'type' => 'string', 332 'default' => '', 333 ), 334 335 'sectionHBGColor' => array( 336 'type' => 'string', 337 'default' => '', 338 ), 339 340 //section description 341 'sectionDTypo' => [ 342 'type' => 'object', 343 'default' => (object)[ 344 'openTypography' => 1, 345 'size' => (object)['lg' => '', 'unit' => 'px'], 346 'spacing' => (object)['lg' => '', 'unit' => 'px'], 347 'height' => (object)['lg' => '', 'unit' => 'px'], 348 'transform' => '', 349 'weight' => '' 350 ], 351 ], 352 'sectionDTextColor' => array( 353 'type' => 'string', 354 'default' => '', 355 ), 356 'sectionDBGColor' => array( 357 'type' => 'string', 358 'default' => '', 359 ), 360 'sectionHLineColor' => array( 361 'type' => 'string', 362 'default' => '', 363 ), 364 365 //custom html 366 'customHtmlTypo' => [ 367 'type' => 'object', 368 'default' => (object)[ 369 'openTypography' => 1, 370 'size' => (object)['lg' => '', 'unit' => 'px'], 371 'spacing' => (object)['lg' => '', 'unit' => 'px'], 372 'height' => (object)['lg' => '', 'unit' => 'px'], 373 'transform' => '', 374 'weight' => '' 375 ], 376 ], 377 'customHtmlColor' => array( 378 'type' => 'string', 379 'default' => '', 380 ), 381 'customHtmlBGColor' => array( 382 'type' => 'string', 383 'default' => '', 384 ), 385 386 //submit button 387 'buttonWidth' => [ 388 'type' => 'object', 389 'default' => (object)[ 390 'lg' => '', 391 'unit' => 'px' 392 ], 393 ], 394 395 'buttonHeight' => [ 396 'type' => 'object', 397 'default' => (object)[ 398 'lg' => '', 399 'unit' => 'px' 400 ], 401 ], 402 'buttonTypo' => [ 403 'type' => 'object', 404 'default' => (object)[ 405 'openTypography' => 1, 406 'size' => (object)['lg' => '', 'unit' => 'px'], 407 'spacing' => (object)['lg' => '', 'unit' => 'px'], 408 'height' => (object)['lg' => '', 'unit' => 'px'], 409 'transform' => '', 410 'weight' => '' 411 ], 412 ], 413 414 'buttonTextColor' => array( 415 'type' => 'string', 416 'default' => '', 417 418 ), 419 420 'buttonHoverTextColor' => array( 421 'type' => 'string', 422 'default' => '', 423 ), 424 425 'buttonBGColor' => array( 426 'type' => 'string', 427 'default' => '', 428 ), 429 430 'buttonHoverBGColor' => array( 431 'type' => 'string', 432 'default' => '', 433 ), 434 435 "buttonPadding" => array( 436 "type" => "object", 437 "default" => array( 438 'lg' => [ 439 "isLinked" => true, 440 "unit" => "px", 441 "value" => '' 442 ] 443 ), 444 ), 445 446 "buttonMargin" => array( 447 "type" => "object", 448 "default" => array( 449 'lg' => [ 450 "isLinked" => true, 451 "unit" => "px", 452 "value" => '' 453 ] 454 ), 455 ), 456 "buttonBorder" => array( 457 "type" => "object", 458 "default" => array( 210 'lg' => [ 211 'isLinked' => true, 212 'unit' => 'px', 213 'value' => '', 214 ], 215 ], 216 ], 217 218 'inputTARadius' => [ 219 'type' => 'object', 220 'default' => [ 221 'lg' => [ 222 'isLinked' => true, 223 'unit' => 'px', 224 'value' => '', 225 ], 226 ], 227 ], 228 229 'inputTAHoverRadius' => [ 230 'type' => 'object', 231 'default' => [ 232 'lg' => [ 233 'isLinked' => true, 234 'unit' => 'px', 235 'value' => '', 236 ], 237 ], 238 ], 239 240 // checkbox & radio 241 'checkboxRSize' => [ 242 'type' => 'object', 243 'default' => (object) [ 244 'lg' => '', 245 'unit' => 'px', 246 ], 247 ], 248 249 'checkboxRItemLabelSpace' => [ 250 'type' => 'object', 251 'default' => (object) [ 252 'lg' => '', 253 'unit' => 'px', 254 ], 255 ], 256 257 'checkboxRItemSpace' => [ 258 'type' => 'object', 259 'default' => (object) [ 260 'lg' => '', 261 'unit' => 'px', 262 ], 263 ], 264 265 'optionLabelColor' => [ 266 'type' => 'string', 267 'default' => '', 268 ], 269 'checkboxRBgColor' => [ 270 'type' => 'string', 271 'default' => '', 272 ], 273 274 'checkboxRCheckedColor' => [ 275 'type' => 'string', 276 'default' => '', 277 ], 278 279 'checkboxRBorderWidth' => [ 280 'type' => 'object', 281 'default' => (object) [ 282 'lg' => '', 283 'unit' => 'px', 284 ], 285 ], 286 287 'checkboxRBorderColor' => [ 288 'type' => 'string', 289 'default' => '', 290 ], 291 292 'checkboxRounded' => [ 293 'type' => 'object', 294 'default' => (object) [ 295 'lg' => '', 296 'unit' => 'px', 297 ], 298 ], 299 300 // placeholder 301 'placeholderTypo' => [ 302 'type' => 'object', 303 'default' => (object) [ 304 'openTypography' => 1, 305 'size' => (object) [ 306 'lg' => '', 307 'unit' => 'px', 308 ], 309 'spacing' => (object) [ 310 'lg' => '', 311 'unit' => 'px', 312 ], 313 'height' => (object) [ 314 'lg' => '', 315 'unit' => 'px', 316 ], 317 'transform' => '', 318 'weight' => '', 319 ], 320 ], 321 'placeholderColor' => [ 322 'type' => 'string', 323 'default' => '', 324 ], 325 326 // section break 327 'sectionBGColor' => [ 328 'type' => 'string', 329 'default' => '', 330 ], 331 'sectionMargin' => [ 332 'type' => 'object', 333 'default' => [ 334 'lg' => [ 335 'isLinked' => true, 336 'unit' => 'px', 337 'value' => '', 338 ], 339 ], 340 ], 341 342 'sectionPadding' => [ 343 'type' => 'object', 344 'default' => [ 345 'lg' => [ 346 'isLinked' => true, 347 'unit' => 'px', 348 'value' => '', 349 ], 350 ], 351 ], 352 'sectionHTypo' => [ 353 'type' => 'object', 354 'default' => (object) [ 355 'openTypography' => 1, 356 'size' => (object) [ 357 'lg' => '', 358 'unit' => 'px', 359 ], 360 'spacing' => (object) [ 361 'lg' => '', 362 'unit' => 'px', 363 ], 364 'height' => (object) [ 365 'lg' => '', 366 'unit' => 'px', 367 ], 368 'transform' => '', 369 'weight' => '', 370 ], 371 ], 372 'sectionHTextColor' => [ 373 'type' => 'string', 374 'default' => '', 375 ], 376 377 'sectionHBGColor' => [ 378 'type' => 'string', 379 'default' => '', 380 ], 381 382 // section description 383 'sectionDTypo' => [ 384 'type' => 'object', 385 'default' => (object) [ 386 'openTypography' => 1, 387 'size' => (object) [ 388 'lg' => '', 389 'unit' => 'px', 390 ], 391 'spacing' => (object) [ 392 'lg' => '', 393 'unit' => 'px', 394 ], 395 'height' => (object) [ 396 'lg' => '', 397 'unit' => 'px', 398 ], 399 'transform' => '', 400 'weight' => '', 401 ], 402 ], 403 'sectionDTextColor' => [ 404 'type' => 'string', 405 'default' => '', 406 ], 407 'sectionDBGColor' => [ 408 'type' => 'string', 409 'default' => '', 410 ], 411 'sectionHLineColor' => [ 412 'type' => 'string', 413 'default' => '', 414 ], 415 416 // custom html 417 'customHtmlTypo' => [ 418 'type' => 'object', 419 'default' => (object) [ 420 'openTypography' => 1, 421 'size' => (object) [ 422 'lg' => '', 423 'unit' => 'px', 424 ], 425 'spacing' => (object) [ 426 'lg' => '', 427 'unit' => 'px', 428 ], 429 'height' => (object) [ 430 'lg' => '', 431 'unit' => 'px', 432 ], 433 'transform' => '', 434 'weight' => '', 435 ], 436 ], 437 'customHtmlColor' => [ 438 'type' => 'string', 439 'default' => '', 440 ], 441 'customHtmlBGColor' => [ 442 'type' => 'string', 443 'default' => '', 444 ], 445 446 // submit button 447 'buttonWidth' => [ 448 'type' => 'object', 449 'default' => (object) [ 450 'lg' => '', 451 'unit' => 'px', 452 ], 453 ], 454 455 'buttonHeight' => [ 456 'type' => 'object', 457 'default' => (object) [ 458 'lg' => '', 459 'unit' => 'px', 460 ], 461 ], 462 'buttonTypo' => [ 463 'type' => 'object', 464 'default' => (object) [ 465 'openTypography' => 1, 466 'size' => (object) [ 467 'lg' => '', 468 'unit' => 'px', 469 ], 470 'spacing' => (object) [ 471 'lg' => '', 472 'unit' => 'px', 473 ], 474 'height' => (object) [ 475 'lg' => '', 476 'unit' => 'px', 477 ], 478 'transform' => '', 479 'weight' => '', 480 ], 481 ], 482 483 'buttonTextColor' => [ 484 'type' => 'string', 485 'default' => '', 486 487 ], 488 489 'buttonHoverTextColor' => [ 490 'type' => 'string', 491 'default' => '', 492 ], 493 494 'buttonBGColor' => [ 495 'type' => 'string', 496 'default' => '', 497 ], 498 499 'buttonHoverBGColor' => [ 500 'type' => 'string', 501 'default' => '', 502 ], 503 504 'buttonPadding' => [ 505 'type' => 'object', 506 'default' => [ 507 'lg' => [ 508 'isLinked' => true, 509 'unit' => 'px', 510 'value' => '', 511 ], 512 ], 513 ], 514 515 'buttonMargin' => [ 516 'type' => 'object', 517 'default' => [ 518 'lg' => [ 519 'isLinked' => true, 520 'unit' => 'px', 521 'value' => '', 522 ], 523 ], 524 ], 525 'buttonBorder' => [ 526 'type' => 'object', 527 'default' => [ 459 528 'borderStyle' => '', 460 529 'borderColor' => '', 461 'lg' => [462 "isLinked"=> true,463 "unit" => "px",464 "value" => ''465 ] 466 )467 ),468 "buttonHoverBorder" => array(469 "type" => "object",470 "default" => array(530 'lg' => [ 531 'isLinked' => true, 532 'unit' => 'px', 533 'value' => '', 534 ], 535 ], 536 ], 537 'buttonHoverBorder' => [ 538 'type' => 'object', 539 'default' => [ 471 540 'borderStyle' => '', 472 541 'borderColor' => '', 473 'lg' => [ 474 "isLinked" => true, 475 "unit" => "px", 476 "value" => '' 477 ] 478 ) 479 ), 480 481 "buttonRadius" => array( 482 "type" => "object", 483 "default" => array( 484 'lg' => [ 485 "isLinked" => true, 486 "unit" => "px", 487 "value" => '' 488 ] 489 ), 490 491 ), 492 493 "buttonHoverRadius" => array( 494 "type" => "object", 495 "default" => array( 496 'lg' => [ 497 "isLinked" => true, 498 "unit" => "px", 499 "value" => '' 500 ] 501 ), 502 503 ), 504 'buttonShadow' => [ 505 'type' => 'object', 506 'default' => (object)['openShadow' => 1, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1], 'color' => '', 'inset' => false], 507 ], 508 509 'buttonHoverShadow' => [ 510 'type' => 'object', 511 'default' => (object)['openShadow' => 1, 'width' => (object)['top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1], 'color' => '', 'inset' => false], 512 ], 513 514 'successTypo' => [ 515 'type' => 'object', 516 'default' => (object)[ 517 'openTypography' => 1, 518 'size' => (object)['lg' => '', 'unit' => 'px'], 519 'spacing' => (object)['lg' => '', 'unit' => 'px'], 520 'height' => (object)['lg' => '', 'unit' => 'px'], 521 'transform' => '', 522 'weight' => '' 523 ], 524 ], 525 526 'successColor' => array( 527 'type' => 'string', 528 'default' => '', 529 ), 530 'successBGColor' => array( 531 'type' => 'string', 532 'default' => '', 533 ), 534 535 'successBorderColor' => array( 536 'type' => 'string', 537 'default' => '', 538 ), 539 540 //error 541 'errorTypo' => [ 542 'type' => 'object', 543 'default' => (object)[ 544 'openTypography' => 1, 545 'size' => (object)['lg' => '', 'unit' => 'px'], 546 'spacing' => (object)['lg' => '', 'unit' => 'px'], 547 'height' => (object)['lg' => '', 'unit' => 'px'], 548 'transform' => '', 549 'weight' => '' 550 ], 551 ], 552 553 'errorColor' => array( 554 'type' => 'string', 555 'default' => '', 556 ), 557 'errorBGColor' => array( 558 'type' => 'string', 559 'default' => '', 560 ), 561 'errorBorderColor' => array( 562 'type' => 'string', 563 'default' => '', 564 ), 542 'lg' => [ 543 'isLinked' => true, 544 'unit' => 'px', 545 'value' => '', 546 ], 547 ], 548 ], 549 550 'buttonRadius' => [ 551 'type' => 'object', 552 'default' => [ 553 'lg' => [ 554 'isLinked' => true, 555 'unit' => 'px', 556 'value' => '', 557 ], 558 ], 559 560 ], 561 562 'buttonHoverRadius' => [ 563 'type' => 'object', 564 'default' => [ 565 'lg' => [ 566 'isLinked' => true, 567 'unit' => 'px', 568 'value' => '', 569 ], 570 ], 571 572 ], 573 'buttonShadow' => [ 574 'type' => 'object', 575 'default' => (object) [ 576 'openShadow' => 1, 577 'width' => (object) [ 578 'top' => 1, 579 'right' => 1, 580 'bottom' => 1, 581 'left' => 1, 582 ], 583 'color' => '', 584 'inset' => false, 585 ], 586 ], 587 588 'buttonHoverShadow' => [ 589 'type' => 'object', 590 'default' => (object) [ 591 'openShadow' => 1, 592 'width' => (object) [ 593 'top' => 1, 594 'right' => 1, 595 'bottom' => 1, 596 'left' => 1, 597 ], 598 'color' => '', 599 'inset' => false, 600 ], 601 ], 602 603 'successTypo' => [ 604 'type' => 'object', 605 'default' => (object) [ 606 'openTypography' => 1, 607 'size' => (object) [ 608 'lg' => '', 609 'unit' => 'px', 610 ], 611 'spacing' => (object) [ 612 'lg' => '', 613 'unit' => 'px', 614 ], 615 'height' => (object) [ 616 'lg' => '', 617 'unit' => 'px', 618 ], 619 'transform' => '', 620 'weight' => '', 621 ], 622 ], 623 624 'successColor' => [ 625 'type' => 'string', 626 'default' => '', 627 ], 628 'successBGColor' => [ 629 'type' => 'string', 630 'default' => '', 631 ], 632 633 'successBorderColor' => [ 634 'type' => 'string', 635 'default' => '', 636 ], 637 638 // error 639 'errorTypo' => [ 640 'type' => 'object', 641 'default' => (object) [ 642 'openTypography' => 1, 643 'size' => (object) [ 644 'lg' => '', 645 'unit' => 'px', 646 ], 647 'spacing' => (object) [ 648 'lg' => '', 649 'unit' => 'px', 650 ], 651 'height' => (object) [ 652 'lg' => '', 653 'unit' => 'px', 654 ], 655 'transform' => '', 656 'weight' => '', 657 ], 658 ], 659 660 'errorColor' => [ 661 'type' => 'string', 662 'default' => '', 663 ], 664 'errorBGColor' => [ 665 'type' => 'string', 666 'default' => '', 667 ], 668 'errorBorderColor' => [ 669 'type' => 'string', 670 'default' => '', 671 ], 565 672 566 673 ] + parent::common_attributes(); 567 return apply_filters( 'ffblock_fluentform_block_attributes', $attributes);674 return apply_filters( 'ffblock_fluentform_block_attributes', $attributes ); 568 675 } 569 676 570 public function register_block() 571 { 572 if (defined('FLUENTFORM_VERSION')) { 677 /** 678 * Register Block 679 * 680 * @return void 681 */ 682 public function register_block() { 683 if ( defined( 'FLUENTFORM_VERSION' ) ) { 573 684 wp_register_style( 574 685 'fluent-form-styles-ffb', 575 686 plugins_url() . '/fluentform/assets/css/fluent-forms-public.css', 576 array(),687 [], 577 688 FFBLOCK_VERSION, 578 689 'all' 579 690 ); 580 691 581 // For use editor-script692 // For use editor-script. 582 693 wp_register_style( 583 694 'fluentform-public-default-ffb', 584 695 plugins_url() . '/fluentform/assets/css/fluentform-public-default.css', 585 array('fluent-form-styles-ffb', 'ffblock-frontend-css'),696 [ 'fluent-form-styles-ffb', 'ffblock-frontend-css' ], 586 697 FFBLOCK_VERSION, 587 698 'all' … … 592 703 FFBLOCK_PATH . 'app/Block/fluentform', 593 704 [ 594 'editor_style' => 'fluentform-public-default-ffb',595 'render_callback' => [$this, 'render_block'],596 'attributes' => $this->block_attributes(),705 'editor_style' => 'fluentform-public-default-ffb', 706 'render_callback' => [ $this, 'render_block' ], 707 'attributes' => $this->block_attributes(), 597 708 ] 598 709 ); 599 710 } 600 711 601 public function render_block($attributes) 602 { 712 /** 713 * Render Block 714 * 715 * @param array $attributes . 716 * @return false|string 717 */ 718 public function render_block( $attributes ) { 603 719 $template_style = 'fluentform'; 604 $data = [720 $data = [ 605 721 'settings' => $attributes, 606 722 ]; 607 723 608 $data = apply_filters( 'ffblock_fluentform_data', $data);724 $data = apply_filters( 'ffblock_fluentform_data', $data ); 609 725 ob_start(); 610 Fns::views( $template_style, $data);726 Fns::views( $template_style, $data ); 611 727 return ob_get_clean(); 612 728 } -
fluentform-block/trunk/fluentform-block.php
r3077889 r3095970 1 1 <?php 2 3 2 /** 4 3 * Plugin Name: Fluent Forms Block - Extension Of Fluent Forms 5 4 * Plugin URI: https://wordpress.org/plugins/fluentform-block 6 5 * Description: Fluent forms block is the extension of Fluent forms plugin.You can build advanced Contact form by Fluent form block. 7 * Version: 1.0. 56 * Version: 1.0.6 8 7 * Requires at least: 5.5 9 8 * Requires PHP: 7.4 … … 16 15 */ 17 16 18 defined( 'ABSPATH') || die('Keep Silent');17 defined( 'ABSPATH' ) || die( 'Keep Silent' ); 19 18 20 define( 'FFBLOCK_FILE', __FILE__);21 define( 'FFBLOCK_PATH', plugin_dir_path(FFBLOCK_FILE));19 define( 'FFBLOCK_FILE', __FILE__ ); 20 define( 'FFBLOCK_PATH', plugin_dir_path( FFBLOCK_FILE ) ); 22 21 23 if ( !defined('FFBLOCK_VERSION')) {24 define( 'FFBLOCK_VERSION', '1.0.5');22 if ( ! defined( 'FFBLOCK_VERSION' ) ) { 23 define( 'FFBLOCK_VERSION', '1.0.6' ); 25 24 } 26 25 27 if ( !class_exists('FFBlock')) {28 require_once plugin_dir_path( __FILE__) . 'app/FFBlock.php';26 if ( ! class_exists( 'FFBlock' ) ) { 27 require_once plugin_dir_path( __FILE__ ) . 'app/FFBlock.php'; 29 28 } -
fluentform-block/trunk/readme.txt
r3095968 r3095970 5 5 Requires at least: 5.0 6 6 Tested up to: 6.5 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 Requires PHP: 7.4 9 9 License: GPLv3 … … 62 62 63 63 == Changelog == 64 = 1.0.6 = 65 * Fixed: Block Attribute refactoring 66 * Fixed: Design CSS issues. 67 * Fixed: JS issues 68 64 69 = 1.0.5 = 65 70 * Fixed: Design CSS issues.
Note: See TracChangeset
for help on using the changeset viewer.