Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak: Enable [active_callback] For Repeater's Children #2498

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Feb 8, 2023

  1. Enable Using [active_callback] Inside Repeater Controls

    Version 4.1.1
    
    Here's the solution of using [active_callback] array inside repeater controls to allow you show/hide other controls inside repeater's rows.
    
    We've added the code in the unminified JS files until Kirki team decide to accept it and merge it to be able to minify via their minification tool.
    
    Because Kirki is using the minified js files you must minify the new code and (Only Append) to the [dist/control.js] files, DO NOT Replace the old ones.
    
    File-1: .\kirki\kirki-packages\module-field-dependencies\src\control.js
    
    Minify the new code before [jQuery(document).ready] and add it in
    .\kirki\kirki-packages\module-field-dependencies\dist\control.js
    
    Then append the line:
    
    jQuery(document).ready((function(){KirkiRepeaterDependencies.init()}));
    
    File-2: .\kirki\kirki-packages\control-repeater\src\control.js
    
    We need to add the line
    KirkiRepeaterDependencies.init();
    
    in the minified version in [dist] directory:
    .\kirki\kirki-packages\control-repeater\dist\control.js
    
    Replace the old line
    this.settingField.trigger("change")
    
    With
    (KirkiRepeaterDependencies.init(),this.settingField.trigger("change"))
    HadyShaltout committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    ecbb1d1 View commit details
    Browse the repository at this point in the history
  2. Fix Repeaters' items active_callback

    Collect all repeater controls regardless it has [active_callback] or not to fix the issue appears while the parent repeater doesn't have an [active_callback] array
    HadyShaltout committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    8744846 View commit details
    Browse the repository at this point in the history
  3. Clean Some Lines

    HadyShaltout committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    bd087f6 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. Configuration menu
    Copy the full SHA
    5bdbeec View commit details
    Browse the repository at this point in the history