Plugin Directory

Changeset 2988803


Ignore:
Timestamp:
11/04/2023 03:54:57 AM (2 years ago)
Author:
adreastrian
Message:

releasing v5.1.1

Location:
fluentform
Files:
1029 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • fluentform/trunk/app/Hooks/actions.php

    r2987492 r2988803  
    691691
    692692add_action('fluentform/load_form_assets', function ($formId, $styles = []) {
     693    $formAssetLoader = (new \FluentForm\App\Modules\Form\Settings\FormCssJs());
     694
     695    $formAssetLoader->addCustomCssJs($formId);
     696
    693697    $notLoadedStyles = [];
    694698
     
    701705    // check if already loaded
    702706    if ($notLoadedStyles) {
    703         (new \FluentForm\App\Modules\Form\Settings\FormCssJs())->addCssJs($formId, $notLoadedStyles);
     707        $formAssetLoader->addStylerCSS($formId, $notLoadedStyles);
    704708    }
    705709}, 10, 2);
  • fluentform/trunk/app/Modules/Form/Settings/FormCssJs.php

    r2987492 r2988803  
    2020    }
    2121
    22     public function addCssJs($formId, $styles = [])
    23     {
    24         $metas = (new \FluentForm\App\Services\Settings\Customizer())->get($formId, $styles);
    25         do_action('fluentform/adding_custom_styler_css_js', $formId, $metas);
    26         $customCss = '';
     22    public function addCustomCssJs($formId)
     23    {
     24        if (did_action('fluentform/adding_custom_css_js_' . $formId)) {
     25            return;
     26        }
     27
     28        do_action('fluentform/adding_custom_css_js_' . $formId, $formId);
     29
     30        $metaKeys = ['_custom_form_css', '_custom_form_js'];
     31
     32        $metas = (new \FluentForm\App\Services\Settings\Customizer())->get($formId, $metaKeys);
    2733
    2834        foreach ($metas as $metaKey => $metaValue) {
     
    3339                        $css = str_replace('{form_id}', $formId, $css);
    3440                        $customCss = str_replace('FF_ID', $formId, $css);
     41
     42                        if ($customCss) {
     43                            $this->addCss($formId, $customCss, 'fluentform_custom_css_' . $formId);
     44                        }
    3545                        break;
    3646                    case 'js':
     
    4050            }
    4151        }
     52    }
     53
     54    public function addStylerCSS($formId, $styles = [])
     55    {
     56        $metaKeys = array_merge(
     57            ['_ff_form_styler_css', '_ff_selected_style'],
     58            $styles
     59        );
     60
     61        $metas = (new \FluentForm\App\Services\Settings\Customizer())->get($formId, $metaKeys);
    4262
    4363        foreach ($styles as $style) {
     
    7191                do_action('fluent_form/loaded_styler_' . $formId . '_' . $style);
    7292            }
    73         }
    74 
    75         if ($customCss) {
    76             $this->addCss($formId, $customCss, 'fluentform_custom_css_' . $formId);
    7793        }
    7894    }
  • fluentform/trunk/app/Services/FormBuilder/FormBuilder.php

    r2987492 r2988803  
    8080        if (!$themeStyle) {
    8181            $selectedStyle = Helper::getFormMeta($form->id, '_ff_selected_style');
    82 
    83             if ($selectedStyle) {
    84                 $themeStyle = $selectedStyle;
    85 
    86                 $atts['theme'] = $selectedStyle;
    87             }
     82            $selectedStyle = $selectedStyle ? $selectedStyle : 'ffs_default';
     83
     84            $themeStyle = $selectedStyle;
     85
     86            $atts['theme'] = $selectedStyle;
    8887        }
    8988
  • fluentform/trunk/app/Services/Settings/Customizer.php

    r2987492 r2988803  
    99class Customizer
    1010{
    11     public function get($formId, $metaKeys = [])
     11    public function get($formId, $metaKeys = ['_custom_form_css', '_custom_form_js'])
    1212    {
    13         $defaultMetaKeys = ['_custom_form_css', '_custom_form_js', '_ff_form_styler_css', '_ff_selected_style'];
    14        
    15         $metaKeys = array_merge($defaultMetaKeys, $metaKeys);
    16 
    1713        return FormMeta::where('form_id', $formId)
    1814            ->whereIn('meta_key', $metaKeys)
  • fluentform/trunk/fluentform.php

    r2987492 r2988803  
    44 * Plugin Name: Fluent Forms
    55 * Description: Contact Form By Fluent Forms is the advanced Contact form plugin with drag and drop, multi column supported form builder plugin
    6  * Version: 5.1.0
     6 * Version: 5.1.1
    77 * Author: Contact Form - WPManageNinja LLC
    88 * Author URI: https://fluentforms.com
     
    1919
    2020define('FLUENTFORM_FRAMEWORK_UPGRADE', '4.3.22');
    21 defined('FLUENTFORM_VERSION') or define('FLUENTFORM_VERSION', '5.1.0');
     21defined('FLUENTFORM_VERSION') or define('FLUENTFORM_VERSION', '5.1.1');
    2222
    2323if (!defined('FLUENTFORM_HAS_NIA')) {
  • fluentform/trunk/readme.txt

    r2987492 r2988803  
    55Tested up to: 6.3.2
    66Requires PHP: 7.1
    7 Stable tag: 5.1.0
     7Stable tag: 5.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    441441== Changelog ==
    442442
     443= 5.1.1 (Date: November 4, 2023) =
     444- Improves custom CSS & JS loading
     445
    443446= 5.1.0 (Date: November 1, 2023) =
    444447- Adds Global Search
Note: See TracChangeset for help on using the changeset viewer.