Plugin Directory

Changeset 3096314


Ignore:
Timestamp:
06/02/2024 01:44:57 PM (21 months ago)
Author:
wpmetablock
Message:

update version and plugin restructure

Location:
fluentform-block
Files:
48 added
6 edited

Legend:

Unmodified
Added
Removed
  • fluentform-block/trunk/app/Block/Fluentform.php

    r3095970 r3096314  
    701701
    702702        register_block_type(
    703             FFBLOCK_PATH . 'app/Block/fluentform',
     703            FFBLOCK_PATH . 'build',
    704704            [
    705705                'editor_style'    => 'fluentform-public-default-ffb',
  • fluentform-block/trunk/app/Ctrl/Asset/AssetCtrl.php

    r3018264 r3096314  
    2222        wp_enqueue_style(
    2323            'ffblock-frontend-css',
    24             ffblock()->get_asset_uri('blocks/style-index.css'),
     24            ffblock()->get_asset_uri('style-index.css'),
    2525            array(),
    2626            $this->version
     
    3232            wp_enqueue_style(
    3333                'ffblock-component-css',
    34                 ffblock()->get_asset_uri('blocks/index.css'),
     34                ffblock()->get_asset_uri('index.css'),
    3535                array(),
    3636                $this->version
     
    4141    public function block_editor_scripts()
    4242    {
    43         $script_block_asset_path = FFBLOCK_PATH . 'assets/blocks/index.asset.php';
     43        $script_block_asset_path = FFBLOCK_PATH . 'build/index.asset.php';
    4444
    4545        $script_block_dependencies = require($script_block_asset_path);
     
    5757        wp_enqueue_script(
    5858            'ffblock-editor-script',
    59             ffblock()->get_asset_uri('blocks/index.js'),
     59            ffblock()->get_asset_uri('index.js'),
    6060            $blocks_dependencies_marged,
    6161            $script_block_dependencies['version'],
  • fluentform-block/trunk/app/FFBlock.php

    r3022517 r3096314  
    77use FFBlock\Ctrl\Dependencies;
    88
    9 if (!defined('ABSPATH')) exit;
     9if ( ! defined( 'ABSPATH' ) ) {
     10    exit;
     11}
    1012
    1113require_once FFBLOCK_PATH . 'vendor/autoload.php';
     
    1921    use Singleton;
    2022
     23    /**
     24     * @var string
     25     */
    2126    public $nonceId = 'ffblock_wpnonce';
    2227
     
    2631    public function __construct() {
    2732        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 );
    3035        // Register Plugin Active Hook.
    31         register_activation_hook(FFBLOCK_FILE, [Installation::class, 'activate']);
     36        register_activation_hook( FFBLOCK_FILE, [ Installation::class, 'activate' ] );
    3237        // Register Plugin Deactivate Hook.
    33         register_deactivation_hook(FFBLOCK_FILE, [Installation::class, 'deactivation']);
     38        register_deactivation_hook( FFBLOCK_FILE, [ Installation::class, 'deactivation' ] );
    3439    }
    3540
     41    /**
     42     * Plugins loaded init file
     43     *
     44     * @return void
     45     */
    3646    public function init() {
    37         if (!Dependencies::getInstance()->check()) {
     47        if ( ! Dependencies::getInstance()->check() ) {
    3848            return;
    3949        }
    40         do_action('ffblock_before_init');
     50        do_action( 'ffblock_before_init' );
    4151
    4252        new MainCtrl();
    4353
    44         do_action('ffblock_init');
     54        do_action( 'ffblock_init' );
    4555    }
    4656
     
    4959     */
    5060    public function language() {
    51         load_plugin_textdomain('fluentform-block', false, FFBLOCK_ABSPATH . '/languages/');
     61        load_plugin_textdomain( 'fluentform-block', false, FFBLOCK_ABSPATH . '/languages/' );
    5262    }
    5363
     
    5969     * @return bool
    6070     */
    61     public function is_request($type) {
    62         switch ($type) {
     71    public function is_request( $type ) {
     72        switch ( $type ) {
    6373            case 'admin':
    6474                return is_admin();
    6575            case 'public':
    66                 return (!is_admin() || defined('DOING_AJAX')) && !defined('DOING_CRON');
     76                return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );
    6777            case 'ajax':
    68                 return defined('DOING_AJAX');
     78                return defined( 'DOING_AJAX' );
    6979            case 'cron':
    70                 return defined('DOING_CRON');
     80                return defined( 'DOING_CRON' );
    7181        }
    7282    }
     
    7888     */
    7989    public function plugin_path() {
    80         return untrailingslashit(plugin_dir_path(FFBLOCK_FILE));
     90        return untrailingslashit( plugin_dir_path( FFBLOCK_FILE ) );
    8191    }
    8292
     
    91101
    92102    /**
    93      * @param $file
     103     * Get build uri
     104     *
     105     * @param string $file .
    94106     *
    95107     * @return string
    96108     */
    97     public function get_asset_uri($file) {
    98         $file = ltrim($file, '/');
     109    public function get_asset_uri( $file ) {
     110        $file = ltrim( $file, '/' );
    99111
    100         return trailingslashit(FFBLOCK_URL . '/assets') . $file;
     112        return trailingslashit( FFBLOCK_URL . '/build' ) . $file;
    101113    }
    102114
    103115    /**
    104      * @param $file
     116     * Render block
    105117     *
    106      * @return string
     118     * @param string  $viewName .
     119     * @param array   $args .
     120     * @param boolean $return .
     121     * @return false|string|void
    107122     */
    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 );
    110125        $viewPath = FFBLOCK_PATH . 'view/' . $path . '.php';
    111126
    112         if (!file_exists($viewPath)) {
     127        if ( ! file_exists( $viewPath ) ) {
    113128            return;
    114129        }
    115130
    116         if ($args) {
    117             extract($args);
     131        if ( $args ) {
     132            extract( $args );
    118133        }
    119134
    120         if ($return) {
     135        if ( $return ) {
    121136            ob_start();
    122137            include $viewPath;
     
    134149    return FFBlock::getInstance();
    135150}
    136 ffblock(); // Run Ffb Plugin
     151ffblock();
  • fluentform-block/trunk/fluentform-block.php

    r3095970 r3096314  
    11<?php
    22/**
    3  * Plugin Name:       Fluent Forms Block - Extension Of Fluent Forms
     3 * Plugin Name:       Fluent Forms Block
    44 * Plugin URI:        https://wordpress.org/plugins/fluentform-block
    55 * 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.6
     6 * Version:           2.0.0
    77 * Requires at least: 5.5
    88 * Requires PHP:      7.4
     
    2121
    2222if ( ! defined( 'FFBLOCK_VERSION' ) ) {
    23     define( 'FFBLOCK_VERSION', '1.0.6' );
     23    define( 'FFBLOCK_VERSION', '2.0.0' );
    2424}
    2525
  • fluentform-block/trunk/package.json

    r3020401 r3096314  
    55    "main": "index.js",
    66    "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",
    99        "zip": "wp-scripts plugin-zip"
    1010    },
  • fluentform-block/trunk/readme.txt

    r3095970 r3096314  
    1 === Fluent Forms Block - Extension Of Fluent Forms ===
     1=== Fluent Forms Block ===
    22Contributors: wpmetablock
    33Donate link:
    4 Tags: gutenberg form, block form, fluent form block, custom form, contact form block.
     4Tags: gutenberg form, contact form, forms, custom form, form builder.
    55Requires at least: 5.0
    66Tested up to: 6.5
    7 Stable tag: 1.0.6
     7Stable tag: 2.0.0
    88Requires PHP: 7.4
    99License: GPLv3
     
    6262
    6363== Changelog ==
     64= 2.0.0 ( June 2, 2024 ) =
     65* Fixed: Plugins restructure
     66* Fixed: Design CSS issues.
     67* Fixed: JS issues
     68
    6469= 1.0.6 =
    6570* Fixed: Block Attribute refactoring
Note: See TracChangeset for help on using the changeset viewer.