Changeset 3096314
- Timestamp:
- 06/02/2024 01:44:57 PM (21 months ago)
- Location:
- fluentform-block
- Files:
-
- 48 added
- 6 edited
-
tags/2.0.0 (added)
-
tags/2.0.0/app (added)
-
tags/2.0.0/app/Block (added)
-
tags/2.0.0/app/Block/BlockBase.php (added)
-
tags/2.0.0/app/Block/Fluentform.php (added)
-
tags/2.0.0/app/Ctrl (added)
-
tags/2.0.0/app/Ctrl/Asset (added)
-
tags/2.0.0/app/Ctrl/Asset/AssetCtrl.php (added)
-
tags/2.0.0/app/Ctrl/BlockCtrl.php (added)
-
tags/2.0.0/app/Ctrl/Dependencies.php (added)
-
tags/2.0.0/app/Ctrl/FontLoader.php (added)
-
tags/2.0.0/app/Ctrl/Hook (added)
-
tags/2.0.0/app/Ctrl/Hook/HookCtrl.php (added)
-
tags/2.0.0/app/Ctrl/Hook/Type (added)
-
tags/2.0.0/app/Ctrl/Hook/Type/Action.php (added)
-
tags/2.0.0/app/Ctrl/Hook/Type/Filter.php (added)
-
tags/2.0.0/app/Ctrl/Installation.php (added)
-
tags/2.0.0/app/Ctrl/MainCtrl.php (added)
-
tags/2.0.0/app/Ctrl/StyleGenerator.php (added)
-
tags/2.0.0/app/FFBlock.php (added)
-
tags/2.0.0/app/Helper (added)
-
tags/2.0.0/app/Helper/Constant.php (added)
-
tags/2.0.0/app/Helper/Fns.php (added)
-
tags/2.0.0/app/Helper/Installation.php (added)
-
tags/2.0.0/app/Traits (added)
-
tags/2.0.0/app/Traits/Singleton.php (added)
-
tags/2.0.0/fluentform-block.php (added)
-
tags/2.0.0/index.php (added)
-
tags/2.0.0/languages (added)
-
tags/2.0.0/languages/fluentform-block.pot (added)
-
tags/2.0.0/package.json (added)
-
tags/2.0.0/readme.txt (added)
-
tags/2.0.0/uninstall.php (added)
-
tags/2.0.0/vendor (added)
-
tags/2.0.0/vendor/autoload.php (added)
-
tags/2.0.0/vendor/composer (added)
-
tags/2.0.0/vendor/composer/ClassLoader.php (added)
-
tags/2.0.0/vendor/composer/InstalledVersions.php (added)
-
tags/2.0.0/vendor/composer/LICENSE (added)
-
tags/2.0.0/vendor/composer/autoload_classmap.php (added)
-
tags/2.0.0/vendor/composer/autoload_namespaces.php (added)
-
tags/2.0.0/vendor/composer/autoload_psr4.php (added)
-
tags/2.0.0/vendor/composer/autoload_real.php (added)
-
tags/2.0.0/vendor/composer/autoload_static.php (added)
-
tags/2.0.0/vendor/composer/installed.json (added)
-
tags/2.0.0/vendor/composer/installed.php (added)
-
tags/2.0.0/views (added)
-
tags/2.0.0/views/fluentform.php (added)
-
trunk/app/Block/Fluentform.php (modified) (1 diff)
-
trunk/app/Ctrl/Asset/AssetCtrl.php (modified) (4 diffs)
-
trunk/app/FFBlock.php (modified) (8 diffs)
-
trunk/fluentform-block.php (modified) (2 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fluentform-block/trunk/app/Block/Fluentform.php
r3095970 r3096314 701 701 702 702 register_block_type( 703 FFBLOCK_PATH . ' app/Block/fluentform',703 FFBLOCK_PATH . 'build', 704 704 [ 705 705 'editor_style' => 'fluentform-public-default-ffb', -
fluentform-block/trunk/app/Ctrl/Asset/AssetCtrl.php
r3018264 r3096314 22 22 wp_enqueue_style( 23 23 'ffblock-frontend-css', 24 ffblock()->get_asset_uri(' blocks/style-index.css'),24 ffblock()->get_asset_uri('style-index.css'), 25 25 array(), 26 26 $this->version … … 32 32 wp_enqueue_style( 33 33 'ffblock-component-css', 34 ffblock()->get_asset_uri(' blocks/index.css'),34 ffblock()->get_asset_uri('index.css'), 35 35 array(), 36 36 $this->version … … 41 41 public function block_editor_scripts() 42 42 { 43 $script_block_asset_path = FFBLOCK_PATH . ' assets/blocks/index.asset.php';43 $script_block_asset_path = FFBLOCK_PATH . 'build/index.asset.php'; 44 44 45 45 $script_block_dependencies = require($script_block_asset_path); … … 57 57 wp_enqueue_script( 58 58 'ffblock-editor-script', 59 ffblock()->get_asset_uri(' blocks/index.js'),59 ffblock()->get_asset_uri('index.js'), 60 60 $blocks_dependencies_marged, 61 61 $script_block_dependencies['version'], -
fluentform-block/trunk/app/FFBlock.php
r3022517 r3096314 7 7 use FFBlock\Ctrl\Dependencies; 8 8 9 if (!defined('ABSPATH')) exit; 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } 10 12 11 13 require_once FFBLOCK_PATH . 'vendor/autoload.php'; … … 19 21 use Singleton; 20 22 23 /** 24 * @var string 25 */ 21 26 public $nonceId = 'ffblock_wpnonce'; 22 27 … … 26 31 public function __construct() { 27 32 new Constant(); 28 add_action( 'init', [$this, 'language']);29 add_action( 'plugins_loaded', [$this, 'init'], 100);33 add_action( 'init', [ $this, 'language' ] ); 34 add_action( 'plugins_loaded', [ $this, 'init' ], 100 ); 30 35 // Register Plugin Active Hook. 31 register_activation_hook( FFBLOCK_FILE, [Installation::class, 'activate']);36 register_activation_hook( FFBLOCK_FILE, [ Installation::class, 'activate' ] ); 32 37 // Register Plugin Deactivate Hook. 33 register_deactivation_hook( FFBLOCK_FILE, [Installation::class, 'deactivation']);38 register_deactivation_hook( FFBLOCK_FILE, [ Installation::class, 'deactivation' ] ); 34 39 } 35 40 41 /** 42 * Plugins loaded init file 43 * 44 * @return void 45 */ 36 46 public function init() { 37 if ( !Dependencies::getInstance()->check()) {47 if ( ! Dependencies::getInstance()->check() ) { 38 48 return; 39 49 } 40 do_action( 'ffblock_before_init');50 do_action( 'ffblock_before_init' ); 41 51 42 52 new MainCtrl(); 43 53 44 do_action( 'ffblock_init');54 do_action( 'ffblock_init' ); 45 55 } 46 56 … … 49 59 */ 50 60 public function language() { 51 load_plugin_textdomain( 'fluentform-block', false, FFBLOCK_ABSPATH . '/languages/');61 load_plugin_textdomain( 'fluentform-block', false, FFBLOCK_ABSPATH . '/languages/' ); 52 62 } 53 63 … … 59 69 * @return bool 60 70 */ 61 public function is_request( $type) {62 switch ( $type) {71 public function is_request( $type ) { 72 switch ( $type ) { 63 73 case 'admin': 64 74 return is_admin(); 65 75 case 'public': 66 return ( !is_admin() || defined('DOING_AJAX')) && !defined('DOING_CRON');76 return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ); 67 77 case 'ajax': 68 return defined( 'DOING_AJAX');78 return defined( 'DOING_AJAX' ); 69 79 case 'cron': 70 return defined( 'DOING_CRON');80 return defined( 'DOING_CRON' ); 71 81 } 72 82 } … … 78 88 */ 79 89 public function plugin_path() { 80 return untrailingslashit( plugin_dir_path(FFBLOCK_FILE));90 return untrailingslashit( plugin_dir_path( FFBLOCK_FILE ) ); 81 91 } 82 92 … … 91 101 92 102 /** 93 * @param $file 103 * Get build uri 104 * 105 * @param string $file . 94 106 * 95 107 * @return string 96 108 */ 97 public function get_asset_uri( $file) {98 $file = ltrim( $file, '/');109 public function get_asset_uri( $file ) { 110 $file = ltrim( $file, '/' ); 99 111 100 return trailingslashit( FFBLOCK_URL . '/assets') . $file;112 return trailingslashit( FFBLOCK_URL . '/build' ) . $file; 101 113 } 102 114 103 115 /** 104 * @param $file116 * Render block 105 117 * 106 * @return string 118 * @param string $viewName . 119 * @param array $args . 120 * @param boolean $return . 121 * @return false|string|void 107 122 */ 108 public function render( $viewName, $args = array(), $return = false) {109 $path = str_replace(".", "/", $viewName);123 public function render( $viewName, $args = [], $return = false ) { 124 $path = str_replace( '.', '/', $viewName ); 110 125 $viewPath = FFBLOCK_PATH . 'view/' . $path . '.php'; 111 126 112 if ( !file_exists($viewPath)) {127 if ( ! file_exists( $viewPath ) ) { 113 128 return; 114 129 } 115 130 116 if ( $args) {117 extract( $args);131 if ( $args ) { 132 extract( $args ); 118 133 } 119 134 120 if ( $return) {135 if ( $return ) { 121 136 ob_start(); 122 137 include $viewPath; … … 134 149 return FFBlock::getInstance(); 135 150 } 136 ffblock(); // Run Ffb Plugin151 ffblock(); -
fluentform-block/trunk/fluentform-block.php
r3095970 r3096314 1 1 <?php 2 2 /** 3 * Plugin Name: Fluent Forms Block - Extension Of Fluent Forms3 * Plugin Name: Fluent Forms Block 4 4 * Plugin URI: https://wordpress.org/plugins/fluentform-block 5 5 * Description: Fluent forms block is the extension of Fluent forms plugin.You can build advanced Contact form by Fluent form block. 6 * Version: 1.0.66 * Version: 2.0.0 7 7 * Requires at least: 5.5 8 8 * Requires PHP: 7.4 … … 21 21 22 22 if ( ! defined( 'FFBLOCK_VERSION' ) ) { 23 define( 'FFBLOCK_VERSION', ' 1.0.6' );23 define( 'FFBLOCK_VERSION', '2.0.0' ); 24 24 } 25 25 -
fluentform-block/trunk/package.json
r3020401 r3096314 5 5 "main": "index.js", 6 6 "scripts": { 7 "start": "wp-scripts start --output-path=assets/blocks",8 "build": "wp-scripts build --output-path=assets/blocks",7 "start": "wp-scripts start", 8 "build": "wp-scripts build", 9 9 "zip": "wp-scripts plugin-zip" 10 10 }, -
fluentform-block/trunk/readme.txt
r3095970 r3096314 1 === Fluent Forms Block - Extension Of Fluent Forms===1 === Fluent Forms Block === 2 2 Contributors: wpmetablock 3 3 Donate link: 4 Tags: gutenberg form, block form, fluent form block, custom form, contact form block.4 Tags: gutenberg form, contact form, forms, custom form, form builder. 5 5 Requires at least: 5.0 6 6 Tested up to: 6.5 7 Stable tag: 1.0.67 Stable tag: 2.0.0 8 8 Requires PHP: 7.4 9 9 License: GPLv3 … … 62 62 63 63 == Changelog == 64 = 2.0.0 ( June 2, 2024 ) = 65 * Fixed: Plugins restructure 66 * Fixed: Design CSS issues. 67 * Fixed: JS issues 68 64 69 = 1.0.6 = 65 70 * Fixed: Block Attribute refactoring
Note: See TracChangeset
for help on using the changeset viewer.