| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/pods/components/Templates/assets/js/ |
Upload File : |
(function () {
"use strict";
var Pos = CodeMirror.Pos;
function getFields(cm, option) {
var cur = cm.getCursor(), token = cm.getTokenAt(cur), result = [];
if (option.type === 'fields') {
var typeclass = '.pods-magic-tag-option', wrap = {start: "{@", end: "}"},
prefix = token.string.split('@')[1], start = ((token.start - 1) + token.string.split('@')[0].length);
} else {
if (option.type === 'each') {
var typeclass = '.pod-field-each', wrap = {start: "[each ", end: "]"}, prefix = token.string.slice(6),
start = token.start;
}
}
jQuery(typeclass).each(function () {
var label = jQuery(this).text().trim(), field = jQuery(this).text().trim();
if (label.indexOf(prefix) == 0 || field.indexOf(prefix) == 0) {
result.push({text: wrap.start + field, displayText: '{@' + (display == 'label' ? label : field) + '}'});
}
});
if (result.length < 2) {
if (prefix.length >= 1 && result.length > 0) {
result[0].text += wrap.end;
}
}
return {
list: result, from: Pos(cur.line, start), to: Pos(cur.line, token.end)
};
}
CodeMirror.registerHelper("hint", "podfield", getFields);
})();
var hidehints = false, display = 'fields';
function podFields(cm, e) {
var cur = cm.getCursor();
if (e.keyCode === 27) {
hidehints = (hidehints ? false : true);
}
if (e.keyCode === 18) {
display = (display == 'label' ? 'fields' : 'label');
}
if (e.keyCode === 8) {
return;
}
if (typeof pred === 'undefined' || typeof pred === 'object') {
if (!cm.state.completionActive || e.keyCode === 18) {
var cur = cm.getCursor(), token = cm.getTokenAt(cur), prefix, prefix = token.string.slice(0);
if (prefix) {
if (token.type === 'mustache') {
if (hidehints === false) {
CodeMirror.showHint(cm, CodeMirror.hint.podfield, {type: 'fields'});
}
} else {
if (prefix.indexOf('[l') == 0 || prefix.indexOf('[@') == 0) {
if (hidehints === false) {
CodeMirror.showHint(cm, CodeMirror.hint.podfield, {type: 'each'});
}
} else {
hidehints = false;
}
}
}
}
}
return;
}
/* Setup Editors */
var mustache = function (stream, state) {
var ch;
if (stream.match("{@")) {
while ((ch = stream.next()) != null) {
if (stream.eat("}")) {
break;
}
}
return "mustache";
}
if (stream.match("{&")) {
while ((ch = stream.next()) != null) {
if (ch == "}") {
break;
}
}
stream.eat("}");
return "mustacheinternal";
}
if (stream.match("{_")) {
while ((ch = stream.next()) != null) {
if (ch == "}") {
break;
}
}
stream.eat("}");
return "mustacheinternal";
}
if (stream.match("[/each]") || stream.match("[else]") || stream.match("[/if]") || stream.match("[/pod]")) {
return "command";
}
if (stream.match("[before]") || stream.match("[after]") || stream.match("[/before]") || stream.match("[/after]") || stream.match("[once]") || stream.match("[/once]")) {
return "mustacheinternal";
}
if (stream.match("[each") || stream.match("[if") || stream.match("[pod")) {
while ((ch = stream.next()) != null) {
if (stream.eat("]")) {
break;
}
}
return "command";
}
/*
if (stream.match("[[")) {
while ((ch = stream.next()) != null)
if (ch == "]" && stream.next() == "]") break;
stream.eat("]");
return "include";
}*/
while (stream.next() != null && !stream.match("{@", false) && !stream.match("{&", false) && !stream.match("{_", false) && !stream.match("{{_", false) && !stream.match("[before]", false) && !stream.match("[/before]", false) && !stream.match("[after]", false) && !stream.match("[/after]", false) && !stream.match("[once]", false) && !stream.match("[/once]", false) && !stream.match("[each", false) && !stream.match("[/each]", false) && !stream.match("[pod", false) && !stream.match("[/pod]", false) && !stream.match("[if", false) && !stream.match("[else]", false) && !stream.match("[/if]", false)) {
}
return null;
};