HEX
Server: nginx/1.24.0
System: Linux mail.365consultoria.com 6.8.0-1057-oracle #58~22.04.1-Ubuntu SMP Tue Jun 30 18:20:56 UTC 2026 aarch64
User: www (1002)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/laet.adv.br/wp-content/themes/betheme/muffin-options/fields/tabs/field_tabs.js
(function($) {

  /* globals jQuery */

  "use strict";

  function mfnFieldTabs() {

    // sortable init

    $('#mfn-builder').on('mouseenter', '.tabs-ul', function(e) {
      $('.tabs-ul').sortable({
        handle: 'label',
        cursor: 'move',
        opacity: 0.9
      });
    });

    // add new tab

    $('#mfn-builder').on('click', '.mfn-add-tab', function(e) {

      // increase tabs counter

      var count = $(this).siblings('.mfn-tabs-count');
      count.val(count.val() * 1 + 1);

      var name = $(this).attr('rel-name');
      var wrapper = $(this).siblings('.tabs-ul');
      var newTab = wrapper.children('li.tabs-default').clone(true);

      newTab.removeClass('tabs-default');
      newTab.children('input').attr('name', name + '[title][]');
      newTab.children('textarea').attr('name', name + '[content][]');

      wrapper
        .append(newTab)
        .children('li:last')
        .fadeIn(500);

    });

    // remove tab

    $('#mfn-builder').on('click', '.mfn-remove-tab', function(e) {
      e.preventDefault();

      // decrease tabs counter

      var count = $(this).parents('td').children('.mfn-tabs-count');
      count.val(count.val() * 1 - 1);

      $(this).parent().fadeOut(300, function() {
        $(this).remove();
      });

    });

  }

  /**
   * $(document).ready
   * Specify a function to execute when the DOM is fully loaded.
   */

  $(function($) {
    mfnFieldTabs();
  });

})(jQuery);