Plugin Directory

Changeset 3035900


Ignore:
Timestamp:
02/14/2024 09:43:40 PM (2 years ago)
Author:
lesion
Message:

allow collection and maxlength attribute

Location:
wpgancio/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpgancio/trunk/gancio.php

    r2885629 r3035900  
    44Plugin URI:  https://gancio.org
    55Description: Connects an user of a gancio instance to a Wordpress user so that published events are automatically pushed with Gancio API.
    6 Version:     1.7
     6Version:     1.8
    77Author:      Gancio
    88License:  AGPL 3.0
  • wpgancio/trunk/js/gancio-events.es.js

    r2885629 r3035900  
    1 function L() {
     1function G() {
    22}
    33function W(t) {
    44  return t();
    55}
    6 function ee() {
     6function Y() {
    77  return /* @__PURE__ */ Object.create(null);
    88}
    9 function O(t) {
     9function U(t) {
    1010  t.forEach(W);
    1111}
    12 function _e(t) {
     12function ge(t) {
    1313  return typeof t == "function";
    1414}
    15 function be(t, e) {
     15function _e(t, e) {
    1616  return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
    1717}
    1818let B;
    19 function G(t, e) {
     19function H(t, e) {
    2020  return B || (B = document.createElement("a")), B.href = e, t === B.href;
    2121}
    22 function xe(t) {
     22function ye(t) {
    2323  return Object.keys(t).length === 0;
    2424}
     
    2626  t.appendChild(e);
    2727}
    28 function v(t, e, i) {
     28function k(t, e, i) {
    2929  t.insertBefore(e, i || null);
    3030}
     
    3232  t.parentNode.removeChild(t);
    3333}
    34 function pe(t, e) {
     34function be(t, e) {
    3535  for (let i = 0; i < t.length; i += 1)
    3636    t[i] && t[i].d(e);
    3737}
    38 function g(t) {
     38function m(t) {
    3939  return document.createElement(t);
    4040}
    41 function j(t) {
     41function z(t) {
    4242  return document.createTextNode(t);
    4343}
    44 function z() {
    45   return j(" ");
    46 }
    47 function ve() {
    48   return j("");
     44function C() {
     45  return z(" ");
     46}
     47function pe() {
     48  return z("");
    4949}
    5050function a(t, e, i) {
    5151  i == null ? t.removeAttribute(e) : t.getAttribute(e) !== i && t.setAttribute(e, i);
    5252}
    53 function $e(t) {
     53function xe(t) {
    5454  return Array.from(t.childNodes);
    5555}
    56 function N(t, e) {
     56function T(t, e) {
    5757  e = "" + e, t.wholeText !== e && (t.data = e);
    5858}
    59 function T(t, e, i) {
     59function L(t, e, i) {
    6060  t.classList[i ? "add" : "remove"](e);
    6161}
    62 function ke(t) {
     62function ve(t) {
    6363  const e = {};
    6464  for (const i of t)
     
    6666  return e;
    6767}
    68 let I;
    69 function R(t) {
    70   I = t;
     68let O;
     69function I(t) {
     70  O = t;
    7171}
    7272function Ee() {
    73   if (!I)
     73  if (!O)
    7474    throw new Error("Function called outside component initialization");
    75   return I;
    76 }
    77 function we(t) {
     75  return O;
     76}
     77function ke(t) {
    7878  Ee().$$.on_mount.push(t);
    7979}
    80 const H = [], te = [], P = [], ie = [], je = Promise.resolve();
     80const R = [], Z = [], P = [], ee = [], $e = Promise.resolve();
    8181let K = !1;
    82 function Se() {
    83   K || (K = !0, je.then(y));
     82function je() {
     83  K || (K = !0, $e.then(y));
    8484}
    8585function Q(t) {
     
    8989let D = 0;
    9090function y() {
    91   const t = I;
     91  const t = O;
    9292  do {
    93     for (; D < H.length; ) {
    94       const e = H[D];
    95       D++, R(e), ze(e.$$);
    96     }
    97     for (R(null), H.length = 0, D = 0; te.length; )
    98       te.pop()();
     93    for (; D < R.length; ) {
     94      const e = R[D];
     95      D++, I(e), Se(e.$$);
     96    }
     97    for (I(null), R.length = 0, D = 0; Z.length; )
     98      Z.pop()();
    9999    for (let e = 0; e < P.length; e += 1) {
    100100      const i = P[e];
     
    102102    }
    103103    P.length = 0;
    104   } while (H.length);
    105   for (; ie.length; )
    106     ie.pop()();
    107   K = !1, J.clear(), R(t);
    108 }
    109 function ze(t) {
     104  } while (R.length);
     105  for (; ee.length; )
     106    ee.pop()();
     107  K = !1, J.clear(), I(t);
     108}
     109function Se(t) {
    110110  if (t.fragment !== null) {
    111     t.update(), O(t.before_update);
     111    t.update(), U(t.before_update);
    112112    const e = t.dirty;
    113113    t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(Q);
    114114  }
    115115}
    116 const Ce = /* @__PURE__ */ new Set();
    117 function Ae(t, e) {
    118   t && t.i && (Ce.delete(t), t.i(e));
    119 }
    120 function Me(t, e, i, l) {
    121   const { fragment: n, on_mount: o, on_destroy: r, after_update: f } = t.$$;
     116const ze = /* @__PURE__ */ new Set();
     117function Ce(t, e) {
     118  t && t.i && (ze.delete(t), t.i(e));
     119}
     120function Ae(t, e, i, l) {
     121  const { fragment: n, on_mount: r, on_destroy: o, after_update: f } = t.$$;
    122122  n && n.m(e, i), l || Q(() => {
    123     const c = o.map(W).filter(_e);
    124     r ? r.push(...c) : O(c), t.$$.on_mount = [];
     123    const s = r.map(W).filter(ge);
     124    o ? o.push(...s) : U(s), t.$$.on_mount = [];
    125125  }), f.forEach(Q);
    126126}
     127function Me(t, e) {
     128  const i = t.$$;
     129  i.fragment !== null && (U(i.on_destroy), i.fragment && i.fragment.d(e), i.on_destroy = i.fragment = null, i.ctx = []);
     130}
    127131function Ne(t, e) {
    128   const i = t.$$;
    129   i.fragment !== null && (O(i.on_destroy), i.fragment && i.fragment.d(e), i.on_destroy = i.fragment = null, i.ctx = []);
    130 }
    131 function Te(t, e) {
    132   t.$$.dirty[0] === -1 && (H.push(t), Se(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
    133 }
    134 function ye(t, e, i, l, n, o, r, f = [-1]) {
    135   const c = I;
    136   R(t);
    137   const s = t.$$ = {
     132  t.$$.dirty[0] === -1 && (R.push(t), je(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
     133}
     134function we(t, e, i, l, n, r, o, f = [-1]) {
     135  const s = O;
     136  I(t);
     137  const c = t.$$ = {
    138138    fragment: null,
    139139    ctx: null,
    140     props: o,
    141     update: L,
     140    props: r,
     141    update: G,
    142142    not_equal: n,
    143     bound: ee(),
     143    bound: Y(),
    144144    on_mount: [],
    145145    on_destroy: [],
     
    147147    before_update: [],
    148148    after_update: [],
    149     context: new Map(e.context || (c ? c.$$.context : [])),
    150     callbacks: ee(),
     149    context: new Map(e.context || (s ? s.$$.context : [])),
     150    callbacks: Y(),
    151151    dirty: f,
    152152    skip_bound: !1,
    153     root: e.target || c.$$.root
    154   };
    155   r && r(s.root);
    156   let k = !1;
    157   if (s.ctx = i ? i(t, e.props || {}, (m, _, ...C) => {
    158     const w = C.length ? C[0] : _;
    159     return s.ctx && n(s.ctx[m], s.ctx[m] = w) && (!s.skip_bound && s.bound[m] && s.bound[m](w), k && Te(t, m)), _;
    160   }) : [], s.update(), k = !0, O(s.before_update), s.fragment = l ? l(s.ctx) : !1, e.target) {
     153    root: e.target || s.$$.root
     154  };
     155  o && o(c.root);
     156  let w = !1;
     157  if (c.ctx = i ? i(t, e.props || {}, (g, _, ...A) => {
     158    const E = A.length ? A[0] : _;
     159    return c.ctx && n(c.ctx[g], c.ctx[g] = E) && (!c.skip_bound && c.bound[g] && c.bound[g](E), w && Ne(t, g)), _;
     160  }) : [], c.update(), w = !0, U(c.before_update), c.fragment = l ? l(c.ctx) : !1, e.target) {
    161161    if (e.hydrate) {
    162       const m = $e(e.target);
    163       s.fragment && s.fragment.l(m), m.forEach(x);
     162      const g = xe(e.target);
     163      c.fragment && c.fragment.l(g), g.forEach(x);
    164164    } else
    165       s.fragment && s.fragment.c();
    166     e.intro && Ae(t.$$.fragment), Me(t, e.target, e.anchor, e.customElement), y();
    167   }
    168   R(c);
     165      c.fragment && c.fragment.c();
     166    e.intro && Ce(t.$$.fragment), Ae(t, e.target, e.anchor, e.customElement), y();
     167  }
     168  I(s);
    169169}
    170170let X;
     
    175175  connectedCallback() {
    176176    const { on_mount: t } = this.$$;
    177     this.$$.on_disconnect = t.map(W).filter(_e);
     177    this.$$.on_disconnect = t.map(W).filter(ge);
    178178    for (const e in this.$$.slotted)
    179179      this.appendChild(this.$$.slotted[e]);
     
    183183  }
    184184  disconnectedCallback() {
    185     O(this.$$.on_disconnect);
     185    U(this.$$.on_disconnect);
    186186  }
    187187  $destroy() {
    188     Ne(this, 1), this.$destroy = L;
     188    Me(this, 1), this.$destroy = G;
    189189  }
    190190  $on(t, e) {
     
    196196  }
    197197  $set(t) {
    198     this.$$set && !xe(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
     198    this.$$set && !ye(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
    199199  }
    200200});
     
    212212  return t.multidate ? F(t.start_datetime) + " - " + F(t.end_datetime) : F(t.start_datetime) + (t.end_datetime ? "-" + F(t.end_datetime, "short") : "");
    213213}
    214 function le(t, e, i) {
     214function te(t, e, i) {
    215215  const l = t.slice();
    216   return l[12] = e[i], l;
    217 }
    218 function ne(t, e, i) {
     216  return l[13] = e[i], l;
     217}
     218function ie(t, e, i) {
    219219  const l = t.slice();
    220   return l[15] = e[i], l;
    221 }
    222 function re(t) {
     220  return l[16] = e[i], l;
     221}
     222function le(t) {
    223223  let e;
    224224  return {
    225225    c() {
    226       e = g("link"), a(e, "rel", "stylesheet"), a(e, "href", t[4]);
     226      e = m("link"), a(e, "rel", "stylesheet"), a(e, "href", t[4]);
    227227    },
    228228    m(i, l) {
    229       v(i, e, l);
     229      k(i, e, l);
    230230    },
    231231    p(i, l) {
     
    237237  };
    238238}
     239function ne(t) {
     240  let e, i, l = t[1] && t[3] === "true" && re(t), n = t[5], r = [];
     241  for (let o = 0; o < n.length; o += 1)
     242    r[o] = fe(te(t, n, o));
     243  return {
     244    c() {
     245      e = m("div"), l && l.c(), i = C();
     246      for (let o = 0; o < r.length; o += 1)
     247        r[o].c();
     248      a(e, "id", "gancioEvents"), L(e, "dark", t[2] === "dark"), L(e, "light", t[2] === "light"), L(e, "sidebar", t[3] === "true"), L(e, "nosidebar", t[3] !== "true");
     249    },
     250    m(o, f) {
     251      k(o, e, f), l && l.m(e, null), u(e, i);
     252      for (let s = 0; s < r.length; s += 1)
     253        r[s].m(e, null);
     254    },
     255    p(o, f) {
     256      if (o[1] && o[3] === "true" ? l ? l.p(o, f) : (l = re(o), l.c(), l.m(e, i)) : l && (l.d(1), l = null), f & 41) {
     257        n = o[5];
     258        let s;
     259        for (s = 0; s < n.length; s += 1) {
     260          const c = te(o, n, s);
     261          r[s] ? r[s].p(c, f) : (r[s] = fe(c), r[s].c(), r[s].m(e, null));
     262        }
     263        for (; s < r.length; s += 1)
     264          r[s].d(1);
     265        r.length = n.length;
     266      }
     267      f & 4 && L(e, "dark", o[2] === "dark"), f & 4 && L(e, "light", o[2] === "light"), f & 8 && L(e, "sidebar", o[3] === "true"), f & 8 && L(e, "nosidebar", o[3] !== "true");
     268    },
     269    d(o) {
     270      o && x(e), l && l.d(), be(r, o);
     271    }
     272  };
     273}
     274function re(t) {
     275  let e, i, l, n, r, o, f;
     276  return {
     277    c() {
     278      e = m("a"), i = m("div"), l = m("div"), n = z(t[1]), r = C(), o = m("img"), a(l, "class", "title"), a(o, "id", "logo"), a(o, "alt", "logo"), H(o.src, f = t[0] + "/logo.png") || a(o, "src", f), a(i, "class", "content"), a(e, "href", t[0]), a(e, "target", "_blank"), a(e, "id", "header");
     279    },
     280    m(s, c) {
     281      k(s, e, c), u(e, i), u(i, l), u(l, n), u(i, r), u(i, o);
     282    },
     283    p(s, c) {
     284      c & 2 && T(n, s[1]), c & 1 && !H(o.src, f = s[0] + "/logo.png") && a(o, "src", f), c & 1 && a(e, "href", s[0]);
     285    },
     286    d(s) {
     287      s && x(e);
     288    }
     289  };
     290}
    239291function oe(t) {
    240   let e, i, l = t[1] && t[3] === "true" && ae(t), n = t[5], o = [];
    241   for (let r = 0; r < n.length; r += 1)
    242     o[r] = ue(le(t, n, r));
    243   return {
    244     c() {
    245       e = g("div"), l && l.c(), i = z();
    246       for (let r = 0; r < o.length; r += 1)
    247         o[r].c();
    248       a(e, "id", "gancioEvents"), T(e, "dark", t[2] === "dark"), T(e, "light", t[2] === "light"), T(e, "sidebar", t[3] === "true"), T(e, "nosidebar", t[3] !== "true");
    249     },
    250     m(r, f) {
    251       v(r, e, f), l && l.m(e, null), u(e, i);
    252       for (let c = 0; c < o.length; c += 1)
    253         o[c].m(e, null);
    254     },
    255     p(r, f) {
    256       if (r[1] && r[3] === "true" ? l ? l.p(r, f) : (l = ae(r), l.c(), l.m(e, i)) : l && (l.d(1), l = null), f & 41) {
    257         n = r[5];
    258         let c;
    259         for (c = 0; c < n.length; c += 1) {
    260           const s = le(r, n, c);
    261           o[c] ? o[c].p(s, f) : (o[c] = ue(s), o[c].c(), o[c].m(e, null));
    262         }
    263         for (; c < o.length; c += 1)
    264           o[c].d(1);
    265         o.length = n.length;
    266       }
    267       f & 4 && T(e, "dark", r[2] === "dark"), f & 4 && T(e, "light", r[2] === "light"), f & 8 && T(e, "sidebar", r[3] === "true"), f & 8 && T(e, "nosidebar", r[3] !== "true");
     292  let e;
     293  function i(r, o) {
     294    return r[13].media.length ? Le : Te;
     295  }
     296  let l = i(t), n = l(t);
     297  return {
     298    c() {
     299      e = m("div"), n.c(), a(e, "class", "img");
     300    },
     301    m(r, o) {
     302      k(r, e, o), n.m(e, null);
     303    },
     304    p(r, o) {
     305      l === (l = i(r)) && n ? n.p(r, o) : (n.d(1), n = l(r), n && (n.c(), n.m(e, null)));
    268306    },
    269307    d(r) {
    270       r && x(e), l && l.d(), pe(o, r);
    271     }
    272   };
    273 }
    274 function ae(t) {
    275   let e, i, l, n, o, r, f;
    276   return {
    277     c() {
    278       e = g("a"), i = g("div"), l = g("div"), n = j(t[1]), o = z(), r = g("img"), a(l, "class", "title"), a(r, "id", "logo"), a(r, "alt", "logo"), G(r.src, f = t[0] + "/logo.png") || a(r, "src", f), a(i, "class", "content"), a(e, "href", t[0]), a(e, "target", "_blank"), a(e, "id", "header");
    279     },
    280     m(c, s) {
    281       v(c, e, s), u(e, i), u(i, l), u(l, n), u(i, o), u(i, r);
    282     },
    283     p(c, s) {
    284       s & 2 && N(n, c[1]), s & 1 && !G(r.src, f = c[0] + "/logo.png") && a(r, "src", f), s & 1 && a(e, "href", c[0]);
    285     },
    286     d(c) {
    287       c && x(e);
    288     }
    289   };
    290 }
    291 function se(t) {
    292   let e;
    293   function i(o, r) {
    294     return o[12].media.length ? Ge : Le;
    295   }
    296   let l = i(t), n = l(t);
    297   return {
    298     c() {
    299       e = g("div"), n.c(), a(e, "class", "img");
    300     },
    301     m(o, r) {
    302       v(o, e, r), n.m(e, null);
    303     },
    304     p(o, r) {
    305       l === (l = i(o)) && n ? n.p(o, r) : (n.d(1), n = l(o), n && (n.c(), n.m(e, null)));
    306     },
    307     d(o) {
    308       o && x(e), n.d();
    309     }
    310   };
    311 }
    312 function Le(t) {
     308      r && x(e), n.d();
     309    }
     310  };
     311}
     312function Te(t) {
    313313  let e, i, l;
    314314  return {
    315315    c() {
    316       e = g("img"), a(e, "style", "aspect-ratio=1.7778;"), a(e, "alt", i = t[12].title), G(e.src, l = t[0] + "/fallbackimage.png") || a(e, "src", l), a(e, "loading", "lazy");
    317     },
    318     m(n, o) {
    319       v(n, e, o);
    320     },
    321     p(n, o) {
    322       o & 32 && i !== (i = n[12].title) && a(e, "alt", i), o & 1 && !G(e.src, l = n[0] + "/fallbackimage.png") && a(e, "src", l);
     316      e = m("img"), a(e, "style", "aspect-ratio=1.7778;"), a(e, "alt", i = t[13].title), H(e.src, l = t[0] + "/fallbackimage.png") || a(e, "src", l), a(e, "loading", "lazy");
     317    },
     318    m(n, r) {
     319      k(n, e, r);
     320    },
     321    p(n, r) {
     322      r & 32 && i !== (i = n[13].title) && a(e, "alt", i), r & 1 && !H(e.src, l = n[0] + "/fallbackimage.png") && a(e, "src", l);
    323323    },
    324324    d(n) {
     
    327327  };
    328328}
    329 function Ge(t) {
     329function Le(t) {
    330330  let e, i, l, n;
    331331  return {
    332332    c() {
    333       e = g("img"), a(e, "style", i = "object-position: " + de(t[12]) + "; aspect-ratio=1.7778;"), a(e, "alt", l = t[12].media[0].name), G(e.src, n = t[0] + "/media/thumb/" + t[12].media[0].url) || a(e, "src", n), a(e, "loading", "lazy");
    334     },
    335     m(o, r) {
    336       v(o, e, r);
    337     },
    338     p(o, r) {
    339       r & 32 && i !== (i = "object-position: " + de(o[12]) + "; aspect-ratio=1.7778;") && a(e, "style", i), r & 32 && l !== (l = o[12].media[0].name) && a(e, "alt", l), r & 33 && !G(e.src, n = o[0] + "/media/thumb/" + o[12].media[0].url) && a(e, "src", n);
    340     },
    341     d(o) {
    342       o && x(e);
    343     }
    344   };
    345 }
    346 function ce(t) {
    347   let e, i = t[12].tags, l = [];
     333      e = m("img"), a(e, "style", i = "object-position: " + ue(t[13]) + "; aspect-ratio=1.7778;"), a(e, "alt", l = t[13].media[0].name), H(e.src, n = t[0] + "/media/thumb/" + t[13].media[0].url) || a(e, "src", n), a(e, "loading", "lazy");
     334    },
     335    m(r, o) {
     336      k(r, e, o);
     337    },
     338    p(r, o) {
     339      o & 32 && i !== (i = "object-position: " + ue(r[13]) + "; aspect-ratio=1.7778;") && a(e, "style", i), o & 32 && l !== (l = r[13].media[0].name) && a(e, "alt", l), o & 33 && !H(e.src, n = r[0] + "/media/thumb/" + r[13].media[0].url) && a(e, "src", n);
     340    },
     341    d(r) {
     342      r && x(e);
     343    }
     344  };
     345}
     346function ae(t) {
     347  let e, i = t[13].place.address + "", l;
     348  return {
     349    c() {
     350      e = m("span"), l = z(i), a(e, "class", "subtitle");
     351    },
     352    m(n, r) {
     353      k(n, e, r), u(e, l);
     354    },
     355    p(n, r) {
     356      r & 32 && i !== (i = n[13].place.address + "") && T(l, i);
     357    },
     358    d(n) {
     359      n && x(e);
     360    }
     361  };
     362}
     363function se(t) {
     364  let e, i = t[13].tags, l = [];
    348365  for (let n = 0; n < i.length; n += 1)
    349     l[n] = fe(ne(t, i, n));
    350   return {
    351     c() {
    352       e = g("div");
     366    l[n] = ce(ie(t, i, n));
     367  return {
     368    c() {
     369      e = m("div");
    353370      for (let n = 0; n < l.length; n += 1)
    354371        l[n].c();
    355372      a(e, "class", "tags");
    356373    },
    357     m(n, o) {
    358       v(n, e, o);
    359       for (let r = 0; r < l.length; r += 1)
    360         l[r].m(e, null);
    361     },
    362     p(n, o) {
    363       if (o & 32) {
    364         i = n[12].tags;
    365         let r;
    366         for (r = 0; r < i.length; r += 1) {
    367           const f = ne(n, i, r);
    368           l[r] ? l[r].p(f, o) : (l[r] = fe(f), l[r].c(), l[r].m(e, null));
     374    m(n, r) {
     375      k(n, e, r);
     376      for (let o = 0; o < l.length; o += 1)
     377        l[o].m(e, null);
     378    },
     379    p(n, r) {
     380      if (r & 32) {
     381        i = n[13].tags;
     382        let o;
     383        for (o = 0; o < i.length; o += 1) {
     384          const f = ie(n, i, o);
     385          l[o] ? l[o].p(f, r) : (l[o] = ce(f), l[o].c(), l[o].m(e, null));
    369386        }
    370         for (; r < l.length; r += 1)
    371           l[r].d(1);
     387        for (; o < l.length; o += 1)
     388          l[o].d(1);
    372389        l.length = i.length;
    373390      }
    374391    },
    375392    d(n) {
    376       n && x(e), pe(l, n);
     393      n && x(e), be(l, n);
     394    }
     395  };
     396}
     397function ce(t) {
     398  let e, i, l = t[16] + "", n;
     399  return {
     400    c() {
     401      e = m("span"), i = z("#"), n = z(l), a(e, "class", "tag");
     402    },
     403    m(r, o) {
     404      k(r, e, o), u(e, i), u(e, n);
     405    },
     406    p(r, o) {
     407      o & 32 && l !== (l = r[16] + "") && T(n, l);
     408    },
     409    d(r) {
     410      r && x(e);
    377411    }
    378412  };
    379413}
    380414function fe(t) {
    381   let e, i, l = t[15] + "", n;
    382   return {
    383     c() {
    384       e = g("span"), i = j("#"), n = j(l), a(e, "class", "tag");
    385     },
    386     m(o, r) {
    387       v(o, e, r), u(e, i), u(e, n);
    388     },
    389     p(o, r) {
    390       r & 32 && l !== (l = o[15] + "") && N(n, l);
    391     },
    392     d(o) {
    393       o && x(e);
     415  let e, i, l, n, r = V(t[13]) + "", o, f, s, c = t[13].title + "", w, g, _, A, E = t[13].place.name + "", M, d, h, p, v, q, $ = t[3] !== "true" && oe(t), j = t[13].place.name !== "online" && ae(t), S = t[13].tags.length && se(t);
     416  return {
     417    c() {
     418      e = m("a"), $ && $.c(), i = C(), l = m("div"), n = m("div"), o = z(r), f = C(), s = m("div"), w = z(c), g = C(), _ = m("span"), A = z("@"), M = z(E), d = C(), j && j.c(), h = C(), S && S.c(), p = C(), a(n, "class", "subtitle"), a(s, "class", "title"), a(_, "class", "place"), a(l, "class", "content"), a(e, "href", v = t[0] + "/event/" + (t[13].slug || t[13].id)), a(e, "class", "event"), a(e, "title", q = t[13].title), a(e, "target", "_blank");
     419    },
     420    m(b, N) {
     421      k(b, e, N), $ && $.m(e, null), u(e, i), u(e, l), u(l, n), u(n, o), u(l, f), u(l, s), u(s, w), u(l, g), u(l, _), u(_, A), u(_, M), u(_, d), j && j.m(_, null), u(l, h), S && S.m(l, null), u(e, p);
     422    },
     423    p(b, N) {
     424      b[3] !== "true" ? $ ? $.p(b, N) : ($ = oe(b), $.c(), $.m(e, i)) : $ && ($.d(1), $ = null), N & 32 && r !== (r = V(b[13]) + "") && T(o, r), N & 32 && c !== (c = b[13].title + "") && T(w, c), N & 32 && E !== (E = b[13].place.name + "") && T(M, E), b[13].place.name !== "online" ? j ? j.p(b, N) : (j = ae(b), j.c(), j.m(_, null)) : j && (j.d(1), j = null), b[13].tags.length ? S ? S.p(b, N) : (S = se(b), S.c(), S.m(l, null)) : S && (S.d(1), S = null), N & 33 && v !== (v = b[0] + "/event/" + (b[13].slug || b[13].id)) && a(e, "href", v), N & 32 && q !== (q = b[13].title) && a(e, "title", q);
     425    },
     426    d(b) {
     427      b && x(e), $ && $.d(), j && j.d(), S && S.d();
     428    }
     429  };
     430}
     431function Ge(t) {
     432  let e, i, l = t[4] && le(t), n = t[5].length && ne(t);
     433  return {
     434    c() {
     435      l && l.c(), e = C(), n && n.c(), i = pe(), this.c = G;
     436    },
     437    m(r, o) {
     438      l && l.m(r, o), k(r, e, o), n && n.m(r, o), k(r, i, o);
     439    },
     440    p(r, [o]) {
     441      r[4] ? l ? l.p(r, o) : (l = le(r), l.c(), l.m(e.parentNode, e)) : l && (l.d(1), l = null), r[5].length ? n ? n.p(r, o) : (n = ne(r), n.c(), n.m(i.parentNode, i)) : n && (n.d(1), n = null);
     442    },
     443    i: G,
     444    o: G,
     445    d(r) {
     446      l && l.d(r), r && x(e), n && n.d(r), r && x(i);
    394447    }
    395448  };
    396449}
    397450function ue(t) {
    398   let e, i, l, n, o = V(t[12]) + "", r, f, c, s = t[12].title + "", k, m, _, C, w = t[12].place.name + "", d, S, h, b = t[12].place.address + "", A, Y, Z, U, q, $ = t[3] !== "true" && se(t), E = t[12].tags.length && ce(t);
    399   return {
    400     c() {
    401       e = g("a"), $ && $.c(), i = z(), l = g("div"), n = g("div"), r = j(o), f = z(), c = g("div"), k = j(s), m = z(), _ = g("span"), C = j("@"), d = j(w), S = z(), h = g("span"), A = j(b), Y = z(), E && E.c(), Z = z(), a(n, "class", "subtitle"), a(c, "class", "title"), a(h, "class", "subtitle"), a(_, "class", "place"), a(l, "class", "content"), a(e, "href", U = t[0] + "/event/" + (t[12].slug || t[12].id)), a(e, "class", "event"), a(e, "title", q = t[12].title), a(e, "target", "_blank");
    402     },
    403     m(p, M) {
    404       v(p, e, M), $ && $.m(e, null), u(e, i), u(e, l), u(l, n), u(n, r), u(l, f), u(l, c), u(c, k), u(l, m), u(l, _), u(_, C), u(_, d), u(_, S), u(_, h), u(h, A), u(l, Y), E && E.m(l, null), u(e, Z);
    405     },
    406     p(p, M) {
    407       p[3] !== "true" ? $ ? $.p(p, M) : ($ = se(p), $.c(), $.m(e, i)) : $ && ($.d(1), $ = null), M & 32 && o !== (o = V(p[12]) + "") && N(r, o), M & 32 && s !== (s = p[12].title + "") && N(k, s), M & 32 && w !== (w = p[12].place.name + "") && N(d, w), M & 32 && b !== (b = p[12].place.address + "") && N(A, b), p[12].tags.length ? E ? E.p(p, M) : (E = ce(p), E.c(), E.m(l, null)) : E && (E.d(1), E = null), M & 33 && U !== (U = p[0] + "/event/" + (p[12].slug || p[12].id)) && a(e, "href", U), M & 32 && q !== (q = p[12].title) && a(e, "title", q);
    408     },
    409     d(p) {
    410       p && x(e), $ && $.d(), E && E.d();
    411     }
    412   };
    413 }
    414 function He(t) {
    415   let e, i, l = t[4] && re(t), n = t[5].length && oe(t);
    416   return {
    417     c() {
    418       l && l.c(), e = z(), n && n.c(), i = ve(), this.c = L;
    419     },
    420     m(o, r) {
    421       l && l.m(o, r), v(o, e, r), n && n.m(o, r), v(o, i, r);
    422     },
    423     p(o, [r]) {
    424       o[4] ? l ? l.p(o, r) : (l = re(o), l.c(), l.m(e.parentNode, e)) : l && (l.d(1), l = null), o[5].length ? n ? n.p(o, r) : (n = oe(o), n.c(), n.m(i.parentNode, i)) : n && (n.d(1), n = null);
    425     },
    426     i: L,
    427     o: L,
    428     d(o) {
    429       l && l.d(o), o && x(e), n && n.d(o), o && x(i);
    430     }
    431   };
    432 }
    433 function de(t) {
    434451  if (t.media && t.media[0].focalpoint) {
    435452    const e = t.media[0].focalpoint;
     
    438455  return "center center";
    439456}
    440 function Re(t, e, i) {
    441   let { baseurl: l = "" } = e, { title: n = "" } = e, { maxlength: o = !1 } = e, { tags: r = "" } = e, { places: f = "" } = e, { theme: c = "light" } = e, { show_recurrent: s = !1 } = e, { sidebar: k = "true" } = e, { external_style: m = "" } = e, _ = !1, C = [];
    442   function w(d) {
    443     if (!_)
     457function He(t, e, i) {
     458  let { baseurl: l = "" } = e, { title: n = "" } = e, { maxlength: r = !1 } = e, { collection: o = "" } = e, { tags: f = "" } = e, { places: s = "" } = e, { theme: c = "light" } = e, { show_recurrent: w = !1 } = e, { sidebar: g = "true" } = e, { external_style: _ = "" } = e, A = !1, E = [];
     459  function M(d) {
     460    if (!A)
    444461      return;
    445     const S = [];
    446     o && S.push(`max=${o}`), r && S.push(`tags=${r}`), f && S.push(`places=${f}`), S.push(`show_recurrent=${s ? "true" : "false"}`), fetch(`${l}/api/events?${S.join("&")}`).then((h) => h.json()).then((h) => {
    447       i(5, C = h);
    448     }).catch((h) => {
    449       console.error("Error loading Gancio API -> ", h);
     462    const h = [];
     463    r && h.push(`max=${r}`);
     464    let p = "/api/events";
     465    o ? p = `/feed/json/collection/${o}` : (f && h.push(`tags=${f}`), s && h.push(`places=${s}`)), h.push(`show_recurrent=${w ? "true" : "false"}`), fetch(`${l}${p}?${h.join("&")}`).then((v) => v.json()).then((v) => {
     466      i(5, E = v.events || v);
     467    }).catch((v) => {
     468      console.error("Error loading Gancio API -> ", v);
    450469    });
    451470  }
    452   return we(() => {
    453     _ = !0, w();
     471  return ke(() => {
     472    A = !0, M();
    454473  }), t.$$set = (d) => {
    455     "baseurl" in d && i(0, l = d.baseurl), "title" in d && i(1, n = d.title), "maxlength" in d && i(6, o = d.maxlength), "tags" in d && i(7, r = d.tags), "places" in d && i(8, f = d.places), "theme" in d && i(2, c = d.theme), "show_recurrent" in d && i(9, s = d.show_recurrent), "sidebar" in d && i(3, k = d.sidebar), "external_style" in d && i(4, m = d.external_style);
     474    "baseurl" in d && i(0, l = d.baseurl), "title" in d && i(1, n = d.title), "maxlength" in d && i(6, r = d.maxlength), "collection" in d && i(7, o = d.collection), "tags" in d && i(8, f = d.tags), "places" in d && i(9, s = d.places), "theme" in d && i(2, c = d.theme), "show_recurrent" in d && i(10, w = d.show_recurrent), "sidebar" in d && i(3, g = d.sidebar), "external_style" in d && i(4, _ = d.external_style);
    456475  }, t.$$.update = () => {
    457     t.$$.dirty & 975 && w();
     476    t.$$.dirty & 1999 && M();
    458477  }, [
    459478    l,
    460479    n,
    461480    c,
    462     k,
    463     m,
    464     C,
     481    g,
     482    _,
     483    E,
     484    r,
    465485    o,
    466     r,
    467486    f,
    468     s
     487    s,
     488    w
    469489  ];
    470490}
    471 class Ie extends X {
     491class Re extends X {
    472492  constructor(e) {
    473493    super(), this.shadowRoot.innerHTML = `<style>#gancioEvents{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
     
    477497      rgba(60, 64, 67, 0.25) 0px 1px 3px 1px;border-radius:5px;font-size:1rem}.event .img{width:100%;max-width:450px;max-height:250px;aspect-ratio:1.7778;flex:1 0 auto}@media screen and (max-width: 800px){.event{flex-wrap:wrap}.event .img{max-width:100%}}.event img{object-fit:cover;border-radius:15px;width:100%;height:100%;box-shadow:rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
    478498      rgba(0, 0, 0, 0.3) 0px 3px 7px -3px}.nosidebar .event{margin-bottom:2rem}.nosidebar .content{margin-left:1rem;margin-top:5px;text-align:left}.tags{margin-top:2px}#logo{position:absolute;top:10px;right:10px;height:40px}a{text-decoration:none;color:var(--text-color);display:flex;padding:8px 20px;margin:0;line-height:1.275rem;font-weight:400;font-size:0.875rem;position:relative;transition:background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1),
    479       padding 0.3s;box-sizing:content-box}a:hover .title,a:focus .title,a:active .title{text-decoration:underline}.dark{--bg-odd-color:#161616;--bg-even-color:#222;--bg-hover-color:#333;--text-color:white;--title-color:white;--line-color:rgba(120, 120, 120, 0.2)}.light{--bg-odd-color:#f5f5f5;--bg-even-color:#fafafa;--bg-hover-color:#eee;--text-color:#222;--title-color:black;--line-color:rgba(220, 220, 220, 0.9)}.sidebar a{background-color:var(--bg-even-color);border-bottom:1px solid var(--line-color)}.sidebar a:hover,.sidebar a:focus,.sidebar a:active{background-color:var(--bg-hover-color);padding-left:15px;padding-right:25px}.place{font-weight:400;font-size:1.2rem;line-height:1.4rem;color:orangered}.title{color:var(--title-color);font-weight:bold;font-size:1.3rem;line-height:1.1em}.nosidebar .title{font-size:1.9em;line-height:1.1em}.subtitle{font-size:1rem;line-height:1.1em;color:var(--title-color);opacity:0.9}.tag{margin-right:10px;display:inline-block}</style>`, ye(
     499      padding 0.3s;box-sizing:content-box}a:hover .title,a:focus .title,a:active .title{text-decoration:underline}.dark{--bg-odd-color:#161616;--bg-even-color:#222;--bg-hover-color:#333;--text-color:white;--title-color:white;--line-color:rgba(120, 120, 120, 0.2)}.light{--bg-odd-color:#f5f5f5;--bg-even-color:#fafafa;--bg-hover-color:#eee;--text-color:#222;--title-color:black;--line-color:rgba(220, 220, 220, 0.9)}.sidebar a{background-color:var(--bg-even-color);border-bottom:1px solid var(--line-color)}.sidebar a:hover,.sidebar a:focus,.sidebar a:active{background-color:var(--bg-hover-color);padding-left:15px;padding-right:25px}.place{font-weight:400;font-size:1.2rem;line-height:1.4rem;color:orangered}.title{color:var(--title-color);font-weight:bold;font-size:1.3rem;line-height:1.1em}.nosidebar .title{font-size:1.9em;line-height:1.1em}.subtitle{font-size:1rem;line-height:1.1em;color:var(--title-color);opacity:0.9}.tag{margin-right:10px;display:inline-block}</style>`, we(
    480500      this,
    481501      {
    482502        target: this.shadowRoot,
    483         props: ke(this.attributes),
     503        props: ve(this.attributes),
    484504        customElement: !0
    485505      },
    486       Re,
    487506      He,
    488       be,
     507      Ge,
     508      _e,
    489509      {
    490510        baseurl: 0,
    491511        title: 1,
    492512        maxlength: 6,
    493         tags: 7,
    494         places: 8,
     513        collection: 7,
     514        tags: 8,
     515        places: 9,
    495516        theme: 2,
    496         show_recurrent: 9,
     517        show_recurrent: 10,
    497518        sidebar: 3,
    498519        external_style: 4
    499520      },
    500521      null
    501     ), e && (e.target && v(e.target, this, e.anchor), e.props && (this.$set(e.props), y()));
     522    ), e && (e.target && k(e.target, this, e.anchor), e.props && (this.$set(e.props), y()));
    502523  }
    503524  static get observedAttributes() {
     
    506527      "title",
    507528      "maxlength",
     529      "collection",
    508530      "tags",
    509531      "places",
     
    532554    this.$$set({ maxlength: e }), y();
    533555  }
     556  get collection() {
     557    return this.$$.ctx[7];
     558  }
     559  set collection(e) {
     560    this.$$set({ collection: e }), y();
     561  }
    534562  get tags() {
    535     return this.$$.ctx[7];
     563    return this.$$.ctx[8];
    536564  }
    537565  set tags(e) {
     
    539567  }
    540568  get places() {
    541     return this.$$.ctx[8];
     569    return this.$$.ctx[9];
    542570  }
    543571  set places(e) {
     
    551579  }
    552580  get show_recurrent() {
    553     return this.$$.ctx[9];
     581    return this.$$.ctx[10];
    554582  }
    555583  set show_recurrent(e) {
     
    569597  }
    570598}
    571 customElements.define("gancio-events", Ie);
     599customElements.define("gancio-events", Re);
     600function de(t) {
     601  let e, i, l, n, r = t[1].title + "", o, f, s, c = V(t[1]) + "", w, g, _, A, E = t[1].place.name + "", M, d, h = t[1].media.length && he(t);
     602  return {
     603    c() {
     604      e = m("a"), h && h.c(), i = C(), l = m("div"), n = m("strong"), o = z(r), f = C(), s = m("div"), w = z(c), g = C(), _ = m("div"), A = z("@"), M = z(E), a(_, "class", "place"), a(l, "class", "container"), a(e, "href", d = t[0] + "/event/" + (t[1].slug || t[1].id)), a(e, "class", "card"), a(e, "target", "_blank");
     605    },
     606    m(p, v) {
     607      k(p, e, v), h && h.m(e, null), u(e, i), u(e, l), u(l, n), u(n, o), u(l, f), u(l, s), u(s, w), u(l, g), u(l, _), u(_, A), u(_, M);
     608    },
     609    p(p, v) {
     610      p[1].media.length ? h ? h.p(p, v) : (h = he(p), h.c(), h.m(e, i)) : h && (h.d(1), h = null), v & 2 && r !== (r = p[1].title + "") && T(o, r), v & 2 && c !== (c = V(p[1]) + "") && T(w, c), v & 2 && E !== (E = p[1].place.name + "") && T(M, E), v & 3 && d !== (d = p[0] + "/event/" + (p[1].slug || p[1].id)) && a(e, "href", d);
     611    },
     612    d(p) {
     613      p && x(e), h && h.d();
     614    }
     615  };
     616}
    572617function he(t) {
    573   let e, i, l, n, o = t[1].title + "", r, f, c, s = V(t[1]) + "", k, m, _, C, w = t[1].place.name + "", d, S, h = t[1].media.length && ge(t);
    574   return {
    575     c() {
    576       e = g("a"), h && h.c(), i = z(), l = g("div"), n = g("strong"), r = j(o), f = z(), c = g("div"), k = j(s), m = z(), _ = g("div"), C = j("@"), d = j(w), a(_, "class", "place"), a(l, "class", "container"), a(e, "href", S = t[0] + "/event/" + (t[1].slug || t[1].id)), a(e, "class", "card"), a(e, "target", "_blank");
    577     },
    578     m(b, A) {
    579       v(b, e, A), h && h.m(e, null), u(e, i), u(e, l), u(l, n), u(n, r), u(l, f), u(l, c), u(c, k), u(l, m), u(l, _), u(_, C), u(_, d);
    580     },
    581     p(b, A) {
    582       b[1].media.length ? h ? h.p(b, A) : (h = ge(b), h.c(), h.m(e, i)) : h && (h.d(1), h = null), A & 2 && o !== (o = b[1].title + "") && N(r, o), A & 2 && s !== (s = V(b[1]) + "") && N(k, s), A & 2 && w !== (w = b[1].place.name + "") && N(d, w), A & 3 && S !== (S = b[0] + "/event/" + (b[1].slug || b[1].id)) && a(e, "href", S);
    583     },
    584     d(b) {
    585       b && x(e), h && h.d();
    586     }
    587   };
    588 }
    589 function ge(t) {
    590618  let e, i, l, n;
    591619  return {
    592620    c() {
    593       e = g("img"), G(e.src, i = t[2](t[1])) || a(e, "src", i), a(e, "alt", l = t[1].media[0].name), a(e, "style", n = "object-position: " + me(t[1]) + "; aspect-ratio=1.7778;");
    594     },
    595     m(o, r) {
    596       v(o, e, r);
    597     },
    598     p(o, r) {
    599       r & 2 && !G(e.src, i = o[2](o[1])) && a(e, "src", i), r & 2 && l !== (l = o[1].media[0].name) && a(e, "alt", l), r & 2 && n !== (n = "object-position: " + me(o[1]) + "; aspect-ratio=1.7778;") && a(e, "style", n);
    600     },
    601     d(o) {
    602       o && x(e);
    603     }
    604   };
    605 }
    606 function Oe(t) {
    607   let e, i = t[1] && he(t);
    608   return {
    609     c() {
    610       i && i.c(), e = ve(), this.c = L;
     621      e = m("img"), H(e.src, i = t[2](t[1])) || a(e, "src", i), a(e, "alt", l = t[1].media[0].name), a(e, "style", n = "object-position: " + me(t[1]) + "; aspect-ratio=1.7778;");
     622    },
     623    m(r, o) {
     624      k(r, e, o);
     625    },
     626    p(r, o) {
     627      o & 2 && !H(e.src, i = r[2](r[1])) && a(e, "src", i), o & 2 && l !== (l = r[1].media[0].name) && a(e, "alt", l), o & 2 && n !== (n = "object-position: " + me(r[1]) + "; aspect-ratio=1.7778;") && a(e, "style", n);
     628    },
     629    d(r) {
     630      r && x(e);
     631    }
     632  };
     633}
     634function Ie(t) {
     635  let e, i = t[1] && de(t);
     636  return {
     637    c() {
     638      i && i.c(), e = pe(), this.c = G;
    611639    },
    612640    m(l, n) {
    613       i && i.m(l, n), v(l, e, n);
     641      i && i.m(l, n), k(l, e, n);
    614642    },
    615643    p(l, [n]) {
    616       l[1] ? i ? i.p(l, n) : (i = he(l), i.c(), i.m(e.parentNode, e)) : i && (i.d(1), i = null);
    617     },
    618     i: L,
    619     o: L,
     644      l[1] ? i ? i.p(l, n) : (i = de(l), i.c(), i.m(e.parentNode, e)) : i && (i.d(1), i = null);
     645    },
     646    i: G,
     647    o: G,
    620648    d(l) {
    621649      i && i.d(l), l && x(e);
     
    630658  return "center center";
    631659}
    632 function Ue(t, e, i) {
    633   let { baseurl: l = "https://demo.gancio.org" } = e, { id: n } = e, o = !1, r;
    634   function f(s, k) {
    635     o && fetch(`${k}/api/event/detail/${s}`).then((m) => m.json()).then((m) => i(1, r = m));
    636   }
    637   we(() => {
    638     o = !0, f(n, l);
     660function Oe(t, e, i) {
     661  let { baseurl: l = "https://demo.gancio.org" } = e, { id: n } = e, r = !1, o;
     662  function f(c, w) {
     663    r && fetch(`${w}/api/event/detail/${c}`).then((g) => g.json()).then((g) => i(1, o = g));
     664  }
     665  ke(() => {
     666    r = !0, f(n, l);
    639667  });
    640   function c(s) {
    641     return `${l}/media/thumb/${s.media[0].url}`;
    642   }
    643   return t.$$set = (s) => {
    644     "baseurl" in s && i(0, l = s.baseurl), "id" in s && i(3, n = s.id);
     668  function s(c) {
     669    return `${l}/media/thumb/${c.media[0].url}`;
     670  }
     671  return t.$$set = (c) => {
     672    "baseurl" in c && i(0, l = c.baseurl), "id" in c && i(3, n = c.id);
    645673  }, t.$$.update = () => {
    646674    t.$$.dirty & 9 && f(n, l);
    647   }, [l, r, c, n];
    648 }
    649 class qe extends X {
     675  }, [l, o, s, n];
     676}
     677class Ue extends X {
    650678  constructor(e) {
    651679    super(), this.shadowRoot.innerHTML = `<style>.card{display:block;font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS',
    652       sans-serif;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);transition:0.3s;border-radius:5px;max-width:500px;text-decoration:none;color:white;background-color:#1e1e1e;overflow:hidden}img{border-radius:5px 5px 0 0;max-height:250px;min-height:160px;width:100%;object-fit:cover;object-position:top}.card:hover .container{padding-left:20px}.card:hover{box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2)}.container{transition:padding-left 0.2s;padding:16px}.place{font-weight:600;color:#ff6e40}</style>`, ye(
     680      sans-serif;box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);transition:0.3s;border-radius:5px;max-width:500px;text-decoration:none;color:white;background-color:#1e1e1e;overflow:hidden}img{border-radius:5px 5px 0 0;max-height:250px;min-height:160px;width:100%;object-fit:cover;object-position:top}.card:hover .container{padding-left:20px}.card:hover{box-shadow:0 8px 16px 0 rgba(0, 0, 0, 0.2)}.container{transition:padding-left 0.2s;padding:16px}.place{font-weight:600;color:#ff6e40}</style>`, we(
    653681      this,
    654682      {
    655683        target: this.shadowRoot,
    656         props: ke(this.attributes),
     684        props: ve(this.attributes),
    657685        customElement: !0
    658686      },
    659       Ue,
    660687      Oe,
    661       be,
     688      Ie,
     689      _e,
    662690      { baseurl: 0, id: 3 },
    663691      null
    664     ), e && (e.target && v(e.target, this, e.anchor), e.props && (this.$set(e.props), y()));
     692    ), e && (e.target && k(e.target, this, e.anchor), e.props && (this.$set(e.props), y()));
    665693  }
    666694  static get observedAttributes() {
     
    680708  }
    681709}
    682 customElements.define("gancio-event", qe);
     710customElements.define("gancio-event", Ue);
  • wpgancio/trunk/readme.txt

    r2885629 r3035900  
    44Tags: events, gancio, fediverse, AP, activity pub
    55Requires at least: 4.7
    6 Tested up to: 6.0
    7 Stable tag: 1.7
     6Tested up to: 6.4
     7Stable tag: 1.8
    88Requires PHP: 7.0
    99License: AGPLv3 or later
  • wpgancio/trunk/wc.php

    r2824192 r3035900  
    88function add_gancio_events_to_kses_allowed($the_allowed_tags)
    99{
    10   $the_allowed_tags['gancio-events'] = array('tags' => true, 'places' => true, 'theme' => true, 'id' => true, 'baseurl' => true);
     10  $the_allowed_tags['gancio-events'] = array('tags' => true, 'places' => true, 'theme' => true, 'id' => true, 'baseurl' => true, 'collection' => true, 'maxlength' => true);
    1111  $the_allowed_tags['gancio-event'] = array('id' => true, 'url' => true);
    1212  return $the_allowed_tags;
     
    1515
    1616function tinymce_init( $init ) {
    17   $ext = 'gancio-event[id,url],gancio-events[baseurl,places,tags,theme,max]';
     17  $ext = 'gancio-event[id,url],gancio-events[baseurl,places,tags,theme,maxlength,collection]';
    1818  if ( isset( $init['extended_valid_elements'] ) ) {
    1919    $init['extended_valid_elements'] .= ',' . $ext;
     
    3939    'places' => '',
    4040    'tags' => '',
     41    'collection' => '',
    4142    'theme' => 'dark',
    42     'max' => null
     43    'maxlength' => null
    4344  ), $atts);
    44   return '<gancio-events baseurl="' . $a['baseurl'] . '" theme="' . $a['theme'] . '" places="' . $a['places'] . '" tags="' . $a['tags'] . '"></gancio-events>';
     45  return '<gancio-events baseurl="' . $a['baseurl'] . '" maxlength=' . $a['maxlength'] . ' theme="' . $a['theme'] . '" places="' . $a['places'] . '" tags="' . $a['tags'] . '" collection="' . $a['collection']. '"></gancio-events>';
    4546}
    4647
Note: See TracChangeset for help on using the changeset viewer.