Version Description
- (Builders/RankMathSEO) Added
WordPress SEO Plugin Rank Math
support (Beta stage). - (Core/Plugin Install) Added info box before add-ons list.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- configs/rank-math-seo.json +14 -0
- data/paid_plugins.json +2 -1
- data/wpglobus-product-info.json +1 -1
- includes/admin/class-wpglobus-plugin-install.php +17 -2
- includes/builders/class-wpglobus-builder-update-post.php +89 -2
- includes/builders/class-wpglobus-builders.php +63 -1
- includes/builders/rank_math_seo/class-wpglobus-builder-rank_math_seo.php +75 -0
- includes/builders/rank_math_seo/class-wpglobus-rank_math_seo-functions.php +168 -0
- includes/builders/rank_math_seo/class-wpglobus-rank_math_seo-update-post.php +40 -0
- includes/builders/rank_math_seo/class-wpglobus-rank_math_seo.php +73 -0
- includes/class-wpglobus-config-vendor.php +9 -0
- includes/js/wpglobus-plugin-install.js +16 -2
- includes/js/wpglobus-plugin-install.min.js +1 -1
- includes/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo-front.php +38 -0
- includes/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo.php +104 -0
- includes/vendor/wpglobus-vendors.php +9 -0
- includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php +134 -6
- includes/wpglobus-controller.php +21 -0
- languages/wpglobus-ar.po +11 -4
- languages/wpglobus-be.po +11 -4
- languages/wpglobus-bg_BG.po +11 -4
- languages/wpglobus-de_CH.po +11 -4
- languages/wpglobus-de_DE.po +11 -4
- languages/wpglobus-el.po +11 -4
- languages/wpglobus-en_AU.po +11 -4
- languages/wpglobus-en_CA.po +11 -4
- languages/wpglobus-en_GB.po +11 -4
- languages/wpglobus-en_NZ.po +11 -4
- languages/wpglobus-en_US.po +11 -4
- languages/wpglobus-en_ZA.po +11 -4
- languages/wpglobus-es_AR.po +11 -4
- languages/wpglobus-es_CL.po +11 -4
- languages/wpglobus-es_CO.po +11 -4
- languages/wpglobus-es_CR.po +11 -4
- languages/wpglobus-es_ES.po +11 -4
- languages/wpglobus-es_GT.po +11 -4
- languages/wpglobus-es_MX.po +11 -4
- languages/wpglobus-es_PE.po +11 -4
- languages/wpglobus-es_PR.po +11 -4
- languages/wpglobus-es_VE.po +11 -4
- languages/wpglobus-et.po +11 -4
- languages/wpglobus-fr_BE.po +11 -4
- languages/wpglobus-fr_CA.po +11 -4
- languages/wpglobus-fr_FR.po +11 -4
- languages/wpglobus-id_ID.po +11 -4
- languages/wpglobus-ko_KR.po +11 -4
- languages/wpglobus-pl_PL.po +11 -4
- languages/wpglobus-pt_BR.po +11 -4
- languages/wpglobus-pt_PT.po +11 -4
- languages/wpglobus-ro_RO.po +11 -4
- languages/wpglobus-ru_RU.mo +0 -0
- languages/wpglobus-ru_RU.po +13 -4
- languages/wpglobus-sv_SE.po +11 -4
- languages/wpglobus-tr_TR.po +11 -4
- languages/wpglobus-uk.po +11 -4
- languages/wpglobus.pot +12 -7
- readme.txt +10 -31
- trunk/configs/acf.json +0 -12
- trunk/configs/all-in-one-seo-pack.json +0 -16
- trunk/configs/elementor.json +0 -5
- trunk/configs/pods.json +0 -12
- trunk/configs/woocommerce.json +0 -8
- trunk/configs/wpglobus-seo.json +0 -5
- trunk/configs/wpglobus.json +0 -5
- trunk/configs/yoast-seo.json +0 -14
- trunk/data/paid_plugins.json +0 -66
- trunk/data/wpglobus-product-info.json +0 -1
- trunk/flags/ad.alt.png +0 -0
- trunk/flags/ad.png +0 -0
- trunk/flags/ae.png +0 -0
- trunk/flags/af.png +0 -0
- trunk/flags/ag.png +0 -0
- trunk/flags/ai.alt.png +0 -0
- trunk/flags/ai.png +0 -0
- trunk/flags/al.png +0 -0
- trunk/flags/am.png +0 -0
- trunk/flags/an.png +0 -0
- trunk/flags/ao.png +0 -0
- trunk/flags/aq.png +0 -0
- trunk/flags/ar.alt.png +0 -0
- trunk/flags/ar.png +0 -0
- trunk/flags/argm.jpg +0 -0
- trunk/flags/arle.png +0 -0
- trunk/flags/as.png +0 -0
- trunk/flags/asl.gif +0 -0
- trunk/flags/at.alt.png +0 -0
- trunk/flags/at.png +0 -0
- trunk/flags/au.png +0 -0
- trunk/flags/aw.png +0 -0
- trunk/flags/ax.png +0 -0
- trunk/flags/az.png +0 -0
- trunk/flags/ba.png +0 -0
- trunk/flags/bb.png +0 -0
- trunk/flags/bd.png +0 -0
- trunk/flags/be.png +0 -0
- trunk/flags/bf.png +0 -0
- trunk/flags/bg.png +0 -0
- trunk/flags/bh.png +0 -0
- trunk/flags/bi.alt.png +0 -0
- trunk/flags/bi.png +0 -0
- trunk/flags/big/au.png +0 -0
- trunk/flags/big/br.png +0 -0
- trunk/flags/big/ca.png +0 -0
- trunk/flags/big/cn.png +0 -0
- trunk/flags/big/cy.png +0 -0
- trunk/flags/big/de.png +0 -0
- trunk/flags/big/dk.png +0 -0
- trunk/flags/big/es.alt.png +0 -0
- trunk/flags/big/es.png +0 -0
- trunk/flags/big/fi.png +0 -0
- trunk/flags/big/ir.png +0 -0
- trunk/flags/big/it.png +0 -0
- trunk/flags/big/ru.png +0 -0
- trunk/flags/big/uk.png +0 -0
- trunk/flags/big/us.png +0 -0
- trunk/flags/bj.png +0 -0
- trunk/flags/bm.png +0 -0
- trunk/flags/bn.png +0 -0
- trunk/flags/bo.png +0 -0
- trunk/flags/br.png +0 -0
- trunk/flags/bs.png +0 -0
- trunk/flags/bt.png +0 -0
- trunk/flags/bv.png +0 -0
- trunk/flags/bw.png +0 -0
- trunk/flags/by.png +0 -0
- trunk/flags/bz.png +0 -0
- trunk/flags/ca.alt.png +0 -0
- trunk/flags/ca.png +0 -0
- trunk/flags/cc.alt.png +0 -0
- trunk/flags/cc.png +0 -0
- trunk/flags/cd.png +0 -0
- trunk/flags/cf.png +0 -0
- trunk/flags/cg.png +0 -0
- trunk/flags/ch.png +0 -0
- trunk/flags/ci.png +0 -0
- trunk/flags/ck.png +0 -0
- trunk/flags/cl.png +0 -0
- trunk/flags/cm.png +0 -0
- trunk/flags/cn.png +0 -0
- trunk/flags/co.png +0 -0
- trunk/flags/cr.alt.png +0 -0
- trunk/flags/cr.png +0 -0
- trunk/flags/cs.png +0 -0
- trunk/flags/cu.png +0 -0
- trunk/flags/cv.png +0 -0
- trunk/flags/cx.png +0 -0
- trunk/flags/cy.png +0 -0
- trunk/flags/cz.png +0 -0
- trunk/flags/de.png +0 -0
- trunk/flags/dj.png +0 -0
- trunk/flags/dk.png +0 -0
- trunk/flags/dm.png +0 -0
- trunk/flags/do.png +0 -0
- trunk/flags/dz.png +0 -0
- trunk/flags/easy_to_read.png +0 -0
- trunk/flags/ec.alt.png +0 -0
- trunk/flags/ec.png +0 -0
- trunk/flags/ee.png +0 -0
- trunk/flags/eg.png +0 -0
- trunk/flags/eh.alt.png +0 -0
- trunk/flags/eh.png +0 -0
- trunk/flags/en.png +0 -0
- trunk/flags/eo.png +0 -0
- trunk/flags/er.png +0 -0
- trunk/flags/es.alt.png +0 -0
- trunk/flags/es.png +0 -0
- trunk/flags/et.alt.png +0 -0
- trunk/flags/et.png +0 -0
- trunk/flags/eu.png +0 -0
- trunk/flags/eus.png +0 -0
- trunk/flags/fi.png +0 -0
- trunk/flags/fj.png +0 -0
- trunk/flags/fk.png +0 -0
- trunk/flags/fm.png +0 -0
- trunk/flags/fo.png +0 -0
- trunk/flags/fr.png +0 -0
- trunk/flags/fr_CA.png +0 -0
- trunk/flags/ga.png +0 -0
- trunk/flags/galego.png +0 -0
- trunk/flags/gb.png +0 -0
- trunk/flags/gd.png +0 -0
- trunk/flags/ge.png +0 -0
- trunk/flags/gf.png +0 -0
- trunk/flags/gg.png +0 -0
- trunk/flags/gh.png +0 -0
- trunk/flags/gi.png +0 -0
- trunk/flags/gl.png +0 -0
- trunk/flags/gm.png +0 -0
- trunk/flags/gn.png +0 -0
- trunk/flags/gp.png +0 -0
- trunk/flags/gq.png +0 -0
- trunk/flags/gr.png +0 -0
- trunk/flags/gs.png +0 -0
- trunk/flags/gt.alt.png +0 -0
- trunk/flags/gt.png +0 -0
- trunk/flags/gu.png +0 -0
- trunk/flags/gw.png +0 -0
- trunk/flags/gy.png +0 -0
- trunk/flags/hk.png +0 -0
- trunk/flags/hm.png +0 -0
- trunk/flags/hn.png +0 -0
- trunk/flags/hr.png +0 -0
- trunk/flags/ht.alt.png +0 -0
- trunk/flags/ht.png +0 -0
- trunk/flags/hu.png +0 -0
- trunk/flags/id.png +0 -0
- trunk/flags/ie.png +0 -0
- trunk/flags/il.png +0 -0
- trunk/flags/im.png +0 -0
- trunk/flags/in.png +0 -0
- trunk/flags/io.png +0 -0
- trunk/flags/iq.png +0 -0
- trunk/flags/ir.png +0 -0
- trunk/flags/is.png +0 -0
- trunk/flags/it.png +0 -0
- trunk/flags/je.png +0 -0
- trunk/flags/jm.png +0 -0
- trunk/flags/jo.png +0 -0
- trunk/flags/jp.png +0 -0
- trunk/flags/ke.png +0 -0
- trunk/flags/kg.png +0 -0
- trunk/flags/kh.png +0 -0
- trunk/flags/ki.png +0 -0
- trunk/flags/km.png +0 -0
- trunk/flags/kn.png +0 -0
- trunk/flags/kp.png +0 -0
- trunk/flags/kr.png +0 -0
- trunk/flags/ku.png +0 -0
- trunk/flags/kw.png +0 -0
- trunk/flags/ky.png +0 -0
- trunk/flags/kz.png +0 -0
- trunk/flags/la.png +0 -0
- trunk/flags/lb.png +0 -0
- trunk/flags/lc.png +0 -0
- trunk/flags/li.png +0 -0
- trunk/flags/lk.png +0 -0
- trunk/flags/lr.png +0 -0
- trunk/flags/ls.png +0 -0
- trunk/flags/lt.png +0 -0
- trunk/flags/lu.png +0 -0
- trunk/flags/lv.png +0 -0
- trunk/flags/ly.png +0 -0
- trunk/flags/ma.png +0 -0
- trunk/flags/mc.png +0 -0
- trunk/flags/md.png +0 -0
- trunk/flags/me.png +0 -0
- trunk/flags/mg.png +0 -0
- trunk/flags/mh.png +0 -0
- trunk/flags/mk.png +0 -0
- trunk/flags/ml.png +0 -0
- trunk/flags/mm.png +0 -0
- trunk/flags/mn.png +0 -0
- trunk/flags/mo.png +0 -0
- trunk/flags/montenegro.gif +0 -0
- trunk/flags/mp.png +0 -0
- trunk/flags/mq.png +0 -0
- trunk/flags/mr.png +0 -0
- trunk/flags/ms.png +0 -0
- trunk/flags/mt.png +0 -0
- trunk/flags/mu.png +0 -0
- trunk/flags/mv.png +0 -0
- trunk/flags/mw.png +0 -0
- trunk/flags/mx.png +0 -0
- trunk/flags/my.png +0 -0
- trunk/flags/my_MM.png +0 -0
- trunk/flags/mz.png +0 -0
- trunk/flags/na.png +0 -0
- trunk/flags/nc.png +0 -0
- trunk/flags/ne.png +0 -0
- trunk/flags/nf.png +0 -0
- trunk/flags/ng.png +0 -0
- trunk/flags/ni.alt.png +0 -0
- trunk/flags/ni.png +0 -0
- trunk/flags/nl.png +0 -0
- trunk/flags/no.png +0 -0
- trunk/flags/np.png +0 -0
- trunk/flags/nr.png +0 -0
- trunk/flags/nu.png +0 -0
- trunk/flags/nz.png +0 -0
- trunk/flags/om.png +0 -0
- trunk/flags/pa.png +0 -0
- trunk/flags/pe.png +0 -0
- trunk/flags/pf.alt.png +0 -0
- trunk/flags/pf.png +0 -0
- trunk/flags/pg.png +0 -0
- trunk/flags/ph.png +0 -0
- trunk/flags/pk.png +0 -0
- trunk/flags/pl.png +0 -0
- trunk/flags/pm.png +0 -0
- trunk/flags/pn.png +0 -0
- trunk/flags/pr.png +0 -0
- trunk/flags/ps.png +0 -0
- trunk/flags/pt.png +0 -0
- trunk/flags/purple.globe.png +0 -0
- trunk/flags/pw.png +0 -0
- trunk/flags/py.png +0 -0
- trunk/flags/qa.png +0 -0
- trunk/flags/re.png +0 -0
- trunk/flags/ro.png +0 -0
- trunk/flags/rs.png +0 -0
- trunk/flags/ru.png +0 -0
- trunk/flags/rw.png +0 -0
- trunk/flags/sa.png +0 -0
- trunk/flags/sb.png +0 -0
- trunk/flags/sc.png +0 -0
- trunk/flags/sd.png +0 -0
- trunk/flags/se.png +0 -0
- trunk/flags/serbska_malka.png +0 -0
- trunk/flags/sg.png +0 -0
- trunk/flags/sh.png +0 -0
- trunk/flags/si.png +0 -0
- trunk/flags/sj.png +0 -0
- trunk/flags/sk.png +0 -0
- trunk/flags/sl.png +0 -0
- trunk/flags/sm.png +0 -0
- trunk/flags/sn.png +0 -0
- trunk/flags/so.png +0 -0
- trunk/flags/sr.png +0 -0
- trunk/flags/st.png +0 -0
- trunk/flags/sv.alt.png +0 -0
- trunk/flags/sv.png +0 -0
- trunk/flags/sy.png +0 -0
- trunk/flags/sz.png +0 -0
- trunk/flags/tc.png +0 -0
- trunk/flags/td.png +0 -0
- trunk/flags/tf.png +0 -0
- trunk/flags/tg.png +0 -0
- trunk/flags/th.png +0 -0
- trunk/flags/tj.png +0 -0
- trunk/flags/tk.png +0 -0
- trunk/flags/tl.png +0 -0
- trunk/flags/tm.png +0 -0
- trunk/flags/tn.png +0 -0
- trunk/flags/to.png +0 -0
- trunk/flags/tr.png +0 -0
- trunk/flags/tt.png +0 -0
- trunk/flags/tv.png +0 -0
- trunk/flags/tw.png +0 -0
- trunk/flags/tz.png +0 -0
- trunk/flags/ua.png +0 -0
- trunk/flags/ug.png +0 -0
- trunk/flags/uk.png +0 -0
- trunk/flags/um.png +0 -0
- trunk/flags/us-uk.png +0 -0
- trunk/flags/us.png +0 -0
- trunk/flags/uy.png +0 -0
- trunk/flags/uz.png +0 -0
- trunk/flags/va.png +0 -0
- trunk/flags/vc.png +0 -0
- trunk/flags/ve.png +0 -0
- trunk/flags/vg.png +0 -0
- trunk/flags/vi.png +0 -0
- trunk/flags/vn.png +0 -0
- trunk/flags/vu.png +0 -0
- trunk/flags/wf.alt.png +0 -0
- trunk/flags/wf.png +0 -0
- trunk/flags/ws.png +0 -0
- trunk/flags/ye.png +0 -0
- trunk/flags/yt.png +0 -0
- trunk/flags/yu.png +0 -0
- trunk/flags/za.png +0 -0
- trunk/flags/zm.png +0 -0
- trunk/flags/zw.png +0 -0
- trunk/flags/zz.png +0 -0
- trunk/includes/admin/central/class-wpglobus-admin-central.php +0 -172
- trunk/includes/admin/class-wpglobus-about.php +0 -178
- trunk/includes/admin/class-wpglobus-admin-bar-menu.php +0 -213
- trunk/includes/admin/class-wpglobus-admin-menu.php +0 -34
- trunk/includes/admin/class-wpglobus-admin-page.php +0 -203
- trunk/includes/admin/class-wpglobus-admin-post.php +0 -57
- trunk/includes/admin/class-wpglobus-clean.php +0 -736
- trunk/includes/admin/class-wpglobus-customize-options.php +0 -1571
- trunk/includes/admin/class-wpglobus-dashboard-news.php +0 -67
- trunk/includes/admin/class-wpglobus-language-edit-request.php +0 -255
- trunk/includes/admin/class-wpglobus-language-edit.php +0 -494
- trunk/includes/admin/class-wpglobus-plugin-install.php +0 -336
- trunk/includes/admin/customize/class-wpglobus-customize-themes.php +0 -83
- trunk/includes/admin/customize/class-wpglobus-customize140.php +0 -282
- trunk/includes/admin/customize/class-wpglobus-customize170.php +0 -300
- trunk/includes/admin/customize/class-wpglobus-customize190.php +0 -555
- trunk/includes/admin/customize/wpglobus-customize-filters.php +0 -87
- trunk/includes/admin/customize/wpglobus-customize.php +0 -22
- trunk/includes/admin/debug/class-wpglobus-admin-debug.php +0 -366
- trunk/includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php +0 -292
- trunk/includes/admin/helpdesk/wpglobus-admin-helpdesk-page.php +0 -165
- trunk/includes/admin/media/class-wpglobus-media.php +0 -413
- trunk/includes/admin/media/wpglobus-media.php +0 -38
- trunk/includes/admin/meta/class-wpglobus-meta.php +0 -543
- trunk/includes/admin/recommendations/class-wpglobus-admin-recommendations.php +0 -251
- trunk/includes/admin/register-post-types/class-wpglobus-register-post-types.php +0 -147
- trunk/includes/admin/wpglobus-admin.php +0 -38
- trunk/includes/builders/assets/wpglobus-admin-builder-49.js +0 -348
- trunk/includes/builders/assets/wpglobus-admin-builder-49.min.js +0 -1
- trunk/includes/builders/assets/wpglobus-admin-builder-51.js +0 -348
- trunk/includes/builders/assets/wpglobus-admin-builder-51.min.js +0 -1
- trunk/includes/builders/class-wpglobus-builder-update-post.php +0 -62
- trunk/includes/builders/class-wpglobus-builder.php +0 -424
- trunk/includes/builders/class-wpglobus-builders.php +0 -1487
- trunk/includes/builders/class-wpglobus-config-builder.php +0 -554
- trunk/includes/builders/elementor/class-wpglobus-elementor-front.php +0 -353
- trunk/includes/builders/elementor/class-wpglobus-elementor-update-post.php +0 -118
- trunk/includes/builders/elementor/class-wpglobus-elementor.php +0 -483
- trunk/includes/builders/elementor/readme.txt +0 -8
- trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.css +0 -3
- trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.css.map +0 -1
- trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.scss +0 -45
- trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-switcher.css +0 -116
- trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.css +0 -3
- trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.css.map +0 -1
- trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.scss +0 -30
- trunk/includes/builders/gutenberg/assets/js/dist/wpglobus-block-editor.js +0 -607
- trunk/includes/builders/gutenberg/assets/js/dist/wpglobus-block-editor.min.js +0 -1
- trunk/includes/builders/gutenberg/assets/js/wpglobus-gutenberg.js +0 -602
- trunk/includes/builders/gutenberg/assets/js/wpglobus-gutenberg.min.js +0 -1
- trunk/includes/builders/gutenberg/class-wpglobus-gutenberg-update-post.php +0 -304
- trunk/includes/builders/gutenberg/class-wpglobus-gutenberg.php +0 -554
- trunk/includes/builders/js_composer/class-wpglobus-js_composer-update-post.php +0 -119
- trunk/includes/builders/js_composer/class-wpglobus-js_composer.php +0 -26
- trunk/includes/builders/pods/class-wpglobus-builder-pods.php +0 -110
- trunk/includes/builders/pods/class-wpglobus-pods-update-post.php +0 -120
- trunk/includes/builders/pods/class-wpglobus-pods.php +0 -31
- trunk/includes/builders/yoast_seo/class-wpglobus-yoast_seo-update-post.php +0 -259
- trunk/includes/builders/yoast_seo/class-wpglobus-yoast_seo.php +0 -145
- trunk/includes/class-wpglobus-config-vendor.php +0 -428
- trunk/includes/class-wpglobus-config.php +0 -965
- trunk/includes/class-wpglobus-core.php +0 -338
- trunk/includes/class-wpglobus-filters.php +0 -1257
- trunk/includes/class-wpglobus-plugin.php +0 -96
- trunk/includes/class-wpglobus-post-types.php +0 -133
- trunk/includes/class-wpglobus-redirect.php +0 -89
configs/rank-math-seo.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"post_meta_fields": {
|
3 |
+
"*":{"file":"vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo.php","class":"WPGlobus_Vendor_RankMathSEO"}
|
4 |
+
},
|
5 |
+
"post_ml_fields": {
|
6 |
+
"rank_math_title": {},
|
7 |
+
"rank_math_description": {},
|
8 |
+
"rank_math_focus_keyword": {}
|
9 |
+
},
|
10 |
+
"wp_options": {
|
11 |
+
"blogname": {},
|
12 |
+
"blogdescription": null
|
13 |
+
}
|
14 |
+
}
|
data/paid_plugins.json
CHANGED
@@ -16,7 +16,8 @@
|
|
16 |
"loader": "wpglobus-revslider.php",
|
17 |
"product_slug": "wpglobus-for-slider-revolution",
|
18 |
"image_file": "wpglobus-revslider-logo-400x400.png",
|
19 |
-
"order": 60
|
|
|
20 |
},
|
21 |
"wpglobus-language-widgets": {
|
22 |
"slug": "wpglobus-language-widgets",
|
16 |
"loader": "wpglobus-revslider.php",
|
17 |
"product_slug": "wpglobus-for-slider-revolution",
|
18 |
"image_file": "wpglobus-revslider-logo-400x400.png",
|
19 |
+
"order": 60,
|
20 |
+
"available": false
|
21 |
},
|
22 |
"wpglobus-language-widgets": {
|
23 |
"slug": "wpglobus-language-widgets",
|
data/wpglobus-product-info.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}WPGlobus Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.4.0"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.0.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.2"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.
|
1 |
+
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}WPGlobus Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.4.0"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.0.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.2"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.4"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"3.5.11","_api_tested_up_to":"5.4.0"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.3.10","_api_tested_up_to":"5.4.0"}}
|
includes/admin/class-wpglobus-plugin-install.php
CHANGED
@@ -233,8 +233,14 @@ if ( ! class_exists( 'WPGlobus_Plugin_Install' ) ) :
|
|
233 |
self::$paid_plugins[ $slug ]['extra_data']['details_url'] =
|
234 |
$info->homepage;
|
235 |
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
$res->info['results'] = count( $res->plugins );
|
@@ -304,6 +310,15 @@ if ( ! class_exists( 'WPGlobus_Plugin_Install' ) ) :
|
|
304 |
$i18n['card_header'] = esc_html__( 'Premium add-on', 'wpglobus' );
|
305 |
$i18n['installed'] = esc_html__( 'Installed', 'wpglobus' );
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
wp_register_script(
|
308 |
'wpglobus-plugin-install',
|
309 |
WPGlobus::$PLUGIN_DIR_URL . '/includes/js/wpglobus-plugin-install' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
233 |
self::$paid_plugins[ $slug ]['extra_data']['details_url'] =
|
234 |
$info->homepage;
|
235 |
|
236 |
+
/**
|
237 |
+
* @since 2.4.2
|
238 |
+
*/
|
239 |
+
if ( isset( $paid_plugin['available'] ) && ( empty($paid_plugin['available']) || false === $paid_plugin['available'] ) ) {
|
240 |
+
// Don't add unavailable plugin in response.
|
241 |
+
} else {
|
242 |
+
array_unshift( $res->plugins, $info );
|
243 |
+
}
|
244 |
}
|
245 |
|
246 |
$res->info['results'] = count( $res->plugins );
|
310 |
$i18n['card_header'] = esc_html__( 'Premium add-on', 'wpglobus' );
|
311 |
$i18n['installed'] = esc_html__( 'Installed', 'wpglobus' );
|
312 |
|
313 |
+
/**
|
314 |
+
* Link to the installation instructions.
|
315 |
+
*
|
316 |
+
* @since 2.4.3
|
317 |
+
*/
|
318 |
+
// translators: placeholders are for the HTML tags.
|
319 |
+
$pre_addons_info = esc_html__( 'If you have already purchased a WPGlobus premium extension, please read %1$sthe installation instructions here%2$s', 'wpglobus' );
|
320 |
+
$i18n['pre_addons_info'] = sprintf( $pre_addons_info, '<a href="' . WPGlobus::URL_WPGLOBUS_SITE . 'extensions/how-to-install/" target="_blank" style="color:#fff;">', '</a>' );
|
321 |
+
|
322 |
wp_register_script(
|
323 |
'wpglobus-plugin-install',
|
324 |
WPGlobus::$PLUGIN_DIR_URL . '/includes/js/wpglobus-plugin-install' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
includes/builders/class-wpglobus-builder-update-post.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
* File: class-wpglobus-builder-update-post.php
|
4 |
*
|
5 |
* @since 2.2.35
|
|
|
6 |
*
|
7 |
* @package WPGlobus\Builders
|
8 |
* @author Alex Gor(alexgff)
|
@@ -36,6 +37,12 @@ if ( ! class_exists( 'WPGlobus_Builder_Update_Post' ) ) :
|
|
36 |
}
|
37 |
|
38 |
add_filter( 'wp_insert_post_empty_content', array( $this, 'filter__post_empty_content' ), 10, 2);
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -57,6 +64,86 @@ if ( ! class_exists( 'WPGlobus_Builder_Update_Post' ) ) :
|
|
57 |
*/
|
58 |
return false;
|
59 |
}
|
60 |
-
}
|
61 |
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* File: class-wpglobus-builder-update-post.php
|
4 |
*
|
5 |
* @since 2.2.35
|
6 |
+
* @since 2.4.3 Added `wp_insert_post_data` filter.
|
7 |
*
|
8 |
* @package WPGlobus\Builders
|
9 |
* @author Alex Gor(alexgff)
|
37 |
}
|
38 |
|
39 |
add_filter( 'wp_insert_post_empty_content', array( $this, 'filter__post_empty_content' ), 10, 2);
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @since 2.4.3
|
43 |
+
* @todo incorrect the saving post in extra languages with priority = 10
|
44 |
+
*/
|
45 |
+
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
46 |
}
|
47 |
|
48 |
/**
|
64 |
*/
|
65 |
return false;
|
66 |
}
|
|
|
67 |
|
68 |
+
/**
|
69 |
+
* Callback for 'wp_insert_post_data'.
|
70 |
+
*
|
71 |
+
* @since 2.4.3
|
72 |
+
* @param array $data
|
73 |
+
* @param array $postarr
|
74 |
+
*
|
75 |
+
* @return mixed
|
76 |
+
*/
|
77 |
+
public function filter__wp_insert_post_data( $data, $postarr ) {
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Prevent to filter disabled post type.
|
81 |
+
*/
|
82 |
+
if ( in_array( $data['post_type'], WPGlobus::Config()->disabled_entities, true ) ) {
|
83 |
+
return $data;
|
84 |
+
}
|
85 |
+
|
86 |
+
global $wpdb;
|
87 |
+
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d AND post_type = %s LIMIT 1", $postarr['ID'], $postarr['post_type'] ) );
|
88 |
+
|
89 |
+
$fields = array();
|
90 |
+
if ( isset( $postarr['post_title'] ) ) {
|
91 |
+
$fields['post_title'] = $postarr['post_title'];
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( isset( $postarr['post_content'] ) ) {
|
95 |
+
$fields['post_content'] = $postarr['post_content'];
|
96 |
+
}
|
97 |
+
|
98 |
+
if ( isset( $postarr['post_excerpt'] ) ) {
|
99 |
+
$fields['post_excerpt'] = $postarr['post_excerpt'];
|
100 |
+
}
|
101 |
+
|
102 |
+
$builder_language = WPGlobus::Config()->builder->get_language();
|
103 |
+
|
104 |
+
if ( empty( $builder_language ) ) {
|
105 |
+
|
106 |
+
if ( empty( $postarr[ WPGlobus::get_language_meta_key() ] ) ) {
|
107 |
+
$builder_language = WPGlobus::Config()->default_language;
|
108 |
+
} else {
|
109 |
+
$builder_language = $postarr[ WPGlobus::get_language_meta_key() ];
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
foreach ( $fields as $field => $value ) {
|
114 |
+
|
115 |
+
$tr = array();
|
116 |
+
|
117 |
+
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
118 |
+
|
119 |
+
if ( $lang === $builder_language ) {
|
120 |
+
|
121 |
+
$text = $value;
|
122 |
+
if ( WPGlobus_Core::has_translations( $value ) ) {
|
123 |
+
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
124 |
+
}
|
125 |
+
if ( ! empty( $text ) ) {
|
126 |
+
$tr[ $lang ] = $text;
|
127 |
+
}
|
128 |
+
} else {
|
129 |
+
if ( isset( $_post->$field ) ) {
|
130 |
+
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
131 |
+
if ( ! empty( $text ) ) {
|
132 |
+
$tr[ $lang ] = $text;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
endforeach;
|
138 |
+
|
139 |
+
$data[ $field ] = WPGlobus_Utils::build_multilingual_string( $tr );
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
return $data;
|
144 |
+
}
|
145 |
+
} // class WPGlobus_Builder_Update_Post.
|
146 |
+
|
147 |
+
endif;
|
148 |
+
|
149 |
+
# --- EOF
|
includes/builders/class-wpglobus-builders.php
CHANGED
@@ -162,6 +162,23 @@ if ( ! class_exists( 'WPGlobus_Builders' ) ) :
|
|
162 |
'admin_bar_builder_label' => 'Pods',
|
163 |
);
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
/**
|
166 |
* self::$add_on['wp-subtitle'] = array(
|
167 |
* 'id' => 'wp-subtitle',
|
@@ -366,7 +383,20 @@ if ( ! class_exists( 'WPGlobus_Builders' ) ) :
|
|
366 |
return $builder;
|
367 |
}
|
368 |
|
369 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
}
|
371 |
|
372 |
return self::$attrs;
|
@@ -1301,6 +1331,38 @@ if ( ! class_exists( 'WPGlobus_Builders' ) ) :
|
|
1301 |
return $_attrs;
|
1302 |
}
|
1303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1304 |
/**
|
1305 |
* Get attributes.
|
1306 |
*
|
162 |
'admin_bar_builder_label' => 'Pods',
|
163 |
);
|
164 |
|
165 |
+
/**
|
166 |
+
* @since 2.4.3
|
167 |
+
*/
|
168 |
+
self::$add_on['rank_math_seo'] = array(
|
169 |
+
'id' => 'rank_math_seo',
|
170 |
+
'role' => 'builder',
|
171 |
+
'admin_bar_label' => 'Add-on',
|
172 |
+
'config_file' => 'rank-math-seo.json',
|
173 |
+
'supported_min_version' => '1.0.42',
|
174 |
+
'const' => 'RANK_MATH_VERSION',
|
175 |
+
'plugin_name' => 'Rank Math SEO',
|
176 |
+
'plugin_uri' => 'https://wordpress.org/plugins/seo-by-rank-math/',
|
177 |
+
'path' => 'seo-by-rank-math/rank-math.php',
|
178 |
+
'stage' => 'beta',
|
179 |
+
'admin_bar_builder_label' => 'Rank Math SEO',
|
180 |
+
);
|
181 |
+
|
182 |
/**
|
183 |
* self::$add_on['wp-subtitle'] = array(
|
184 |
* 'id' => 'wp-subtitle',
|
383 |
return $builder;
|
384 |
}
|
385 |
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Rank Math SEO.
|
390 |
+
*
|
391 |
+
* @since 2.4.3
|
392 |
+
*/
|
393 |
+
if ( ! $builder || ! $builder['builder_page'] ) {
|
394 |
+
$builder = self::is_rank_math_seo();
|
395 |
+
if ( $builder && $builder['builder_page'] ) {
|
396 |
+
return $builder;
|
397 |
+
}
|
398 |
+
|
399 |
+
}
|
400 |
}
|
401 |
|
402 |
return self::$attrs;
|
1331 |
return $_attrs;
|
1332 |
}
|
1333 |
|
1334 |
+
/**
|
1335 |
+
* Check for Rank Math SEO Plugin.
|
1336 |
+
*
|
1337 |
+
* @since 2.4.3
|
1338 |
+
*/
|
1339 |
+
protected static function is_rank_math_seo() {
|
1340 |
+
|
1341 |
+
if ( ! defined( 'RANK_MATH_VERSION' ) ) {
|
1342 |
+
return false;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
$post_type = self::get_post_type_2();
|
1346 |
+
|
1347 |
+
$_attrs = array(
|
1348 |
+
'id' => 'rank_math_seo',
|
1349 |
+
'version' => RANK_MATH_VERSION,
|
1350 |
+
'class' => 'WPGlobus_RankMathSEO',
|
1351 |
+
'builder_page' => false,
|
1352 |
+
'post_type' => empty( $post_type ) ? '' : $post_type,
|
1353 |
+
'taxonomy' => ''
|
1354 |
+
);
|
1355 |
+
|
1356 |
+
require_once 'rank_math_seo/class-wpglobus-builder-rank_math_seo.php';
|
1357 |
+
$_attrs = WPGlobus_Builder_RankMathSEO::get_attrs( self::get_attrs( $_attrs ) );
|
1358 |
+
|
1359 |
+
if ( ! $_attrs ) {
|
1360 |
+
return false;
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
return $_attrs;
|
1364 |
+
}
|
1365 |
+
|
1366 |
/**
|
1367 |
* Get attributes.
|
1368 |
*
|
includes/builders/rank_math_seo/class-wpglobus-builder-rank_math_seo.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-builder-rank_math_seo.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! class_exists( 'WPGlobus_Builder_RankMathSEO' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class WPGlobus_Builder_RankMathSEO.
|
15 |
+
*/
|
16 |
+
class WPGlobus_Builder_RankMathSEO {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Options titles.
|
20 |
+
* @see section Titles&Meta.
|
21 |
+
*/
|
22 |
+
protected static $options_titles = 'rank-math-options-titles';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get attributes.
|
26 |
+
*/
|
27 |
+
public static function get_attrs($attrs) {
|
28 |
+
|
29 |
+
/** @global string $pagenow */
|
30 |
+
global $pagenow;
|
31 |
+
|
32 |
+
if ( 'post.php' === $pagenow ) {
|
33 |
+
|
34 |
+
$post_type = 'post';
|
35 |
+
if ( ! empty( $attrs['post_type'] ) ) {
|
36 |
+
$post_type = $attrs['post_type'];
|
37 |
+
}
|
38 |
+
|
39 |
+
$opts = get_option( self::$options_titles );
|
40 |
+
|
41 |
+
if ( ! empty( $opts[ "pt_{$post_type}_add_meta_box" ] ) && 'off' == $opts[ "pt_{$post_type}_add_meta_box" ] ) {
|
42 |
+
$attrs = false;
|
43 |
+
} else {
|
44 |
+
$attrs['builder_page'] = true;
|
45 |
+
}
|
46 |
+
|
47 |
+
return $attrs;
|
48 |
+
|
49 |
+
} elseif ( 'term.php' === $pagenow ) {
|
50 |
+
|
51 |
+
$tax = empty( $_GET['taxonomy'] ) ? false : sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
52 |
+
|
53 |
+
if ( $tax ) {
|
54 |
+
|
55 |
+
$opts = get_option( self::$options_titles );
|
56 |
+
|
57 |
+
if ( ! empty( $opts[ "tax_{$tax}_add_meta_box" ] ) && 'off' == $opts[ "tax_{$tax}_add_meta_box" ] ) {
|
58 |
+
$attrs = false;
|
59 |
+
} else {
|
60 |
+
$attrs['post_type'] = ''; // reset post type.
|
61 |
+
$attrs['taxonomy'] = $tax;
|
62 |
+
$attrs['builder_page'] = true;
|
63 |
+
}
|
64 |
+
|
65 |
+
return $attrs;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
endif;
|
74 |
+
|
75 |
+
# --- EOF
|
includes/builders/rank_math_seo/class-wpglobus-rank_math_seo-functions.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-rank_math_seo-functions.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! class_exists( 'WPGlobus_RankMathSEO_Functions' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class WPGlobus_RankMathSEO_Functions.
|
15 |
+
*/
|
16 |
+
class WPGlobus_RankMathSEO_Functions {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Current taxonomy.
|
20 |
+
*/
|
21 |
+
protected static $taxonomy = false;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* WP_Term object.
|
25 |
+
*/
|
26 |
+
protected static $tag = false;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Current language.
|
30 |
+
*/
|
31 |
+
protected static $current_language = false;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor.
|
35 |
+
*/
|
36 |
+
public static function controller() {
|
37 |
+
|
38 |
+
if ( empty( $_POST['nonce_CMB2phprank_math_metabox'] ) || empty( $_POST['action'] ) ) {
|
39 |
+
/**
|
40 |
+
* Not `Rank Math SEO`.
|
41 |
+
*/
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
|
45 |
+
global $pagenow;
|
46 |
+
|
47 |
+
if ( ! empty( $_POST[ WPGlobus::get_language_meta_key() ] ) ) {
|
48 |
+
self::$current_language = sanitize_text_field( $_POST[ WPGlobus::get_language_meta_key() ] );
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( 'edit-tags.php' === $pagenow && 'editedtag' === $_POST['action'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
52 |
+
/**
|
53 |
+
* Update button was clicked.
|
54 |
+
*/
|
55 |
+
self::build_ml_description();
|
56 |
+
}
|
57 |
+
|
58 |
+
add_filter( 'wp_update_term_data', array( __CLASS__, 'filter__update_term_data' ), 5, 4 );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Build multilingual description.
|
63 |
+
* We don't have filter for description like filter for name @see 'wp_update_term_data' in wp-includes\taxonomy.php
|
64 |
+
*/
|
65 |
+
protected static function build_ml_description() {
|
66 |
+
|
67 |
+
if ( ! self::$current_language ) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
global $wpdb;
|
72 |
+
|
73 |
+
$tag_ID = (int) $_POST['tag_ID'];
|
74 |
+
$taxonomy = $_POST['taxonomy']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
75 |
+
|
76 |
+
self::$tag = get_term( $tag_ID, $taxonomy );
|
77 |
+
|
78 |
+
if ( is_wp_error( self::$tag ) ) {
|
79 |
+
|
80 |
+
$terms = $wpdb->get_results( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id = %d", $tag_ID ) );
|
81 |
+
if ( ! empty( $terms[0] ) && is_object( $terms[0] ) ) {
|
82 |
+
self::$tag = $terms[0];
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( is_wp_error( self::$tag ) ) {
|
87 |
+
/**
|
88 |
+
* @todo Investigate.
|
89 |
+
*/
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
$new_desc = array();
|
94 |
+
|
95 |
+
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
96 |
+
|
97 |
+
if ( $lang === self::$current_language ) {
|
98 |
+
|
99 |
+
$text = trim( $_POST['description'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
100 |
+
if ( ! empty( $text ) ) {
|
101 |
+
$new_desc[ $lang ] = $text;
|
102 |
+
}
|
103 |
+
} else {
|
104 |
+
|
105 |
+
$text = WPGlobus_Core::text_filter( self::$tag->description, $lang, WPGlobus::RETURN_EMPTY );
|
106 |
+
if ( ! empty( $text ) ) {
|
107 |
+
$new_desc[ $lang ] = $text;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
endforeach;
|
112 |
+
|
113 |
+
$_POST['description'] = WPGlobus_Utils::build_multilingual_string( $new_desc );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Filters term data before it is updated in the database.
|
118 |
+
*
|
119 |
+
* @param array $data Term data to be updated.
|
120 |
+
* @param int $term_id Term ID.
|
121 |
+
* @param string $taxonomy Taxonomy slug.
|
122 |
+
* @param array $args Arguments passed to wp_update_term().
|
123 |
+
*
|
124 |
+
* @return array
|
125 |
+
*/
|
126 |
+
public static function filter__update_term_data( $data, $term_id, $taxonomy, $args ) {
|
127 |
+
|
128 |
+
if ( is_wp_error( self::$tag ) ) {
|
129 |
+
/**
|
130 |
+
* @todo Investigate.
|
131 |
+
* may be to use $args.
|
132 |
+
*/
|
133 |
+
return $data;
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( ! self::$current_language ) {
|
137 |
+
return $data;
|
138 |
+
}
|
139 |
+
|
140 |
+
$new_term_name = array();
|
141 |
+
foreach ( WPGlobus::Config()->enabled_languages as $language ) :
|
142 |
+
|
143 |
+
if ( $language === self::$current_language ) {
|
144 |
+
|
145 |
+
$text = trim( $data['name'] );
|
146 |
+
if ( ! empty( $text ) ) {
|
147 |
+
$new_term_name[ $language ] = $text;
|
148 |
+
}
|
149 |
+
} else {
|
150 |
+
|
151 |
+
$text = WPGlobus_Core::text_filter( self::$tag->name, $language, WPGlobus::RETURN_EMPTY );
|
152 |
+
if ( ! empty( $text ) ) {
|
153 |
+
$new_term_name[ $language ] = $text;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
endforeach;
|
158 |
+
|
159 |
+
$data['name'] = WPGlobus_Utils::build_multilingual_string( $new_term_name );
|
160 |
+
|
161 |
+
return $data;
|
162 |
+
}
|
163 |
+
|
164 |
+
} // class WPGlobus_RankMathSEO_Functions.
|
165 |
+
|
166 |
+
endif;
|
167 |
+
|
168 |
+
# --- EOF
|
includes/builders/rank_math_seo/class-wpglobus-rank_math_seo-update-post.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-rank_math_seo-update-post.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! class_exists( 'WPGlobus_rank_math_seo_Update_Post' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class WPGlobus_rank_math_seo_Update_Post.
|
15 |
+
*/
|
16 |
+
// phpcs:ignore PEAR.NamingConventions
|
17 |
+
class WPGlobus_rank_math_seo_Update_Post extends WPGlobus_Builder_Update_Post {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*/
|
22 |
+
public function __construct( $id = null ) {
|
23 |
+
|
24 |
+
if ( is_null($id) ) {
|
25 |
+
$id = WPGlobus::Config()->builder->get_id();
|
26 |
+
}
|
27 |
+
|
28 |
+
parent::__construct( $id );
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @see_file wpglobus\includes\class-wpglobus.php
|
32 |
+
*/
|
33 |
+
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
34 |
+
}
|
35 |
+
|
36 |
+
} // class WPGlobus_rank_math_seo_Update_Post.
|
37 |
+
|
38 |
+
endif;
|
39 |
+
|
40 |
+
# --- EOF
|
includes/builders/rank_math_seo/class-wpglobus-rank_math_seo.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-rank_math_seo.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! class_exists( 'WPGlobus_RankMathSEO' ) ) :
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class WPGlobus_RankMathSEO.
|
15 |
+
*/
|
16 |
+
class WPGlobus_RankMathSEO extends WPGlobus_Builder {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Current taxonomy.
|
20 |
+
*/
|
21 |
+
protected $taxonomy = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Constructor.
|
25 |
+
*/
|
26 |
+
public function __construct( $id = null ) {
|
27 |
+
|
28 |
+
if ( is_null($id) ) {
|
29 |
+
$id = WPGlobus::Config()->builder->get_id();
|
30 |
+
}
|
31 |
+
|
32 |
+
parent::__construct( $id );
|
33 |
+
|
34 |
+
$this->taxonomy = WPGlobus::Config()->builder->get('taxonomy');
|
35 |
+
|
36 |
+
if ( ! is_null($this->taxonomy) ) {
|
37 |
+
|
38 |
+
add_action( "{$this->taxonomy}_pre_edit_form", array( $this, 'on__pre_edit_form' ), 10, 2 );
|
39 |
+
|
40 |
+
add_action( "{$this->taxonomy}_term_edit_form_top", array( $this, 'on__edit_form' ), 10, 2 );
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Fires before the Edit Term form for all taxonomies.
|
47 |
+
*
|
48 |
+
* @param object $tag Current taxonomy term object.
|
49 |
+
* @param string $taxonomy Current $taxonomy slug.
|
50 |
+
*/
|
51 |
+
public function on__pre_edit_form( $tag, $taxonomy ) {
|
52 |
+
/**
|
53 |
+
* Init Name and Description in current language.
|
54 |
+
*/
|
55 |
+
$tag->description = WPGlobus_Core::text_filter( $tag->description, $this->get_current_language(), WPGlobus::RETURN_EMPTY );
|
56 |
+
$tag->name = WPGlobus_Core::text_filter( $tag->name, $this->get_current_language(), WPGlobus::RETURN_EMPTY );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Add language field to taxonomy edit form.
|
61 |
+
* Fires at the beginning of the Edit Term form.
|
62 |
+
*
|
63 |
+
* @param object $tag Current taxonomy term object.
|
64 |
+
* @param string $taxonomy Current $taxonomy slug.
|
65 |
+
*/
|
66 |
+
public function on__edit_form( $tag, $taxonomy ) {
|
67 |
+
echo '<input type="hidden" name="'.WPGlobus::get_language_meta_key().'" value="'.$this->get_current_language().'">';
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
endif;
|
72 |
+
|
73 |
+
# --- EOF
|
includes/class-wpglobus-config-vendor.php
CHANGED
@@ -194,6 +194,15 @@ if ( ! class_exists( 'WPGlobus_Config_Vendor' ) ) :
|
|
194 |
self::$vendors[] = 'pods.json';
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
/**
|
198 |
* Page Builder by SiteOrigin.
|
199 |
* https://wordpress.org/plugins/siteorigin-panels/
|
194 |
self::$vendors[] = 'pods.json';
|
195 |
}
|
196 |
|
197 |
+
/**
|
198 |
+
* Rank Math SEO.
|
199 |
+
* https://wordpress.org/plugins/seo-by-rank-math/
|
200 |
+
* @since 2.4.3
|
201 |
+
*/
|
202 |
+
if ( defined( 'RANK_MATH_VERSION' ) ) {
|
203 |
+
self::$vendors[] = 'rank-math-seo.json';
|
204 |
+
}
|
205 |
+
|
206 |
/**
|
207 |
* Page Builder by SiteOrigin.
|
208 |
* https://wordpress.org/plugins/siteorigin-panels/
|
includes/js/wpglobus-plugin-install.js
CHANGED
@@ -20,6 +20,7 @@ jQuery(document).ready(function($) {
|
|
20 |
pluginInstalled: '<li><span class="button button-disabled">' + WPGlobusPluginInstall.i18n.installed + '</span></li>',
|
21 |
columnName: '<a href="{{href}}" class="" target="_blank">{{name}}<img src="{{img}}" class="plugin-icon"></a>',
|
22 |
currentVersion: '<strong>' + WPGlobusPluginInstall.i18n.current_version + ': </strong>{{version}}',
|
|
|
23 |
init: function() {
|
24 |
|
25 |
$.each( WPGlobusPluginInstall.pluginCard.paid, function(i, card) {
|
@@ -41,6 +42,7 @@ jQuery(document).ready(function($) {
|
|
41 |
/** add Installed button if it was lost */
|
42 |
if ( WPGlobusPluginInstall.pluginData[ card ].plugin_data !== null ) {
|
43 |
$( ccard + ' .plugin-action-buttons' ).prepend( api.pluginInstalled );
|
|
|
44 |
}
|
45 |
}
|
46 |
|
@@ -88,11 +90,23 @@ jQuery(document).ready(function($) {
|
|
88 |
$l.attr( 'href', nHref );
|
89 |
}
|
90 |
});
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
};
|
94 |
|
95 |
WPGlobusPluginInstall = $.extend({}, WPGlobusPluginInstall, api);
|
96 |
WPGlobusPluginInstall.init();
|
97 |
-
|
98 |
});
|
20 |
pluginInstalled: '<li><span class="button button-disabled">' + WPGlobusPluginInstall.i18n.installed + '</span></li>',
|
21 |
columnName: '<a href="{{href}}" class="" target="_blank">{{name}}<img src="{{img}}" class="plugin-icon"></a>',
|
22 |
currentVersion: '<strong>' + WPGlobusPluginInstall.i18n.current_version + ': </strong>{{version}}',
|
23 |
+
showPreAddonsInfo: true,
|
24 |
init: function() {
|
25 |
|
26 |
$.each( WPGlobusPluginInstall.pluginCard.paid, function(i, card) {
|
42 |
/** add Installed button if it was lost */
|
43 |
if ( WPGlobusPluginInstall.pluginData[ card ].plugin_data !== null ) {
|
44 |
$( ccard + ' .plugin-action-buttons' ).prepend( api.pluginInstalled );
|
45 |
+
api.showPreAddonsInfo = false;
|
46 |
}
|
47 |
}
|
48 |
|
90 |
$l.attr( 'href', nHref );
|
91 |
}
|
92 |
});
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @since 2.4.3
|
96 |
+
*/
|
97 |
+
api.showPreAddonsInfoBlock();
|
98 |
},
|
99 |
+
showPreAddonsInfoBlock: function() {
|
100 |
+
if ( ! api.showPreAddonsInfo ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
if ( WPGlobusPluginInstall.i18n.pre_addons_info == '' ) {
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
$('#plugin-filter').prepend('<div style="color:#fff;text-align:center;height:70px;background-color:#00a0d2;margin-top:15px;"><h3 style="padding-top:22px;font-size:18px;color:#fff;">'+WPGlobusPluginInstall.i18n.pre_addons_info+'</h3></div>');
|
107 |
+
}
|
108 |
};
|
109 |
|
110 |
WPGlobusPluginInstall = $.extend({}, WPGlobusPluginInstall, api);
|
111 |
WPGlobusPluginInstall.init();
|
|
|
112 |
});
|
includes/js/wpglobus-plugin-install.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(s){"use strict";if("undefined"!=typeof WPGlobusPluginInstall){var i={pluginInstalled:'<li><span class="button button-disabled">'+WPGlobusPluginInstall.i18n.installed+"</span></li>",columnName:'<a href="{{href}}" class="" target="_blank">{{name}}<img src="{{img}}" class="plugin-icon"></a>',currentVersion:"<strong>"+WPGlobusPluginInstall.i18n.current_version+": </strong>{{version}}",init:function(){s.each(WPGlobusPluginInstall.pluginCard.paid,function(l,n){var a=".plugin-card-"+n;s(a+" .column-rating").css({visibility:"hidden"}),s(a+" .column-downloaded").css({visibility:"hidden"}),s(a+" .column-rating").css({display:"none"}),s(a+" .column-updated").css({display:"none"}),1==s(a+" .plugin-action-buttons li").length&&null!==WPGlobusPluginInstall.pluginData[n].plugin_data&&s(a+" .plugin-action-buttons").prepend(i.pluginInstalled),s(a+" .plugin-action-buttons .button").each(function(l,n){s(n).hasClass("install-now")&&s(n).removeClass("install-now").addClass("wpglobus-install-now")}),s(a+" .plugin-action-buttons .wpglobus-install-now").attr("href",WPGlobusPluginInstall.pluginData[n].extra_data.product_url).attr("target","_blank"),s(a+" .open-plugin-details-modal").css({display:"none"});var t=i.columnName.replace("{{href}}",WPGlobusPluginInstall.pluginData[n].extra_data.details_url);t=(t=t.replace("{{name}}",WPGlobusPluginInstall.pluginData[n].card.name)).replace("{{img}}",WPGlobusPluginInstall.pluginData[n].card.icons["1x"]),s(a+" .column-name h3").html(t),null===WPGlobusPluginInstall.pluginData[n].plugin_data?s(a+" .column-updated").css({visibility:"hidden"}):s(a+" .column-updated").html(i.currentVersion.replace("{{version}}",WPGlobusPluginInstall.pluginData[n].plugin_data.Version)),s(a).prepend('<div class="plugin-card-header" style="text-align:center;height:40px;background-color:#00a0d2;padding-top:15px;"><h3 style="color:#fff;">'+WPGlobusPluginInstall.i18n.card_header+"</h3></div>")}),s(".plugin-action-buttons .wpglobus-install-now").css({"background-color":"#0f0"}).text(WPGlobusPluginInstall.i18n.get_it),s(".plugin-card.plugin-card-wpglobus-for-black-studio-widget a").each(function(l,n){var a,t=s(n),i=t.attr("href");-1===i.indexOf("wpglobus-for-black-studio-widget")||t.hasClass("button")||(a=i.replace("wpglobus-for-black-studio-widget",WPGlobusPluginInstall.pluginData["wpglobus-for-black-studio-widget"].extra_data.correctLink),t.attr("href",a))})}};WPGlobusPluginInstall=s.extend({},WPGlobusPluginInstall,i),WPGlobusPluginInstall.init()}});
|
1 |
+
jQuery(document).ready(function(s){"use strict";if("undefined"!=typeof WPGlobusPluginInstall){var i={pluginInstalled:'<li><span class="button button-disabled">'+WPGlobusPluginInstall.i18n.installed+"</span></li>",columnName:'<a href="{{href}}" class="" target="_blank">{{name}}<img src="{{img}}" class="plugin-icon"></a>',currentVersion:"<strong>"+WPGlobusPluginInstall.i18n.current_version+": </strong>{{version}}",showPreAddonsInfo:!0,init:function(){s.each(WPGlobusPluginInstall.pluginCard.paid,function(l,n){var a=".plugin-card-"+n;s(a+" .column-rating").css({visibility:"hidden"}),s(a+" .column-downloaded").css({visibility:"hidden"}),s(a+" .column-rating").css({display:"none"}),s(a+" .column-updated").css({display:"none"}),1==s(a+" .plugin-action-buttons li").length&&null!==WPGlobusPluginInstall.pluginData[n].plugin_data&&(s(a+" .plugin-action-buttons").prepend(i.pluginInstalled),i.showPreAddonsInfo=!1),s(a+" .plugin-action-buttons .button").each(function(l,n){s(n).hasClass("install-now")&&s(n).removeClass("install-now").addClass("wpglobus-install-now")}),s(a+" .plugin-action-buttons .wpglobus-install-now").attr("href",WPGlobusPluginInstall.pluginData[n].extra_data.product_url).attr("target","_blank"),s(a+" .open-plugin-details-modal").css({display:"none"});var t=i.columnName.replace("{{href}}",WPGlobusPluginInstall.pluginData[n].extra_data.details_url);t=(t=t.replace("{{name}}",WPGlobusPluginInstall.pluginData[n].card.name)).replace("{{img}}",WPGlobusPluginInstall.pluginData[n].card.icons["1x"]),s(a+" .column-name h3").html(t),null===WPGlobusPluginInstall.pluginData[n].plugin_data?s(a+" .column-updated").css({visibility:"hidden"}):s(a+" .column-updated").html(i.currentVersion.replace("{{version}}",WPGlobusPluginInstall.pluginData[n].plugin_data.Version)),s(a).prepend('<div class="plugin-card-header" style="text-align:center;height:40px;background-color:#00a0d2;padding-top:15px;"><h3 style="color:#fff;">'+WPGlobusPluginInstall.i18n.card_header+"</h3></div>")}),s(".plugin-action-buttons .wpglobus-install-now").css({"background-color":"#0f0"}).text(WPGlobusPluginInstall.i18n.get_it),s(".plugin-card.plugin-card-wpglobus-for-black-studio-widget a").each(function(l,n){var a,t=s(n),i=t.attr("href");-1===i.indexOf("wpglobus-for-black-studio-widget")||t.hasClass("button")||(a=i.replace("wpglobus-for-black-studio-widget",WPGlobusPluginInstall.pluginData["wpglobus-for-black-studio-widget"].extra_data.correctLink),t.attr("href",a))}),i.showPreAddonsInfoBlock()},showPreAddonsInfoBlock:function(){i.showPreAddonsInfo&&""!=WPGlobusPluginInstall.i18n.pre_addons_info&&s("#plugin-filter").prepend('<div style="color:#fff;text-align:center;height:70px;background-color:#00a0d2;margin-top:15px;"><h3 style="padding-top:22px;font-size:18px;color:#fff;">'+WPGlobusPluginInstall.i18n.pre_addons_info+"</h3></div>")}};WPGlobusPluginInstall=s.extend({},WPGlobusPluginInstall,i),WPGlobusPluginInstall.init()}});
|
includes/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo-front.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-vendor-rank_math_seo-front.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class WPGlobus_Vendor_RankMathSEO_Front.
|
13 |
+
*/
|
14 |
+
if ( ! class_exists( 'WPGlobus_Vendor_RankMathSEO_Front' ) ) :
|
15 |
+
|
16 |
+
class WPGlobus_Vendor_RankMathSEO_Front {
|
17 |
+
|
18 |
+
public static function controller() {
|
19 |
+
add_filter( 'wpglobus_multilingual_meta_keys', array( __CLASS__, 'filter__multilingual_meta_keys' ), 5 );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Specify meta keys where the meta data can be multilingual.
|
24 |
+
*/
|
25 |
+
public static function filter__multilingual_meta_keys( $multilingual_meta_keys ) {
|
26 |
+
|
27 |
+
$multilingual_meta_keys['rank_math_title'] = true;
|
28 |
+
$multilingual_meta_keys['rank_math_description'] = true;
|
29 |
+
$multilingual_meta_keys['rank_math_focus_keyword'] = true;
|
30 |
+
|
31 |
+
return $multilingual_meta_keys;
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
endif;
|
37 |
+
|
38 |
+
# --- EOF
|
includes/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-vendor-rank_math_seo.php
|
4 |
+
*
|
5 |
+
* @since 2.4.3
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Builders\RankMathSEO.
|
8 |
+
* @author Alex Gor(alexgff)
|
9 |
+
*/
|
10 |
+
/**
|
11 |
+
* Class WPGlobus_Vendor_RankMathSEO.
|
12 |
+
*/
|
13 |
+
if ( ! class_exists( 'WPGlobus_Vendor_RankMathSEO' ) ) :
|
14 |
+
|
15 |
+
class WPGlobus_Vendor_RankMathSEO {
|
16 |
+
|
17 |
+
protected static $post_meta_fields = null;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* List of fields to add `wpglobus-translatable` class.
|
21 |
+
*/
|
22 |
+
protected static $post_multilingual_fields = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var object Instance of this class.
|
26 |
+
*/
|
27 |
+
protected static $instance;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Constructor.
|
31 |
+
*/
|
32 |
+
protected function __construct(){}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get instance of this class.
|
36 |
+
*
|
37 |
+
* @return WPGlobus_Vendor_RankMathSEO
|
38 |
+
*/
|
39 |
+
public static function get_instance() {
|
40 |
+
if ( ! ( self::$instance instanceof WPGlobus_Vendor_RankMathSEO ) ) {
|
41 |
+
self::$instance = new self();
|
42 |
+
}
|
43 |
+
|
44 |
+
return self::$instance;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get multilingual fields.
|
49 |
+
*/
|
50 |
+
public static function get_post_multilingual_fields() {
|
51 |
+
if ( is_null( self::$post_multilingual_fields ) ) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
|
55 |
+
return self::$post_multilingual_fields;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get post meta.
|
60 |
+
*
|
61 |
+
* Don't call WPGlobus::Config() inside function to prevent the resetting of `meta` property.
|
62 |
+
*
|
63 |
+
* @param $post_id
|
64 |
+
* @param string $post_type
|
65 |
+
*
|
66 |
+
* @return array
|
67 |
+
*/
|
68 |
+
public static function get_post_meta_fields( $post_id, $post_type = 'post' ) {
|
69 |
+
|
70 |
+
if ( ! is_null( self::$post_meta_fields ) ) {
|
71 |
+
return self::$post_meta_fields;
|
72 |
+
}
|
73 |
+
|
74 |
+
$post_id = (int) $post_id;
|
75 |
+
|
76 |
+
if ( $post_id > 0 ) {
|
77 |
+
|
78 |
+
self::$post_meta_fields = array(
|
79 |
+
'rank_math_title',
|
80 |
+
'rank_math_description',
|
81 |
+
'rank_math_focus_keyword',
|
82 |
+
);
|
83 |
+
}
|
84 |
+
|
85 |
+
return self::$post_meta_fields;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Check 3rd party plugin to enable/disable field.
|
90 |
+
*
|
91 |
+
* @param array $field
|
92 |
+
*
|
93 |
+
* @return bool
|
94 |
+
*/
|
95 |
+
protected static function get_3rd_party_field_status( $field ) {
|
96 |
+
// @see wpglobus\includes\vendor\acf\class-wpglobus-acf.php for example.
|
97 |
+
return true;
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
endif;
|
103 |
+
|
104 |
+
# --- EOF
|
includes/vendor/wpglobus-vendors.php
CHANGED
@@ -23,6 +23,15 @@ if ( defined( 'PODS_VERSION' ) ) {
|
|
23 |
WPGlobus_Vendor_Pods::get_instance();
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* ACF.
|
28 |
* https://wordpress.org/plugins/advanced-custom-fields/
|
23 |
WPGlobus_Vendor_Pods::get_instance();
|
24 |
}
|
25 |
|
26 |
+
/**
|
27 |
+
* Rank Math SEO.
|
28 |
+
* @since 2.4.3
|
29 |
+
*/
|
30 |
+
if ( defined( 'RANK_MATH_VERSION' ) ) {
|
31 |
+
require_once( dirname( __FILE__ ) . '/rank-math-seo/class-wpglobus-vendor-rank_math_seo.php' );
|
32 |
+
WPGlobus_Vendor_RankMathSEO::get_instance();
|
33 |
+
}
|
34 |
+
|
35 |
/**
|
36 |
* ACF.
|
37 |
* https://wordpress.org/plugins/advanced-custom-fields/
|
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php
CHANGED
@@ -98,7 +98,7 @@ class WPGlobus_YoastSEO {
|
|
98 |
/**
|
99 |
* Frontend.
|
100 |
*/
|
101 |
-
|
102 |
/**
|
103 |
* Filter SEO title and meta description on front only, when the page header HTML tags are generated.
|
104 |
* AJAX is probably not required (waiting for a case).
|
@@ -125,9 +125,10 @@ class WPGlobus_YoastSEO {
|
|
125 |
add_filter( 'wpseo_opengraph_url', array( __CLASS__, 'filter_front__localize_url' ), 5, 2 );
|
126 |
|
127 |
/**
|
128 |
-
*
|
|
|
129 |
*/
|
130 |
-
|
131 |
|
132 |
/**
|
133 |
* @todo check for '_yoast_wpseo_title' meta
|
@@ -377,14 +378,141 @@ class WPGlobus_YoastSEO {
|
|
377 |
}
|
378 |
|
379 |
/**
|
|
|
|
|
|
|
380 |
* @scope front
|
381 |
-
* @since 2.4
|
382 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
*/
|
384 |
public static function filter__breadcrumb_output( $output, $presentation ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
return $output;
|
386 |
}
|
387 |
-
|
388 |
|
389 |
/**
|
390 |
* Filter wpseo meta description.
|
98 |
/**
|
99 |
* Frontend.
|
100 |
*/
|
101 |
+
|
102 |
/**
|
103 |
* Filter SEO title and meta description on front only, when the page header HTML tags are generated.
|
104 |
* AJAX is probably not required (waiting for a case).
|
125 |
add_filter( 'wpseo_opengraph_url', array( __CLASS__, 'filter_front__localize_url' ), 5, 2 );
|
126 |
|
127 |
/**
|
128 |
+
* Filter the HTML output of the Yoast SEO breadcrumbs class.
|
129 |
+
* @since 2.4.2
|
130 |
*/
|
131 |
+
add_filter( 'wpseo_breadcrumb_output', array( __CLASS__, 'filter__breadcrumb_output' ), 5, 2 );
|
132 |
|
133 |
/**
|
134 |
* @todo check for '_yoast_wpseo_title' meta
|
378 |
}
|
379 |
|
380 |
/**
|
381 |
+
* Filter the HTML output of the Yoast SEO breadcrumbs class.
|
382 |
+
*
|
383 |
+
* @see wordpress-seo\src\presenters\breadcrumbs-presenter.php
|
384 |
* @scope front
|
385 |
+
* @since 2.4.2
|
386 |
+
*
|
387 |
+
* @param $output The HTML output
|
388 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
389 |
+
*
|
390 |
+
* @api string $output The HTML output.
|
391 |
+
*
|
392 |
+
* @return string
|
393 |
*/
|
394 |
public static function filter__breadcrumb_output( $output, $presentation ) {
|
395 |
+
|
396 |
+
/** @global wpdb $wpdb */
|
397 |
+
global $wpdb;
|
398 |
+
|
399 |
+
$object_type = null;
|
400 |
+
$object_sub_type = null;
|
401 |
+
$object_order = null;
|
402 |
+
|
403 |
+
if ( $presentation->source instanceof WP_Post ) {
|
404 |
+
|
405 |
+
$object_type = 'post';
|
406 |
+
$object_sub_type = $presentation->source->post_type;
|
407 |
+
|
408 |
+
} elseif ( $presentation->source instanceof WP_Term ) {
|
409 |
+
|
410 |
+
$object_type = 'taxonomy';
|
411 |
+
$object_sub_type = $presentation->source->taxonomy;
|
412 |
+
|
413 |
+
if ( $presentation->source->parent == 0 ) {
|
414 |
+
$object_order = array($presentation->source->term_id);
|
415 |
+
} else {
|
416 |
+
$object_order = get_ancestors($presentation->source->term_id, $object_sub_type);
|
417 |
+
if ( count($object_order) > 1 ) {
|
418 |
+
$object_order = array_reverse( $object_order );
|
419 |
+
}
|
420 |
+
$object_order[] = $presentation->source->term_id;
|
421 |
+
}
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
$ids = array();
|
426 |
+
$breadcrumbs = array();
|
427 |
+
$i = 0;
|
428 |
+
|
429 |
+
foreach( $presentation->breadcrumbs as $order=>$piece ) {
|
430 |
+
|
431 |
+
if ( $order == 0 ) {
|
432 |
+
|
433 |
+
if ( empty( $piece['id'] ) ) {
|
434 |
+
/**
|
435 |
+
* If homepage displays as latest posts, then we should force the setting of `Home` for all languages.
|
436 |
+
*/
|
437 |
+
$output = str_replace( $piece['url'], home_url('/'), $output );
|
438 |
+
} else {
|
439 |
+
if ( WPGlobus::Config()->language != WPGlobus::Config()->default_language ) {
|
440 |
+
$output = str_replace( $piece['url'], home_url('/'), $output );
|
441 |
+
}
|
442 |
+
}
|
443 |
+
|
444 |
+
if ( WPGlobus_Core::has_translations($piece['text']) ) {
|
445 |
+
$_home_text = WPGlobus_Core::text_filter( $piece['text'], WPGlobus::Config()->language, WPGlobus::RETURN_IN_DEFAULT_LANGUAGE );
|
446 |
+
$output = str_replace( $piece['text'], $_home_text, $output );
|
447 |
+
}
|
448 |
+
|
449 |
+
} else {
|
450 |
+
|
451 |
+
switch ($object_type) :
|
452 |
+
case 'post' :
|
453 |
+
if ( ! empty($piece['id']) ) {
|
454 |
+
$ids[] = $piece['id'];
|
455 |
+
$breadcrumbs[ $piece['id'] ] = $piece;
|
456 |
+
$breadcrumbs[ $piece['id'] ]['object_type'] = $object_type;
|
457 |
+
$breadcrumbs[ $piece['id'] ]['object_sub_type'] = $object_sub_type;
|
458 |
+
}
|
459 |
+
break;
|
460 |
+
case 'taxonomy' :
|
461 |
+
$_id = $order;
|
462 |
+
if ( ! is_null( $object_order ) ) {
|
463 |
+
$_id = $object_order[$i];
|
464 |
+
$ids[] = $_id;
|
465 |
+
}
|
466 |
+
$breadcrumbs[ $_id ] = $piece;
|
467 |
+
$breadcrumbs[ $_id ]['object_type'] = $object_type;
|
468 |
+
$breadcrumbs[ $_id ]['object_sub_type'] = $object_sub_type;
|
469 |
+
$i++;
|
470 |
+
break;
|
471 |
+
endswitch;
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
$query = null;
|
476 |
+
|
477 |
+
if ( ! empty($ids) ) {
|
478 |
+
|
479 |
+
$_ids = implode( ',', $ids );
|
480 |
+
switch ($object_type) :
|
481 |
+
case 'post' :
|
482 |
+
$select = $wpdb->prepare( "SELECT ID, post_title AS ml_title, post_name, post_type FROM $wpdb->posts WHERE ID IN ( %s )", $_ids );
|
483 |
+
$select = str_replace( "'", '', $select );
|
484 |
+
break;
|
485 |
+
case 'taxonomy' :
|
486 |
+
$select = $wpdb->prepare( "SELECT term_id, name AS ml_title, slug FROM $wpdb->terms WHERE term_id IN ( %s )", $_ids );
|
487 |
+
$select = str_replace( "'", '', $select );
|
488 |
+
break;
|
489 |
+
endswitch;
|
490 |
+
|
491 |
+
$query = $wpdb->get_results( $select, OBJECT_K );
|
492 |
+
|
493 |
+
foreach( $breadcrumbs as $id=>$piece ) {
|
494 |
+
|
495 |
+
$output = str_replace(
|
496 |
+
array(
|
497 |
+
$piece['url'],
|
498 |
+
$piece['text']
|
499 |
+
),
|
500 |
+
array(
|
501 |
+
WPGlobus_Utils::localize_url( $piece['url'], WPGlobus::Config()->language ),
|
502 |
+
WPGlobus_Core::text_filter( $query[$id]->ml_title, WPGlobus::Config()->language )
|
503 |
+
),
|
504 |
+
$output
|
505 |
+
);
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* @since 2.4.2 @W.I.P
|
511 |
+
*/
|
512 |
+
//$output = apply_filters( 'wpglobus_wpseo_breadcrumb_output', $output, $breadcrumbs, $query );
|
513 |
+
|
514 |
return $output;
|
515 |
}
|
|
|
516 |
|
517 |
/**
|
518 |
* Filter wpseo meta description.
|
includes/wpglobus-controller.php
CHANGED
@@ -508,4 +508,25 @@ if ( function_exists('pods_api') ) {
|
|
508 |
}
|
509 |
}
|
510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
/*EOF*/
|
508 |
}
|
509 |
}
|
510 |
|
511 |
+
if ( defined('RANK_MATH_VERSION') ) {
|
512 |
+
|
513 |
+
/**
|
514 |
+
* WordPress SEO Plugin – Rank Math.
|
515 |
+
* https://wordpress.org/plugins/seo-by-rank-math/
|
516 |
+
*
|
517 |
+
* @since 2.4.3
|
518 |
+
*/
|
519 |
+
if ( is_admin() ) {
|
520 |
+
/**
|
521 |
+
* We use WPGlobus_RankMathSEO_Functions class instead of WPGlobus_rank_math_seo_Update_Post class.
|
522 |
+
* Unlike of Yoast Update class, filter `wp_update_term_data` doesn't fire from WPGlobus_rank_math_seo_Update_Post class.
|
523 |
+
*/
|
524 |
+
require_once dirname( __FILE__ ) . '/builders/rank_math_seo/class-wpglobus-rank_math_seo-functions.php';
|
525 |
+
WPGlobus_RankMathSEO_Functions::controller();
|
526 |
+
} else {
|
527 |
+
require_once dirname( __FILE__ ) . '/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo-front.php';
|
528 |
+
WPGlobus_Vendor_RankMathSEO_Front::controller();
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
/*EOF*/
|
languages/wpglobus-ar.po
CHANGED
@@ -683,23 +683,30 @@ msgstr "هل أنت متأكد من المسح؟"
|
|
683 |
msgid "Back to the WPGlobus Settings"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
687 |
msgid "Current Version"
|
688 |
msgstr "النسخة الحالية"
|
689 |
|
690 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
691 |
msgid "Get it now!"
|
692 |
msgstr "إحصل عليها الأن!"
|
693 |
|
694 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
695 |
msgid "Premium add-on"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
699 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
700 |
msgid "Installed"
|
701 |
msgstr "مُثبت"
|
702 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
704 |
#: includes/options/class-wpglobus-options.php:707
|
705 |
msgid "Help Desk"
|
683 |
msgid "Back to the WPGlobus Settings"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
687 |
msgid "Current Version"
|
688 |
msgstr "النسخة الحالية"
|
689 |
|
690 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
691 |
msgid "Get it now!"
|
692 |
msgstr "إحصل عليها الأن!"
|
693 |
|
694 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
695 |
msgid "Premium add-on"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
699 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
700 |
msgid "Installed"
|
701 |
msgstr "مُثبت"
|
702 |
|
703 |
+
#. translators: placeholders are for the HTML tags.
|
704 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
705 |
+
msgid ""
|
706 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
707 |
+
"%1$sthe installation instructions here%2$s"
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
711 |
#: includes/options/class-wpglobus-options.php:707
|
712 |
msgid "Help Desk"
|
languages/wpglobus-be.po
CHANGED
@@ -730,23 +730,30 @@ msgstr "Удалить? Вы уверены?"
|
|
730 |
msgid "Back to the WPGlobus Settings"
|
731 |
msgstr "Вернуться к настройкам WPGlobus"
|
732 |
|
733 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
734 |
msgid "Current Version"
|
735 |
msgstr "Текущая версия"
|
736 |
|
737 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
738 |
msgid "Get it now!"
|
739 |
msgstr "Установить!"
|
740 |
|
741 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
742 |
msgid "Premium add-on"
|
743 |
msgstr "Платное расширение"
|
744 |
|
745 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
746 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
747 |
msgid "Installed"
|
748 |
msgstr "Установлен"
|
749 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
750 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
751 |
#: includes/options/class-wpglobus-options.php:707
|
752 |
msgid "Help Desk"
|
730 |
msgid "Back to the WPGlobus Settings"
|
731 |
msgstr "Вернуться к настройкам WPGlobus"
|
732 |
|
733 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
734 |
msgid "Current Version"
|
735 |
msgstr "Текущая версия"
|
736 |
|
737 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
738 |
msgid "Get it now!"
|
739 |
msgstr "Установить!"
|
740 |
|
741 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
742 |
msgid "Premium add-on"
|
743 |
msgstr "Платное расширение"
|
744 |
|
745 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
746 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
747 |
msgid "Installed"
|
748 |
msgstr "Установлен"
|
749 |
|
750 |
+
#. translators: placeholders are for the HTML tags.
|
751 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
752 |
+
msgid ""
|
753 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
754 |
+
"%1$sthe installation instructions here%2$s"
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
758 |
#: includes/options/class-wpglobus-options.php:707
|
759 |
msgid "Help Desk"
|
languages/wpglobus-bg_BG.po
CHANGED
@@ -659,23 +659,30 @@ msgstr ""
|
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr ""
|
678 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
680 |
#: includes/options/class-wpglobus-options.php:707
|
681 |
msgid "Help Desk"
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#. translators: placeholders are for the HTML tags.
|
680 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
681 |
+
msgid ""
|
682 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
683 |
+
"%1$sthe installation instructions here%2$s"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
687 |
#: includes/options/class-wpglobus-options.php:707
|
688 |
msgid "Help Desk"
|
languages/wpglobus-de_CH.po
CHANGED
@@ -695,23 +695,30 @@ msgstr "Sind Sie sicher, dass Sie die Lösch-Aktion durchführen möchten?"
|
|
695 |
msgid "Back to the WPGlobus Settings"
|
696 |
msgstr "Zurück zu den WPGlobus-Einstellungen"
|
697 |
|
698 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
699 |
msgid "Current Version"
|
700 |
msgstr "Aktelle Version"
|
701 |
|
702 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
703 |
msgid "Get it now!"
|
704 |
msgstr "Jetzt holen"
|
705 |
|
706 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
707 |
msgid "Premium add-on"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
711 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
712 |
msgid "Installed"
|
713 |
msgstr "Instaliert"
|
714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
715 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
716 |
#: includes/options/class-wpglobus-options.php:707
|
717 |
msgid "Help Desk"
|
695 |
msgid "Back to the WPGlobus Settings"
|
696 |
msgstr "Zurück zu den WPGlobus-Einstellungen"
|
697 |
|
698 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
699 |
msgid "Current Version"
|
700 |
msgstr "Aktelle Version"
|
701 |
|
702 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
703 |
msgid "Get it now!"
|
704 |
msgstr "Jetzt holen"
|
705 |
|
706 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
707 |
msgid "Premium add-on"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
711 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
712 |
msgid "Installed"
|
713 |
msgstr "Instaliert"
|
714 |
|
715 |
+
#. translators: placeholders are for the HTML tags.
|
716 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
717 |
+
msgid ""
|
718 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
719 |
+
"%1$sthe installation instructions here%2$s"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
723 |
#: includes/options/class-wpglobus-options.php:707
|
724 |
msgid "Help Desk"
|
languages/wpglobus-de_DE.po
CHANGED
@@ -695,23 +695,30 @@ msgstr "Sind Sie sicher, dass Sie die Lösch-Aktion durchführen möchten?"
|
|
695 |
msgid "Back to the WPGlobus Settings"
|
696 |
msgstr "Zurück zu den WPGlobus-Einstellungen"
|
697 |
|
698 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
699 |
msgid "Current Version"
|
700 |
msgstr "Aktuelle Version"
|
701 |
|
702 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
703 |
msgid "Get it now!"
|
704 |
msgstr "Jetzt holen"
|
705 |
|
706 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
707 |
msgid "Premium add-on"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
711 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
712 |
msgid "Installed"
|
713 |
msgstr "Installiert"
|
714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
715 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
716 |
#: includes/options/class-wpglobus-options.php:707
|
717 |
msgid "Help Desk"
|
695 |
msgid "Back to the WPGlobus Settings"
|
696 |
msgstr "Zurück zu den WPGlobus-Einstellungen"
|
697 |
|
698 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
699 |
msgid "Current Version"
|
700 |
msgstr "Aktuelle Version"
|
701 |
|
702 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
703 |
msgid "Get it now!"
|
704 |
msgstr "Jetzt holen"
|
705 |
|
706 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
707 |
msgid "Premium add-on"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
711 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
712 |
msgid "Installed"
|
713 |
msgstr "Installiert"
|
714 |
|
715 |
+
#. translators: placeholders are for the HTML tags.
|
716 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
717 |
+
msgid ""
|
718 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
719 |
+
"%1$sthe installation instructions here%2$s"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
723 |
#: includes/options/class-wpglobus-options.php:707
|
724 |
msgid "Help Desk"
|
languages/wpglobus-el.po
CHANGED
@@ -660,23 +660,30 @@ msgstr ""
|
|
660 |
msgid "Back to the WPGlobus Settings"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
664 |
msgid "Current Version"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
668 |
msgid "Get it now!"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
672 |
msgid "Premium add-on"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
676 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
677 |
msgid "Installed"
|
678 |
msgstr ""
|
679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
681 |
#: includes/options/class-wpglobus-options.php:707
|
682 |
msgid "Help Desk"
|
660 |
msgid "Back to the WPGlobus Settings"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
664 |
msgid "Current Version"
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
668 |
msgid "Get it now!"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
672 |
msgid "Premium add-on"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
676 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
677 |
msgid "Installed"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#. translators: placeholders are for the HTML tags.
|
681 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
682 |
+
msgid ""
|
683 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
684 |
+
"%1$sthe installation instructions here%2$s"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
688 |
#: includes/options/class-wpglobus-options.php:707
|
689 |
msgid "Help Desk"
|
languages/wpglobus-en_AU.po
CHANGED
@@ -729,23 +729,30 @@ msgstr "Are you sure you want to delete?"
|
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
750 |
#: includes/options/class-wpglobus-options.php:707
|
751 |
msgid "Help Desk"
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
749 |
+
#. translators: placeholders are for the HTML tags.
|
750 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
751 |
+
msgid ""
|
752 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
753 |
+
"%1$sthe installation instructions here%2$s"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
757 |
#: includes/options/class-wpglobus-options.php:707
|
758 |
msgid "Help Desk"
|
languages/wpglobus-en_CA.po
CHANGED
@@ -728,23 +728,30 @@ msgstr "Are you sure you want to delete?"
|
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
749 |
#: includes/options/class-wpglobus-options.php:707
|
750 |
msgid "Help Desk"
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
748 |
+
#. translators: placeholders are for the HTML tags.
|
749 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
750 |
+
msgid ""
|
751 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
752 |
+
"%1$sthe installation instructions here%2$s"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
756 |
#: includes/options/class-wpglobus-options.php:707
|
757 |
msgid "Help Desk"
|
languages/wpglobus-en_GB.po
CHANGED
@@ -729,23 +729,30 @@ msgstr "Are you sure you want to delete?"
|
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
750 |
#: includes/options/class-wpglobus-options.php:707
|
751 |
msgid "Help Desk"
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
749 |
+
#. translators: placeholders are for the HTML tags.
|
750 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
751 |
+
msgid ""
|
752 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
753 |
+
"%1$sthe installation instructions here%2$s"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
757 |
#: includes/options/class-wpglobus-options.php:707
|
758 |
msgid "Help Desk"
|
languages/wpglobus-en_NZ.po
CHANGED
@@ -728,23 +728,30 @@ msgstr "Are you sure you want to delete?"
|
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
749 |
#: includes/options/class-wpglobus-options.php:707
|
750 |
msgid "Help Desk"
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
748 |
+
#. translators: placeholders are for the HTML tags.
|
749 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
750 |
+
msgid ""
|
751 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
752 |
+
"%1$sthe installation instructions here%2$s"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
756 |
#: includes/options/class-wpglobus-options.php:707
|
757 |
msgid "Help Desk"
|
languages/wpglobus-en_US.po
CHANGED
@@ -729,23 +729,30 @@ msgstr "Are you sure you want to delete?"
|
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
750 |
#: includes/options/class-wpglobus-options.php:707
|
751 |
msgid "Help Desk"
|
729 |
msgid "Back to the WPGlobus Settings"
|
730 |
msgstr "Back to the WPGlobus Settings"
|
731 |
|
732 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
733 |
msgid "Current Version"
|
734 |
msgstr "Current Version"
|
735 |
|
736 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
737 |
msgid "Get it now!"
|
738 |
msgstr "Get it now!"
|
739 |
|
740 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
741 |
msgid "Premium add-on"
|
742 |
msgstr "Premium add-on"
|
743 |
|
744 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
745 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
746 |
msgid "Installed"
|
747 |
msgstr "Installed"
|
748 |
|
749 |
+
#. translators: placeholders are for the HTML tags.
|
750 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
751 |
+
msgid ""
|
752 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
753 |
+
"%1$sthe installation instructions here%2$s"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
757 |
#: includes/options/class-wpglobus-options.php:707
|
758 |
msgid "Help Desk"
|
languages/wpglobus-en_ZA.po
CHANGED
@@ -728,23 +728,30 @@ msgstr "Are you sure you want to delete?"
|
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
749 |
#: includes/options/class-wpglobus-options.php:707
|
750 |
msgid "Help Desk"
|
728 |
msgid "Back to the WPGlobus Settings"
|
729 |
msgstr "Back to the WPGlobus Settings"
|
730 |
|
731 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
732 |
msgid "Current Version"
|
733 |
msgstr "Current Version"
|
734 |
|
735 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
736 |
msgid "Get it now!"
|
737 |
msgstr "Get it now!"
|
738 |
|
739 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
740 |
msgid "Premium add-on"
|
741 |
msgstr "Premium add-on"
|
742 |
|
743 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
744 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
745 |
msgid "Installed"
|
746 |
msgstr "Installed"
|
747 |
|
748 |
+
#. translators: placeholders are for the HTML tags.
|
749 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
750 |
+
msgid ""
|
751 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
752 |
+
"%1$sthe installation instructions here%2$s"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
756 |
#: includes/options/class-wpglobus-options.php:707
|
757 |
msgid "Help Desk"
|
languages/wpglobus-es_AR.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_CL.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_CO.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_CR.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_ES.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_GT.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_MX.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_PE.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_PR.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-es_VE.po
CHANGED
@@ -694,23 +694,30 @@ msgstr "Estás seguro de que quieres borrarlo?"
|
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
715 |
#: includes/options/class-wpglobus-options.php:707
|
716 |
msgid "Help Desk"
|
694 |
msgid "Back to the WPGlobus Settings"
|
695 |
msgstr "Volver a Ajustes WPGlobus"
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
698 |
msgid "Current Version"
|
699 |
msgstr "Versión Actual"
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
702 |
msgid "Get it now!"
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
706 |
msgid "Premium add-on"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
710 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
711 |
msgid "Installed"
|
712 |
msgstr "Instalado"
|
713 |
|
714 |
+
#. translators: placeholders are for the HTML tags.
|
715 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
716 |
+
msgid ""
|
717 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
718 |
+
"%1$sthe installation instructions here%2$s"
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
722 |
#: includes/options/class-wpglobus-options.php:707
|
723 |
msgid "Help Desk"
|
languages/wpglobus-et.po
CHANGED
@@ -660,23 +660,30 @@ msgstr "Oled sa kindel, et soovid seda kustutada?"
|
|
660 |
msgid "Back to the WPGlobus Settings"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
664 |
msgid "Current Version"
|
665 |
msgstr "Praegune versioon"
|
666 |
|
667 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
668 |
msgid "Get it now!"
|
669 |
msgstr "Hangi kohe!"
|
670 |
|
671 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
672 |
msgid "Premium add-on"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
676 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
677 |
msgid "Installed"
|
678 |
msgstr "Paigaldatud"
|
679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
681 |
#: includes/options/class-wpglobus-options.php:707
|
682 |
msgid "Help Desk"
|
660 |
msgid "Back to the WPGlobus Settings"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
664 |
msgid "Current Version"
|
665 |
msgstr "Praegune versioon"
|
666 |
|
667 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
668 |
msgid "Get it now!"
|
669 |
msgstr "Hangi kohe!"
|
670 |
|
671 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
672 |
msgid "Premium add-on"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
676 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
677 |
msgid "Installed"
|
678 |
msgstr "Paigaldatud"
|
679 |
|
680 |
+
#. translators: placeholders are for the HTML tags.
|
681 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
682 |
+
msgid ""
|
683 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
684 |
+
"%1$sthe installation instructions here%2$s"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
688 |
#: includes/options/class-wpglobus-options.php:707
|
689 |
msgid "Help Desk"
|
languages/wpglobus-fr_BE.po
CHANGED
@@ -751,23 +751,30 @@ msgstr "Êtes-vous certain(e) de vouloir la supprimer ?"
|
|
751 |
msgid "Back to the WPGlobus Settings"
|
752 |
msgstr "Retour aux réglages de WPGlobus"
|
753 |
|
754 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
755 |
msgid "Current Version"
|
756 |
msgstr "Version actuelle"
|
757 |
|
758 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
759 |
msgid "Get it now!"
|
760 |
msgstr "Obtenez-le maintenant !"
|
761 |
|
762 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
763 |
msgid "Premium add-on"
|
764 |
msgstr "Module premium"
|
765 |
|
766 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
767 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
768 |
msgid "Installed"
|
769 |
msgstr "Installée"
|
770 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
772 |
#: includes/options/class-wpglobus-options.php:707
|
773 |
msgid "Help Desk"
|
751 |
msgid "Back to the WPGlobus Settings"
|
752 |
msgstr "Retour aux réglages de WPGlobus"
|
753 |
|
754 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
755 |
msgid "Current Version"
|
756 |
msgstr "Version actuelle"
|
757 |
|
758 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
759 |
msgid "Get it now!"
|
760 |
msgstr "Obtenez-le maintenant !"
|
761 |
|
762 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
763 |
msgid "Premium add-on"
|
764 |
msgstr "Module premium"
|
765 |
|
766 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
767 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
768 |
msgid "Installed"
|
769 |
msgstr "Installée"
|
770 |
|
771 |
+
#. translators: placeholders are for the HTML tags.
|
772 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
773 |
+
msgid ""
|
774 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
775 |
+
"%1$sthe installation instructions here%2$s"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
779 |
#: includes/options/class-wpglobus-options.php:707
|
780 |
msgid "Help Desk"
|
languages/wpglobus-fr_CA.po
CHANGED
@@ -753,23 +753,30 @@ msgstr "Êtes-vous certain(e) de vouloir la supprimer ?"
|
|
753 |
msgid "Back to the WPGlobus Settings"
|
754 |
msgstr "Retour aux réglages de WPGlobus"
|
755 |
|
756 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
757 |
msgid "Current Version"
|
758 |
msgstr "Version actuelle"
|
759 |
|
760 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
761 |
msgid "Get it now!"
|
762 |
msgstr "Obtenez-le maintenant !"
|
763 |
|
764 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
765 |
msgid "Premium add-on"
|
766 |
msgstr "Module premium"
|
767 |
|
768 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
769 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
770 |
msgid "Installed"
|
771 |
msgstr "Installée"
|
772 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
773 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
774 |
#: includes/options/class-wpglobus-options.php:707
|
775 |
msgid "Help Desk"
|
753 |
msgid "Back to the WPGlobus Settings"
|
754 |
msgstr "Retour aux réglages de WPGlobus"
|
755 |
|
756 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
757 |
msgid "Current Version"
|
758 |
msgstr "Version actuelle"
|
759 |
|
760 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
761 |
msgid "Get it now!"
|
762 |
msgstr "Obtenez-le maintenant !"
|
763 |
|
764 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
765 |
msgid "Premium add-on"
|
766 |
msgstr "Module premium"
|
767 |
|
768 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
769 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
770 |
msgid "Installed"
|
771 |
msgstr "Installée"
|
772 |
|
773 |
+
#. translators: placeholders are for the HTML tags.
|
774 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
775 |
+
msgid ""
|
776 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
777 |
+
"%1$sthe installation instructions here%2$s"
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
781 |
#: includes/options/class-wpglobus-options.php:707
|
782 |
msgid "Help Desk"
|
languages/wpglobus-fr_FR.po
CHANGED
@@ -755,23 +755,30 @@ msgstr "Êtes-vous certain(e) de vouloir la supprimer ?"
|
|
755 |
msgid "Back to the WPGlobus Settings"
|
756 |
msgstr "Retour aux réglages de WPGlobus"
|
757 |
|
758 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
759 |
msgid "Current Version"
|
760 |
msgstr "Version actuelle"
|
761 |
|
762 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
763 |
msgid "Get it now!"
|
764 |
msgstr "Obtenez-le maintenant !"
|
765 |
|
766 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
767 |
msgid "Premium add-on"
|
768 |
msgstr "Module premium"
|
769 |
|
770 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
771 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
772 |
msgid "Installed"
|
773 |
msgstr "Installée"
|
774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
776 |
#: includes/options/class-wpglobus-options.php:707
|
777 |
msgid "Help Desk"
|
755 |
msgid "Back to the WPGlobus Settings"
|
756 |
msgstr "Retour aux réglages de WPGlobus"
|
757 |
|
758 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
759 |
msgid "Current Version"
|
760 |
msgstr "Version actuelle"
|
761 |
|
762 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
763 |
msgid "Get it now!"
|
764 |
msgstr "Obtenez-le maintenant !"
|
765 |
|
766 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
767 |
msgid "Premium add-on"
|
768 |
msgstr "Module premium"
|
769 |
|
770 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
771 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
772 |
msgid "Installed"
|
773 |
msgstr "Installée"
|
774 |
|
775 |
+
#. translators: placeholders are for the HTML tags.
|
776 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
777 |
+
msgid ""
|
778 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
779 |
+
"%1$sthe installation instructions here%2$s"
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
783 |
#: includes/options/class-wpglobus-options.php:707
|
784 |
msgid "Help Desk"
|
languages/wpglobus-id_ID.po
CHANGED
@@ -731,23 +731,30 @@ msgstr "Apakah Anda yakin ingin menghapus?"
|
|
731 |
msgid "Back to the WPGlobus Settings"
|
732 |
msgstr "Kembali ke Pengaturan WPGlobus"
|
733 |
|
734 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
735 |
msgid "Current Version"
|
736 |
msgstr "Versi sekarang"
|
737 |
|
738 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
739 |
msgid "Get it now!"
|
740 |
msgstr "Dapatkan itu sekarang!"
|
741 |
|
742 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
743 |
msgid "Premium add-on"
|
744 |
msgstr "Premium add-on"
|
745 |
|
746 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
747 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
748 |
msgid "Installed"
|
749 |
msgstr "Dipasang"
|
750 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
752 |
#: includes/options/class-wpglobus-options.php:707
|
753 |
msgid "Help Desk"
|
731 |
msgid "Back to the WPGlobus Settings"
|
732 |
msgstr "Kembali ke Pengaturan WPGlobus"
|
733 |
|
734 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
735 |
msgid "Current Version"
|
736 |
msgstr "Versi sekarang"
|
737 |
|
738 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
739 |
msgid "Get it now!"
|
740 |
msgstr "Dapatkan itu sekarang!"
|
741 |
|
742 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
743 |
msgid "Premium add-on"
|
744 |
msgstr "Premium add-on"
|
745 |
|
746 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
747 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
748 |
msgid "Installed"
|
749 |
msgstr "Dipasang"
|
750 |
|
751 |
+
#. translators: placeholders are for the HTML tags.
|
752 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
753 |
+
msgid ""
|
754 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
755 |
+
"%1$sthe installation instructions here%2$s"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
759 |
#: includes/options/class-wpglobus-options.php:707
|
760 |
msgid "Help Desk"
|
languages/wpglobus-ko_KR.po
CHANGED
@@ -659,23 +659,30 @@ msgstr ""
|
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr ""
|
678 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
680 |
#: includes/options/class-wpglobus-options.php:707
|
681 |
msgid "Help Desk"
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#. translators: placeholders are for the HTML tags.
|
680 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
681 |
+
msgid ""
|
682 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
683 |
+
"%1$sthe installation instructions here%2$s"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
687 |
#: includes/options/class-wpglobus-options.php:707
|
688 |
msgid "Help Desk"
|
languages/wpglobus-pl_PL.po
CHANGED
@@ -686,23 +686,30 @@ msgstr "Na pewno chcesz to usunąć?"
|
|
686 |
msgid "Back to the WPGlobus Settings"
|
687 |
msgstr "Wróć do ustawień WPGlobus'a"
|
688 |
|
689 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
690 |
msgid "Current Version"
|
691 |
msgstr "Obecna wersja"
|
692 |
|
693 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
694 |
msgid "Get it now!"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
698 |
msgid "Premium add-on"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
702 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
703 |
msgid "Installed"
|
704 |
msgstr "Zainstalowano"
|
705 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
707 |
#: includes/options/class-wpglobus-options.php:707
|
708 |
msgid "Help Desk"
|
686 |
msgid "Back to the WPGlobus Settings"
|
687 |
msgstr "Wróć do ustawień WPGlobus'a"
|
688 |
|
689 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
690 |
msgid "Current Version"
|
691 |
msgstr "Obecna wersja"
|
692 |
|
693 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
694 |
msgid "Get it now!"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
698 |
msgid "Premium add-on"
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
702 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
703 |
msgid "Installed"
|
704 |
msgstr "Zainstalowano"
|
705 |
|
706 |
+
#. translators: placeholders are for the HTML tags.
|
707 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
708 |
+
msgid ""
|
709 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
710 |
+
"%1$sthe installation instructions here%2$s"
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
714 |
#: includes/options/class-wpglobus-options.php:707
|
715 |
msgid "Help Desk"
|
languages/wpglobus-pt_BR.po
CHANGED
@@ -659,23 +659,30 @@ msgstr ""
|
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr "Instalado"
|
678 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
680 |
#: includes/options/class-wpglobus-options.php:707
|
681 |
msgid "Help Desk"
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr "Instalado"
|
678 |
|
679 |
+
#. translators: placeholders are for the HTML tags.
|
680 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
681 |
+
msgid ""
|
682 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
683 |
+
"%1$sthe installation instructions here%2$s"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
687 |
#: includes/options/class-wpglobus-options.php:707
|
688 |
msgid "Help Desk"
|
languages/wpglobus-pt_PT.po
CHANGED
@@ -659,23 +659,30 @@ msgstr ""
|
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr "Instalado"
|
678 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
680 |
#: includes/options/class-wpglobus-options.php:707
|
681 |
msgid "Help Desk"
|
659 |
msgid "Back to the WPGlobus Settings"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
663 |
msgid "Current Version"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
667 |
msgid "Get it now!"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
671 |
msgid "Premium add-on"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
675 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
676 |
msgid "Installed"
|
677 |
msgstr "Instalado"
|
678 |
|
679 |
+
#. translators: placeholders are for the HTML tags.
|
680 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
681 |
+
msgid ""
|
682 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
683 |
+
"%1$sthe installation instructions here%2$s"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
687 |
#: includes/options/class-wpglobus-options.php:707
|
688 |
msgid "Help Desk"
|
languages/wpglobus-ro_RO.po
CHANGED
@@ -689,23 +689,30 @@ msgstr "Ești sigur că vrei să ștergi?"
|
|
689 |
msgid "Back to the WPGlobus Settings"
|
690 |
msgstr "Înapoi la setările WPGlobus"
|
691 |
|
692 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
693 |
msgid "Current Version"
|
694 |
msgstr "Versiune curentă"
|
695 |
|
696 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
697 |
msgid "Get it now!"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
701 |
msgid "Premium add-on"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
705 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
706 |
msgid "Installed"
|
707 |
msgstr "Instalat"
|
708 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
710 |
#: includes/options/class-wpglobus-options.php:707
|
711 |
msgid "Help Desk"
|
689 |
msgid "Back to the WPGlobus Settings"
|
690 |
msgstr "Înapoi la setările WPGlobus"
|
691 |
|
692 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
693 |
msgid "Current Version"
|
694 |
msgstr "Versiune curentă"
|
695 |
|
696 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
697 |
msgid "Get it now!"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
701 |
msgid "Premium add-on"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
705 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
706 |
msgid "Installed"
|
707 |
msgstr "Instalat"
|
708 |
|
709 |
+
#. translators: placeholders are for the HTML tags.
|
710 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
711 |
+
msgid ""
|
712 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
713 |
+
"%1$sthe installation instructions here%2$s"
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
717 |
#: includes/options/class-wpglobus-options.php:707
|
718 |
msgid "Help Desk"
|
languages/wpglobus-ru_RU.mo
CHANGED
Binary file
|
languages/wpglobus-ru_RU.po
CHANGED
@@ -732,23 +732,32 @@ msgstr "Удалить? Вы уверены?"
|
|
732 |
msgid "Back to the WPGlobus Settings"
|
733 |
msgstr "Вернуться к настройкам WPGlobus"
|
734 |
|
735 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
736 |
msgid "Current Version"
|
737 |
msgstr "Текущая версия"
|
738 |
|
739 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
740 |
msgid "Get it now!"
|
741 |
msgstr "Установить!"
|
742 |
|
743 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
744 |
msgid "Premium add-on"
|
745 |
msgstr "Платное расширение"
|
746 |
|
747 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
748 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
749 |
msgid "Installed"
|
750 |
msgstr "Установлен"
|
751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
752 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
753 |
#: includes/options/class-wpglobus-options.php:707
|
754 |
msgid "Help Desk"
|
732 |
msgid "Back to the WPGlobus Settings"
|
733 |
msgstr "Вернуться к настройкам WPGlobus"
|
734 |
|
735 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
736 |
msgid "Current Version"
|
737 |
msgstr "Текущая версия"
|
738 |
|
739 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
740 |
msgid "Get it now!"
|
741 |
msgstr "Установить!"
|
742 |
|
743 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
744 |
msgid "Premium add-on"
|
745 |
msgstr "Платное расширение"
|
746 |
|
747 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
748 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
749 |
msgid "Installed"
|
750 |
msgstr "Установлен"
|
751 |
|
752 |
+
#. translators: placeholders are for the HTML tags.
|
753 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
754 |
+
msgid ""
|
755 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
756 |
+
"%1$sthe installation instructions here%2$s"
|
757 |
+
msgstr ""
|
758 |
+
"Если вы уже купили какое-либо расширение, то прочтите %1$sУстановка платных "
|
759 |
+
"расширений WPGlobus%2$s"
|
760 |
+
|
761 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
762 |
#: includes/options/class-wpglobus-options.php:707
|
763 |
msgid "Help Desk"
|
languages/wpglobus-sv_SE.po
CHANGED
@@ -683,23 +683,30 @@ msgstr "Är du säker på att du vill radera?"
|
|
683 |
msgid "Back to the WPGlobus Settings"
|
684 |
msgstr "Tillbaka till WPGlobus Inställningar"
|
685 |
|
686 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
687 |
msgid "Current Version"
|
688 |
msgstr "Nuvarande version"
|
689 |
|
690 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
691 |
msgid "Get it now!"
|
692 |
msgstr "Skaffa det nu!"
|
693 |
|
694 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
695 |
msgid "Premium add-on"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
699 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
700 |
msgid "Installed"
|
701 |
msgstr "Installerad"
|
702 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
704 |
#: includes/options/class-wpglobus-options.php:707
|
705 |
msgid "Help Desk"
|
683 |
msgid "Back to the WPGlobus Settings"
|
684 |
msgstr "Tillbaka till WPGlobus Inställningar"
|
685 |
|
686 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
687 |
msgid "Current Version"
|
688 |
msgstr "Nuvarande version"
|
689 |
|
690 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
691 |
msgid "Get it now!"
|
692 |
msgstr "Skaffa det nu!"
|
693 |
|
694 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
695 |
msgid "Premium add-on"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
699 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
700 |
msgid "Installed"
|
701 |
msgstr "Installerad"
|
702 |
|
703 |
+
#. translators: placeholders are for the HTML tags.
|
704 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
705 |
+
msgid ""
|
706 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
707 |
+
"%1$sthe installation instructions here%2$s"
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
711 |
#: includes/options/class-wpglobus-options.php:707
|
712 |
msgid "Help Desk"
|
languages/wpglobus-tr_TR.po
CHANGED
@@ -685,23 +685,30 @@ msgstr "Silmek istediğinize emin misiniz?"
|
|
685 |
msgid "Back to the WPGlobus Settings"
|
686 |
msgstr "WPGlobus Ayarları' na Geri Dön"
|
687 |
|
688 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
689 |
msgid "Current Version"
|
690 |
msgstr "Geçerli Sürüm"
|
691 |
|
692 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
693 |
msgid "Get it now!"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
697 |
msgid "Premium add-on"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
701 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
702 |
msgid "Installed"
|
703 |
msgstr "Yüklü"
|
704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
706 |
#: includes/options/class-wpglobus-options.php:707
|
707 |
msgid "Help Desk"
|
685 |
msgid "Back to the WPGlobus Settings"
|
686 |
msgstr "WPGlobus Ayarları' na Geri Dön"
|
687 |
|
688 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
689 |
msgid "Current Version"
|
690 |
msgstr "Geçerli Sürüm"
|
691 |
|
692 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
693 |
msgid "Get it now!"
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
697 |
msgid "Premium add-on"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
701 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
702 |
msgid "Installed"
|
703 |
msgstr "Yüklü"
|
704 |
|
705 |
+
#. translators: placeholders are for the HTML tags.
|
706 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
707 |
+
msgid ""
|
708 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
709 |
+
"%1$sthe installation instructions here%2$s"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
713 |
#: includes/options/class-wpglobus-options.php:707
|
714 |
msgid "Help Desk"
|
languages/wpglobus-uk.po
CHANGED
@@ -731,23 +731,30 @@ msgstr "Видалити? Ви впевнені?"
|
|
731 |
msgid "Back to the WPGlobus Settings"
|
732 |
msgstr "Повернутися до налаштувань WPGlobus"
|
733 |
|
734 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
735 |
msgid "Current Version"
|
736 |
msgstr "Поточна версія"
|
737 |
|
738 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
739 |
msgid "Get it now!"
|
740 |
msgstr "Завантажити зараз!"
|
741 |
|
742 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
743 |
msgid "Premium add-on"
|
744 |
msgstr "Платне розширення"
|
745 |
|
746 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
747 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
748 |
msgid "Installed"
|
749 |
msgstr "Встановлено"
|
750 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
752 |
#: includes/options/class-wpglobus-options.php:707
|
753 |
msgid "Help Desk"
|
731 |
msgid "Back to the WPGlobus Settings"
|
732 |
msgstr "Повернутися до налаштувань WPGlobus"
|
733 |
|
734 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
735 |
msgid "Current Version"
|
736 |
msgstr "Поточна версія"
|
737 |
|
738 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
739 |
msgid "Get it now!"
|
740 |
msgstr "Завантажити зараз!"
|
741 |
|
742 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
743 |
msgid "Premium add-on"
|
744 |
msgstr "Платне розширення"
|
745 |
|
746 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311,
|
747 |
#: includes/options/fields/table/class-wpglobus-languages-table.php:472
|
748 |
msgid "Installed"
|
749 |
msgstr "Встановлено"
|
750 |
|
751 |
+
#. translators: placeholders are for the HTML tags.
|
752 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
753 |
+
msgid ""
|
754 |
+
"If you have already purchased a WPGlobus premium extension, please read "
|
755 |
+
"%1$sthe installation instructions here%2$s"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103,
|
759 |
#: includes/options/class-wpglobus-options.php:707
|
760 |
msgid "Help Desk"
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2020 WPGlobus 2.4.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.4.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.4.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -523,22 +523,27 @@ msgstr ""
|
|
523 |
msgid "Back to the WPGlobus Settings"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
527 |
msgid "Current Version"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
531 |
msgid "Get it now!"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
535 |
msgid "Premium add-on"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/admin/class-wpglobus-plugin-install.php:
|
539 |
msgid "Installed"
|
540 |
msgstr ""
|
541 |
|
|
|
|
|
|
|
|
|
|
|
542 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103, includes/options/class-wpglobus-options.php:707
|
543 |
msgid "Help Desk"
|
544 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 WPGlobus 2.4.3
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.4.3 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.4.3\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
523 |
msgid "Back to the WPGlobus Settings"
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: includes/admin/class-wpglobus-plugin-install.php:308
|
527 |
msgid "Current Version"
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: includes/admin/class-wpglobus-plugin-install.php:309
|
531 |
msgid "Get it now!"
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/admin/class-wpglobus-plugin-install.php:310
|
535 |
msgid "Premium add-on"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: includes/admin/class-wpglobus-plugin-install.php:311, includes/options/fields/table/class-wpglobus-languages-table.php:472
|
539 |
msgid "Installed"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#. translators: placeholders are for the HTML tags.
|
543 |
+
#: includes/admin/class-wpglobus-plugin-install.php:319
|
544 |
+
msgid "If you have already purchased a WPGlobus premium extension, please read %1$sthe installation instructions here%2$s"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
#: includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php:103, includes/options/class-wpglobus-options.php:707
|
548 |
msgid "Help Desk"
|
549 |
msgstr ""
|
readme.txt
CHANGED
@@ -218,6 +218,16 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
218 |
|
219 |
== Changelog ==
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
= 2.4.1 =
|
222 |
|
223 |
* (Vendor/Yoast) Set support for minimum version Yoast SEO Premium v12.
|
@@ -238,37 +248,6 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
238 |
* (Core/Post Types) Added post type of `rtMedia` plugin to the hidden types array.
|
239 |
* (Core/Post Types) Added post types of `Divi` theme to the hidden types array.
|
240 |
|
241 |
-
= 2.3.11 =
|
242 |
-
|
243 |
-
* (Builders/Yoast SEO) Added `WPGLOBUS_YOAST_PLUGIN_FILE` constant to set the custom file path.
|
244 |
-
|
245 |
-
= 2.3.10 =
|
246 |
-
|
247 |
-
* (Core/Options) Fixed PHP Notice "Undefined index" in the `"Custom Code"` section.
|
248 |
-
|
249 |
-
= 2.3.9 =
|
250 |
-
|
251 |
-
* (Vendor/All In One SEO Pack) Support All In One SEO Pack 3.4.2.
|
252 |
-
|
253 |
-
= 2.3.8 =
|
254 |
-
|
255 |
-
* (Vendor/Acf) Added filter for the `Number` field type. (Note: Multilingual numbers will be accessible in the "Builder" mode.)
|
256 |
-
|
257 |
-
= 2.3.7 =
|
258 |
-
|
259 |
-
* (Core/Builders) Fixed PHP Warning "The first argument should be either a string or an integer" in the `array_key_exists` function.
|
260 |
-
* (Vendor/Acf) Code clean-up.
|
261 |
-
|
262 |
-
= 2.3.6 =
|
263 |
-
|
264 |
-
* (Builders/Elementor) Prevent `The preview could not be loaded` for language in draft status.
|
265 |
-
* (Core/Admin) Exclude some meta from being multilingual.
|
266 |
-
* (Core/Post Types) Added post types of `WPForms Lite` plugin and `Bodega` theme to hidden types array.
|
267 |
-
|
268 |
-
= 2.3.5 =
|
269 |
-
|
270 |
-
* (Core/Builders) Fixed the `Undefined offset` PHP Notice in the `is_gutenberg()` method.
|
271 |
-
|
272 |
= Earlier versions and Add-ons =
|
273 |
|
274 |
* [See the complete changelog here](https://github.com/WPGlobus/WPGlobus/blob/master/CHANGELOG.md)
|
218 |
|
219 |
== Changelog ==
|
220 |
|
221 |
+
= 2.4.3 =
|
222 |
+
|
223 |
+
* (Builders/RankMathSEO) Added `WordPress SEO Plugin – Rank Math` support (Beta stage).
|
224 |
+
* (Core/Plugin Install) Added info box before add-ons list.
|
225 |
+
|
226 |
+
= 2.4.2 =
|
227 |
+
|
228 |
+
* (Vendor/Yoast) Support multilingual breadcrumbs for posts, pages, and taxonomies.
|
229 |
+
* (Core/Plugin Install) Added status `"available"` for the premium add-ons.
|
230 |
+
|
231 |
= 2.4.1 =
|
232 |
|
233 |
* (Vendor/Yoast) Set support for minimum version Yoast SEO Premium v12.
|
248 |
* (Core/Post Types) Added post type of `rtMedia` plugin to the hidden types array.
|
249 |
* (Core/Post Types) Added post types of `Divi` theme to the hidden types array.
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
= Earlier versions and Add-ons =
|
252 |
|
253 |
* [See the complete changelog here](https://github.com/WPGlobus/WPGlobus/blob/master/CHANGELOG.md)
|
trunk/configs/acf.json
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"*":{"file":"vendor/acf/class-wpglobus-acf.php","class":"WPGlobus_Acf_2"}
|
4 |
-
},
|
5 |
-
"post_ml_fields": {
|
6 |
-
"*":{"file":"vendor/acf/class-wpglobus-acf.php","class":"WPGlobus_Acf_2"}
|
7 |
-
},
|
8 |
-
"wp_options": {
|
9 |
-
"blogname": {},
|
10 |
-
"blogdescription": null
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/configs/all-in-one-seo-pack.json
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_aioseop_title": {},
|
4 |
-
"_aioseop_description": {},
|
5 |
-
"_aioseop_keywords": {}
|
6 |
-
},
|
7 |
-
"post_ml_fields": {
|
8 |
-
"aiosp_title": {},
|
9 |
-
"aiosp_description": {},
|
10 |
-
"aiosp_keywords": {}
|
11 |
-
},
|
12 |
-
"wp_options": {
|
13 |
-
"blogname": {},
|
14 |
-
"blogdescription": null
|
15 |
-
}
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/configs/elementor.json
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_elementor_data": {}
|
4 |
-
}
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
trunk/configs/pods.json
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"*":{"file":"vendor/pods/class-wpglobus-vendor-pods.php","class":"WPGlobus_Vendor_Pods"}
|
4 |
-
},
|
5 |
-
"post_ml_fields": {
|
6 |
-
"*":{"file":"vendor/pods/class-wpglobus-vendor-pods.php","class":"WPGlobus_Vendor_Pods"}
|
7 |
-
},
|
8 |
-
"wp_options": {
|
9 |
-
"blogname": {},
|
10 |
-
"blogdescription": null
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/configs/woocommerce.json
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_purchase_note": {}
|
4 |
-
},
|
5 |
-
"post_ml_fields": {
|
6 |
-
"_purchase_note": {}
|
7 |
-
}
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/configs/wpglobus-seo.json
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_wpglobus_seo_test": {}
|
4 |
-
}
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
trunk/configs/wpglobus.json
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_wpglobus_seo_test": {}
|
4 |
-
}
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
trunk/configs/yoast-seo.json
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"post_meta_fields": {
|
3 |
-
"_yoast_wpseo_title": {},
|
4 |
-
"_yoast_wpseo_metadesc": {},
|
5 |
-
"_yoast_wpseo_focuskw": {},
|
6 |
-
"_yoast_wpseo_focuskw_text_input": null,
|
7 |
-
"_yoast_wpseo_keywordsynonyms": {},
|
8 |
-
"_yoast_wpseo_focuskeywords": {}
|
9 |
-
},
|
10 |
-
"wp_options": {
|
11 |
-
"blogname": {},
|
12 |
-
"blogdescription": null
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/data/paid_plugins.json
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"woocommerce-wpglobus": {
|
3 |
-
"slug": "woocommerce-wpglobus",
|
4 |
-
"loader": "woocommerce-wpglobus.php",
|
5 |
-
"image_file": "woocommerce-wpglobus-logo-300x300.png",
|
6 |
-
"order": 100
|
7 |
-
},
|
8 |
-
"wpglobus-plus": {
|
9 |
-
"slug": "wpglobus-plus",
|
10 |
-
"loader": "wpglobus-plus.php",
|
11 |
-
"image_file": "wpglobus-plus-logo-300x300.png",
|
12 |
-
"order": 90
|
13 |
-
},
|
14 |
-
"wpglobus-revslider": {
|
15 |
-
"slug": "wpglobus-revslider",
|
16 |
-
"loader": "wpglobus-revslider.php",
|
17 |
-
"product_slug": "wpglobus-for-slider-revolution",
|
18 |
-
"image_file": "wpglobus-revslider-logo-400x400.png",
|
19 |
-
"order": 60,
|
20 |
-
"available": false
|
21 |
-
},
|
22 |
-
"wpglobus-language-widgets": {
|
23 |
-
"slug": "wpglobus-language-widgets",
|
24 |
-
"loader": "wpglobus-language-widgets.php",
|
25 |
-
"image_file": "wpglobus-lw-logo-400x400.png",
|
26 |
-
"order": 50
|
27 |
-
},
|
28 |
-
"wpglobus-menu-visibility": {
|
29 |
-
"slug": "wpglobus-menu-visibility",
|
30 |
-
"loader": "wpglobus-menu-visibility.php",
|
31 |
-
"image_file": "wpglobus-menu-visibility-logo.png",
|
32 |
-
"order": 40
|
33 |
-
},
|
34 |
-
"wpglobus-header-images": {
|
35 |
-
"slug": "wpglobus-header-images",
|
36 |
-
"loader": "wpglobus-header-images.php",
|
37 |
-
"image_file": "wpglobus-hi-logo-400x400.png",
|
38 |
-
"order": 30
|
39 |
-
},
|
40 |
-
"wpglobus-mobile-menu": {
|
41 |
-
"slug": "wpglobus-mobile-menu",
|
42 |
-
"loader": "wpglobus-mobile-menu.php",
|
43 |
-
"image_file": "wpglobus-mobile-menu-logo-400x400.png",
|
44 |
-
"order": 20
|
45 |
-
},
|
46 |
-
"wpglobus-multilingual-notices": {
|
47 |
-
"slug": "wpglobus-multilingual-notices",
|
48 |
-
"loader": "wpglobus-multilingual-notices.php",
|
49 |
-
"image_file": "wpglobus-multilingual-notices-logo.png",
|
50 |
-
"order": 10
|
51 |
-
},
|
52 |
-
"wpglobus-for-bridge-theme": {
|
53 |
-
"slug": "wpglobus-for-bridge-theme",
|
54 |
-
"loader": "wpglobus-for-bridge-theme.php",
|
55 |
-
"product_slug": "wpglobus-for-bridge-theme",
|
56 |
-
"image_file": "wpglobus-for-bridge-theme-logo-400x400.png",
|
57 |
-
"order": 10
|
58 |
-
},
|
59 |
-
"woocommerce-nets-netaxept": {
|
60 |
-
"slug": "woocommerce-nets-netaxept",
|
61 |
-
"loader": "woocommerce-nets-netaxept.php",
|
62 |
-
"product_slug": "multilingual-woocommerce-nets-netaxept",
|
63 |
-
"image_file": "woocommerce-wpglobus-netaxeptcw-logo-300x300.jpg",
|
64 |
-
"order": 1
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/data/wpglobus-product-info.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}WPGlobus Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.4.0"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.0.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.2"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.3"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"3.5.11","_api_tested_up_to":"5.4.0"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.3.10","_api_tested_up_to":"5.4.0"}}
|
|
trunk/flags/ad.alt.png
DELETED
Binary file
|
trunk/flags/ad.png
DELETED
Binary file
|
trunk/flags/ae.png
DELETED
Binary file
|
trunk/flags/af.png
DELETED
Binary file
|
trunk/flags/ag.png
DELETED
Binary file
|
trunk/flags/ai.alt.png
DELETED
Binary file
|
trunk/flags/ai.png
DELETED
Binary file
|
trunk/flags/al.png
DELETED
Binary file
|
trunk/flags/am.png
DELETED
Binary file
|
trunk/flags/an.png
DELETED
Binary file
|
trunk/flags/ao.png
DELETED
Binary file
|
trunk/flags/aq.png
DELETED
Binary file
|
trunk/flags/ar.alt.png
DELETED
Binary file
|
trunk/flags/ar.png
DELETED
Binary file
|
trunk/flags/argm.jpg
DELETED
Binary file
|
trunk/flags/arle.png
DELETED
Binary file
|
trunk/flags/as.png
DELETED
Binary file
|
trunk/flags/asl.gif
DELETED
Binary file
|
trunk/flags/at.alt.png
DELETED
Binary file
|
trunk/flags/at.png
DELETED
Binary file
|
trunk/flags/au.png
DELETED
Binary file
|
trunk/flags/aw.png
DELETED
Binary file
|
trunk/flags/ax.png
DELETED
Binary file
|
trunk/flags/az.png
DELETED
Binary file
|
trunk/flags/ba.png
DELETED
Binary file
|
trunk/flags/bb.png
DELETED
Binary file
|
trunk/flags/bd.png
DELETED
Binary file
|
trunk/flags/be.png
DELETED
Binary file
|
trunk/flags/bf.png
DELETED
Binary file
|
trunk/flags/bg.png
DELETED
Binary file
|
trunk/flags/bh.png
DELETED
Binary file
|
trunk/flags/bi.alt.png
DELETED
Binary file
|
trunk/flags/bi.png
DELETED
Binary file
|
trunk/flags/big/au.png
DELETED
Binary file
|
trunk/flags/big/br.png
DELETED
Binary file
|
trunk/flags/big/ca.png
DELETED
Binary file
|
trunk/flags/big/cn.png
DELETED
Binary file
|
trunk/flags/big/cy.png
DELETED
Binary file
|
trunk/flags/big/de.png
DELETED
Binary file
|
trunk/flags/big/dk.png
DELETED
Binary file
|
trunk/flags/big/es.alt.png
DELETED
Binary file
|
trunk/flags/big/es.png
DELETED
Binary file
|
trunk/flags/big/fi.png
DELETED
Binary file
|
trunk/flags/big/ir.png
DELETED
Binary file
|
trunk/flags/big/it.png
DELETED
Binary file
|
trunk/flags/big/ru.png
DELETED
Binary file
|
trunk/flags/big/uk.png
DELETED
Binary file
|
trunk/flags/big/us.png
DELETED
Binary file
|
trunk/flags/bj.png
DELETED
Binary file
|
trunk/flags/bm.png
DELETED
Binary file
|
trunk/flags/bn.png
DELETED
Binary file
|
trunk/flags/bo.png
DELETED
Binary file
|
trunk/flags/br.png
DELETED
Binary file
|
trunk/flags/bs.png
DELETED
Binary file
|
trunk/flags/bt.png
DELETED
Binary file
|
trunk/flags/bv.png
DELETED
Binary file
|
trunk/flags/bw.png
DELETED
Binary file
|
trunk/flags/by.png
DELETED
Binary file
|
trunk/flags/bz.png
DELETED
Binary file
|
trunk/flags/ca.alt.png
DELETED
Binary file
|
trunk/flags/ca.png
DELETED
Binary file
|
trunk/flags/cc.alt.png
DELETED
Binary file
|
trunk/flags/cc.png
DELETED
Binary file
|
trunk/flags/cd.png
DELETED
Binary file
|
trunk/flags/cf.png
DELETED
Binary file
|
trunk/flags/cg.png
DELETED
Binary file
|
trunk/flags/ch.png
DELETED
Binary file
|
trunk/flags/ci.png
DELETED
Binary file
|
trunk/flags/ck.png
DELETED
Binary file
|
trunk/flags/cl.png
DELETED
Binary file
|
trunk/flags/cm.png
DELETED
Binary file
|
trunk/flags/cn.png
DELETED
Binary file
|
trunk/flags/co.png
DELETED
Binary file
|
trunk/flags/cr.alt.png
DELETED
Binary file
|
trunk/flags/cr.png
DELETED
Binary file
|
trunk/flags/cs.png
DELETED
Binary file
|
trunk/flags/cu.png
DELETED
Binary file
|
trunk/flags/cv.png
DELETED
Binary file
|
trunk/flags/cx.png
DELETED
Binary file
|
trunk/flags/cy.png
DELETED
Binary file
|
trunk/flags/cz.png
DELETED
Binary file
|
trunk/flags/de.png
DELETED
Binary file
|
trunk/flags/dj.png
DELETED
Binary file
|
trunk/flags/dk.png
DELETED
Binary file
|
trunk/flags/dm.png
DELETED
Binary file
|
trunk/flags/do.png
DELETED
Binary file
|
trunk/flags/dz.png
DELETED
Binary file
|
trunk/flags/easy_to_read.png
DELETED
Binary file
|
trunk/flags/ec.alt.png
DELETED
Binary file
|
trunk/flags/ec.png
DELETED
Binary file
|
trunk/flags/ee.png
DELETED
Binary file
|
trunk/flags/eg.png
DELETED
Binary file
|
trunk/flags/eh.alt.png
DELETED
Binary file
|
trunk/flags/eh.png
DELETED
Binary file
|
trunk/flags/en.png
DELETED
Binary file
|
trunk/flags/eo.png
DELETED
Binary file
|
trunk/flags/er.png
DELETED
Binary file
|
trunk/flags/es.alt.png
DELETED
Binary file
|
trunk/flags/es.png
DELETED
Binary file
|
trunk/flags/et.alt.png
DELETED
Binary file
|
trunk/flags/et.png
DELETED
Binary file
|
trunk/flags/eu.png
DELETED
Binary file
|
trunk/flags/eus.png
DELETED
Binary file
|
trunk/flags/fi.png
DELETED
Binary file
|
trunk/flags/fj.png
DELETED
Binary file
|
trunk/flags/fk.png
DELETED
Binary file
|
trunk/flags/fm.png
DELETED
Binary file
|
trunk/flags/fo.png
DELETED
Binary file
|
trunk/flags/fr.png
DELETED
Binary file
|
trunk/flags/fr_CA.png
DELETED
Binary file
|
trunk/flags/ga.png
DELETED
Binary file
|
trunk/flags/galego.png
DELETED
Binary file
|
trunk/flags/gb.png
DELETED
Binary file
|
trunk/flags/gd.png
DELETED
Binary file
|
trunk/flags/ge.png
DELETED
Binary file
|
trunk/flags/gf.png
DELETED
Binary file
|
trunk/flags/gg.png
DELETED
Binary file
|
trunk/flags/gh.png
DELETED
Binary file
|
trunk/flags/gi.png
DELETED
Binary file
|
trunk/flags/gl.png
DELETED
Binary file
|
trunk/flags/gm.png
DELETED
Binary file
|
trunk/flags/gn.png
DELETED
Binary file
|
trunk/flags/gp.png
DELETED
Binary file
|
trunk/flags/gq.png
DELETED
Binary file
|
trunk/flags/gr.png
DELETED
Binary file
|
trunk/flags/gs.png
DELETED
Binary file
|
trunk/flags/gt.alt.png
DELETED
Binary file
|
trunk/flags/gt.png
DELETED
Binary file
|
trunk/flags/gu.png
DELETED
Binary file
|
trunk/flags/gw.png
DELETED
Binary file
|
trunk/flags/gy.png
DELETED
Binary file
|
trunk/flags/hk.png
DELETED
Binary file
|
trunk/flags/hm.png
DELETED
Binary file
|
trunk/flags/hn.png
DELETED
Binary file
|
trunk/flags/hr.png
DELETED
Binary file
|
trunk/flags/ht.alt.png
DELETED
Binary file
|
trunk/flags/ht.png
DELETED
Binary file
|
trunk/flags/hu.png
DELETED
Binary file
|
trunk/flags/id.png
DELETED
Binary file
|
trunk/flags/ie.png
DELETED
Binary file
|
trunk/flags/il.png
DELETED
Binary file
|
trunk/flags/im.png
DELETED
Binary file
|
trunk/flags/in.png
DELETED
Binary file
|
trunk/flags/io.png
DELETED
Binary file
|
trunk/flags/iq.png
DELETED
Binary file
|
trunk/flags/ir.png
DELETED
Binary file
|
trunk/flags/is.png
DELETED
Binary file
|
trunk/flags/it.png
DELETED
Binary file
|
trunk/flags/je.png
DELETED
Binary file
|
trunk/flags/jm.png
DELETED
Binary file
|
trunk/flags/jo.png
DELETED
Binary file
|
trunk/flags/jp.png
DELETED
Binary file
|
trunk/flags/ke.png
DELETED
Binary file
|
trunk/flags/kg.png
DELETED
Binary file
|
trunk/flags/kh.png
DELETED
Binary file
|
trunk/flags/ki.png
DELETED
Binary file
|
trunk/flags/km.png
DELETED
Binary file
|
trunk/flags/kn.png
DELETED
Binary file
|
trunk/flags/kp.png
DELETED
Binary file
|
trunk/flags/kr.png
DELETED
Binary file
|
trunk/flags/ku.png
DELETED
Binary file
|
trunk/flags/kw.png
DELETED
Binary file
|
trunk/flags/ky.png
DELETED
Binary file
|
trunk/flags/kz.png
DELETED
Binary file
|
trunk/flags/la.png
DELETED
Binary file
|
trunk/flags/lb.png
DELETED
Binary file
|
trunk/flags/lc.png
DELETED
Binary file
|
trunk/flags/li.png
DELETED
Binary file
|
trunk/flags/lk.png
DELETED
Binary file
|
trunk/flags/lr.png
DELETED
Binary file
|
trunk/flags/ls.png
DELETED
Binary file
|
trunk/flags/lt.png
DELETED
Binary file
|
trunk/flags/lu.png
DELETED
Binary file
|
trunk/flags/lv.png
DELETED
Binary file
|
trunk/flags/ly.png
DELETED
Binary file
|
trunk/flags/ma.png
DELETED
Binary file
|
trunk/flags/mc.png
DELETED
Binary file
|
trunk/flags/md.png
DELETED
Binary file
|
trunk/flags/me.png
DELETED
Binary file
|
trunk/flags/mg.png
DELETED
Binary file
|
trunk/flags/mh.png
DELETED
Binary file
|
trunk/flags/mk.png
DELETED
Binary file
|
trunk/flags/ml.png
DELETED
Binary file
|
trunk/flags/mm.png
DELETED
Binary file
|
trunk/flags/mn.png
DELETED
Binary file
|
trunk/flags/mo.png
DELETED
Binary file
|
trunk/flags/montenegro.gif
DELETED
Binary file
|
trunk/flags/mp.png
DELETED
Binary file
|
trunk/flags/mq.png
DELETED
Binary file
|
trunk/flags/mr.png
DELETED
Binary file
|
trunk/flags/ms.png
DELETED
Binary file
|
trunk/flags/mt.png
DELETED
Binary file
|
trunk/flags/mu.png
DELETED
Binary file
|
trunk/flags/mv.png
DELETED
Binary file
|
trunk/flags/mw.png
DELETED
Binary file
|
trunk/flags/mx.png
DELETED
Binary file
|
trunk/flags/my.png
DELETED
Binary file
|
trunk/flags/my_MM.png
DELETED
Binary file
|
trunk/flags/mz.png
DELETED
Binary file
|
trunk/flags/na.png
DELETED
Binary file
|
trunk/flags/nc.png
DELETED
Binary file
|
trunk/flags/ne.png
DELETED
Binary file
|
trunk/flags/nf.png
DELETED
Binary file
|
trunk/flags/ng.png
DELETED
Binary file
|
trunk/flags/ni.alt.png
DELETED
Binary file
|
trunk/flags/ni.png
DELETED
Binary file
|
trunk/flags/nl.png
DELETED
Binary file
|
trunk/flags/no.png
DELETED
Binary file
|
trunk/flags/np.png
DELETED
Binary file
|
trunk/flags/nr.png
DELETED
Binary file
|
trunk/flags/nu.png
DELETED
Binary file
|
trunk/flags/nz.png
DELETED
Binary file
|
trunk/flags/om.png
DELETED
Binary file
|
trunk/flags/pa.png
DELETED
Binary file
|
trunk/flags/pe.png
DELETED
Binary file
|
trunk/flags/pf.alt.png
DELETED
Binary file
|
trunk/flags/pf.png
DELETED
Binary file
|
trunk/flags/pg.png
DELETED
Binary file
|
trunk/flags/ph.png
DELETED
Binary file
|
trunk/flags/pk.png
DELETED
Binary file
|
trunk/flags/pl.png
DELETED
Binary file
|
trunk/flags/pm.png
DELETED
Binary file
|
trunk/flags/pn.png
DELETED
Binary file
|
trunk/flags/pr.png
DELETED
Binary file
|
trunk/flags/ps.png
DELETED
Binary file
|
trunk/flags/pt.png
DELETED
Binary file
|
trunk/flags/purple.globe.png
DELETED
Binary file
|
trunk/flags/pw.png
DELETED
Binary file
|
trunk/flags/py.png
DELETED
Binary file
|
trunk/flags/qa.png
DELETED
Binary file
|
trunk/flags/re.png
DELETED
Binary file
|
trunk/flags/ro.png
DELETED
Binary file
|
trunk/flags/rs.png
DELETED
Binary file
|
trunk/flags/ru.png
DELETED
Binary file
|
trunk/flags/rw.png
DELETED
Binary file
|
trunk/flags/sa.png
DELETED
Binary file
|
trunk/flags/sb.png
DELETED
Binary file
|
trunk/flags/sc.png
DELETED
Binary file
|
trunk/flags/sd.png
DELETED
Binary file
|
trunk/flags/se.png
DELETED
Binary file
|
trunk/flags/serbska_malka.png
DELETED
Binary file
|
trunk/flags/sg.png
DELETED
Binary file
|
trunk/flags/sh.png
DELETED
Binary file
|
trunk/flags/si.png
DELETED
Binary file
|
trunk/flags/sj.png
DELETED
Binary file
|
trunk/flags/sk.png
DELETED
Binary file
|
trunk/flags/sl.png
DELETED
Binary file
|
trunk/flags/sm.png
DELETED
Binary file
|
trunk/flags/sn.png
DELETED
Binary file
|
trunk/flags/so.png
DELETED
Binary file
|
trunk/flags/sr.png
DELETED
Binary file
|
trunk/flags/st.png
DELETED
Binary file
|
trunk/flags/sv.alt.png
DELETED
Binary file
|
trunk/flags/sv.png
DELETED
Binary file
|
trunk/flags/sy.png
DELETED
Binary file
|
trunk/flags/sz.png
DELETED
Binary file
|
trunk/flags/tc.png
DELETED
Binary file
|
trunk/flags/td.png
DELETED
Binary file
|
trunk/flags/tf.png
DELETED
Binary file
|
trunk/flags/tg.png
DELETED
Binary file
|
trunk/flags/th.png
DELETED
Binary file
|
trunk/flags/tj.png
DELETED
Binary file
|
trunk/flags/tk.png
DELETED
Binary file
|
trunk/flags/tl.png
DELETED
Binary file
|
trunk/flags/tm.png
DELETED
Binary file
|
trunk/flags/tn.png
DELETED
Binary file
|
trunk/flags/to.png
DELETED
Binary file
|
trunk/flags/tr.png
DELETED
Binary file
|
trunk/flags/tt.png
DELETED
Binary file
|
trunk/flags/tv.png
DELETED
Binary file
|
trunk/flags/tw.png
DELETED
Binary file
|
trunk/flags/tz.png
DELETED
Binary file
|
trunk/flags/ua.png
DELETED
Binary file
|
trunk/flags/ug.png
DELETED
Binary file
|
trunk/flags/uk.png
DELETED
Binary file
|
trunk/flags/um.png
DELETED
Binary file
|
trunk/flags/us-uk.png
DELETED
Binary file
|
trunk/flags/us.png
DELETED
Binary file
|
trunk/flags/uy.png
DELETED
Binary file
|
trunk/flags/uz.png
DELETED
Binary file
|
trunk/flags/va.png
DELETED
Binary file
|
trunk/flags/vc.png
DELETED
Binary file
|
trunk/flags/ve.png
DELETED
Binary file
|
trunk/flags/vg.png
DELETED
Binary file
|
trunk/flags/vi.png
DELETED
Binary file
|
trunk/flags/vn.png
DELETED
Binary file
|
trunk/flags/vu.png
DELETED
Binary file
|
trunk/flags/wf.alt.png
DELETED
Binary file
|
trunk/flags/wf.png
DELETED
Binary file
|
trunk/flags/ws.png
DELETED
Binary file
|
trunk/flags/ye.png
DELETED
Binary file
|
trunk/flags/yt.png
DELETED
Binary file
|
trunk/flags/yu.png
DELETED
Binary file
|
trunk/flags/za.png
DELETED
Binary file
|
trunk/flags/zm.png
DELETED
Binary file
|
trunk/flags/zw.png
DELETED
Binary file
|
trunk/flags/zz.png
DELETED
Binary file
|
trunk/includes/admin/central/class-wpglobus-admin-central.php
DELETED
@@ -1,172 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-admin-central.php
|
4 |
-
*
|
5 |
-
* @since 1.6.6
|
6 |
-
* @package WPGlobus\Admin\Central
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Admin_Central.
|
11 |
-
*/
|
12 |
-
if ( ! class_exists( 'WPGlobus_Admin_Central' ) ) :
|
13 |
-
|
14 |
-
class WPGlobus_Admin_Central {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Link template.
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
public static $link_template;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Constructor.
|
24 |
-
*/
|
25 |
-
public static function construct() {
|
26 |
-
|
27 |
-
self::set_vars();
|
28 |
-
|
29 |
-
add_action( 'admin_menu', array( __CLASS__, 'add_menu' ), PHP_INT_MAX );
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Set class variables.
|
35 |
-
*/
|
36 |
-
public static function set_vars() {
|
37 |
-
|
38 |
-
self::$link_template = '<a href="{{href}}" class="{{link_class}}" data-tab-id="{{tab_id}}">';
|
39 |
-
self::$link_template .= '<span class="{{span_class}}" style="vertical-align: sub;"></span>';
|
40 |
-
self::$link_template .= '{{title}}';
|
41 |
-
self::$link_template .= '</a>';
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Add a hidden admin menu item.
|
47 |
-
* It serves as a base for several admin tabs, but currently do not have the "root" content.
|
48 |
-
*/
|
49 |
-
public static function add_menu() {
|
50 |
-
add_submenu_page(
|
51 |
-
null,
|
52 |
-
'',
|
53 |
-
'',
|
54 |
-
'administrator',
|
55 |
-
WPGlobus::PAGE_WPGLOBUS_ADMIN_CENTRAL,
|
56 |
-
array( __CLASS__, 'central_page' )
|
57 |
-
);
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* The admin central page.
|
62 |
-
*/
|
63 |
-
public static function central_page() {
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Filter tabs.
|
67 |
-
* Returning array.
|
68 |
-
* @since 1.6.6
|
69 |
-
*
|
70 |
-
* @param array $tabs Array of tabs.
|
71 |
-
* @param string $link_template The link template.
|
72 |
-
*/
|
73 |
-
$tabs = apply_filters( 'wpglobus_admin_central_tabs', self::set_tabs(), self::$link_template );
|
74 |
-
|
75 |
-
WPGlobus_Admin_Page::print_header();
|
76 |
-
|
77 |
-
?>
|
78 |
-
<h2 class="nav-tab-wrapper"> <?php
|
79 |
-
foreach ( $tabs as $type=>$tab ) :
|
80 |
-
$html = str_replace( '{{link_class}}', implode( ' ', $tab['link_class'] ), $tab['link'] );
|
81 |
-
$html = str_replace( '{{span_class}}', implode( ' ', $tab['span_class'] ), $html );
|
82 |
-
$html = str_replace( '{{title}}', $tab['title'], $html );
|
83 |
-
if ( ! empty( $tab['tab_id'] ) ) {
|
84 |
-
$html = str_replace( '{{href}}', '#' . $tab['tab_id'], $html );
|
85 |
-
$html = str_replace( '{{tab_id}}', $tab['tab_id'], $html );
|
86 |
-
} elseif ( ! empty( $tab['href'] ) ) {
|
87 |
-
$html = str_replace( '{{href}}', $tab['href'], $html );
|
88 |
-
$html = str_replace( '{{tab_id}}', '', $html );
|
89 |
-
} else {
|
90 |
-
$html = str_replace( '{{href}}', '#', $html );
|
91 |
-
$html = str_replace( '{{tab_id}}', '', $html );
|
92 |
-
}
|
93 |
-
echo $html; // WPCS: XSS ok.
|
94 |
-
endforeach; ?>
|
95 |
-
</h2> <?php
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Fires to render a specific tab panel.
|
99 |
-
*
|
100 |
-
* @since 1.6.6
|
101 |
-
*
|
102 |
-
* @param array $tabs Array of tabs.
|
103 |
-
*/
|
104 |
-
do_action( 'wpglobus_admin_central_panel', $tabs );
|
105 |
-
|
106 |
-
WPGlobus_Admin_Page::print_footer();
|
107 |
-
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Add standard tabs.
|
112 |
-
* @return array
|
113 |
-
*/
|
114 |
-
protected static function set_tabs() {
|
115 |
-
|
116 |
-
$tabs = array();
|
117 |
-
|
118 |
-
/**
|
119 |
-
* WPGlobus Guide tab.
|
120 |
-
*/
|
121 |
-
$tab = array(
|
122 |
-
'title' => __( 'Guide', 'wpglobus' ),
|
123 |
-
'link_class' => array( 'nav-tab' ),
|
124 |
-
'span_class' => array( 'dashicons', 'dashicons-book-alt' ),
|
125 |
-
'link' => self::$link_template,
|
126 |
-
'href' => WPGlobus::URL_WPGLOBUS_SITE . 'quick-start/',
|
127 |
-
'tab_id' => ''
|
128 |
-
);
|
129 |
-
$tabs[ 'guide' ] = $tab;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* WPGlobus Help Desk tab.
|
133 |
-
*/
|
134 |
-
$href = add_query_arg(
|
135 |
-
array(
|
136 |
-
'page' => WPGlobus::PAGE_WPGLOBUS_HELPDESK
|
137 |
-
),
|
138 |
-
admin_url( 'admin.php' )
|
139 |
-
);
|
140 |
-
|
141 |
-
$tab = array(
|
142 |
-
'title' => __( 'WPGlobus Help Desk', 'wpglobus' ),
|
143 |
-
'link_class' => array( 'nav-tab' ),
|
144 |
-
'span_class' => array( 'dashicons', 'dashicons-format-chat' ),
|
145 |
-
'link' => self::$link_template,
|
146 |
-
'href' => $href,
|
147 |
-
'tab_id' => ''
|
148 |
-
);
|
149 |
-
$tabs[ 'helpdesk' ] = $tab;
|
150 |
-
|
151 |
-
/**
|
152 |
-
* WPGlobus Add-ons tab.
|
153 |
-
*/
|
154 |
-
$href = WPGlobus_Admin_Page::url_addons();
|
155 |
-
|
156 |
-
$tab = array(
|
157 |
-
'title' => __( 'Add-ons', 'wpglobus' ),
|
158 |
-
'link_class' => array( 'nav-tab' ),
|
159 |
-
'span_class' => array( 'dashicons', 'dashicons-admin-plugins' ),
|
160 |
-
'link' => self::$link_template,
|
161 |
-
'href' => $href,
|
162 |
-
'tab_id' => ''
|
163 |
-
);
|
164 |
-
$tabs[ 'add_ons' ] = $tab;
|
165 |
-
|
166 |
-
return $tabs;
|
167 |
-
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
endif;
|
172 |
-
/* EOF */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-about.php
DELETED
@@ -1,178 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package WPGlobus\Admin
|
4 |
-
*/
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Class WPGlobus_About
|
8 |
-
*/
|
9 |
-
class WPGlobus_About {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* For Google Analytics
|
13 |
-
*/
|
14 |
-
const QA_CAMPAIGN = '?utm_source=wpglobus-admin-about&utm_medium=link&utm_campaign=activate-plugin';
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Output the about screen.
|
18 |
-
*/
|
19 |
-
public static function about_screen() {
|
20 |
-
|
21 |
-
WPGlobus_Admin_Page::print_header();
|
22 |
-
|
23 |
-
?>
|
24 |
-
<h2 class="nav-tab-wrapper">
|
25 |
-
<a href="#" class="nav-tab nav-tab-active">
|
26 |
-
<?php esc_html_e( 'Quick Start', 'wpglobus' ); ?>
|
27 |
-
</a>
|
28 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_settings() ); ?>"
|
29 |
-
class="nav-tab">
|
30 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Settings' ); ?>
|
31 |
-
<?php esc_html_e( 'Settings' ); ?>
|
32 |
-
</a>
|
33 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_addons() ); ?>"
|
34 |
-
class="nav-tab">
|
35 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Add-ons' ); ?>
|
36 |
-
<?php esc_html_e( 'Add-ons', 'wpglobus' ); ?>
|
37 |
-
</a>
|
38 |
-
<a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'quick-start/' . self::QA_CAMPAIGN ); ?>"
|
39 |
-
target="_blank"
|
40 |
-
class="nav-tab">
|
41 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Guide' ); ?>
|
42 |
-
<?php esc_html_e( 'Guide', 'wpglobus' ); ?>
|
43 |
-
</a>
|
44 |
-
<a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'faq/' . self::QA_CAMPAIGN ); ?>"
|
45 |
-
target="_blank"
|
46 |
-
class="nav-tab">
|
47 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'FAQ' ); ?>
|
48 |
-
<?php esc_html_e( 'FAQ', 'wpglobus' ); ?>
|
49 |
-
</a>
|
50 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_helpdesk() ); ?>"
|
51 |
-
class="nav-tab">
|
52 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Helpdesk' ); ?>
|
53 |
-
<?php echo esc_html( WPGlobus_Admin_HelpDesk::$page_title ); ?>
|
54 |
-
</a>
|
55 |
-
</h2>
|
56 |
-
|
57 |
-
<?php if ( ! extension_loaded( 'mbstring' ) ) : ?>
|
58 |
-
<div style="background: #fff;border-left: 4px solid #dc3232;margin: 15px 15px 2px;padding: 1px 12px;">
|
59 |
-
<h4><?php esc_html_e( 'Attention: the Multibyte String PHP extension (`mbstring`) is not loaded!', 'wpglobus' ); ?></h4>
|
60 |
-
<p><?php esc_html_e( 'The mbstring extension is required for the full UTF-8 compatibility and better performance. Without it, some parts of WordPress and WPGlobus may function incorrectly. Please contact your hosting company or systems administrator.', 'wpglobus' ); ?></p>
|
61 |
-
</div>
|
62 |
-
<?php endif; ?>
|
63 |
-
|
64 |
-
<div class="feature-main feature-section col two-col">
|
65 |
-
<div class="col">
|
66 |
-
<?php self::easy_1_2_3(); ?>
|
67 |
-
</div>
|
68 |
-
<div class="col last-feature">
|
69 |
-
<?php self::translation_help(); ?>
|
70 |
-
</div>
|
71 |
-
</div>
|
72 |
-
|
73 |
-
<div class="feature-main feature-section col two-col">
|
74 |
-
<div class="col">
|
75 |
-
<?php self::important_notes(); ?>
|
76 |
-
</div>
|
77 |
-
<div class="col last-feature">
|
78 |
-
<?php self::links(); ?>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
|
82 |
-
<hr />
|
83 |
-
|
84 |
-
<div class="return-to-dashboard">
|
85 |
-
<a class="button button-primary"
|
86 |
-
href="<?php echo esc_url( WPGlobus_Admin_Page::url_settings() ); ?>">
|
87 |
-
<?php esc_html_e( 'Go to WPGlobus Settings', 'wpglobus' ); ?>
|
88 |
-
</a>
|
89 |
-
</div>
|
90 |
-
|
91 |
-
<?php
|
92 |
-
WPGlobus_Admin_Page::print_footer();
|
93 |
-
}
|
94 |
-
|
95 |
-
protected static function easy_1_2_3() {
|
96 |
-
?>
|
97 |
-
<h4 class="dashicons-before dashicons-admin-settings bar">
|
98 |
-
<?php esc_html_e( 'Easy as 1-2-3:', 'wpglobus' ); ?>
|
99 |
-
</h4>
|
100 |
-
<ul class="wpglobus-checkmarks">
|
101 |
-
<li><?php esc_html_e( 'Go to WPGlobus admin menu and choose the countries / languages;', 'wpglobus' ); ?></li>
|
102 |
-
<li><?php esc_html_e( 'Enter the translations to the posts, pages, categories, tags and menus using a clean and simple interface.', 'wpglobus' ); ?></li>
|
103 |
-
<li><?php esc_html_e( 'Switch languages at the front-end using a drop-down menu with language names and country flags.', 'wpglobus' ); ?></li>
|
104 |
-
</ul>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
|
108 |
-
protected static function links() {
|
109 |
-
?>
|
110 |
-
<h4 class="dashicons-before dashicons-admin-links bar">
|
111 |
-
<?php esc_html_e( 'Links:', 'wpglobus' ); ?>
|
112 |
-
</h4>
|
113 |
-
<ul>
|
114 |
-
<li>• <a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . self::QA_CAMPAIGN ); ?>"
|
115 |
-
target="_blank">WPGlobus.com</a></li>
|
116 |
-
<li>• <a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'quick-start/' . self::QA_CAMPAIGN ); ?>"
|
117 |
-
target="_blank"><?php esc_html_e( 'Guide', 'wpglobus' ); ?></a></li>
|
118 |
-
<li>• <a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'faq/' . self::QA_CAMPAIGN ); ?>"
|
119 |
-
target="_blank"><?php esc_html_e( 'FAQs', 'wpglobus' ); ?></a></li>
|
120 |
-
<li>• <a href="<?php echo esc_url( WPGlobus_Admin_Page::url_helpdesk() ); ?>"
|
121 |
-
target="_blank"><?php esc_html_e( 'Contact Us', 'wpglobus' ); ?></a></li>
|
122 |
-
<li>• <a href="https://wordpress.org/support/plugin/wpglobus/reviews/?filter=5"
|
123 |
-
target="_blank"><?php esc_html_e( 'Please give us 5 stars!', 'wpglobus' ); ?></a>
|
124 |
-
<span class="wpglobus-stars">☆☆☆☆☆</span></li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
<?php
|
128 |
-
}
|
129 |
-
|
130 |
-
protected static function translation_help() {
|
131 |
-
?>
|
132 |
-
<h4 class="dashicons-before dashicons-translation highlight">
|
133 |
-
<?php esc_html_e( 'WPGlobus does not translate texts automatically!', 'wpglobus' ); ?>
|
134 |
-
</h4>
|
135 |
-
<p>
|
136 |
-
<?php esc_html_e( 'There are many translation companies and individual translators who can help you write and proofread the texts.', 'wpglobus' ); ?>
|
137 |
-
<?php esc_html_e( 'When you choose a translator, please look at their native language, country of residence, specialization and knowledge of WordPress.', 'wpglobus' ); ?>
|
138 |
-
</p>
|
139 |
-
<p>
|
140 |
-
<?php
|
141 |
-
printf(
|
142 |
-
// translators: %s are used to insert HTML link. Keep them in place.
|
143 |
-
esc_html__( 'We are planning to maintain a %s list of translators %s on the WPGlobus website. This is not an endorsement, just a courtesy. Please contact them directly and let us know how did it work for you!', 'wpglobus' ),
|
144 |
-
'<a href="' . esc_url( WPGlobus_Utils::url_wpglobus_site() . 'translator/' . self::QA_CAMPAIGN ) . '">',
|
145 |
-
'</a>'
|
146 |
-
); ?>
|
147 |
-
</p>
|
148 |
-
<?php
|
149 |
-
}
|
150 |
-
|
151 |
-
protected static function important_notes() {
|
152 |
-
?>
|
153 |
-
<h4 class="dashicons-before dashicons-info highlight">
|
154 |
-
<?php esc_html_e( 'Important notes:', 'wpglobus' ); ?>
|
155 |
-
</h4>
|
156 |
-
<ul class="wpglobus-important">
|
157 |
-
|
158 |
-
<li>
|
159 |
-
<?php _e( 'WPGlobus only supports the localization URLs in the form of <code>example.com/xx/page/</code>. We do not plan to support subdomains <code>xx.example.com</code> and language queries <code>example.com?lang=xx</code>.', 'wpglobus' ); // WPCS: XSS ok. ?>
|
160 |
-
</li>
|
161 |
-
<li>
|
162 |
-
<?php _e( 'Some themes and plugins are <strong>not multilingual-ready</strong>.', 'wpglobus' ); // WPCS: XSS ok. ?>
|
163 |
-
<?php esc_html_e( 'They might display some texts with no translation, or with all languages mixed together.', 'wpglobus' ); ?>
|
164 |
-
<?php
|
165 |
-
printf(
|
166 |
-
// translators: %s are used to insert HTML link. Keep them in place.
|
167 |
-
esc_html__( 'Please contact the theme / plugin author. If they are unable to assist, consider %s hiring the WPGlobus Team %s to write a custom code for you.', 'wpglobus' ),
|
168 |
-
'<a href="' . esc_url( WPGlobus_Utils::url_wpglobus_site() . 'professional-support/' . self::QA_CAMPAIGN ) . '">',
|
169 |
-
'</a>'
|
170 |
-
); ?>
|
171 |
-
</li>
|
172 |
-
|
173 |
-
</ul>
|
174 |
-
<?php
|
175 |
-
}
|
176 |
-
} //class
|
177 |
-
|
178 |
-
/*EOF*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-admin-bar-menu.php
DELETED
@@ -1,213 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Show WPGlobus menu in admin bar.
|
4 |
-
*
|
5 |
-
* @since 2.2.7
|
6 |
-
* @package WPGlobus\Admin
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! class_exists( 'WPGlobus_Admin_Bar_Menu' ) ) :
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_Admin_Bar_Menu.
|
13 |
-
*/
|
14 |
-
class WPGlobus_Admin_Bar_Menu {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Available languages.
|
18 |
-
*
|
19 |
-
* @var array
|
20 |
-
*/
|
21 |
-
protected static $available_languages = array();
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @since 2.2.8
|
25 |
-
*/
|
26 |
-
protected static $run_script = true;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Static constructor.
|
30 |
-
*
|
31 |
-
* @param WP_Admin_Bar $wp_admin_bar Admin bar.
|
32 |
-
*/
|
33 |
-
public static function construct( $wp_admin_bar ) {
|
34 |
-
|
35 |
-
$user_id = get_current_user_id();
|
36 |
-
|
37 |
-
if ( ! $user_id ) {
|
38 |
-
return;
|
39 |
-
}
|
40 |
-
|
41 |
-
self::$available_languages = get_available_languages();
|
42 |
-
|
43 |
-
$user_locale = get_user_meta( $user_id, 'locale', true );
|
44 |
-
|
45 |
-
add_action( 'admin_footer', array( __CLASS__, 'on__admin_footer' ), 1000 );
|
46 |
-
|
47 |
-
if ( empty( $user_locale ) ) {
|
48 |
-
self::add_language_menu( $wp_admin_bar );
|
49 |
-
} else {
|
50 |
-
if ( ! self::add_info_menu( $wp_admin_bar, $user_locale ) ) {
|
51 |
-
self::$run_script = false;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @since 2.2.8
|
59 |
-
*/
|
60 |
-
public static function on__admin_footer() {
|
61 |
-
|
62 |
-
if ( ! self::$run_script ) {
|
63 |
-
return;
|
64 |
-
}
|
65 |
-
|
66 |
-
?>
|
67 |
-
<!--suppress AnonymousFunctionJS, JSUnusedLocalSymbols -->
|
68 |
-
<script type="text/javascript">
|
69 |
-
//<![CDATA[
|
70 |
-
jQuery(document).ready(function ($) {
|
71 |
-
wpglobus_select_lang = function (locale) {
|
72 |
-
$.post(ajaxurl, {
|
73 |
-
action: 'WPGlobus_process_ajax',
|
74 |
-
order: {action: 'wpglobus_select_lang', locale: locale}
|
75 |
-
}, function (d) {
|
76 |
-
})
|
77 |
-
.done(function () {
|
78 |
-
window.location.reload();
|
79 |
-
});
|
80 |
-
}
|
81 |
-
$('#wpglobus-default-locale').on('click', function (e) {
|
82 |
-
wpglobus_select_lang('<?php echo esc_js( WPGlobus::Config()->locale[ WPGlobus::Config()->language ] ); ?>');
|
83 |
-
});
|
84 |
-
|
85 |
-
});
|
86 |
-
//]]>
|
87 |
-
</script>
|
88 |
-
<?php
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Language menu with link to `profile.php` page.
|
93 |
-
*
|
94 |
-
* @param WP_Admin_Bar $wp_admin_bar Admin bar.
|
95 |
-
* @param string[] $user_locale User locale.
|
96 |
-
*/
|
97 |
-
public static function add_info_menu( $wp_admin_bar, $user_locale ) {
|
98 |
-
|
99 |
-
$user_profile_language = array_search( $user_locale, WPGlobus::Config()->locale, true );
|
100 |
-
|
101 |
-
if ( ! $user_profile_language ) {
|
102 |
-
return false;
|
103 |
-
}
|
104 |
-
|
105 |
-
if ( empty( WPGlobus::Config()->language_name[ $user_profile_language ] ) ) {
|
106 |
-
return false;
|
107 |
-
}
|
108 |
-
|
109 |
-
$img = '';
|
110 |
-
if ( ! empty( WPGlobus::Config()->flag[ $user_profile_language ] ) ) {
|
111 |
-
$img = '<span class="ab-icon"><img src="' . WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $user_profile_language ] . '" alt=""/></span>';
|
112 |
-
}
|
113 |
-
|
114 |
-
$wp_admin_bar->add_menu(
|
115 |
-
array(
|
116 |
-
'id' => 'wpglobus-language-select',
|
117 |
-
'parent' => 'top-secondary',
|
118 |
-
'title' => $img . '<span class="ab-label">' .
|
119 |
-
WPGlobus::Config()->language_name[ $user_profile_language ] .
|
120 |
-
'</span>',
|
121 |
-
)
|
122 |
-
);
|
123 |
-
|
124 |
-
$title = esc_html__( 'Language was set on your profile page', 'wpglobus' );
|
125 |
-
$wp_admin_bar->add_menu(
|
126 |
-
array(
|
127 |
-
'parent' => 'wpglobus-language-select',
|
128 |
-
'id' => 'wpglobus-add-languages',
|
129 |
-
'title' => $title,
|
130 |
-
'href' => admin_url( 'profile.php' ),
|
131 |
-
'meta' => array(
|
132 |
-
'tabindex' => -1,
|
133 |
-
),
|
134 |
-
)
|
135 |
-
);
|
136 |
-
|
137 |
-
return true;
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Language menu in admin bar.
|
142 |
-
*
|
143 |
-
* @param WP_Admin_Bar $wp_admin_bar Admin bar.
|
144 |
-
*/
|
145 |
-
public static function add_language_menu( $wp_admin_bar ) {
|
146 |
-
|
147 |
-
$available_languages = self::$available_languages;
|
148 |
-
|
149 |
-
$wp_admin_bar->add_menu(
|
150 |
-
array(
|
151 |
-
'id' => 'wpglobus-language-select',
|
152 |
-
'parent' => 'top-secondary',
|
153 |
-
'title' => '<span class="ab-icon">' .
|
154 |
-
'<img alt="" src="' . WPGlobus::Config()->flags_url .
|
155 |
-
WPGlobus::Config()->flag[ WPGlobus::Config()->language ] . '"/>' .
|
156 |
-
'</span><span class="ab-label">' .
|
157 |
-
WPGlobus::Config()->language_name[ WPGlobus::Config()->language ] .
|
158 |
-
'</span>',
|
159 |
-
)
|
160 |
-
);
|
161 |
-
|
162 |
-
$add_more_languages = array();
|
163 |
-
foreach ( WPGlobus::Config()->enabled_languages as $language ) :
|
164 |
-
|
165 |
-
if ( WPGlobus::Config()->language === $language ) {
|
166 |
-
continue;
|
167 |
-
}
|
168 |
-
|
169 |
-
$locale = WPGlobus::Config()->locale[ $language ];
|
170 |
-
|
171 |
-
if ( 'en_US' !== $locale ) {
|
172 |
-
if ( ! in_array( $locale, $available_languages, true ) ) {
|
173 |
-
$add_more_languages[] = WPGlobus::Config()->language_name[ $language ];
|
174 |
-
continue;
|
175 |
-
}
|
176 |
-
}
|
177 |
-
|
178 |
-
$wp_admin_bar->add_menu(
|
179 |
-
array(
|
180 |
-
'parent' => 'wpglobus-language-select',
|
181 |
-
'id' => 'wpglobus-' . $language,
|
182 |
-
'title' => '<span><img alt="" src="' . WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $language ] . '" /></span> ' . WPGlobus::Config()->language_name[ $language ],
|
183 |
-
'href' => admin_url( 'options-general.php' ),
|
184 |
-
'meta' => array(
|
185 |
-
'tabindex' => -1,
|
186 |
-
'onclick' => 'wpglobus_select_lang("' . $locale . '");return false;',
|
187 |
-
),
|
188 |
-
)
|
189 |
-
);
|
190 |
-
|
191 |
-
endforeach;
|
192 |
-
|
193 |
-
if ( ! empty( $add_more_languages ) ) {
|
194 |
-
$title = esc_html__( 'Add', 'wpglobus' ) . ' (' . implode( ', ', $add_more_languages ) . ')';
|
195 |
-
$wp_admin_bar->add_menu(
|
196 |
-
array(
|
197 |
-
'parent' => 'wpglobus-language-select',
|
198 |
-
'id' => 'wpglobus-add-languages',
|
199 |
-
'title' => $title,
|
200 |
-
'href' => admin_url( 'options-general.php' ),
|
201 |
-
'meta' => array(
|
202 |
-
'tabindex' => -1,
|
203 |
-
),
|
204 |
-
)
|
205 |
-
);
|
206 |
-
}
|
207 |
-
|
208 |
-
return;
|
209 |
-
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-admin-menu.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Show a sidebar menu item.
|
4 |
-
*
|
5 |
-
* @since 1.7.8
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class WPGlobus_Admin_Menu
|
10 |
-
*/
|
11 |
-
class WPGlobus_Admin_Menu {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Static constructor.
|
15 |
-
*/
|
16 |
-
public static function construct() {
|
17 |
-
add_action( 'admin_menu', array( __CLASS__, 'add_menu' ), PHP_INT_MAX );
|
18 |
-
}
|
19 |
-
|
20 |
-
public static function add_menu() {
|
21 |
-
$icon_class = 'dashicons dashicons-before dashicons-admin-plugins';
|
22 |
-
$menu_title = __( 'Add-ons', 'wpglobus' );
|
23 |
-
add_submenu_page(
|
24 |
-
WPGlobus::OPTIONS_PAGE_SLUG,
|
25 |
-
$menu_title,
|
26 |
-
'<span class="' . esc_attr( $icon_class )
|
27 |
-
. '" style="vertical-align:middle"></span> '
|
28 |
-
. $menu_title,
|
29 |
-
'administrator',
|
30 |
-
WPGlobus_Admin_Page::url_addons(true)
|
31 |
-
);
|
32 |
-
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-admin-page.php
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-admin-page.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Helpers for building admin pages.
|
10 |
-
*/
|
11 |
-
class WPGlobus_Admin_Page {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Print page header.
|
15 |
-
*/
|
16 |
-
public static function print_header() {
|
17 |
-
$url_wpglobus_logo = WPGlobus::internal_images_url() . '/wpglobus-logo-180x180.png';
|
18 |
-
?>
|
19 |
-
<style>
|
20 |
-
.wp-badge.wpglobus-badge {
|
21 |
-
background: #ffffff url(<?php echo esc_url( $url_wpglobus_logo ); ?>) no-repeat;
|
22 |
-
background-size: contain;
|
23 |
-
}
|
24 |
-
</style>
|
25 |
-
|
26 |
-
<?php echo '<div class="wrap about-wrap wpglobus-about-wrap">'; ?>
|
27 |
-
|
28 |
-
<h1 class="wpglobus"><span class="wpglobus-wp">WP</span>Globus
|
29 |
-
<span class="wpglobus-version"><?php echo esc_html( WPGLOBUS_VERSION ); ?></span>
|
30 |
-
</h1>
|
31 |
-
|
32 |
-
<div class="wpglobus-motto"><?php esc_html_e( 'Multilingual Everything!', 'wpglobus' ); ?></div>
|
33 |
-
<div class="about-text">
|
34 |
-
<?php esc_html_e( 'WPGlobus is a family of WordPress plugins assisting you in making multilingual WordPress blogs and sites.', 'wpglobus' ); ?>
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<div class="wp-badge wpglobus-badge"></div>
|
38 |
-
<?php
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Print page header.
|
43 |
-
*/
|
44 |
-
public static function print_footer() {
|
45 |
-
echo '</div>';
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* URL of the WPGlobus Add-ons page.
|
50 |
-
*
|
51 |
-
* @param bool $relative Set it to true to get the URL relative to the admin.
|
52 |
-
*
|
53 |
-
* @return string
|
54 |
-
*/
|
55 |
-
public static function url_addons( $relative = false ) {
|
56 |
-
|
57 |
-
$url = add_query_arg(
|
58 |
-
array(
|
59 |
-
'tab' => 'search',
|
60 |
-
's' => 'WPGlobus',
|
61 |
-
'source' => 'WPGlobus',
|
62 |
-
),
|
63 |
-
self_admin_url( 'plugin-install.php' )
|
64 |
-
);
|
65 |
-
|
66 |
-
if ( $relative ) {
|
67 |
-
$url = str_replace( self_admin_url(), '', $url );
|
68 |
-
}
|
69 |
-
|
70 |
-
return $url;
|
71 |
-
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* URL of the WPGlobus Settings page.
|
76 |
-
*
|
77 |
-
* @return string
|
78 |
-
*/
|
79 |
-
public static function url_settings() {
|
80 |
-
return add_query_arg( 'page', WPGlobus::OPTIONS_PAGE_SLUG, admin_url( 'admin.php' ) );
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* URL of the WPGlobus Helpdesk page.
|
85 |
-
*
|
86 |
-
* @return string
|
87 |
-
* @since 1.9.10
|
88 |
-
*/
|
89 |
-
public static function url_helpdesk() {
|
90 |
-
return add_query_arg( 'page', WPGlobus::PAGE_WPGLOBUS_HELPDESK, admin_url( 'admin.php' ) );
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* URL of the Clean-up Tool page.
|
95 |
-
*
|
96 |
-
* @return string
|
97 |
-
* @since 1.9.10
|
98 |
-
*/
|
99 |
-
public static function url_clean_up_tool() {
|
100 |
-
return add_query_arg( 'page', WPGlobus::PAGE_WPGLOBUS_CLEAN, admin_url( 'admin.php' ) );
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* URL of the About page.
|
105 |
-
*
|
106 |
-
* @return string
|
107 |
-
* @since 1.9.10
|
108 |
-
*/
|
109 |
-
public static function url_about() {
|
110 |
-
return add_query_arg( 'page', WPGlobus::PAGE_WPGLOBUS_ABOUT, admin_url( 'admin.php' ) );
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* URL of the Admin Central page.
|
115 |
-
*
|
116 |
-
* @param string $central_tab_id Tab on the page.
|
117 |
-
*
|
118 |
-
* @return string
|
119 |
-
* @since 1.9.10
|
120 |
-
*/
|
121 |
-
public static function url_admin_central( $central_tab_id = '' ) {
|
122 |
-
return add_query_arg( 'page', WPGlobus::PAGE_WPGLOBUS_ADMIN_CENTRAL . '#' . $central_tab_id, admin_url( 'admin.php' ) );
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* URL of the Options Panel.
|
127 |
-
*
|
128 |
-
* @param string $tab Tab on the page.
|
129 |
-
*
|
130 |
-
* @return string
|
131 |
-
* @since 1.9.10
|
132 |
-
*/
|
133 |
-
public static function url_options_panel( $tab = WPGlobus_Options::DEFAULT_TAB ) {
|
134 |
-
|
135 |
-
return add_query_arg( array(
|
136 |
-
'page' => WPGlobus::OPTIONS_PAGE_SLUG,
|
137 |
-
'tab' => $tab,
|
138 |
-
), admin_url( 'admin.php' ) );
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* URL of the WPGlobus-Plus Panel.
|
143 |
-
*
|
144 |
-
* @param string $tab Tab on the page.
|
145 |
-
*
|
146 |
-
* @return string
|
147 |
-
* @since 1.9.10
|
148 |
-
*/
|
149 |
-
public static function url_wpglobus_plus_panel( $tab = 'modules' ) {
|
150 |
-
if ( class_exists( 'WPGlobusPlus', false ) ) {
|
151 |
-
return add_query_arg( array(
|
152 |
-
'page' => WPGlobusPlus::WPGLOBUS_PLUS_OPTIONS_PAGE,
|
153 |
-
'tab' => $tab,
|
154 |
-
), admin_url( 'admin.php' ) );
|
155 |
-
} else {
|
156 |
-
return admin_url();
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Icon for navigation tab item.
|
162 |
-
*
|
163 |
-
* @param string $icon_class A Dashicon CSS class or our internal alias.
|
164 |
-
* @param boolean $add_dashicons_class Add "dashicons" class before icon class.
|
165 |
-
*
|
166 |
-
* @link https://developer.wordpress.org/resource/dashicons/
|
167 |
-
* @return string
|
168 |
-
*/
|
169 |
-
public static function nav_tab_icon( $icon_class, $add_dashicons_class = true ) {
|
170 |
-
|
171 |
-
static $aliases = array(
|
172 |
-
'faq' => 'dashicons-editor-help',
|
173 |
-
'settings' => 'dashicons-admin-settings',
|
174 |
-
'add-ons' => 'dashicons-admin-plugins',
|
175 |
-
'guide' => 'dashicons-book-alt',
|
176 |
-
'helpdesk' => 'dashicons-format-chat',
|
177 |
-
'globe' => 'dashicons-admin-site',
|
178 |
-
);
|
179 |
-
|
180 |
-
$icon_class = strtolower( $icon_class );
|
181 |
-
|
182 |
-
if ( isset( $aliases[ $icon_class ] ) ) {
|
183 |
-
// An alias passed.
|
184 |
-
$icon_class = $aliases[ $icon_class ];
|
185 |
-
}
|
186 |
-
|
187 |
-
if ( $add_dashicons_class ) {
|
188 |
-
$icon_class = 'dashicons dashicons-before ' . $icon_class;
|
189 |
-
}
|
190 |
-
|
191 |
-
return $icon_class;
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Print icon for navigation tab item.
|
197 |
-
*
|
198 |
-
* @param string $icon_class A Dashicon CSS class or our internal alias.
|
199 |
-
*/
|
200 |
-
public static function nav_tab_icon_e( $icon_class ) {
|
201 |
-
echo '<span class="' . esc_attr( self::nav_tab_icon( $icon_class ) ) . '"></span>';
|
202 |
-
}
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-admin-post.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-admin-post.php
|
4 |
-
* Class for post.php page.
|
5 |
-
*
|
6 |
-
* @package WPGlobus\Admin
|
7 |
-
* @author Alex Gor(alexgff)
|
8 |
-
* @since 2.4
|
9 |
-
*/
|
10 |
-
if ( ! class_exists( 'WPGlobus_Admin_Post' ) ) :
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class WPGlobus_Admin_Menu.
|
14 |
-
*/
|
15 |
-
class WPGlobus_Admin_Post {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Static constructor.
|
19 |
-
*/
|
20 |
-
public static function construct() {
|
21 |
-
|
22 |
-
if ( ! WPGlobus_WP::is_pagenow('post.php') ) {
|
23 |
-
return;
|
24 |
-
}
|
25 |
-
|
26 |
-
if ( 'off' == WPGlobus::Config()->toggle ) {
|
27 |
-
return;
|
28 |
-
}
|
29 |
-
|
30 |
-
add_filter( 'preview_post_link', array( __CLASS__, 'filter__preview_post_link' ), 5, 2 );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Filters the URL used for a post preview in builder mode.
|
35 |
-
* @see wp-includes/link-template.php
|
36 |
-
*
|
37 |
-
* @param string $preview_link URL used for the post preview.
|
38 |
-
* @param WP_Post $post Post object.
|
39 |
-
*/
|
40 |
-
public static function filter__preview_post_link( $preview_link, $post ) {
|
41 |
-
|
42 |
-
if ( ! WPGlobus::Config()->builder->is_builder_page() ) {
|
43 |
-
return $preview_link;
|
44 |
-
}
|
45 |
-
|
46 |
-
if ( WPGlobus::Config()->builder->is_default_language() ) {
|
47 |
-
return $preview_link;
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
return WPGlobus_Utils::localize_url( $preview_link, WPGlobus::Config()->builder->get_language() );
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
endif;
|
56 |
-
|
57 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-clean.php
DELETED
@@ -1,736 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package WPGlobus/Admin
|
4 |
-
* @since 1.4.3
|
5 |
-
*/
|
6 |
-
|
7 |
-
if ( ! class_exists( 'WPGlobus_Clean' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Clean
|
11 |
-
*/
|
12 |
-
class WPGlobus_Clean {
|
13 |
-
|
14 |
-
const LOG_BASENAME = 'wpglobus-clean';
|
15 |
-
|
16 |
-
protected static $tables = array();
|
17 |
-
|
18 |
-
protected static $log_file = '';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Controller
|
22 |
-
*/
|
23 |
-
public static function controller() {
|
24 |
-
|
25 |
-
self::_set_log_file();
|
26 |
-
|
27 |
-
self::get_table();
|
28 |
-
|
29 |
-
self::screen();
|
30 |
-
|
31 |
-
add_action( 'admin_footer', array(
|
32 |
-
'WPGlobus_Clean',
|
33 |
-
'action__admin_print_scripts'
|
34 |
-
),
|
35 |
-
99
|
36 |
-
);
|
37 |
-
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Initialize the class variable `log_file`.
|
42 |
-
* Note: 'wp-content' can be set to a different path, so we are using the standard WP method.
|
43 |
-
* @todo Check if the folder exists and file is writeable.
|
44 |
-
*/
|
45 |
-
protected static function _set_log_file() {
|
46 |
-
$upload_dir = wp_upload_dir();
|
47 |
-
$wpglobus_logs_dir = $upload_dir['basedir'] . '/' . 'wpglobus-logs';
|
48 |
-
|
49 |
-
wp_mkdir_p( $wpglobus_logs_dir );
|
50 |
-
// Protect the folder from reading via URL
|
51 |
-
if ( ! file_exists( $wpglobus_logs_dir . '/.htaccess' ) ) {
|
52 |
-
file_put_contents( $wpglobus_logs_dir . '/.htaccess', 'deny from all' );
|
53 |
-
}
|
54 |
-
if ( ! file_exists( $wpglobus_logs_dir . '/index.php' ) ) {
|
55 |
-
file_put_contents( $wpglobus_logs_dir . '/index.php', '' );
|
56 |
-
}
|
57 |
-
|
58 |
-
self::$log_file = $wpglobus_logs_dir . '/' . self::LOG_BASENAME . '.log';
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Get table
|
63 |
-
*
|
64 |
-
* @param string $table Table name to set data.
|
65 |
-
*
|
66 |
-
* @return void
|
67 |
-
*/
|
68 |
-
public static function get_table( $table = '' ) {
|
69 |
-
|
70 |
-
$get_all = false;
|
71 |
-
if ( '' === $table ) {
|
72 |
-
$get_all = true;
|
73 |
-
}
|
74 |
-
|
75 |
-
if ( 'posts' === $table || $get_all ) {
|
76 |
-
|
77 |
-
/**
|
78 |
-
* table posts
|
79 |
-
*/
|
80 |
-
$posts = new stdClass();
|
81 |
-
$posts->include_fields = array(
|
82 |
-
'post_content',
|
83 |
-
'post_title',
|
84 |
-
'post_excerpt',
|
85 |
-
'post_content_filtered'
|
86 |
-
);
|
87 |
-
$posts->id_field = 'ID';
|
88 |
-
$posts->post_status = array(
|
89 |
-
'publish',
|
90 |
-
'draft'
|
91 |
-
);
|
92 |
-
|
93 |
-
self::$tables['posts'] = $posts;
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
if ( 'postmeta' === $table || $get_all ) {
|
98 |
-
|
99 |
-
/**
|
100 |
-
* table postmeta
|
101 |
-
*/
|
102 |
-
$postmeta = new stdClass();
|
103 |
-
$postmeta->include_fields = array(
|
104 |
-
'meta_value'
|
105 |
-
);
|
106 |
-
$postmeta->id_field = 'meta_id';
|
107 |
-
|
108 |
-
self::$tables['postmeta'] = $postmeta;
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
if ( 'options' === $table || $get_all ) {
|
113 |
-
|
114 |
-
/**
|
115 |
-
* table options
|
116 |
-
*/
|
117 |
-
$options = new stdClass();
|
118 |
-
$options->include_fields = array(
|
119 |
-
'option_value'
|
120 |
-
);
|
121 |
-
$options->id_field = 'option_id';
|
122 |
-
|
123 |
-
self::$tables['options'] = $options;
|
124 |
-
|
125 |
-
}
|
126 |
-
|
127 |
-
if ( 'terms' === $table || $get_all ) {
|
128 |
-
|
129 |
-
/**
|
130 |
-
* table terms
|
131 |
-
*/
|
132 |
-
$terms = new stdClass();
|
133 |
-
$terms->include_fields = array(
|
134 |
-
'name'
|
135 |
-
);
|
136 |
-
$terms->id_field = 'term_id';
|
137 |
-
|
138 |
-
self::$tables['terms'] = $terms;
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
if ( 'term_taxonomy' === $table || $get_all ) {
|
143 |
-
|
144 |
-
/**
|
145 |
-
* table term_taxonomy
|
146 |
-
*/
|
147 |
-
$term_taxonomy = new stdClass();
|
148 |
-
$term_taxonomy->include_fields = array(
|
149 |
-
'description'
|
150 |
-
);
|
151 |
-
$term_taxonomy->id_field = 'term_taxonomy_id';
|
152 |
-
|
153 |
-
self::$tables['term_taxonomy'] = $term_taxonomy;
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
if ( 'usermeta' === $table || $get_all ) {
|
158 |
-
|
159 |
-
/**
|
160 |
-
* table usermeta
|
161 |
-
*/
|
162 |
-
$usermeta = new stdClass();
|
163 |
-
$usermeta->include_fields = array(
|
164 |
-
'meta_value'
|
165 |
-
);
|
166 |
-
|
167 |
-
$usermeta->id_field = 'umeta_id';
|
168 |
-
|
169 |
-
self::$tables['usermeta'] = $usermeta;
|
170 |
-
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
if ( class_exists( 'WooCommerce' ) ) :
|
175 |
-
|
176 |
-
/**
|
177 |
-
* WooCommerce tables
|
178 |
-
*/
|
179 |
-
if ( 'woocommerce_attribute_taxonomies' === $table || $get_all ) {
|
180 |
-
/**
|
181 |
-
* table woocommerce_attribute_taxonomies
|
182 |
-
*/
|
183 |
-
$woocommerce_attribute_taxonomies = new stdClass();
|
184 |
-
$woocommerce_attribute_taxonomies->include_fields = array(
|
185 |
-
'attribute_label'
|
186 |
-
);
|
187 |
-
$woocommerce_attribute_taxonomies->id_field = 'attribute_id';
|
188 |
-
|
189 |
-
self::$tables['woocommerce_attribute_taxonomies'] = $woocommerce_attribute_taxonomies;
|
190 |
-
}
|
191 |
-
|
192 |
-
if ( 'woocommerce_order_items' === $table || $get_all ) {
|
193 |
-
/**
|
194 |
-
* table woocommerce_order_items
|
195 |
-
*/
|
196 |
-
$woocommerce_order_items = new stdClass();
|
197 |
-
$woocommerce_order_items->include_fields = array(
|
198 |
-
'order_item_name'
|
199 |
-
);
|
200 |
-
$woocommerce_order_items->id_field = 'order_item_id';
|
201 |
-
|
202 |
-
self::$tables['woocommerce_order_items'] = $woocommerce_order_items;
|
203 |
-
}
|
204 |
-
|
205 |
-
endif;
|
206 |
-
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Get table list
|
211 |
-
*/
|
212 |
-
public static function get_table_list() {
|
213 |
-
|
214 |
-
$spinner = WPGlobus::$PLUGIN_DIR_URL . 'includes/css/images/spinner.gif';
|
215 |
-
|
216 |
-
$list = '<ul>';
|
217 |
-
foreach ( self::$tables as $table => $data ) {
|
218 |
-
|
219 |
-
$list .= '<li id="' . $table . '">';
|
220 |
-
/** @noinspection DisconnectedForeachInstructionInspection */
|
221 |
-
$list .= '<span class="wpglobus-spinner" style="float:left;margin-right:10px;"><img src="' . $spinner . '" /></span>';
|
222 |
-
$list .= '<span class="wpglobus-result" style="float:left;width:20px;height:20px;"></span>';
|
223 |
-
$list .= '<span class=""><input type="checkbox" id="cb-' . $table . '" checked disabled /></span>';
|
224 |
-
$list .= $table;
|
225 |
-
$list .= '</li>';
|
226 |
-
|
227 |
-
}
|
228 |
-
$list .= '<li id="wpglobus_options">';
|
229 |
-
$list .= '<span class="wpglobus-spinner" style="float:left;margin-right:10px;"><img src="' . $spinner . '" /></span>';
|
230 |
-
$list .= '<span class="wpglobus-result" style="float:left;width:20px;height:20px;"></span>';
|
231 |
-
$list .= '<span class=""><input type="checkbox" id="cb-wpglobus_options" name="cb-wpglobus_options" /></span>';
|
232 |
-
$list .= esc_html( __( 'Remove the WPGlobus settings (not recommended)', 'wpglobus' ) );
|
233 |
-
$list .= '</li>';
|
234 |
-
$list .= '</ul>';
|
235 |
-
|
236 |
-
return $list;
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
/**
|
241 |
-
* Ajax action handler
|
242 |
-
*
|
243 |
-
* @param string[] $order
|
244 |
-
*/
|
245 |
-
public static function process_ajax( $order ) {
|
246 |
-
|
247 |
-
self::_set_log_file();
|
248 |
-
|
249 |
-
$_log = false;
|
250 |
-
|
251 |
-
if ( 'true' === $order['log'] ) {
|
252 |
-
$_log = true;
|
253 |
-
}
|
254 |
-
|
255 |
-
if ( $order['action'] === 'die' ) {
|
256 |
-
wp_send_json_success( $order );
|
257 |
-
}
|
258 |
-
|
259 |
-
if ( $order['action'] === 'wpglobus-reset' ) {
|
260 |
-
|
261 |
-
/**
|
262 |
-
* SELECT * FROM `wp_options` WHERE `option_name` REGEXP 'wpglobus'
|
263 |
-
*/
|
264 |
-
|
265 |
-
global $wpdb;
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Make table with prefix
|
269 |
-
*/
|
270 |
-
$table = $wpdb->prefix . 'options';
|
271 |
-
|
272 |
-
$query = "SELECT `option_id`, `option_name` FROM `$table` WHERE `option_name` REGEXP 'wpglobus'";
|
273 |
-
|
274 |
-
$ids = $wpdb->get_results( $query, ARRAY_A );
|
275 |
-
|
276 |
-
$records = array();
|
277 |
-
$fields = array();
|
278 |
-
|
279 |
-
foreach ( $ids as $data ) {
|
280 |
-
foreach ( $data as $field_id => $record_id ) {
|
281 |
-
if ( 'option_id' === $field_id ) {
|
282 |
-
$records[] = $record_id;
|
283 |
-
} else if ( 'option_name' === $field_id ) {
|
284 |
-
$fields[] = $record_id;
|
285 |
-
}
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
-
$result = true;
|
290 |
-
if ( ! empty( $records ) ) {
|
291 |
-
|
292 |
-
if ( $_log ) {
|
293 |
-
self::_log( $table, '', $fields, '' );
|
294 |
-
}
|
295 |
-
|
296 |
-
$set = implode( ',', $records );
|
297 |
-
$query = "DELETE FROM $table WHERE `option_id` IN ($set)";
|
298 |
-
$result = $wpdb->query( $query );
|
299 |
-
}
|
300 |
-
|
301 |
-
if ( false === $result ) {
|
302 |
-
wp_send_json_error( $order );
|
303 |
-
}
|
304 |
-
|
305 |
-
wp_send_json_success( $order );
|
306 |
-
|
307 |
-
}
|
308 |
-
|
309 |
-
if ( $order['action'] !== 'clean' ) {
|
310 |
-
wp_send_json_error( $order );
|
311 |
-
}
|
312 |
-
|
313 |
-
self::get_table( $order['table'] );
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Set of examples of sql queries
|
317 |
-
* @see http://dev.mysql.com/doc/refman/5.7/en/pattern-matching.html
|
318 |
-
* @see http://dev.mysql.com/doc/refman/5.7/en/regexp.html
|
319 |
-
*/
|
320 |
-
|
321 |
-
/**
|
322 |
-
* SELECT * FROM `wp_posts` WHERE 1=1 AND `post_status` REGEXP 'publish|draft' AND (
|
323 |
-
* `post_content` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}' OR
|
324 |
-
* `post_title` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}' OR
|
325 |
-
* `post_excerpt` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}' OR
|
326 |
-
* `post_content_filtered` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}' )
|
327 |
-
*/
|
328 |
-
|
329 |
-
/**
|
330 |
-
* SELECT * FROM `wp_postmeta` WHERE `meta_value` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
331 |
-
*/
|
332 |
-
|
333 |
-
/**
|
334 |
-
* SELECT * FROM `wp_options` WHERE `option_value` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
335 |
-
*/
|
336 |
-
|
337 |
-
/**
|
338 |
-
* SELECT * FROM `wp_terms` WHERE `name` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
339 |
-
*/
|
340 |
-
|
341 |
-
/**
|
342 |
-
* SELECT * FROM `wp_term_taxonomy` WHERE `description` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
343 |
-
*/
|
344 |
-
|
345 |
-
/**
|
346 |
-
* SELECT * FROM `wp_usermeta` WHERE `meta_value` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
347 |
-
*/
|
348 |
-
|
349 |
-
/**
|
350 |
-
* SELECT * FROM `wp_woocommerce_attribute_taxonomies` WHERE `attribute_label` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
351 |
-
*/
|
352 |
-
|
353 |
-
/**
|
354 |
-
* SELECT * FROM `wp_woocommerce_order_items` WHERE `order_item_name` REGEXP '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}'
|
355 |
-
*/
|
356 |
-
|
357 |
-
global $wpdb;
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Make table with prefix
|
361 |
-
*/
|
362 |
-
$table = $wpdb->prefix . $order['table'];
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Standard regexp
|
366 |
-
*/
|
367 |
-
$wpg_regexp = '{:[a-z]{2}|[[.[.]]:[a-z]{2}|<!--:[a-z]{2}';
|
368 |
-
|
369 |
-
/**
|
370 |
-
* Post status
|
371 |
-
*/
|
372 |
-
$post_status = '';
|
373 |
-
if ( ! empty( self::$tables[ $order['table'] ]->post_status ) ) {
|
374 |
-
/**
|
375 |
-
* Example: AND `post_status` REGEXP 'publish|draft'
|
376 |
-
*/
|
377 |
-
$post_status = "AND post_status REGEXP '" . implode( '|', self::$tables[ $order['table'] ]->post_status ) . "' ";
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Set condition
|
382 |
-
*/
|
383 |
-
$condition = false;
|
384 |
-
if ( count( self::$tables[ $order['table'] ]->include_fields ) === 0 ) {
|
385 |
-
/** do nothing */
|
386 |
-
} else if ( count( self::$tables[ $order['table'] ]->include_fields ) === 1 ) {
|
387 |
-
/**
|
388 |
-
* one field
|
389 |
-
*/
|
390 |
-
$field = self::$tables[ $order['table'] ]->include_fields[0];
|
391 |
-
$condition = "AND $field REGEXP '$wpg_regexp'";
|
392 |
-
|
393 |
-
} else {
|
394 |
-
/**
|
395 |
-
* multiple fields
|
396 |
-
*/
|
397 |
-
$temp = array();
|
398 |
-
foreach ( self::$tables[ $order['table'] ]->include_fields as $field ) {
|
399 |
-
$temp[] = "$field REGEXP '$wpg_regexp'";
|
400 |
-
}
|
401 |
-
|
402 |
-
$condition = 'AND ( ' . implode( ' OR ', $temp ) . ' )';
|
403 |
-
|
404 |
-
}
|
405 |
-
|
406 |
-
/**
|
407 |
-
* Set record ID
|
408 |
-
*/
|
409 |
-
$id = false;
|
410 |
-
if ( ! empty( self::$tables[ $order['table'] ]->id_field ) ) {
|
411 |
-
$id = self::$tables[ $order['table'] ]->id_field;
|
412 |
-
}
|
413 |
-
|
414 |
-
if ( ! $id ) {
|
415 |
-
wp_send_json_error( $order );
|
416 |
-
}
|
417 |
-
|
418 |
-
if ( ! $condition ) {
|
419 |
-
wp_send_json_error( $order );
|
420 |
-
}
|
421 |
-
|
422 |
-
$query = "SELECT $id FROM $table WHERE 1=1 $post_status $condition";
|
423 |
-
|
424 |
-
$ids = $wpdb->get_results( $query, ARRAY_A );
|
425 |
-
|
426 |
-
$result = true;
|
427 |
-
|
428 |
-
foreach ( $ids as $data ) {
|
429 |
-
|
430 |
-
foreach ( $data as $field_id => $record_id ) {
|
431 |
-
|
432 |
-
/** @noinspection DisconnectedForeachInstructionInspection */
|
433 |
-
$ifields = implode( ', ', self::$tables[ $order['table'] ]->include_fields );
|
434 |
-
|
435 |
-
$query1 = "SELECT $ifields FROM $table WHERE $field_id = '$record_id'";
|
436 |
-
|
437 |
-
/** @var array $record */
|
438 |
-
$record = $wpdb->get_results( $query1 );
|
439 |
-
|
440 |
-
$update_fields = array();
|
441 |
-
|
442 |
-
foreach ( self::$tables[ $order['table'] ]->include_fields as $include_field ) {
|
443 |
-
|
444 |
-
$value = $record[0]->$include_field;
|
445 |
-
|
446 |
-
$value = trim( $value );
|
447 |
-
if ( empty( $value ) ) {
|
448 |
-
continue;
|
449 |
-
}
|
450 |
-
|
451 |
-
$serialized = false;
|
452 |
-
if ( is_serialized( $value ) ) {
|
453 |
-
$serialized = true;
|
454 |
-
$value = maybe_unserialize( $value );
|
455 |
-
}
|
456 |
-
|
457 |
-
$converted = self::convert( $value );
|
458 |
-
|
459 |
-
if ( $_log ) {
|
460 |
-
self::_log( $table, $record_id, $value, $converted );
|
461 |
-
}
|
462 |
-
|
463 |
-
if ( $serialized ) {
|
464 |
-
$converted = maybe_serialize( $converted );
|
465 |
-
}
|
466 |
-
|
467 |
-
$update_fields[] = $include_field . "='" . $converted . "'";
|
468 |
-
|
469 |
-
} // endforeach;
|
470 |
-
|
471 |
-
if ( ! empty( $update_fields ) ) {
|
472 |
-
/**
|
473 |
-
* UPDATE record
|
474 |
-
*/
|
475 |
-
$updates = implode( ', ', $update_fields );
|
476 |
-
$upd_query = "UPDATE `$table` SET $updates WHERE `$field_id` = $record_id";
|
477 |
-
|
478 |
-
$res = $wpdb->query( $upd_query );
|
479 |
-
|
480 |
-
if ( false === $res ) {
|
481 |
-
$result = false;
|
482 |
-
}
|
483 |
-
|
484 |
-
}
|
485 |
-
|
486 |
-
} // endforeach
|
487 |
-
|
488 |
-
} // endforeach
|
489 |
-
|
490 |
-
if ( false === $result ) {
|
491 |
-
wp_send_json_error( $order );
|
492 |
-
}
|
493 |
-
|
494 |
-
wp_send_json_success( $order );
|
495 |
-
|
496 |
-
}
|
497 |
-
|
498 |
-
/**
|
499 |
-
* Logger
|
500 |
-
*
|
501 |
-
* @param string $table
|
502 |
-
* @param string $id
|
503 |
-
* @param string $initial
|
504 |
-
* @param string $converted
|
505 |
-
*/
|
506 |
-
public static function _log( $table = '', $id = '', $initial = '', $converted = '' ) {
|
507 |
-
error_log( date( DATE_ATOM ) . "\n", 3, self::$log_file );
|
508 |
-
error_log( 'TABLE: ' . $table . "\n", 3, self::$log_file );
|
509 |
-
error_log( 'ID: ' . $id . "\n", 3, self::$log_file );
|
510 |
-
error_log( "BEFORE: \n" . print_r( $initial, true ) . "\n", 3, self::$log_file );
|
511 |
-
if ( empty($converted) ) {
|
512 |
-
error_log( "AFTER: \n(empty)\n", 3, self::$log_file );
|
513 |
-
} else {
|
514 |
-
error_log( "AFTER: \n" . print_r( $converted, true ) . "\n", 3, self::$log_file );
|
515 |
-
}
|
516 |
-
error_log( '=================' . "\n\n", 3, self::$log_file );
|
517 |
-
}
|
518 |
-
|
519 |
-
/**
|
520 |
-
* Enqueue js
|
521 |
-
*
|
522 |
-
* @return void
|
523 |
-
*/
|
524 |
-
public static function action__admin_print_scripts() {
|
525 |
-
|
526 |
-
$src = WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-clean' . WPGlobus::SCRIPT_SUFFIX() . '.js';
|
527 |
-
|
528 |
-
$result_icons['success'] = WPGlobus::$PLUGIN_DIR_URL . 'includes/css/images/success.png';
|
529 |
-
$result_icons['error'] = WPGlobus::$PLUGIN_DIR_URL . 'includes/css/images/error.png';
|
530 |
-
|
531 |
-
wp_enqueue_script(
|
532 |
-
'wpglobus-clean',
|
533 |
-
$src,
|
534 |
-
array( 'jquery' ),
|
535 |
-
WPGLOBUS_VERSION,
|
536 |
-
true
|
537 |
-
);
|
538 |
-
|
539 |
-
wp_localize_script(
|
540 |
-
'wpglobus-clean',
|
541 |
-
'WPGlobusClean',
|
542 |
-
array(
|
543 |
-
'version' => WPGLOBUS_VERSION,
|
544 |
-
'icons' => $result_icons,
|
545 |
-
'data' => array_merge( self::$tables, array( 'wpglobus_options' => new stdClass() ) )
|
546 |
-
)
|
547 |
-
);
|
548 |
-
|
549 |
-
|
550 |
-
}
|
551 |
-
|
552 |
-
/**
|
553 |
-
* Output the clean screen.
|
554 |
-
*
|
555 |
-
* @return void
|
556 |
-
*/
|
557 |
-
public static function screen() {
|
558 |
-
|
559 |
-
/**
|
560 |
-
* For Google Analytics
|
561 |
-
*/
|
562 |
-
$ga_campaign = '?utm_source=wpglobus-admin-clean&utm_medium=link&utm_campaign=clean-up-tool';
|
563 |
-
|
564 |
-
$url_wpglobus_site = WPGlobus_Utils::url_wpglobus_site();
|
565 |
-
// $url_wpglobus_site_home = $url_wpglobus_site . $ga_campaign;
|
566 |
-
$url_wpglobus_site_contact = $url_wpglobus_site . 'pg/contact-us/' . $ga_campaign;
|
567 |
-
$url_wpglobus_site_quick_start = $url_wpglobus_site . 'quick-start/' . $ga_campaign;
|
568 |
-
// $url_wpglobus_site_faq = $url_wpglobus_site . 'faq/' . $ga_campaign;
|
569 |
-
// $url_wpglobus_site_pro_support = $url_wpglobus_site . 'professional-support/' . $ga_campaign;
|
570 |
-
|
571 |
-
$url_wpglobus_logo = WPGlobus::$PLUGIN_DIR_URL . 'includes/css/images/wpglobus-logo-180x180.png';
|
572 |
-
|
573 |
-
?>
|
574 |
-
<style>
|
575 |
-
.wp-badge.wpglobus-badge {
|
576 |
-
background: #ffffff url(<?php echo esc_url( $url_wpglobus_logo ); ?>) no-repeat;
|
577 |
-
background-size: contain;
|
578 |
-
}
|
579 |
-
</style>
|
580 |
-
<div class="wrap about-wrap wpglobus-about-wrap clean-wrap wpglobus-clean">
|
581 |
-
<h1 class="wpglobus"><span class="wpglobus-wp">WP</span>Globus
|
582 |
-
<span class="wpglobus-version"><?php echo esc_html( WPGLOBUS_VERSION ); ?></span>
|
583 |
-
</h1>
|
584 |
-
|
585 |
-
<div class="wpglobus-motto"><?php esc_html_e( 'Multilingual Everything!', 'wpglobus' ); ?></div>
|
586 |
-
|
587 |
-
<div class="about-text">
|
588 |
-
<?php esc_html_e( 'WPGlobus is a family of WordPress plugins assisting you in making multilingual WordPress blogs and sites.', 'wpglobus' ); ?>
|
589 |
-
</div>
|
590 |
-
|
591 |
-
<div class="wp-badge wpglobus-badge"></div>
|
592 |
-
|
593 |
-
<h2 class="nav-tab-wrapper">
|
594 |
-
<a href="#" class="nav-tab nav-tab-active">
|
595 |
-
<?php esc_html_e( 'Clean-up Tool', 'wpglobus' ); ?>
|
596 |
-
</a>
|
597 |
-
<a href="<?php echo esc_url( $url_wpglobus_site_quick_start ); ?>"
|
598 |
-
target="_blank"
|
599 |
-
class="nav-tab">
|
600 |
-
<?php esc_html_e( 'Guide', 'wpglobus' ); ?>
|
601 |
-
</a>
|
602 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_settings() ); ?>" class="nav-tab">
|
603 |
-
<?php esc_html_e( 'Settings' ); ?>
|
604 |
-
</a>
|
605 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_addons() ); ?>" class="nav-tab">
|
606 |
-
<?php esc_html_e( 'Add-ons', 'wpglobus' ); ?>
|
607 |
-
</a>
|
608 |
-
<a href="<?php echo esc_url( $url_wpglobus_site_contact ); ?>" class="nav-tab">
|
609 |
-
<?php esc_html_e( 'Support', 'wpglobus' ); ?>
|
610 |
-
</a>
|
611 |
-
</h2>
|
612 |
-
|
613 |
-
<div style="color: white; background-color: red; padding: .5em; margin-top: 1em;">
|
614 |
-
<?php esc_html_e( 'WARNING: this operation is non-reversible. It is strongly recommended that you backup your database before proceeding.', 'wpglobus' ); ?>
|
615 |
-
</div>
|
616 |
-
|
617 |
-
<div style="padding: .5em"><strong>
|
618 |
-
<?php esc_html_e( 'This tool should be used only if you plan to completely uninstall WPGlobus. By running it, you will remove ALL translations you have entered to your post, pages, etc., keeping only the MAIN language texts. Please make sure that all entries have some content in the main language. Otherwise, you might end up with empty titles, no content, no excerpts, blank comments and so on.', 'wpglobus' ); ?>
|
619 |
-
</strong></div>
|
620 |
-
|
621 |
-
<div style="color:red; background-color: white; padding: .5em">
|
622 |
-
<?php
|
623 |
-
echo esc_html( sprintf(
|
624 |
-
// translators: %1$s - language name, %1$s - language code. Do not remove.
|
625 |
-
__( 'The main language is currently set to %1$s (%2$s). ALL TEXTS THAT ARE NOT IN %1$s WILL BE DELETED! To change the main language, please go to Settings.', 'wpglobus' ),
|
626 |
-
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->default_language ],
|
627 |
-
WPGlobus::Config()->default_language ) );
|
628 |
-
|
629 |
-
?>
|
630 |
-
</div>
|
631 |
-
|
632 |
-
<hr />
|
633 |
-
<h3 id="about-to-clean">
|
634 |
-
<?php esc_html_e( 'You are about to clean the content of the following database tables:', 'wpglobus' ); ?>
|
635 |
-
</h3>
|
636 |
-
|
637 |
-
<?php echo self::get_table_list(); // WPCS: XSS ok. ?>
|
638 |
-
|
639 |
-
<hr />
|
640 |
-
|
641 |
-
<h3>
|
642 |
-
<?php esc_html_e( 'The operations log', 'wpglobus' ); ?>
|
643 |
-
</h3>
|
644 |
-
<div>
|
645 |
-
<?php esc_html_e( 'We are going to write a detailed log of all the database changes performed. It should help in the case you need to restore something important. The log will be written to the file:', 'wpglobus' ); ?>
|
646 |
-
</div>
|
647 |
-
<br />
|
648 |
-
<code>
|
649 |
-
<?php echo self::$log_file; // WPCS: XSS ok. ?>
|
650 |
-
</code>
|
651 |
-
<br />
|
652 |
-
<br />
|
653 |
-
<label>
|
654 |
-
<input type="checkbox" name="wpglobus-clean-log" id="wpglobus-clean-log" checked="checked" />
|
655 |
-
<?php esc_html_e( 'Uncheck if you do not want to write the operations log (we recommend to keep it checked)', 'wpglobus' ); ?>
|
656 |
-
|
657 |
-
</label>
|
658 |
-
<hr />
|
659 |
-
<h3>
|
660 |
-
<?php esc_html_e( 'You have been warned...', 'wpglobus' ); ?>
|
661 |
-
</h3>
|
662 |
-
<?php esc_html_e( 'Please confirm by checking the box below:', 'wpglobus' ); ?>
|
663 |
-
<div style="color:red; background-color: white; padding: .5em; margin: 1em 0;">
|
664 |
-
<?php esc_html_e( 'I have read and understood everything written on this page. I am aware that by using this tool I may loose some content of my website. I have made a database backup and know how to restore it if necessary. I am fully responsible for the results.', 'wpglobus' ); ?>
|
665 |
-
</div>
|
666 |
-
|
667 |
-
<label><input type="checkbox" name="wpglobus-clean-activate" id="wpglobus-clean-activate" /><?php esc_html_e( 'YES, I CONFIRM', 'wpglobus' ); ?>
|
668 |
-
</label>
|
669 |
-
<div class="return-to-dashboard">
|
670 |
-
<a id="wpglobus-clean-button" class="button button-primary hidden" href="#about-to-clean">
|
671 |
-
<?php esc_html_e( 'Process with the Clean-up', 'wpglobus' ); ?>
|
672 |
-
</a>
|
673 |
-
</div>
|
674 |
-
|
675 |
-
</div>
|
676 |
-
|
677 |
-
<?php
|
678 |
-
}
|
679 |
-
|
680 |
-
/**
|
681 |
-
* Convert string to text with default language
|
682 |
-
*
|
683 |
-
* @param mixed $data
|
684 |
-
*
|
685 |
-
* @return mixed $data
|
686 |
-
*/
|
687 |
-
public static function convert( $data ) {
|
688 |
-
|
689 |
-
if ( empty( $data ) ) {
|
690 |
-
return '';
|
691 |
-
}
|
692 |
-
|
693 |
-
if ( is_null( $data ) ) {
|
694 |
-
return $data;
|
695 |
-
}
|
696 |
-
|
697 |
-
if ( is_bool( $data ) ) {
|
698 |
-
return $data;
|
699 |
-
}
|
700 |
-
|
701 |
-
if ( is_float( $data ) ) {
|
702 |
-
return $data;
|
703 |
-
}
|
704 |
-
|
705 |
-
if ( is_int( $data ) ) {
|
706 |
-
return $data;
|
707 |
-
}
|
708 |
-
|
709 |
-
if ( is_string( $data ) ) {
|
710 |
-
$data = WPGlobus_Core::text_filter( $data, WPGlobus::Config()->default_language, WPGlobus::RETURN_EMPTY );
|
711 |
-
|
712 |
-
/**
|
713 |
-
* Set double apostrophe for mySQL UPDATE
|
714 |
-
*/
|
715 |
-
return str_replace( "'", "''", $data );
|
716 |
-
}
|
717 |
-
|
718 |
-
foreach ( $data as $key => $value ) {
|
719 |
-
if ( is_array( $data ) ) {
|
720 |
-
/** @noinspection AlterInForeachInspection */
|
721 |
-
$data[ $key ] = self::convert( $value );
|
722 |
-
} else if ( is_object( $data ) ) {
|
723 |
-
$data->$key = self::convert( $value );
|
724 |
-
}
|
725 |
-
}
|
726 |
-
|
727 |
-
return $data;
|
728 |
-
|
729 |
-
}
|
730 |
-
|
731 |
-
|
732 |
-
} //class
|
733 |
-
|
734 |
-
endif;
|
735 |
-
|
736 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-customize-options.php
DELETED
@@ -1,1571 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus_Customize_Options
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin\Customizer
|
6 |
-
* @since 1.4.6
|
7 |
-
*
|
8 |
-
* @see http://www.narga.net/comprehensive-guide-wordpress-theme-options-with-customization-api/
|
9 |
-
* @see https://developer.wordpress.org/themes/advanced-topics/customizer-api/#top
|
10 |
-
* @see https://codex.wordpress.org/Theme_Customization_API
|
11 |
-
* @see #customize-controls
|
12 |
-
*/
|
13 |
-
|
14 |
-
/**
|
15 |
-
* wpglobus_option
|
16 |
-
* wpglobus_option_flags
|
17 |
-
* wpglobus_option_locale
|
18 |
-
* wpglobus_option_en_language_names
|
19 |
-
* wpglobus_option_language_names
|
20 |
-
* wpglobus_option_post_meta_settings
|
21 |
-
*/
|
22 |
-
|
23 |
-
/**
|
24 |
-
* WPGlobus option Customizer setting @see $wp_customize->add_setting
|
25 |
-
*
|
26 |
-
* wpglobus_option[last_tab] => are not used in customizer
|
27 |
-
*
|
28 |
-
* wpglobus_option[enabled_languages] => wpglobus_customize_enabled_languages
|
29 |
-
*
|
30 |
-
* wpglobus_option[more_languages] => are not used in customizer
|
31 |
-
*
|
32 |
-
* wpglobus_option[show_flag_name] => wpglobus_customize_language_selector_mode
|
33 |
-
*
|
34 |
-
* wpglobus_option[use_nav_menu] => wpglobus_customize_language_selector_menu
|
35 |
-
*
|
36 |
-
* wpglobus_option[selector_wp_list_pages]
|
37 |
-
* => Array
|
38 |
-
* (
|
39 |
-
* [show_selector] => 1 => wpglobus_customize_selector_wp_list_pages
|
40 |
-
* )
|
41 |
-
*
|
42 |
-
* wpglobus_option[css_editor] => wpglobus_customize_css_editor
|
43 |
-
*
|
44 |
-
*/
|
45 |
-
if ( ! class_exists( 'WPGlobus_Customize_Options' ) ) :
|
46 |
-
|
47 |
-
|
48 |
-
if ( ! class_exists( 'WP_Customize_Control' ) ) {
|
49 |
-
require_once( ABSPATH . WPINC . '/class-wp-customize-control.php' );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Class WPGlobusTextBox.
|
54 |
-
* Adds textbox support to the theme customizer.
|
55 |
-
*
|
56 |
-
* @see wp-includes\class-wp-customize-control.php
|
57 |
-
*/
|
58 |
-
class WPGlobusTextBox extends WP_Customize_Control {
|
59 |
-
|
60 |
-
public $type = 'textbox';
|
61 |
-
|
62 |
-
public $content = '';
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Constructor.
|
66 |
-
*
|
67 |
-
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
|
68 |
-
* @param string $id Control ID.
|
69 |
-
* @param array $args Optional. Arguments to override class property defaults.
|
70 |
-
*/
|
71 |
-
public function __construct( $manager, $id, $args = array() ) {
|
72 |
-
$this->content = empty( $args['content'] ) ? '' : $args['content'];
|
73 |
-
$this->statuses = array( '' => esc_html__( 'Default', 'wpglobus' ) );
|
74 |
-
parent::__construct( $manager, $id, $args );
|
75 |
-
}
|
76 |
-
|
77 |
-
public function render_content() {
|
78 |
-
|
79 |
-
echo $this->content;
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Adds checkbox with title support to the theme customizer.
|
87 |
-
*
|
88 |
-
* @see wp-includes\class-wp-customize-control.php
|
89 |
-
*/
|
90 |
-
class WPGlobusCheckBox extends WP_Customize_Control {
|
91 |
-
|
92 |
-
public $type = 'wpglobus_checkbox';
|
93 |
-
|
94 |
-
public $title = '';
|
95 |
-
|
96 |
-
public function __construct( $manager, $id, $args = array() ) {
|
97 |
-
|
98 |
-
$this->title = empty( $args['title'] ) ? '' : $args['title'];
|
99 |
-
|
100 |
-
$this->statuses = array( '' => esc_html__( 'Default', 'wpglobus' ) );
|
101 |
-
|
102 |
-
parent::__construct( $manager, $id, $args );
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
public function render_content() {
|
107 |
-
|
108 |
-
?>
|
109 |
-
|
110 |
-
<label>
|
111 |
-
<?php if ( ! empty( $this->title ) ) : ?>
|
112 |
-
<span class="customize-control-title"><?php echo esc_html( $this->title ); ?></span>
|
113 |
-
<?php endif; ?>
|
114 |
-
<div style="display:flex;">
|
115 |
-
<div style="flex:1">
|
116 |
-
<input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> />
|
117 |
-
</div>
|
118 |
-
<div style="flex:8">
|
119 |
-
<?php echo esc_html( $this->label ); ?>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
<?php if ( ! empty( $this->description ) ) : ?>
|
123 |
-
<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
|
124 |
-
<?php endif; ?>
|
125 |
-
</label> <?php
|
126 |
-
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Adds link support to the theme customizer.
|
132 |
-
*
|
133 |
-
* @see wp-includes\class-wp-customize-control.php
|
134 |
-
*/
|
135 |
-
class WPGlobusLink extends WP_Customize_Control {
|
136 |
-
|
137 |
-
public $type = 'wpglobus_link';
|
138 |
-
|
139 |
-
public $args = array();
|
140 |
-
|
141 |
-
public function __construct( $manager, $id, $args = array() ) {
|
142 |
-
|
143 |
-
$this->args = $args;
|
144 |
-
|
145 |
-
$this->statuses = array( '' => esc_html__( 'Default', 'wpglobus' ) );
|
146 |
-
|
147 |
-
parent::__construct( $manager, $id, $args );
|
148 |
-
|
149 |
-
}
|
150 |
-
|
151 |
-
public function render_content() {
|
152 |
-
|
153 |
-
?>
|
154 |
-
|
155 |
-
<label>
|
156 |
-
<?php if ( ! empty( $this->args['title'] ) ) : ?>
|
157 |
-
<span class="customize-control-title"><?php echo esc_html( $this->args['title'] ); ?></span>
|
158 |
-
<?php endif; ?>
|
159 |
-
<a href="<?php echo $this->args['href']; // WPCS: XSS ok. ?>" target="_blank"><?php echo $this->args['text']; // WPCS: XSS ok. ?></a>
|
160 |
-
<?php if ( ! empty( $this->description ) ) : ?>
|
161 |
-
<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
|
162 |
-
<?php endif; ?>
|
163 |
-
</label> <?php
|
164 |
-
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Adds CheckBoxSet support to the theme customizer.
|
170 |
-
*
|
171 |
-
* @see wp-includes\class-wp-customize-control.php
|
172 |
-
*/
|
173 |
-
class WPGlobusCheckBoxSet extends WP_Customize_Control {
|
174 |
-
|
175 |
-
public $type = 'checkbox_set';
|
176 |
-
|
177 |
-
public $skeleton = '';
|
178 |
-
|
179 |
-
public $args = array();
|
180 |
-
|
181 |
-
public function __construct( $manager, $id, $args = array() ) {
|
182 |
-
$this->args = $args;
|
183 |
-
$this->statuses = array( '' => esc_html__( 'Default', 'wpglobus' ) );
|
184 |
-
|
185 |
-
$this->skeleton =
|
186 |
-
'<a href="{{edit-link}}" target="_blank"><span style="cursor:pointer;">Edit</span></a> ' .
|
187 |
-
'<img style="cursor:move;" {{flag}} /> ' .
|
188 |
-
'<input name="wpglobus_item_{{name}}" id="wpglobus_item_{{id}}" type="checkbox" checked="{{checked}}" ' .
|
189 |
-
' class="{{class}}" ' .
|
190 |
-
' data-order="{{order}}" data-language="{{language}}" disabled="{{disabled}}" />' .
|
191 |
-
'<span style="cursor:move;">{{item}}</span>';
|
192 |
-
|
193 |
-
parent::__construct( $manager, $id, $args );
|
194 |
-
|
195 |
-
}
|
196 |
-
|
197 |
-
public function render_content() { ?>
|
198 |
-
|
199 |
-
<label>
|
200 |
-
<?php if ( ! empty( $this->label ) ) : ?>
|
201 |
-
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
|
202 |
-
<?php endif;
|
203 |
-
if ( ! empty( $this->description ) ) : ?>
|
204 |
-
<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
|
205 |
-
<?php endif;
|
206 |
-
|
207 |
-
$new_item = str_replace( '{{class}}', 'wpglobus-checkbox ' . $this->args['checkbox_class'], $this->skeleton );
|
208 |
-
echo '<div style="display:none;" id="wpglobus-item-skeleton">' . $new_item . '</div>'; // WPCS: XSS ok.
|
209 |
-
|
210 |
-
echo '<ul id="wpglobus-sortable" style="margin-top:10px;margin-left:20px;">';
|
211 |
-
|
212 |
-
foreach ( $this->args['items'] as $order => $item ) {
|
213 |
-
|
214 |
-
$disabled = $order == 0 ? ' disabled="disabled" ' : '';
|
215 |
-
|
216 |
-
$li_item = str_replace(
|
217 |
-
'{{flag}}',
|
218 |
-
'src="' . WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $item ] . '"',
|
219 |
-
$this->skeleton
|
220 |
-
);
|
221 |
-
$li_item = str_replace( '{{name}}', $item, $li_item );
|
222 |
-
$li_item = str_replace( '{{id}}', $item, $li_item );
|
223 |
-
$li_item = str_replace( 'checked="{{checked}}"', 'checked="checked"', $li_item );
|
224 |
-
$li_item = str_replace( 'disabled="{{disabled}}"', $disabled, $li_item );
|
225 |
-
$li_item = str_replace( '{{class}}', 'wpglobus-checkbox ' . $this->args['checkbox_class'], $li_item );
|
226 |
-
$li_item = str_replace( '{{item}}', WPGlobus::Config()->en_language_name[ $item ] . ' (' . $item . ')', $li_item );
|
227 |
-
$li_item = str_replace( '{{order}}', $order, $li_item );
|
228 |
-
$li_item = str_replace( '{{language}}', $item, $li_item );
|
229 |
-
$li_item = str_replace(
|
230 |
-
'{{edit-link}}',
|
231 |
-
admin_url() . 'admin.php?page=' . WPGlobus::LANGUAGE_EDIT_PAGE . '&action=edit&lang=' . $item . '"', $li_item
|
232 |
-
);
|
233 |
-
|
234 |
-
echo '<li>' . $li_item . '</li>'; // WPCS: XSS ok.
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
-
echo '</ul>'; ?>
|
239 |
-
|
240 |
-
</label> <hr /> <?php
|
241 |
-
|
242 |
-
}
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* Adds Fields Settings Control support to the theme customizer.
|
248 |
-
*
|
249 |
-
* @see wp-includes\class-wp-customize-control.php
|
250 |
-
*/
|
251 |
-
class WPGlobusFieldsSettingsControl extends WP_Customize_Control {
|
252 |
-
|
253 |
-
public $type = 'wpglobus_fields_settings_control';
|
254 |
-
|
255 |
-
public $args = array();
|
256 |
-
|
257 |
-
public $section_template = '';
|
258 |
-
|
259 |
-
public function __construct( $manager, $id, $args = array() ) {
|
260 |
-
|
261 |
-
$this->args = $args;
|
262 |
-
|
263 |
-
$this->section_template = "<div id='wpglobus-settings-{{section}}' style='border-bottom:1px solid black;margin-bottom:5px;padding:5px;' class='items-box' data-section='{{section}}'>";
|
264 |
-
$this->section_template .= esc_html__( 'Section', 'wpglobus' ) . ": <a href='#' onclick='wp.customize.section({{section_id}}).expand();'><b>{{section_title}}</b></a>";
|
265 |
-
$this->section_template .= "<div class='items' style='padding-top:10px;'>{{items}}</div>";
|
266 |
-
$this->section_template .= "</div>";
|
267 |
-
|
268 |
-
parent::__construct( $manager, $id, $args );
|
269 |
-
|
270 |
-
}
|
271 |
-
|
272 |
-
public function render_content() {
|
273 |
-
?>
|
274 |
-
<div class="wpglobus-fields_settings_control_box" data-section-template="<?php echo $this->section_template; // WPCS: XSS ok. ?>">
|
275 |
-
<?php if ( $this->args['start_section'] ) : ?>
|
276 |
-
<div style="border-bottom:1px solid black;margin: 0 0 5px;padding-left:5px;">
|
277 |
-
<a href="#" onclick="jQuery('.wpglobus-fields_settings_control_box .items-box' ).css('display','block');"><b><?php esc_html_e( 'Show all sections', 'wpglobus' ); ?></b></a>
|
278 |
-
</div>
|
279 |
-
<input type="submit" style="float:right;" name="<?php echo WPGlobus_Customize_Options::$controls_save_button; // WPCS: XSS ok. ?>" id="<?php echo WPGlobus_Customize_Options::$controls_save_button; // WPCS: XSS ok. ?>" class="button button-primary save" value="<?php esc_html_e( 'Save & Reload', 'wpglobus' ); ?>">
|
280 |
-
<?php else: ?>
|
281 |
-
<div>
|
282 |
-
<?php if ( ! empty( $this->args['message'] ) ) {
|
283 |
-
echo $this->args['message']; // WPCS: XSS ok.
|
284 |
-
} ?>
|
285 |
-
</div>
|
286 |
-
<?php endif; ?>
|
287 |
-
</div> <!-- .wpglobus-fields_settings_control_box --> <?php
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Class WPGlobus_Customize_Options
|
293 |
-
*/
|
294 |
-
class WPGlobus_Customize_Options {
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Array of sections
|
298 |
-
*/
|
299 |
-
public static $sections = array();
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Array of settings
|
303 |
-
*/
|
304 |
-
public static $settings = array();
|
305 |
-
|
306 |
-
/**
|
307 |
-
* Set transient key
|
308 |
-
*/
|
309 |
-
public static $enabled_post_types_key = 'wpglobus_customize_enabled_post_types';
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Set option key for customizer
|
313 |
-
*/
|
314 |
-
public static $options_key = 'wpglobus_customize_options';
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Save button ID
|
318 |
-
*/
|
319 |
-
public static $controls_save_button = 'wpglobus-user-controls-save';
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Current theme.
|
323 |
-
*
|
324 |
-
* @var WP_Theme
|
325 |
-
*/
|
326 |
-
public static $theme;
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Current theme name.
|
330 |
-
*
|
331 |
-
* @var string
|
332 |
-
*/
|
333 |
-
public static $theme_name = '';
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Array of disabled themes.
|
337 |
-
* @var string[]
|
338 |
-
*/
|
339 |
-
public static $disabled_themes = array();
|
340 |
-
|
341 |
-
public static function controller() {
|
342 |
-
|
343 |
-
self::$theme = wp_get_theme();
|
344 |
-
self::$theme_name = self::get_theme( 'name' );
|
345 |
-
|
346 |
-
self::$disabled_themes = array(
|
347 |
-
'customizr',
|
348 |
-
'customizr pro'
|
349 |
-
);
|
350 |
-
|
351 |
-
/**
|
352 |
-
* @since 1.7.7
|
353 |
-
* Don't standard loading of the option 'theme_mods_experon'. Theme uses redux.
|
354 |
-
* Don't standard behavior in customizer.
|
355 |
-
* @see https://wordpress.org/themes/experon/
|
356 |
-
*/
|
357 |
-
self::$disabled_themes[] = 'experon';
|
358 |
-
|
359 |
-
/**
|
360 |
-
* @since 2.3.12
|
361 |
-
* Don't standard behavior with links in Appearance section (requires installing an additional module).
|
362 |
-
* @see https://gwangi-theme.com/
|
363 |
-
*/
|
364 |
-
self::$disabled_themes[] = 'gwangi';
|
365 |
-
|
366 |
-
add_action( 'wp_loaded', array( __CLASS__, 'init' ) );
|
367 |
-
|
368 |
-
/**
|
369 |
-
* @see \WP_Customize_Manager::wp_loaded
|
370 |
-
* It calls the `customize_register` action first,
|
371 |
-
* and then - the `customize_preview_init` action
|
372 |
-
*/
|
373 |
-
add_action( 'customize_register', array(
|
374 |
-
'WPGlobus_Customize_Options',
|
375 |
-
'action__customize_register'
|
376 |
-
) );
|
377 |
-
|
378 |
-
/**
|
379 |
-
* @since 1.6.0
|
380 |
-
*/
|
381 |
-
add_action( 'customize_register', array(
|
382 |
-
'WPGlobus_Customize_Options',
|
383 |
-
'action__customize_fields_settings'
|
384 |
-
) );
|
385 |
-
|
386 |
-
add_action( 'customize_preview_init', array(
|
387 |
-
'WPGlobus_Customize_Options',
|
388 |
-
'action__customize_preview_init'
|
389 |
-
), 11 );
|
390 |
-
|
391 |
-
/**
|
392 |
-
* This is called by wp-admin/customize.php
|
393 |
-
*/
|
394 |
-
|
395 |
-
add_action( 'customize_controls_enqueue_scripts', array(
|
396 |
-
'WPGlobus_Customize_Options',
|
397 |
-
'action__customize_controls_enqueue_scripts'
|
398 |
-
), 1010 );
|
399 |
-
|
400 |
-
add_action( 'wp_ajax_' . __CLASS__ . '_process_ajax', array(
|
401 |
-
'WPGlobus_Customize_Options',
|
402 |
-
'action__process_ajax'
|
403 |
-
) );
|
404 |
-
|
405 |
-
/**
|
406 |
-
* @since 1.9.8
|
407 |
-
*/
|
408 |
-
add_filter( 'wpglobus_customize_disabled_setting_mask', array(
|
409 |
-
__CLASS__,
|
410 |
-
'filter__disabled_setting_mask'
|
411 |
-
) );
|
412 |
-
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Delayed processes.
|
417 |
-
* @since 1.6.0
|
418 |
-
*/
|
419 |
-
public static function init() {
|
420 |
-
|
421 |
-
/**
|
422 |
-
* Hook to modify the `$disabled_themes` array.
|
423 |
-
*
|
424 |
-
* @param string[] self ::$disabled_themes
|
425 |
-
* Enter the lowercase theme name (not slug, no dashes).
|
426 |
-
* For example, to disable the "Parallax One" theme,
|
427 |
-
* enter 'parallax one'.
|
428 |
-
*
|
429 |
-
* @see second param.
|
430 |
-
*
|
431 |
-
* @param string self::$theme_name Name of current theme.
|
432 |
-
* @param WP_Theme Object self::$theme Current theme.
|
433 |
-
*/
|
434 |
-
self::$disabled_themes = apply_filters( 'wpglobus_customizer_disabled_themes', self::$disabled_themes, self::$theme_name, self::$theme );
|
435 |
-
}
|
436 |
-
|
437 |
-
/**
|
438 |
-
* Ajax handler.
|
439 |
-
*/
|
440 |
-
public static function action__process_ajax() {
|
441 |
-
|
442 |
-
$result = true;
|
443 |
-
$ajax_return = array();
|
444 |
-
|
445 |
-
$post_order = isset( $_POST['order'] ) ? $_POST['order'] : null; // WPCS: input var ok, sanitization ok.
|
446 |
-
|
447 |
-
$order = array();
|
448 |
-
if ( $post_order ) {
|
449 |
-
$order['action'] = sanitize_text_field( $post_order['action'] );
|
450 |
-
$order['options'] = isset($post_order['options']) ? $post_order['options'] : array();
|
451 |
-
$order['controls'] = isset($post_order['controls']) ? $post_order['controls'] : array();
|
452 |
-
}
|
453 |
-
|
454 |
-
switch ( $order['action'] ) {
|
455 |
-
case 'wpglobus_customize_save':
|
456 |
-
/**
|
457 |
-
* Options array.
|
458 |
-
*
|
459 |
-
* @var array
|
460 |
-
*/
|
461 |
-
$options = get_option( WPGlobus::Config()->option );
|
462 |
-
|
463 |
-
foreach ( $order['options'] as $key => $value ) {
|
464 |
-
|
465 |
-
switch ( $key ) :
|
466 |
-
case 'show_selector':
|
467 |
-
$options['selector_wp_list_pages'][ $key ] = $value;
|
468 |
-
break;
|
469 |
-
case 'redirect_by_language':
|
470 |
-
// @todo check this option which do we really need?
|
471 |
-
$options['browser_redirect'][ $key ] = $value;
|
472 |
-
$options[ $key ] = $value;
|
473 |
-
break;
|
474 |
-
case 'use_nav_menu':
|
475 |
-
if ( '0' == $value ) {
|
476 |
-
$value = '';
|
477 |
-
} else {
|
478 |
-
$value = sanitize_text_field( $value );
|
479 |
-
}
|
480 |
-
$options[ $key ] = $value;
|
481 |
-
break;
|
482 |
-
case 'js_editor':
|
483 |
-
$value = trim($value);
|
484 |
-
if ( ! empty( $value ) ) {
|
485 |
-
$value = str_replace( '\"', '"', $value );
|
486 |
-
$value = str_replace( "\'", "'", $value );
|
487 |
-
$value = esc_html( $value );
|
488 |
-
}
|
489 |
-
$options[ $key ] = $value;
|
490 |
-
break;
|
491 |
-
default:
|
492 |
-
$options[ $key ] = $value;
|
493 |
-
endswitch;
|
494 |
-
|
495 |
-
}
|
496 |
-
|
497 |
-
update_option( WPGlobus::Config()->option, $options );
|
498 |
-
break;
|
499 |
-
|
500 |
-
case 'cb-controls-save':
|
501 |
-
$options = get_option( self::$options_key );
|
502 |
-
|
503 |
-
if ( empty( $order['controls'] ) ) {
|
504 |
-
if ( ! empty( $options['customize_user_control'][ self::$theme_name ] ) ) {
|
505 |
-
unset( $options['customize_user_control'][ self::$theme_name ] );
|
506 |
-
}
|
507 |
-
} else {
|
508 |
-
|
509 |
-
$cntrls = array();
|
510 |
-
foreach ( $order['controls'] as $cntr => $status ) {
|
511 |
-
$cntr = str_replace( '{{', '[', $cntr );
|
512 |
-
$cntr = str_replace( '}}', ']', $cntr );
|
513 |
-
|
514 |
-
$cntrls[ $cntr ] = $status;
|
515 |
-
}
|
516 |
-
|
517 |
-
$options['customize_user_control'][ self::$theme_name ] = $cntrls;
|
518 |
-
}
|
519 |
-
|
520 |
-
if ( empty( $options['customize_user_control'] ) ) {
|
521 |
-
unset( $options['customize_user_control'] );
|
522 |
-
}
|
523 |
-
|
524 |
-
if ( empty( $options ) ) {
|
525 |
-
delete_option( self::$options_key );
|
526 |
-
} else {
|
527 |
-
$result = update_option( self::$options_key, $options, false );
|
528 |
-
|
529 |
-
}
|
530 |
-
|
531 |
-
break;
|
532 |
-
}
|
533 |
-
|
534 |
-
if ( false === $result ) {
|
535 |
-
wp_send_json_error( $ajax_return );
|
536 |
-
}
|
537 |
-
|
538 |
-
wp_send_json_success( $ajax_return );
|
539 |
-
}
|
540 |
-
|
541 |
-
/**
|
542 |
-
* Section for message about unsupported theme.
|
543 |
-
*
|
544 |
-
* @param WP_Customize_Manager $wp_customize
|
545 |
-
* @param WP_Theme $theme
|
546 |
-
*/
|
547 |
-
public static function sorry_section( $wp_customize, $theme ) {
|
548 |
-
|
549 |
-
/**
|
550 |
-
* Sorry section
|
551 |
-
*/
|
552 |
-
$wp_customize->add_section( 'wpglobus_sorry_section', array(
|
553 |
-
'title' => esc_html__( 'WPGlobus', 'wpglobus' ),
|
554 |
-
'priority' => 0,
|
555 |
-
'panel' => 'wpglobus_settings_panel'
|
556 |
-
) );
|
557 |
-
|
558 |
-
$wp_customize->add_setting( 'sorry_message', array(
|
559 |
-
'type' => 'option',
|
560 |
-
'capability' => 'manage_options',
|
561 |
-
'transport' => 'postMessage'
|
562 |
-
) );
|
563 |
-
$wp_customize->add_control( new WPGlobusTextBox( $wp_customize,
|
564 |
-
'sorry_message', array(
|
565 |
-
'section' => 'wpglobus_sorry_section',
|
566 |
-
'settings' => 'sorry_message',
|
567 |
-
'priority' => 0,
|
568 |
-
'content' => self::get_content( 'sorry_message', $theme )
|
569 |
-
|
570 |
-
)
|
571 |
-
) );
|
572 |
-
|
573 |
-
}
|
574 |
-
|
575 |
-
/**
|
576 |
-
* Callback for register fields settings section.
|
577 |
-
*
|
578 |
-
* @since 1.6.0
|
579 |
-
*
|
580 |
-
* @param WP_Customize_Manager $wp_customize
|
581 |
-
*/
|
582 |
-
public static function action__customize_fields_settings( WP_Customize_Manager $wp_customize ) {
|
583 |
-
|
584 |
-
if ( ! self::is_theme_enabled() ) {
|
585 |
-
return;
|
586 |
-
}
|
587 |
-
|
588 |
-
/**
|
589 |
-
* SECTION: fields settings
|
590 |
-
*/
|
591 |
-
if ( 1 ) {
|
592 |
-
|
593 |
-
/**
|
594 |
-
* @since WP 4.5
|
595 |
-
* @see https://make.wordpress.org/core/2016/03/10/customizer-improvements-in-4-5/
|
596 |
-
*/
|
597 |
-
|
598 |
-
global $wp_version;
|
599 |
-
|
600 |
-
$start_section = true;
|
601 |
-
$message = '';
|
602 |
-
if ( version_compare( $wp_version, '4.5-RC1', '<' ) ) :
|
603 |
-
$start_section = false;
|
604 |
-
$message = esc_html__( 'You need to update WordPress to 4.5 or later to get Fields Settings section', 'wpglobus' );
|
605 |
-
endif;
|
606 |
-
|
607 |
-
self::$sections['wpglobus_fields_settings_section'] = 'wpglobus_fields_settings_section';
|
608 |
-
|
609 |
-
$wp_customize->add_section( self::$sections['wpglobus_fields_settings_section'], array(
|
610 |
-
'title' => esc_html__( 'Fields Settings', 'wpglobus' ),
|
611 |
-
'priority' => 500,
|
612 |
-
'panel' => 'wpglobus_settings_panel',
|
613 |
-
'description' => '<div class="inner" style="background-color:#fff;padding:0 5px;">' .
|
614 |
-
self::get_content( 'settings_section_help' ) .
|
615 |
-
'</div>'
|
616 |
-
) );
|
617 |
-
|
618 |
-
/** setting */
|
619 |
-
$wp_customize->add_setting( 'wpglobus_fields_settings_setting', array(
|
620 |
-
'type' => 'option',
|
621 |
-
'capability' => 'manage_options',
|
622 |
-
'transport' => 'postMessage'
|
623 |
-
) );
|
624 |
-
|
625 |
-
/** control */
|
626 |
-
$wp_customize->add_control( new WPGlobusFieldsSettingsControl( $wp_customize,
|
627 |
-
self::$sections['wpglobus_fields_settings_section'], array(
|
628 |
-
'section' => self::$sections['wpglobus_fields_settings_section'],
|
629 |
-
'settings' => 'wpglobus_fields_settings_setting',
|
630 |
-
'priority' => 0,
|
631 |
-
'start_section' => $start_section,
|
632 |
-
'message' => $message
|
633 |
-
|
634 |
-
)
|
635 |
-
) );
|
636 |
-
|
637 |
-
}
|
638 |
-
|
639 |
-
}
|
640 |
-
|
641 |
-
/**
|
642 |
-
* Callback for customize_register.
|
643 |
-
*
|
644 |
-
* @param WP_Customize_Manager $wp_customize
|
645 |
-
*/
|
646 |
-
public static function action__customize_register( WP_Customize_Manager $wp_customize ) {
|
647 |
-
|
648 |
-
/**
|
649 |
-
* WPGlobus panel
|
650 |
-
*/
|
651 |
-
$wp_customize->add_panel( 'wpglobus_settings_panel', array(
|
652 |
-
'priority' => 1010,
|
653 |
-
'capability' => 'edit_theme_options',
|
654 |
-
'theme_supports' => '',
|
655 |
-
'title' => esc_html__( 'WPGlobus Settings', 'wpglobus' ),
|
656 |
-
'description' => '<div style="background-color:#eee;padding:10px 5px;">' .
|
657 |
-
self::get_content( 'welcome_message' ) .
|
658 |
-
'</div>' . self::get_content( 'deactivate_message' ),
|
659 |
-
) );
|
660 |
-
|
661 |
-
if ( ! self::is_theme_enabled() ) {
|
662 |
-
|
663 |
-
self::sorry_section( $wp_customize, self::$theme );
|
664 |
-
|
665 |
-
return;
|
666 |
-
|
667 |
-
}
|
668 |
-
|
669 |
-
/**
|
670 |
-
* Updating options for customizer accordingly with WPGlobus::Config().
|
671 |
-
*/
|
672 |
-
/** wpglobus_customize_language_selector_mode <=> wpglobus_option[show_flag_name] */
|
673 |
-
update_option( 'wpglobus_customize_language_selector_mode', WPGlobus::Config()->show_flag_name );
|
674 |
-
|
675 |
-
/** */
|
676 |
-
if ( empty( WPGlobus::Config()->nav_menu ) ) {
|
677 |
-
/**
|
678 |
-
* Menu item '--- select navigation menu ---' has value 0.
|
679 |
-
* It is used when 'Language Selector Menu' setting is not selected.
|
680 |
-
*/
|
681 |
-
update_option( 'wpglobus_customize_language_selector_menu', '0' );
|
682 |
-
} else {
|
683 |
-
update_option( 'wpglobus_customize_language_selector_menu', WPGlobus::Config()->nav_menu );
|
684 |
-
}
|
685 |
-
|
686 |
-
/** wpglobus_customize_selector_wp_list_pages <=> wpglobus_option[selector_wp_list_pages][show_selector] */
|
687 |
-
update_option( 'wpglobus_customize_selector_wp_list_pages', WPGlobus::Config()->selector_wp_list_pages );
|
688 |
-
|
689 |
-
/** wpglobus_customize_css_editor <=> wpglobus_option[css_editor] */
|
690 |
-
update_option( 'wpglobus_customize_css_editor', WPGlobus::Config()->css_editor );
|
691 |
-
|
692 |
-
/** wpglobus_customize_redirect_by_language <=> wpglobus_option[browser_redirect][redirect_by_language] */
|
693 |
-
if ( empty( WPGlobus::Config()->browser_redirect['redirect_by_language'] ) || (int) WPGlobus::Config()->browser_redirect['redirect_by_language'] == 0 ) {
|
694 |
-
update_option( 'wpglobus_customize_redirect_by_language', '' );
|
695 |
-
} else {
|
696 |
-
update_option( 'wpglobus_customize_redirect_by_language', WPGlobus::Config()->browser_redirect['redirect_by_language'] );
|
697 |
-
}
|
698 |
-
|
699 |
-
/** wpglobus_customize_js_editor <=> wpglobus_option[js_editor] */
|
700 |
-
if ( empty( WPGlobus::Config()->js_editor ) ) {
|
701 |
-
update_option( 'wpglobus_customize_js_editor', '' );
|
702 |
-
} else {
|
703 |
-
update_option( 'wpglobus_customize_js_editor', WPGlobus::Config()->js_editor );
|
704 |
-
}
|
705 |
-
|
706 |
-
|
707 |
-
/** end updating options */
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Init section priority.
|
711 |
-
*/
|
712 |
-
$section_priority = 0;
|
713 |
-
|
714 |
-
/**
|
715 |
-
* SECTION: Help.
|
716 |
-
*/
|
717 |
-
if ( 0 ) {
|
718 |
-
|
719 |
-
$section_priority = $section_priority + 0;
|
720 |
-
|
721 |
-
self::$sections['wpglobus_help_section'] = 'wpglobus_help_section';
|
722 |
-
$wp_customize->add_section( self::$sections['wpglobus_help_section'], array(
|
723 |
-
'title' => esc_html__( 'Help', 'wpglobus' ),
|
724 |
-
'priority' => $section_priority,
|
725 |
-
'panel' => 'wpglobus_settings_panel',
|
726 |
-
) );
|
727 |
-
|
728 |
-
$wp_customize->add_control( 'wpglobus_customize_add_onsZZZ', array(
|
729 |
-
'section' => self::$sections['wpglobus_help_section'],
|
730 |
-
'settings' => array(),
|
731 |
-
'type' => 'button',
|
732 |
-
)
|
733 |
-
);
|
734 |
-
}
|
735 |
-
/** end SECTION: Help */
|
736 |
-
|
737 |
-
/**
|
738 |
-
* SECTION: Language.
|
739 |
-
*/
|
740 |
-
if ( 1 ) {
|
741 |
-
|
742 |
-
$section_priority = $section_priority + 10;
|
743 |
-
|
744 |
-
$wp_customize->add_section( 'wpglobus_languages_section', array(
|
745 |
-
'title' => esc_html__( 'Languages', 'wpglobus' ),
|
746 |
-
'priority' => $section_priority,
|
747 |
-
'panel' => 'wpglobus_settings_panel'
|
748 |
-
) );
|
749 |
-
self::$sections['wpglobus_languages_section'] = 'wpglobus_languages_section';
|
750 |
-
|
751 |
-
/**
|
752 |
-
* Setting: Enabled languages.
|
753 |
-
*/
|
754 |
-
$wp_customize->add_setting( 'wpglobus_customize_enabled_languages', array(
|
755 |
-
'type' => 'option',
|
756 |
-
'capability' => 'manage_options',
|
757 |
-
'transport' => 'postMessage'
|
758 |
-
) );
|
759 |
-
$wp_customize->add_control( new WPGlobusCheckBoxSet( $wp_customize,
|
760 |
-
'wpglobus_customize_enabled_languages', array(
|
761 |
-
'section' => 'wpglobus_languages_section',
|
762 |
-
'settings' => 'wpglobus_customize_enabled_languages',
|
763 |
-
'priority' => 0,
|
764 |
-
'items' => WPGlobus::Config()->enabled_languages,
|
765 |
-
'label' => esc_html__( 'Enabled Languages', 'wpglobus' ),
|
766 |
-
'checkbox_class' => 'wpglobus-listen-change wpglobus-language-item',
|
767 |
-
'description' => esc_html__( 'These languages are currently enabled on your site.', 'wpglobus' )
|
768 |
-
|
769 |
-
)
|
770 |
-
) );
|
771 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_enabled_languages']['type'] = 'checkbox_set';
|
772 |
-
/** @see option wpglobus_option['enabled_languages'] */
|
773 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_enabled_languages']['option'] = 'enabled_languages';
|
774 |
-
|
775 |
-
/**
|
776 |
-
* Setting: Add languages.
|
777 |
-
*/
|
778 |
-
/** Generate array $more_languages */
|
779 |
-
/** @var array $more_languages */
|
780 |
-
$more_languages = array();
|
781 |
-
$more_languages['select'] = '---- select ----';
|
782 |
-
|
783 |
-
foreach ( WPGlobus::Config()->flag as $code => $file ) {
|
784 |
-
if ( ! in_array( $code, WPGlobus::Config()->enabled_languages ) ) {
|
785 |
-
$lang_in_en = '';
|
786 |
-
if ( ! empty( WPGlobus::Config()->en_language_name[ $code ] ) ) {
|
787 |
-
$lang_in_en = ' (' . WPGlobus::Config()->en_language_name[ $code ] . ')';
|
788 |
-
}
|
789 |
-
// '<img src="' . WPGlobus::Config()->flags_url . $file . '" />'
|
790 |
-
$more_languages[ $code ] = WPGlobus::Config()->language_name[ $code ] . $lang_in_en;
|
791 |
-
}
|
792 |
-
}
|
793 |
-
|
794 |
-
$desc_add_languages =
|
795 |
-
esc_html__( 'Choose a language you would like to enable.', 'wpglobus' ).
|
796 |
-
'<br />'.
|
797 |
-
esc_html__( 'Press the [Save & Publish] button to confirm.', 'wpglobus' ).
|
798 |
-
'<br />';
|
799 |
-
$desc_add_languages .= sprintf(
|
800 |
-
// translators: %1$s and %2$s - placeholders to insert HTML link around 'here'
|
801 |
-
esc_html__( 'or Add new Language %1$s here %2$s', 'wpglobus' ),
|
802 |
-
'<a style="text-decoration:underline;" href="' . admin_url() . 'admin.php?page=' . WPGlobus::LANGUAGE_EDIT_PAGE . '&action=add" target="_blank">',
|
803 |
-
'</a>'
|
804 |
-
);
|
805 |
-
|
806 |
-
$wp_customize->add_setting( 'wpglobus_customize_add_language', array(
|
807 |
-
'type' => 'option',
|
808 |
-
'capability' => 'manage_options',
|
809 |
-
'transport' => 'postMessage'
|
810 |
-
) );
|
811 |
-
$wp_customize->add_control( 'wpglobus_add_languages_select_box', array(
|
812 |
-
'settings' => 'wpglobus_customize_add_language',
|
813 |
-
'label' => esc_html__( 'Add Languages', 'wpglobus' ),
|
814 |
-
'section' => 'wpglobus_languages_section',
|
815 |
-
'type' => 'select',
|
816 |
-
'priority' => 10,
|
817 |
-
'choices' => $more_languages,
|
818 |
-
'description' => $desc_add_languages
|
819 |
-
) );
|
820 |
-
//self::$settings[ 'wpglobus_languages_section' ][ 'wpglobus_customize_add_language' ] = 'select';
|
821 |
-
|
822 |
-
/**
|
823 |
-
* Setting: Language Selector Mode.
|
824 |
-
*/
|
825 |
-
$wp_customize->add_setting( 'wpglobus_customize_language_selector_mode', array(
|
826 |
-
'type' => 'option',
|
827 |
-
'capability' => 'manage_options',
|
828 |
-
'transport' => 'refresh'
|
829 |
-
#'transport' => 'postMessage'
|
830 |
-
) );
|
831 |
-
$wp_customize->add_control( 'wpglobus_customize_language_selector_mode', array(
|
832 |
-
'settings' => 'wpglobus_customize_language_selector_mode',
|
833 |
-
'label' => esc_html__( 'Language Selector Mode', 'wpglobus' ),
|
834 |
-
'section' => 'wpglobus_languages_section',
|
835 |
-
'type' => 'select',
|
836 |
-
'priority' => 20,
|
837 |
-
'choices' => array(
|
838 |
-
'code' => esc_html__( 'Two-letter Code with flag (en, ru, it, etc.)', 'wpglobus' ),
|
839 |
-
'full_name' => esc_html__( 'Full Name (English, Russian, Italian, etc.)', 'wpglobus' ),
|
840 |
-
/* @since 1.2.1 */
|
841 |
-
'name' => esc_html__( 'Full Name with flag (English, Russian, Italian, etc.)', 'wpglobus' ),
|
842 |
-
'empty' => esc_html__( 'Flags only', 'wpglobus' )
|
843 |
-
),
|
844 |
-
'description' => esc_html__( 'Choose the way language name and country flag are shown in the drop-down menu', 'wpglobus' )
|
845 |
-
) );
|
846 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_mode']['type'] = 'select';
|
847 |
-
/** @see option wpglobus_option['show_flag_name'] */
|
848 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_mode']['option'] = 'show_flag_name';
|
849 |
-
|
850 |
-
/**
|
851 |
-
* @see https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/
|
852 |
-
* @see https://make.wordpress.org/core/2016/03/10/customizer-improvements-in-4-5/
|
853 |
-
*
|
854 |
-
* $wp_customize->selective_refresh->add_partial( 'wpglobus_customize_language_selector_mode', array(
|
855 |
-
* 'selector' => '#site-navigation',
|
856 |
-
* 'render_callback' => function() {
|
857 |
-
* wp_nav_menu();
|
858 |
-
* },
|
859 |
-
* ) );
|
860 |
-
* // */
|
861 |
-
|
862 |
-
/**
|
863 |
-
* Setting: Language Selector Menu.
|
864 |
-
*/
|
865 |
-
/** @var array $nav_menus */
|
866 |
-
$nav_menus = WPGlobus::_get_nav_menus();
|
867 |
-
|
868 |
-
$menus = array();
|
869 |
-
|
870 |
-
foreach ( $nav_menus as $menu ) {
|
871 |
-
$menus[ $menu->slug ] = $menu->name;
|
872 |
-
}
|
873 |
-
if ( ! empty( $nav_menus ) && count( $nav_menus ) > 1 ) {
|
874 |
-
$menus['all'] = 'All';
|
875 |
-
}
|
876 |
-
if ( ! empty( $nav_menus ) ) {
|
877 |
-
array_unshift(
|
878 |
-
$menus,
|
879 |
-
'--- ' . esc_html__('select navigation menu', 'wpglobus'). ' ---'
|
880 |
-
);
|
881 |
-
}
|
882 |
-
|
883 |
-
if ( empty( $menus ) ) {
|
884 |
-
|
885 |
-
$wp_customize->add_control( new WPGlobusLink( $wp_customize,
|
886 |
-
'wpglobus_customize_language_selector_menu', array(
|
887 |
-
'section' => 'wpglobus_languages_section',
|
888 |
-
'title' => esc_html__( 'Language Selector Menu', 'wpglobus' ),
|
889 |
-
'settings' => array(),
|
890 |
-
'priority' => 30,
|
891 |
-
'type' => 'wpglobus_link',
|
892 |
-
/**
|
893 |
-
* We are in Customizer, so we can "focus" to the menus and not go to menus in admin.
|
894 |
-
* The JS code and the message below are copied from
|
895 |
-
* @see WP_Nav_Menu_Widget::form
|
896 |
-
*/
|
897 |
-
'href' => esc_attr( 'javascript: wp.customize.panel( "nav_menus" ).focus();' ),
|
898 |
-
'text' => esc_html__( 'No menus have been created yet. Create some.', 'wpglobus' ),
|
899 |
-
'description' => esc_html__( 'Choose the navigation menu where the language selector will be shown', 'wpglobus' ),
|
900 |
-
)
|
901 |
-
) );
|
902 |
-
|
903 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_menu']['type'] = 'wpglobus_link';
|
904 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_menu']['option'] = array();
|
905 |
-
|
906 |
-
} else {
|
907 |
-
|
908 |
-
$wp_customize->add_setting( 'wpglobus_customize_language_selector_menu', array(
|
909 |
-
'type' => 'option',
|
910 |
-
'capability' => 'manage_options',
|
911 |
-
'transport' => 'postMessage'
|
912 |
-
) );
|
913 |
-
$wp_customize->add_control( 'wpglobus_customize_language_selector_menu', array(
|
914 |
-
'settings' => 'wpglobus_customize_language_selector_menu',
|
915 |
-
'label' => esc_html__( 'Language Selector Menu', 'wpglobus' ),
|
916 |
-
'section' => 'wpglobus_languages_section',
|
917 |
-
'type' => 'select',
|
918 |
-
'priority' => 30,
|
919 |
-
'choices' => $menus,
|
920 |
-
'description' => esc_html__( 'Choose the navigation menu where the language selector will be shown', 'wpglobus' ),
|
921 |
-
) );
|
922 |
-
|
923 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_menu']['type'] = 'select';
|
924 |
-
/** @see option wpglobus_option['use_nav_menu'] */
|
925 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_language_selector_menu']['option'] = 'use_nav_menu';
|
926 |
-
|
927 |
-
}
|
928 |
-
|
929 |
-
/**
|
930 |
-
* Setting: "All Pages" menus Language selector.
|
931 |
-
*/
|
932 |
-
$wp_customize->add_setting( 'wpglobus_customize_selector_wp_list_pages', array(
|
933 |
-
'type' => 'option',
|
934 |
-
'capability' => 'manage_options',
|
935 |
-
'transport' => 'postMessage'
|
936 |
-
) );
|
937 |
-
$wp_customize->add_control( new WPGlobusCheckBox( $wp_customize,
|
938 |
-
'wpglobus_customize_selector_wp_list_pages', array(
|
939 |
-
'settings' => 'wpglobus_customize_selector_wp_list_pages',
|
940 |
-
'title' => esc_html__( '"All Pages" menus Language selector', 'wpglobus' ),
|
941 |
-
'section' => 'wpglobus_languages_section',
|
942 |
-
'priority' => 40,
|
943 |
-
'label' => esc_html__( 'Adds language selector to the menus that automatically list all existing pages (using `wp_list_pages`)', 'wpglobus' ),
|
944 |
-
)
|
945 |
-
) );
|
946 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_selector_wp_list_pages']['type'] = 'wpglobus_checkbox';
|
947 |
-
/** @see option wpglobus_option['selector_wp_list_pages']['show_selector'] */
|
948 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_selector_wp_list_pages']['option'] = 'show_selector';
|
949 |
-
|
950 |
-
/**
|
951 |
-
* Setting: Custom CSS.
|
952 |
-
*/
|
953 |
-
$wp_customize->add_setting( 'wpglobus_customize_css_editor', array(
|
954 |
-
'type' => 'option',
|
955 |
-
'capability' => 'manage_options',
|
956 |
-
'transport' => 'postMessage'
|
957 |
-
) );
|
958 |
-
$wp_customize->add_control( 'wpglobus_customize_css_editor', array(
|
959 |
-
'settings' => 'wpglobus_customize_css_editor',
|
960 |
-
'label' => esc_html__( 'Custom CSS', 'wpglobus' ),
|
961 |
-
'section' => 'wpglobus_languages_section',
|
962 |
-
'type' => 'textarea',
|
963 |
-
'priority' => 50,
|
964 |
-
'description' => esc_html__( 'Here you can enter the CSS rules to adjust the language selector menu for your theme. Look at the examples in the `style-samples.css` file.', 'wpglobus' ),
|
965 |
-
) );
|
966 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_css_editor']['type'] = 'textarea';
|
967 |
-
/** @see option wpglobus_option['css_editor'] */
|
968 |
-
self::$settings['wpglobus_languages_section']['wpglobus_customize_css_editor']['option'] = 'css_editor';
|
969 |
-
|
970 |
-
}
|
971 |
-
/** end SECTION: Language */
|
972 |
-
|
973 |
-
/**
|
974 |
-
* SECTION: Post types.
|
975 |
-
*/
|
976 |
-
if ( 1 ) {
|
977 |
-
|
978 |
-
$section_priority = $section_priority + 10;
|
979 |
-
|
980 |
-
$section = 'wpglobus_post_types_section';
|
981 |
-
|
982 |
-
$wp_customize->add_section( $section, array(
|
983 |
-
'title' => esc_html__( 'Post types', 'wpglobus' ),
|
984 |
-
'priority' => $section_priority,
|
985 |
-
'panel' => 'wpglobus_settings_panel'
|
986 |
-
) );
|
987 |
-
self::$sections[ $section ] = $section;
|
988 |
-
|
989 |
-
if ( false === ( $enabled_post_types = get_transient( self::$enabled_post_types_key ) ) ) {
|
990 |
-
|
991 |
-
$post_types = get_post_types();
|
992 |
-
|
993 |
-
$enabled_post_types = array();
|
994 |
-
|
995 |
-
foreach ( $post_types as $post_type ) {
|
996 |
-
/**
|
997 |
-
* @see "SECTION: Post types" in includes\options\class-wpglobus-options.php for complete post type array.
|
998 |
-
*/
|
999 |
-
if ( ! in_array( $post_type, WPGlobus_Post_Types::hidden_types(), true ) ) {
|
1000 |
-
|
1001 |
-
/**
|
1002 |
-
* Obsolete from 1.9.10.
|
1003 |
-
* @todo Remove after testing.
|
1004 |
-
*/
|
1005 |
-
/**
|
1006 |
-
|
1007 |
-
if ( in_array( $post_type, array( 'post', 'page' ) ) ) {
|
1008 |
-
$enabled_post_types[ $post_type ] = $post_type;
|
1009 |
-
continue;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
foreach ( WPGlobus::O()->vendors_scripts as $script => $status ) {
|
1013 |
-
|
1014 |
-
if ( empty( $status ) ) {
|
1015 |
-
continue;
|
1016 |
-
}
|
1017 |
-
|
1018 |
-
if ( $script == 'ACF' || $script == 'ACFPRO' ) {
|
1019 |
-
if ( in_array( $post_type, array( 'acf-field-group', 'acf-field', 'acf' ) ) ) {
|
1020 |
-
continue 2;
|
1021 |
-
}
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
if ( $script == 'WOOCOMMERCE' ) {
|
1025 |
-
if ( in_array(
|
1026 |
-
$post_type,
|
1027 |
-
array(
|
1028 |
-
'product',
|
1029 |
-
'product_tag',
|
1030 |
-
'product_cat',
|
1031 |
-
'shop_order',
|
1032 |
-
'shop_coupon',
|
1033 |
-
'product_variation',
|
1034 |
-
'shop_order_refund',
|
1035 |
-
'shop_webhook'
|
1036 |
-
)
|
1037 |
-
) ) {
|
1038 |
-
continue 2;
|
1039 |
-
}
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
if ( $script == 'WPCF7' ) {
|
1043 |
-
if ( in_array( $post_type, array( 'wpcf7_contact_form' ) ) ) {
|
1044 |
-
continue 2;
|
1045 |
-
}
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
}
|
1049 |
-
// */
|
1050 |
-
|
1051 |
-
$enabled_post_types[ $post_type ] = $post_type;
|
1052 |
-
|
1053 |
-
}
|
1054 |
-
}
|
1055 |
-
|
1056 |
-
set_transient( self::$enabled_post_types_key, $enabled_post_types, 60 );
|
1057 |
-
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
foreach ( $enabled_post_types as $post_type ) :
|
1061 |
-
|
1062 |
-
$status = '';
|
1063 |
-
|
1064 |
-
if ( isset( WPGlobus::Config()->extended_options['post_type'][ $post_type ] ) ) {
|
1065 |
-
|
1066 |
-
if ( WPGlobus::Config()->extended_options['post_type'][ $post_type ] == 1 ) {
|
1067 |
-
$status = '1';
|
1068 |
-
}
|
1069 |
-
|
1070 |
-
} else {
|
1071 |
-
$status = '1';
|
1072 |
-
}
|
1073 |
-
|
1074 |
-
update_option( 'wpglobus_customize_post_type_' . $post_type, $status );
|
1075 |
-
|
1076 |
-
endforeach;
|
1077 |
-
|
1078 |
-
$i = 0;
|
1079 |
-
foreach ( $enabled_post_types as $post_type ) :
|
1080 |
-
|
1081 |
-
$pst = 'wpglobus_customize_post_type_' . $post_type;
|
1082 |
-
|
1083 |
-
$wp_customize->add_setting( $pst, array(
|
1084 |
-
'type' => 'option',
|
1085 |
-
'capability' => 'manage_options',
|
1086 |
-
'transport' => 'postMessage'
|
1087 |
-
) );
|
1088 |
-
|
1089 |
-
$title = '';
|
1090 |
-
if ( $i == 0 ) {
|
1091 |
-
$title = esc_html__( 'Uncheck to disable WPGlobus', 'wpglobus' );
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
$wp_customize->add_control( new WPGlobusCheckBox( $wp_customize,
|
1095 |
-
$pst, array(
|
1096 |
-
'settings' => $pst,
|
1097 |
-
'title' => $title,
|
1098 |
-
'label' => $post_type,
|
1099 |
-
'section' => $section,
|
1100 |
-
#'default' => '1',
|
1101 |
-
'priority' => 10,
|
1102 |
-
)
|
1103 |
-
) );
|
1104 |
-
|
1105 |
-
$i ++;
|
1106 |
-
self::$settings[ $section ][ $pst ]['type'] = 'wpglobus_checkbox';
|
1107 |
-
/** @see option wpglobus_option['post_type'] */
|
1108 |
-
self::$settings[ $section ][ $pst ]['option'] = 'post_type';
|
1109 |
-
|
1110 |
-
endforeach;
|
1111 |
-
|
1112 |
-
};
|
1113 |
-
/** end SECTION: Post types */
|
1114 |
-
|
1115 |
-
/**
|
1116 |
-
* SECTION: Redirect.
|
1117 |
-
*/
|
1118 |
-
if ( 1 ) {
|
1119 |
-
|
1120 |
-
$section_priority = $section_priority + 10;
|
1121 |
-
|
1122 |
-
self::$sections['wpglobus_redirect_section'] = 'wpglobus_redirect_section';
|
1123 |
-
|
1124 |
-
$wp_customize->add_section( self::$sections['wpglobus_redirect_section'], array(
|
1125 |
-
'title' => esc_html__( 'Redirect', 'wpglobus' ),
|
1126 |
-
'priority' => $section_priority,
|
1127 |
-
'panel' => 'wpglobus_settings_panel',
|
1128 |
-
) );
|
1129 |
-
|
1130 |
-
/**
|
1131 |
-
* Option
|
1132 |
-
* [browser_redirect] => Array
|
1133 |
-
* (
|
1134 |
-
* [redirect_by_language] => 0
|
1135 |
-
* )
|
1136 |
-
*/
|
1137 |
-
|
1138 |
-
/**
|
1139 |
-
* Setting wpglobus_customize_redirect_by_language.
|
1140 |
-
*/
|
1141 |
-
$wp_customize->add_setting( 'wpglobus_customize_redirect_by_language', array(
|
1142 |
-
'type' => 'option',
|
1143 |
-
'capability' => 'manage_options',
|
1144 |
-
'transport' => 'postMessage'
|
1145 |
-
) );
|
1146 |
-
$wp_customize->add_control( new WPGlobusCheckBox( $wp_customize,
|
1147 |
-
'wpglobus_customize_redirect_by_language', array(
|
1148 |
-
'section' => self::$sections['wpglobus_redirect_section'],
|
1149 |
-
'settings' => 'wpglobus_customize_redirect_by_language',
|
1150 |
-
'title' => esc_html__( 'Choose the language automatically, based on:', 'wpglobus' ),
|
1151 |
-
'priority' => 10,
|
1152 |
-
'label' => esc_html__( 'Preferred language set in the browser', 'wpglobus' ),
|
1153 |
-
'description' => esc_html__('When a user comes to the site for the first time, try to find the best matching language version of the page.', 'wpglobus')
|
1154 |
-
)
|
1155 |
-
) );
|
1156 |
-
|
1157 |
-
self::$settings[ self::$sections['wpglobus_redirect_section'] ]['wpglobus_customize_redirect_by_language']['type'] = 'wpglobus_checkbox';
|
1158 |
-
/** @see option wpglobus_option[browser_redirect][redirect_by_language] */
|
1159 |
-
self::$settings[ self::$sections['wpglobus_redirect_section'] ]['wpglobus_customize_redirect_by_language']['option'] = 'redirect_by_language';
|
1160 |
-
|
1161 |
-
}
|
1162 |
-
/** end SECTION: Redirect */
|
1163 |
-
|
1164 |
-
/**
|
1165 |
-
* SECTION: Custom JS Code.
|
1166 |
-
*/
|
1167 |
-
if ( 1 ) {
|
1168 |
-
|
1169 |
-
$section_priority = $section_priority + 10;
|
1170 |
-
|
1171 |
-
self::$sections['wpglobus_js_editor_section'] = 'wpglobus_js_editor_section';
|
1172 |
-
|
1173 |
-
/**
|
1174 |
-
* Setting 'wpglobus_customize_js_editor'.
|
1175 |
-
*/
|
1176 |
-
|
1177 |
-
/**
|
1178 |
-
* class WP_Customize_Code_Editor_Control
|
1179 |
-
* @since WordPress 4.9.0
|
1180 |
-
* @see https://developer.wordpress.org/reference/classes/wp_customize_code_editor_control/
|
1181 |
-
*/
|
1182 |
-
if ( ! class_exists('WP_Customize_Code_Editor_Control') ) {
|
1183 |
-
|
1184 |
-
$content = esc_html__( 'To add a Custom JS Code in Customizer, you need to upgrade WordPress to version 4.9 or later.', 'wpglobus' );
|
1185 |
-
$content .= '<br /><br />' .
|
1186 |
-
esc_html__( 'With your version of WordPress, please use the', 'wpglobus' ) .
|
1187 |
-
' <a style="text-decoration:underline;" target="_blank" href="' . esc_url( admin_url() . 'admin.php?page=' . WPGlobus::OPTIONS_PAGE_SLUG . '&tab=0' ) . '">' .
|
1188 |
-
esc_html__( 'WPGlobus Settings page', 'wpglobus' ) .
|
1189 |
-
'.</a>';
|
1190 |
-
|
1191 |
-
$wp_customize->add_section( self::$sections['wpglobus_js_editor_section'], array(
|
1192 |
-
'title' => esc_html__( 'Custom JS Code', 'wpglobus' ),
|
1193 |
-
'priority' => $section_priority,
|
1194 |
-
'panel' => 'wpglobus_settings_panel',
|
1195 |
-
) );
|
1196 |
-
|
1197 |
-
$wp_customize->add_setting( 'wpglobus_customize_js_editor', array(
|
1198 |
-
'type' => 'option',
|
1199 |
-
'capability' => 'manage_options',
|
1200 |
-
'transport' => 'postMessage'
|
1201 |
-
) );
|
1202 |
-
|
1203 |
-
$wp_customize->add_control( new WPGlobusTextBox( $wp_customize,
|
1204 |
-
'wpglobus_customize_js_editor', array(
|
1205 |
-
'section' => self::$sections['wpglobus_js_editor_section'],
|
1206 |
-
'settings' => 'wpglobus_customize_js_editor',
|
1207 |
-
'content' => $content
|
1208 |
-
)
|
1209 |
-
) );
|
1210 |
-
|
1211 |
-
} else {
|
1212 |
-
|
1213 |
-
$wp_customize->add_section( self::$sections['wpglobus_js_editor_section'], array(
|
1214 |
-
'title' => esc_html__( 'Custom JS Code', 'wpglobus' ),
|
1215 |
-
'priority' => $section_priority,
|
1216 |
-
'panel' => 'wpglobus_settings_panel',
|
1217 |
-
) );
|
1218 |
-
|
1219 |
-
|
1220 |
-
$wp_customize->add_setting( 'wpglobus_customize_js_editor', array(
|
1221 |
-
'type' => 'option',
|
1222 |
-
'capability' => 'manage_options',
|
1223 |
-
'transport' => 'postMessage'
|
1224 |
-
) );
|
1225 |
-
$wp_customize->add_control( new WP_Customize_Code_Editor_Control( $wp_customize,
|
1226 |
-
'wpglobus_customize_js_editor', array(
|
1227 |
-
'code_type' => 'javascript',
|
1228 |
-
#'mode' => 'javascript',
|
1229 |
-
'input_attrs' => array('rows'=>80),
|
1230 |
-
'section' => self::$sections['wpglobus_js_editor_section'],
|
1231 |
-
'settings' => 'wpglobus_customize_js_editor',
|
1232 |
-
'title' => esc_html__( 'Title', 'wpglobus' ),
|
1233 |
-
'priority' => 10,
|
1234 |
-
'label' => esc_html__( 'Custom JS Code', 'wpglobus' ),
|
1235 |
-
'description' => esc_html__( '(Paste your JS code here.)', 'wpglobus' )
|
1236 |
-
)
|
1237 |
-
) );
|
1238 |
-
|
1239 |
-
self::$settings[ self::$sections['wpglobus_js_editor_section'] ]['wpglobus_customize_js_editor']['type'] = 'code_editor';
|
1240 |
-
/** @see option wpglobus_option['css_editor'] */
|
1241 |
-
self::$settings[ self::$sections['wpglobus_js_editor_section'] ]['wpglobus_customize_js_editor']['option'] = 'js_editor';
|
1242 |
-
|
1243 |
-
}
|
1244 |
-
}
|
1245 |
-
/** end SECTION: Custom JS Code */
|
1246 |
-
|
1247 |
-
/**
|
1248 |
-
* SECTION: Add ons.
|
1249 |
-
*/
|
1250 |
-
if ( 1 ) {
|
1251 |
-
|
1252 |
-
$section_priority = $section_priority + 10;
|
1253 |
-
|
1254 |
-
global $wp_version;
|
1255 |
-
|
1256 |
-
self::$sections['wpglobus_addons_section'] = 'wpglobus_addons_section';
|
1257 |
-
|
1258 |
-
if ( version_compare( $wp_version, '4.5-RC1', '<' ) ) {
|
1259 |
-
|
1260 |
-
$wp_customize->add_section( self::$sections['wpglobus_addons_section'], array(
|
1261 |
-
'title' => esc_html__( 'Add-ons', 'wpglobus' ),
|
1262 |
-
'priority' => $section_priority,
|
1263 |
-
'panel' => 'wpglobus_settings_panel',
|
1264 |
-
) );
|
1265 |
-
|
1266 |
-
/** Add ons setting */
|
1267 |
-
$wp_customize->add_setting( 'wpglobus_customize_add_ons', array(
|
1268 |
-
'type' => 'option',
|
1269 |
-
'capability' => 'manage_options',
|
1270 |
-
'transport' => 'postMessage',
|
1271 |
-
) );
|
1272 |
-
|
1273 |
-
$wp_customize->add_control( new WPGlobusCheckBox( $wp_customize,
|
1274 |
-
'wpglobus_customize_add_ons', array(
|
1275 |
-
'settings' => 'wpglobus_customize_add_ons',
|
1276 |
-
'title' => esc_html__( 'Title', 'wpglobus' ),
|
1277 |
-
'label' => esc_html__( 'Label', 'wpglobus' ),
|
1278 |
-
'section' => self::$sections['wpglobus_addons_section'],
|
1279 |
-
'type' => 'checkbox',
|
1280 |
-
'priority' => 10,
|
1281 |
-
'description' => esc_html__( 'Description', 'wpglobus' ),
|
1282 |
-
)
|
1283 |
-
) );
|
1284 |
-
|
1285 |
-
} else {
|
1286 |
-
|
1287 |
-
/**
|
1288 |
-
* Changes in WP 4.5
|
1289 |
-
* @link https://make.wordpress.org/core/2016/03/10/customizer-improvements-in-4-5/
|
1290 |
-
*/
|
1291 |
-
|
1292 |
-
$wp_customize->add_section( self::$sections['wpglobus_addons_section'], array(
|
1293 |
-
'title' => esc_html__( 'Add-ons', 'wpglobus' ),
|
1294 |
-
'priority' => $section_priority,
|
1295 |
-
'panel' => 'wpglobus_settings_panel',
|
1296 |
-
) );
|
1297 |
-
|
1298 |
-
$wp_customize->add_control( 'wpglobus_customize_add_ons', array(
|
1299 |
-
'section' => self::$sections['wpglobus_addons_section'],
|
1300 |
-
'settings' => array(),
|
1301 |
-
'type' => 'button',
|
1302 |
-
)
|
1303 |
-
);
|
1304 |
-
}
|
1305 |
-
}
|
1306 |
-
/** end SECTION: Add ons */
|
1307 |
-
|
1308 |
-
/**
|
1309 |
-
* Fires to add customize settings.
|
1310 |
-
*
|
1311 |
-
* @since 1.4.6
|
1312 |
-
*
|
1313 |
-
* @param WP_Customize_Manager $wp_customize The WP Customize Manager.
|
1314 |
-
*/
|
1315 |
-
do_action( 'wpglobus_customize_register', $wp_customize );
|
1316 |
-
|
1317 |
-
/** @var array $res */
|
1318 |
-
$res = apply_filters( 'wpglobus_customize_data', array(
|
1319 |
-
'sections' => self::$sections,
|
1320 |
-
'settings' => self::$settings,
|
1321 |
-
) );
|
1322 |
-
|
1323 |
-
self::$sections = $res['sections'];
|
1324 |
-
self::$settings = $res['settings'];
|
1325 |
-
|
1326 |
-
}
|
1327 |
-
|
1328 |
-
/**
|
1329 |
-
* Get content for WPGlobusTextBox element.
|
1330 |
-
*
|
1331 |
-
* @param string $control
|
1332 |
-
* @param mixed $attrs
|
1333 |
-
*
|
1334 |
-
* @return string
|
1335 |
-
*/
|
1336 |
-
public static function get_content( $control = '', $attrs = null ) {
|
1337 |
-
|
1338 |
-
if ( '' == $control ) {
|
1339 |
-
return '';
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
$content = '';
|
1343 |
-
switch ( $control ) :
|
1344 |
-
case 'settings_section_help' :
|
1345 |
-
$content = esc_html__( 'Here you can specify which fields should be considered multilingual by WPGlobus. To exclude a field, uncheck it and then press the button below.', 'wpglobus' );
|
1346 |
-
|
1347 |
-
break;
|
1348 |
-
case 'welcome_message' :
|
1349 |
-
|
1350 |
-
$content = '<div style="width:100%;">' .
|
1351 |
-
esc_html__( 'Thank you for installing WPGlobus!', 'wpglobus' ) .
|
1352 |
-
'<br/>' .
|
1353 |
-
'• ' .
|
1354 |
-
'<a style="text-decoration:underline;" target="_blank" href="' . admin_url() . 'admin.php?page=' . WPGlobus::PAGE_WPGLOBUS_ABOUT . '">' .
|
1355 |
-
esc_html__( 'Read About WPGlobus', 'wpglobus' ) .
|
1356 |
-
'</a>' .
|
1357 |
-
'<br/>' .
|
1358 |
-
'• ' . esc_html__( 'Click the <strong>[Languages]</strong> tab at the left to setup the options.', 'wpglobus' ) .
|
1359 |
-
#'<br/>' .
|
1360 |
-
#'• ' . esc_html__( 'Use the <strong>[Languages Table]</strong> section to add a new language or to edit the language attributes: name, code, flag icon, etc.', 'wpglobus' ) .
|
1361 |
-
'<br/>' .
|
1362 |
-
'<br/>' .
|
1363 |
-
esc_html__( 'Should you have any questions or comments, please do not hesitate to contact us.', 'wpglobus' ) .
|
1364 |
-
'<br/>' .
|
1365 |
-
'<br/>' .
|
1366 |
-
'<em>' .
|
1367 |
-
esc_html__( 'Sincerely Yours,', 'wpglobus' ) .
|
1368 |
-
'<br/>' .
|
1369 |
-
esc_html__( 'The WPGlobus Team', 'wpglobus' ) .
|
1370 |
-
'</em>' .
|
1371 |
-
'</div>';
|
1372 |
-
|
1373 |
-
break;
|
1374 |
-
case 'deactivate_message' :
|
1375 |
-
|
1376 |
-
/**
|
1377 |
-
* For Google Analytics
|
1378 |
-
*/
|
1379 |
-
$ga_campaign = '?utm_source=wpglobus-admin-clean&utm_medium=link&utm_campaign=talk-to-us';
|
1380 |
-
|
1381 |
-
$url_wpglobus_site = WPGlobus_Utils::url_wpglobus_site();
|
1382 |
-
$url_wpglobus_site_submit_ticket = $url_wpglobus_site . 'support/submit-ticket/' . $ga_campaign;
|
1383 |
-
|
1384 |
-
$content = '<p><em>' .
|
1385 |
-
sprintf(
|
1386 |
-
esc_html(
|
1387 |
-
// translators: %?$s: HTML codes for hyperlink. Do not remove.
|
1388 |
-
__( 'We would hate to see you go. If something goes wrong, do not uninstall WPGlobus yet. Please %1$stalk to us%2$s and let us help!', 'wpglobus' ) ),
|
1389 |
-
'<a href="' . $url_wpglobus_site_submit_ticket . '" target="_blank" style="text-decoration:underline;">',
|
1390 |
-
'</a>'
|
1391 |
-
) .
|
1392 |
-
'</em></p>' .
|
1393 |
-
'<hr/>' .
|
1394 |
-
'<p><i class="el el-exclamation-sign" style="color:red"></i> <strong>' .
|
1395 |
-
esc_html( __( 'Please note that if you deactivate WPGlobus, your site will show all the languages together, mixed up. You will need to remove all translations, keeping only one language.', 'wpglobus' ) ) .
|
1396 |
-
'</strong></p>' .
|
1397 |
-
'<p>' .
|
1398 |
-
sprintf(
|
1399 |
-
// translators: %s: link to the Clean-up Tool
|
1400 |
-
esc_html__( 'If there are just a few places, you should edit them manually. To automatically remove all translations at once, you can use the %s. WARNING: The clean-up operation is irreversible, so use it only if you need to completely uninstall WPGlobus.', 'wpglobus' ),
|
1401 |
-
sprintf(
|
1402 |
-
// translators: %?$s: HTML codes for hyperlink. Do not remove.
|
1403 |
-
esc_html__( '%1$sClean-up Tool%2$s', 'wpglobus' ),
|
1404 |
-
'<a style="text-decoration:underline;" target="_blank" href="' . admin_url() . 'admin.php?page=' . WPGlobus::PAGE_WPGLOBUS_CLEAN . '">',
|
1405 |
-
'</a>'
|
1406 |
-
) ) .
|
1407 |
-
'</p>';
|
1408 |
-
|
1409 |
-
break;
|
1410 |
-
case 'sorry_message' :
|
1411 |
-
|
1412 |
-
$content = '<p><strong>' .
|
1413 |
-
sprintf(
|
1414 |
-
// translators: %s: name of current theme
|
1415 |
-
esc_html__( 'Sorry, WPGlobus customizer doesn\'t support current theme %s.', 'wpglobus' ),
|
1416 |
-
'<em>' . $attrs->__get( 'name' ) . '</em>'
|
1417 |
-
) .
|
1418 |
-
'<br />' .
|
1419 |
-
sprintf(
|
1420 |
-
// translators: %?$s: HTML codes for hyperlink. Do not remove.
|
1421 |
-
esc_html__( 'Please use %1$sWPGlobus options page%2$s instead.', 'wpglobus' ),
|
1422 |
-
'<a style="text-decoration:underline;" target="_blank" href="' . admin_url() . 'admin.php?page=' . WPGlobus::OPTIONS_PAGE_SLUG . '&tab=0">',
|
1423 |
-
'</a>'
|
1424 |
-
) .
|
1425 |
-
'</strong></p>';
|
1426 |
-
|
1427 |
-
break;
|
1428 |
-
endswitch;
|
1429 |
-
|
1430 |
-
return $content;
|
1431 |
-
|
1432 |
-
}
|
1433 |
-
|
1434 |
-
/**
|
1435 |
-
* Load Customize Preview JS.
|
1436 |
-
*
|
1437 |
-
* Used by hook: 'customize_preview_init'
|
1438 |
-
* @see 'customize_preview_init'
|
1439 |
-
*/
|
1440 |
-
public static function action__customize_preview_init() {
|
1441 |
-
|
1442 |
-
/*
|
1443 |
-
wp_enqueue_script(
|
1444 |
-
'wpglobus-customize-options-preview',
|
1445 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-options-preview' .
|
1446 |
-
WPGlobus::SCRIPT_SUFFIX() . '.js',
|
1447 |
-
array( 'jquery' ),
|
1448 |
-
WPGLOBUS_VERSION,
|
1449 |
-
true
|
1450 |
-
);
|
1451 |
-
// */
|
1452 |
-
/*
|
1453 |
-
wp_localize_script(
|
1454 |
-
'wpglobus-customize-options-preview',
|
1455 |
-
'WPGlobusCustomize',
|
1456 |
-
array(
|
1457 |
-
'version' => WPGLOBUS_VERSION,
|
1458 |
-
#'blogname' => WPGlobus_Core::text_filter( get_option( 'blogname' ), WPGlobus::Config()->language ),
|
1459 |
-
#'blogdescription' => WPGlobus_Core::text_filter( get_option( 'blogdescription' ), WPGlobus::Config()->language )
|
1460 |
-
)
|
1461 |
-
); // */
|
1462 |
-
|
1463 |
-
}
|
1464 |
-
|
1465 |
-
/**
|
1466 |
-
* Load Customize Control JS.
|
1467 |
-
*/
|
1468 |
-
public static function action__customize_controls_enqueue_scripts() {
|
1469 |
-
|
1470 |
-
/**
|
1471 |
-
* Get customize_user_control options which there are specifically for every theme.
|
1472 |
-
*/
|
1473 |
-
$options = get_option( self::$options_key );
|
1474 |
-
if ( $options == '' ) {
|
1475 |
-
$options = null;
|
1476 |
-
} else {
|
1477 |
-
if ( empty( $options['customize_user_control'] ) ) {
|
1478 |
-
$options = null;
|
1479 |
-
} else {
|
1480 |
-
$options = $options['customize_user_control'];
|
1481 |
-
}
|
1482 |
-
}
|
1483 |
-
|
1484 |
-
$i18n = array();
|
1485 |
-
$i18n['expandShrink'] = esc_html__('Expand/Shrink', 'wpglobus');
|
1486 |
-
|
1487 |
-
wp_register_script(
|
1488 |
-
'wpglobus-customize-options',
|
1489 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-options' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
1490 |
-
array( 'jquery', 'jquery-ui-draggable' ),
|
1491 |
-
WPGLOBUS_VERSION,
|
1492 |
-
true
|
1493 |
-
);
|
1494 |
-
wp_enqueue_script( 'wpglobus-customize-options' );
|
1495 |
-
wp_localize_script(
|
1496 |
-
'wpglobus-customize-options',
|
1497 |
-
'WPGlobusCustomizeOptions',
|
1498 |
-
array(
|
1499 |
-
'version' => WPGLOBUS_VERSION,
|
1500 |
-
'i18n' => $i18n,
|
1501 |
-
'config' => WPGlobus::Config(),
|
1502 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
1503 |
-
'process_ajax' => __CLASS__ . '_process_ajax',
|
1504 |
-
'editLink' => admin_url() . 'admin.php?page=' . WPGlobus::LANGUAGE_EDIT_PAGE . '&action=edit&lang={{language}}"',
|
1505 |
-
'settings' => self::$settings,
|
1506 |
-
'sections' => self::$sections,
|
1507 |
-
'addonsPage' => admin_url() . 'plugin-install.php?tab=search&s=WPGlobus&source=WPGlobus',
|
1508 |
-
'themeName' => self::$theme_name,
|
1509 |
-
'themeEnabled' => self::is_theme_enabled() ? 'true' : 'false',
|
1510 |
-
'helpButton' => '<span style="float:right;cursor:pointer;" class="wpglobus-customize-icon-help customize-help-toggle dashicons dashicons-editor-help" tabindex="0" aria-expanded="false"></span>',
|
1511 |
-
'userControl' => $options,
|
1512 |
-
'userControlSaveButton' => self::$controls_save_button,
|
1513 |
-
'userControlIcon' => WPGlobus::$PLUGIN_DIR_URL . 'includes/css/images/checkbox-icon.png',
|
1514 |
-
'userControlIconClass' => 'wpglobus-customize-user-control-icon',
|
1515 |
-
'userControlBoxSelector' => '.wpglobus-fields_settings_control_box .items-box'
|
1516 |
-
# @see WPGlobusFieldsSettingsControl class
|
1517 |
-
)
|
1518 |
-
);
|
1519 |
-
|
1520 |
-
}
|
1521 |
-
|
1522 |
-
/**
|
1523 |
-
* Get current theme or its property.
|
1524 |
-
*
|
1525 |
-
* @since 1.6.0
|
1526 |
-
*
|
1527 |
-
* @param string $param
|
1528 |
-
*
|
1529 |
-
* @return string|WP_Theme
|
1530 |
-
*/
|
1531 |
-
public static function get_theme( $param = '' ) {
|
1532 |
-
|
1533 |
-
if ( 'name' === $param ) {
|
1534 |
-
return strtolower( self::$theme->name );
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
return self::$theme;
|
1538 |
-
|
1539 |
-
}
|
1540 |
-
|
1541 |
-
/**
|
1542 |
-
* Check for enabled theme.
|
1543 |
-
*
|
1544 |
-
* @since 1.6.0
|
1545 |
-
* @return boolean
|
1546 |
-
*/
|
1547 |
-
public static function is_theme_enabled() {
|
1548 |
-
|
1549 |
-
if ( in_array( self::$theme_name, self::$disabled_themes ) ) {
|
1550 |
-
return false;
|
1551 |
-
}
|
1552 |
-
|
1553 |
-
return true;
|
1554 |
-
}
|
1555 |
-
|
1556 |
-
|
1557 |
-
/**
|
1558 |
-
* Filter to disable the making multilingual our own settings.
|
1559 |
-
*
|
1560 |
-
* @since 1.9.8
|
1561 |
-
* @return array
|
1562 |
-
*/
|
1563 |
-
public static function filter__disabled_setting_mask($disabled_setting_mask) {
|
1564 |
-
$disabled_setting_mask[] = 'wpglobus_customize_js_editor';
|
1565 |
-
return $disabled_setting_mask;
|
1566 |
-
}
|
1567 |
-
|
1568 |
-
} // class
|
1569 |
-
|
1570 |
-
endif;
|
1571 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-dashboard-news.php
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class WPGlobus_Dashboard_News
|
5 |
-
* @since 1.7.7
|
6 |
-
*/
|
7 |
-
class WPGlobus_Dashboard_News {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* WPGlobus_Dashboard_News constructor.
|
11 |
-
*/
|
12 |
-
public function __construct() {
|
13 |
-
add_action( 'wp_dashboard_setup', array(
|
14 |
-
$this,
|
15 |
-
'action__wp_dashboard_setup'
|
16 |
-
) );
|
17 |
-
|
18 |
-
add_filter( 'wpglobus_localize_feed_url', array(
|
19 |
-
$this,
|
20 |
-
'filter__wpglobus_localize_feed_url'
|
21 |
-
), 0, 2 );
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Do not localize feed URL because we have news only in English.
|
27 |
-
*
|
28 |
-
* @param bool $need_to_localize
|
29 |
-
* @param SimplePie $feed
|
30 |
-
*
|
31 |
-
* @return bool
|
32 |
-
*/
|
33 |
-
public function filter__wpglobus_localize_feed_url( $need_to_localize, $feed ) {
|
34 |
-
|
35 |
-
return $need_to_localize && WPGlobus::URL_WPGLOBUS_SITE . 'feed/' !== $feed->feed_url;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Setup the dashboard widget.
|
40 |
-
*/
|
41 |
-
public function action__wp_dashboard_setup() {
|
42 |
-
add_meta_box( 'wpglobus_dashboard_news',
|
43 |
-
esc_html__( 'WPGlobus News', 'wpglobus' ),
|
44 |
-
array(
|
45 |
-
$this,
|
46 |
-
'dashboard_widget'
|
47 |
-
),
|
48 |
-
'dashboard', 'side', 'high'
|
49 |
-
);
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Output the widget content.
|
54 |
-
*/
|
55 |
-
public function dashboard_widget() {
|
56 |
-
echo '<div class="rss-widget">';
|
57 |
-
wp_widget_rss_output( array(
|
58 |
-
'url' => WPGlobus::URL_WPGLOBUS_SITE . 'feed/',
|
59 |
-
'title' => esc_html__( 'WPGlobus News', 'wpglobus' ),
|
60 |
-
'items' => 3,
|
61 |
-
'show_summary' => 1,
|
62 |
-
'show_author' => 0,
|
63 |
-
'show_date' => 1
|
64 |
-
) );
|
65 |
-
echo '</div>';
|
66 |
-
}
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-language-edit-request.php
DELETED
@@ -1,255 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus / Admin / Language Edit / Request
|
4 |
-
* plugins/wpglobus/includes/admin/class-wpglobus-language-edit-request.php
|
5 |
-
*
|
6 |
-
* @package WPGlobus\Admin
|
7 |
-
* @since 1.9.7.1
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class WPGlobus_Language_Edit_Request
|
12 |
-
*/
|
13 |
-
class WPGlobus_Language_Edit_Request {
|
14 |
-
|
15 |
-
const NONCE_ACTION = 'wpglobus-language-edit';
|
16 |
-
|
17 |
-
const ACTION_NONE = '';
|
18 |
-
|
19 |
-
const ACTION_EDIT = 'edit';
|
20 |
-
|
21 |
-
const ACTION_DELETE = 'delete';
|
22 |
-
|
23 |
-
const ACTION_ADD = 'add';
|
24 |
-
|
25 |
-
const ACTION_DONE = 'done';
|
26 |
-
|
27 |
-
/**
|
28 |
-
* GET['action']
|
29 |
-
*
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
protected $action = self::ACTION_NONE;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* GET['lang']
|
36 |
-
*
|
37 |
-
* @var string
|
38 |
-
*/
|
39 |
-
protected $lang = '';
|
40 |
-
|
41 |
-
/**
|
42 |
-
* POST['submit']
|
43 |
-
*
|
44 |
-
* @var bool
|
45 |
-
*/
|
46 |
-
protected $is_submit = false;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* POST['delete']
|
50 |
-
*
|
51 |
-
* @var bool
|
52 |
-
*/
|
53 |
-
protected $is_delete = false;
|
54 |
-
|
55 |
-
|
56 |
-
/**
|
57 |
-
* POST['wpglobus_language_code']
|
58 |
-
*
|
59 |
-
* @var string
|
60 |
-
*/
|
61 |
-
protected $wpglobus_language_code = '';
|
62 |
-
|
63 |
-
/**
|
64 |
-
* POST['wpglobus_flags']
|
65 |
-
*
|
66 |
-
* @var string
|
67 |
-
*/
|
68 |
-
protected $wpglobus_flags = '';
|
69 |
-
|
70 |
-
/**
|
71 |
-
* POST['wpglobus_language_name']
|
72 |
-
*
|
73 |
-
* @var string
|
74 |
-
*/
|
75 |
-
protected $wpglobus_language_name = '';
|
76 |
-
|
77 |
-
/**
|
78 |
-
* POST['wpglobus_en_language_name']
|
79 |
-
*
|
80 |
-
* @var string
|
81 |
-
*/
|
82 |
-
protected $wpglobus_en_language_name = '';
|
83 |
-
|
84 |
-
/**
|
85 |
-
* POST['wpglobus_locale']
|
86 |
-
*
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
protected $wpglobus_locale = '';
|
90 |
-
|
91 |
-
/**
|
92 |
-
* WPGlobus_Language_Edit_Request constructor.
|
93 |
-
*/
|
94 |
-
public function __construct() {
|
95 |
-
$this->parse_request();
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Parse GET and POST.
|
100 |
-
*/
|
101 |
-
protected function parse_request() {
|
102 |
-
|
103 |
-
check_admin_referer( self::NONCE_ACTION );
|
104 |
-
|
105 |
-
if ( isset( $_GET['action'] ) && is_string( $_GET['action'] ) ) { // WPCS: input var ok, sanitization ok.
|
106 |
-
$action = sanitize_text_field( wp_unslash( $_GET['action'] ) ); // Input var okay.
|
107 |
-
if ( in_array( $action, array(
|
108 |
-
self::ACTION_ADD,
|
109 |
-
self::ACTION_EDIT,
|
110 |
-
self::ACTION_DELETE,
|
111 |
-
self::ACTION_DONE,
|
112 |
-
), true ) ) {
|
113 |
-
$this->action = $action;
|
114 |
-
} else {
|
115 |
-
$this->action = self::ACTION_NONE;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( isset( $_GET['lang'] ) && is_string( $_GET['lang'] ) ) { // WPCS: input var ok, sanitization ok.
|
120 |
-
$this->lang = sanitize_text_field( wp_unslash( $_GET['lang'] ) ); // Input var okay.
|
121 |
-
}
|
122 |
-
|
123 |
-
if ( isset( $_POST['submit'] ) ) { // Input var okay.
|
124 |
-
$this->is_submit = true;
|
125 |
-
}
|
126 |
-
|
127 |
-
if ( isset( $_POST['delete'] ) ) { // Input var okay.
|
128 |
-
$this->is_delete = true;
|
129 |
-
}
|
130 |
-
|
131 |
-
foreach (
|
132 |
-
array(
|
133 |
-
'wpglobus_language_code',
|
134 |
-
'wpglobus_flags',
|
135 |
-
'wpglobus_language_name',
|
136 |
-
'wpglobus_en_language_name',
|
137 |
-
'wpglobus_locale',
|
138 |
-
) as $var_name
|
139 |
-
) {
|
140 |
-
if ( isset( $_POST[ $var_name ] ) && is_string( $_POST[ $var_name ] ) ) { // WPCS: input var ok, sanitization ok.
|
141 |
-
$this->$var_name = sanitize_text_field( wp_unslash( $_POST[ $var_name ] ) ); // Input var okay.
|
142 |
-
}
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Getter.
|
148 |
-
*
|
149 |
-
* @return string
|
150 |
-
*/
|
151 |
-
public function get_action() {
|
152 |
-
return $this->action;
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Getter.
|
157 |
-
*
|
158 |
-
* @return string
|
159 |
-
*/
|
160 |
-
public function get_lang() {
|
161 |
-
return $this->lang;
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Getter.
|
166 |
-
*
|
167 |
-
* @return bool
|
168 |
-
*/
|
169 |
-
public function is_submit() {
|
170 |
-
return $this->is_submit;
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Getter.
|
175 |
-
*
|
176 |
-
* @return bool
|
177 |
-
*/
|
178 |
-
public function is_delete() {
|
179 |
-
return $this->is_delete;
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Getter.
|
184 |
-
*
|
185 |
-
* @return string
|
186 |
-
*/
|
187 |
-
public function get_wpglobus_language_code() {
|
188 |
-
return $this->wpglobus_language_code;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Getter.
|
193 |
-
*
|
194 |
-
* @return string
|
195 |
-
*/
|
196 |
-
public function get_wpglobus_flags() {
|
197 |
-
return $this->wpglobus_flags;
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Getter.
|
202 |
-
*
|
203 |
-
* @return string
|
204 |
-
*/
|
205 |
-
public function get_wpglobus_language_name() {
|
206 |
-
return $this->wpglobus_language_name;
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Getter.
|
211 |
-
*
|
212 |
-
* @return string
|
213 |
-
*/
|
214 |
-
public function get_wpglobus_en_language_name() {
|
215 |
-
return $this->wpglobus_en_language_name;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Getter.
|
220 |
-
*
|
221 |
-
* @return string
|
222 |
-
*/
|
223 |
-
public function get_wpglobus_locale() {
|
224 |
-
return $this->wpglobus_locale;
|
225 |
-
}
|
226 |
-
|
227 |
-
public static function url_language_add() {
|
228 |
-
$url = add_query_arg( array(
|
229 |
-
'page' => WPGlobus::LANGUAGE_EDIT_PAGE,
|
230 |
-
'action' => self::ACTION_ADD,
|
231 |
-
), admin_url( 'admin.php' ) );
|
232 |
-
|
233 |
-
return wp_nonce_url( $url, self::NONCE_ACTION );
|
234 |
-
}
|
235 |
-
|
236 |
-
public static function url_language_edit( $language_code ) {
|
237 |
-
$url = add_query_arg( array(
|
238 |
-
'page' => WPGlobus::LANGUAGE_EDIT_PAGE,
|
239 |
-
'lang' => $language_code,
|
240 |
-
'action' => self::ACTION_EDIT,
|
241 |
-
), admin_url( 'admin.php' ) );
|
242 |
-
|
243 |
-
return wp_nonce_url( $url, self::NONCE_ACTION );
|
244 |
-
}
|
245 |
-
|
246 |
-
public static function url_language_delete( $language_code ) {
|
247 |
-
$url = add_query_arg( array(
|
248 |
-
'page' => WPGlobus::LANGUAGE_EDIT_PAGE,
|
249 |
-
'lang' => $language_code,
|
250 |
-
'action' => self::ACTION_DELETE,
|
251 |
-
), admin_url( 'admin.php' ) );
|
252 |
-
|
253 |
-
return wp_nonce_url( $url, self::NONCE_ACTION );
|
254 |
-
}
|
255 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/class-wpglobus-language-edit.php
DELETED
@@ -1,494 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus / Admin / Language Edit
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin
|
6 |
-
*/
|
7 |
-
|
8 |
-
// Load the Request class.
|
9 |
-
require_once dirname( __FILE__ ) . '/class-wpglobus-language-edit-request.php';
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_Language_Edit
|
13 |
-
*/
|
14 |
-
class WPGlobus_Language_Edit {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* All flag files.
|
18 |
-
*
|
19 |
-
* @var array
|
20 |
-
*/
|
21 |
-
protected $all_flags = array();
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Current action
|
25 |
-
*
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
protected $action = WPGlobus_Language_Edit_Request::ACTION_ADD;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Language code
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
protected $language_code = '';
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Language name
|
39 |
-
*
|
40 |
-
* @var string
|
41 |
-
*/
|
42 |
-
protected $language_name = '';
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Language name in English
|
46 |
-
*
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
protected $en_language_name = '';
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Locale
|
53 |
-
*
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
protected $locale = '';
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Flag for the current language
|
60 |
-
*
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
protected $flag = '';
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Set to true when the form is submitted
|
67 |
-
*
|
68 |
-
* @var bool
|
69 |
-
*/
|
70 |
-
protected $submit = false;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Diagnostic messages
|
74 |
-
*
|
75 |
-
* @var string[]
|
76 |
-
*/
|
77 |
-
protected $submit_messages = array();
|
78 |
-
|
79 |
-
/**
|
80 |
-
* The Request object
|
81 |
-
*
|
82 |
-
* @var WPGlobus_Language_Edit_Request
|
83 |
-
*/
|
84 |
-
protected $request;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Constructor
|
88 |
-
*/
|
89 |
-
public function __construct() {
|
90 |
-
|
91 |
-
$this->request = new WPGlobus_Language_Edit_Request();
|
92 |
-
|
93 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_DELETE === $this->request->get_action() ) {
|
94 |
-
$this->action = WPGlobus_Language_Edit_Request::ACTION_DELETE;
|
95 |
-
} elseif ( WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->request->get_action() ) {
|
96 |
-
$this->action = WPGlobus_Language_Edit_Request::ACTION_EDIT;
|
97 |
-
}
|
98 |
-
|
99 |
-
$this->language_code = $this->request->get_lang();
|
100 |
-
|
101 |
-
if ( $this->request->is_submit() ) {
|
102 |
-
$this->submit = true;
|
103 |
-
$this->process_submit();
|
104 |
-
} elseif ( $this->request->is_delete() ) {
|
105 |
-
$this->process_delete();
|
106 |
-
$this->action = WPGlobus_Language_Edit_Request::ACTION_DONE;
|
107 |
-
} else {
|
108 |
-
$this->get_data();
|
109 |
-
}
|
110 |
-
|
111 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_DONE !== $this->action ) {
|
112 |
-
$this->display_table();
|
113 |
-
}
|
114 |
-
|
115 |
-
add_action( 'admin_footer', array( $this, 'on_print_scripts' ), 99 );
|
116 |
-
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Add script in admin footer
|
121 |
-
*/
|
122 |
-
public function on_print_scripts() {
|
123 |
-
|
124 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_DONE === $this->action ) {
|
125 |
-
$location = '?page=' . WPGlobus::OPTIONS_PAGE_SLUG;
|
126 |
-
// @formatter:off
|
127 |
-
?>
|
128 |
-
<script>jQuery(document).ready(function () {window.location = window.location.protocol + '//' + window.location.host + window.location.pathname + '<?php echo $location; // WPCS: XSS ok. ?>'});</script>
|
129 |
-
<?php
|
130 |
-
// @formatter:on
|
131 |
-
}
|
132 |
-
|
133 |
-
wp_enqueue_script(
|
134 |
-
'wpglobus-form',
|
135 |
-
WPGlobus::plugin_dir_url() . 'includes/js/wpglobus-form' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
136 |
-
array( 'jquery' ),
|
137 |
-
WPGLOBUS_VERSION,
|
138 |
-
true
|
139 |
-
);
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Process delete language action
|
145 |
-
*/
|
146 |
-
protected function process_delete() {
|
147 |
-
|
148 |
-
$config = WPGlobus::Config();
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Get options
|
152 |
-
*
|
153 |
-
* @var array
|
154 |
-
*/
|
155 |
-
$opts = get_option( $config->option );
|
156 |
-
|
157 |
-
if ( isset( $opts['enabled_languages'][ $this->language_code ] ) ) {
|
158 |
-
|
159 |
-
unset( $opts['enabled_languages'][ $this->language_code ] );
|
160 |
-
|
161 |
-
/** FIX: reset $opts['more_languages'] */
|
162 |
-
if ( array_key_exists( 'more_languages', $opts ) ) {
|
163 |
-
$opts['more_languages'] = '';
|
164 |
-
}
|
165 |
-
update_option( $config->option, $opts );
|
166 |
-
|
167 |
-
}
|
168 |
-
|
169 |
-
unset( $config->language_name[ $this->language_code ] );
|
170 |
-
update_option( $config->option_language_names, $config->language_name );
|
171 |
-
|
172 |
-
unset( $config->flag[ $this->language_code ] );
|
173 |
-
update_option( $config->option_flags, $config->flag );
|
174 |
-
|
175 |
-
unset( $config->en_language_name[ $this->language_code ] );
|
176 |
-
update_option( $config->option_en_language_names, $config->en_language_name );
|
177 |
-
|
178 |
-
unset( $config->locale[ $this->language_code ] );
|
179 |
-
update_option( $config->option_locale, $config->locale );
|
180 |
-
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Process submit action
|
185 |
-
*/
|
186 |
-
protected function process_submit() {
|
187 |
-
|
188 |
-
$code = $this->request->get_wpglobus_language_code();
|
189 |
-
if ( $code && $this->language_code === $code ) {
|
190 |
-
if ( $this->check_fields( $code, false ) ) {
|
191 |
-
$this->save();
|
192 |
-
$this->submit_messages['success'][] = __( 'Options updated', 'wpglobus' );
|
193 |
-
}
|
194 |
-
} else {
|
195 |
-
if ( $this->check_fields( $code ) ) {
|
196 |
-
$this->save( true );
|
197 |
-
$this->submit_messages['success'][] = __( 'Options updated', 'wpglobus' );
|
198 |
-
}
|
199 |
-
}
|
200 |
-
$this->get_flags();
|
201 |
-
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Save data language to DB
|
206 |
-
*
|
207 |
-
* @param bool $update_code If need to change language code.
|
208 |
-
*/
|
209 |
-
protected function save( $update_code = false ) {
|
210 |
-
|
211 |
-
$config = WPGlobus::Config();
|
212 |
-
|
213 |
-
$old_code = '';
|
214 |
-
if ( $update_code && WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->action ) {
|
215 |
-
$old_code = $this->language_code ? $this->language_code : $old_code;
|
216 |
-
if ( isset( $config->language_name[ $old_code ] ) ) {
|
217 |
-
unset( $config->language_name[ $old_code ] );
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Get options
|
222 |
-
*
|
223 |
-
* @var array
|
224 |
-
*/
|
225 |
-
$opts = get_option( $config->option );
|
226 |
-
if ( isset( $opts['enabled_languages'][ $old_code ] ) ) {
|
227 |
-
unset( $opts['enabled_languages'][ $old_code ] );
|
228 |
-
update_option( $config->option, $opts );
|
229 |
-
}
|
230 |
-
if ( isset( $opts['more_languages'] ) && $old_code === $opts['more_languages'] ) {
|
231 |
-
unset( $opts['more_languages'] );
|
232 |
-
update_option( $config->option, $opts );
|
233 |
-
}
|
234 |
-
}
|
235 |
-
$config->language_name[ $this->language_code ] = $this->language_name;
|
236 |
-
update_option( $config->option_language_names, $config->language_name );
|
237 |
-
|
238 |
-
if ( $update_code && isset( $config->flag[ $old_code ] ) ) {
|
239 |
-
unset( $config->flag[ $old_code ] );
|
240 |
-
}
|
241 |
-
$config->flag[ $this->language_code ] = $this->flag;
|
242 |
-
update_option( $config->option_flags, $config->flag );
|
243 |
-
|
244 |
-
if ( $update_code && isset( $config->en_language_name[ $old_code ] ) ) {
|
245 |
-
unset( $config->en_language_name[ $old_code ] );
|
246 |
-
}
|
247 |
-
$config->en_language_name[ $this->language_code ] = $this->en_language_name;
|
248 |
-
update_option( $config->option_en_language_names, $config->en_language_name );
|
249 |
-
|
250 |
-
if ( $update_code && isset( $config->locale[ $old_code ] ) ) {
|
251 |
-
unset( $config->locale[ $old_code ] );
|
252 |
-
}
|
253 |
-
$config->locale[ $this->language_code ] = $this->locale;
|
254 |
-
update_option( $config->option_locale, $config->locale );
|
255 |
-
|
256 |
-
if ( $update_code ) {
|
257 |
-
$this->action = WPGlobus_Language_Edit_Request::ACTION_DONE;
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Check form fields
|
263 |
-
*
|
264 |
-
* @param string $lang_code Language code.
|
265 |
-
* @param bool $check_code Use for language code existence check.
|
266 |
-
*
|
267 |
-
* @return bool True if no errors, false otherwise.
|
268 |
-
*/
|
269 |
-
protected function check_fields( $lang_code, $check_code = true ) {
|
270 |
-
$this->submit_messages['errors'] = array();
|
271 |
-
if ( $check_code && empty( $lang_code ) ) {
|
272 |
-
$this->submit_messages['errors'][] = __( 'Please enter a language code!', 'wpglobus' );
|
273 |
-
}
|
274 |
-
|
275 |
-
if ( $check_code && $this->language_exists( $lang_code ) ) {
|
276 |
-
$this->submit_messages['errors'][] = __( 'Language code already exists!', 'wpglobus' );
|
277 |
-
}
|
278 |
-
|
279 |
-
if ( ! $this->request->get_wpglobus_flags() ) {
|
280 |
-
$this->submit_messages['errors'][] = __( 'Please specify the language flag!', 'wpglobus' );
|
281 |
-
}
|
282 |
-
|
283 |
-
if ( ! $this->request->get_wpglobus_language_name() ) {
|
284 |
-
$this->submit_messages['errors'][] = __( 'Please enter the language name!', 'wpglobus' );
|
285 |
-
}
|
286 |
-
|
287 |
-
if ( ! $this->request->get_wpglobus_en_language_name() ) {
|
288 |
-
$this->submit_messages['errors'][] = __( 'Please enter the language name in English!', 'wpglobus' );
|
289 |
-
}
|
290 |
-
|
291 |
-
if ( ! $this->request->get_wpglobus_locale() ) {
|
292 |
-
$this->submit_messages['errors'][] = __( 'Please enter the locale!', 'wpglobus' );
|
293 |
-
}
|
294 |
-
|
295 |
-
$this->language_code = $lang_code;
|
296 |
-
$this->flag = $this->request->get_wpglobus_flags();
|
297 |
-
$this->language_name = $this->request->get_wpglobus_language_name();
|
298 |
-
$this->en_language_name = $this->request->get_wpglobus_en_language_name();
|
299 |
-
$this->locale = $this->request->get_wpglobus_locale();
|
300 |
-
|
301 |
-
if ( empty( $this->submit_messages['errors'] ) ) {
|
302 |
-
return true;
|
303 |
-
}
|
304 |
-
|
305 |
-
return false;
|
306 |
-
}
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Check existing language code in global $WPGlobus_Config
|
310 |
-
*
|
311 |
-
* @param string $code Language code.
|
312 |
-
*
|
313 |
-
* @return bool true if language code exists
|
314 |
-
*/
|
315 |
-
protected function language_exists( $code ) {
|
316 |
-
|
317 |
-
if ( array_key_exists( $code, WPGlobus::Config()->language_name ) ) {
|
318 |
-
return true;
|
319 |
-
}
|
320 |
-
|
321 |
-
return false;
|
322 |
-
}
|
323 |
-
|
324 |
-
/**
|
325 |
-
* Get data for form fields
|
326 |
-
*/
|
327 |
-
protected function get_data() {
|
328 |
-
|
329 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->action
|
330 |
-
|| WPGlobus_Language_Edit_Request::ACTION_DELETE === $this->action ) {
|
331 |
-
|
332 |
-
$config = WPGlobus::Config();
|
333 |
-
|
334 |
-
$this->language_name = $config->language_name[ $this->language_code ];
|
335 |
-
$this->en_language_name = $config->en_language_name[ $this->language_code ];
|
336 |
-
$this->locale = $config->locale[ $this->language_code ];
|
337 |
-
$this->flag = $config->flag[ $this->language_code ];
|
338 |
-
}
|
339 |
-
$this->get_flags();
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Display language form
|
344 |
-
*/
|
345 |
-
protected function display_table() {
|
346 |
-
|
347 |
-
$disabled = '';
|
348 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->action ) {
|
349 |
-
$header = __( 'Edit Language', 'wpglobus' );
|
350 |
-
} elseif ( WPGlobus_Language_Edit_Request::ACTION_DELETE === $this->action ) {
|
351 |
-
$header = __( 'Delete Language', 'wpglobus' );
|
352 |
-
$disabled = 'disabled';
|
353 |
-
} else {
|
354 |
-
$header = __( 'Add Language', 'wpglobus' );
|
355 |
-
}
|
356 |
-
?>
|
357 |
-
<div class="wrap">
|
358 |
-
<h1>WPGlobus: <?php echo esc_html( $header ); ?></h1>
|
359 |
-
<?php
|
360 |
-
if ( $this->submit ) {
|
361 |
-
if ( ! empty( $this->submit_messages['errors'] ) ) {
|
362 |
-
$mess = '';
|
363 |
-
foreach ( $this->submit_messages['errors'] as $message ) {
|
364 |
-
$mess .= $message . '<br />';
|
365 |
-
}
|
366 |
-
?>
|
367 |
-
<div class="error"><p><?php echo wp_kses( $mess, array( 'br' => array() ) ); ?></p></div>
|
368 |
-
<?php
|
369 |
-
} elseif ( ! empty( $this->submit_messages['success'] ) ) {
|
370 |
-
$mess = '';
|
371 |
-
foreach ( $this->submit_messages['success'] as $message ) {
|
372 |
-
$mess .= $message . '<br />';
|
373 |
-
}
|
374 |
-
?>
|
375 |
-
<div class="updated"><p><?php echo wp_kses( $mess, array( 'br' => array() ) ); ?></p></div>
|
376 |
-
<?php
|
377 |
-
}
|
378 |
-
}
|
379 |
-
?>
|
380 |
-
<form id="wpglobus_edit_form" method="post" action="">
|
381 |
-
<table class="form-table">
|
382 |
-
<tr>
|
383 |
-
<th scope="row"><label
|
384 |
-
for="wpglobus_language_code"><?php esc_html_e( 'Language Code', 'wpglobus' ); ?></label>
|
385 |
-
</th>
|
386 |
-
<td>
|
387 |
-
<input name="wpglobus_language_code" <?php echo esc_attr( $disabled ); ?> type="text"
|
388 |
-
id="wpglobus_language_code"
|
389 |
-
value="<?php echo esc_attr( $this->language_code ); ?>" class="regular-text"/>
|
390 |
-
|
391 |
-
<p class="description"><?php esc_html_e( '2-Letter ISO Language Code for the Language you want to insert. (Example: en)', 'wpglobus' ); ?></p>
|
392 |
-
</td>
|
393 |
-
</tr>
|
394 |
-
<tr>
|
395 |
-
<th scope="row"><label
|
396 |
-
for="wpglobus_flags"><?php esc_html_e( 'Language flag', 'wpglobus' ); ?></label>
|
397 |
-
</th>
|
398 |
-
<td>
|
399 |
-
<select id="wpglobus_flags" name="wpglobus_flags" style="width:300px;"
|
400 |
-
class="populate">
|
401 |
-
<?php
|
402 |
-
foreach ( $this->all_flags as $file_name ) :
|
403 |
-
?>
|
404 |
-
<option <?php selected( $this->flag === $file_name ); ?>
|
405 |
-
value="<?php echo esc_attr( $file_name ); ?>"><?php echo esc_html( $file_name ); ?></option>
|
406 |
-
<?php endforeach; ?>
|
407 |
-
</select>
|
408 |
-
</td>
|
409 |
-
</tr>
|
410 |
-
<tr>
|
411 |
-
<th scope="row"><label
|
412 |
-
for="wpglobus_language_name"><?php esc_html_e( 'Name', 'wpglobus' ); ?></label>
|
413 |
-
</th>
|
414 |
-
<td><input name="wpglobus_language_name" type="text" id="wpglobus_language_name"
|
415 |
-
value="<?php echo esc_attr( $this->language_name ); ?>" class="regular-text"/>
|
416 |
-
|
417 |
-
<p class="description"><?php esc_html_e( 'The name of the language in its native alphabet. (Examples: English, Русский)', 'wpglobus' ); ?></p>
|
418 |
-
</td>
|
419 |
-
</tr>
|
420 |
-
<tr>
|
421 |
-
<th scope="row"><label
|
422 |
-
for="wpglobus_en_language_name"><?php esc_html_e( 'Name in English', 'wpglobus' ); ?></label>
|
423 |
-
</th>
|
424 |
-
<td><input name="wpglobus_en_language_name" type="text" id="wpglobus_en_language_name"
|
425 |
-
value="<?php echo esc_attr( $this->en_language_name ); ?>" class="regular-text"/>
|
426 |
-
|
427 |
-
<p class="description"><?php esc_html_e( 'The name of the language in English', 'wpglobus' ); ?></p>
|
428 |
-
</td>
|
429 |
-
</tr>
|
430 |
-
<tr>
|
431 |
-
<th scope="row"><label
|
432 |
-
for="wpglobus_locale"><?php esc_html_e( 'Locale', 'wpglobus' ); ?></label></th>
|
433 |
-
<td><input name="wpglobus_locale" type="text" id="wpglobus_locale"
|
434 |
-
value="<?php echo esc_attr( $this->locale ); ?>"
|
435 |
-
class="regular-text"/>
|
436 |
-
|
437 |
-
<p class="description"><?php esc_html_e( 'PHP/WordPress Locale of the language. (Examples: en_US, ru_RU)', 'wpglobus' ); ?></p>
|
438 |
-
</td>
|
439 |
-
</tr>
|
440 |
-
</table>
|
441 |
-
<?php
|
442 |
-
|
443 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->action
|
444 |
-
|| WPGlobus_Language_Edit_Request::ACTION_ADD === $this->action ) {
|
445 |
-
?>
|
446 |
-
<input class="button button-primary" type="submit" name="submit"
|
447 |
-
value="<?php esc_attr_e( 'Save Changes', 'wpglobus' ); ?>">
|
448 |
-
<?php
|
449 |
-
|
450 |
-
if ( WPGlobus_Language_Edit_Request::ACTION_EDIT === $this->action ) {
|
451 |
-
?>
|
452 |
-
|
453 |
-
<a class="button button-link-delete" style="margin-left: 1em" href="<?php echo esc_url( WPGlobus_Language_Edit_Request::url_language_delete( $this->language_code ) ); ?>">
|
454 |
-
<i class="dashicons dashicons-trash" style="line-height: inherit;"></i>
|
455 |
-
<?php esc_html_e( 'Delete Language', 'wpglobus' ); ?>…</a>
|
456 |
-
<?php
|
457 |
-
}
|
458 |
-
} elseif ( WPGlobus_Language_Edit_Request::ACTION_DELETE === $this->action ) {
|
459 |
-
?>
|
460 |
-
<div class="notice-large wp-ui-notification"><?php esc_html_e( 'Are you sure you want to delete?', 'wpglobus' ); ?></div>
|
461 |
-
<p class="submit"><input class="button button-primary" type="submit" name="delete"
|
462 |
-
value="<?php esc_attr_e( 'Delete Language', 'wpglobus' ); ?>"></p>
|
463 |
-
<?php } ?>
|
464 |
-
|
465 |
-
</form>
|
466 |
-
|
467 |
-
<hr/>
|
468 |
-
<span class="dashicons dashicons-admin-site"></span>
|
469 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_settings() ); ?>">
|
470 |
-
<?php esc_html_e( 'Back to the WPGlobus Settings', 'wpglobus' ); ?>
|
471 |
-
</a>
|
472 |
-
</div>
|
473 |
-
<?php
|
474 |
-
}
|
475 |
-
|
476 |
-
/**
|
477 |
-
* Get flag files from directory
|
478 |
-
*/
|
479 |
-
protected function get_flags() {
|
480 |
-
|
481 |
-
$dir = new DirectoryIterator( WPGlobus::plugin_dir_path() . 'flags/' );
|
482 |
-
|
483 |
-
foreach ( $dir as $file ) {
|
484 |
-
/**
|
485 |
-
* File object
|
486 |
-
*
|
487 |
-
* @var DirectoryIterator $file
|
488 |
-
*/
|
489 |
-
if ( $file->isFile() ) {
|
490 |
-
$this->all_flags[] = $file->getFilename();
|
491 |
-
}
|
492 |
-
}
|
493 |
-
}
|
494 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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class_exists( 'WPGlobus_Plugin_Install' ) ) :
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_Plugin_Install
|
13 |
-
*/
|
14 |
-
class WPGlobus_Plugin_Install {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Fake version for paid plugins to prevent the "Update Now" button from appearing.
|
18 |
-
*
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
const FAKE_VERSION = '999';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Fake active installs for paid plugins.
|
25 |
-
*
|
26 |
-
* @var int
|
27 |
-
*/
|
28 |
-
const FAKE_ACTIVE_INSTALLS = 0;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Fake "Compatible with your version of WordPress" for paid plugins.
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
protected static $fake_compatible_with = '';
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Array of plugin cards.
|
39 |
-
*
|
40 |
-
* @var array
|
41 |
-
*/
|
42 |
-
static protected $plugin_card = array();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Array of paid plugins data.
|
46 |
-
*
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
static protected $paid_plugins = array();
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Array of free plugins data.
|
53 |
-
*
|
54 |
-
* @var array
|
55 |
-
*/
|
56 |
-
static protected $free_plugins = array();
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Controller.
|
60 |
-
*/
|
61 |
-
public static function controller() {
|
62 |
-
|
63 |
-
// phpcs:ignore WordPress.CSRF.NonceVerification.NoNonceVerification
|
64 |
-
if ( empty( $_GET['s'] ) || 'wpglobus' !== strtolower( $_GET['s'] ) ) {
|
65 |
-
return;
|
66 |
-
}
|
67 |
-
|
68 |
-
self::$fake_compatible_with = $GLOBALS['wp_version'];
|
69 |
-
|
70 |
-
self::$plugin_card['free'] = array();
|
71 |
-
self::$plugin_card['paid'] = array();
|
72 |
-
|
73 |
-
self::setup_paid_plugins();
|
74 |
-
|
75 |
-
// Enqueue the CSS & JS scripts.
|
76 |
-
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
|
77 |
-
|
78 |
-
add_filter( 'plugins_api_result', array( __CLASS__, 'filter__plugins_api_result' ), 10, 3 );
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* List of the premium WPGlobus extensions.
|
83 |
-
* This file is created manually.
|
84 |
-
*/
|
85 |
-
protected static function setup_paid_plugins() {
|
86 |
-
|
87 |
-
self::$paid_plugins = array();
|
88 |
-
|
89 |
-
$data_file = WPGlobus::data_path() . '/paid_plugins.json';
|
90 |
-
|
91 |
-
if ( is_readable( $data_file ) ) {
|
92 |
-
$_json = file_get_contents( $data_file );
|
93 |
-
self::$paid_plugins = json_decode( $_json, true );
|
94 |
-
uasort( self::$paid_plugins, array( __CLASS__, 'sort_paid_plugins' ) );
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Callback for sorting the paid_plugins array.
|
100 |
-
*
|
101 |
-
* @param array $a First.
|
102 |
-
* @param array $b Second.
|
103 |
-
*
|
104 |
-
* @return int
|
105 |
-
*/
|
106 |
-
public static function sort_paid_plugins( $a, $b ) {
|
107 |
-
return $a['order'] > $b['order'];
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Filter api results
|
112 |
-
*
|
113 |
-
* @param stdClass|WP_Error $res Response object or WP_Error.
|
114 |
-
* @param string $action The type of information being requested from the Plugin Install API.
|
115 |
-
* @param stdClass $args Plugin API arguments.
|
116 |
-
*
|
117 |
-
* @return stdClass|WP_Error
|
118 |
-
*/
|
119 |
-
public static function filter__plugins_api_result(
|
120 |
-
$res,
|
121 |
-
// @formatter:off
|
122 |
-
/* @noinspection PhpUnusedParameterInspection */ $action,
|
123 |
-
/* @noinspection PhpUnusedParameterInspection */ $args
|
124 |
-
// @formatter:on
|
125 |
-
) {
|
126 |
-
|
127 |
-
if ( is_wp_error( $res ) ) {
|
128 |
-
return $res;
|
129 |
-
}
|
130 |
-
|
131 |
-
if ( empty( $res->plugins ) ) {
|
132 |
-
return $res;
|
133 |
-
}
|
134 |
-
|
135 |
-
foreach ( (array) $res->plugins as $key => $plugin ) {
|
136 |
-
if ( is_array( $plugin ) ) {
|
137 |
-
/** @since 2.1.10 */
|
138 |
-
$plugin = (object) $plugin;
|
139 |
-
}
|
140 |
-
if ( false === strpos( $plugin->slug, 'wpglobus' ) ) {
|
141 |
-
unset( $res->plugins[ $key ] );
|
142 |
-
} else {
|
143 |
-
|
144 |
-
if ( 'wpglobus-for-black-studio-tinymce-widget' === $plugin->slug ) {
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Set correct slug for the
|
148 |
-
* `WPGlobus for Black Studio TinyMCE Widget` plugin.
|
149 |
-
*
|
150 |
-
* @since 1.6.3
|
151 |
-
*/
|
152 |
-
$plugin->slug = 'wpglobus-for-black-studio-widget';
|
153 |
-
|
154 |
-
self::$plugin_card['free'][] = $plugin->slug;
|
155 |
-
|
156 |
-
self::$free_plugins[ $plugin->slug ]['extra_data']['correctLink'] = 'wpglobus-for-black-studio-tinymce-widget';
|
157 |
-
|
158 |
-
} else {
|
159 |
-
self::$plugin_card['free'][] = $plugin->slug;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
$url_wpglobus_site = WPGlobus_Utils::url_wpglobus_site();
|
165 |
-
|
166 |
-
$all_products = self::get_all_product_info();
|
167 |
-
|
168 |
-
foreach ( self::$paid_plugins as $plugin => $plugin_data ) {
|
169 |
-
|
170 |
-
$plugin_file = implode( '/', array( WP_PLUGIN_DIR, $plugin_data['slug'], $plugin_data['loader'] ) );
|
171 |
-
|
172 |
-
if ( is_readable( $plugin_file ) ) {
|
173 |
-
// Plugin is installed.
|
174 |
-
self::$paid_plugins[ $plugin ]['plugin_data'] = get_plugin_data( $plugin_file, false );
|
175 |
-
} else {
|
176 |
-
self::$paid_plugins[ $plugin ]['plugin_data'] = null;
|
177 |
-
|
178 |
-
$product_slug = ( isset( $plugin_data['product_slug'] ) ? $plugin_data['product_slug'] : $plugin );
|
179 |
-
|
180 |
-
if ( isset( $all_products[ $product_slug ] ) ) {
|
181 |
-
$plugin_info = $all_products[ $product_slug ];
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Titles come as multilingual strings but only in 2 languages ['en','ru']
|
185 |
-
* because the WPGlobus website has only those.
|
186 |
-
* So we need to force `en` language code if the admin language
|
187 |
-
* is out of the list.
|
188 |
-
*/
|
189 |
-
$language = WPGlobus::Config()->language;
|
190 |
-
if ( ! in_array( $language, array( 'en', 'ru' ), true ) ) {
|
191 |
-
$language = 'en';
|
192 |
-
}
|
193 |
-
$_plugin_title = WPGlobus_Core::text_filter( $plugin_info['title'], $language );
|
194 |
-
|
195 |
-
self::$paid_plugins[ $plugin ]['plugin_data'] = array(
|
196 |
-
'Description' => '', // TODO.
|
197 |
-
'Name' => $_plugin_title,
|
198 |
-
'Title' => $_plugin_title,
|
199 |
-
'Version' => $plugin_info['_api_new_version'],
|
200 |
-
'PluginURI' => $url_wpglobus_site . 'product/' .
|
201 |
-
$product_slug . '/',
|
202 |
-
);
|
203 |
-
}
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Prepend the premium add-ons to the list of plugins.
|
209 |
-
*/
|
210 |
-
foreach ( self::$paid_plugins as $slug => $paid_plugin ) {
|
211 |
-
|
212 |
-
$info = self::plugin_info_template();
|
213 |
-
|
214 |
-
$info->slug = $slug;
|
215 |
-
|
216 |
-
$info->icons['default'] = WPGlobus::internal_images_url() . '/' . $paid_plugin['image_file'];
|
217 |
-
$info->icons['1x'] = $info->icons['default'];
|
218 |
-
$info->icons['2x'] = $info->icons['default'];
|
219 |
-
|
220 |
-
if ( ! empty( $paid_plugin['plugin_data'] ) ) {
|
221 |
-
$info->name = $paid_plugin['plugin_data']['Name'];
|
222 |
-
$info->short_description = $paid_plugin['plugin_data']['Description'];
|
223 |
-
$info->homepage = $paid_plugin['plugin_data']['PluginURI'];
|
224 |
-
} else {
|
225 |
-
$info->name = $slug;
|
226 |
-
}
|
227 |
-
|
228 |
-
self::$plugin_card['paid'][] = $slug;
|
229 |
-
|
230 |
-
self::$paid_plugins[ $slug ]['card'] = $info;
|
231 |
-
|
232 |
-
self::$paid_plugins[ $slug ]['extra_data']['product_url'] =
|
233 |
-
self::$paid_plugins[ $slug ]['extra_data']['details_url'] =
|
234 |
-
$info->homepage;
|
235 |
-
|
236 |
-
/**
|
237 |
-
* @since 2.4.2
|
238 |
-
*/
|
239 |
-
if ( isset( $paid_plugin['available'] ) && ( empty($paid_plugin['available']) || false === $paid_plugin['available'] ) ) {
|
240 |
-
// Don't add unavailable plugin in response.
|
241 |
-
} else {
|
242 |
-
array_unshift( $res->plugins, $info );
|
243 |
-
}
|
244 |
-
}
|
245 |
-
|
246 |
-
$res->info['results'] = count( $res->plugins );
|
247 |
-
|
248 |
-
return $res;
|
249 |
-
}
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Get information about all premium plugins.
|
253 |
-
* This file is created automatically at build. Do not edit!
|
254 |
-
*
|
255 |
-
* @return array[]
|
256 |
-
*/
|
257 |
-
protected static function get_all_product_info() {
|
258 |
-
$all_product_info = array();
|
259 |
-
|
260 |
-
$data_file = WPGlobus::data_path() . '/wpglobus-product-info.json';
|
261 |
-
|
262 |
-
if ( is_readable( $data_file ) ) {
|
263 |
-
$all_product_info_json = file_get_contents( $data_file );
|
264 |
-
$all_product_info = json_decode( $all_product_info_json, true );
|
265 |
-
}
|
266 |
-
|
267 |
-
return $all_product_info;
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Template for plugin info.
|
272 |
-
*
|
273 |
-
* @return stdClass
|
274 |
-
*/
|
275 |
-
protected static function plugin_info_template() {
|
276 |
-
$url_wpglobus_site = WPGlobus_Utils::url_wpglobus_site();
|
277 |
-
|
278 |
-
$template = new stdClass();
|
279 |
-
$template->name = '';
|
280 |
-
$template->short_description = '';
|
281 |
-
$template->author = '<a href="' . $url_wpglobus_site . '">WPGlobus</a>';
|
282 |
-
$template->author_profile = $url_wpglobus_site;
|
283 |
-
$template->homepage = $url_wpglobus_site;
|
284 |
-
$template->slug = '';
|
285 |
-
$template->rating = 100;
|
286 |
-
$template->num_ratings = 0;
|
287 |
-
$template->active_installs = self::FAKE_ACTIVE_INSTALLS;
|
288 |
-
$template->version = self::FAKE_VERSION;
|
289 |
-
$template->tested = self::$fake_compatible_with;
|
290 |
-
$template->icons['default'] = '';
|
291 |
-
$template->icons['2x'] = '';
|
292 |
-
$template->icons['1x'] = '';
|
293 |
-
$template->last_updated = date( 'c' );
|
294 |
-
|
295 |
-
return $template;
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Enqueue admin JS scripts.
|
300 |
-
*
|
301 |
-
* @param string $hook_page The current admin page.
|
302 |
-
*/
|
303 |
-
public static function enqueue_scripts( $hook_page ) {
|
304 |
-
|
305 |
-
if ( 'plugin-install.php' === $hook_page ) {
|
306 |
-
|
307 |
-
$i18n = array();
|
308 |
-
$i18n['current_version'] = esc_html__( 'Current Version', 'wpglobus' );
|
309 |
-
$i18n['get_it'] = esc_html__( 'Get it now!', 'wpglobus' );
|
310 |
-
$i18n['card_header'] = esc_html__( 'Premium add-on', 'wpglobus' );
|
311 |
-
$i18n['installed'] = esc_html__( 'Installed', 'wpglobus' );
|
312 |
-
|
313 |
-
wp_register_script(
|
314 |
-
'wpglobus-plugin-install',
|
315 |
-
WPGlobus::$PLUGIN_DIR_URL . '/includes/js/wpglobus-plugin-install' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
316 |
-
array( 'jquery' ),
|
317 |
-
WPGLOBUS_VERSION,
|
318 |
-
true
|
319 |
-
);
|
320 |
-
wp_enqueue_script( 'wpglobus-plugin-install' );
|
321 |
-
wp_localize_script(
|
322 |
-
'wpglobus-plugin-install',
|
323 |
-
'WPGlobusPluginInstall',
|
324 |
-
array(
|
325 |
-
'version' => WPGLOBUS_VERSION,
|
326 |
-
'hookPage' => $hook_page,
|
327 |
-
'pluginCard' => self::$plugin_card,
|
328 |
-
'pluginData' => array_merge( self::$paid_plugins, self::$free_plugins ),
|
329 |
-
'i18n' => $i18n,
|
330 |
-
)
|
331 |
-
);
|
332 |
-
}
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/class-wpglobus-customize-themes.php
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus Customize Themes.
|
4 |
-
*
|
5 |
-
* @package WPGlobus
|
6 |
-
* @since 1.9.12
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Customize_Themes.
|
11 |
-
*/
|
12 |
-
if ( ! class_exists('WPGlobus_Customize_Themes') ) :
|
13 |
-
|
14 |
-
class WPGlobus_Customize_Themes {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Current theme.
|
18 |
-
*/
|
19 |
-
protected static $current_theme = null;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Names of disabled themes in lowercase format.
|
23 |
-
*
|
24 |
-
* @var string[]
|
25 |
-
*/
|
26 |
-
protected static $disabled_themes = array(
|
27 |
-
'customizr',
|
28 |
-
'customizr pro',
|
29 |
-
'experon',
|
30 |
-
'gwangi', // @since 2.3.12
|
31 |
-
);
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Get disabled themes.
|
35 |
-
*
|
36 |
-
* @return string[]
|
37 |
-
*/
|
38 |
-
public static function disabled_themes() {
|
39 |
-
$disabled_themes = self::$disabled_themes;
|
40 |
-
return $disabled_themes;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get current theme name.
|
45 |
-
*/
|
46 |
-
public static function current_theme() {
|
47 |
-
if ( is_null(self::$current_theme) ) {
|
48 |
-
self::$current_theme = wp_get_theme();
|
49 |
-
}
|
50 |
-
return self::get_theme( 'name' );
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get current theme or its property.
|
55 |
-
*
|
56 |
-
* @param string $param
|
57 |
-
*
|
58 |
-
* @return string|WP_Theme
|
59 |
-
*/
|
60 |
-
public static function get_theme( $param = '' ) {
|
61 |
-
if ( is_null(self::$current_theme) ) {
|
62 |
-
self::$current_theme = wp_get_theme();
|
63 |
-
}
|
64 |
-
if ( 'name' === $param ) {
|
65 |
-
return self::$current_theme->name;
|
66 |
-
}
|
67 |
-
|
68 |
-
return self::$current_theme;
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Get current theme in lowercase.
|
74 |
-
*
|
75 |
-
* @return string
|
76 |
-
*/
|
77 |
-
public static function get_theme_name_lc() {
|
78 |
-
return strtolower( self::get_theme( 'name' ) );
|
79 |
-
}
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/class-wpglobus-customize140.php
DELETED
@@ -1,282 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Multilingual Customizer
|
4 |
-
* @package WPGlobus\Admin\Customizer
|
5 |
-
* @since 1.4.0
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'WPGlobus_Customize' ) ) :
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class WPGlobus_Customize
|
12 |
-
*/
|
13 |
-
class WPGlobus_Customize {
|
14 |
-
|
15 |
-
public static function controller() {
|
16 |
-
/**
|
17 |
-
* @see \WP_Customize_Manager::wp_loaded
|
18 |
-
* It calls the `customize_register` action first,
|
19 |
-
* and then - the `customize_preview_init` action
|
20 |
-
*/
|
21 |
-
/*
|
22 |
-
add_action( 'customize_register', array(
|
23 |
-
'WPGlobus_Customize',
|
24 |
-
'action__customize_register'
|
25 |
-
) ); */
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @since 1.5.0
|
29 |
-
*/
|
30 |
-
if ( WPGlobus_WP::is_pagenow( 'customize.php' ) ) {
|
31 |
-
require_once 'wpglobus-customize-filters.php';
|
32 |
-
}
|
33 |
-
|
34 |
-
add_action( 'customize_preview_init', array(
|
35 |
-
'WPGlobus_Customize',
|
36 |
-
'action__customize_preview_init'
|
37 |
-
) );
|
38 |
-
|
39 |
-
/**
|
40 |
-
* This is called by wp-admin/customize.php
|
41 |
-
*/
|
42 |
-
add_action( 'customize_controls_enqueue_scripts', array(
|
43 |
-
'WPGlobus_Customize',
|
44 |
-
'action__customize_controls_enqueue_scripts'
|
45 |
-
), 1000 );
|
46 |
-
|
47 |
-
if ( WPGlobus_WP::is_admin_doing_ajax() ) {
|
48 |
-
add_filter( 'clean_url', array(
|
49 |
-
'WPGlobus_Customize',
|
50 |
-
'filter__clean_url'
|
51 |
-
), 10, 2 );
|
52 |
-
}
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Filter a string to check translations for URL.
|
58 |
-
* // We build multilingual URLs in customizer using the ':::' delimiter.
|
59 |
-
* We build multilingual URLs in customizer using the '|||' delimiter.
|
60 |
-
* See wpglobus-customize-control.js
|
61 |
-
*
|
62 |
-
* @note To work correctly, value of $url should begin with URL for default language.
|
63 |
-
* @see esc_url() - the 'clean_url' filter
|
64 |
-
* @since 1.3.0
|
65 |
-
*
|
66 |
-
* @param string $url The cleaned URL.
|
67 |
-
* @param string $original_url The URL prior to cleaning.
|
68 |
-
*
|
69 |
-
* @return string
|
70 |
-
*/
|
71 |
-
public static function filter__clean_url( $url, $original_url ) {
|
72 |
-
|
73 |
-
if ( false !== strpos( $original_url, '|||' ) ) {
|
74 |
-
$arr1 = array();
|
75 |
-
$arr = explode( '|||', $original_url );
|
76 |
-
foreach ( $arr as $k => $val ) {
|
77 |
-
// Note: 'null' is a string, not real `null`.
|
78 |
-
if ( 'null' !== $val ) {
|
79 |
-
$arr1[ WPGlobus::Config()->enabled_languages[ $k ] ] = $val;
|
80 |
-
}
|
81 |
-
}
|
82 |
-
return WPGlobus_Utils::build_multilingual_string( $arr1 );
|
83 |
-
}
|
84 |
-
|
85 |
-
return $url;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Add multilingual controls.
|
90 |
-
* The original controls will be hidden.
|
91 |
-
* @param WP_Customize_Manager $wp_customize
|
92 |
-
*/
|
93 |
-
public static function action__customize_register( WP_Customize_Manager $wp_customize ) {}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Load Customize Preview JS
|
97 |
-
* Used by hook: 'customize_preview_init'
|
98 |
-
* @see 'customize_preview_init'
|
99 |
-
*/
|
100 |
-
public static function action__customize_preview_init() {
|
101 |
-
wp_enqueue_script(
|
102 |
-
'wpglobus-customize-preview',
|
103 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-preview' .
|
104 |
-
WPGlobus::SCRIPT_SUFFIX() . '.js',
|
105 |
-
array( 'jquery', 'customize-preview' ),
|
106 |
-
WPGLOBUS_VERSION,
|
107 |
-
true
|
108 |
-
);
|
109 |
-
wp_localize_script(
|
110 |
-
'wpglobus-customize-preview',
|
111 |
-
'WPGlobusCustomize',
|
112 |
-
array(
|
113 |
-
'version' => WPGLOBUS_VERSION,
|
114 |
-
'blogname' => WPGlobus_Core::text_filter( get_option( 'blogname' ), WPGlobus::Config()->language ),
|
115 |
-
'blogdescription' => WPGlobus_Core::text_filter( get_option( 'blogdescription' ), WPGlobus::Config()->language )
|
116 |
-
)
|
117 |
-
);
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Load Customize Control JS
|
122 |
-
*/
|
123 |
-
public static function action__customize_controls_enqueue_scripts() {
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @see wp.customize.control elements
|
127 |
-
* for example wp.customize.control('blogname');
|
128 |
-
*/
|
129 |
-
$disabled_setting_mask = array();
|
130 |
-
|
131 |
-
/** navigation menu elements */
|
132 |
-
$disabled_setting_mask[] = 'nav_menu_item';
|
133 |
-
$disabled_setting_mask[] = 'nav_menu[';
|
134 |
-
$disabled_setting_mask[] = 'nav_menu_locations';
|
135 |
-
$disabled_setting_mask[] = 'new_menu_name';
|
136 |
-
|
137 |
-
/** widgets */
|
138 |
-
$disabled_setting_mask[] = 'widgets';
|
139 |
-
|
140 |
-
/** color elements */
|
141 |
-
$disabled_setting_mask[] = 'color';
|
142 |
-
|
143 |
-
/** yoast seo */
|
144 |
-
$disabled_setting_mask[] = 'wpseo';
|
145 |
-
|
146 |
-
/** css elements */
|
147 |
-
$disabled_setting_mask[] = 'css';
|
148 |
-
|
149 |
-
/** social networks elements */
|
150 |
-
$disabled_setting_mask[] = 'facebook';
|
151 |
-
$disabled_setting_mask[] = 'twitter';
|
152 |
-
$disabled_setting_mask[] = 'linkedin';
|
153 |
-
$disabled_setting_mask[] = 'behance';
|
154 |
-
$disabled_setting_mask[] = 'dribbble';
|
155 |
-
$disabled_setting_mask[] = 'instagram';
|
156 |
-
/** since 1.4.4 */
|
157 |
-
$disabled_setting_mask[] = 'tumblr';
|
158 |
-
$disabled_setting_mask[] = 'flickr';
|
159 |
-
$disabled_setting_mask[] = 'wordpress';
|
160 |
-
$disabled_setting_mask[] = 'youtube';
|
161 |
-
$disabled_setting_mask[] = 'pinterest';
|
162 |
-
$disabled_setting_mask[] = 'github';
|
163 |
-
$disabled_setting_mask[] = 'rss';
|
164 |
-
$disabled_setting_mask[] = 'google';
|
165 |
-
$disabled_setting_mask[] = 'email';
|
166 |
-
/** since 1.5.9 */
|
167 |
-
$disabled_setting_mask[] = 'dropbox';
|
168 |
-
$disabled_setting_mask[] = 'foursquare';
|
169 |
-
$disabled_setting_mask[] = 'vine';
|
170 |
-
$disabled_setting_mask[] = 'vimeo';
|
171 |
-
/** since 1.6.0 */
|
172 |
-
$disabled_setting_mask[] = 'yelp';
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Filter to disable fields in customizer.
|
176 |
-
* @see wp.customize.control elements
|
177 |
-
* Returning array.
|
178 |
-
* @since 1.4.0
|
179 |
-
*
|
180 |
-
* @param array $disabled_setting_mask An array of disabled masks.
|
181 |
-
*/
|
182 |
-
$disabled_setting_mask = apply_filters( 'wpglobus_customize_disabled_setting_mask', $disabled_setting_mask );
|
183 |
-
|
184 |
-
$element_selector = array( 'input[type=text]', 'textarea' );
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Filter for element selectors.
|
188 |
-
* Returning array.
|
189 |
-
* @since 1.4.0
|
190 |
-
*
|
191 |
-
* @param array $element_selector An array of selectors.
|
192 |
-
*/
|
193 |
-
$element_selector = apply_filters( 'wpglobus_customize_element_selector', $element_selector );
|
194 |
-
|
195 |
-
$set_link_by = array( 'link', 'url' );
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Filter of masks to determine links.
|
199 |
-
* @see value data-customize-setting-link of element
|
200 |
-
* Returning array.
|
201 |
-
* @since 1.4.0
|
202 |
-
*
|
203 |
-
* @param array $set_link_by An array of masks.
|
204 |
-
*/
|
205 |
-
$set_link_by = apply_filters( 'wpglobus_customize_setlinkby', $set_link_by );
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Filter of disabled sections.
|
209 |
-
*
|
210 |
-
* Returning array.
|
211 |
-
* @since 1.5.0
|
212 |
-
*
|
213 |
-
* @param array $disabled_sections An array of sections.
|
214 |
-
*/
|
215 |
-
$disabled_sections = array();
|
216 |
-
|
217 |
-
$disabled_sections = apply_filters( 'wpglobus_customize_disabled_sections', $disabled_sections );
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Generate language select button for customizer
|
221 |
-
* @since 1.6.0
|
222 |
-
*
|
223 |
-
* @todo http://stackoverflow.com/questions/9607252/how-to-detect-when-an-element-over-another-element-in-javascript
|
224 |
-
*/
|
225 |
-
$attributes['href'] = '#';
|
226 |
-
$attributes['style'] = 'margin-left:48px;';
|
227 |
-
$attributes['class'] = 'customize-controls-close wpglobus-customize-selector';
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Filter of attributes to generate language selector button.
|
231 |
-
* For example @see Divi theme http://www.elegantthemes.com/gallery/divi/ .
|
232 |
-
*
|
233 |
-
* Returning array.
|
234 |
-
* @since 1.6.0
|
235 |
-
*
|
236 |
-
* @param array $attributes An array of attributes.
|
237 |
-
* @param string Name of current theme.
|
238 |
-
*/
|
239 |
-
$attributes = apply_filters( 'wpglobus_customize_language_selector_attrs', $attributes, WPGlobus_Customize_Options::get_theme( 'name' ) );
|
240 |
-
|
241 |
-
$string = '';
|
242 |
-
|
243 |
-
foreach ( $attributes as $attribute => $value ) {
|
244 |
-
if ( null !== $value ){
|
245 |
-
$string .= esc_attr( $attribute ) . '="' . esc_attr( $value ) . '" ';
|
246 |
-
}
|
247 |
-
}
|
248 |
-
|
249 |
-
$selector_button = sprintf(
|
250 |
-
'<a %1$s>%2$s</a>',
|
251 |
-
trim( $string ),
|
252 |
-
'<span class="wpglobus-globe"></span>'
|
253 |
-
);
|
254 |
-
|
255 |
-
wp_enqueue_script(
|
256 |
-
'wpglobus-customize-control140',
|
257 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-control140' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
258 |
-
array( 'jquery' ),
|
259 |
-
WPGLOBUS_VERSION,
|
260 |
-
true
|
261 |
-
);
|
262 |
-
wp_localize_script(
|
263 |
-
'wpglobus-customize-control140',
|
264 |
-
'WPGlobusCustomize',
|
265 |
-
array(
|
266 |
-
'version' => WPGLOBUS_VERSION,
|
267 |
-
'selectorButton' => $selector_button,
|
268 |
-
'languageAdmin' => WPGlobus::Config()->language,
|
269 |
-
'disabledSettingMask' => $disabled_setting_mask,
|
270 |
-
'elementSelector' => $element_selector,
|
271 |
-
'setLinkBy' => $set_link_by,
|
272 |
-
'disabledSections' => $disabled_sections,
|
273 |
-
'controlClass' => 'wpglobus-customize-control',
|
274 |
-
)
|
275 |
-
);
|
276 |
-
|
277 |
-
}
|
278 |
-
|
279 |
-
} // class
|
280 |
-
|
281 |
-
endif;
|
282 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/class-wpglobus-customize170.php
DELETED
@@ -1,300 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Multilingual Customizer
|
4 |
-
* @package WPGlobus\Admin\Customizer
|
5 |
-
* @since 1.7.0
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'WPGlobus_Customize' ) ) :
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class WPGlobus_Customize
|
12 |
-
*/
|
13 |
-
class WPGlobus_Customize {
|
14 |
-
|
15 |
-
public static function controller() {
|
16 |
-
/**
|
17 |
-
* @see \WP_Customize_Manager::wp_loaded
|
18 |
-
* It calls the `customize_register` action first,
|
19 |
-
* and then - the `customize_preview_init` action
|
20 |
-
*/
|
21 |
-
/*
|
22 |
-
add_action( 'customize_register', array(
|
23 |
-
'WPGlobus_Customize',
|
24 |
-
'action__customize_register'
|
25 |
-
) ); */
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @since 1.5.0
|
29 |
-
*/
|
30 |
-
if ( WPGlobus_WP::is_pagenow( 'customize.php' ) ) {
|
31 |
-
require_once 'wpglobus-customize-filters.php';
|
32 |
-
}
|
33 |
-
|
34 |
-
add_action( 'customize_preview_init', array(
|
35 |
-
'WPGlobus_Customize',
|
36 |
-
'action__customize_preview_init'
|
37 |
-
) );
|
38 |
-
|
39 |
-
/**
|
40 |
-
* This is called by wp-admin/customize.php
|
41 |
-
*/
|
42 |
-
add_action( 'customize_controls_enqueue_scripts', array(
|
43 |
-
'WPGlobus_Customize',
|
44 |
-
'action__customize_controls_enqueue_scripts'
|
45 |
-
), 1000 );
|
46 |
-
|
47 |
-
if ( WPGlobus_WP::is_admin_doing_ajax() ) {
|
48 |
-
add_filter( 'clean_url', array(
|
49 |
-
'WPGlobus_Customize',
|
50 |
-
'filter__clean_url'
|
51 |
-
), 10, 2 );
|
52 |
-
}
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Filter a string to check translations for URL.
|
58 |
-
* // We build multilingual URLs in customizer using the ':::' delimiter.
|
59 |
-
* We build multilingual URLs in customizer using the '|||' delimiter.
|
60 |
-
* See wpglobus-customize-control.js
|
61 |
-
*
|
62 |
-
* @note To work correctly, value of $url should begin with URL for default language.
|
63 |
-
* @see esc_url() - the 'clean_url' filter
|
64 |
-
* @since 1.3.0
|
65 |
-
*
|
66 |
-
* @param string $url The cleaned URL.
|
67 |
-
* @param string $original_url The URL prior to cleaning.
|
68 |
-
*
|
69 |
-
* @return string
|
70 |
-
*/
|
71 |
-
public static function filter__clean_url( $url, $original_url ) {
|
72 |
-
|
73 |
-
if ( false !== strpos( $original_url, '|||' ) ) {
|
74 |
-
$arr1 = array();
|
75 |
-
$arr = explode( '|||', $original_url );
|
76 |
-
foreach ( $arr as $k => $val ) {
|
77 |
-
// Note: 'null' is a string, not real `null`.
|
78 |
-
if ( 'null' !== $val ) {
|
79 |
-
$arr1[ WPGlobus::Config()->enabled_languages[ $k ] ] = $val;
|
80 |
-
}
|
81 |
-
}
|
82 |
-
return WPGlobus_Utils::build_multilingual_string( $arr1 );
|
83 |
-
}
|
84 |
-
|
85 |
-
return $url;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Add multilingual controls.
|
90 |
-
* The original controls will be hidden.
|
91 |
-
* @param WP_Customize_Manager $wp_customize
|
92 |
-
*/
|
93 |
-
public static function action__customize_register( WP_Customize_Manager $wp_customize ) {}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Load Customize Preview JS
|
97 |
-
* Used by hook: 'customize_preview_init'
|
98 |
-
* @see 'customize_preview_init'
|
99 |
-
*/
|
100 |
-
public static function action__customize_preview_init() {
|
101 |
-
wp_enqueue_script(
|
102 |
-
'wpglobus-customize-preview',
|
103 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-preview' .
|
104 |
-
WPGlobus::SCRIPT_SUFFIX() . '.js',
|
105 |
-
array( 'jquery', 'customize-preview' ),
|
106 |
-
WPGLOBUS_VERSION,
|
107 |
-
true
|
108 |
-
);
|
109 |
-
wp_localize_script(
|
110 |
-
'wpglobus-customize-preview',
|
111 |
-
'WPGlobusCustomize',
|
112 |
-
array(
|
113 |
-
'version' => WPGLOBUS_VERSION,
|
114 |
-
'blogname' => WPGlobus_Core::text_filter( get_option( 'blogname' ), WPGlobus::Config()->language ),
|
115 |
-
'blogdescription' => WPGlobus_Core::text_filter( get_option( 'blogdescription' ), WPGlobus::Config()->language )
|
116 |
-
)
|
117 |
-
);
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Load Customize Control JS
|
122 |
-
*/
|
123 |
-
public static function action__customize_controls_enqueue_scripts() {
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @see wp.customize.control elements
|
127 |
-
* for example wp.customize.control('blogname');
|
128 |
-
*/
|
129 |
-
$disabled_setting_mask = array();
|
130 |
-
|
131 |
-
/** navigation menu elements */
|
132 |
-
$disabled_setting_mask[] = 'nav_menu_item';
|
133 |
-
$disabled_setting_mask[] = 'nav_menu[';
|
134 |
-
$disabled_setting_mask[] = 'nav_menu_locations';
|
135 |
-
$disabled_setting_mask[] = 'new_menu_name';
|
136 |
-
|
137 |
-
/** widgets */
|
138 |
-
$disabled_setting_mask[] = 'widgets';
|
139 |
-
|
140 |
-
/** color elements */
|
141 |
-
$disabled_setting_mask[] = 'color';
|
142 |
-
|
143 |
-
/** yoast seo */
|
144 |
-
$disabled_setting_mask[] = 'wpseo';
|
145 |
-
|
146 |
-
/** css elements */
|
147 |
-
$disabled_setting_mask[] = 'css';
|
148 |
-
|
149 |
-
/** social networks elements */
|
150 |
-
$disabled_setting_mask[] = 'facebook';
|
151 |
-
$disabled_setting_mask[] = 'twitter';
|
152 |
-
$disabled_setting_mask[] = 'linkedin';
|
153 |
-
$disabled_setting_mask[] = 'behance';
|
154 |
-
$disabled_setting_mask[] = 'dribbble';
|
155 |
-
$disabled_setting_mask[] = 'instagram';
|
156 |
-
/** since 1.4.4 */
|
157 |
-
$disabled_setting_mask[] = 'tumblr';
|
158 |
-
$disabled_setting_mask[] = 'flickr';
|
159 |
-
$disabled_setting_mask[] = 'wordpress';
|
160 |
-
$disabled_setting_mask[] = 'youtube';
|
161 |
-
$disabled_setting_mask[] = 'pinterest';
|
162 |
-
$disabled_setting_mask[] = 'github';
|
163 |
-
$disabled_setting_mask[] = 'rss';
|
164 |
-
$disabled_setting_mask[] = 'google';
|
165 |
-
$disabled_setting_mask[] = 'email';
|
166 |
-
/** since 1.5.9 */
|
167 |
-
$disabled_setting_mask[] = 'dropbox';
|
168 |
-
$disabled_setting_mask[] = 'foursquare';
|
169 |
-
$disabled_setting_mask[] = 'vine';
|
170 |
-
$disabled_setting_mask[] = 'vimeo';
|
171 |
-
/** since 1.6.0 */
|
172 |
-
$disabled_setting_mask[] = 'yelp';
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Exclude fields from Static Front Page section.
|
176 |
-
* It may be added to customizer in many themes.
|
177 |
-
*
|
178 |
-
* @since 1.7.6
|
179 |
-
*/
|
180 |
-
$disabled_setting_mask[] = 'page_on_front';
|
181 |
-
$disabled_setting_mask[] = 'page_for_posts';
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Filter to disable fields in customizer.
|
185 |
-
* @see wp.customize.control elements
|
186 |
-
* Returning array.
|
187 |
-
* @since 1.4.0
|
188 |
-
*
|
189 |
-
* @param array $disabled_setting_mask An array of disabled masks.
|
190 |
-
*/
|
191 |
-
$disabled_setting_mask = apply_filters( 'wpglobus_customize_disabled_setting_mask', $disabled_setting_mask );
|
192 |
-
|
193 |
-
$element_selector = array( 'input[type=text]', 'textarea' );
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Filter for element selectors.
|
197 |
-
* Returning array.
|
198 |
-
* @since 1.4.0
|
199 |
-
*
|
200 |
-
* @param array $element_selector An array of selectors.
|
201 |
-
*/
|
202 |
-
$element_selector = apply_filters( 'wpglobus_customize_element_selector', $element_selector );
|
203 |
-
|
204 |
-
$set_link_by = array( 'link', 'url' );
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Filter of masks to determine links.
|
208 |
-
* @see value data-customize-setting-link of element
|
209 |
-
* Returning array.
|
210 |
-
* @since 1.4.0
|
211 |
-
*
|
212 |
-
* @param array $set_link_by An array of masks.
|
213 |
-
*/
|
214 |
-
$set_link_by = apply_filters( 'wpglobus_customize_setlinkby', $set_link_by );
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Filter of disabled sections.
|
218 |
-
*
|
219 |
-
* Returning array.
|
220 |
-
* @since 1.5.0
|
221 |
-
*
|
222 |
-
* @param array $disabled_sections An array of sections.
|
223 |
-
*/
|
224 |
-
$disabled_sections = array();
|
225 |
-
|
226 |
-
$disabled_sections = apply_filters( 'wpglobus_customize_disabled_sections', $disabled_sections );
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Generate language select button for customizer
|
230 |
-
* @since 1.6.0
|
231 |
-
*
|
232 |
-
* @todo http://stackoverflow.com/questions/9607252/how-to-detect-when-an-element-over-another-element-in-javascript
|
233 |
-
*/
|
234 |
-
$attributes['href'] = '#';
|
235 |
-
$attributes['style'] = 'margin-left:48px;';
|
236 |
-
$attributes['class'] = 'customize-controls-close wpglobus-customize-selector';
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Filter of attributes to generate language selector button.
|
240 |
-
* For example @see Divi theme http://www.elegantthemes.com/gallery/divi/ .
|
241 |
-
*
|
242 |
-
* Returning array.
|
243 |
-
* @since 1.6.0
|
244 |
-
*
|
245 |
-
* @param array $attributes An array of attributes.
|
246 |
-
* @param string Name of current theme.
|
247 |
-
*/
|
248 |
-
$attributes = apply_filters( 'wpglobus_customize_language_selector_attrs', $attributes, WPGlobus_Customize_Options::get_theme( 'name' ) );
|
249 |
-
|
250 |
-
$string = '';
|
251 |
-
|
252 |
-
foreach ( $attributes as $attribute => $value ) {
|
253 |
-
if ( null !== $value ){
|
254 |
-
$string .= esc_attr( $attribute ) . '="' . esc_attr( $value ) . '" ';
|
255 |
-
}
|
256 |
-
}
|
257 |
-
|
258 |
-
$selector_button = sprintf(
|
259 |
-
'<a %1$s>%2$s</a>',
|
260 |
-
trim( $string ),
|
261 |
-
'<span class="wpglobus-globe"></span>'
|
262 |
-
);
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Since 1.7.9
|
266 |
-
*/
|
267 |
-
$changeset_uuid = null;
|
268 |
-
if ( ! empty( $_GET['changeset_uuid'] ) ) { // WPCS: input var ok, sanitization ok.
|
269 |
-
$changeset_uuid = sanitize_text_field( wp_unslash( $_GET['changeset_uuid'] ) ); // WPCS: input var ok.
|
270 |
-
}
|
271 |
-
|
272 |
-
wp_enqueue_script(
|
273 |
-
'wpglobus-customize-control170',
|
274 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-customize-control170' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
275 |
-
array( 'jquery' ),
|
276 |
-
WPGLOBUS_VERSION,
|
277 |
-
true
|
278 |
-
);
|
279 |
-
wp_localize_script(
|
280 |
-
'wpglobus-customize-control170',
|
281 |
-
'WPGlobusCustomize',
|
282 |
-
array(
|
283 |
-
'version' => WPGLOBUS_VERSION,
|
284 |
-
'selectorButton' => $selector_button,
|
285 |
-
'languageAdmin' => WPGlobus::Config()->language,
|
286 |
-
'disabledSettingMask' => $disabled_setting_mask,
|
287 |
-
'elementSelector' => $element_selector,
|
288 |
-
'setLinkBy' => $set_link_by,
|
289 |
-
'disabledSections' => $disabled_sections,
|
290 |
-
'controlClass' => 'wpglobus-customize-control',
|
291 |
-
'changeset_uuid' => $changeset_uuid
|
292 |
-
)
|
293 |
-
);
|
294 |
-
|
295 |
-
}
|
296 |
-
|
297 |
-
} // class
|
298 |
-
|
299 |
-
endif;
|
300 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/class-wpglobus-customize190.php
DELETED
@@ -1,555 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Multilingual Customizer.
|
4 |
-
*
|
5 |
-
* @since 1.9.0
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Admin\Customizer
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! class_exists( 'WPGlobus_Customize' ) ) :
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class WPGlobus_Customize
|
14 |
-
*/
|
15 |
-
class WPGlobus_Customize {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Controller.
|
19 |
-
*/
|
20 |
-
public static function controller() {
|
21 |
-
|
22 |
-
add_action( 'admin_init', array( __CLASS__, 'on__admin_init' ), 1 );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* It calls the `customize_register` action first,
|
26 |
-
* and then - the `customize_preview_init` action.
|
27 |
-
*
|
28 |
-
* @see \WP_Customize_Manager::wp_loaded
|
29 |
-
*
|
30 |
-
* add_action( 'customize_register', array(
|
31 |
-
* 'WPGlobus_Customize',
|
32 |
-
* 'action__customize_register'
|
33 |
-
* ) );
|
34 |
-
*/
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Customizer filters.
|
38 |
-
*
|
39 |
-
* @since 1.5.0
|
40 |
-
*/
|
41 |
-
if ( WPGlobus_WP::is_pagenow( 'customize.php' ) ) {
|
42 |
-
require_once 'wpglobus-customize-filters.php';
|
43 |
-
}
|
44 |
-
|
45 |
-
add_action(
|
46 |
-
'customize_preview_init',
|
47 |
-
array( 'WPGlobus_Customize', 'action__customize_preview_init' )
|
48 |
-
);
|
49 |
-
|
50 |
-
/**
|
51 |
-
* This is called by wp-admin/customize.php
|
52 |
-
*/
|
53 |
-
add_action(
|
54 |
-
'customize_controls_enqueue_scripts',
|
55 |
-
array( 'WPGlobus_Customize', 'action__customize_controls_enqueue_scripts' ),
|
56 |
-
1000
|
57 |
-
);
|
58 |
-
|
59 |
-
if ( WPGlobus_WP::is_admin_doing_ajax() ) {
|
60 |
-
add_filter(
|
61 |
-
'clean_url',
|
62 |
-
array( 'WPGlobus_Customize', 'filter__clean_url' ),
|
63 |
-
10,
|
64 |
-
2
|
65 |
-
);
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Filter customize_changeset_save_data.
|
70 |
-
*
|
71 |
-
* @see wp-includes\class-wp-customize-manager.php
|
72 |
-
* @since 1.9.3
|
73 |
-
*/
|
74 |
-
add_filter(
|
75 |
-
'customize_changeset_save_data',
|
76 |
-
array( __CLASS__, 'filter__customize_changeset_save_data' ),
|
77 |
-
1,
|
78 |
-
2
|
79 |
-
);
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Action on admin init.
|
85 |
-
*
|
86 |
-
* @since 1.9.3
|
87 |
-
*/
|
88 |
-
public static function on__admin_init() {
|
89 |
-
|
90 |
-
$excluded_mods = array(
|
91 |
-
'0',
|
92 |
-
'nav_menu_locations',
|
93 |
-
'sidebars_widgets',
|
94 |
-
'custom_css_post_id',
|
95 |
-
'wpglobus_blogname',
|
96 |
-
'wpglobus_blogdescription',
|
97 |
-
);
|
98 |
-
|
99 |
-
$mods = get_theme_mods();
|
100 |
-
|
101 |
-
$filtered_mods = array();
|
102 |
-
|
103 |
-
if ( $mods ) {
|
104 |
-
foreach ( $mods as $mod_key => $mod_value ) {
|
105 |
-
|
106 |
-
if ( in_array( $mod_key, $excluded_mods, true ) ) {
|
107 |
-
continue;
|
108 |
-
}
|
109 |
-
|
110 |
-
if ( ! is_string( $mod_value ) ) {
|
111 |
-
continue;
|
112 |
-
}
|
113 |
-
|
114 |
-
$filtered_mods[ $mod_key ] = $mod_value;
|
115 |
-
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Filters the theme mods before save.
|
121 |
-
*
|
122 |
-
* @since 1.9.3
|
123 |
-
*
|
124 |
-
* @param array $filtered_mods Filtered theme modifications.
|
125 |
-
* @param array|void $mods Theme modifications.
|
126 |
-
*/
|
127 |
-
$filtered_mods = apply_filters( 'wpglobus_customize_filtered_mods', $filtered_mods, $mods );
|
128 |
-
|
129 |
-
foreach ( $filtered_mods as $mod_key => $mod_value ) {
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Filter {@see filter "pre_set_theme_mod_{$name}" in \wp-includes\theme.php}.
|
133 |
-
*/
|
134 |
-
add_filter(
|
135 |
-
"pre_set_theme_mod_{$mod_key}",
|
136 |
-
array( __CLASS__, 'filter__pre_set_theme_mod' ),
|
137 |
-
1,
|
138 |
-
2
|
139 |
-
);
|
140 |
-
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Filter a theme mod.
|
146 |
-
*
|
147 |
-
* @since 1.9.3
|
148 |
-
*
|
149 |
-
* @param string $value The value.
|
150 |
-
* @param string $old_value Unused.
|
151 |
-
*
|
152 |
-
* @return bool|string
|
153 |
-
*/
|
154 |
-
public static function filter__pre_set_theme_mod(
|
155 |
-
$value,
|
156 |
-
/**
|
157 |
-
* Unused.
|
158 |
-
*
|
159 |
-
* @noinspection PhpUnusedParameterInspection
|
160 |
-
*/
|
161 |
-
$old_value
|
162 |
-
) {
|
163 |
-
|
164 |
-
if ( ! is_string( $value ) ) {
|
165 |
-
return $value;
|
166 |
-
}
|
167 |
-
|
168 |
-
$new_value = self::_build_multilingual_string( $value );
|
169 |
-
|
170 |
-
if ( $new_value ) {
|
171 |
-
return $new_value;
|
172 |
-
}
|
173 |
-
|
174 |
-
return $value;
|
175 |
-
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Save/update a changeset.
|
180 |
-
*
|
181 |
-
* @since 1.9.3
|
182 |
-
*
|
183 |
-
* @param array $data The data.
|
184 |
-
* @param string $filter_context Unused.
|
185 |
-
*
|
186 |
-
* @return mixed
|
187 |
-
*/
|
188 |
-
public static function filter__customize_changeset_save_data(
|
189 |
-
$data,
|
190 |
-
/**
|
191 |
-
* Unused.
|
192 |
-
*
|
193 |
-
* @noinspection PhpUnusedParameterInspection
|
194 |
-
*/
|
195 |
-
$filter_context
|
196 |
-
) {
|
197 |
-
|
198 |
-
foreach ( $data as $option => $value ) {
|
199 |
-
|
200 |
-
$new_value = self::_build_multilingual_string( $value['value'] );
|
201 |
-
|
202 |
-
if ( $new_value ) {
|
203 |
-
$data[ $option ]['value'] = $new_value;
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
return $data;
|
208 |
-
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Build standard WPGlobus multilingual string.
|
213 |
-
*
|
214 |
-
* @since 1.9.3
|
215 |
-
*
|
216 |
-
* @param string $value The value.
|
217 |
-
*
|
218 |
-
* @return bool|string
|
219 |
-
*/
|
220 |
-
public static function _build_multilingual_string( $value ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Ignore if not a string.
|
224 |
-
*
|
225 |
-
* @since 1.9.6
|
226 |
-
*/
|
227 |
-
if ( ! is_string( $value ) ) {
|
228 |
-
return $value;
|
229 |
-
}
|
230 |
-
|
231 |
-
// $new_value = '';
|
232 |
-
|
233 |
-
if ( false === strpos( $value, '|||' ) ) {
|
234 |
-
$new_value = false;
|
235 |
-
} else {
|
236 |
-
|
237 |
-
$arr1 = array();
|
238 |
-
$arr = explode( '|||', $value );
|
239 |
-
foreach ( $arr as $k => $val ) {
|
240 |
-
// Note: 'null' is a string, not real `null`.
|
241 |
-
if ( 'null' !== $val ) {
|
242 |
-
$arr1[ WPGlobus::Config()->enabled_languages[ $k ] ] = $val;
|
243 |
-
}
|
244 |
-
}
|
245 |
-
|
246 |
-
$new_value = WPGlobus_Utils::build_multilingual_string( $arr1 );
|
247 |
-
|
248 |
-
}
|
249 |
-
|
250 |
-
return $new_value;
|
251 |
-
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Filter a string to check translations for URL.
|
256 |
-
* // We build multilingual URLs in customizer using the ':::' delimiter.
|
257 |
-
* We build multilingual URLs in customizer using the '|||' delimiter.
|
258 |
-
* See wpglobus-customize-control.js
|
259 |
-
*
|
260 |
-
* @note To work correctly, value of $url should begin with URL for default language.
|
261 |
-
* @see esc_url() - the 'clean_url' filter
|
262 |
-
* @since 1.3.0
|
263 |
-
*
|
264 |
-
* @param string $url The cleaned URL.
|
265 |
-
* @param string $original_url The URL prior to cleaning.
|
266 |
-
*
|
267 |
-
* @return string
|
268 |
-
*/
|
269 |
-
public static function filter__clean_url( $url, $original_url ) {
|
270 |
-
|
271 |
-
if ( false !== strpos( $original_url, '|||' ) ) {
|
272 |
-
$arr1 = array();
|
273 |
-
$arr = explode( '|||', $original_url );
|
274 |
-
foreach ( $arr as $k => $val ) {
|
275 |
-
// Note: 'null' is a string, not real `null`.
|
276 |
-
if ( 'null' !== $val ) {
|
277 |
-
$arr1[ WPGlobus::Config()->enabled_languages[ $k ] ] = $val;
|
278 |
-
}
|
279 |
-
}
|
280 |
-
|
281 |
-
return WPGlobus_Utils::build_multilingual_string( $arr1 );
|
282 |
-
}
|
283 |
-
|
284 |
-
return $url;
|
285 |
-
}
|
286 |
-
|
287 |
-
/**
|
288 |
-
* Add multilingual controls.
|
289 |
-
* The original controls will be hidden.
|
290 |
-
*
|
291 |
-
* @param WP_Customize_Manager $wp_customize Customize Manager.
|
292 |
-
*/
|
293 |
-
public static function action__customize_register( WP_Customize_Manager $wp_customize ) {
|
294 |
-
}
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Load Customize Preview JS
|
298 |
-
* Used by hook: 'customize_preview_init'
|
299 |
-
*
|
300 |
-
* @see 'customize_preview_init'
|
301 |
-
*/
|
302 |
-
public static function action__customize_preview_init() {
|
303 |
-
wp_enqueue_script(
|
304 |
-
'wpglobus-customize-preview',
|
305 |
-
WPGlobus::plugin_dir_url() . 'includes/js/wpglobus-customize-preview' .
|
306 |
-
WPGlobus::SCRIPT_SUFFIX() . '.js',
|
307 |
-
array( 'jquery', 'customize-preview' ),
|
308 |
-
WPGLOBUS_VERSION,
|
309 |
-
true
|
310 |
-
);
|
311 |
-
wp_localize_script(
|
312 |
-
'wpglobus-customize-preview',
|
313 |
-
'WPGlobusCustomize',
|
314 |
-
array(
|
315 |
-
'version' => WPGLOBUS_VERSION,
|
316 |
-
'blogname' => WPGlobus_Core::text_filter( get_option( 'blogname' ), WPGlobus::Config()->language ),
|
317 |
-
'blogdescription' => WPGlobus_Core::text_filter( get_option( 'blogdescription' ), WPGlobus::Config()->language ),
|
318 |
-
)
|
319 |
-
);
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Load Customize Control JS
|
324 |
-
*/
|
325 |
-
public static function action__customize_controls_enqueue_scripts() {
|
326 |
-
|
327 |
-
global $wp_version;
|
328 |
-
|
329 |
-
/**
|
330 |
-
* See wp.customize.control elements
|
331 |
-
* for example wp.customize.control('blogname');
|
332 |
-
*/
|
333 |
-
$disabled_setting_mask = array();
|
334 |
-
|
335 |
-
// navigation menu elements.
|
336 |
-
$disabled_setting_mask[] = 'nav_menu_item';
|
337 |
-
$disabled_setting_mask[] = 'nav_menu[';
|
338 |
-
$disabled_setting_mask[] = 'nav_menu_locations';
|
339 |
-
$disabled_setting_mask[] = 'new_menu_name';
|
340 |
-
|
341 |
-
// widgets.
|
342 |
-
$disabled_setting_mask[] = 'widgets';
|
343 |
-
|
344 |
-
// color elements.
|
345 |
-
$disabled_setting_mask[] = 'color';
|
346 |
-
|
347 |
-
// yoast seo.
|
348 |
-
$disabled_setting_mask[] = 'wpseo';
|
349 |
-
|
350 |
-
// css elements.
|
351 |
-
$disabled_setting_mask[] = 'css';
|
352 |
-
|
353 |
-
// social networks elements.
|
354 |
-
$disabled_setting_mask[] = 'facebook';
|
355 |
-
$disabled_setting_mask[] = 'twitter';
|
356 |
-
$disabled_setting_mask[] = 'linkedin';
|
357 |
-
$disabled_setting_mask[] = 'behance';
|
358 |
-
$disabled_setting_mask[] = 'dribbble';
|
359 |
-
$disabled_setting_mask[] = 'instagram';
|
360 |
-
/**
|
361 |
-
* Tumblr.
|
362 |
-
*
|
363 |
-
* @since 1.4.4
|
364 |
-
*/
|
365 |
-
$disabled_setting_mask[] = 'tumblr';
|
366 |
-
$disabled_setting_mask[] = 'flickr';
|
367 |
-
$disabled_setting_mask[] = 'wordpress'; // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled
|
368 |
-
$disabled_setting_mask[] = 'youtube';
|
369 |
-
$disabled_setting_mask[] = 'pinterest';
|
370 |
-
$disabled_setting_mask[] = 'github';
|
371 |
-
$disabled_setting_mask[] = 'rss';
|
372 |
-
$disabled_setting_mask[] = 'google';
|
373 |
-
$disabled_setting_mask[] = 'email';
|
374 |
-
/**
|
375 |
-
* Dropbox.
|
376 |
-
*
|
377 |
-
* @since 1.5.9
|
378 |
-
*/
|
379 |
-
$disabled_setting_mask[] = 'dropbox';
|
380 |
-
$disabled_setting_mask[] = 'foursquare';
|
381 |
-
$disabled_setting_mask[] = 'vine';
|
382 |
-
$disabled_setting_mask[] = 'vimeo';
|
383 |
-
/**
|
384 |
-
* Yelp.
|
385 |
-
*
|
386 |
-
* @since 1.6.0
|
387 |
-
*/
|
388 |
-
$disabled_setting_mask[] = 'yelp';
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Exclude fields from Static Front Page section.
|
392 |
-
* It may be added to customizer in many themes.
|
393 |
-
*
|
394 |
-
* @since 1.7.6
|
395 |
-
*/
|
396 |
-
$disabled_setting_mask[] = 'page_on_front';
|
397 |
-
$disabled_setting_mask[] = 'page_for_posts';
|
398 |
-
|
399 |
-
/**
|
400 |
-
* Filter to disable fields in customizer.
|
401 |
-
* See wp.customize.control elements
|
402 |
-
* Returning array.
|
403 |
-
*
|
404 |
-
* @since 1.4.0
|
405 |
-
*
|
406 |
-
* @param array $disabled_setting_mask An array of disabled masks.
|
407 |
-
*/
|
408 |
-
$disabled_setting_mask = apply_filters( 'wpglobus_customize_disabled_setting_mask', $disabled_setting_mask );
|
409 |
-
|
410 |
-
$element_selector = array( 'input[type=text]', 'textarea' );
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Filter for element selectors.
|
414 |
-
* Returning array.
|
415 |
-
*
|
416 |
-
* @since 1.4.0
|
417 |
-
*
|
418 |
-
* @param array $element_selector An array of selectors.
|
419 |
-
*/
|
420 |
-
$element_selector = apply_filters( 'wpglobus_customize_element_selector', $element_selector );
|
421 |
-
|
422 |
-
$set_link_by = array( 'link', 'url' );
|
423 |
-
|
424 |
-
/**
|
425 |
-
* Filter of masks to determine links.
|
426 |
-
* See value data-customize-setting-link of element
|
427 |
-
* Returning array.
|
428 |
-
*
|
429 |
-
* @since 1.4.0
|
430 |
-
*
|
431 |
-
* @param array $set_link_by An array of masks.
|
432 |
-
*/
|
433 |
-
$set_link_by = apply_filters( 'wpglobus_customize_setlinkby', $set_link_by );
|
434 |
-
|
435 |
-
/**
|
436 |
-
* Filter of disabled sections.
|
437 |
-
*
|
438 |
-
* Returning array.
|
439 |
-
*
|
440 |
-
* @since 1.5.0
|
441 |
-
*
|
442 |
-
* @param array $disabled_sections An array of sections.
|
443 |
-
*/
|
444 |
-
$disabled_sections = array();
|
445 |
-
|
446 |
-
$disabled_sections = apply_filters( 'wpglobus_customize_disabled_sections', $disabled_sections );
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Generate language select button for customizer
|
450 |
-
*
|
451 |
-
* @since 1.6.0
|
452 |
-
*
|
453 |
-
* @todo http://stackoverflow.com/questions/9607252/how-to-detect-when-an-element-over-another-element-in-javascript
|
454 |
-
*/
|
455 |
-
$attributes['href'] = '#';
|
456 |
-
$attributes['style'] = 'margin-left:48px;';
|
457 |
-
$attributes['class'] = 'customize-controls-close wpglobus-customize-selector';
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Filter of attributes to generate language selector button.
|
461 |
-
* For example @see Divi theme http://www.elegantthemes.com/gallery/divi/ .
|
462 |
-
*
|
463 |
-
* Returning array.
|
464 |
-
*
|
465 |
-
* @since 1.6.0
|
466 |
-
*
|
467 |
-
* @param array $attributes An array of attributes.
|
468 |
-
* @param string Name of current theme.
|
469 |
-
*/
|
470 |
-
$attributes = apply_filters( 'wpglobus_customize_language_selector_attrs', $attributes, WPGlobus_Customize_Options::get_theme( 'name' ) );
|
471 |
-
|
472 |
-
$string = '';
|
473 |
-
|
474 |
-
foreach ( $attributes as $attribute => $value ) {
|
475 |
-
if ( null !== $value ) {
|
476 |
-
$string .= esc_attr( $attribute ) . '="' . esc_attr( $value ) . '" ';
|
477 |
-
}
|
478 |
-
}
|
479 |
-
|
480 |
-
$selector_button = sprintf(
|
481 |
-
'<a %1$s data-language="' . WPGlobus::Config()->default_language . '">%2$s</a>',
|
482 |
-
trim( $string ),
|
483 |
-
'<span class="wpglobus-globe"></span>'
|
484 |
-
);
|
485 |
-
|
486 |
-
/**
|
487 |
-
* Since 1.7.9
|
488 |
-
*/
|
489 |
-
$changeset_uuid = null;
|
490 |
-
if ( ! empty( $_GET['changeset_uuid'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
491 |
-
$changeset_uuid = sanitize_text_field( wp_unslash( $_GET['changeset_uuid'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
492 |
-
}
|
493 |
-
|
494 |
-
/**
|
495 |
-
* Since 1.9.0
|
496 |
-
*/
|
497 |
-
$selector_type = 'dropdown';
|
498 |
-
$selector_types = array( 'dropdown', 'switch' );
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Filter selector type.
|
502 |
-
*
|
503 |
-
* @since 1.9.0
|
504 |
-
*
|
505 |
-
* @param string $selector_type Name of the current selector type.
|
506 |
-
* @param array $selector_types An array of existing selector types.
|
507 |
-
*
|
508 |
-
* @return string
|
509 |
-
*/
|
510 |
-
$selector_type = apply_filters( 'wpglobus_customize_language_selector_type', $selector_type, $selector_types );
|
511 |
-
|
512 |
-
if ( ! in_array( $selector_type, $selector_types, true ) ) {
|
513 |
-
$selector_type = 'dropdown';
|
514 |
-
}
|
515 |
-
|
516 |
-
/**
|
517 |
-
* Adjust for WP 5.2+.
|
518 |
-
*
|
519 |
-
* @since 2.2.0
|
520 |
-
*/
|
521 |
-
$selector_html = '<span style="margin-left:5px;" class="wpglobus-icon-globe"></span><span class="current-language" style="font-weight:bold;">{{language}}</span>';
|
522 |
-
if ( version_compare( $wp_version, '5.1.999', '>' ) ) {
|
523 |
-
$selector_html = '<span style="position:fixed;top:-7px;">' . $selector_html . '</span>';
|
524 |
-
}
|
525 |
-
|
526 |
-
wp_enqueue_script(
|
527 |
-
'wpglobus-customize-control190',
|
528 |
-
WPGlobus::plugin_dir_url() . 'includes/js/wpglobus-customize-control190' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
529 |
-
array( 'jquery' ),
|
530 |
-
WPGLOBUS_VERSION,
|
531 |
-
true
|
532 |
-
);
|
533 |
-
wp_localize_script(
|
534 |
-
'wpglobus-customize-control190',
|
535 |
-
'WPGlobusCustomize',
|
536 |
-
array(
|
537 |
-
'version' => WPGLOBUS_VERSION,
|
538 |
-
'selectorType' => $selector_type,
|
539 |
-
'selectorButton' => $selector_button,
|
540 |
-
'languageAdmin' => WPGlobus::Config()->language,
|
541 |
-
'disabledSettingMask' => $disabled_setting_mask,
|
542 |
-
'elementSelector' => $element_selector,
|
543 |
-
'setLinkBy' => $set_link_by,
|
544 |
-
'disabledSections' => $disabled_sections,
|
545 |
-
'controlClass' => 'wpglobus-customize-control',
|
546 |
-
'changeset_uuid' => $changeset_uuid,
|
547 |
-
'selector_html' => $selector_html,
|
548 |
-
)
|
549 |
-
);
|
550 |
-
|
551 |
-
}
|
552 |
-
|
553 |
-
} // class
|
554 |
-
|
555 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/wpglobus-customize-filters.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Filters for customizer
|
4 |
-
*
|
5 |
-
* All add_filter and add_action calls should be placed here
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Admin\Customizer
|
8 |
-
*/
|
9 |
-
add_filter( 'wpglobus_customize_disabled_sections', array( 'WPGlobus_Customize_Filters', 'disable_sections' ) );
|
10 |
-
|
11 |
-
if ( ! class_exists( 'WPGlobus_Customize_Filters' ) ) :
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class WPGlobus_Customize_Filters
|
15 |
-
*/
|
16 |
-
class WPGlobus_Customize_Filters {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Disable sections in customizer.
|
20 |
-
*
|
21 |
-
* @param array $disabled_sections
|
22 |
-
*
|
23 |
-
* @return array
|
24 |
-
*/
|
25 |
-
public static function disable_sections( $disabled_sections ) {
|
26 |
-
|
27 |
-
if ( class_exists( 'Easy_Google_Fonts' ) ) {
|
28 |
-
/**
|
29 |
-
* @see https://wordpress.org/plugins/easy-google-fonts/
|
30 |
-
*/
|
31 |
-
$disabled_sections[] = 'tt_font_typography';
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @since 2.2.30
|
36 |
-
*/
|
37 |
-
if ( defined( 'GFP_VERSION' ) // premium
|
38 |
-
||
|
39 |
-
defined( 'OGF_VERSION' ) // free
|
40 |
-
) {
|
41 |
-
/**
|
42 |
-
* @see premium https://fontsplugin.com/
|
43 |
-
* @see free https://wordpress.org/plugins/olympus-google-fonts/
|
44 |
-
*/
|
45 |
-
$disabled_sections[] = 'ogf_custom';
|
46 |
-
$disabled_sections[] = 'ogf_advanced__css';
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @since 2.2.28
|
51 |
-
*/
|
52 |
-
if ( class_exists( 'WPGlobus_Customize_Themes' ) ) {
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @see W.I.P. `Prevent using element with no id attribute` in includes\js\wpglobus-customize-control190.js
|
56 |
-
* to getting sections for disabling.
|
57 |
-
*/
|
58 |
-
$theme_name = WPGlobus_Customize_Themes::get_theme_name_lc();
|
59 |
-
|
60 |
-
if ( 'startkit' == $theme_name ) {
|
61 |
-
/**
|
62 |
-
* @see https://wordpress.org/themes/startkit/
|
63 |
-
*/
|
64 |
-
$disabled_sections[] = 'slider_setting';
|
65 |
-
$disabled_sections[] = 'service_setting';
|
66 |
-
$disabled_sections[] = 'testimonial_setting';
|
67 |
-
$disabled_sections[] = 'footer_icon';
|
68 |
-
$disabled_sections[] = 'Body_typography';
|
69 |
-
$disabled_sections[] = 'paragraph_typography';
|
70 |
-
$disabled_sections[] = 'H1_typography';
|
71 |
-
$disabled_sections[] = 'H2_typography';
|
72 |
-
$disabled_sections[] = 'H3_typography';
|
73 |
-
$disabled_sections[] = 'H4_typography';
|
74 |
-
$disabled_sections[] = 'H5_typography';
|
75 |
-
$disabled_sections[] = 'H6_typography';
|
76 |
-
$disabled_sections[] = 'menu_typography';
|
77 |
-
$disabled_sections[] = 'section_typography';
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
return $disabled_sections;
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/customize/wpglobus-customize.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: wpglobus-customize.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin\Customizer
|
6 |
-
*/
|
7 |
-
|
8 |
-
global $wp_version;
|
9 |
-
|
10 |
-
if ( !defined('WPGLOBUS_CUSTOMIZE') || WPGLOBUS_CUSTOMIZE ) {
|
11 |
-
|
12 |
-
if ( version_compare( $wp_version, '4.9-Beta1', '>=' ) ) {
|
13 |
-
require_once 'class-wpglobus-customize190.php';
|
14 |
-
} else if( version_compare( $wp_version, '4.6', '>=' ) ) {
|
15 |
-
require_once 'class-wpglobus-customize170.php';
|
16 |
-
} else {
|
17 |
-
require_once 'class-wpglobus-customize140.php';
|
18 |
-
}
|
19 |
-
WPGlobus_Customize::controller();
|
20 |
-
|
21 |
-
}
|
22 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/debug/class-wpglobus-admin-debug.php
DELETED
@@ -1,366 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus/Admin/Debug.
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'WPGlobus_Admin_Debug' ) ) :
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class WPGlobus_Admin_Debug.
|
12 |
-
*
|
13 |
-
* @since 1.8.1
|
14 |
-
*/
|
15 |
-
class WPGlobus_Admin_Debug {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Instance.
|
19 |
-
*
|
20 |
-
* @var WPGlobus_Admin_Debug
|
21 |
-
*/
|
22 |
-
protected static $instance;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Debug mode.
|
26 |
-
* @since 2.2.35
|
27 |
-
*/
|
28 |
-
protected static $mode = 'godmode';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Key.
|
32 |
-
* @since 2.2.35
|
33 |
-
*/
|
34 |
-
protected static $key = '';
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Get instance.
|
38 |
-
*/
|
39 |
-
public static function get_instance() {
|
40 |
-
if ( null === self::$instance ) {
|
41 |
-
self::$instance = new self();
|
42 |
-
}
|
43 |
-
|
44 |
-
return self::$instance;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Constructor.
|
49 |
-
*/
|
50 |
-
public function __construct() {
|
51 |
-
|
52 |
-
if ( 'meta' == $_GET['wpglobus-debug'] ) { // WPCS: input var ok, sanitization ok.
|
53 |
-
self::$mode = 'meta';
|
54 |
-
} else if ( 'wpglobus_options' == $_GET['wpglobus-debug'] || 'wpglobus-options' == $_GET['wpglobus-debug'] ) { // WPCS: input var ok, sanitization ok.
|
55 |
-
self::$mode = 'wpglobus_options';
|
56 |
-
} else if ( 'yoast' == $_GET['wpglobus-debug'] ) { // WPCS: input var ok, sanitization ok.
|
57 |
-
self::$mode = 'yoast';
|
58 |
-
}
|
59 |
-
|
60 |
-
if ( 'godmode' !== self::$mode ) {
|
61 |
-
if ( ! empty( $_GET['key'] ) ) { // WPCS: input var ok, sanitization ok. )
|
62 |
-
self::$key = sanitize_text_field($_GET['key']);
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Action.
|
68 |
-
*
|
69 |
-
* @scope admin
|
70 |
-
* @since 1.8.1
|
71 |
-
*/
|
72 |
-
add_action( 'admin_print_scripts', array( $this, 'on__admin_scripts' ), 99 );
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Action.
|
76 |
-
*
|
77 |
-
* @scope admin
|
78 |
-
* @since 1.8.1
|
79 |
-
*/
|
80 |
-
add_action( 'admin_print_styles', array( $this, 'on__admin_styles' ), 99 );
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Action.
|
84 |
-
*
|
85 |
-
* @scope admin
|
86 |
-
* @since 1.8.1
|
87 |
-
*/
|
88 |
-
add_action( 'admin_footer', array( $this, 'on__admin_footer' ), 9999 );
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @since 2.2.35
|
94 |
-
*/
|
95 |
-
public function is_enabled_section($section) {
|
96 |
-
if ( 'godmode' == self::$mode ) {
|
97 |
-
return true;
|
98 |
-
}
|
99 |
-
if ( $section == self::$mode ) {
|
100 |
-
return true;
|
101 |
-
}
|
102 |
-
return false;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Enqueue admin styles.
|
107 |
-
*
|
108 |
-
* @scope admin
|
109 |
-
* @since 1.8.1
|
110 |
-
*/
|
111 |
-
public function on__admin_styles() {
|
112 |
-
|
113 |
-
wp_register_style(
|
114 |
-
'wpglobus-admin-debug',
|
115 |
-
WPGlobus::plugin_dir_url() . 'includes/css/wpglobus-admin-debug.css',
|
116 |
-
array(),
|
117 |
-
WPGLOBUS_VERSION
|
118 |
-
);
|
119 |
-
wp_enqueue_style( 'wpglobus-admin-debug' );
|
120 |
-
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Enqueue admin scripts.
|
125 |
-
*
|
126 |
-
* @scope admin
|
127 |
-
* @since 1.8.1
|
128 |
-
*/
|
129 |
-
public function on__admin_scripts() {
|
130 |
-
|
131 |
-
wp_register_script(
|
132 |
-
'wpglobus-admin-debug',
|
133 |
-
WPGlobus::plugin_dir_url() . 'includes/js/wpglobus-admin-debug' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
134 |
-
array( 'jquery' ),
|
135 |
-
WPGLOBUS_VERSION,
|
136 |
-
true
|
137 |
-
);
|
138 |
-
wp_enqueue_script( 'wpglobus-admin-debug' );
|
139 |
-
wp_localize_script(
|
140 |
-
'wpglobus-admin-debug',
|
141 |
-
'WPGlobusAdminDebug',
|
142 |
-
array(
|
143 |
-
'version' => WPGLOBUS_VERSION,
|
144 |
-
'data' => '',
|
145 |
-
)
|
146 |
-
);
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Output table.
|
152 |
-
*
|
153 |
-
* @scope admin
|
154 |
-
* @since 1.8.1
|
155 |
-
*/
|
156 |
-
public function on__admin_footer() {
|
157 |
-
|
158 |
-
global $wpdb, $post, $pagenow;
|
159 |
-
|
160 |
-
if ( 'post.php' == $pagenow ) {
|
161 |
-
if ( is_object( $post ) ) {
|
162 |
-
/**
|
163 |
-
* post.php page.
|
164 |
-
*/
|
165 |
-
if ( empty( $post->ID ) || 0 === (int) $post->ID ) {
|
166 |
-
return;
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Get metadata.
|
171 |
-
*
|
172 |
-
* @var array $metas
|
173 |
-
*/
|
174 |
-
$meta_query = $wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id = %d", $post->ID );
|
175 |
-
$_id = $post->ID;
|
176 |
-
$meta_query_caption = "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id = $_id";
|
177 |
-
$metas = $wpdb->get_results( $meta_query, ARRAY_A );
|
178 |
-
}
|
179 |
-
} else if ( 'term.php' == $pagenow ) {
|
180 |
-
|
181 |
-
if ( empty( $_GET['tag_ID'] ) ) {
|
182 |
-
return;
|
183 |
-
}
|
184 |
-
|
185 |
-
$_id = sanitize_text_field( $_GET['tag_ID'] );
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Get metadata.
|
189 |
-
*
|
190 |
-
* @var array $metas
|
191 |
-
*/
|
192 |
-
$meta_query = $wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->termmeta WHERE term_id = %d", $_id );
|
193 |
-
$meta_query_caption = "SELECT meta_key, meta_value FROM $wpdb->termmeta WHERE term_id = $_id";
|
194 |
-
$metas = $wpdb->get_results( $meta_query, ARRAY_A );
|
195 |
-
} else {
|
196 |
-
return;
|
197 |
-
}
|
198 |
-
|
199 |
-
?>
|
200 |
-
<div id="wpglobus-admin-debug-box" class="" style="display:none;">
|
201 |
-
<h4>WPGlobus debug box</h4>
|
202 |
-
<?php
|
203 |
-
if ( $this->is_enabled_section('yoast') ) :
|
204 |
-
/**
|
205 |
-
* Output yoast options.
|
206 |
-
*/
|
207 |
-
if ( empty( self::$key ) ) {
|
208 |
-
$query = $wpdb->prepare( "SELECT * FROM $wpdb->options WHERE option_name LIKE '%s' OR option_name LIKE '%s'", '%wpseo%', '%yoast%' );
|
209 |
-
$query_caption = "SELECT * FROM $wpdb->options WHERE option_name LIKE '%wpseo%' OR option_name LIKE '%yoast%'";
|
210 |
-
} else {
|
211 |
-
$query = $wpdb->prepare( "SELECT * FROM $wpdb->options WHERE option_name = %s", self::$key );
|
212 |
-
$_key = self::$key;
|
213 |
-
$query_caption = "SELECT * FROM $wpdb->options WHERE option_name = $_key";
|
214 |
-
}
|
215 |
-
$results = $wpdb->get_results( $query );
|
216 |
-
?>
|
217 |
-
<table class="table1" cellspacing="0">
|
218 |
-
<caption><strong><?php echo '"' . $query_caption . '"'; ?></strong></caption>
|
219 |
-
<thead>
|
220 |
-
<tr>
|
221 |
-
<th><strong>№</strong></th>
|
222 |
-
<th><strong>option name</strong></th>
|
223 |
-
<th><strong>value</strong></th>
|
224 |
-
</tr>
|
225 |
-
</thead>
|
226 |
-
<tbody>
|
227 |
-
<?php
|
228 |
-
$order = 1;
|
229 |
-
|
230 |
-
foreach ( $results as $key=>$value ) {
|
231 |
-
$code = false;
|
232 |
-
//if ( is_array( $meta ) ) {
|
233 |
-
//$results[$key]['meta_key'] = htmlspecialchars( $meta['meta_value'] );
|
234 |
-
//}
|
235 |
-
$args = $_GET;
|
236 |
-
if ( empty( self::$key ) ) {
|
237 |
-
$args['wpglobus-debug'] = 'yoast';
|
238 |
-
$args = array_merge( $args, array('key'=>$value->option_name) );
|
239 |
-
$_url = admin_url( add_query_arg( $args, $pagenow ) );
|
240 |
-
} else {
|
241 |
-
$_url = admin_url( add_query_arg( $args, $pagenow ) );
|
242 |
-
}
|
243 |
-
?>
|
244 |
-
<tr>
|
245 |
-
<td><?php echo esc_html( $order ); ?></td>
|
246 |
-
<td><?php echo sprintf( '<a href="%s">%s</a>', $_url, esc_html( $value->option_name ) ); ?></td>
|
247 |
-
<?php if ( $code ) { ?>
|
248 |
-
<td>
|
249 |
-
<pre><?php echo esc_html( print_r( $value->option_value, true ) ); ?></pre>
|
250 |
-
</td>
|
251 |
-
<?php } else { ?>
|
252 |
-
<td><?php echo esc_html( print_r( $value->option_value, true ) ); ?></td>
|
253 |
-
<?php } ?>
|
254 |
-
</tr>
|
255 |
-
<?php $order ++; ?>
|
256 |
-
<?php } ?>
|
257 |
-
</tbody>
|
258 |
-
</table>
|
259 |
-
<?php
|
260 |
-
endif;
|
261 |
-
|
262 |
-
if ( $this->is_enabled_section('meta') ) :
|
263 |
-
/**
|
264 |
-
* Output metadata.
|
265 |
-
*/
|
266 |
-
?>
|
267 |
-
<table class="table2" cellspacing="0">
|
268 |
-
<caption><strong><?php echo '"' . $meta_query_caption . '"'; ?></strong></caption>
|
269 |
-
<thead>
|
270 |
-
<tr>
|
271 |
-
<th><strong>№</strong></th>
|
272 |
-
<th><strong>meta</strong></th>
|
273 |
-
<th><strong>value</strong></th>
|
274 |
-
</tr>
|
275 |
-
</thead>
|
276 |
-
<tbody>
|
277 |
-
<?php
|
278 |
-
if ( empty($metas) ) { ?>
|
279 |
-
<tr>
|
280 |
-
<td></td>
|
281 |
-
<td>No data</td>
|
282 |
-
<td>No data</td>
|
283 |
-
</tr> <?php
|
284 |
-
} else {
|
285 |
-
$order = 1;
|
286 |
-
foreach ( $metas as $key=>$meta ) {
|
287 |
-
$code = false;
|
288 |
-
if ( is_array( $meta ) ) {
|
289 |
-
$metas[$key]['meta_key'] = htmlspecialchars( $meta['meta_value'] );
|
290 |
-
}
|
291 |
-
?>
|
292 |
-
<tr>
|
293 |
-
<td><?php echo esc_html( $order ); ?></td>
|
294 |
-
<td><?php echo esc_html( print_r( $meta[ 'meta_key' ], true ) ); ?></td>
|
295 |
-
<?php if ( $code ) { ?>
|
296 |
-
<td>
|
297 |
-
<pre><?php echo esc_html( print_r( $meta[ 'meta_value' ], true ) ); ?></pre>
|
298 |
-
</td>
|
299 |
-
<?php } else { ?>
|
300 |
-
<td><?php echo esc_html( print_r( $meta[ 'meta_value' ], true ) ); ?></td>
|
301 |
-
<?php } ?>
|
302 |
-
</tr>
|
303 |
-
<?php $order ++;
|
304 |
-
}
|
305 |
-
} ?>
|
306 |
-
</tbody>
|
307 |
-
</table>
|
308 |
-
<?php
|
309 |
-
endif;
|
310 |
-
|
311 |
-
if ( $this->is_enabled_section('wpglobus_options') ) :
|
312 |
-
/**
|
313 |
-
* Output WPGlobus options.
|
314 |
-
*/
|
315 |
-
$query = "SELECT * FROM $wpdb->options WHERE option_name LIKE '%wpglobus%'";
|
316 |
-
$results = $wpdb->get_results( $query );
|
317 |
-
?>
|
318 |
-
<table class="table3" cellspacing="0">
|
319 |
-
<caption><strong><?php echo '"SELECT * FROM $wpdb->options WHERE option_name LIKE \'%wpglobus%\'"'; ?></strong></caption>
|
320 |
-
<caption><?php echo 'Option count: ' . count( $results ); ?></caption>
|
321 |
-
<thead>
|
322 |
-
<tr>
|
323 |
-
<th><strong>Option ID</strong></th>
|
324 |
-
<th><strong>Option Name</strong></th>
|
325 |
-
<th><strong>Option Value</strong></th>
|
326 |
-
</tr>
|
327 |
-
</thead>
|
328 |
-
<tbody>
|
329 |
-
<?php
|
330 |
-
|
331 |
-
$order = 1;
|
332 |
-
|
333 |
-
foreach ( $results as $option_key => $option ) {
|
334 |
-
$code = false;
|
335 |
-
if ( is_array( $option->option_value ) ) {
|
336 |
-
foreach ( $option->option_value as $key => $value ) {
|
337 |
-
$option->option_value[ $key ] = htmlspecialchars( $value );
|
338 |
-
}
|
339 |
-
} elseif ( is_string( $option->option_value ) ) {
|
340 |
-
$option->option_value = htmlspecialchars( $option->option_value );
|
341 |
-
}
|
342 |
-
?>
|
343 |
-
<tr>
|
344 |
-
<td><?php echo esc_html( $option->option_id ); ?></td>
|
345 |
-
<td><?php echo esc_html( print_r( $option->option_name, true ) ); ?></td>
|
346 |
-
<?php if ( $code ) { ?>
|
347 |
-
<td>
|
348 |
-
<pre><?php echo esc_html( print_r( $option->option_value, true ) ); ?></pre>
|
349 |
-
</td>
|
350 |
-
<?php } else { ?>
|
351 |
-
<td><?php echo esc_html( print_r( $option->option_value, true ) ); ?></td>
|
352 |
-
<?php } ?>
|
353 |
-
</tr>
|
354 |
-
<?php $order ++; ?>
|
355 |
-
<?php } ?>
|
356 |
-
</tbody>
|
357 |
-
</table><?php
|
358 |
-
endif; ?>
|
359 |
-
</div>
|
360 |
-
|
361 |
-
<?php
|
362 |
-
}
|
363 |
-
|
364 |
-
}
|
365 |
-
|
366 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/helpdesk/class-wpglobus-admin-helpdesk.php
DELETED
@@ -1,292 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-admin-helpdesk.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin\HelpDesk
|
6 |
-
*/
|
7 |
-
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Admin_HelpDesk.
|
11 |
-
* The Contact Support form.
|
12 |
-
*/
|
13 |
-
class WPGlobus_Admin_HelpDesk {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Nonce.
|
17 |
-
*
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
const NONCE_ACTION = 'wpglobus-helpdesk';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Email address of the Support.
|
24 |
-
*
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
const EMAIL_SUPPORT = 'support@wpglobus.com';
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Admin page title.
|
31 |
-
*
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
public static $page_title;
|
35 |
-
/**
|
36 |
-
* Admin menu title.
|
37 |
-
*
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
protected static $menu_title;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
protected static $name;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @return string
|
49 |
-
*/
|
50 |
-
public static function getName() {
|
51 |
-
return self::$name;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @var string
|
56 |
-
*/
|
57 |
-
protected static $email;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @return string
|
61 |
-
*/
|
62 |
-
public static function getEmail() {
|
63 |
-
return self::$email;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @var string
|
68 |
-
*/
|
69 |
-
protected static $submission_status = 'success';
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @return string
|
73 |
-
*/
|
74 |
-
public static function getSubmissionStatus() {
|
75 |
-
return self::$submission_status;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* @var string
|
80 |
-
*/
|
81 |
-
protected static $submission_message = '';
|
82 |
-
|
83 |
-
/**
|
84 |
-
* @return string
|
85 |
-
*/
|
86 |
-
public static function getSubmissionMessage() {
|
87 |
-
return self::$submission_message;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Static "constructor".
|
92 |
-
*/
|
93 |
-
public static function construct() {
|
94 |
-
self::set_vars();
|
95 |
-
self::set_hooks();
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Set class variables.
|
100 |
-
*/
|
101 |
-
public static function set_vars() {
|
102 |
-
self::$page_title = __( 'WPGlobus Help Desk', 'wpglobus' );
|
103 |
-
self::$menu_title = __( 'Help Desk', 'wpglobus' );
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Setup actions and filters.
|
108 |
-
*/
|
109 |
-
protected static function set_hooks() {
|
110 |
-
add_action( 'admin_menu', array( __CLASS__, 'add_menu' ), PHP_INT_MAX );
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Add admin menu item.
|
115 |
-
*/
|
116 |
-
public static function add_menu() {
|
117 |
-
add_submenu_page(
|
118 |
-
WPGlobus::OPTIONS_PAGE_SLUG,
|
119 |
-
self::$page_title,
|
120 |
-
'<span class="' . esc_attr( WPGlobus_Admin_Page::nav_tab_icon( 'Helpdesk' ) ) . '"></span> '
|
121 |
-
. self::$menu_title,
|
122 |
-
'administrator',
|
123 |
-
WPGlobus::PAGE_WPGLOBUS_HELPDESK,
|
124 |
-
array( __CLASS__, 'helpdesk_page' )
|
125 |
-
);
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* The admin page.
|
130 |
-
*/
|
131 |
-
public static function helpdesk_page() {
|
132 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
133 |
-
$data = self::get_data();
|
134 |
-
|
135 |
-
self::handle_submit();
|
136 |
-
|
137 |
-
/*
|
138 |
-
* Prepare data for the view.
|
139 |
-
*/
|
140 |
-
|
141 |
-
$active_plugins = explode( ', ', $data['active_plugins'] );
|
142 |
-
unset( $data['active_plugins'] );
|
143 |
-
|
144 |
-
$tech_info = '';
|
145 |
-
foreach ( $data as $key => $value ) {
|
146 |
-
$tech_info .= $key . ' = ' . $value . "\n";
|
147 |
-
}
|
148 |
-
|
149 |
-
// Split one-cell formatted list of plugins into the separate rows.
|
150 |
-
foreach ( $active_plugins as $active_plugin ) {
|
151 |
-
list( $name, $version ) = explode( ':', $active_plugin );
|
152 |
-
|
153 |
-
$tech_info .= $name . ' = ' . $version . "\n";
|
154 |
-
}
|
155 |
-
|
156 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
157 |
-
$subject = empty( $_POST['subject'] ) ? '' : sanitize_text_field( $_POST['subject'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
158 |
-
if ( empty($subject) ) {
|
159 |
-
$subject = empty( $_GET['subject'] ) ? '' : sanitize_text_field( $_GET['subject'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
164 |
-
$details = empty( $_POST['details'] ) ? '' : sanitize_textarea_field( $_POST['details'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
165 |
-
|
166 |
-
// Render view.
|
167 |
-
include dirname( __FILE__ ) . '/wpglobus-admin-helpdesk-page.php';
|
168 |
-
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Handle the form submit.
|
173 |
-
*/
|
174 |
-
protected static function handle_submit() {
|
175 |
-
if ( ! empty( $_POST ) ) {
|
176 |
-
check_admin_referer( self::NONCE_ACTION );
|
177 |
-
|
178 |
-
if (
|
179 |
-
empty( $_POST['name'] )
|
180 |
-
|| empty( $_POST['email'] )
|
181 |
-
|| empty( $_POST['subject'] )
|
182 |
-
|| empty( $_POST['details'] )
|
183 |
-
) {
|
184 |
-
self::$submission_status = 'error';
|
185 |
-
self::$submission_message = __( 'Email not sent. Please fill in the entire form.', 'wpglobus' );
|
186 |
-
|
187 |
-
return;
|
188 |
-
}
|
189 |
-
|
190 |
-
self::$name = sanitize_text_field( $_POST['name'] );
|
191 |
-
self::$email = sanitize_email( $_POST['email'] );
|
192 |
-
|
193 |
-
if ( ! self::$name || ! self::$email ) {
|
194 |
-
self::$submission_status = 'error';
|
195 |
-
self::$submission_message = __( 'Email not sent. Please verify that your name and email are entered correctly.', 'wpglobus' );
|
196 |
-
|
197 |
-
return;
|
198 |
-
}
|
199 |
-
|
200 |
-
$message = sanitize_textarea_field( $_POST['details'] );
|
201 |
-
if ( ! empty( $_POST['info'] ) ) {
|
202 |
-
$message .= "\n-----\n" . sanitize_textarea_field( $_POST['info'] );
|
203 |
-
}
|
204 |
-
|
205 |
-
$headers = array(
|
206 |
-
'from: ' . self::$name . ' <' . self::$email . '>',
|
207 |
-
'reply-to: ' . self::$email,
|
208 |
-
'cc: ' . self::$email,
|
209 |
-
);
|
210 |
-
|
211 |
-
add_action( 'wp_mail_failed', array( __CLASS__, 'action__wp_mail_failed' ) );
|
212 |
-
|
213 |
-
if ( wp_mail( self::EMAIL_SUPPORT, $_POST['subject'], $message, $headers ) ) :
|
214 |
-
|
215 |
-
self::$submission_status = 'success';
|
216 |
-
self::$submission_message = __( 'Email sent.', 'wpglobus' );
|
217 |
-
|
218 |
-
endif;
|
219 |
-
|
220 |
-
remove_action( 'wp_mail_failed', array( __CLASS__, 'action__wp_mail_failed' ) );
|
221 |
-
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Collect technical data.
|
227 |
-
*
|
228 |
-
* @return array
|
229 |
-
*/
|
230 |
-
protected static function get_data() {
|
231 |
-
$user = wp_get_current_user();
|
232 |
-
self::$name = WPGlobus_Filters::filter__text( $user->display_name );
|
233 |
-
self::$email = $user->user_email;
|
234 |
-
|
235 |
-
$theme = wp_get_theme();
|
236 |
-
|
237 |
-
/**
|
238 |
-
* @see php_uname can be disabled in php.ini for security reasons
|
239 |
-
* disable_functions=php_uname
|
240 |
-
* @since 1.7.13
|
241 |
-
*/
|
242 |
-
$OS = 'Unknown';
|
243 |
-
if ( function_exists( 'php_uname' ) ) {
|
244 |
-
$OS = implode( ' ', array(
|
245 |
-
php_uname( 's' ),
|
246 |
-
php_uname( 'r' ),
|
247 |
-
php_uname( 'v' ),
|
248 |
-
) );
|
249 |
-
}
|
250 |
-
|
251 |
-
$data = array(
|
252 |
-
'home_url' => home_url(),
|
253 |
-
'site_url' => site_url(),
|
254 |
-
'REMOTE_ADDR' => sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ),
|
255 |
-
// WPCS: input var ok, sanitization ok.
|
256 |
-
'SERVER_PORT' => sanitize_text_field( wp_unslash( $_SERVER['SERVER_PORT'] ) ),
|
257 |
-
// WPCS: input var ok, sanitization ok.
|
258 |
-
'OS' => $OS,
|
259 |
-
'PHP_SAPI' => PHP_SAPI,
|
260 |
-
'PHP_VERSION' => PHP_VERSION,
|
261 |
-
'loaded_extensions' => implode( ', ', get_loaded_extensions() ),
|
262 |
-
'wp_version' => $GLOBALS['wp_version'],
|
263 |
-
'is_multisite' => is_multisite() ? 'Y' : 'N',
|
264 |
-
'theme' => $theme->display( 'Name' ) . ' ' . $theme->display( 'ThemeURI' ) . ' by ' . $theme->get( 'Author' ) . ' ' . $theme->get( 'AuthorURI' ) . ( is_child_theme() ? '; child of ' . $theme->display( 'Template' ) : '' ),
|
265 |
-
'enabled_languages' => implode( ', ', WPGlobus::Config()->enabled_languages ),
|
266 |
-
);
|
267 |
-
|
268 |
-
// The list of plugins is formatted here for display on the admin page,
|
269 |
-
// to fit into one table cell.
|
270 |
-
$active_plugins = array();
|
271 |
-
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
|
272 |
-
$plugin_data = get_plugin_data( $plugin );
|
273 |
-
$plugin_file = str_replace( trailingslashit( WP_PLUGIN_DIR ), '', dirname( $plugin ) );
|
274 |
-
|
275 |
-
$active_plugins[] = $plugin_file . ':' . $plugin_data['Version'];
|
276 |
-
}
|
277 |
-
$data['active_plugins'] = implode( ', ', $active_plugins );
|
278 |
-
|
279 |
-
return $data;
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Print admin notice if sending failed.
|
285 |
-
*
|
286 |
-
* @param WP_Error $error
|
287 |
-
*/
|
288 |
-
public static function action__wp_mail_failed( WP_Error $error ) {
|
289 |
-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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/helpdesk/wpglobus-admin-helpdesk-page.php
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: view-page.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Admin\HelpDesk
|
6 |
-
* @global string[] $data
|
7 |
-
*/
|
8 |
-
|
9 |
-
// Exit if accessed directly
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit;
|
12 |
-
}
|
13 |
-
|
14 |
-
WPGlobus_Admin_Page::print_header();
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Vars defined in @see \WPGlobus_Admin_HelpDesk::helpdesk_page
|
18 |
-
*
|
19 |
-
* @var string $subject
|
20 |
-
* @var string $tech_info
|
21 |
-
*/
|
22 |
-
?>
|
23 |
-
|
24 |
-
<h2 class="nav-tab-wrapper wp-clearfix">
|
25 |
-
<a href="#" class="nav-tab nav-tab-active">
|
26 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Helpdesk' ); ?>
|
27 |
-
<?php echo esc_html( WPGlobus_Admin_HelpDesk::$page_title ); ?>
|
28 |
-
</a>
|
29 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_settings() ); ?>"
|
30 |
-
class="nav-tab">
|
31 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Settings' ); ?>
|
32 |
-
<?php esc_html_e( 'Settings' ); ?>
|
33 |
-
</a>
|
34 |
-
<a href="<?php echo esc_url( WPGlobus_Admin_Page::url_addons() ); ?>"
|
35 |
-
class="nav-tab">
|
36 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Add-ons' ); ?>
|
37 |
-
<?php esc_html_e( 'Add-ons', 'wpglobus' ); ?>
|
38 |
-
</a>
|
39 |
-
<a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'quick-start/' ); ?>"
|
40 |
-
target="_blank"
|
41 |
-
class="nav-tab">
|
42 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Guide' ); ?>
|
43 |
-
<?php esc_html_e( 'Guide', 'wpglobus' ); ?>
|
44 |
-
</a>
|
45 |
-
<a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() . 'faq/' ); ?>"
|
46 |
-
target="_blank"
|
47 |
-
class="nav-tab">
|
48 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'FAQ' ); ?>
|
49 |
-
<?php esc_html_e( 'FAQ', 'wpglobus' ); ?>
|
50 |
-
</a>
|
51 |
-
<a href="<?php echo esc_url( WPGlobus_Utils::url_wpglobus_site() ); ?>"
|
52 |
-
target="_blank"
|
53 |
-
class="nav-tab">
|
54 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'globe' ); ?>
|
55 |
-
<?php echo esc_html( 'WPGlobus.com' ); ?>
|
56 |
-
</a>
|
57 |
-
</h2>
|
58 |
-
|
59 |
-
<?php if ( WPGlobus_Admin_HelpDesk::getSubmissionMessage() ) : ?>
|
60 |
-
<div class="notice notice-<?php echo esc_attr( WPGlobus_Admin_HelpDesk::getSubmissionStatus() ); ?>">
|
61 |
-
<p>
|
62 |
-
<?php echo esc_html( WPGlobus_Admin_HelpDesk::getSubmissionMessage() ); ?>
|
63 |
-
</p>
|
64 |
-
</div>
|
65 |
-
<?php endif; ?>
|
66 |
-
|
67 |
-
<p><em>
|
68 |
-
<?php esc_html_e( 'Thank you for using WPGlobus!', 'wpglobus' ); ?>
|
69 |
-
<?php esc_html_e( 'Our Support Team is here to answer your questions or concerns.', 'wpglobus' ); ?>
|
70 |
-
</em></p>
|
71 |
-
<h4><?php esc_html_e( 'To help us serve you better:', 'wpglobus' ); ?></h4>
|
72 |
-
<ol>
|
73 |
-
<li><?php esc_html_e( 'Please check if the problem persists if you switch to a standard WordPress theme.', 'wpglobus' ); ?></li>
|
74 |
-
<li><?php esc_html_e( 'Try deactivating other plugins to see if any of them conflicts with WPGlobus.', 'wpglobus' ); ?></li>
|
75 |
-
</ol>
|
76 |
-
|
77 |
-
<h4><?php esc_html_e( 'Please fill in and submit the contact form:', 'wpglobus' ); ?></h4>
|
78 |
-
|
79 |
-
<form action="<?php echo esc_url( WPGlobus_Admin_Page::url_helpdesk() ); ?>" method="post" id="wpglobus-form-helpdesk">
|
80 |
-
|
81 |
-
<table class="form-table">
|
82 |
-
<tbody>
|
83 |
-
<tr class="form-field">
|
84 |
-
<th><label for="name"><?php esc_html_e( 'Name' ); ?>:</label></th>
|
85 |
-
<td><input required="required" type="text" name="name" id="name"
|
86 |
-
value="<?php echo esc_attr( WPGlobus_Admin_HelpDesk::getName() ); ?>" data-lpignore="true"/>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
<tr class="form-field">
|
90 |
-
<th><label for="email"><?php esc_html_e( 'Email' ); ?>:</label></th>
|
91 |
-
<td>
|
92 |
-
<input required="required" type="email" name="email" id="email"
|
93 |
-
value="<?php echo esc_attr( WPGlobus_Admin_HelpDesk::getEmail() ); ?>"
|
94 |
-
data-lpignore="true"/>
|
95 |
-
<p class="description">
|
96 |
-
<strong>
|
97 |
-
<?php esc_html_e( 'Please make sure the email address is correct.', 'wpglobus' ); ?>
|
98 |
-
</strong>
|
99 |
-
</p>
|
100 |
-
</td>
|
101 |
-
</tr>
|
102 |
-
<tr class="form-field">
|
103 |
-
<th><label for="subject"><?php esc_html_e( 'Subject', 'wpglobus' ); ?>:</label></th>
|
104 |
-
<td>
|
105 |
-
<input required="required" type="text" name="subject" id="subject"
|
106 |
-
value="<?php echo esc_attr( $subject ); ?>" data-lpignore="true"/>
|
107 |
-
<p class="description">
|
108 |
-
<?php esc_html_e( 'Short description of the problem', 'wpglobus' ); ?>
|
109 |
-
</p>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
<tr class="form-field">
|
113 |
-
<th><label for="details"><?php esc_html_e( 'Detailed description', 'wpglobus' ); ?>:</label></th>
|
114 |
-
<td>
|
115 |
-
<textarea required="required" name="details" id="details"
|
116 |
-
rows="10"><?php echo esc_attr( $details ); ?></textarea>
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
<tr class="form-field">
|
120 |
-
<th><label for="info"><?php esc_html_e( 'Technical Information', 'wpglobus' ); ?>:</label></th>
|
121 |
-
<td>
|
122 |
-
<textarea name="info" id="info" rows="10"
|
123 |
-
style="font-family: monospace; font-size: 10px; background-color: #eee; white-space: nowrap; overflow: hidden"
|
124 |
-
data-gramm_editor="false"
|
125 |
-
spellcheck="false"><?php echo esc_html( $tech_info ); ?></textarea>
|
126 |
-
<p class="description">
|
127 |
-
<?php esc_html_e( 'This information helps us to find the problem source', 'wpglobus' ); ?>
|
128 |
-
</p>
|
129 |
-
</td>
|
130 |
-
</tr>
|
131 |
-
</tbody>
|
132 |
-
</table>
|
133 |
-
|
134 |
-
<?php wp_nonce_field( WPGlobus_Admin_HelpDesk::NONCE_ACTION ); ?>
|
135 |
-
|
136 |
-
<button class="button-primary" type="submit" name="send_email" id="send_email">
|
137 |
-
<?php WPGlobus_Admin_Page::nav_tab_icon_e( 'Helpdesk' ); ?>
|
138 |
-
<?php esc_html_e( 'Submit' ); ?>
|
139 |
-
</button>
|
140 |
-
<script>
|
141 |
-
jQuery(function ($) {
|
142 |
-
$("#wpglobus-form-helpdesk").on("submit", function (e) {
|
143 |
-
$("#send_email").prop("disabled", true);
|
144 |
-
});
|
145 |
-
function adjustHeight(el, minHeight) {
|
146 |
-
var outerHeight = parseInt(window.getComputedStyle(el).height, 10);
|
147 |
-
var diff = outerHeight - el.clientHeight;
|
148 |
-
el.style.height = 0;
|
149 |
-
el.style.height = Math.max(minHeight, el.scrollHeight + diff) + 'px';
|
150 |
-
}
|
151 |
-
var textArea = [].slice.call(document.querySelectorAll('textarea#info'));
|
152 |
-
if ( textArea.length == 1 ) {
|
153 |
-
adjustHeight(textArea[0], textArea[0].scrollHeight);
|
154 |
-
}
|
155 |
-
|
156 |
-
});
|
157 |
-
</script>
|
158 |
-
|
159 |
-
</form>
|
160 |
-
<p>
|
161 |
-
*) <?php printf( esc_html__( 'Alternatively, please email %s. Do not forget to copy and paste the technical information to your email message.', 'wpglobus' ), '<a href="mailto:' . esc_attr( WPGlobus_Admin_HelpDesk::EMAIL_SUPPORT ) . '">' . esc_html( WPGlobus_Admin_HelpDesk::EMAIL_SUPPORT ) . '</a>' ); ?></p>
|
162 |
-
|
163 |
-
<?php
|
164 |
-
|
165 |
-
WPGlobus_Admin_Page::print_footer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/media/class-wpglobus-media.php
DELETED
@@ -1,413 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package WPGlobus
|
4 |
-
*/
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Class WPGlobus_Media.
|
8 |
-
*
|
9 |
-
* @since 1.7.3
|
10 |
-
* @since 2.2.22
|
11 |
-
*/
|
12 |
-
if ( ! class_exists( 'WPGlobus_Media' ) ) :
|
13 |
-
|
14 |
-
class WPGlobus_Media {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Instance.
|
18 |
-
*/
|
19 |
-
protected static $instance;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Post types to work on media page.
|
23 |
-
*/
|
24 |
-
protected $enabled_post_types = array();
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Get instance.
|
28 |
-
*/
|
29 |
-
public static function get_instance($http_post_action = false, $http_post_actions = array()){
|
30 |
-
if( null == self::$instance ){
|
31 |
-
self::$instance = new self($http_post_action, $http_post_actions);
|
32 |
-
}
|
33 |
-
return self::$instance;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Constructor.
|
38 |
-
*/
|
39 |
-
public function __construct($http_post_action, $http_post_actions) {
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @scope admin
|
43 |
-
* @since 1.7.3
|
44 |
-
*/
|
45 |
-
add_action( 'admin_print_scripts', array(
|
46 |
-
$this,
|
47 |
-
'post_php__admin_scripts'
|
48 |
-
), 5 );
|
49 |
-
|
50 |
-
if ( in_array($http_post_action, $http_post_actions) ) {
|
51 |
-
|
52 |
-
if ( 'send-attachment-to-editor' == $http_post_action ) {
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @scope admin
|
56 |
-
* @see filter 'media_send_to_editor' in wp-admin\includes\media.php
|
57 |
-
* @since 1.7.3
|
58 |
-
*/
|
59 |
-
add_filter( 'media_send_to_editor', array(
|
60 |
-
$this,
|
61 |
-
'filter__media_send_to_editor'
|
62 |
-
), 5, 3 );
|
63 |
-
|
64 |
-
} else if ( 'query-attachments' == $http_post_action ) {
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @scope admin
|
68 |
-
* @see filter 'wp_prepare_attachment_for_js' in wp-includes\media.php
|
69 |
-
* @since 2.2.22
|
70 |
-
*/
|
71 |
-
add_filter( 'wp_prepare_attachment_for_js', array(
|
72 |
-
$this,
|
73 |
-
'filter__prepare_attachment_for_js'
|
74 |
-
), 5, 3 );
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
return;
|
79 |
-
}
|
80 |
-
|
81 |
-
$this->enabled_post_types[] = 'attachment';
|
82 |
-
|
83 |
-
/**
|
84 |
-
* @scope admin
|
85 |
-
* @since 1.7.3
|
86 |
-
*/
|
87 |
-
add_action( 'edit_form_after_editor', array(
|
88 |
-
$this,
|
89 |
-
'language_tabs'
|
90 |
-
) );
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @scope admin
|
94 |
-
* @since 1.7.3
|
95 |
-
*/
|
96 |
-
add_action( 'admin_print_scripts', array(
|
97 |
-
$this,
|
98 |
-
'media__admin_scripts'
|
99 |
-
) );
|
100 |
-
|
101 |
-
/**
|
102 |
-
* @scope admin
|
103 |
-
* @since 1.7.3
|
104 |
-
*/
|
105 |
-
add_action( 'admin_print_styles', array(
|
106 |
-
$this,
|
107 |
-
'action__admin_styles'
|
108 |
-
) );
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Filters the HTML markup for a media item sent to the editor.
|
116 |
-
*
|
117 |
-
* @scope admin
|
118 |
-
* @since 1.7.3
|
119 |
-
*
|
120 |
-
* @param string $html HTML markup.
|
121 |
-
* @param int $id Unused.
|
122 |
-
* @param array $attachment Array of attachment metadata.
|
123 |
-
*
|
124 |
-
* @return boolean
|
125 |
-
*/
|
126 |
-
public function filter__media_send_to_editor( $html, $id, $attachment ) {
|
127 |
-
|
128 |
-
$fields = array(
|
129 |
-
'post_content',
|
130 |
-
'post_excerpt',
|
131 |
-
'image_alt',
|
132 |
-
);
|
133 |
-
|
134 |
-
$current_language = WPGlobus::Config()->default_language;
|
135 |
-
if ( ! empty( $_POST['wpglobusLanguageTab'] ) ) { // WPCS: input var ok, sanitization ok.
|
136 |
-
/**
|
137 |
-
* See wpglobus-media.js
|
138 |
-
*/
|
139 |
-
$current_language = sanitize_text_field( wp_unslash( $_POST['wpglobusLanguageTab'] ) ); // WPCS: input var ok, sanitization ok.
|
140 |
-
|
141 |
-
if ( ! in_array( $current_language, WPGlobus::Config()->enabled_languages, true ) ) {
|
142 |
-
return $html;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
foreach ( $fields as $field ) {
|
147 |
-
if ( ! empty( $attachment[ $field ] ) && WPGlobus_Core::has_translations( $attachment[ $field ] ) ) {
|
148 |
-
$html = str_replace( $attachment[ $field ], WPGlobus_Core::text_filter( $attachment[ $field ], $current_language ), $html );
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
return $html;
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Check for enabled post types.
|
157 |
-
*
|
158 |
-
* @scope admin
|
159 |
-
* @since 1.7.3
|
160 |
-
* @access public
|
161 |
-
*
|
162 |
-
* @return boolean
|
163 |
-
*/
|
164 |
-
public function is_enabled() {
|
165 |
-
|
166 |
-
global $post;
|
167 |
-
|
168 |
-
if ( empty( $post ) ) {
|
169 |
-
return false;
|
170 |
-
}
|
171 |
-
|
172 |
-
if ( in_array( $post->post_type, $this->enabled_post_types ) ) {
|
173 |
-
return true;
|
174 |
-
}
|
175 |
-
|
176 |
-
return false;
|
177 |
-
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Enqueue admin scripts on post.php page.
|
182 |
-
*
|
183 |
-
* @scope admin
|
184 |
-
* @since 1.7.3
|
185 |
-
* @access public
|
186 |
-
*
|
187 |
-
* @return void
|
188 |
-
*/
|
189 |
-
public function post_php__admin_scripts() {
|
190 |
-
|
191 |
-
global $post;
|
192 |
-
|
193 |
-
if ( empty( $post ) ) {
|
194 |
-
return;
|
195 |
-
}
|
196 |
-
|
197 |
-
if ( in_array( $post->post_type, array( 'attachment' ) ) ) {
|
198 |
-
/**
|
199 |
-
* Don't load on edit media page.
|
200 |
-
*/
|
201 |
-
return;
|
202 |
-
}
|
203 |
-
|
204 |
-
wp_register_script(
|
205 |
-
'wpglobus-media-post-php',
|
206 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-media-post-php' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
207 |
-
array(),
|
208 |
-
WPGLOBUS_VERSION,
|
209 |
-
true
|
210 |
-
);
|
211 |
-
wp_enqueue_script( 'wpglobus-media-post-php' );
|
212 |
-
wp_localize_script(
|
213 |
-
'wpglobus-media-post-php',
|
214 |
-
'WPGlobusMediaInPost',
|
215 |
-
array(
|
216 |
-
'version' => WPGLOBUS_VERSION,
|
217 |
-
'builderID' => WPGlobus::Config()->builder->get_id(),
|
218 |
-
)
|
219 |
-
);
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Enqueue admin scripts.
|
225 |
-
*
|
226 |
-
* @scope admin
|
227 |
-
* @since 1.7.3
|
228 |
-
* @access public
|
229 |
-
*
|
230 |
-
* @return void
|
231 |
-
*/
|
232 |
-
public function media__admin_scripts() {
|
233 |
-
|
234 |
-
if ( ! $this->is_enabled() ) {
|
235 |
-
return;
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* WordPress 4.7+ needs a new version of our admin JS.
|
240 |
-
* @since 1.7.0
|
241 |
-
*/
|
242 |
-
$version = '';
|
243 |
-
if ( version_compare( $GLOBALS['wp_version'], '4.6.999', '>' ) ) {
|
244 |
-
$version = '-47';
|
245 |
-
}
|
246 |
-
|
247 |
-
wp_register_script(
|
248 |
-
'wpglobus-admin',
|
249 |
-
WPGlobus::$PLUGIN_DIR_URL . "includes/js/wpglobus-admin$version" . WPGlobus::SCRIPT_SUFFIX() . ".js",
|
250 |
-
array( 'jquery', 'jquery-ui-dialog', 'jquery-ui-tabs' ),
|
251 |
-
WPGLOBUS_VERSION,
|
252 |
-
true
|
253 |
-
);
|
254 |
-
wp_enqueue_script( 'wpglobus-admin' );
|
255 |
-
wp_localize_script(
|
256 |
-
'wpglobus-admin',
|
257 |
-
'WPGlobusAdmin',
|
258 |
-
array(
|
259 |
-
'version' => WPGLOBUS_VERSION,
|
260 |
-
'i18n' => array(),
|
261 |
-
'data' => array(
|
262 |
-
'default_language' => WPGlobus::Config()->default_language
|
263 |
-
)
|
264 |
-
)
|
265 |
-
);
|
266 |
-
|
267 |
-
wp_localize_script(
|
268 |
-
'wpglobus-admin',
|
269 |
-
'WPGlobusCoreData',
|
270 |
-
array(
|
271 |
-
'multisite' => 'false',
|
272 |
-
'default_language' => WPGlobus::Config()->default_language,
|
273 |
-
'enabled_languages' => WPGlobus::Config()->enabled_languages,
|
274 |
-
'locale_tag_start' => WPGlobus::LOCALE_TAG_START,
|
275 |
-
'locale_tag_end' => WPGlobus::LOCALE_TAG_END
|
276 |
-
)
|
277 |
-
);
|
278 |
-
|
279 |
-
wp_register_script(
|
280 |
-
'wpglobus-media',
|
281 |
-
WPGlobus::$PLUGIN_DIR_URL . "includes/js/wpglobus-media" . WPGlobus::SCRIPT_SUFFIX() . ".js",
|
282 |
-
array( 'jquery', 'wpglobus-admin' ),
|
283 |
-
WPGLOBUS_VERSION,
|
284 |
-
true
|
285 |
-
);
|
286 |
-
wp_enqueue_script( 'wpglobus-media' );
|
287 |
-
wp_localize_script(
|
288 |
-
'wpglobus-media',
|
289 |
-
'WPGlobusMedia',
|
290 |
-
array(
|
291 |
-
'version' => WPGLOBUS_VERSION,
|
292 |
-
'language' => WPGlobus::Config()->default_language,
|
293 |
-
'defaultLanguage' => WPGlobus::Config()->default_language,
|
294 |
-
'enabledLanguages' => WPGlobus::Config()->enabled_languages,
|
295 |
-
'attachment' => array(
|
296 |
-
'caption' => 'attachment_caption',
|
297 |
-
'alt' => 'attachment_alt',
|
298 |
-
'description' => 'attachment_content',
|
299 |
-
'title' => 'title'
|
300 |
-
)
|
301 |
-
)
|
302 |
-
);
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Enqueue admin styles.
|
307 |
-
*
|
308 |
-
* @scope admin
|
309 |
-
* @since 1.7.3
|
310 |
-
* @access public
|
311 |
-
*
|
312 |
-
* @return void
|
313 |
-
*/
|
314 |
-
public function action__admin_styles() {
|
315 |
-
|
316 |
-
if ( ! $this->is_enabled() ) {
|
317 |
-
return;
|
318 |
-
}
|
319 |
-
|
320 |
-
wp_register_style(
|
321 |
-
'wpglobus-admin-tabs',
|
322 |
-
WPGlobus::$PLUGIN_DIR_URL . 'includes/css/wpglobus-admin-tabs.css',
|
323 |
-
array(),
|
324 |
-
WPGLOBUS_VERSION,
|
325 |
-
'all'
|
326 |
-
);
|
327 |
-
wp_enqueue_style( 'wpglobus-admin-tabs' );
|
328 |
-
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Add language tabs on media page.
|
333 |
-
*
|
334 |
-
* @scope admin
|
335 |
-
* @since 1.7.3
|
336 |
-
* @access public
|
337 |
-
*
|
338 |
-
* @return void
|
339 |
-
*/
|
340 |
-
public function language_tabs() {
|
341 |
-
|
342 |
-
if ( ! $this->is_enabled() ) {
|
343 |
-
return;
|
344 |
-
}
|
345 |
-
|
346 |
-
?>
|
347 |
-
<div id="wpglobus-media-body-tabs" style="margin-top:20px;" class="wpglobus-post-body-tabs">
|
348 |
-
<ul class="wpglobus-post-body-tabs-list"> <?php
|
349 |
-
$order = 0;
|
350 |
-
foreach ( WPGlobus::Config()->open_languages as $language ) {
|
351 |
-
$tab_suffix = $language == WPGlobus::Config()->default_language ? 'default' : $language; ?>
|
352 |
-
<li id="link-tab-<?php echo esc_attr( $tab_suffix ); ?>" data-language="<?php echo esc_attr( $language ); ?>"
|
353 |
-
data-order="<?php echo esc_attr( $order ); ?>"
|
354 |
-
class="wpglobus-post-tab">
|
355 |
-
<a href="#tab-<?php echo esc_attr( $tab_suffix ); ?>"><?php echo esc_html( WPGlobus::Config()->en_language_name[ $language ] ); ?></a>
|
356 |
-
</li> <?php
|
357 |
-
$order ++;
|
358 |
-
} ?>
|
359 |
-
</ul> <?php
|
360 |
-
foreach ( WPGlobus::Config()->open_languages as $language ) {
|
361 |
-
$tab_suffix = $language == WPGlobus::Config()->default_language ? 'default' : $language; ?>
|
362 |
-
<div id="tab-<?php echo esc_attr( $tab_suffix ); ?>" style="display:none;"></div> <?php
|
363 |
-
} ?>
|
364 |
-
</div>
|
365 |
-
<?php
|
366 |
-
}
|
367 |
-
|
368 |
-
/**
|
369 |
-
* Filters the attachment data prepared for JavaScript.
|
370 |
-
*
|
371 |
-
* @since 2.2.22
|
372 |
-
*
|
373 |
-
* @param array $response Array of prepared attachment data.
|
374 |
-
* @param WP_Post $attachment Attachment object.
|
375 |
-
* @param array|false $meta Array of attachment meta data, or false if there is none.
|
376 |
-
*/
|
377 |
-
public function filter__prepare_attachment_for_js( $response, $attachment, $meta ) {
|
378 |
-
|
379 |
-
if ( empty( $_POST['wpglobusPrepareAttachments'] ) ) { // WPCS: input var ok, sanitization ok.
|
380 |
-
return $response;
|
381 |
-
}
|
382 |
-
|
383 |
-
$fields = array(
|
384 |
-
'alt',
|
385 |
-
'description',
|
386 |
-
'caption',
|
387 |
-
// @todo may be `uploadedToTitle` field
|
388 |
-
);
|
389 |
-
|
390 |
-
$current_language = WPGlobus::Config()->default_language;
|
391 |
-
if ( ! empty( $_POST['wpglobusLanguageTab'] ) ) { // WPCS: input var ok, sanitization ok.
|
392 |
-
/**
|
393 |
-
* See includes\js\wpglobus-media.js
|
394 |
-
*/
|
395 |
-
$current_language = sanitize_text_field( wp_unslash( $_POST['wpglobusLanguageTab'] ) ); // WPCS: input var ok, sanitization ok.
|
396 |
-
|
397 |
-
if ( ! in_array( $current_language, WPGlobus::Config()->enabled_languages, true ) ) {
|
398 |
-
return $response;
|
399 |
-
}
|
400 |
-
}
|
401 |
-
|
402 |
-
foreach ( $fields as $field ) {
|
403 |
-
if ( ! empty( $response[ $field ] ) && WPGlobus_Core::has_translations( $response[ $field ] ) ) {
|
404 |
-
$response[ $field ] = WPGlobus_Core::text_filter( $response[ $field ], $current_language );
|
405 |
-
}
|
406 |
-
}
|
407 |
-
|
408 |
-
return $response;
|
409 |
-
}
|
410 |
-
|
411 |
-
}
|
412 |
-
|
413 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
3 |
-
* 1. Add multilingual Caption, Alternative Text, Description and post Title to media files.
|
4 |
-
* 2. Handling the inserting media in post.
|
5 |
-
*
|
6 |
-
* @since 2.2.22
|
7 |
-
* @package WPGlobus
|
8 |
-
*/
|
9 |
-
if ( version_compare( $GLOBALS['wp_version'], '4.6.999', '>' ) ) :
|
10 |
-
|
11 |
-
$http_post_action = false;
|
12 |
-
|
13 |
-
if ( WPGlobus_WP::is_doing_ajax() ) {
|
14 |
-
if ( WPGlobus_WP::is_http_post_action('send-attachment-to-editor') ) {
|
15 |
-
$http_post_action = 'send-attachment-to-editor';
|
16 |
-
} else if ( WPGlobus_WP::is_http_post_action('query-attachments') ) {
|
17 |
-
/**
|
18 |
-
* Action for gutenberg.
|
19 |
-
*/
|
20 |
-
$http_post_action = 'query-attachments';
|
21 |
-
}
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Array of actions to handle the inserting media on post.php page.
|
26 |
-
*/
|
27 |
-
$http_post_actions = array(
|
28 |
-
'send-attachment-to-editor', // standard and builder mode (except gutenberg).
|
29 |
-
'query-attachments' // gutenberg.
|
30 |
-
);
|
31 |
-
|
32 |
-
if ( WPGlobus_WP::is_pagenow( 'post.php' ) || $http_post_action ) {
|
33 |
-
if ( ! class_exists('WPGlobus_Media') ) {
|
34 |
-
require_once 'class-wpglobus-media.php';
|
35 |
-
}
|
36 |
-
WPGlobus_Media::get_instance($http_post_action, $http_post_actions);
|
37 |
-
}
|
38 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/meta/class-wpglobus-meta.php
DELETED
@@ -1,543 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class WPGlobus_Meta
|
4 |
-
*
|
5 |
-
* @since 1.9.17
|
6 |
-
* @since 1.9.25 Added build_multilingual_string function.
|
7 |
-
*
|
8 |
-
* @package WPGlobus\Admin\Meta
|
9 |
-
* @author Alex Gor(alexgff)
|
10 |
-
*/
|
11 |
-
|
12 |
-
if ( ! class_exists( 'WPGlobus_Meta' ) ) :
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class WPGlobus_Meta.
|
16 |
-
*/
|
17 |
-
class WPGlobus_Meta {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Instance of this class.
|
21 |
-
*
|
22 |
-
* @var WPGlobus_Meta
|
23 |
-
*/
|
24 |
-
protected static $instance;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Meta fields.
|
28 |
-
*
|
29 |
-
* @var string[]
|
30 |
-
*/
|
31 |
-
public static $meta_fields = array();
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Builder.
|
35 |
-
*
|
36 |
-
* @var WPGlobus_Config_Builder
|
37 |
-
*/
|
38 |
-
protected static $builder = null;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Constructor.
|
42 |
-
*
|
43 |
-
* @param string[] $meta_fields
|
44 |
-
* @param WPGlobus_Config_Builder $builder
|
45 |
-
*/
|
46 |
-
protected function __construct( $meta_fields, $builder ) {
|
47 |
-
|
48 |
-
self::$meta_fields = $meta_fields;
|
49 |
-
self::$builder = $builder;
|
50 |
-
|
51 |
-
if ( is_admin() ) {
|
52 |
-
add_filter( 'get_post_metadata', array( __CLASS__, 'filter__post_metadata' ), 5, 4 );
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @see update_metadata() in wp-includes\meta.php
|
56 |
-
*/
|
57 |
-
add_filter( 'update_post_metadata', array( __CLASS__, 'filter__update_post_metadata' ), 5, 5 );
|
58 |
-
|
59 |
-
add_filter( 'delete_post_metadata', array( __CLASS__, 'filter__delete_metadata' ), 5, 5 );
|
60 |
-
}
|
61 |
-
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Get instance of this class.
|
66 |
-
*
|
67 |
-
* @param string[] $meta_fields
|
68 |
-
* @param WPGlobus_Config_Builder $builder
|
69 |
-
*
|
70 |
-
* @return WPGlobus_Meta
|
71 |
-
*/
|
72 |
-
public static function get_instance( $meta_fields, $builder ) {
|
73 |
-
if ( ! ( self::$instance instanceof WPGlobus_Meta ) ) {
|
74 |
-
self::$instance = new self( $meta_fields, $builder );
|
75 |
-
}
|
76 |
-
|
77 |
-
return self::$instance;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* public static function get_post_meta( $post_id = false ) {
|
82 |
-
* $meta_cache = wp_cache_get($post_id, 'post_meta');
|
83 |
-
* }
|
84 |
-
* // */
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Update post meta data.
|
88 |
-
*
|
89 |
-
* @see wp-includes\meta.php "update_{$meta_type}_metadata".
|
90 |
-
*
|
91 |
-
* @param null|bool $check Whether to allow updating metadata for the given type.
|
92 |
-
* @param int $object_id Object ID.
|
93 |
-
* @param string $meta_key Meta key.
|
94 |
-
* @param mixed $meta_value Meta value. Must be serializable if non-scalar.
|
95 |
-
* @param mixed $prev_value Optional. If specified, only update existing
|
96 |
-
* metadata entries with the specified value.
|
97 |
-
* Otherwise, update all entries.
|
98 |
-
*
|
99 |
-
* @return bool
|
100 |
-
*/
|
101 |
-
public static function filter__update_post_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
|
102 |
-
|
103 |
-
if ( empty( self::$meta_fields ) ) {
|
104 |
-
return $check;
|
105 |
-
}
|
106 |
-
|
107 |
-
if ( ! self::meta_key_exists( $meta_key ) ) {
|
108 |
-
return $check;
|
109 |
-
}
|
110 |
-
|
111 |
-
if ( empty( self::$builder->get_language() ) ) {
|
112 |
-
/**
|
113 |
-
* Prevent update post meta when $builder is not set.
|
114 |
-
* For example, Elementor saves meta `_elementor_data` for Template (post type `elementor_library`).
|
115 |
-
* And we have meta `_elementor_data` in `$meta_fields` array @see wpglobus\configs\elementor.json
|
116 |
-
* @since 2.2.33
|
117 |
-
*/
|
118 |
-
return $check;
|
119 |
-
}
|
120 |
-
|
121 |
-
$meta_type = 'post';
|
122 |
-
|
123 |
-
/** @global wpdb $wpdb */
|
124 |
-
global $wpdb;
|
125 |
-
|
126 |
-
$table = _get_meta_table( $meta_type );
|
127 |
-
if ( ! $table ) {
|
128 |
-
return false;
|
129 |
-
}
|
130 |
-
|
131 |
-
$column = $meta_type . '_id';
|
132 |
-
$id_column = 'meta_id';
|
133 |
-
|
134 |
-
$raw_meta_key = $meta_key;
|
135 |
-
|
136 |
-
// Compare existing value to new value if no prev value given and the key exists only once.
|
137 |
-
if ( empty( $prev_value ) ) {
|
138 |
-
$old_value = get_metadata( $meta_type, $object_id, $meta_key );
|
139 |
-
if ( 1 === count( $old_value ) ) {
|
140 |
-
if ( ! empty( $old_value[0] ) && $old_value[0] === $meta_value ) {
|
141 |
-
return false;
|
142 |
-
}
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
$_meta_value = $meta_value;
|
147 |
-
/**
|
148 |
-
* @since 2.1.7
|
149 |
-
*/
|
150 |
-
$meta_value = maybe_serialize( $meta_value );
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Don't auto-modify this SQL query.
|
154 |
-
*/
|
155 |
-
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
156 |
-
$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) );
|
157 |
-
|
158 |
-
/*
|
159 |
-
// Incorrect query.
|
160 |
-
$meta_ids = $wpdb->get_col( $wpdb->prepare(
|
161 |
-
'SELECT %s FROM %s WHERE meta_key = %s AND %s = %d',
|
162 |
-
$id_column,
|
163 |
-
$table,
|
164 |
-
$meta_key,
|
165 |
-
$column,
|
166 |
-
$object_id
|
167 |
-
) );
|
168 |
-
// */
|
169 |
-
|
170 |
-
if ( empty( $meta_ids ) ) {
|
171 |
-
|
172 |
-
$_passed_value = $_meta_value;
|
173 |
-
|
174 |
-
if ( ! empty( $_passed_value ) && WPGlobus::Config()->default_language !== self::$builder->get_language() ) {
|
175 |
-
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement
|
176 |
-
if ( WPGlobus_Core::has_translations( $_passed_value ) ) {
|
177 |
-
/**
|
178 |
-
* We get multilingual $meta_value. Let save it as is.
|
179 |
-
*
|
180 |
-
* @since 1.9.25 do nothing.
|
181 |
-
*/
|
182 |
-
} else {
|
183 |
-
$_passed_value = self::build_multilingual_string( array( self::$builder->get_language() => $_passed_value ) );
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
return add_metadata( $meta_type, $object_id, $raw_meta_key, $_passed_value );
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* WPGlobus Core.
|
192 |
-
* We get $meta_value in language that can be retrieved with self::$builder->get_language().
|
193 |
-
*/
|
194 |
-
$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
|
195 |
-
|
196 |
-
/**
|
197 |
-
* May be we need to update meta cache.
|
198 |
-
*
|
199 |
-
* @see 'filter__post_metadata' function.
|
200 |
-
*/
|
201 |
-
|
202 |
-
// if ( !$meta_cache ) {
|
203 |
-
// $meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
|
204 |
-
// $meta_cache = $meta_cache[$object_id];
|
205 |
-
// }
|
206 |
-
|
207 |
-
if ( isset( $meta_cache[ $meta_key ] ) ) {
|
208 |
-
|
209 |
-
//if ( WPGlobus_Core::has_translations( $passed_value ) ) {
|
210 |
-
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement
|
211 |
-
if ( WPGlobus_Core::has_translations( $meta_value ) ) {
|
212 |
-
/**
|
213 |
-
* We get multilingual $meta_value. Let save it as is.
|
214 |
-
*/
|
215 |
-
// @since 1.9.25 do nothing.
|
216 |
-
} else {
|
217 |
-
|
218 |
-
foreach ( $meta_cache[ $meta_key ] as $_key => $_ml_value ) {
|
219 |
-
|
220 |
-
$_new_ml_array = array();
|
221 |
-
|
222 |
-
if ( WPGlobus_Core::has_translations( $_ml_value ) ) {
|
223 |
-
|
224 |
-
foreach ( WPGlobus::Config()->enabled_languages as $language ) :
|
225 |
-
|
226 |
-
if ( $language === self::$builder->get_language() ) {
|
227 |
-
|
228 |
-
if ( ! empty( $meta_value ) ) {
|
229 |
-
$_new_ml_array[ $language ] = $meta_value;
|
230 |
-
}
|
231 |
-
} else {
|
232 |
-
|
233 |
-
$_value = WPGlobus_Core::text_filter( $_ml_value, $language, WPGlobus::RETURN_EMPTY );
|
234 |
-
|
235 |
-
if ( '' !== $_value ) {
|
236 |
-
$_new_ml_array[ $language ] = $_value;
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
endforeach;
|
241 |
-
|
242 |
-
$_new_value = self::build_multilingual_string( $_new_ml_array );
|
243 |
-
|
244 |
-
} else {
|
245 |
-
|
246 |
-
if ( WPGlobus::Config()->default_language === self::$builder->get_language() ) {
|
247 |
-
$_new_ml_array[ WPGlobus::Config()->default_language ] = $meta_value;
|
248 |
-
} else {
|
249 |
-
$_new_ml_array[ WPGlobus::Config()->default_language ] = $_ml_value;
|
250 |
-
if ( ! empty( $meta_value ) ) {
|
251 |
-
$_new_ml_array[ self::$builder->get_language() ] = $meta_value;
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
$_new_value = self::build_multilingual_string( $_new_ml_array );
|
256 |
-
|
257 |
-
}
|
258 |
-
|
259 |
-
if ( ! empty( $_new_value ) ) {
|
260 |
-
//$meta_value = maybe_unserialize( $_new_value );
|
261 |
-
$meta_value = $_new_value;
|
262 |
-
}
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
$data = compact( 'meta_value' );
|
268 |
-
$where = array(
|
269 |
-
$column => $object_id,
|
270 |
-
'meta_key' => $meta_key,
|
271 |
-
);
|
272 |
-
|
273 |
-
$result = $wpdb->update( $table, $data, $where );
|
274 |
-
|
275 |
-
if ( ! $result ) {
|
276 |
-
return false;
|
277 |
-
}
|
278 |
-
|
279 |
-
wp_cache_delete( $object_id, $meta_type . '_meta' );
|
280 |
-
|
281 |
-
return true;
|
282 |
-
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Delete metadata for the specified object.
|
287 |
-
*
|
288 |
-
* in our case we should prevent deleting multilingual string when $meta_value is empty.
|
289 |
-
*
|
290 |
-
* @see wp-includes\meta.php "delete_{$meta_type}_metadata".
|
291 |
-
*
|
292 |
-
* @param null|bool $check Whether to allow metadata deletion of the given type.
|
293 |
-
* @param int $object_id Object ID.
|
294 |
-
* @param string $meta_key Meta key.
|
295 |
-
* @param mixed $meta_value Meta value. Must be serializable if non-scalar.
|
296 |
-
* @param bool $delete_all Whether to delete the matching metadata entries
|
297 |
-
* for all objects, ignoring the specified $object_id.
|
298 |
-
* Default false.
|
299 |
-
*
|
300 |
-
* @return bool|null
|
301 |
-
*/
|
302 |
-
public static function filter__delete_metadata(
|
303 |
-
$check, $object_id, $meta_key, $meta_value,
|
304 |
-
/** @noinspection PhpUnusedParameterInspection */
|
305 |
-
$delete_all = false
|
306 |
-
) {
|
307 |
-
|
308 |
-
if ( empty( self::$meta_fields ) ) {
|
309 |
-
return $check;
|
310 |
-
}
|
311 |
-
|
312 |
-
if ( ! self::meta_key_exists( $meta_key ) ) {
|
313 |
-
return $check;
|
314 |
-
}
|
315 |
-
|
316 |
-
$result = true;
|
317 |
-
|
318 |
-
if ( empty( $meta_value ) && WPGlobus::Config()->default_language === self::$builder->get_language() ) {
|
319 |
-
|
320 |
-
/**
|
321 |
-
* @todo check for extra languages.
|
322 |
-
*/
|
323 |
-
|
324 |
-
/** @global wpdb $wpdb */
|
325 |
-
global $wpdb;
|
326 |
-
|
327 |
-
$_meta_value =
|
328 |
-
$wpdb->get_col(
|
329 |
-
$wpdb->prepare(
|
330 |
-
"SELECT meta_value FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s",
|
331 |
-
$object_id,
|
332 |
-
$meta_key
|
333 |
-
)
|
334 |
-
);
|
335 |
-
|
336 |
-
if ( ! isset( $_meta_value ) || empty( $_meta_value[0] ) ) {
|
337 |
-
$result = null;
|
338 |
-
} else {
|
339 |
-
if ( WPGlobus_Core::has_translations( $_meta_value[0] ) ) {
|
340 |
-
$result = true;
|
341 |
-
} else {
|
342 |
-
$result = null;
|
343 |
-
}
|
344 |
-
}
|
345 |
-
}
|
346 |
-
|
347 |
-
return $result;
|
348 |
-
|
349 |
-
}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* Get post meta.
|
353 |
-
*
|
354 |
-
* @see \get_metadata()
|
355 |
-
*
|
356 |
-
* @param null|array|string $check The value get_metadata() should return - a single metadata value,
|
357 |
-
* or an array of values.
|
358 |
-
* @param int $object_id Object ID.
|
359 |
-
* @param string $meta_key Meta key.
|
360 |
-
* @param bool $single Whether to return only the first value of the specified $meta_key.
|
361 |
-
*
|
362 |
-
* @return array|null|string
|
363 |
-
*/
|
364 |
-
public static function filter__post_metadata( $check, $object_id, $meta_key, $single ) {
|
365 |
-
|
366 |
-
if ( empty( self::$meta_fields ) ) {
|
367 |
-
return $check;
|
368 |
-
}
|
369 |
-
|
370 |
-
if ( empty( $meta_key ) ) {
|
371 |
-
$_cache_meta_key = '__WPGLOBUS_META_KEY_EMPTY__';
|
372 |
-
} else {
|
373 |
-
|
374 |
-
if ( ! self::meta_key_exists( $meta_key ) ) {
|
375 |
-
return $check;
|
376 |
-
}
|
377 |
-
$_cache_meta_key = $meta_key;
|
378 |
-
}
|
379 |
-
|
380 |
-
$return_value = 'as_array';
|
381 |
-
if ( $single ) {
|
382 |
-
$return_value = 'as_single';
|
383 |
-
}
|
384 |
-
|
385 |
-
/**
|
386 |
-
* Disable/enable to filter meta field.
|
387 |
-
*
|
388 |
-
* @since 1.9.25
|
389 |
-
*
|
390 |
-
* @param string $meta_key Meta key.
|
391 |
-
*
|
392 |
-
* @return string|boolean String if to filter meta field or false if not.
|
393 |
-
*/
|
394 |
-
if ( ! empty( $meta_key ) && is_string( $meta_key ) ) {
|
395 |
-
// phpcs:ignore WordPress.NamingConventions
|
396 |
-
$meta_key = apply_filters( 'wpglobus/meta/key', $meta_key );
|
397 |
-
if ( false === $meta_key ) {
|
398 |
-
return $check;
|
399 |
-
}
|
400 |
-
}
|
401 |
-
|
402 |
-
/**
|
403 |
-
* May be called many times on one page. Let's cache.
|
404 |
-
*/
|
405 |
-
static $_cache;
|
406 |
-
//if ( isset( $_cache[ $_cache_meta_key ][ $object_id ][ $return_value ] ) ) {
|
407 |
-
// @since 2.4
|
408 |
-
//return $_cache[ $_cache_meta_key ][ $object_id ][ $return_value ];
|
409 |
-
//}
|
410 |
-
|
411 |
-
$meta_type = 'post';
|
412 |
-
|
413 |
-
$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
|
414 |
-
|
415 |
-
if ( ! $meta_cache ) {
|
416 |
-
$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
|
417 |
-
$meta_cache = $meta_cache[ $object_id ];
|
418 |
-
}
|
419 |
-
|
420 |
-
if ( ! $meta_key ) {
|
421 |
-
|
422 |
-
/**
|
423 |
-
* @todo add doc.
|
424 |
-
*/
|
425 |
-
if ( ! empty( $meta_cache ) ) {
|
426 |
-
|
427 |
-
foreach ( $meta_cache as $_meta_key => $_values ) {
|
428 |
-
if ( self::meta_key_exists( $_meta_key ) ) {
|
429 |
-
foreach ( $_values as $__key => $__value ) {
|
430 |
-
$meta_cache[ $_meta_key ][ $__key ] = WPGlobus_Core::text_filter( $__value, self::$builder->get_language(), WPGlobus::RETURN_EMPTY );
|
431 |
-
}
|
432 |
-
}
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
$_cache[ $_cache_meta_key ][ $object_id ][ $return_value ] = $meta_cache;
|
437 |
-
|
438 |
-
return $meta_cache;
|
439 |
-
|
440 |
-
} else {
|
441 |
-
|
442 |
-
if ( isset( $meta_cache[ $meta_key ] ) ) {
|
443 |
-
|
444 |
-
if ( $single ) {
|
445 |
-
|
446 |
-
$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], self::$builder->get_language(), WPGlobus::RETURN_EMPTY );
|
447 |
-
|
448 |
-
if ( ! empty( $_value ) ) {
|
449 |
-
$_value = maybe_unserialize( $_value );
|
450 |
-
}
|
451 |
-
|
452 |
-
if ( is_array( $_value ) ) {
|
453 |
-
// !!!!!!
|
454 |
-
$_value = array( $_value );
|
455 |
-
} else {
|
456 |
-
$_cache[ $_cache_meta_key ][ $object_id ][ $return_value ] = $_value;
|
457 |
-
}
|
458 |
-
|
459 |
-
return $_value;
|
460 |
-
|
461 |
-
} else {
|
462 |
-
|
463 |
-
foreach ( $meta_cache[ $meta_key ] as $_key => $_value ) {
|
464 |
-
|
465 |
-
if ( WPGlobus_Core::has_translations( $_value ) ) {
|
466 |
-
$_value = WPGlobus_Core::text_filter( $_value, self::$builder->get_language(), WPGlobus::RETURN_EMPTY );
|
467 |
-
} elseif ( self::$builder->get_language() !== WPGlobus::Config()->default_language ) {
|
468 |
-
$_value = '';
|
469 |
-
}
|
470 |
-
|
471 |
-
if ( ! empty( $_value ) ) {
|
472 |
-
$meta_cache[ $meta_key ][ $_key ] = maybe_unserialize( $_value );
|
473 |
-
} else {
|
474 |
-
$meta_cache[ $meta_key ][ $_key ] = '';
|
475 |
-
}
|
476 |
-
}
|
477 |
-
|
478 |
-
$_cache[ $_cache_meta_key ][ $object_id ][ $return_value ] = $meta_cache[ $meta_key ];
|
479 |
-
|
480 |
-
return $meta_cache[ $meta_key ];
|
481 |
-
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
if ( $single ) {
|
486 |
-
return '';
|
487 |
-
} else {
|
488 |
-
return array();
|
489 |
-
}
|
490 |
-
}
|
491 |
-
|
492 |
-
// We should not be here. Keeping as a precaution for potential code changes.
|
493 |
-
|
494 |
-
/** @noinspection PhpUnreachableStatementInspection */
|
495 |
-
return $check;
|
496 |
-
|
497 |
-
}
|
498 |
-
|
499 |
-
/**
|
500 |
-
* Check for meta key existence.
|
501 |
-
*
|
502 |
-
* @param string $meta_key
|
503 |
-
*
|
504 |
-
* @return bool
|
505 |
-
*/
|
506 |
-
protected static function meta_key_exists( $meta_key ) {
|
507 |
-
if ( in_array( $meta_key, self::$meta_fields, true ) ) {
|
508 |
-
return true;
|
509 |
-
}
|
510 |
-
|
511 |
-
return false;
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* Build multilingual string.
|
516 |
-
*
|
517 |
-
* @since 1.9.25
|
518 |
-
* @todo First idea is: This function needs for Page Builder by SiteOrigin because it should serialize array before creating multilingual string.
|
519 |
-
*
|
520 |
-
* @param string[] $ml_array
|
521 |
-
*
|
522 |
-
* @return string
|
523 |
-
*/
|
524 |
-
protected static function build_multilingual_string( $ml_array ) {
|
525 |
-
|
526 |
-
/**
|
527 |
-
* @todo W.I.P with Page Builder by SiteOrigin.
|
528 |
-
*/
|
529 |
-
/**
|
530 |
-
* foreach( $ml_array as $language=>$value ) {
|
531 |
-
* if ( is_array($value) ) {
|
532 |
-
* $ml_array[$language] = maybe_serialize($value);
|
533 |
-
* }
|
534 |
-
* }
|
535 |
-
* // */
|
536 |
-
|
537 |
-
$_str = WPGlobus_Utils::build_multilingual_string( $ml_array );
|
538 |
-
|
539 |
-
return $_str;
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
* Class Admin Recommendations.
|
11 |
-
*/
|
12 |
-
class WPGlobus_Admin_Recommendations {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* True if need to run JS.
|
16 |
-
*
|
17 |
-
* @var bool
|
18 |
-
*/
|
19 |
-
protected static $run_js = false;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Setup actions and filters.
|
23 |
-
*/
|
24 |
-
public static function setup_hooks() {
|
25 |
-
add_filter( 'woocommerce_general_settings', array( __CLASS__, 'for_woocommerce' ) );
|
26 |
-
add_filter( 'wpglobus_edit_slug_box', array( __CLASS__, 'wpg_plus_slug' ) );
|
27 |
-
add_action( 'admin_footer', array( __CLASS__, 'on__admin_footer' ), 1000 );
|
28 |
-
add_action( 'wpglobus_gutenberg_metabox', array( __CLASS__, 'on__gutenberg_metabox' ) );
|
29 |
-
add_filter(
|
30 |
-
'plugin_action_links_' . dirname( dirname( dirname( dirname( plugin_basename( __FILE__ ) ) ) ) ) . '/wpglobus.php',
|
31 |
-
array(
|
32 |
-
__CLASS__,
|
33 |
-
'filter__plugin_action_links',
|
34 |
-
)
|
35 |
-
);
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Add a link to the Recommendations tab.
|
41 |
-
*
|
42 |
-
* @since 2.2.20
|
43 |
-
*
|
44 |
-
* @param array $links array of links for the plugins, adapted when the current plugin is found.
|
45 |
-
*
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
public static function filter__plugin_action_links( $links ) {
|
49 |
-
|
50 |
-
$_url = add_query_arg( array( 'page' => WPGlobus::OPTIONS_PAGE_SLUG, 'tab' => 'recommendations' ), admin_url( 'admin.php' ) );
|
51 |
-
|
52 |
-
$recommend_link = '<a style="font-weight: bold;" href="' . $_url . '">' . esc_html__( 'Go Premium' ) . '</a>';
|
53 |
-
array_unshift( $links, $recommend_link );
|
54 |
-
|
55 |
-
return $links;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Recommendations for WooCommerce.
|
60 |
-
*
|
61 |
-
* @param array $settings Passed by WooCommerce.
|
62 |
-
*
|
63 |
-
* @return array
|
64 |
-
*
|
65 |
-
* @internal
|
66 |
-
*/
|
67 |
-
public static function for_woocommerce( $settings ) {
|
68 |
-
// Ugly set of "IFs" to display heading only if needed, and only once.
|
69 |
-
$need_to_show_wc_heading = false;
|
70 |
-
$need_to_recommend_wpg_wc = false;
|
71 |
-
$need_to_recommend_wpg_mc = false;
|
72 |
-
|
73 |
-
if ( ! is_plugin_active( 'woocommerce-wpglobus/woocommerce-wpglobus.php' ) ) {
|
74 |
-
$need_to_show_wc_heading = true;
|
75 |
-
$need_to_recommend_wpg_wc = true;
|
76 |
-
}
|
77 |
-
|
78 |
-
if ( ! is_plugin_active( 'woocommerce-multicurrency/woocommerce-multicurrency.php' ) ) {
|
79 |
-
$need_to_show_wc_heading = true;
|
80 |
-
$need_to_recommend_wpg_mc = true;
|
81 |
-
}
|
82 |
-
|
83 |
-
if ( $need_to_show_wc_heading ) {
|
84 |
-
$id = 'wpglobus-recommend-wc-heading';
|
85 |
-
$title = '';
|
86 |
-
$desc =
|
87 |
-
'<h2><span class="wp-ui-notification" style="padding:10px 20px;">' .
|
88 |
-
'<span class="dashicons dashicons-admin-site"></span> ' .
|
89 |
-
esc_html__( 'WPGlobus Recommends:', 'wpglobus' ) .
|
90 |
-
'</span></h2>';
|
91 |
-
|
92 |
-
self::add_wc_section( $settings, $id, $title, $desc );
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( $need_to_recommend_wpg_wc ) {
|
96 |
-
$url = WPGlobus_Utils::url_wpglobus_site() . 'product/woocommerce-wpglobus/';
|
97 |
-
$id = 'wpglobus-recommend-wpg-wc';
|
98 |
-
$title = '• ' . esc_html__( 'WPGlobus for WooCommerce', 'wpglobus' );
|
99 |
-
$desc =
|
100 |
-
'<p class="wp-ui-text-notification">' .
|
101 |
-
'<strong>' .
|
102 |
-
esc_html__( 'Translate product titles and descriptions, product categories, tags and attributes.', 'wpglobus' ) .
|
103 |
-
'</strong>' .
|
104 |
-
'</p>' .
|
105 |
-
'<p>' .
|
106 |
-
'<strong>' .
|
107 |
-
esc_html__( 'Get it now:', 'wpglobus' ) . ' ' .
|
108 |
-
'</strong>' .
|
109 |
-
'<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>' .
|
110 |
-
'</p>';
|
111 |
-
self::add_wc_section( $settings, $id, $title, $desc );
|
112 |
-
}
|
113 |
-
|
114 |
-
if ( $need_to_recommend_wpg_mc ) {
|
115 |
-
$url = WPGlobus_Utils::url_wpglobus_site() . 'product/wpglobus-multi-currency/';
|
116 |
-
$id = 'wpglobus-recommend-wpg-mc';
|
117 |
-
$title = '• ' . __( 'WooCommerce Multi-Currency', 'wpglobus' );
|
118 |
-
$desc =
|
119 |
-
'<p class="wp-ui-text-notification">' .
|
120 |
-
'<strong>' .
|
121 |
-
esc_html__( 'Accept multiple currencies in your online store!', 'wpglobus' ) .
|
122 |
-
'</strong>' .
|
123 |
-
'</p>' .
|
124 |
-
'<p>' .
|
125 |
-
'<strong>' .
|
126 |
-
esc_html__( 'Check it out:', 'wpglobus' ) .
|
127 |
-
'</strong>' .
|
128 |
-
' ' .
|
129 |
-
'<a href="' . $url . '">' . $url . '</a>' .
|
130 |
-
'</p>';
|
131 |
-
self::add_wc_section( $settings, $id, $title, $desc );
|
132 |
-
}
|
133 |
-
|
134 |
-
return $settings;
|
135 |
-
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Generic WC option section consisting of one block of text only.
|
140 |
-
*
|
141 |
-
* @param array $settings Array of WC settings, passed by reference.
|
142 |
-
* @param string $id Section ID, must be unique.
|
143 |
-
* @param string $title Section title, no HTML.
|
144 |
-
* @param string $desc The text to display, HTML is allowed.
|
145 |
-
*
|
146 |
-
* @return void
|
147 |
-
*/
|
148 |
-
protected static function add_wc_section( &$settings, $id, $title, $desc ) {
|
149 |
-
$settings[] =
|
150 |
-
array(
|
151 |
-
'type' => 'title',
|
152 |
-
'id' => $id,
|
153 |
-
'title' => $title,
|
154 |
-
'desc' => $desc,
|
155 |
-
);
|
156 |
-
|
157 |
-
$settings[] =
|
158 |
-
array(
|
159 |
-
'type' => 'sectionend',
|
160 |
-
'id' => $id,
|
161 |
-
);
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Recommend WPGlobus Plus to edit permalinks.
|
166 |
-
*
|
167 |
-
* @since 1.9.6
|
168 |
-
*/
|
169 |
-
public static function wpg_plus_slug() {
|
170 |
-
|
171 |
-
global $pagenow;
|
172 |
-
|
173 |
-
if ( 'post-new.php' === $pagenow ) {
|
174 |
-
return;
|
175 |
-
}
|
176 |
-
|
177 |
-
$container_start = '<p id="wpglobus-plus-slug-recommendation" style="padding:5px; font-weight: bold"><span class="dashicons dashicons-admin-site"></span> ';
|
178 |
-
$container_end = '</p>';
|
179 |
-
|
180 |
-
if ( ! is_plugin_active( 'wpglobus-plus/wpglobus-plus.php' ) ) {
|
181 |
-
$url = WPGlobus_Utils::url_wpglobus_site() . 'product/wpglobus-plus/#slug';
|
182 |
-
echo $container_start; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
183 |
-
esc_html_e( 'Translate permalinks with our premium add-on, WPGlobus Plus!', 'wpglobus' );
|
184 |
-
echo ' ';
|
185 |
-
esc_html_e( 'Check it out:', 'wpglobus' );
|
186 |
-
echo ' ';
|
187 |
-
echo '<a href="' . esc_url( $url ) . '" target="_blank">' . esc_html( $url ) . '</a>';
|
188 |
-
echo $container_end; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
189 |
-
|
190 |
-
self::$run_js = true;
|
191 |
-
|
192 |
-
} elseif ( ! class_exists( 'WPGlobusPlus_Slug', false ) ) {
|
193 |
-
$url = admin_url( 'admin.php' ) . '?page=' . WPGlobusPlus::WPGLOBUS_PLUS_OPTIONS_PAGE . '&tab=modules';
|
194 |
-
echo $container_start; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
195 |
-
esc_html_e( 'To translate permalinks, please activate the module Slug.', 'wpglobus' );
|
196 |
-
echo ' ';
|
197 |
-
// Do not translate.
|
198 |
-
$msg = __( 'Go to WPGlobus Plus Options page', 'wpglobus-plus' );
|
199 |
-
|
200 |
-
echo '<a href="' . esc_url( $url ) . '" target="_blank">' . esc_html( $msg ) . '.</a>';
|
201 |
-
echo $container_end; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
202 |
-
|
203 |
-
self::$run_js = true;
|
204 |
-
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Action wpglobus_gutenberg_metabox.
|
210 |
-
*
|
211 |
-
* @since 1.9.17
|
212 |
-
*/
|
213 |
-
public static function on__gutenberg_metabox() {
|
214 |
-
|
215 |
-
if ( WPGlobus::Config()->builder->is_running() ) {
|
216 |
-
self::wpg_plus_slug();
|
217 |
-
self::$run_js = false;
|
218 |
-
}
|
219 |
-
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Action admin_footer.
|
224 |
-
*
|
225 |
-
* @since 1.9.17
|
226 |
-
*/
|
227 |
-
public static function on__admin_footer() {
|
228 |
-
|
229 |
-
if ( ! self::$run_js ) {
|
230 |
-
return;
|
231 |
-
}
|
232 |
-
|
233 |
-
if ( ! WPGlobus::Config()->builder->is_running() ) {
|
234 |
-
return;
|
235 |
-
}
|
236 |
-
|
237 |
-
if ( WPGlobus::Config()->builder->get_language() === WPGlobus::Config()->default_language ) {
|
238 |
-
return;
|
239 |
-
}
|
240 |
-
|
241 |
-
?>
|
242 |
-
<script>
|
243 |
-
var $edit_slug_box = jQuery('#edit-slug-box');
|
244 |
-
$edit_slug_box.css({'display': 'none'});
|
245 |
-
var wpglobus_slug_recomm_box = jQuery('#wpglobus-plus-slug-recommendation').remove();
|
246 |
-
$edit_slug_box.before(wpglobus_slug_recomm_box);
|
247 |
-
</script>
|
248 |
-
<?php
|
249 |
-
}
|
250 |
-
|
251 |
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class-wpglobus-register-post-types.php
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-register-post-types.php
|
4 |
-
*
|
5 |
-
* @since 2.2.24
|
6 |
-
* @package WPGlobus\Admin
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Register_Post_Types.
|
11 |
-
*/
|
12 |
-
if ( ! class_exists( 'WPGlobus_Register_Post_Types' ) ) :
|
13 |
-
|
14 |
-
class WPGlobus_Register_Post_Types {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @var array
|
18 |
-
*/
|
19 |
-
protected static $pages = array( 'edit.php', 'post.php' );
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Don't handling with these post types.
|
23 |
-
* @var array
|
24 |
-
*/
|
25 |
-
protected static $excluded_post_types = array(
|
26 |
-
'attachment',
|
27 |
-
'attachment:audio',
|
28 |
-
'attachment:video',
|
29 |
-
'revision',
|
30 |
-
'nav_menu_item',
|
31 |
-
'custom_css',
|
32 |
-
'customize_changeset',
|
33 |
-
'oembed_cache',
|
34 |
-
'user_request',
|
35 |
-
'wp_block',
|
36 |
-
);
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
protected static $post_types = array();
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Constructor.
|
45 |
-
*/
|
46 |
-
public static function construct() {
|
47 |
-
|
48 |
-
if ( ! WPGlobus_WP::is_pagenow(self::$pages) ) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @see wp-includes\post.php
|
54 |
-
*/
|
55 |
-
add_action( 'registered_post_type', array( __CLASS__, 'on__registered' ), 10, 2 );
|
56 |
-
|
57 |
-
add_action( 'wp_loaded', array( __CLASS__, 'on__wp_loaded' ) );
|
58 |
-
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Fires after a post type is registered.
|
63 |
-
*
|
64 |
-
* @param string $post_type Post type.
|
65 |
-
* @param WP_Post_Type $post_type_object Arguments used to register the post type.
|
66 |
-
*/
|
67 |
-
public static function on__registered( $post_type, $post_type_object ) {
|
68 |
-
|
69 |
-
global $_wp_post_type_features;
|
70 |
-
|
71 |
-
if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
72 |
-
return;
|
73 |
-
}
|
74 |
-
|
75 |
-
static $_init = null;
|
76 |
-
|
77 |
-
if ( is_null($_init) ) {
|
78 |
-
|
79 |
-
self::$excluded_post_types = array_merge(self::$excluded_post_types, WPGlobus::Config()->disabled_entities);
|
80 |
-
|
81 |
-
self::$excluded_post_types = array_unique( self::$excluded_post_types );
|
82 |
-
|
83 |
-
$_init = true;
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
if ( self::is_excluded_post_type($post_type) ) {
|
88 |
-
return;
|
89 |
-
}
|
90 |
-
|
91 |
-
if ( empty($_wp_post_type_features[$post_type]) ) {
|
92 |
-
return;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* @see `use_block_editor_for_post_type()` in wp-admin\includes\post.php
|
97 |
-
*/
|
98 |
-
self::$post_types[$post_type] = array(
|
99 |
-
'show_in_rest' => $post_type_object->show_in_rest,
|
100 |
-
'features' => $_wp_post_type_features[$post_type]
|
101 |
-
);
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Fired to save option.
|
107 |
-
*/
|
108 |
-
public static function on__wp_loaded() {
|
109 |
-
|
110 |
-
if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
111 |
-
return;
|
112 |
-
}
|
113 |
-
if ( ! empty(self::$post_types) ) {
|
114 |
-
update_option( WPGlobus::Config()->option_register_post_types, self::$post_types, false );
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Check for excluded post type.
|
120 |
-
*
|
121 |
-
* @return bool
|
122 |
-
*/
|
123 |
-
public static function is_excluded_post_type( $post_type = '') {
|
124 |
-
|
125 |
-
if ( empty($post_type) ) {
|
126 |
-
return true;
|
127 |
-
}
|
128 |
-
|
129 |
-
if ( in_array( $post_type, self::get_excluded_post_types() ) ) {
|
130 |
-
return true;
|
131 |
-
}
|
132 |
-
|
133 |
-
return false;
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Get excluded post types.
|
138 |
-
*
|
139 |
-
* @return array
|
140 |
-
*/
|
141 |
-
public static function get_excluded_post_types() {
|
142 |
-
return self::$excluded_post_types;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
endif;
|
147 |
-
/* EOF */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/admin/wpglobus-admin.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @since 1.8.1
|
4 |
-
* @package WPGlobus
|
5 |
-
*/
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Admin page central.
|
9 |
-
*
|
10 |
-
* @since 1.6.6
|
11 |
-
*/
|
12 |
-
require_once dirname( __FILE__ ) . '/central/class-wpglobus-admin-central.php';
|
13 |
-
WPGlobus_Admin_Central::construct();
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @since 2.2.24
|
17 |
-
*/
|
18 |
-
require_once dirname( __FILE__ ) . '/register-post-types/class-wpglobus-register-post-types.php';
|
19 |
-
WPGlobus_Register_Post_Types::construct();
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @since 2.4
|
23 |
-
*/
|
24 |
-
require_once dirname( __FILE__ ) . '/class-wpglobus-admin-post.php';
|
25 |
-
WPGlobus_Admin_Post::construct();
|
26 |
-
|
27 |
-
if ( isset( $_GET['wpglobus-debug'] ) ) { // WPCS: input var ok, sanitization ok.
|
28 |
-
/**
|
29 |
-
* To load debug info
|
30 |
-
* site/wp-admin/post.php?post={{post_ID}}&action=edit&wpglobus-debug=godmode
|
31 |
-
* or
|
32 |
-
* site/wp-admin/post.php?post={{post_ID}}&action=edit&wpglobus-debug=meta
|
33 |
-
*/
|
34 |
-
require_once dirname( __FILE__ ) . '/debug/class-wpglobus-admin-debug.php';
|
35 |
-
WPGlobus_Admin_Debug::get_instance();
|
36 |
-
}
|
37 |
-
|
38 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/assets/wpglobus-admin-builder-49.js
DELETED
@@ -1,348 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* WPGlobus Administration Core.
|
3 |
-
* Interface JS functions
|
4 |
-
*
|
5 |
-
* @since 1.9.17
|
6 |
-
*
|
7 |
-
* @package WPGlobus
|
8 |
-
* @subpackage Administration
|
9 |
-
*/
|
10 |
-
/*jslint browser: true*/
|
11 |
-
/*global jQuery, console, WPGlobusCore*/
|
12 |
-
|
13 |
-
var WPGlobusCore;
|
14 |
-
|
15 |
-
(function($) {
|
16 |
-
var api;
|
17 |
-
api = WPGlobusCore = {
|
18 |
-
strpos: function( haystack, needle, offset){
|
19 |
-
haystack = "" + haystack;
|
20 |
-
var i = haystack.indexOf( needle, offset );
|
21 |
-
return i >= 0 ? i : false;
|
22 |
-
},
|
23 |
-
|
24 |
-
TextFilter: function(text, language, return_in){
|
25 |
-
if ( typeof text == 'undefined' || '' === text ) { return text; }
|
26 |
-
|
27 |
-
var pos_start, pos_end, possible_delimiters = [], is_local_text_found = false;;
|
28 |
-
|
29 |
-
language = '' == language ? 'en' : language;
|
30 |
-
return_in = typeof return_in == 'undefined' || '' == return_in ? 'RETURN_IN_DEFAULT_LANGUAGE' : return_in;
|
31 |
-
|
32 |
-
possible_delimiters[0] = [];
|
33 |
-
possible_delimiters[0]['start'] = WPGlobusCoreData.locale_tag_start.replace('%s', language);
|
34 |
-
possible_delimiters[0]['end'] = WPGlobusCoreData.locale_tag_end;
|
35 |
-
|
36 |
-
possible_delimiters[1] = [];
|
37 |
-
possible_delimiters[1]['start'] = '<!--:'+language+'-->';
|
38 |
-
possible_delimiters[1]['end'] = '<!--:-->';
|
39 |
-
|
40 |
-
possible_delimiters[2] = [];
|
41 |
-
possible_delimiters[2]['start'] = '[:'+language+']';
|
42 |
-
possible_delimiters[2]['end'] = '[:';
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
for (var i = 0; i < 3; i++) {
|
47 |
-
|
48 |
-
pos_start = api.strpos( text, possible_delimiters[i]['start'] );
|
49 |
-
if ( pos_start === false ) {
|
50 |
-
continue;
|
51 |
-
}
|
52 |
-
|
53 |
-
pos_start = pos_start + possible_delimiters[i]['start'].length;
|
54 |
-
|
55 |
-
pos_end = api.strpos( text, possible_delimiters[i]['end'], pos_start );
|
56 |
-
|
57 |
-
if ( pos_end === false ) {
|
58 |
-
text = text.substr( pos_start );
|
59 |
-
} else {
|
60 |
-
text = text.substr( pos_start, pos_end - pos_start );
|
61 |
-
}
|
62 |
-
|
63 |
-
is_local_text_found = true;
|
64 |
-
break;
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
if ( ! is_local_text_found ) {
|
69 |
-
if ( return_in == 'RETURN_EMPTY' ) {
|
70 |
-
if ( language == WPGlobusCoreData.default_language && ! /(\{:|\[:|<!--:)[a-z]{2}/.test(text) ) {
|
71 |
-
/** do nothing */
|
72 |
-
} else {
|
73 |
-
text = '';
|
74 |
-
}
|
75 |
-
} else {
|
76 |
-
/**
|
77 |
-
* Try RETURN_IN_DEFAULT_LANGUAGE.
|
78 |
-
*/
|
79 |
-
if ( language == WPGlobusCoreData.default_language ) {
|
80 |
-
if ( /(\{:|\[:|<!--:)[a-z]{2}/.test(text) ) {
|
81 |
-
text = '';
|
82 |
-
}
|
83 |
-
} else {
|
84 |
-
text = api.TextFilter( text, WPGlobusCoreData.default_language );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
}
|
88 |
-
return text;
|
89 |
-
},
|
90 |
-
addLocaleMarks: function(text, language) {
|
91 |
-
return WPGlobusCoreData.locale_tag_start.replace('%s', language) + text + WPGlobusCoreData.locale_tag_end;
|
92 |
-
},
|
93 |
-
getTranslations: function(text) {
|
94 |
-
var t = {},
|
95 |
-
return_in;
|
96 |
-
$.each(WPGlobusCoreData.enabled_languages, function(i,l){
|
97 |
-
return_in = l == WPGlobusCoreData.default_language ? 'RETURN_IN_DEFAULT_LANGUAGE' : 'RETURN_EMPTY';
|
98 |
-
t[l] = api.TextFilter(text, l, return_in);
|
99 |
-
});
|
100 |
-
return t;
|
101 |
-
},
|
102 |
-
getString: function(s, newVal, l) {
|
103 |
-
if ( 'undefined' === typeof(s) ) {
|
104 |
-
return s;
|
105 |
-
}
|
106 |
-
if ( 'undefined' === typeof(newVal) ) {
|
107 |
-
newVal = '';
|
108 |
-
}
|
109 |
-
if ( 'undefined' === typeof(l) ) {
|
110 |
-
l = WPGlobusCoreData.language;
|
111 |
-
}
|
112 |
-
|
113 |
-
s = api.getTranslations(s);
|
114 |
-
s[l] = newVal;
|
115 |
-
|
116 |
-
var cS = '';
|
117 |
-
|
118 |
-
$.each(s, function(ln,val){
|
119 |
-
if ( '' != val && ln != WPGlobusCoreData.default_language) {
|
120 |
-
cS += api.addLocaleMarks(val, ln);
|
121 |
-
}
|
122 |
-
});
|
123 |
-
|
124 |
-
if ( '' != s[WPGlobusCoreData.default_language] ) {
|
125 |
-
if ( '' == cS ) {
|
126 |
-
cS = s[WPGlobusCoreData.default_language];
|
127 |
-
} else {
|
128 |
-
cS = api.addLocaleMarks(s[WPGlobusCoreData.default_language], WPGlobusCoreData.default_language) + cS;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
return cS;
|
132 |
-
}
|
133 |
-
};
|
134 |
-
})(jQuery);
|
135 |
-
|
136 |
-
jQuery(document).ready(function ($) {
|
137 |
-
"use strict";
|
138 |
-
|
139 |
-
if ( 'undefined' === typeof WPGlobusAdmin ) {
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
|
143 |
-
var api = {
|
144 |
-
languageSelectorBoxDelta: 0,
|
145 |
-
locationPathname: '/wp-admin/post.php',
|
146 |
-
init: function() {
|
147 |
-
//api.setCookie();
|
148 |
-
if ('taxonomy-edit' === WPGlobusAdmin.page) {
|
149 |
-
api.taxonomyEdit();
|
150 |
-
} else {
|
151 |
-
api.start();
|
152 |
-
}
|
153 |
-
},
|
154 |
-
_info: function() {
|
155 |
-
var lang = undefined;
|
156 |
-
if( $('#language').length > 0 ) {
|
157 |
-
lang = $('#language').val();
|
158 |
-
}
|
159 |
-
console.log('Current language from hidden (#language) : ', lang);
|
160 |
-
|
161 |
-
lang = undefined;
|
162 |
-
if( $('#wpglobus-language').length > 0 ) {
|
163 |
-
lang = $('#wpglobus-language').val();
|
164 |
-
}
|
165 |
-
console.log('Current language from hidden (#wpglobus-language) : ', lang);
|
166 |
-
|
167 |
-
lang = undefined;
|
168 |
-
if( $('input[name="wpglobus-language"]').length > 0 ) {
|
169 |
-
lang = $('input[name="wpglobus-language"]').val();
|
170 |
-
}
|
171 |
-
console.log('Current language from hidden (input[name="wpglobus-language"]) : ', lang);
|
172 |
-
|
173 |
-
lang = undefined;
|
174 |
-
if( $('input[name="wpglobus_language"]').length > 0 ) {
|
175 |
-
lang = $('input[name="wpglobus_language"]').val();
|
176 |
-
}
|
177 |
-
console.log('Current language from hidden (input[name="wpglobus_language"]) : ', lang);
|
178 |
-
console.log('Builder : ', WPGlobusAdmin.builder);
|
179 |
-
|
180 |
-
var content = $('#content').val();
|
181 |
-
if ( content == '' ) {
|
182 |
-
console.log('Editor content (#content) : (empty)');
|
183 |
-
} else {
|
184 |
-
console.log(content);
|
185 |
-
}
|
186 |
-
},
|
187 |
-
checkCookie: function() {
|
188 |
-
if ( -1 != window.location.search.indexOf('language=') ) {
|
189 |
-
return false;
|
190 |
-
}
|
191 |
-
if ( 'post.php' == WPGlobusAdmin.page ) {
|
192 |
-
var cookie = wpCookies.get(WPGlobusAdmin.builder.languageCookie);
|
193 |
-
|
194 |
-
if ( null !== cookie && history.pushState) {
|
195 |
-
cookie = cookie.split('+');
|
196 |
-
var language = cookie[0];
|
197 |
-
if ('undefined' !== typeof cookie[1] && cookie[1] + 0 == WPGlobusAdmin.$_get.post ) {
|
198 |
-
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search + '&language='+language;
|
199 |
-
window.history.pushState({path:newurl},'',newurl);
|
200 |
-
return language;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
204 |
-
return false;
|
205 |
-
},
|
206 |
-
setCookie: function() {
|
207 |
-
var lang = api.checkCookie();
|
208 |
-
if ( ! lang ) {
|
209 |
-
lang = WPGlobusAdmin.$_get.language;
|
210 |
-
if ( 'undefined' === typeof lang ) {
|
211 |
-
lang = WPGlobusAdmin.data.default_language;
|
212 |
-
}
|
213 |
-
}
|
214 |
-
wpCookies.set(WPGlobusAdmin.builder.languageCookie, lang+'+'+WPGlobusAdmin.$_get.post, 31536000, api.locationPathname );
|
215 |
-
},
|
216 |
-
setLocationSearch: function() {
|
217 |
-
if ( ! history.pushState || -1 != window.location.search.indexOf('language=') ) {
|
218 |
-
return;
|
219 |
-
}
|
220 |
-
if ( WPGlobusAdmin.data.default_language != WPGlobusAdmin.currentTab ) {
|
221 |
-
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search + '&language='+WPGlobusAdmin.currentTab;
|
222 |
-
window.history.pushState({path:newurl},'',newurl);
|
223 |
-
}
|
224 |
-
},
|
225 |
-
taxonomyEdit: function() {
|
226 |
-
|
227 |
-
$('.wpglobus-taxonomy-tabs').insertAfter('#ajax-response');
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Make class wrap as tabs container.
|
231 |
-
* Tabs on.
|
232 |
-
*/
|
233 |
-
$('.wrap').tabs();
|
234 |
-
|
235 |
-
$(WPGlobusAdmin.data.multilingualSlug.title).insertAfter('.term-slug-wrap th label');
|
236 |
-
|
237 |
-
if ( WPGlobusAdmin.currentTab !== WPGlobusAdmin.data.default_language ) {
|
238 |
-
$('.wpglobus-tax-edit-tab').removeClass('ui-tabs-active ui-state-active');
|
239 |
-
$('#wpglobus-link-tab-'+WPGlobusAdmin.currentTab).addClass('ui-tabs-active ui-state-active');
|
240 |
-
}
|
241 |
-
|
242 |
-
$(document).on('click', '.wpglobus-tax-edit-tab a', function(event) {
|
243 |
-
event.preventDefault();
|
244 |
-
var _href = $(this).data('href');
|
245 |
-
location.href = _href;
|
246 |
-
});
|
247 |
-
|
248 |
-
api.setMultilingualFields();
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Init Yoast tinymce editor for description.
|
252 |
-
*/
|
253 |
-
$(document).on( 'tinymce-editor-init', function( event, editor ) {
|
254 |
-
$( '#' + editor.getContainer().id ).find('iframe').addClass(WPGlobusAdmin.builder.translatableClass).css({'width':''});
|
255 |
-
});
|
256 |
-
},
|
257 |
-
start: function() {
|
258 |
-
/**
|
259 |
-
*
|
260 |
-
*/
|
261 |
-
api.setLocationSearch();
|
262 |
-
|
263 |
-
/**
|
264 |
-
*
|
265 |
-
*/
|
266 |
-
var wrap_at = '#postdivrich',
|
267 |
-
set_title = true,
|
268 |
-
content_tabs_id = '#post-body-content';
|
269 |
-
if ( WPGlobusAdmin.data.support['editor'] === false ) {
|
270 |
-
wrap_at = '#titlediv';
|
271 |
-
set_title = false;
|
272 |
-
}
|
273 |
-
if ( WPGlobusAdmin.data.support['title'] === false ) {
|
274 |
-
set_title = false;
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Make post-body-content as tabs container.
|
279 |
-
*/
|
280 |
-
$(content_tabs_id).prepend($('.wpglobus-post-body-tabs-list'));
|
281 |
-
$.each(WPGlobusAdmin.tabs, function (index, suffix) {
|
282 |
-
if ('default' === suffix) {
|
283 |
-
$(wrap_at).wrap('<div id="tab-default"></div>');
|
284 |
-
if ( set_title ) {
|
285 |
-
$($('#titlediv')).insertBefore(wrap_at);
|
286 |
-
}
|
287 |
-
} else {
|
288 |
-
$(wrap_at+'-' + suffix).wrap('<div id="tab-' + suffix + '"></div>');
|
289 |
-
if ( set_title ) {
|
290 |
-
$($('#titlediv-' + suffix)).insertBefore(wrap_at+'-' + suffix);
|
291 |
-
}
|
292 |
-
}
|
293 |
-
});
|
294 |
-
|
295 |
-
$(content_tabs_id).addClass('wpglobus-post-body-tabs');
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Set fields as multilingual.
|
299 |
-
*/
|
300 |
-
//setTimeout(api.setMultilingualFields(), 1000);
|
301 |
-
api.setMultilingualFields();
|
302 |
-
|
303 |
-
/**
|
304 |
-
*
|
305 |
-
*/
|
306 |
-
//api.ajaxPrefilter();
|
307 |
-
|
308 |
-
},
|
309 |
-
ajaxPrefilter: function() {
|
310 |
-
/**
|
311 |
-
* @todo WIP.
|
312 |
-
*/
|
313 |
-
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
|
314 |
-
// Modify options, control originalOptions, store jqXHR, etc
|
315 |
-
//console.log(options);
|
316 |
-
});
|
317 |
-
},
|
318 |
-
setMultilingualFields: function() {
|
319 |
-
$.each(WPGlobusAdmin.builder.multilingualFields, function(indx, field) {
|
320 |
-
var elementBy = 'name';
|
321 |
-
var node = document.getElementsByName(field);
|
322 |
-
var $element;
|
323 |
-
|
324 |
-
if ( 0 == node.length ) {
|
325 |
-
elementBy = 'id';
|
326 |
-
node = document.getElementById(field);
|
327 |
-
}
|
328 |
-
|
329 |
-
if ( null === node ) {
|
330 |
-
return;
|
331 |
-
} else {
|
332 |
-
if ( 'id' == elementBy ) {
|
333 |
-
$element = $('#'+field);
|
334 |
-
} else {
|
335 |
-
var nodeName = node[0].nodeName;
|
336 |
-
nodeName = nodeName.toLowerCase();
|
337 |
-
$element = $(nodeName+'[name="'+field+'"]');
|
338 |
-
}
|
339 |
-
$element.addClass(WPGlobusAdmin.builder.translatableClass);
|
340 |
-
}
|
341 |
-
|
342 |
-
});
|
343 |
-
}
|
344 |
-
}
|
345 |
-
|
346 |
-
WPGlobusAdmin = $.extend({}, WPGlobusAdmin, api);
|
347 |
-
WPGlobusAdmin.init();
|
348 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ders/assets/wpglobus-admin-builder-49.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var WPGlobusCore;!function(l){var s;s=WPGlobusCore={strpos:function(a,t,e){var o=(a=""+a).indexOf(t,e);return 0<=o&&o},TextFilter:function(a,t,e){if(void 0===a||""===a)return a;var o,n,l=[],i=!1;t=""==t?"en":t,e=void 0===e||""==e?"RETURN_IN_DEFAULT_LANGUAGE":e,l[0]=[],l[0].start=WPGlobusCoreData.locale_tag_start.replace("%s",t),l[0].end=WPGlobusCoreData.locale_tag_end,l[1]=[],l[1].start="\x3c!--:"+t+"--\x3e",l[1].end="\x3c!--:--\x3e",l[2]=[],l[2].start="[:"+t+"]",l[2].end="[:";for(var u=0;u<3;u++)if(!1!==(o=s.strpos(a,l[u].start))){o+=l[u].start.length,a=!1===(n=s.strpos(a,l[u].end,o))?a.substr(o):a.substr(o,n-o),i=!0;break}return i||("RETURN_EMPTY"==e?(t!=WPGlobusCoreData.default_language||/(\{:|\[:|<!--:)[a-z]{2}/.test(a))&&(a=""):t==WPGlobusCoreData.default_language?/(\{:|\[:|<!--:)[a-z]{2}/.test(a)&&(a=""):a=s.TextFilter(a,WPGlobusCoreData.default_language)),a},addLocaleMarks:function(a,t){return WPGlobusCoreData.locale_tag_start.replace("%s",t)+a+WPGlobusCoreData.locale_tag_end},getTranslations:function(e){var o,n={};return l.each(WPGlobusCoreData.enabled_languages,function(a,t){o=t==WPGlobusCoreData.default_language?"RETURN_IN_DEFAULT_LANGUAGE":"RETURN_EMPTY",n[t]=s.TextFilter(e,t,o)}),n},getString:function(a,t,e){if(void 0===a)return a;void 0===t&&(t=""),void 0===e&&(e=WPGlobusCoreData.language),(a=s.getTranslations(a))[e]=t;var o="";return l.each(a,function(a,t){""!=t&&a!=WPGlobusCoreData.default_language&&(o+=s.addLocaleMarks(t,a))}),""!=a[WPGlobusCoreData.default_language]&&(o=""==o?a[WPGlobusCoreData.default_language]:s.addLocaleMarks(a[WPGlobusCoreData.default_language],WPGlobusCoreData.default_language)+o),o}}}(jQuery),jQuery(document).ready(function(i){"use strict";if("undefined"!=typeof WPGlobusAdmin){var t={languageSelectorBoxDelta:0,locationPathname:"/wp-admin/post.php",init:function(){"taxonomy-edit"===WPGlobusAdmin.page?t.taxonomyEdit():t.start()},_info:function(){var a=void 0;0<i("#language").length&&(a=i("#language").val()),console.log("Current language from hidden (#language) : ",a),a=void 0,0<i("#wpglobus-language").length&&(a=i("#wpglobus-language").val()),console.log("Current language from hidden (#wpglobus-language) : ",a),a=void 0,0<i('input[name="wpglobus-language"]').length&&(a=i('input[name="wpglobus-language"]').val()),console.log('Current language from hidden (input[name="wpglobus-language"]) : ',a),a=void 0,0<i('input[name="wpglobus_language"]').length&&(a=i('input[name="wpglobus_language"]').val()),console.log('Current language from hidden (input[name="wpglobus_language"]) : ',a),console.log("Builder : ",WPGlobusAdmin.builder);var t=i("#content").val();""==t?console.log("Editor content (#content) : (empty)"):console.log(t)},checkCookie:function(){if(-1!=window.location.search.indexOf("language="))return!1;if("post.php"==WPGlobusAdmin.page){var a=wpCookies.get(WPGlobusAdmin.builder.languageCookie);if(null!==a&&history.pushState){var t=(a=a.split("+"))[0];if(void 0!==a[1]&&a[1]+0==WPGlobusAdmin.$_get.post){var e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search+"&language="+t;return window.history.pushState({path:e},"",e),t}}}return!1},setCookie:function(){var a=t.checkCookie();a||void 0===(a=WPGlobusAdmin.$_get.language)&&(a=WPGlobusAdmin.data.default_language),wpCookies.set(WPGlobusAdmin.builder.languageCookie,a+"+"+WPGlobusAdmin.$_get.post,31536e3,t.locationPathname)},setLocationSearch:function(){if(history.pushState&&-1==window.location.search.indexOf("language=")&&WPGlobusAdmin.data.default_language!=WPGlobusAdmin.currentTab){var a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search+"&language="+WPGlobusAdmin.currentTab;window.history.pushState({path:a},"",a)}},taxonomyEdit:function(){i(".wpglobus-taxonomy-tabs").insertAfter("#ajax-response"),i(".wrap").tabs(),i(WPGlobusAdmin.data.multilingualSlug.title).insertAfter(".term-slug-wrap th label"),WPGlobusAdmin.currentTab!==WPGlobusAdmin.data.default_language&&(i(".wpglobus-tax-edit-tab").removeClass("ui-tabs-active ui-state-active"),i("#wpglobus-link-tab-"+WPGlobusAdmin.currentTab).addClass("ui-tabs-active ui-state-active")),i(document).on("click",".wpglobus-tax-edit-tab a",function(a){a.preventDefault();var t=i(this).data("href");location.href=t}),t.setMultilingualFields(),i(document).on("tinymce-editor-init",function(a,t){i("#"+t.getContainer().id).find("iframe").addClass(WPGlobusAdmin.builder.translatableClass).css({width:""})})},start:function(){t.setLocationSearch();var e="#postdivrich",o=!0,a="#post-body-content";!1===WPGlobusAdmin.data.support.editor&&(o=!(e="#titlediv")),!1===WPGlobusAdmin.data.support.title&&(o=!1),i(a).prepend(i(".wpglobus-post-body-tabs-list")),i.each(WPGlobusAdmin.tabs,function(a,t){"default"===t?(i(e).wrap('<div id="tab-default"></div>'),o&&i(i("#titlediv")).insertBefore(e)):(i(e+"-"+t).wrap('<div id="tab-'+t+'"></div>'),o&&i(i("#titlediv-"+t)).insertBefore(e+"-"+t))}),i(a).addClass("wpglobus-post-body-tabs"),t.setMultilingualFields()},ajaxPrefilter:function(){i.ajaxPrefilter(function(a,t,e){})},setMultilingualFields:function(){i.each(WPGlobusAdmin.builder.multilingualFields,function(a,t){var e,o="name",n=document.getElementsByName(t);if(0==n.length&&(o="id",n=document.getElementById(t)),null!==n){if("id"==o)e=i("#"+t);else{var l=n[0].nodeName;l=l.toLowerCase(),e=i(l+'[name="'+t+'"]')}e.addClass(WPGlobusAdmin.builder.translatableClass)}})}};WPGlobusAdmin=i.extend({},WPGlobusAdmin,t),WPGlobusAdmin.init()}});
|
|
trunk/includes/builders/assets/wpglobus-admin-builder-51.js
DELETED
@@ -1,348 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* WPGlobus Administration Core.
|
3 |
-
* Interface JS functions
|
4 |
-
*
|
5 |
-
* @since 1.9.17
|
6 |
-
*
|
7 |
-
* @package WPGlobus
|
8 |
-
* @subpackage Administration
|
9 |
-
*/
|
10 |
-
/*jslint browser: true*/
|
11 |
-
/*global jQuery, console, WPGlobusCore*/
|
12 |
-
|
13 |
-
var WPGlobusCore;
|
14 |
-
|
15 |
-
(function($) {
|
16 |
-
var api;
|
17 |
-
api = WPGlobusCore = {
|
18 |
-
strpos: function( haystack, needle, offset){
|
19 |
-
haystack = "" + haystack;
|
20 |
-
var i = haystack.indexOf( needle, offset );
|
21 |
-
return i >= 0 ? i : false;
|
22 |
-
},
|
23 |
-
|
24 |
-
TextFilter: function(text, language, return_in){
|
25 |
-
if ( typeof text == 'undefined' || '' === text ) { return text; }
|
26 |
-
|
27 |
-
var pos_start, pos_end, possible_delimiters = [], is_local_text_found = false;;
|
28 |
-
|
29 |
-
language = '' == language ? 'en' : language;
|
30 |
-
return_in = typeof return_in == 'undefined' || '' == return_in ? 'RETURN_IN_DEFAULT_LANGUAGE' : return_in;
|
31 |
-
|
32 |
-
possible_delimiters[0] = [];
|
33 |
-
possible_delimiters[0]['start'] = WPGlobusCoreData.locale_tag_start.replace('%s', language);
|
34 |
-
possible_delimiters[0]['end'] = WPGlobusCoreData.locale_tag_end;
|
35 |
-
|
36 |
-
possible_delimiters[1] = [];
|
37 |
-
possible_delimiters[1]['start'] = '<!--:'+language+'-->';
|
38 |
-
possible_delimiters[1]['end'] = '<!--:-->';
|
39 |
-
|
40 |
-
possible_delimiters[2] = [];
|
41 |
-
possible_delimiters[2]['start'] = '[:'+language+']';
|
42 |
-
possible_delimiters[2]['end'] = '[:';
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
for (var i = 0; i < 3; i++) {
|
47 |
-
|
48 |
-
pos_start = api.strpos( text, possible_delimiters[i]['start'] );
|
49 |
-
if ( pos_start === false ) {
|
50 |
-
continue;
|
51 |
-
}
|
52 |
-
|
53 |
-
pos_start = pos_start + possible_delimiters[i]['start'].length;
|
54 |
-
|
55 |
-
pos_end = api.strpos( text, possible_delimiters[i]['end'], pos_start );
|
56 |
-
|
57 |
-
if ( pos_end === false ) {
|
58 |
-
text = text.substr( pos_start );
|
59 |
-
} else {
|
60 |
-
text = text.substr( pos_start, pos_end - pos_start );
|
61 |
-
}
|
62 |
-
|
63 |
-
is_local_text_found = true;
|
64 |
-
break;
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
if ( ! is_local_text_found ) {
|
69 |
-
if ( return_in == 'RETURN_EMPTY' ) {
|
70 |
-
if ( language == WPGlobusCoreData.default_language && ! /(\{:|\[:|<!--:)[a-z]{2}/.test(text) ) {
|
71 |
-
/** do nothing */
|
72 |
-
} else {
|
73 |
-
text = '';
|
74 |
-
}
|
75 |
-
} else {
|
76 |
-
/**
|
77 |
-
* Try RETURN_IN_DEFAULT_LANGUAGE.
|
78 |
-
*/
|
79 |
-
if ( language == WPGlobusCoreData.default_language ) {
|
80 |
-
if ( /(\{:|\[:|<!--:)[a-z]{2}/.test(text) ) {
|
81 |
-
text = '';
|
82 |
-
}
|
83 |
-
} else {
|
84 |
-
text = api.TextFilter( text, WPGlobusCoreData.default_language );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
}
|
88 |
-
return text;
|
89 |
-
},
|
90 |
-
addLocaleMarks: function(text, language) {
|
91 |
-
return WPGlobusCoreData.locale_tag_start.replace('%s', language) + text + WPGlobusCoreData.locale_tag_end;
|
92 |
-
},
|
93 |
-
getTranslations: function(text) {
|
94 |
-
var t = {},
|
95 |
-
return_in;
|
96 |
-
$.each(WPGlobusCoreData.enabled_languages, function(i,l){
|
97 |
-
return_in = l == WPGlobusCoreData.default_language ? 'RETURN_IN_DEFAULT_LANGUAGE' : 'RETURN_EMPTY';
|
98 |
-
t[l] = api.TextFilter(text, l, return_in);
|
99 |
-
});
|
100 |
-
return t;
|
101 |
-
},
|
102 |
-
getString: function(s, newVal, l) {
|
103 |
-
if ( 'undefined' === typeof(s) ) {
|
104 |
-
return s;
|
105 |
-
}
|
106 |
-
if ( 'undefined' === typeof(newVal) ) {
|
107 |
-
newVal = '';
|
108 |
-
}
|
109 |
-
if ( 'undefined' === typeof(l) ) {
|
110 |
-
l = WPGlobusCoreData.language;
|
111 |
-
}
|
112 |
-
|
113 |
-
s = api.getTranslations(s);
|
114 |
-
s[l] = newVal;
|
115 |
-
|
116 |
-
var cS = '';
|
117 |
-
|
118 |
-
$.each(s, function(ln,val){
|
119 |
-
if ( '' != val && ln != WPGlobusCoreData.default_language) {
|
120 |
-
cS += api.addLocaleMarks(val, ln);
|
121 |
-
}
|
122 |
-
});
|
123 |
-
|
124 |
-
if ( '' != s[WPGlobusCoreData.default_language] ) {
|
125 |
-
if ( '' == cS ) {
|
126 |
-
cS = s[WPGlobusCoreData.default_language];
|
127 |
-
} else {
|
128 |
-
cS = api.addLocaleMarks(s[WPGlobusCoreData.default_language], WPGlobusCoreData.default_language) + cS;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
return cS;
|
132 |
-
}
|
133 |
-
};
|
134 |
-
})(jQuery);
|
135 |
-
|
136 |
-
jQuery(document).ready(function ($) {
|
137 |
-
"use strict";
|
138 |
-
|
139 |
-
if ( 'undefined' === typeof WPGlobusAdmin ) {
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
|
143 |
-
var api = {
|
144 |
-
languageSelectorBoxDelta: 0,
|
145 |
-
locationPathname: '/wp-admin/post.php',
|
146 |
-
init: function() {
|
147 |
-
//api.setCookie();
|
148 |
-
if ('taxonomy-edit' === WPGlobusAdmin.page) {
|
149 |
-
api.taxonomyEdit();
|
150 |
-
} else {
|
151 |
-
api.start();
|
152 |
-
}
|
153 |
-
},
|
154 |
-
_info: function() {
|
155 |
-
var lang = undefined;
|
156 |
-
if( $('#language').length > 0 ) {
|
157 |
-
lang = $('#language').val();
|
158 |
-
}
|
159 |
-
console.log('Current language from hidden (#language) : ', lang);
|
160 |
-
|
161 |
-
lang = undefined;
|
162 |
-
if( $('#wpglobus-language').length > 0 ) {
|
163 |
-
lang = $('#wpglobus-language').val();
|
164 |
-
}
|
165 |
-
console.log('Current language from hidden (#wpglobus-language) : ', lang);
|
166 |
-
|
167 |
-
lang = undefined;
|
168 |
-
if( $('input[name="wpglobus-language"]').length > 0 ) {
|
169 |
-
lang = $('input[name="wpglobus-language"]').val();
|
170 |
-
}
|
171 |
-
console.log('Current language from hidden (input[name="wpglobus-language"]) : ', lang);
|
172 |
-
|
173 |
-
lang = undefined;
|
174 |
-
if( $('input[name="wpglobus_language"]').length > 0 ) {
|
175 |
-
lang = $('input[name="wpglobus_language"]').val();
|
176 |
-
}
|
177 |
-
console.log('Current language from hidden (input[name="wpglobus_language"]) : ', lang);
|
178 |
-
console.log('Builder : ', WPGlobusAdmin.builder);
|
179 |
-
|
180 |
-
var content = $('#content').val();
|
181 |
-
if ( content == '' ) {
|
182 |
-
console.log('Editor content (#content) : (empty)');
|
183 |
-
} else {
|
184 |
-
console.log(content);
|
185 |
-
}
|
186 |
-
},
|
187 |
-
checkCookie: function() {
|
188 |
-
if ( -1 != window.location.search.indexOf('language=') ) {
|
189 |
-
return false;
|
190 |
-
}
|
191 |
-
if ( 'post.php' == WPGlobusAdmin.page ) {
|
192 |
-
var cookie = wpCookies.get(WPGlobusAdmin.builder.languageCookie);
|
193 |
-
|
194 |
-
if ( null !== cookie && history.pushState) {
|
195 |
-
cookie = cookie.split('+');
|
196 |
-
var language = cookie[0];
|
197 |
-
if ('undefined' !== typeof cookie[1] && cookie[1] + 0 == WPGlobusAdmin.$_get.post ) {
|
198 |
-
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search + '&language='+language;
|
199 |
-
window.history.pushState({path:newurl},'',newurl);
|
200 |
-
return language;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
204 |
-
return false;
|
205 |
-
},
|
206 |
-
setCookie: function() {
|
207 |
-
var lang = api.checkCookie();
|
208 |
-
if ( ! lang ) {
|
209 |
-
lang = WPGlobusAdmin.$_get.language;
|
210 |
-
if ( 'undefined' === typeof lang ) {
|
211 |
-
lang = WPGlobusAdmin.data.default_language;
|
212 |
-
}
|
213 |
-
}
|
214 |
-
wpCookies.set(WPGlobusAdmin.builder.languageCookie, lang+'+'+WPGlobusAdmin.$_get.post, 31536000, api.locationPathname );
|
215 |
-
},
|
216 |
-
setLocationSearch: function() {
|
217 |
-
if ( ! history.pushState || -1 != window.location.search.indexOf('language=') ) {
|
218 |
-
return;
|
219 |
-
}
|
220 |
-
if ( WPGlobusAdmin.data.default_language != WPGlobusAdmin.currentTab ) {
|
221 |
-
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search + '&language='+WPGlobusAdmin.currentTab;
|
222 |
-
window.history.pushState({path:newurl},'',newurl);
|
223 |
-
}
|
224 |
-
},
|
225 |
-
taxonomyEdit: function() {
|
226 |
-
|
227 |
-
$('.wpglobus-taxonomy-tabs').insertAfter('#ajax-response');
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Make class wrap as tabs container.
|
231 |
-
* Tabs on.
|
232 |
-
*/
|
233 |
-
$('.wrap').tabs();
|
234 |
-
|
235 |
-
$(WPGlobusAdmin.data.multilingualSlug.title).insertAfter('.term-slug-wrap th label');
|
236 |
-
|
237 |
-
if ( WPGlobusAdmin.currentTab !== WPGlobusAdmin.data.default_language ) {
|
238 |
-
$('.wpglobus-tax-edit-tab').removeClass('ui-tabs-active ui-state-active');
|
239 |
-
$('#wpglobus-link-tab-'+WPGlobusAdmin.currentTab).addClass('ui-tabs-active ui-state-active');
|
240 |
-
}
|
241 |
-
|
242 |
-
$(document).on('click', '.wpglobus-tax-edit-tab a', function(event) {
|
243 |
-
event.preventDefault();
|
244 |
-
var _href = $(this).data('href');
|
245 |
-
location.href = _href;
|
246 |
-
});
|
247 |
-
|
248 |
-
api.setMultilingualFields();
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Init Yoast tinymce editor for description.
|
252 |
-
*/
|
253 |
-
$(document).on( 'tinymce-editor-init', function( event, editor ) {
|
254 |
-
$( '#' + editor.getContainer().id ).find('iframe').addClass(WPGlobusAdmin.builder.translatableClass).css({'width':''});
|
255 |
-
});
|
256 |
-
},
|
257 |
-
start: function() {
|
258 |
-
/**
|
259 |
-
*
|
260 |
-
*/
|
261 |
-
api.setLocationSearch();
|
262 |
-
|
263 |
-
/**
|
264 |
-
*
|
265 |
-
*/
|
266 |
-
var wrap_at = '#postdivrich',
|
267 |
-
set_title = true,
|
268 |
-
content_tabs_id = '#post-body-content';
|
269 |
-
if ( WPGlobusAdmin.data.support['editor'] === false ) {
|
270 |
-
wrap_at = '#titlediv';
|
271 |
-
set_title = false;
|
272 |
-
}
|
273 |
-
if ( WPGlobusAdmin.data.support['title'] === false ) {
|
274 |
-
set_title = false;
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Make post-body-content as tabs container.
|
279 |
-
*/
|
280 |
-
$(content_tabs_id).prepend($('.wpglobus-post-body-tabs-list'));
|
281 |
-
$.each(WPGlobusAdmin.tabs, function (index, suffix) {
|
282 |
-
if ('default' === suffix) {
|
283 |
-
$(wrap_at).wrap('<div id="tab-default"></div>');
|
284 |
-
if ( set_title ) {
|
285 |
-
$($('#titlediv')).insertBefore(wrap_at);
|
286 |
-
}
|
287 |
-
} else {
|
288 |
-
$(wrap_at+'-' + suffix).wrap('<div id="tab-' + suffix + '"></div>');
|
289 |
-
if ( set_title ) {
|
290 |
-
$($('#titlediv-' + suffix)).insertBefore(wrap_at+'-' + suffix);
|
291 |
-
}
|
292 |
-
}
|
293 |
-
});
|
294 |
-
|
295 |
-
$(content_tabs_id).addClass('wpglobus-post-body-tabs');
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Set fields as multilingual.
|
299 |
-
*/
|
300 |
-
//setTimeout(api.setMultilingualFields(), 1000);
|
301 |
-
api.setMultilingualFields();
|
302 |
-
|
303 |
-
/**
|
304 |
-
*
|
305 |
-
*/
|
306 |
-
//api.ajaxPrefilter();
|
307 |
-
|
308 |
-
},
|
309 |
-
ajaxPrefilter: function() {
|
310 |
-
/**
|
311 |
-
* @todo WIP.
|
312 |
-
*/
|
313 |
-
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
|
314 |
-
// Modify options, control originalOptions, store jqXHR, etc
|
315 |
-
//console.log(options);
|
316 |
-
});
|
317 |
-
},
|
318 |
-
setMultilingualFields: function() {
|
319 |
-
$.each(WPGlobusAdmin.builder.multilingualFields, function(indx, field) {
|
320 |
-
var elementBy = 'name';
|
321 |
-
var node = document.getElementsByName(field);
|
322 |
-
var $element;
|
323 |
-
|
324 |
-
if ( 0 == node.length ) {
|
325 |
-
elementBy = 'id';
|
326 |
-
node = document.getElementById(field);
|
327 |
-
}
|
328 |
-
|
329 |
-
if ( null === node ) {
|
330 |
-
return;
|
331 |
-
} else {
|
332 |
-
if ( 'id' == elementBy ) {
|
333 |
-
$element = $('#'+field);
|
334 |
-
} else {
|
335 |
-
var nodeName = node[0].nodeName;
|
336 |
-
nodeName = nodeName.toLowerCase();
|
337 |
-
$element = $(nodeName+'[name="'+field+'"]');
|
338 |
-
}
|
339 |
-
$element.addClass(WPGlobusAdmin.builder.translatableClass);
|
340 |
-
}
|
341 |
-
|
342 |
-
});
|
343 |
-
}
|
344 |
-
}
|
345 |
-
|
346 |
-
WPGlobusAdmin = $.extend({}, WPGlobusAdmin, api);
|
347 |
-
WPGlobusAdmin.init();
|
348 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/assets/wpglobus-admin-builder-51.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var WPGlobusCore;!function(l){var s;s=WPGlobusCore={strpos:function(a,t,e){var o=(a=""+a).indexOf(t,e);return 0<=o&&o},TextFilter:function(a,t,e){if(void 0===a||""===a)return a;var o,n,l=[],i=!1;t=""==t?"en":t,e=void 0===e||""==e?"RETURN_IN_DEFAULT_LANGUAGE":e,l[0]=[],l[0].start=WPGlobusCoreData.locale_tag_start.replace("%s",t),l[0].end=WPGlobusCoreData.locale_tag_end,l[1]=[],l[1].start="\x3c!--:"+t+"--\x3e",l[1].end="\x3c!--:--\x3e",l[2]=[],l[2].start="[:"+t+"]",l[2].end="[:";for(var u=0;u<3;u++)if(!1!==(o=s.strpos(a,l[u].start))){o+=l[u].start.length,a=!1===(n=s.strpos(a,l[u].end,o))?a.substr(o):a.substr(o,n-o),i=!0;break}return i||("RETURN_EMPTY"==e?(t!=WPGlobusCoreData.default_language||/(\{:|\[:|<!--:)[a-z]{2}/.test(a))&&(a=""):t==WPGlobusCoreData.default_language?/(\{:|\[:|<!--:)[a-z]{2}/.test(a)&&(a=""):a=s.TextFilter(a,WPGlobusCoreData.default_language)),a},addLocaleMarks:function(a,t){return WPGlobusCoreData.locale_tag_start.replace("%s",t)+a+WPGlobusCoreData.locale_tag_end},getTranslations:function(e){var o,n={};return l.each(WPGlobusCoreData.enabled_languages,function(a,t){o=t==WPGlobusCoreData.default_language?"RETURN_IN_DEFAULT_LANGUAGE":"RETURN_EMPTY",n[t]=s.TextFilter(e,t,o)}),n},getString:function(a,t,e){if(void 0===a)return a;void 0===t&&(t=""),void 0===e&&(e=WPGlobusCoreData.language),(a=s.getTranslations(a))[e]=t;var o="";return l.each(a,function(a,t){""!=t&&a!=WPGlobusCoreData.default_language&&(o+=s.addLocaleMarks(t,a))}),""!=a[WPGlobusCoreData.default_language]&&(o=""==o?a[WPGlobusCoreData.default_language]:s.addLocaleMarks(a[WPGlobusCoreData.default_language],WPGlobusCoreData.default_language)+o),o}}}(jQuery),jQuery(document).ready(function(i){"use strict";if("undefined"!=typeof WPGlobusAdmin){var t={languageSelectorBoxDelta:0,locationPathname:"/wp-admin/post.php",init:function(){"taxonomy-edit"===WPGlobusAdmin.page?t.taxonomyEdit():t.start()},_info:function(){var a=void 0;0<i("#language").length&&(a=i("#language").val()),console.log("Current language from hidden (#language) : ",a),a=void 0,0<i("#wpglobus-language").length&&(a=i("#wpglobus-language").val()),console.log("Current language from hidden (#wpglobus-language) : ",a),a=void 0,0<i('input[name="wpglobus-language"]').length&&(a=i('input[name="wpglobus-language"]').val()),console.log('Current language from hidden (input[name="wpglobus-language"]) : ',a),a=void 0,0<i('input[name="wpglobus_language"]').length&&(a=i('input[name="wpglobus_language"]').val()),console.log('Current language from hidden (input[name="wpglobus_language"]) : ',a),console.log("Builder : ",WPGlobusAdmin.builder);var t=i("#content").val();""==t?console.log("Editor content (#content) : (empty)"):console.log(t)},checkCookie:function(){if(-1!=window.location.search.indexOf("language="))return!1;if("post.php"==WPGlobusAdmin.page){var a=wpCookies.get(WPGlobusAdmin.builder.languageCookie);if(null!==a&&history.pushState){var t=(a=a.split("+"))[0];if(void 0!==a[1]&&a[1]+0==WPGlobusAdmin.$_get.post){var e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search+"&language="+t;return window.history.pushState({path:e},"",e),t}}}return!1},setCookie:function(){var a=t.checkCookie();a||void 0===(a=WPGlobusAdmin.$_get.language)&&(a=WPGlobusAdmin.data.default_language),wpCookies.set(WPGlobusAdmin.builder.languageCookie,a+"+"+WPGlobusAdmin.$_get.post,31536e3,t.locationPathname)},setLocationSearch:function(){if(history.pushState&&-1==window.location.search.indexOf("language=")&&WPGlobusAdmin.data.default_language!=WPGlobusAdmin.currentTab){var a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search+"&language="+WPGlobusAdmin.currentTab;window.history.pushState({path:a},"",a)}},taxonomyEdit:function(){i(".wpglobus-taxonomy-tabs").insertAfter("#ajax-response"),i(".wrap").tabs(),i(WPGlobusAdmin.data.multilingualSlug.title).insertAfter(".term-slug-wrap th label"),WPGlobusAdmin.currentTab!==WPGlobusAdmin.data.default_language&&(i(".wpglobus-tax-edit-tab").removeClass("ui-tabs-active ui-state-active"),i("#wpglobus-link-tab-"+WPGlobusAdmin.currentTab).addClass("ui-tabs-active ui-state-active")),i(document).on("click",".wpglobus-tax-edit-tab a",function(a){a.preventDefault();var t=i(this).data("href");location.href=t}),t.setMultilingualFields(),i(document).on("tinymce-editor-init",function(a,t){i("#"+t.getContainer().id).find("iframe").addClass(WPGlobusAdmin.builder.translatableClass).css({width:""})})},start:function(){t.setLocationSearch();var e="#postdivrich",o=!0,a="#post-body-content";!1===WPGlobusAdmin.data.support.editor&&(o=!(e="#titlediv")),!1===WPGlobusAdmin.data.support.title&&(o=!1),i(a).prepend(i(".wpglobus-post-body-tabs-list")),i.each(WPGlobusAdmin.tabs,function(a,t){"default"===t?(i(e).wrap('<div id="tab-default"></div>'),o&&i(i("#titlediv")).insertBefore(e)):(i(e+"-"+t).wrap('<div id="tab-'+t+'"></div>'),o&&i(i("#titlediv-"+t)).insertBefore(e+"-"+t))}),i(a).addClass("wpglobus-post-body-tabs"),t.setMultilingualFields()},ajaxPrefilter:function(){i.ajaxPrefilter(function(a,t,e){})},setMultilingualFields:function(){i.each(WPGlobusAdmin.builder.multilingualFields,function(a,t){var e,o="name",n=document.getElementsByName(t);if(0==n.length&&(o="id",n=document.getElementById(t)),null!==n){if("id"==o)e=i("#"+t);else{var l=n[0].nodeName;l=l.toLowerCase(),e=i(l+'[name="'+t+'"]')}e.addClass(WPGlobusAdmin.builder.translatableClass)}})}};WPGlobusAdmin=i.extend({},WPGlobusAdmin,t),WPGlobusAdmin.init()}});
|
|
trunk/includes/builders/class-wpglobus-builder-update-post.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-builder-update-post.php
|
4 |
-
*
|
5 |
-
* @since 2.2.35
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Builders
|
8 |
-
* @author Alex Gor(alexgff)
|
9 |
-
*/
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_Builder_Update_Post.
|
13 |
-
*/
|
14 |
-
if ( ! class_exists( 'WPGlobus_Builder_Update_Post' ) ) :
|
15 |
-
|
16 |
-
class WPGlobus_Builder_Update_Post {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Builder ID.
|
20 |
-
*/
|
21 |
-
protected $id = null;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Constructor.
|
25 |
-
*/
|
26 |
-
public function __construct( $id ) {
|
27 |
-
|
28 |
-
$this->id = $id;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Do not start for `gutenberg`.
|
32 |
-
* The block editor prohibits saving post with an empty post title from post edit page.
|
33 |
-
*/
|
34 |
-
if ( 'gutenberg' == $this->id ) {
|
35 |
-
return;
|
36 |
-
}
|
37 |
-
|
38 |
-
add_filter( 'wp_insert_post_empty_content', array( $this, 'filter__post_empty_content' ), 10, 2);
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Filters whether the post should be considered "empty".
|
43 |
-
*
|
44 |
-
* @see wp-includes\post.php
|
45 |
-
*
|
46 |
-
* @param bool $maybe_empty Whether the post should be considered "empty".
|
47 |
-
* @param array $postarr Array of post data.
|
48 |
-
*/
|
49 |
-
public function filter__post_empty_content( $maybe_empty, $postarr ) {
|
50 |
-
|
51 |
-
if ( WPGlobus::Config()->builder->is_default_language() ) {
|
52 |
-
return $maybe_empty;
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Don't return a truthy value for extra language.
|
57 |
-
*/
|
58 |
-
return false;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/class-wpglobus-builder.php
DELETED
@@ -1,424 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-builder.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Builder.
|
11 |
-
*
|
12 |
-
* @since 1.9.17
|
13 |
-
*/
|
14 |
-
if ( ! class_exists( 'WPGlobus_Builder' ) ) :
|
15 |
-
|
16 |
-
class WPGlobus_Builder {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Current language of post.
|
20 |
-
*/
|
21 |
-
protected $language = null;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Builder ID.
|
25 |
-
*/
|
26 |
-
protected $id = null;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Array of activated builders.
|
30 |
-
*
|
31 |
-
* @since 1.9.17
|
32 |
-
* @access protected
|
33 |
-
* @var array
|
34 |
-
*/
|
35 |
-
// phpcs:ignore
|
36 |
-
//protected $builders = array(); TODO remove
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @var array
|
40 |
-
* @todo Unused?
|
41 |
-
*/
|
42 |
-
protected $builder_post = null;
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Constructor method.
|
46 |
-
*
|
47 |
-
* @since 1.9.17
|
48 |
-
*
|
49 |
-
* @param string $id The Builder ID, such as 'gutenberg'.
|
50 |
-
*/
|
51 |
-
public function __construct( $id ) {
|
52 |
-
|
53 |
-
$this->id = $id;
|
54 |
-
|
55 |
-
$this->set_current_language();
|
56 |
-
|
57 |
-
// phpcs:ignore
|
58 |
-
// if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
59 |
-
/**
|
60 |
-
* @todo Add the handling of AJAX.
|
61 |
-
*/
|
62 |
-
// }
|
63 |
-
|
64 |
-
if ( is_admin() ) {
|
65 |
-
|
66 |
-
add_action( 'redirect_post_location', array( $this, 'on__redirect' ), 5, 2 );
|
67 |
-
|
68 |
-
add_filter( 'admin_body_class', array( $this, 'filter__add_admin_body_class' ) );
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Add builder/add-on label to admin bar.
|
72 |
-
*
|
73 |
-
* @since 1.9.27
|
74 |
-
*/
|
75 |
-
add_action( 'admin_bar_menu', array( $this, 'on__admin_bar_menu' ), 11 );
|
76 |
-
|
77 |
-
/**
|
78 |
-
* @see "{$field_no_prefix}_edit_pre" in wp-includes\post.php
|
79 |
-
*/
|
80 |
-
add_filter( 'content_edit_pre', array( $this, 'filter__content' ), 5, 2 );
|
81 |
-
add_filter( 'title_edit_pre', array( $this, 'filter__title' ), 5, 2 );
|
82 |
-
add_filter( 'excerpt_edit_pre', array( $this, 'filter__excerpt' ), 5, 2 );
|
83 |
-
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Show language tabs in post.php page.
|
88 |
-
*
|
89 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
90 |
-
*/
|
91 |
-
add_filter( 'wpglobus_show_language_tabs', array( $this, 'filter__show_language_tabs' ), 5 );
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Filter title.
|
97 |
-
*
|
98 |
-
* @param string $value The title.
|
99 |
-
* @param int $post_id Unused.
|
100 |
-
*
|
101 |
-
* @return string
|
102 |
-
*/
|
103 |
-
public function filter__title(
|
104 |
-
$value, /** @noinspection PhpUnusedParameterInspection */
|
105 |
-
$post_id
|
106 |
-
) {
|
107 |
-
$value = WPGlobus_Core::text_filter( $value, $this->get_current_language(), WPGlobus::RETURN_EMPTY );
|
108 |
-
|
109 |
-
return $value;
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Filter content.
|
114 |
-
*
|
115 |
-
* @param string $content The content.
|
116 |
-
* @param int $post_id Post ID - Unused.
|
117 |
-
*
|
118 |
-
* @return string
|
119 |
-
*/
|
120 |
-
public function filter__content(
|
121 |
-
$content, /** @noinspection PhpUnusedParameterInspection */
|
122 |
-
$post_id
|
123 |
-
) {
|
124 |
-
$content = WPGlobus_Core::text_filter( $content, $this->get_current_language(), WPGlobus::RETURN_EMPTY );
|
125 |
-
|
126 |
-
return $content;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Filter excerpt.
|
131 |
-
*
|
132 |
-
* @param string $excerpt The excerpt.
|
133 |
-
* @param int $post_id Post ID - Unused.
|
134 |
-
*
|
135 |
-
* @return string
|
136 |
-
*/
|
137 |
-
public function filter__excerpt(
|
138 |
-
$excerpt, /** @noinspection PhpUnusedParameterInspection */
|
139 |
-
$post_id
|
140 |
-
) {
|
141 |
-
$excerpt = WPGlobus_Core::text_filter( $excerpt, $this->get_current_language(), WPGlobus::RETURN_EMPTY );
|
142 |
-
|
143 |
-
return $excerpt;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Redirect.
|
148 |
-
*
|
149 |
-
* @param string $location
|
150 |
-
* @param int $post_id Post ID - Unused.
|
151 |
-
*
|
152 |
-
* @return string
|
153 |
-
*/
|
154 |
-
public function on__redirect(
|
155 |
-
$location, /** @noinspection PhpUnusedParameterInspection */
|
156 |
-
$post_id
|
157 |
-
) {
|
158 |
-
/**
|
159 |
-
* Tested with:
|
160 |
-
* - Page Builder by SiteOrigin OK.
|
161 |
-
*/
|
162 |
-
return $location . '&language=' . $this->language;
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Getter.
|
167 |
-
*
|
168 |
-
* @return null|string
|
169 |
-
*/
|
170 |
-
public function get_id() {
|
171 |
-
return $this->id;
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Is this a "builder" post?
|
176 |
-
*
|
177 |
-
* @return bool
|
178 |
-
* @todo Unused?
|
179 |
-
*/
|
180 |
-
public function is_builder_post() {
|
181 |
-
if ( is_null( $this->builder_post ) ) {
|
182 |
-
return false;
|
183 |
-
}
|
184 |
-
|
185 |
-
return true;
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Get hidden "wpglobus-language" field.
|
190 |
-
*
|
191 |
-
* @since 1.9.17
|
192 |
-
* @return string
|
193 |
-
*/
|
194 |
-
public function get_language_field() {
|
195 |
-
/**
|
196 |
-
* @see on_add_devmode_switcher() in wpglobus\includes\class-wpglobus.php
|
197 |
-
* @todo may be add special function to get hidden language field.
|
198 |
-
*/
|
199 |
-
return '<input type="hidden" id="' . esc_attr( WPGlobus::get_language_meta_key() ) . '" name="' . esc_attr( WPGlobus::get_language_meta_key() ) . '" value="' . esc_attr( $this->get_current_language() ) . '" />';
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Return current language.
|
204 |
-
*
|
205 |
-
* @since 1.9.17
|
206 |
-
* @return string
|
207 |
-
*/
|
208 |
-
public function get_current_language() {
|
209 |
-
return $this->language;
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Set current language.
|
214 |
-
*
|
215 |
-
* @since 1.9.17
|
216 |
-
* @return void
|
217 |
-
*/
|
218 |
-
public function set_current_language() {
|
219 |
-
|
220 |
-
if ( ! is_null( $this->language ) ) {
|
221 |
-
return;
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Don't duplicate the defining of current language.
|
226 |
-
* Let's just get it from WPGlobus::Config()->builder.
|
227 |
-
*/
|
228 |
-
$language = WPGlobus::Config()->builder->get_language();
|
229 |
-
|
230 |
-
if ( $language ) {
|
231 |
-
// Language was set in WPGlobus_Config_Builder class.
|
232 |
-
$this->language = $language;
|
233 |
-
}
|
234 |
-
|
235 |
-
$post_id = 0;
|
236 |
-
if ( ! empty( $_REQUEST['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
237 |
-
$post_id = (int) $_REQUEST['post'];
|
238 |
-
} elseif ( ! empty( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
239 |
-
$post_id = (int) $_REQUEST['id'];
|
240 |
-
} elseif ( ! empty( $_REQUEST['post_ID'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
241 |
-
$post_id = (int) $_REQUEST['post_ID'];
|
242 |
-
}
|
243 |
-
|
244 |
-
if ( $post_id && ! is_null( $this->language ) ) {
|
245 |
-
update_post_meta( $post_id, WPGlobus::Config()->builder->get_language_meta_key(), $this->language );
|
246 |
-
}
|
247 |
-
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Show language tabs on post.php page.
|
252 |
-
*
|
253 |
-
* @see_file includes\class-wpglobus.php
|
254 |
-
*
|
255 |
-
* @param bool $value
|
256 |
-
*
|
257 |
-
* @return bool
|
258 |
-
*/
|
259 |
-
public function filter__show_language_tabs(
|
260 |
-
/** @noinspection PhpUnusedParameterInspection */
|
261 |
-
$value
|
262 |
-
) {
|
263 |
-
|
264 |
-
global $pagenow;
|
265 |
-
|
266 |
-
$classes = array();
|
267 |
-
$classes['wpglobus-post-tab'] = 'wpglobus-post-tab';
|
268 |
-
$classes['ui-state-default'] = 'ui-state-default';
|
269 |
-
$classes['ui-corner-top'] = 'ui-corner-top';
|
270 |
-
$classes['ui-tabs-active'] = 'ui-tabs-active';
|
271 |
-
$classes['ui-tabs-loading'] = 'ui-tabs-loading';
|
272 |
-
|
273 |
-
$link_class = array();
|
274 |
-
$link_style = array();
|
275 |
-
$link_title = '';
|
276 |
-
if ( 'post-new.php' === $pagenow ) {
|
277 |
-
$link_style['cursor'] = 'cursor:not-allowed';
|
278 |
-
$link_title = esc_html__( 'Save draft before using extra language.', 'wpglobus' );
|
279 |
-
}
|
280 |
-
|
281 |
-
?>
|
282 |
-
<ul class="wpglobus-post-body-tabs-list">
|
283 |
-
<?php
|
284 |
-
$order = 0;
|
285 |
-
|
286 |
-
$get_array = $_GET; // phpcs:ignore WordPress.CSRF.NonceVerification
|
287 |
-
/**
|
288 |
-
* Unset unneeded elements.
|
289 |
-
*/
|
290 |
-
unset( $get_array['language'] );
|
291 |
-
unset( $get_array['message'] );
|
292 |
-
|
293 |
-
foreach ( WPGlobus::Config()->open_languages as $language ) {
|
294 |
-
|
295 |
-
$tab_suffix = WPGlobus::Config()->default_language === $language ? 'default' : $language;
|
296 |
-
|
297 |
-
$_classes = $classes;
|
298 |
-
|
299 |
-
$_link_class = $link_class;
|
300 |
-
$_link_style = $link_style;
|
301 |
-
|
302 |
-
if ( 'post-new.php' === $pagenow && WPGLobus::Config()->default_language === $language ) {
|
303 |
-
$_link_style['cursor'] = '';
|
304 |
-
}
|
305 |
-
|
306 |
-
$_link_class['tab-link-active'] = WPGlobus::Config()->builder->get_language() === $language ? 'wpglobus-tab-link-active' : '';
|
307 |
-
|
308 |
-
if ( $language === $this->language ) {
|
309 |
-
$_classes[] = 'ui-state-active';
|
310 |
-
}
|
311 |
-
|
312 |
-
$link = add_query_arg( array_merge( $get_array, array( 'language' => $language ) ), admin_url( $pagenow ) );
|
313 |
-
$_link_title = '';
|
314 |
-
if ( 'post-new.php' === $pagenow && WPGLobus::Config()->default_language !== $language ) {
|
315 |
-
$link = '#';
|
316 |
-
$_link_title = $link_title;
|
317 |
-
}
|
318 |
-
?>
|
319 |
-
<li id="link-tab-<?php echo esc_attr( $tab_suffix ); ?>"
|
320 |
-
data-language="<?php echo esc_attr( $language ); ?>"
|
321 |
-
data-order="<?php echo esc_attr( $order ); ?>"
|
322 |
-
class="<?php echo esc_attr( implode( ' ', $_classes ) ); ?>">
|
323 |
-
<!--<a href="#tab-<?php echo esc_attr( $tab_suffix ); ?>"><?php echo esc_html( WPGlobus::Config()->en_language_name[ $language ] ); ?></a>-->
|
324 |
-
<a style="<?php echo esc_attr( implode( ';', $_link_style ) ); ?>"
|
325 |
-
title="<?php echo esc_attr( $_link_title ); ?>"
|
326 |
-
class="<?php echo esc_attr( implode( ' ', $_link_class ) ); ?>"
|
327 |
-
href="<?php echo esc_url( $link ); ?>"><?php echo esc_html( WPGlobus::Config()->en_language_name[ $language ] ); ?></a>
|
328 |
-
</li>
|
329 |
-
<?php
|
330 |
-
$order++;
|
331 |
-
}
|
332 |
-
?>
|
333 |
-
</ul>
|
334 |
-
<?php
|
335 |
-
/**
|
336 |
-
* Return false to prevent output standard WPGlobus tabs.
|
337 |
-
*/
|
338 |
-
return false;
|
339 |
-
}
|
340 |
-
|
341 |
-
/**
|
342 |
-
* Add class to body in admin.
|
343 |
-
*
|
344 |
-
* @see admin_body_class filter
|
345 |
-
*
|
346 |
-
* @since 1.9.17
|
347 |
-
*
|
348 |
-
* @param string $classes
|
349 |
-
*
|
350 |
-
* @return string
|
351 |
-
*/
|
352 |
-
public function filter__add_admin_body_class( $classes ) {
|
353 |
-
return $classes . ' wpglobus-wp-admin-builder wpglobus-wp-admin-builder-' . $this->id;
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Add builder label to admin bar.
|
358 |
-
*
|
359 |
-
* @since 1.9.27
|
360 |
-
*
|
361 |
-
* @param WP_Admin_Bar $wp_admin_bar
|
362 |
-
*/
|
363 |
-
public function on__admin_bar_menu( WP_Admin_Bar $wp_admin_bar ) {
|
364 |
-
|
365 |
-
global $pagenow;
|
366 |
-
|
367 |
-
if ( ! in_array( $pagenow, array( 'post.php', 'post-new.php', 'term.php' ), true ) ) {
|
368 |
-
return;
|
369 |
-
}
|
370 |
-
|
371 |
-
$_builder_label = esc_html__( 'Builder', 'wpglobus' ) . ': ';
|
372 |
-
if ( class_exists( 'WPGlobus_Builders' ) ) {
|
373 |
-
$_builder = WPGlobus_Builders::get_addon( $this->id );
|
374 |
-
|
375 |
-
if ( ! empty( $_builder['admin_bar_label'] ) ) {
|
376 |
-
$_builder_label = $_builder['admin_bar_label'] . ': ';
|
377 |
-
}
|
378 |
-
if ( empty( $_builder['admin_bar_builder_label'] ) ) {
|
379 |
-
$_builder_label .= $_builder['plugin_name'];
|
380 |
-
} else {
|
381 |
-
$_builder_label .= $_builder['admin_bar_builder_label'];
|
382 |
-
}
|
383 |
-
} else {
|
384 |
-
$_builder_label .= $this->id;
|
385 |
-
}
|
386 |
-
|
387 |
-
$wp_admin_bar->add_menu(
|
388 |
-
array(
|
389 |
-
'id' => 'wpglobus-builder-id',
|
390 |
-
'parent' => 'top-secondary',
|
391 |
-
'title' => '<span class="ab-label">' . $_builder_label . '</span>',
|
392 |
-
)
|
393 |
-
);
|
394 |
-
|
395 |
-
$_title = esc_html__( 'Сompatibility Settings', 'wpglobus' );
|
396 |
-
|
397 |
-
$_url = admin_url(
|
398 |
-
add_query_arg(
|
399 |
-
array(
|
400 |
-
'page' => 'wpglobus_options',
|
401 |
-
'tab' => 'compatibility',
|
402 |
-
),
|
403 |
-
'admin.php'
|
404 |
-
)
|
405 |
-
);
|
406 |
-
|
407 |
-
$wp_admin_bar->add_menu(
|
408 |
-
array(
|
409 |
-
'parent' => 'wpglobus-builder-id',
|
410 |
-
'id' => 'wpglobus-builder-compatibility-link',
|
411 |
-
'title' => '<span>' . $_title . '</span>',
|
412 |
-
'href' => $_url,
|
413 |
-
'meta' => array(
|
414 |
-
'_target' => 'blank',
|
415 |
-
'tabindex' => -1,
|
416 |
-
),
|
417 |
-
)
|
418 |
-
);
|
419 |
-
|
420 |
-
}
|
421 |
-
|
422 |
-
}
|
423 |
-
|
424 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/class-wpglobus-builders.php
DELETED
@@ -1,1487 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-builders.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Builders.
|
11 |
-
*/
|
12 |
-
if ( ! class_exists( 'WPGlobus_Builders' ) ) :
|
13 |
-
|
14 |
-
class WPGlobus_Builders {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @var array
|
18 |
-
*/
|
19 |
-
protected static $attrs = array();
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var array
|
23 |
-
*/
|
24 |
-
protected static $admin_attrs = array();
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @var array
|
28 |
-
*/
|
29 |
-
protected static $add_on = array();
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @var string
|
33 |
-
* @since 2.2.11
|
34 |
-
*/
|
35 |
-
protected static $post_type = null;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @var array
|
39 |
-
* @since 2.2.24
|
40 |
-
*/
|
41 |
-
protected static $init_attrs = null;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
public static function get_addons() {
|
47 |
-
|
48 |
-
if ( ! empty( self::$add_on ) ) {
|
49 |
-
return self::$add_on;
|
50 |
-
}
|
51 |
-
|
52 |
-
global $wp_version;
|
53 |
-
|
54 |
-
self::$add_on['gutenberg'] = array(
|
55 |
-
'id' => 'gutenberg',
|
56 |
-
'role' => 'builder',
|
57 |
-
'admin_bar_label' => version_compare( $wp_version, '4.9.99', '>' ) ? 'Core' : 'Builder',
|
58 |
-
'supported_min_version' => '4.0.0',
|
59 |
-
'const' => 'GUTENBERG_VERSION',
|
60 |
-
'plugin_name' => 'Gutenberg',
|
61 |
-
'admin_bar_builder_label' => '',
|
62 |
-
'plugin_uri' => 'https://github.com/WordPress/gutenberg',
|
63 |
-
'path' => 'gutenberg/gutenberg.php',
|
64 |
-
'stage' => 'production',
|
65 |
-
);
|
66 |
-
|
67 |
-
self::$add_on['js_composer'] = array(
|
68 |
-
'id' => 'js_composer',
|
69 |
-
'role' => 'builder',
|
70 |
-
'supported_min_version' => '5.4.0',
|
71 |
-
'const' => 'WPB_VC_VERSION',
|
72 |
-
'plugin_name' => 'WPBakery Page Builder',
|
73 |
-
'admin_bar_builder_label' => 'WPBakery PB',
|
74 |
-
'plugin_uri' => 'https://wpbakery.com/',
|
75 |
-
'path' => 'js_composer/js_composer.php',
|
76 |
-
'stage' => 'production',
|
77 |
-
);
|
78 |
-
|
79 |
-
self::$add_on['elementor'] = array(
|
80 |
-
'id' => 'elementor',
|
81 |
-
'role' => 'builder',
|
82 |
-
'supported_min_version' => '2.5.14',
|
83 |
-
'const' => 'ELEMENTOR_VERSION',
|
84 |
-
'plugin_name' => 'Elementor',
|
85 |
-
'plugin_uri' => 'https://wordpress.org/plugins/elementor/',
|
86 |
-
'path' => 'elementor/elementor.php',
|
87 |
-
'stage' => 'beta',
|
88 |
-
'beta_version' => '3',
|
89 |
-
);
|
90 |
-
|
91 |
-
if ( file_exists( WP_PLUGIN_DIR . '/wordpress-seo-premium/wp-seo-premium.php' ) ) {
|
92 |
-
|
93 |
-
self::$add_on['yoast_seo'] = array(
|
94 |
-
'id' => 'yoast_seo',
|
95 |
-
'role' => 'builder',
|
96 |
-
'admin_bar_label' => 'Add-on',
|
97 |
-
'supported_min_version' => '7.7',
|
98 |
-
'const' => 'WPSEO_VERSION',
|
99 |
-
'plugin_name' => 'Yoast SEO Premium',
|
100 |
-
'plugin_uri' => 'https://yoast.com/wordpress/plugins/seo/',
|
101 |
-
'path' => 'wordpress-seo-premium/wp-seo-premium.php',
|
102 |
-
'stage' => 'production',
|
103 |
-
);
|
104 |
-
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* @since 2.3.11
|
109 |
-
*/
|
110 |
-
$_file = 'wordpress-seo/wp-seo.php';
|
111 |
-
$_plugin_name = 'Yoast SEO';
|
112 |
-
if ( defined( 'WPGLOBUS_YOAST_PLUGIN_FILE' ) ) {
|
113 |
-
$_file = WPGLOBUS_YOAST_PLUGIN_FILE;
|
114 |
-
$_plugin_name = 'Yoast SEO('.$_file.')';
|
115 |
-
}
|
116 |
-
|
117 |
-
if ( file_exists( WP_PLUGIN_DIR . '/' . $_file ) ) {
|
118 |
-
|
119 |
-
if ( ! defined( 'WPSEO_PREMIUM_PLUGIN_FILE' ) ) {
|
120 |
-
|
121 |
-
self::$add_on['yoast_seo'] = array(
|
122 |
-
'id' => 'yoast_seo',
|
123 |
-
'role' => 'builder',
|
124 |
-
'admin_bar_label' => 'Add-on',
|
125 |
-
'supported_min_version' => '7.7',
|
126 |
-
'const' => 'WPSEO_VERSION',
|
127 |
-
'plugin_name' => $_plugin_name,
|
128 |
-
'plugin_uri' => 'https://wordpress.org/plugins/wordpress-seo/',
|
129 |
-
'path' => $_file,
|
130 |
-
'stage' => 'production',
|
131 |
-
);
|
132 |
-
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
self::$add_on['woocommerce'] = array(
|
137 |
-
'id' => 'woocommerce',
|
138 |
-
'role' => 'add-on',
|
139 |
-
'config_file' => 'woocommerce.json',
|
140 |
-
'supported_min_version' => '3.5.1',
|
141 |
-
'const' => 'WC_PLUGIN_FILE',
|
142 |
-
'plugin_name' => 'WooCommerce',
|
143 |
-
'plugin_uri' => 'https://woocommerce.com',
|
144 |
-
'path' => 'woocommerce/woocommerce.php',
|
145 |
-
'stage' => 'production',
|
146 |
-
);
|
147 |
-
|
148 |
-
/**
|
149 |
-
* @since 2.3.0
|
150 |
-
*/
|
151 |
-
self::$add_on['pods'] = array(
|
152 |
-
'id' => 'pods',
|
153 |
-
'role' => 'builder',
|
154 |
-
'admin_bar_label' => 'Add-on',
|
155 |
-
'config_file' => 'pods.json',
|
156 |
-
'supported_min_version' => '2.7.16',
|
157 |
-
'const' => 'PODS_VERSION',
|
158 |
-
'plugin_name' => 'Pods-Custom Content Types and Fields',
|
159 |
-
'plugin_uri' => 'https://wordpress.org/plugins/pods/',
|
160 |
-
'path' => 'pods/init.php',
|
161 |
-
'stage' => 'production',
|
162 |
-
'admin_bar_builder_label' => 'Pods',
|
163 |
-
);
|
164 |
-
|
165 |
-
/**
|
166 |
-
* self::$add_on['wp-subtitle'] = array(
|
167 |
-
* 'id' => 'wp-subtitle',
|
168 |
-
* 'role' => 'add-on',
|
169 |
-
* 'config_file' => 'wp-subtitle.json',
|
170 |
-
* 'supported_min_version' => '3.1',
|
171 |
-
* 'const' => 'WPSUBTITLE_DIR',
|
172 |
-
* 'plugin_name' => 'WP Subtitle',
|
173 |
-
* 'plugin_uri' => 'http://wordpress.org/plugins/wp-subtitle/',
|
174 |
-
* 'path' => 'wp-subtitle/wp-subtitle.php',
|
175 |
-
* 'stage' => 'production',
|
176 |
-
* );
|
177 |
-
* // */
|
178 |
-
|
179 |
-
/**
|
180 |
-
* self::$add_on['__test'] = array(
|
181 |
-
* 'id' => '__test',
|
182 |
-
* 'supported_min_version' => '1.0',
|
183 |
-
* 'const' => '__TEST_VERSION',
|
184 |
-
* 'plugin_name' => 'Test Add-on',
|
185 |
-
* 'plugin_uri' => '',
|
186 |
-
* 'path' => 'test-add-on/test-add-on.php',
|
187 |
-
* );
|
188 |
-
* // */
|
189 |
-
|
190 |
-
return self::$add_on;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* @param bool $builder
|
195 |
-
*
|
196 |
-
* @return false|array
|
197 |
-
*/
|
198 |
-
public static function get_addon( $builder = false ) {
|
199 |
-
if ( ! $builder ) {
|
200 |
-
return false;
|
201 |
-
}
|
202 |
-
if ( isset( self::$add_on[ $builder ] ) ) {
|
203 |
-
return self::$add_on[ $builder ];
|
204 |
-
}
|
205 |
-
|
206 |
-
return false;
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* @param bool $init
|
211 |
-
* @param array $init_attrs added @since 2.2.24
|
212 |
-
*
|
213 |
-
* @return array|bool
|
214 |
-
*/
|
215 |
-
public static function get( $init = true, $init_attrs = array() ) {
|
216 |
-
|
217 |
-
// if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
218 |
-
//return false;
|
219 |
-
// }
|
220 |
-
|
221 |
-
/**
|
222 |
-
* @since 2.2.26
|
223 |
-
*/
|
224 |
-
if ( empty($init_attrs) ) {
|
225 |
-
return false;
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* @since 2.2.24
|
230 |
-
*/
|
231 |
-
self::$init_attrs = $init_attrs;
|
232 |
-
|
233 |
-
/**
|
234 |
-
* @since 2.2.24
|
235 |
-
*/
|
236 |
-
$post_types = $init_attrs['post_types'];
|
237 |
-
|
238 |
-
/** @global string $pagenow */
|
239 |
-
global $pagenow;
|
240 |
-
|
241 |
-
self::$attrs = array(
|
242 |
-
'id' => false,
|
243 |
-
'context' => 'add-on',
|
244 |
-
'version' => '',
|
245 |
-
'class' => '',
|
246 |
-
'post_type' => '',
|
247 |
-
'post_id' => '',
|
248 |
-
'is_admin' => true,
|
249 |
-
'pagenow' => $pagenow,
|
250 |
-
'builder_page' => false,
|
251 |
-
'doing_ajax' => WPGlobus_WP::is_doing_ajax(),
|
252 |
-
'language' => '',
|
253 |
-
'message' => '',
|
254 |
-
'ajax_actions' => '',
|
255 |
-
);
|
256 |
-
|
257 |
-
self::$admin_attrs = array(
|
258 |
-
'multilingualFields' => array( 'post_title', 'excerpt' ),
|
259 |
-
'translatableClass' => 'wpglobus-translatable',
|
260 |
-
);
|
261 |
-
|
262 |
-
/**
|
263 |
-
* @since 2.2.11
|
264 |
-
*/
|
265 |
-
if ( in_array( $pagenow, array('post.php', 'post-new.php', 'media-new.php') ) ) {
|
266 |
-
|
267 |
-
/**
|
268 |
-
* @W.I.P @since 2.2.14
|
269 |
-
* if ( in_array( $pagenow, array('post.php', 'post-new.php', 'media-new.php', 'admin-ajax.php') ) ) {
|
270 |
-
*/
|
271 |
-
$post_type = self::get_post_type_2();
|
272 |
-
|
273 |
-
/**
|
274 |
-
* Filter for post types.
|
275 |
-
*
|
276 |
-
* @since 2.2.11
|
277 |
-
*
|
278 |
-
* @param array $post_types Array of post types.
|
279 |
-
* @param string $post_type Current post type.
|
280 |
-
*
|
281 |
-
* @return array
|
282 |
-
*/
|
283 |
-
$post_types = apply_filters( 'wpglobus_builders_post_types', $post_types, $post_type );
|
284 |
-
|
285 |
-
if ( ! array_key_exists( $post_type, $post_types ) ) {
|
286 |
-
return self::$attrs;
|
287 |
-
} else if ( ! $post_types[$post_type] ) {
|
288 |
-
return self::$attrs;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
|
292 |
-
if ( $init ) {
|
293 |
-
|
294 |
-
//$builder = false;
|
295 |
-
|
296 |
-
self::get_addons();
|
297 |
-
|
298 |
-
/**
|
299 |
-
* @since 1.9.17
|
300 |
-
*/
|
301 |
-
$builder = self::is_gutenberg();
|
302 |
-
if ( $builder && $builder['builder_page'] ) {
|
303 |
-
return $builder;
|
304 |
-
}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* JS Composer.
|
308 |
-
*
|
309 |
-
* @since 1.9.17
|
310 |
-
* @since 2.2.3 Start js_composer as a builder.
|
311 |
-
*/
|
312 |
-
if ( ! $builder || ! $builder['builder_page'] ) {
|
313 |
-
$builder = self::is_js_composer();
|
314 |
-
if ( $builder && $builder['builder_page'] ) {
|
315 |
-
return $builder;
|
316 |
-
}
|
317 |
-
}
|
318 |
-
|
319 |
-
/**
|
320 |
-
* @since 1.9.17
|
321 |
-
*/
|
322 |
-
if ( ! $builder || ! $builder['builder_page'] ) {
|
323 |
-
$builder = self::is_elementor();
|
324 |
-
if ( $builder ) {
|
325 |
-
if ( $builder['is_admin'] ) {
|
326 |
-
if ( $builder['builder_page'] ) {
|
327 |
-
return $builder;
|
328 |
-
}
|
329 |
-
} else {
|
330 |
-
/** @noinspection PhpIncludeInspection */
|
331 |
-
include_once WPGlobus::$PLUGIN_DIR_PATH . 'includes/builders/elementor/class-wpglobus-elementor-front.php';
|
332 |
-
WPGlobus_Elementor_Front::init( $builder );
|
333 |
-
}
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
/**
|
338 |
-
* @since 1.9.17
|
339 |
-
* @W.I.P
|
340 |
-
*/
|
341 |
-
/*
|
342 |
-
$builder = self::is_siteorigin_panels();
|
343 |
-
if ( $builder ) {
|
344 |
-
return $builder;
|
345 |
-
}
|
346 |
-
// */
|
347 |
-
|
348 |
-
/**
|
349 |
-
* @since 1.9.17
|
350 |
-
*/
|
351 |
-
if ( ! $builder || ! $builder['builder_page'] ) {
|
352 |
-
$builder = self::is_yoast_seo();
|
353 |
-
if ( $builder && $builder['builder_page'] ) {
|
354 |
-
return $builder;
|
355 |
-
}
|
356 |
-
}
|
357 |
-
|
358 |
-
/**
|
359 |
-
* Pods – Custom Content Types and Fields.
|
360 |
-
*
|
361 |
-
* @since 2.3.0
|
362 |
-
*/
|
363 |
-
if ( ! $builder || ! $builder['builder_page'] ) {
|
364 |
-
$builder = self::is_pods();
|
365 |
-
if ( $builder && $builder['builder_page'] ) {
|
366 |
-
return $builder;
|
367 |
-
}
|
368 |
-
|
369 |
-
}
|
370 |
-
}
|
371 |
-
|
372 |
-
return self::$attrs;
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
/**
|
377 |
-
* Page Builder by SiteOrigin.
|
378 |
-
* @W.I.P
|
379 |
-
* https://wordpress.org/plugins/siteorigin-panels/
|
380 |
-
*/
|
381 |
-
protected static function is_siteorigin_panels() {}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Elementor Page Builder.
|
385 |
-
* https://wordpress.org/plugins/elementor/
|
386 |
-
*/
|
387 |
-
protected static function is_elementor() {
|
388 |
-
|
389 |
-
if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
390 |
-
return false;
|
391 |
-
}
|
392 |
-
|
393 |
-
$__builder = self::get_addon( 'elementor' );
|
394 |
-
|
395 |
-
if ( ! $__builder ) {
|
396 |
-
return false;
|
397 |
-
}
|
398 |
-
|
399 |
-
/** @global string $pagenow */
|
400 |
-
global $pagenow;
|
401 |
-
|
402 |
-
$load_elementor = false;
|
403 |
-
|
404 |
-
if ( version_compare( ELEMENTOR_VERSION, $__builder['supported_min_version'], '<' ) ) {
|
405 |
-
|
406 |
-
$message = 'Unsupported Elementor version.';
|
407 |
-
|
408 |
-
$_attrs = array(
|
409 |
-
'id' => 'elementor',
|
410 |
-
'version' => ELEMENTOR_VERSION,
|
411 |
-
'class' => 'WPGlobus_Elementor',
|
412 |
-
'is_admin' => false,
|
413 |
-
'builder_page' => false,
|
414 |
-
'message' => $message,
|
415 |
-
);
|
416 |
-
|
417 |
-
$attrs = self::get_attrs( $_attrs );
|
418 |
-
|
419 |
-
return $attrs;
|
420 |
-
|
421 |
-
} else {
|
422 |
-
|
423 |
-
if ( in_array( $pagenow, array( 'admin-ajax.php', 'post.php', 'index.php', 'post-new.php' ), true ) ) {
|
424 |
-
|
425 |
-
/**
|
426 |
-
* Init current post type.
|
427 |
-
*/
|
428 |
-
$post_type = is_null(self::$post_type) ? '' : self::$post_type;
|
429 |
-
|
430 |
-
/**
|
431 |
-
* Init post ID.
|
432 |
-
*/
|
433 |
-
$post_id = '';
|
434 |
-
|
435 |
-
$ajax_actions = '';
|
436 |
-
$is_admin = true;
|
437 |
-
|
438 |
-
if ( 'admin-ajax.php' === $pagenow ) {
|
439 |
-
|
440 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
441 |
-
if ( ! isset( $_REQUEST['action'] ) || 'elementor_ajax' !== $_REQUEST['action'] ) {
|
442 |
-
return false;
|
443 |
-
}
|
444 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
445 |
-
if ( false !== strpos( $_REQUEST['actions'], 'save_builder' ) ) {
|
446 |
-
$ajax_actions = 'save_builder';
|
447 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
448 |
-
} elseif ( false !== strpos( $_REQUEST['actions'], '"action":"render_widget"' ) ) {
|
449 |
-
$ajax_actions = 'render_widget';
|
450 |
-
} else {
|
451 |
-
return false;
|
452 |
-
}
|
453 |
-
$load_elementor = true;
|
454 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
455 |
-
$post_id = sanitize_text_field( $_REQUEST['editor_post_id'] );
|
456 |
-
|
457 |
-
} elseif ( 'index.php' === $pagenow ) {
|
458 |
-
|
459 |
-
/**
|
460 |
-
* @todo remove after testing.
|
461 |
-
* if ( ! isset( $_GET['elementor-preview'] ) ) {
|
462 |
-
* return false;
|
463 |
-
* }
|
464 |
-
* // */
|
465 |
-
// @W.I.P @since 2.2.11
|
466 |
-
// [REQUEST_URI] => /?p=75&elementor-preview=75&ver=1561202861
|
467 |
-
|
468 |
-
$load_elementor = false;
|
469 |
-
$is_admin = false;
|
470 |
-
|
471 |
-
/**
|
472 |
-
* @todo Preview page for draft status.
|
473 |
-
* [REQUEST_URI] => /?p=75&elementor-preview=75&ver=1561202861
|
474 |
-
* @W.I.P
|
475 |
-
* @since 2.2.11 [REQUEST_URI] was changed to `?p=75&preview_id=75&preview_nonce=da660129a7&preview=true`.
|
476 |
-
*/
|
477 |
-
/*
|
478 |
-
if ( ! empty( $_GET['p'] ) ) {
|
479 |
-
$load_elementor = true;
|
480 |
-
$is_admin = true;
|
481 |
-
$post_id = sanitize_text_field( $_GET['p'] );
|
482 |
-
$post_type = self::get_post_type($post_id);
|
483 |
-
|
484 |
-
}
|
485 |
-
// */
|
486 |
-
|
487 |
-
} elseif ( 'post.php' === $pagenow ) {
|
488 |
-
|
489 |
-
$is_admin = true;
|
490 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
491 |
-
if ( isset( $_GET['action'] ) && 'elementor' === $_GET['action'] ) {
|
492 |
-
//$is_admin = false;
|
493 |
-
$load_elementor = true;
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* $cpt_support = get_option( 'elementor_cpt_support', array('page', 'post') );
|
498 |
-
*
|
499 |
-
* @see_file elementor\includes\plugin.php
|
500 |
-
*/
|
501 |
-
$cpt_support = get_option( 'elementor_cpt_support', array( 'page', 'post' ) );
|
502 |
-
|
503 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
504 |
-
if ( empty( $post_type ) && isset( $_GET['post_type'] ) ) {
|
505 |
-
/**
|
506 |
-
* For post-new.php page.
|
507 |
-
*/
|
508 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
509 |
-
$post_type = sanitize_text_field( $_GET['post_type'] );
|
510 |
-
}
|
511 |
-
|
512 |
-
if ( empty( $post_type ) ) {
|
513 |
-
// phpcs:ignore WordPress.CSRF.NonceVerification
|
514 |
-
if ( isset( $_GET['post'] ) ) {
|
515 |
-
$post_type = self::get_post_type( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
516 |
-
} elseif ( isset( $_REQUEST['post_ID'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
517 |
-
$post_type = self::get_post_type( $_REQUEST['post_ID'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
// if ( empty( $post_type ) ) {
|
522 |
-
/**
|
523 |
-
* Post type by default.
|
524 |
-
* If we can not define post type then we don't set it to default value.
|
525 |
-
* Because it may cause incorrect behavior later.
|
526 |
-
*/
|
527 |
-
//$post_type = 'post';
|
528 |
-
// }
|
529 |
-
|
530 |
-
if ( in_array( $post_type, $cpt_support, true ) ) {
|
531 |
-
$load_elementor = true;
|
532 |
-
}
|
533 |
-
} else {
|
534 |
-
/**
|
535 |
-
* @todo may be use @see is_built_with_elementor() in elementor\core\base\document.php
|
536 |
-
*/
|
537 |
-
$load_elementor = true;
|
538 |
-
}
|
539 |
-
|
540 |
-
$_attrs = array(
|
541 |
-
'id' => 'elementor',
|
542 |
-
'version' => ELEMENTOR_VERSION,
|
543 |
-
'is_admin' => $is_admin,
|
544 |
-
'class' => 'WPGlobus_Elementor',
|
545 |
-
'post_type' => $post_type,
|
546 |
-
'post_id' => $post_id,
|
547 |
-
'builder_page' => false,
|
548 |
-
'ajax_actions' => $ajax_actions,
|
549 |
-
'post_css_meta_key' => '_wpglobus_elementor_css',
|
550 |
-
'elementor_data_meta_key' => '_elementor_data',
|
551 |
-
'elementor_css_meta_key' => '_elementor_css',
|
552 |
-
'elementor_css_print_method' => get_option('elementor_css_print_method', 'external'), // @since 2.2.31
|
553 |
-
);
|
554 |
-
|
555 |
-
if ( $load_elementor ) {
|
556 |
-
$_attrs['builder_page'] = true;
|
557 |
-
} else {
|
558 |
-
$_attrs['builder_page'] = false;
|
559 |
-
}
|
560 |
-
|
561 |
-
$attrs = self::get_attrs( $_attrs );
|
562 |
-
|
563 |
-
return $attrs;
|
564 |
-
|
565 |
-
}
|
566 |
-
}
|
567 |
-
|
568 |
-
return false;
|
569 |
-
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* WPBakery Page Builder.
|
574 |
-
* https://wpbakery.com/
|
575 |
-
*/
|
576 |
-
protected static function is_js_composer() {
|
577 |
-
|
578 |
-
if ( ! defined( 'WPB_VC_VERSION' ) ) {
|
579 |
-
return false;
|
580 |
-
}
|
581 |
-
|
582 |
-
/** @global string $pagenow */
|
583 |
-
global $pagenow;
|
584 |
-
|
585 |
-
/** @global wpdb $wpdb */
|
586 |
-
// global $wpdb;
|
587 |
-
|
588 |
-
if ( 'post.php' === $pagenow ) {
|
589 |
-
|
590 |
-
$_builder_page = true;
|
591 |
-
|
592 |
-
/**
|
593 |
-
* @see vc_editor_post_types() (js_composer\include\helpers\helpers_api.php) doesn't work here.
|
594 |
-
* so let's check the roles.
|
595 |
-
*/
|
596 |
-
$_opts = wp_roles()->roles;
|
597 |
-
|
598 |
-
if ( ! function_exists( 'wp_get_current_user' ) ) {
|
599 |
-
/** @noinspection PhpIncludeInspection */
|
600 |
-
require_once ABSPATH . WPINC . '/pluggable.php';
|
601 |
-
}
|
602 |
-
|
603 |
-
$_user = wp_get_current_user();
|
604 |
-
|
605 |
-
$post_id = WPGlobus_Utils::safe_get( 'post' );
|
606 |
-
|
607 |
-
if ( empty( $post_id ) ) {
|
608 |
-
/**
|
609 |
-
* Before update post we can get empty $_GET array.
|
610 |
-
* Let's check $_POST.
|
611 |
-
*/
|
612 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
613 |
-
$post_id = isset( $_POST['post_ID'] ) ? sanitize_text_field( $_POST['post_ID'] ) : '';
|
614 |
-
}
|
615 |
-
|
616 |
-
// if ( empty( $post_id ) ) {
|
617 |
-
// @todo add handling this case.
|
618 |
-
// }
|
619 |
-
|
620 |
-
// $_post_type = $wpdb->get_col( $wpdb->prepare( "SELECT post_type FROM {$wpdb->prefix}posts WHERE ID = %d", $post_id ) );
|
621 |
-
//
|
622 |
-
// $post_type = '';
|
623 |
-
// if ( ! empty( $_post_type[0] ) ) {
|
624 |
-
// $post_type = $_post_type[0];
|
625 |
-
// }
|
626 |
-
|
627 |
-
$post = get_post( $post_id );
|
628 |
-
$post_type = ( $post ? $post->post_type : '' );
|
629 |
-
|
630 |
-
if ( ! isset( $_opts[ $_user->roles[0] ]['capabilities']['vc_access_rules_post_types'] ) ) {
|
631 |
-
/**
|
632 |
-
* WPBakery Page Builder is available for pages only (settings were not saved yet).
|
633 |
-
*/
|
634 |
-
if ( 'page' !== $post_type ) {
|
635 |
-
$_builder_page = false;
|
636 |
-
}
|
637 |
-
} elseif ( empty( $_opts[ $_user->roles[0] ]['capabilities']['vc_access_rules_post_types'] ) ) {
|
638 |
-
/**
|
639 |
-
* Settings exist but set to False, so all post types are disabled in WPBakery Page Builder.
|
640 |
-
*/
|
641 |
-
$_builder_page = false;
|
642 |
-
|
643 |
-
} elseif ( true === $_opts[ $_user->roles[0] ]['capabilities']['vc_access_rules_post_types'] ) {
|
644 |
-
/**
|
645 |
-
* WPBakery Page Builder is available for pages only.
|
646 |
-
*/
|
647 |
-
if ( 'page' !== $post_type ) {
|
648 |
-
$_builder_page = false;
|
649 |
-
}
|
650 |
-
} elseif ( 'custom' === $_opts[ $_user->roles[0] ]['capabilities']['vc_access_rules_post_types'] ) {
|
651 |
-
|
652 |
-
/**
|
653 |
-
* Custom settings for post types in WPBakery Page Builder.
|
654 |
-
*/
|
655 |
-
if ( ! empty( $_opts[ $_user->roles[0] ]['capabilities'][ 'vc_access_rules_post_types/' . $post_type ] ) ) {
|
656 |
-
// Setting for this post type exists and set to True.
|
657 |
-
$_builder_page = true;
|
658 |
-
} else {
|
659 |
-
$_builder_page = false;
|
660 |
-
}
|
661 |
-
} else {
|
662 |
-
$_builder_page = false;
|
663 |
-
}
|
664 |
-
|
665 |
-
$_attrs = array(
|
666 |
-
'id' => 'js_composer',
|
667 |
-
'version' => WPB_VC_VERSION,
|
668 |
-
'class' => 'WPGlobus_JS_Composer',
|
669 |
-
'post_type' => $post_type,
|
670 |
-
'builder_page' => $_builder_page,
|
671 |
-
);
|
672 |
-
|
673 |
-
/**
|
674 |
-
* @since 2.2.11
|
675 |
-
* @W.I.P
|
676 |
-
*/
|
677 |
-
//self::$admin_attrs['multilingualFields'][] = 'wpb_visual_composer';
|
678 |
-
|
679 |
-
$attrs = self::get_attrs( $_attrs );
|
680 |
-
|
681 |
-
return $attrs;
|
682 |
-
|
683 |
-
}
|
684 |
-
|
685 |
-
return false;
|
686 |
-
}
|
687 |
-
|
688 |
-
/**
|
689 |
-
* Gutenberg.
|
690 |
-
*
|
691 |
-
* @since 1.9.17
|
692 |
-
*/
|
693 |
-
protected static function is_gutenberg() {
|
694 |
-
|
695 |
-
$load_gutenberg = false;
|
696 |
-
$message = '';
|
697 |
-
|
698 |
-
/** @global string $pagenow */
|
699 |
-
global $pagenow, $wp_version;
|
700 |
-
|
701 |
-
if ( version_compare( $wp_version, '4.9.99', '>' ) ) {
|
702 |
-
|
703 |
-
$context = 'core';
|
704 |
-
|
705 |
-
/**
|
706 |
-
* @since 2.0
|
707 |
-
*/
|
708 |
-
if ( 'post-new.php' === $pagenow ) {
|
709 |
-
|
710 |
-
/**
|
711 |
-
* Load specific language switcher for this page.
|
712 |
-
*
|
713 |
-
* @see get_switcher_box() in wpglobus\includes\builders\gutenberg\class-wpglobus-gutenberg.php
|
714 |
-
*/
|
715 |
-
//if ( ! isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
716 |
-
// Start Gutenberg support if classic editor was not requested.
|
717 |
-
//$load_gutenberg = true;
|
718 |
-
//}
|
719 |
-
|
720 |
-
$load_gutenberg = true;
|
721 |
-
|
722 |
-
$load_gutenberg = self::get_3rd_party_status_for_gutenberg( $load_gutenberg );
|
723 |
-
|
724 |
-
} elseif ( 'index.php' === $pagenow ) {
|
725 |
-
|
726 |
-
/**
|
727 |
-
* When Update button was clicked.
|
728 |
-
*/
|
729 |
-
if ( ! is_admin() ) {
|
730 |
-
/**
|
731 |
-
* Gutenberg updates post as from front.
|
732 |
-
*
|
733 |
-
* @see $_SERVER['REQUEST_URI']
|
734 |
-
*/
|
735 |
-
//$actions = array( 'edit' );
|
736 |
-
// @todo check 'wp/v2/' in wp.api.versionString (JS).
|
737 |
-
|
738 |
-
// /wp-json/wp/v2/posts/
|
739 |
-
// /wp-json/wp/v2/pages/
|
740 |
-
/**
|
741 |
-
* We need define post type for correct work.
|
742 |
-
*
|
743 |
-
* @todo check
|
744 |
-
* /wp-json/wp/v2/taxonomies?context=edit
|
745 |
-
* /wp-json/wp/v2/taxonomies?context=edit&_locale=user
|
746 |
-
* /wp-json/wp/v2/types/wp_block?_locale=user
|
747 |
-
* /wp-json/wp/v2/blocks?per_page=100&_locale=user
|
748 |
-
*/
|
749 |
-
|
750 |
-
$_request_uri = explode( '/', $_SERVER['REQUEST_URI'] );
|
751 |
-
$post_id = end( $_request_uri );
|
752 |
-
$post_id = preg_replace( '/\?.*/', '', $post_id );
|
753 |
-
|
754 |
-
/**
|
755 |
-
* @todo @see https://wpglobus.freshdesk.com/a/tickets/4103
|
756 |
-
*/
|
757 |
-
|
758 |
-
/**
|
759 |
-
* @since 2.3.5 Added checking $_request_uri[4].
|
760 |
-
*/
|
761 |
-
$_continue = false;
|
762 |
-
if ( 0 !== (int) $post_id && ! empty($_request_uri[4]) ) {
|
763 |
-
|
764 |
-
$GLOBALS['WPGlobus']['builder'] = 'gutenberg';
|
765 |
-
$GLOBALS['WPGlobus']['context'] = $context;
|
766 |
-
$GLOBALS['WPGlobus']['post_id'] = $post_id;
|
767 |
-
switch ( $_request_uri[4] ) {
|
768 |
-
case 'posts':
|
769 |
-
$post_type = 'post';
|
770 |
-
break;
|
771 |
-
case 'pages':
|
772 |
-
$post_type = 'page';
|
773 |
-
break;
|
774 |
-
default:
|
775 |
-
$post_type = $_request_uri[4];
|
776 |
-
}
|
777 |
-
$GLOBALS['WPGlobus']['post_type'] = $post_type;
|
778 |
-
$_continue = true;
|
779 |
-
}
|
780 |
-
|
781 |
-
if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp/v2/posts' )
|
782 |
-
|| false !== strpos( $_SERVER['REQUEST_URI'], 'wp/v2/pages' )
|
783 |
-
|| $_continue ) {
|
784 |
-
$load_gutenberg = true;
|
785 |
-
}
|
786 |
-
}
|
787 |
-
} elseif ( 'post.php' === $pagenow ) {
|
788 |
-
|
789 |
-
$load_gutenberg = true;
|
790 |
-
|
791 |
-
$post_type = is_null(self::$post_type) ? '' : self::$post_type;
|
792 |
-
|
793 |
-
/**
|
794 |
-
* Check out $_POST['post_type'] to define post type.
|
795 |
-
*
|
796 |
-
* @since 2.1.6
|
797 |
-
*/
|
798 |
-
if ( empty( $post_type ) && ! empty( $_POST['post_type'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
799 |
-
$post_type = $_POST['post_type']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
800 |
-
}
|
801 |
-
|
802 |
-
if ( empty( $post_type ) && ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
803 |
-
$post_type = self::get_post_type( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
804 |
-
}
|
805 |
-
|
806 |
-
/**
|
807 |
-
* @todo don't check post type @since 2.1.2
|
808 |
-
*/
|
809 |
-
// if ( ! in_array( $post_type, array( 'post', 'page' ), true ) ) {
|
810 |
-
// $load_gutenberg = false;
|
811 |
-
// }
|
812 |
-
|
813 |
-
/**
|
814 |
-
* @since 2.2.24
|
815 |
-
*/
|
816 |
-
if ( ! self::use_block_editor_for_post_type($post_type) ) {
|
817 |
-
/**
|
818 |
-
* Don't start Block Editor support.
|
819 |
-
*/
|
820 |
-
return false;
|
821 |
-
|
822 |
-
}
|
823 |
-
|
824 |
-
$load_gutenberg = self::get_3rd_party_status_for_gutenberg( $load_gutenberg, $post_type );
|
825 |
-
|
826 |
-
}
|
827 |
-
|
828 |
-
$_attrs = array(
|
829 |
-
'id' => 'gutenberg',
|
830 |
-
'version' => $wp_version,
|
831 |
-
'class' => 'WPGlobus_Gutenberg',
|
832 |
-
'builder_page' => false,
|
833 |
-
'pagenow' => $pagenow,
|
834 |
-
'post_type' => empty( $post_type ) ? '' : $post_type,
|
835 |
-
'message' => $message,
|
836 |
-
'context' => $context,
|
837 |
-
);
|
838 |
-
|
839 |
-
if ( $load_gutenberg ) {
|
840 |
-
$_attrs['builder_page'] = true;
|
841 |
-
}
|
842 |
-
|
843 |
-
$attrs = self::get_attrs( $_attrs );
|
844 |
-
|
845 |
-
self::$add_on['gutenberg']['admin_bar_builder_label'] = 'Block Editor';
|
846 |
-
|
847 |
-
return $attrs;
|
848 |
-
|
849 |
-
}
|
850 |
-
|
851 |
-
if ( defined( 'GUTENBERG_VERSION' ) ) {
|
852 |
-
|
853 |
-
$__builder = self::get_addon( 'gutenberg' );
|
854 |
-
|
855 |
-
if ( ! $__builder ) {
|
856 |
-
return false;
|
857 |
-
}
|
858 |
-
|
859 |
-
if ( version_compare( GUTENBERG_VERSION, $__builder['supported_min_version'], '<' ) ) {
|
860 |
-
|
861 |
-
$message = 'Unsupported Gutenberg version.';
|
862 |
-
|
863 |
-
} else {
|
864 |
-
|
865 |
-
if ( self::is_gutenberg_ajax() ) {
|
866 |
-
|
867 |
-
$load_gutenberg = true;
|
868 |
-
|
869 |
-
} else {
|
870 |
-
|
871 |
-
if ( 'post-new.php' === $pagenow ) {
|
872 |
-
|
873 |
-
/**
|
874 |
-
* Load specific language switcher for this page.
|
875 |
-
*
|
876 |
-
* @see get_switcher_box() in wpglobus\includes\builders\gutenberg\class-wpglobus-gutenberg.php
|
877 |
-
*/
|
878 |
-
if ( ! isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
879 |
-
// Start Gutenberg support if classic editor was not requested.
|
880 |
-
$load_gutenberg = true;
|
881 |
-
}
|
882 |
-
|
883 |
-
/**
|
884 |
-
* @since 1.9.30
|
885 |
-
*/
|
886 |
-
$load_gutenberg = self::get_3rd_party_status_for_gutenberg( $load_gutenberg );
|
887 |
-
|
888 |
-
} elseif ( 'index.php' === $pagenow ) {
|
889 |
-
|
890 |
-
/**
|
891 |
-
* When Update button was clicked.
|
892 |
-
*/
|
893 |
-
if ( ! is_admin() ) {
|
894 |
-
/**
|
895 |
-
* Gutenberg updates post as from front.
|
896 |
-
*
|
897 |
-
* @see $_SERVER['REQUEST_URI']
|
898 |
-
*/
|
899 |
-
//$actions = array( 'edit' );
|
900 |
-
// @todo check 'wp/v2/' in wp.api.versionString (JS).
|
901 |
-
|
902 |
-
// /wp-json/wp/v2/posts/
|
903 |
-
// /wp-json/wp/v2/pages/
|
904 |
-
// @todo check /wp-json/wp/v2/taxonomies?context=edit
|
905 |
-
if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp/v2/posts' )
|
906 |
-
|| false !== strpos( $_SERVER['REQUEST_URI'], 'wp/v2/pages' ) ) {
|
907 |
-
$load_gutenberg = true;
|
908 |
-
}
|
909 |
-
}
|
910 |
-
} elseif ( 'post.php' === $pagenow ) {
|
911 |
-
|
912 |
-
$load_gutenberg = true;
|
913 |
-
|
914 |
-
$actions = array( 'edit', 'editpost' );
|
915 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
916 |
-
if ( ! empty( $_GET['action'] ) ) {
|
917 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
918 |
-
if ( in_array( $_GET['action'], $actions, true ) ) {
|
919 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
920 |
-
if ( array_key_exists( 'classic-editor', $_GET ) ) {
|
921 |
-
$load_gutenberg = false;
|
922 |
-
}
|
923 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
924 |
-
if ( isset( $_GET['meta_box'] ) && 1 === (int) $_GET['meta_box'] ) {
|
925 |
-
$load_gutenberg = true;
|
926 |
-
}
|
927 |
-
}
|
928 |
-
} elseif ( ! empty( $_POST['action'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
929 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
930 |
-
if ( in_array( $_POST['action'], $actions, true ) ) {
|
931 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
932 |
-
if ( array_key_exists( 'classic-editor', $_POST ) ) {
|
933 |
-
$load_gutenberg = false;
|
934 |
-
}
|
935 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
936 |
-
if ( isset( $_POST['meta_box'] ) && 1 === (int) $_POST['meta_box'] ) {
|
937 |
-
$load_gutenberg = true;
|
938 |
-
}
|
939 |
-
}
|
940 |
-
}
|
941 |
-
|
942 |
-
$post_type = is_null(self::$post_type) ? '' : self::$post_type;
|
943 |
-
|
944 |
-
if ( empty($post_type) && ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
945 |
-
$post_type = self::get_post_type( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
946 |
-
}
|
947 |
-
|
948 |
-
/**
|
949 |
-
* Since 1.9.17 Gutenberg support will be start for posts and pages only.
|
950 |
-
*/
|
951 |
-
if ( ! in_array( $post_type, array( 'post', 'page' ), true ) ) {
|
952 |
-
$load_gutenberg = false;
|
953 |
-
}
|
954 |
-
|
955 |
-
/**
|
956 |
-
* @since 1.9.30
|
957 |
-
*/
|
958 |
-
$load_gutenberg = self::get_3rd_party_status_for_gutenberg( $load_gutenberg );
|
959 |
-
|
960 |
-
}
|
961 |
-
}
|
962 |
-
}
|
963 |
-
|
964 |
-
$_attrs = array(
|
965 |
-
'id' => 'gutenberg',
|
966 |
-
'version' => GUTENBERG_VERSION,
|
967 |
-
'class' => 'WPGlobus_Gutenberg',
|
968 |
-
'builder_page' => false,
|
969 |
-
'pagenow' => $pagenow,
|
970 |
-
'post_type' => empty( $post_type ) ? '' : $post_type,
|
971 |
-
'message' => $message,
|
972 |
-
);
|
973 |
-
|
974 |
-
if ( $load_gutenberg ) {
|
975 |
-
$_attrs['builder_page'] = true;
|
976 |
-
}
|
977 |
-
|
978 |
-
$attrs = self::get_attrs( $_attrs );
|
979 |
-
|
980 |
-
return $attrs;
|
981 |
-
|
982 |
-
}
|
983 |
-
|
984 |
-
return $load_gutenberg;
|
985 |
-
}
|
986 |
-
|
987 |
-
/**
|
988 |
-
* @since 1.9.30
|
989 |
-
*
|
990 |
-
* @param bool $load_gutenberg
|
991 |
-
* @param string $post_type @since 2.1.6
|
992 |
-
*
|
993 |
-
* @return bool
|
994 |
-
*/
|
995 |
-
protected static function get_3rd_party_status_for_gutenberg( $load_gutenberg, $post_type = '' ) {
|
996 |
-
|
997 |
-
if ( '' === $post_type ) {
|
998 |
-
$post_type = self::get_post_type_2();
|
999 |
-
}
|
1000 |
-
|
1001 |
-
if ( defined( 'WC_PLUGIN_FILE' ) ) {
|
1002 |
-
/**
|
1003 |
-
* WooCommerce.
|
1004 |
-
*/
|
1005 |
-
if ( 'product' === $post_type ) {
|
1006 |
-
|
1007 |
-
$load_gutenberg = false;
|
1008 |
-
|
1009 |
-
} elseif ( '' === $post_type ) {
|
1010 |
-
|
1011 |
-
if ( ! empty( $_POST['post_type'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1012 |
-
$post_type = $_POST['post_type']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
if ( empty( $post_type ) && ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1016 |
-
$post_type = self::get_post_type( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
if ( empty( $post_type ) && ! empty( $_GET['post_type'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1020 |
-
$post_type = $_GET['post_type']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
if ( 'product' === $post_type ) {
|
1024 |
-
$load_gutenberg = false;
|
1025 |
-
}
|
1026 |
-
}
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
if ( function_exists( 'classic_editor_settings' ) ) {
|
1030 |
-
/**
|
1031 |
-
* @see ver.0.5 https://wordpress.org/plugins/classic-editor/#developers
|
1032 |
-
*/
|
1033 |
-
if ( isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1034 |
-
/**
|
1035 |
-
* Option 'Use the Block editor by default and include optional links back to the Classic editor' was selected.
|
1036 |
-
*/
|
1037 |
-
$load_gutenberg = false;
|
1038 |
-
} else {
|
1039 |
-
$classic_editor_replace = get_option( 'classic-editor-replace' );
|
1040 |
-
if ( empty( $classic_editor_replace ) || 'replace' === $classic_editor_replace ) {
|
1041 |
-
$load_gutenberg = false;
|
1042 |
-
}
|
1043 |
-
}
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
if ( class_exists( 'Classic_Editor' ) ) {
|
1047 |
-
/** @global string $wp_version */
|
1048 |
-
global $wp_version;
|
1049 |
-
|
1050 |
-
if ( version_compare( $wp_version, '4.9.99', '>' ) ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement
|
1051 |
-
// continue
|
1052 |
-
} else {
|
1053 |
-
/**
|
1054 |
-
* Incorrect work with WP 4.9
|
1055 |
-
*
|
1056 |
-
* @see https://wordpress.org/support/topic/does-nor-work-anymore-since-v-1-0/
|
1057 |
-
*/
|
1058 |
-
return $load_gutenberg;
|
1059 |
-
}
|
1060 |
-
|
1061 |
-
/**
|
1062 |
-
* ver.1.0 https://wordpress.org/plugins/classic-editor/
|
1063 |
-
*/
|
1064 |
-
if ( isset( $_GET['classic-editor'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1065 |
-
/**
|
1066 |
-
* @todo
|
1067 |
-
* 1. set 'classic-editor-remember' as 'block-editor'.
|
1068 |
-
* 2. load your-site/wp-admin/post.php?post=POST_ID&action=edit&classic-editor.
|
1069 |
-
* 3. incorrect loading post page.
|
1070 |
-
*/
|
1071 |
-
//update_post_meta( POST_ID, 'classic-editor-remember', 'classic-editor' );
|
1072 |
-
|
1073 |
-
$load_gutenberg = false;
|
1074 |
-
} elseif ( isset( $_GET['classic-editor__forget'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1075 |
-
$load_gutenberg = true;
|
1076 |
-
} else {
|
1077 |
-
$post_id = isset( $_GET['post'] ) ? (int) $_GET['post'] : 0; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1078 |
-
|
1079 |
-
if ( 0 === $post_id ) {
|
1080 |
-
/**
|
1081 |
-
* We need to check $_POST when the saving post in 'classic-editor' mode.
|
1082 |
-
* As option we can use $_POST['classic-editor'], but now get 'classic-editor-remember' meta.
|
1083 |
-
*/
|
1084 |
-
$post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1085 |
-
}
|
1086 |
-
|
1087 |
-
if ( 0 !== $post_id ) {
|
1088 |
-
$classic_editor_remember = get_post_meta( $post_id, 'classic-editor-remember', true );
|
1089 |
-
if ( 'classic-editor' === $classic_editor_remember ) {
|
1090 |
-
$load_gutenberg = false;
|
1091 |
-
|
1092 |
-
return $load_gutenberg;
|
1093 |
-
} elseif ( 'block-editor' === $classic_editor_remember ) {
|
1094 |
-
$load_gutenberg = true;
|
1095 |
-
|
1096 |
-
return $load_gutenberg;
|
1097 |
-
}
|
1098 |
-
//else {
|
1099 |
-
/**
|
1100 |
-
* @todo meta doesn't exist?
|
1101 |
-
*/
|
1102 |
-
//}
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
$classic_editor_replace = get_option( 'classic-editor-replace' );
|
1106 |
-
if ( empty( $classic_editor_replace ) || 'classic' === $classic_editor_replace ) {
|
1107 |
-
$load_gutenberg = false;
|
1108 |
-
} elseif ( 'block' === $classic_editor_replace ) {
|
1109 |
-
$load_gutenberg = true;
|
1110 |
-
} else {
|
1111 |
-
$load_gutenberg = false;
|
1112 |
-
|
1113 |
-
}
|
1114 |
-
}
|
1115 |
-
}
|
1116 |
-
|
1117 |
-
return $load_gutenberg;
|
1118 |
-
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
/**
|
1122 |
-
* Check for gutenberg ajax.
|
1123 |
-
*/
|
1124 |
-
protected static function is_gutenberg_ajax() {
|
1125 |
-
$result = false;
|
1126 |
-
|
1127 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
1128 |
-
if ( empty( $_POST ) || empty( $_POST['action'] ) ) {
|
1129 |
-
return $result;
|
1130 |
-
}
|
1131 |
-
|
1132 |
-
$actions = array( 'edit', 'editpost' );
|
1133 |
-
if ( in_array( $_POST['action'], $actions, true ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1134 |
-
if ( array_key_exists( 'gutenberg_meta_boxes', $_POST ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1135 |
-
$result = true;
|
1136 |
-
}
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
return $result;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
/**
|
1143 |
-
* Check for Yoast SEO.
|
1144 |
-
*
|
1145 |
-
* @since 1.9.17
|
1146 |
-
*/
|
1147 |
-
protected static function is_yoast_seo() {
|
1148 |
-
|
1149 |
-
if ( defined( 'WPSEO_VERSION' ) ) {
|
1150 |
-
|
1151 |
-
/** @global string $pagenow */
|
1152 |
-
global $pagenow;
|
1153 |
-
|
1154 |
-
$wpseo_titles = get_option( 'wpseo_titles' );
|
1155 |
-
|
1156 |
-
if ( 'post.php' === $pagenow ) {
|
1157 |
-
|
1158 |
-
$post_type = is_null(self::$post_type) ? '' : self::$post_type;
|
1159 |
-
|
1160 |
-
if ( empty( $post_type ) && ! empty( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1161 |
-
$post_type = self::get_post_type( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
if ( empty( $post_type ) ) {
|
1165 |
-
/**
|
1166 |
-
* Check $_REQUEST when post is updated.
|
1167 |
-
*/
|
1168 |
-
if ( ! empty( $_REQUEST['post_type'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1169 |
-
$post_type = $_REQUEST['post_type']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1170 |
-
}
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
$_attrs = array(
|
1174 |
-
'id' => 'yoast_seo',
|
1175 |
-
'version' => WPSEO_VERSION,
|
1176 |
-
'class' => 'WPGlobus_Yoast_SEO',
|
1177 |
-
'builder_page' => false,
|
1178 |
-
'post_type' => empty( $post_type ) ? '' : $post_type,
|
1179 |
-
);
|
1180 |
-
|
1181 |
-
if ( empty( $post_type ) ) {
|
1182 |
-
/**
|
1183 |
-
* @since 1.9.17 detect builder page using $pagenow.
|
1184 |
-
*/
|
1185 |
-
$_attrs['builder_page'] = true;
|
1186 |
-
} else {
|
1187 |
-
|
1188 |
-
if ( ! array_key_exists( 'display-metabox-pt-' . $post_type, $wpseo_titles ) ) {
|
1189 |
-
/**
|
1190 |
-
* @since 2.2.25
|
1191 |
-
*/
|
1192 |
-
$_attrs['builder_page'] = true;
|
1193 |
-
} elseif ( 0 === (int) $wpseo_titles[ 'display-metabox-pt-' . $post_type ] ) {
|
1194 |
-
$_attrs['builder_page'] = false;
|
1195 |
-
} else {
|
1196 |
-
$_attrs['builder_page'] = true;
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
$attrs = self::get_attrs( $_attrs );
|
1202 |
-
|
1203 |
-
return $attrs;
|
1204 |
-
|
1205 |
-
} elseif ( 'term.php' === $pagenow ) {
|
1206 |
-
|
1207 |
-
$tax = empty( $_GET['taxonomy'] ) ? false : sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
1208 |
-
|
1209 |
-
if ( $tax ) {
|
1210 |
-
|
1211 |
-
$_attrs = array(
|
1212 |
-
'id' => 'yoast_seo',
|
1213 |
-
'version' => WPSEO_VERSION,
|
1214 |
-
'class' => 'WPGlobus_Yoast_SEO',
|
1215 |
-
'builder_page' => false,
|
1216 |
-
'post_type' => '',
|
1217 |
-
'taxonomy' => $tax,
|
1218 |
-
);
|
1219 |
-
|
1220 |
-
self::$admin_attrs = array(
|
1221 |
-
'multilingualFields' => array( 'name', 'description_ifr' ),
|
1222 |
-
'translatableClass' => 'wpglobus-translatable',
|
1223 |
-
);
|
1224 |
-
|
1225 |
-
if ( isset( $wpseo_titles[ 'display-metabox-tax-' . $tax ] ) && 0 === (int) $wpseo_titles[ 'display-metabox-tax-' . $tax ] ) {
|
1226 |
-
$_attrs['builder_page'] = false;
|
1227 |
-
} else {
|
1228 |
-
$_attrs['builder_page'] = true;
|
1229 |
-
}
|
1230 |
-
|
1231 |
-
$attrs = self::get_attrs( $_attrs );
|
1232 |
-
|
1233 |
-
return $attrs;
|
1234 |
-
}
|
1235 |
-
} elseif ( 'edit-tags.php' === $pagenow ) {
|
1236 |
-
/**
|
1237 |
-
* Case when Update button was clicked on term.php page .
|
1238 |
-
*/
|
1239 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
1240 |
-
$tax = empty( $_POST['taxonomy'] ) ? false : sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) );
|
1241 |
-
|
1242 |
-
if ( $tax ) {
|
1243 |
-
|
1244 |
-
$_attrs = array(
|
1245 |
-
'id' => 'yoast_seo',
|
1246 |
-
'version' => WPSEO_VERSION,
|
1247 |
-
'class' => 'WPGlobus_Yoast_SEO',
|
1248 |
-
'builder_page' => false,
|
1249 |
-
'post_type' => '',
|
1250 |
-
'taxonomy' => $tax,
|
1251 |
-
);
|
1252 |
-
|
1253 |
-
self::$admin_attrs = array(
|
1254 |
-
'multilingualFields' => array( 'name', 'description_ifr' ),
|
1255 |
-
'translatableClass' => 'wpglobus-translatable',
|
1256 |
-
);
|
1257 |
-
|
1258 |
-
if ( isset( $_POST['action'] ) && 'editedtag' === $_POST['action'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1259 |
-
$_attrs['builder_page'] = true;
|
1260 |
-
}
|
1261 |
-
|
1262 |
-
$attrs = self::get_attrs( $_attrs );
|
1263 |
-
|
1264 |
-
return $attrs;
|
1265 |
-
}
|
1266 |
-
}
|
1267 |
-
}
|
1268 |
-
|
1269 |
-
return false;
|
1270 |
-
|
1271 |
-
}
|
1272 |
-
|
1273 |
-
/**
|
1274 |
-
* Check for Pods – Custom Content Types and Fields.
|
1275 |
-
*
|
1276 |
-
* @since 2.3.0
|
1277 |
-
*/
|
1278 |
-
protected static function is_pods() {
|
1279 |
-
|
1280 |
-
if ( ! defined( 'PODS_VERSION' ) ) {
|
1281 |
-
return false;
|
1282 |
-
}
|
1283 |
-
|
1284 |
-
$post_type = self::get_post_type_2();
|
1285 |
-
|
1286 |
-
$_attrs = array(
|
1287 |
-
'id' => 'pods',
|
1288 |
-
'version' => PODS_VERSION,
|
1289 |
-
'class' => 'WPGlobus_Pods',
|
1290 |
-
'builder_page' => false,
|
1291 |
-
'post_type' => empty( $post_type ) ? '' : $post_type,
|
1292 |
-
);
|
1293 |
-
|
1294 |
-
require_once 'pods/class-wpglobus-builder-pods.php';
|
1295 |
-
$_attrs = WPGlobus_Builder_Pods::get_attrs( self::get_attrs( $_attrs ) );
|
1296 |
-
|
1297 |
-
if ( ! $_attrs ) {
|
1298 |
-
return false;
|
1299 |
-
}
|
1300 |
-
|
1301 |
-
return $_attrs;
|
1302 |
-
}
|
1303 |
-
|
1304 |
-
/**
|
1305 |
-
* Get attributes.
|
1306 |
-
*
|
1307 |
-
* @param array $attrs
|
1308 |
-
*
|
1309 |
-
* @return array
|
1310 |
-
*/
|
1311 |
-
protected static function get_attrs( $attrs ) {
|
1312 |
-
$_attrs = array_merge( self::$attrs, $attrs );
|
1313 |
-
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
|
1314 |
-
if ( isset( $_attrs['is_admin'] ) && ! $_attrs['is_admin'] ) {
|
1315 |
-
// do nothing.
|
1316 |
-
} else {
|
1317 |
-
$_attrs = array_merge( $_attrs, self::$admin_attrs );
|
1318 |
-
}
|
1319 |
-
|
1320 |
-
if ( empty( $_attrs['post_id'] ) ) {
|
1321 |
-
if ( isset( $_GET['post'] ) && is_string( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1322 |
-
/**
|
1323 |
-
* With bulk action (trash, untrash) we get $_GET['post'] as array.
|
1324 |
-
*
|
1325 |
-
* @since WPGlobus 2.0 we are working with single post only.
|
1326 |
-
*/
|
1327 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
1328 |
-
$_attrs['post_id'] = sanitize_text_field( $_GET['post'] );
|
1329 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
1330 |
-
} elseif ( isset( $_REQUEST['post_ID'] ) && is_string( $_REQUEST['post_ID'] ) ) {
|
1331 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
1332 |
-
$_attrs['post_id'] = sanitize_text_field( $_REQUEST['post_ID'] );
|
1333 |
-
// } else {
|
1334 |
-
// @todo Check additional ways to get post ID.
|
1335 |
-
}
|
1336 |
-
}
|
1337 |
-
|
1338 |
-
// @todo may be disable post type here.
|
1339 |
-
// $_attrs['builder_page'] = false;
|
1340 |
-
return $_attrs;
|
1341 |
-
}
|
1342 |
-
|
1343 |
-
/**
|
1344 |
-
* Get post type.
|
1345 |
-
*
|
1346 |
-
* @param string $id
|
1347 |
-
*
|
1348 |
-
* @return null|string
|
1349 |
-
*/
|
1350 |
-
protected static function get_post_type( $id = '' ) {
|
1351 |
-
|
1352 |
-
/**
|
1353 |
-
* Get post type.
|
1354 |
-
*
|
1355 |
-
* @since 2.2.11
|
1356 |
-
*/
|
1357 |
-
if ( ! is_null( self::$post_type ) ) {
|
1358 |
-
return self::$post_type;
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
/**
|
1362 |
-
* @since 2.2.11
|
1363 |
-
* @W.I.P to use get_post_type_2()
|
1364 |
-
*/
|
1365 |
-
if ( 0 === (int) $id ) {
|
1366 |
-
return null;
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
/** @global wpdb $wpdb */
|
1370 |
-
global $wpdb;
|
1371 |
-
|
1372 |
-
$post_type = $wpdb->get_var( $wpdb->prepare( "SELECT post_type FROM $wpdb->posts WHERE ID = %d", $id ) );
|
1373 |
-
|
1374 |
-
return $post_type;
|
1375 |
-
}
|
1376 |
-
|
1377 |
-
/**
|
1378 |
-
* Get post type 2.
|
1379 |
-
*
|
1380 |
-
* @since 2.2.11
|
1381 |
-
*/
|
1382 |
-
protected static function get_post_type_2() {
|
1383 |
-
|
1384 |
-
if ( ! is_null( self::$post_type ) ) {
|
1385 |
-
return self::$post_type;
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
/** @global string $pagenow */
|
1389 |
-
global $pagenow;
|
1390 |
-
|
1391 |
-
$post_type = '';
|
1392 |
-
$post_id = '';
|
1393 |
-
|
1394 |
-
switch ($pagenow) {
|
1395 |
-
case 'media-new.php' :
|
1396 |
-
$post_type = 'attachment';
|
1397 |
-
break;
|
1398 |
-
case 'post-new.php':
|
1399 |
-
if ( isset( $_GET['post_type'] ) ) {
|
1400 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
1401 |
-
$post_type = sanitize_text_field( $_GET['post_type'] );
|
1402 |
-
} else {
|
1403 |
-
$post_type = 'post';
|
1404 |
-
}
|
1405 |
-
break;
|
1406 |
-
/**
|
1407 |
-
* @W.I.P @since 2.2.14
|
1408 |
-
case 'admin-ajax.php' :
|
1409 |
-
$post_type = '';
|
1410 |
-
break;
|
1411 |
-
// */
|
1412 |
-
default:
|
1413 |
-
// post.php page.
|
1414 |
-
if ( isset( $_GET['post'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1415 |
-
$post_id = $_GET['post']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1416 |
-
} else if ( isset( $_GET['post_id'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1417 |
-
/**
|
1418 |
-
* For example when loading WPBakery PB's front editor.
|
1419 |
-
* @since 2.3.7
|
1420 |
-
*/
|
1421 |
-
$post_id = $_GET['post_id']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1422 |
-
} else if ( isset( $_REQUEST['post_ID'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1423 |
-
/**
|
1424 |
-
* Case when Update button was clicked.
|
1425 |
-
*/
|
1426 |
-
$post_id = $_REQUEST['post_ID']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
1427 |
-
}
|
1428 |
-
break;
|
1429 |
-
}
|
1430 |
-
|
1431 |
-
if ( ! empty($post_type) ) {
|
1432 |
-
self::$post_type = $post_type;
|
1433 |
-
return self::$post_type;
|
1434 |
-
}
|
1435 |
-
|
1436 |
-
if ( 0 === (int) $post_id ) {
|
1437 |
-
return false;
|
1438 |
-
}
|
1439 |
-
|
1440 |
-
/** @global wpdb $wpdb */
|
1441 |
-
global $wpdb;
|
1442 |
-
|
1443 |
-
self::$post_type = $wpdb->get_var( $wpdb->prepare( "SELECT post_type FROM $wpdb->posts WHERE ID = %d", $post_id ) );
|
1444 |
-
|
1445 |
-
return self::$post_type;
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
/**
|
1449 |
-
* Check for post type supports.
|
1450 |
-
*
|
1451 |
-
* @since 2.2.24
|
1452 |
-
* @since 2.2.34 Fix with empty `show_in_rest`.
|
1453 |
-
*
|
1454 |
-
* @return bool
|
1455 |
-
*/
|
1456 |
-
protected static function use_block_editor_for_post_type($post_type) {
|
1457 |
-
|
1458 |
-
$_opts = get_option(self::$init_attrs['options']['register_post_types']);
|
1459 |
-
|
1460 |
-
if ( empty($_opts[$post_type]) ) {
|
1461 |
-
/**
|
1462 |
-
* We don't have info about post type.
|
1463 |
-
*/
|
1464 |
-
return true;
|
1465 |
-
}
|
1466 |
-
|
1467 |
-
if ( empty($_opts[$post_type]['features']['editor']) || (int) $_opts[$post_type]['features']['editor'] == 0 ) {
|
1468 |
-
/**
|
1469 |
-
* Don't start Block Editor support.
|
1470 |
-
* @see `use_block_editor_for_post_type()` in wp-admin\includes\post.php
|
1471 |
-
*/
|
1472 |
-
return false;
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
if ( empty($_opts[$post_type]['show_in_rest']) || (int) $_opts[$post_type]['show_in_rest'] == 0 ) {
|
1476 |
-
/**
|
1477 |
-
* Don't start Block Editor support.
|
1478 |
-
* @see `use_block_editor_for_post_type()` in wp-admin\includes\post.php
|
1479 |
-
*/
|
1480 |
-
return false;
|
1481 |
-
}
|
1482 |
-
|
1483 |
-
return true;
|
1484 |
-
}
|
1485 |
-
}
|
1486 |
-
|
1487 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/class-wpglobus-config-builder.php
DELETED
@@ -1,554 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-config-builder.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! class_exists( 'WPGlobus_Config_Builder' ) ) :
|
10 |
-
|
11 |
-
class WPGlobus_Config_Builder {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @var string|false
|
15 |
-
*/
|
16 |
-
protected $id = false;
|
17 |
-
|
18 |
-
protected $is_run = false;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* May be to use "wpglobus_language" meta (reserved in WPGlobus).
|
22 |
-
*
|
23 |
-
* @todo remove after test
|
24 |
-
*/
|
25 |
-
//protected $language_meta_key = '_wpglobus_builder_language';
|
26 |
-
|
27 |
-
protected $language_cookie = 'wpglobus-builder-language';
|
28 |
-
|
29 |
-
protected $attrs = array();
|
30 |
-
|
31 |
-
protected $__class = null;
|
32 |
-
|
33 |
-
protected $__builder_page = false;
|
34 |
-
|
35 |
-
protected $__is_admin = false;
|
36 |
-
|
37 |
-
protected $language = false;
|
38 |
-
|
39 |
-
protected $default_language;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @since 2.2.11
|
43 |
-
*/
|
44 |
-
public $post_types = array();
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Constructor.
|
48 |
-
*
|
49 |
-
* @param bool $init
|
50 |
-
* @param array $init_attrs
|
51 |
-
*/
|
52 |
-
public function __construct( $init = true, $init_attrs = array() ) {
|
53 |
-
|
54 |
-
if ( isset( $init_attrs['default_language'] ) ) {
|
55 |
-
$this->default_language = $init_attrs['default_language'];
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* @since 2.2.11
|
60 |
-
*/
|
61 |
-
if ( isset( $init_attrs['post_types'] ) ) {
|
62 |
-
$this->post_types = $init_attrs['post_types'];
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( $init ) {
|
66 |
-
|
67 |
-
require_once dirname( __FILE__ ) . '/class-wpglobus-builders.php';
|
68 |
-
/**
|
69 |
-
* @since 2.2.24 added $init_attrs.
|
70 |
-
*/
|
71 |
-
$builder = WPGlobus_Builders::get(true, $init_attrs);
|
72 |
-
|
73 |
-
$this->id = $builder['id'];
|
74 |
-
unset( $builder['id'] );
|
75 |
-
|
76 |
-
if ( $this->id ) {
|
77 |
-
|
78 |
-
$this->attrs['version'] = null;
|
79 |
-
|
80 |
-
foreach ( $builder as $key => $value ) {
|
81 |
-
if ( 'class' === $key ) {
|
82 |
-
$this->__class = $value;
|
83 |
-
} elseif ( 'builder_page' === $key ) {
|
84 |
-
$this->__builder_page = $value;
|
85 |
-
} elseif ( 'is_admin' === $key ) {
|
86 |
-
$this->__is_admin = $value;
|
87 |
-
}
|
88 |
-
$this->attrs[ $key ] = $value;
|
89 |
-
}
|
90 |
-
|
91 |
-
$this->language = $this->get_language();
|
92 |
-
$this->attrs['language'] = $this->language;
|
93 |
-
|
94 |
-
} else {
|
95 |
-
unset( $this->attrs );
|
96 |
-
}
|
97 |
-
} else {
|
98 |
-
|
99 |
-
require_once dirname( __FILE__ ) . '/class-wpglobus-builders.php';
|
100 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
101 |
-
$builder = WPGlobus_Builders::get( false );
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Try to run builder.
|
109 |
-
*
|
110 |
-
* @param string $builder
|
111 |
-
* @param bool $set_run_flag
|
112 |
-
*
|
113 |
-
* @return bool
|
114 |
-
*/
|
115 |
-
public function maybe_run( $builder = '', $set_run_flag = false ) {
|
116 |
-
|
117 |
-
//if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
118 |
-
//return false;
|
119 |
-
//}
|
120 |
-
|
121 |
-
if ( ! $this->id ) {
|
122 |
-
return false;
|
123 |
-
}
|
124 |
-
|
125 |
-
$check_run_flag = true;
|
126 |
-
|
127 |
-
if ( is_bool( $builder ) ) {
|
128 |
-
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIF
|
129 |
-
if ( $builder ) {
|
130 |
-
// @todo
|
131 |
-
} else {
|
132 |
-
$check_run_flag = false;
|
133 |
-
$set_run_flag = false;
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
if ( $check_run_flag && $this->is_run ) {
|
138 |
-
/**
|
139 |
-
* Don't run again.
|
140 |
-
*/
|
141 |
-
return false;
|
142 |
-
}
|
143 |
-
|
144 |
-
if ( '' === $builder ) {
|
145 |
-
$builder = $this->id;
|
146 |
-
}
|
147 |
-
|
148 |
-
if ( ! $builder ) {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
|
152 |
-
if ( $builder !== $this->id ) {
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
if ( $this->is_front() ) {
|
157 |
-
if ( $set_run_flag ) {
|
158 |
-
$this->is_run = true;
|
159 |
-
}
|
160 |
-
|
161 |
-
return true;
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( $this->is_builder_page() ) {
|
165 |
-
if ( $set_run_flag ) {
|
166 |
-
$this->is_run = true;
|
167 |
-
}
|
168 |
-
|
169 |
-
return true;
|
170 |
-
}
|
171 |
-
|
172 |
-
return false;
|
173 |
-
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Get attribute.
|
178 |
-
*
|
179 |
-
* @param string $attr
|
180 |
-
*
|
181 |
-
* @return bool|mixed
|
182 |
-
*/
|
183 |
-
public function get( $attr = 'id' ) {
|
184 |
-
if ( ! $this->id ) {
|
185 |
-
return false;
|
186 |
-
}
|
187 |
-
if ( 'id' === $attr ) {
|
188 |
-
return $this->get_id();
|
189 |
-
}
|
190 |
-
if ( ! empty( $this->attrs[ $attr ] ) ) {
|
191 |
-
return $this->attrs[ $attr ];
|
192 |
-
}
|
193 |
-
|
194 |
-
return false;
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Set builder language.
|
199 |
-
*
|
200 |
-
* @param string $language
|
201 |
-
*/
|
202 |
-
public function set_language( $language = '' ) {
|
203 |
-
if ( ! empty( $language ) ) {
|
204 |
-
$this->language = $language;
|
205 |
-
$this->attrs['language'] = $this->language;
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Get builder language.
|
211 |
-
*
|
212 |
-
* @param int|string $post_id
|
213 |
-
*
|
214 |
-
* @return array|bool|mixed|string
|
215 |
-
*/
|
216 |
-
public function get_language( $post_id = '' ) {
|
217 |
-
|
218 |
-
if ( ! $this->id ) {
|
219 |
-
return false;
|
220 |
-
}
|
221 |
-
|
222 |
-
if ( ! $this->is_builder_page() ) {
|
223 |
-
/**
|
224 |
-
* @todo maybe need to check the matching of $this->language and WPGlobus::Config()->language.
|
225 |
-
* @see Set language for builder in wpglobus\includes\class-wpglobus-config.php
|
226 |
-
*/
|
227 |
-
return $this->language;
|
228 |
-
}
|
229 |
-
|
230 |
-
if ( $this->language ) {
|
231 |
-
return $this->language;
|
232 |
-
}
|
233 |
-
|
234 |
-
/** @global string $pagenow */
|
235 |
-
global $pagenow;
|
236 |
-
|
237 |
-
if ( 'post-new.php' === $pagenow ) {
|
238 |
-
/**
|
239 |
-
* Correctly define language for the 'post-new.php' page.
|
240 |
-
*
|
241 |
-
* @since 2.1.1
|
242 |
-
*/
|
243 |
-
$this->language = $this->default_language;
|
244 |
-
|
245 |
-
return $this->language;
|
246 |
-
}
|
247 |
-
|
248 |
-
$post_id = (int) $post_id;
|
249 |
-
if ( ! $post_id ) {
|
250 |
-
// Post ID not passed..getting from global Post.
|
251 |
-
$global_post = get_post();
|
252 |
-
if ( $global_post instanceof WP_Post ) {
|
253 |
-
$post_id = $global_post->ID;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
$language = false;
|
258 |
-
if ( $post_id ) {
|
259 |
-
$language = get_post_meta( $post_id, $this->get_language_meta_key(), true );
|
260 |
-
}
|
261 |
-
|
262 |
-
if ( ! $language ) {
|
263 |
-
|
264 |
-
if ( empty( $_REQUEST ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
265 |
-
|
266 |
-
if ( empty( $_SERVER['HTTP_REFERER'] ) ) {
|
267 |
-
/**
|
268 |
-
* @todo front-end? check it.
|
269 |
-
*/
|
270 |
-
return false;
|
271 |
-
|
272 |
-
} elseif ( false !== strpos( $_SERVER['HTTP_REFERER'], 'language=' ) ) {
|
273 |
-
$language = explode( 'language=', $_SERVER['HTTP_REFERER'] );
|
274 |
-
$language = $language[1];
|
275 |
-
}
|
276 |
-
} else {
|
277 |
-
|
278 |
-
if ( ! empty( $_REQUEST['language'] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
279 |
-
$language = sanitize_text_field( $_REQUEST['language'] );
|
280 |
-
}
|
281 |
-
|
282 |
-
if ( isset( $_REQUEST[ WPGlobus::get_language_meta_key() ] ) ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
283 |
-
$language = sanitize_text_field( $_REQUEST[ WPGlobus::get_language_meta_key() ] );
|
284 |
-
}
|
285 |
-
}
|
286 |
-
}
|
287 |
-
|
288 |
-
if ( ! $language ) {
|
289 |
-
|
290 |
-
if ( isset( $_REQUEST['post'] ) && 0 !== (int) $_REQUEST['post'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
291 |
-
|
292 |
-
$language = get_post_meta( $_REQUEST['post'], $this->get_language_meta_key(), true ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
293 |
-
|
294 |
-
} elseif ( isset( $_REQUEST['id'] ) && 0 !== (int) $_REQUEST['id'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Case when post in draft status is autosaved.
|
298 |
-
*/
|
299 |
-
$language = get_post_meta( $_REQUEST['id'], $this->get_language_meta_key(), true ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
300 |
-
|
301 |
-
} elseif ( isset( $_SERVER['REQUEST_URI'] ) ) {
|
302 |
-
|
303 |
-
/**
|
304 |
-
* See also the Update action in @see \WPGlobus_Builders
|
305 |
-
*/
|
306 |
-
$_continue = false;
|
307 |
-
if ( isset( $GLOBALS['WPGlobus'] ) && ! empty( $GLOBALS['WPGlobus']['post_type'] ) ) {
|
308 |
-
$_continue = true;
|
309 |
-
}
|
310 |
-
if ( false !== strpos( $_SERVER['REQUEST_URI'], '/wp-json/wp/v2/posts/' )
|
311 |
-
|| false !== strpos( $_SERVER['REQUEST_URI'], '/wp-json/wp/v2/pages/' )
|
312 |
-
|| $_continue ) {
|
313 |
-
/**
|
314 |
-
* Case when post status was changed ( draft->publish or publish->draft ) in Gutenberg.
|
315 |
-
*
|
316 |
-
* @see \WPGlobus_Builders::is_gutenberg()
|
317 |
-
*/
|
318 |
-
if ( isset( $GLOBALS['WPGlobus'] ) && ! empty( $GLOBALS['WPGlobus']['post_id'] ) ) {
|
319 |
-
$post_id = $GLOBALS['WPGlobus']['post_id'];
|
320 |
-
} else {
|
321 |
-
$_request_uri = explode( '/', $_SERVER['REQUEST_URI'] );
|
322 |
-
|
323 |
-
$post_id = end( $_request_uri );
|
324 |
-
$post_id = preg_replace( '/\?.*/', '', $post_id );
|
325 |
-
}
|
326 |
-
|
327 |
-
if ( 0 !== (int) $post_id ) {
|
328 |
-
$language = get_post_meta( $post_id, $this->get_language_meta_key(), true ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
329 |
-
}
|
330 |
-
}
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
if ( ! $language ) {
|
335 |
-
if ( $this->get_post_id() ) {
|
336 |
-
$language = get_post_meta( $this->get_post_id(), $this->get_language_meta_key(), true );
|
337 |
-
}
|
338 |
-
}
|
339 |
-
|
340 |
-
if ( ! $language && ! empty( $this->default_language ) ) {
|
341 |
-
/**
|
342 |
-
* Possible options when the language is not defined:
|
343 |
-
* - new post, post-new.php page;
|
344 |
-
*/
|
345 |
-
$language = $this->default_language;
|
346 |
-
/**
|
347 |
-
* @todo test point if was incorrect setting of $language.
|
348 |
-
*/
|
349 |
-
|
350 |
-
}
|
351 |
-
|
352 |
-
$this->language = $language;
|
353 |
-
|
354 |
-
return $language;
|
355 |
-
|
356 |
-
}
|
357 |
-
|
358 |
-
/**
|
359 |
-
* Check if builder is run.
|
360 |
-
*/
|
361 |
-
public function is_run() {
|
362 |
-
if ( ! $this->id ) {
|
363 |
-
return false;
|
364 |
-
}
|
365 |
-
|
366 |
-
return $this->is_run;
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* Check if builder is run.
|
371 |
-
*/
|
372 |
-
public function is_running() {
|
373 |
-
return $this->is_run();
|
374 |
-
}
|
375 |
-
|
376 |
-
/**
|
377 |
-
* Check if builder is in admin.
|
378 |
-
*/
|
379 |
-
public function is_admin() {
|
380 |
-
if ( ! $this->id ) {
|
381 |
-
return false;
|
382 |
-
}
|
383 |
-
|
384 |
-
return $this->__is_admin;
|
385 |
-
}
|
386 |
-
|
387 |
-
/**
|
388 |
-
* Check if builder is in front.
|
389 |
-
*/
|
390 |
-
public function is_front() {
|
391 |
-
if ( ! $this->id ) {
|
392 |
-
return false;
|
393 |
-
}
|
394 |
-
|
395 |
-
return ! $this->__is_admin;
|
396 |
-
}
|
397 |
-
|
398 |
-
/**
|
399 |
-
* Get builder ID.
|
400 |
-
*/
|
401 |
-
public function get_id() {
|
402 |
-
return $this->id;
|
403 |
-
}
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Get post ID.
|
407 |
-
*/
|
408 |
-
public function get_post_id() {
|
409 |
-
if ( isset( $this->attrs['post_id'] ) && (int) $this->attrs['post_id'] > 0 ) {
|
410 |
-
return $this->attrs['post_id'];
|
411 |
-
}
|
412 |
-
|
413 |
-
return false;
|
414 |
-
}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* Get builder class.
|
418 |
-
*/
|
419 |
-
public function get_class() {
|
420 |
-
if ( ! $this->id ) {
|
421 |
-
return false;
|
422 |
-
}
|
423 |
-
|
424 |
-
return $this->__class;
|
425 |
-
}
|
426 |
-
|
427 |
-
/**
|
428 |
-
*
|
429 |
-
*/
|
430 |
-
public function get_language_meta_key() {
|
431 |
-
if ( ! $this->id ) {
|
432 |
-
return false;
|
433 |
-
}
|
434 |
-
|
435 |
-
return WPGlobus::get_language_meta_key();
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
*
|
440 |
-
*/
|
441 |
-
public function get_cookie_name() {
|
442 |
-
if ( ! $this->id ) {
|
443 |
-
return false;
|
444 |
-
}
|
445 |
-
|
446 |
-
return $this->language_cookie;
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* @param string $cookie_name
|
451 |
-
*
|
452 |
-
* @return bool|null
|
453 |
-
*/
|
454 |
-
public function get_cookie( $cookie_name = '' ) {
|
455 |
-
|
456 |
-
if ( ! $this->id ) {
|
457 |
-
return false;
|
458 |
-
}
|
459 |
-
|
460 |
-
static $_cookie_value = null;
|
461 |
-
|
462 |
-
if ( is_null( $_cookie_value ) ) {
|
463 |
-
if ( empty( $cookie_name ) ) {
|
464 |
-
$cookie_name = $this->get_cookie_name();
|
465 |
-
}
|
466 |
-
if ( empty( $_COOKIE[ $cookie_name ] ) ) {
|
467 |
-
$_cookie_value = false;
|
468 |
-
} else {
|
469 |
-
$_cookie_value = $_COOKIE[ $cookie_name ];
|
470 |
-
}
|
471 |
-
}
|
472 |
-
|
473 |
-
return $_cookie_value;
|
474 |
-
}
|
475 |
-
|
476 |
-
/**
|
477 |
-
* Check if current page is builder's page.
|
478 |
-
*/
|
479 |
-
public function is_builder_page() {
|
480 |
-
if ( ! $this->id ) {
|
481 |
-
return false;
|
482 |
-
}
|
483 |
-
|
484 |
-
return $this->__builder_page;
|
485 |
-
}
|
486 |
-
|
487 |
-
/**
|
488 |
-
* Get all builder data.
|
489 |
-
*/
|
490 |
-
public function get_data() {
|
491 |
-
|
492 |
-
if ( ! $this->id ) {
|
493 |
-
return false;
|
494 |
-
}
|
495 |
-
|
496 |
-
$data = array();
|
497 |
-
$data['id'] = $this->get_id();
|
498 |
-
|
499 |
-
if ( empty( $data['id'] ) ) {
|
500 |
-
return false;
|
501 |
-
}
|
502 |
-
|
503 |
-
if ( ! empty( $this->attrs ) ) {
|
504 |
-
foreach ( $this->attrs as $key => $value ) {
|
505 |
-
$data[ $key ] = $value;
|
506 |
-
}
|
507 |
-
}
|
508 |
-
|
509 |
-
$data['language'] = $this->get_language();
|
510 |
-
|
511 |
-
return $data;
|
512 |
-
|
513 |
-
}
|
514 |
-
|
515 |
-
/**
|
516 |
-
* If $this->default_language was not set, returns `null`.
|
517 |
-
* If the language is equal to the default_language, returns `true`,
|
518 |
-
* otherwise it returns `false`.
|
519 |
-
*
|
520 |
-
* @since 2.2.6
|
521 |
-
*
|
522 |
-
* @return null|boolean
|
523 |
-
*/
|
524 |
-
public function is_default_language() {
|
525 |
-
|
526 |
-
if ( empty( $this->default_language ) ) {
|
527 |
-
return null;
|
528 |
-
}
|
529 |
-
if ( $this->language === $this->default_language ) {
|
530 |
-
return true;
|
531 |
-
}
|
532 |
-
|
533 |
-
return false;
|
534 |
-
}
|
535 |
-
|
536 |
-
/**
|
537 |
-
* Set multilingual fields.
|
538 |
-
*
|
539 |
-
* @param array $multilingual_fields
|
540 |
-
*/
|
541 |
-
public function set_multilingual_fields( $multilingual_fields ) {
|
542 |
-
|
543 |
-
if ( ! isset( $this->attrs ) ) {
|
544 |
-
return;
|
545 |
-
}
|
546 |
-
|
547 |
-
if ( is_array( $multilingual_fields ) && ! empty( $multilingual_fields ) ) {
|
548 |
-
$this->attrs['multilingualFields'] = array_merge( $this->attrs['multilingualFields'], $multilingual_fields );
|
549 |
-
}
|
550 |
-
}
|
551 |
-
|
552 |
-
}
|
553 |
-
|
554 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/elementor/class-wpglobus-elementor-front.php
DELETED
@@ -1,353 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-elementor-front.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Elementor
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @see elementor\core\files\css\post.php
|
11 |
-
*/
|
12 |
-
use Elementor\Core\Files\CSS\Post as Post_CSS;
|
13 |
-
|
14 |
-
if ( ! class_exists( 'WPGlobus_Elementor_Front' ) ) :
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Class WPGlobus_Elementor_Front.
|
18 |
-
*/
|
19 |
-
class WPGlobus_Elementor_Front {
|
20 |
-
|
21 |
-
public static $file_prefix = 'post-';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @since 2.1.15
|
25 |
-
*/
|
26 |
-
protected static $post_css_meta_key = null;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @since 2.1.15
|
30 |
-
*/
|
31 |
-
protected static $elementor_data_meta_key = null;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @since 2.1.15
|
35 |
-
*/
|
36 |
-
protected static $elementor_css_meta_key = null;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Init.
|
40 |
-
*/
|
41 |
-
public static function init($attrs) {
|
42 |
-
|
43 |
-
if ( ! empty($attrs['post_css_meta_key']) ) {
|
44 |
-
self::$post_css_meta_key = $attrs['post_css_meta_key'];
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( ! empty($attrs['elementor_data_meta_key']) ) {
|
48 |
-
self::$elementor_data_meta_key = $attrs['elementor_data_meta_key'];
|
49 |
-
}
|
50 |
-
|
51 |
-
if ( ! empty($attrs['elementor_css_meta_key']) ) {
|
52 |
-
self::$elementor_css_meta_key = $attrs['elementor_css_meta_key'];
|
53 |
-
}
|
54 |
-
|
55 |
-
add_filter( 'get_post_metadata', array( __CLASS__, 'filter__get_metadata' ), 5, 4 );
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @since 2.1.15
|
59 |
-
*/
|
60 |
-
add_filter( 'update_post_metadata', array( __CLASS__, 'filter__update_metadata' ), 5, 5 );
|
61 |
-
|
62 |
-
/**
|
63 |
-
* @since 2.1.15
|
64 |
-
*/
|
65 |
-
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'on__enqueue_styles' ), 20 );
|
66 |
-
|
67 |
-
/**
|
68 |
-
* @todo may be use elementor action instead of `wp_enqueue_scripts`.
|
69 |
-
*/
|
70 |
-
//add_action( 'elementor/frontend/after_enqueue_styles', array( __CLASS__, 'on__enqueue_styles' ) );
|
71 |
-
|
72 |
-
/**
|
73 |
-
* @since 2.1.13
|
74 |
-
* @see elementor\core\files\base.php
|
75 |
-
*/
|
76 |
-
add_action( 'elementor/files/file_name', array( __CLASS__, 'filter__elementor_files_file_name' ), 5, 4 );
|
77 |
-
|
78 |
-
/**
|
79 |
-
* @since 2.2.11
|
80 |
-
* @W.I.P
|
81 |
-
* @todo maybe we need to use these filters.
|
82 |
-
*/
|
83 |
-
//add_filter( 'elementor/editor/localize_settings', array( __CLASS__, 'filter__localize_settings' ), 10, 2 );
|
84 |
-
//add_action( 'elementor/editor/after_enqueue_scripts', array( __CLASS__, 'filter__localize_settings' ) );
|
85 |
-
|
86 |
-
/**
|
87 |
-
* @since 2.3.6
|
88 |
-
*/
|
89 |
-
add_filter( 'wpglobus_plus_publish_template_include_handler', array( __CLASS__, 'filter__template_include_handler' ) );
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @since 2.1.15
|
94 |
-
*/
|
95 |
-
public static function on__enqueue_styles() {
|
96 |
-
|
97 |
-
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
98 |
-
return;
|
99 |
-
}
|
100 |
-
|
101 |
-
$css_file = new Post_CSS( get_the_ID() );
|
102 |
-
|
103 |
-
/**
|
104 |
-
* @see elementor\core\files\css\post.php
|
105 |
-
*/
|
106 |
-
$handle = 'elementor-post-' . $css_file->get_post_id() .'-' . WPGlobus::Config()->language;
|
107 |
-
|
108 |
-
/**
|
109 |
-
* @see elementor\core\files\base.php
|
110 |
-
*/
|
111 |
-
$url = $css_file->get_url();
|
112 |
-
|
113 |
-
wp_register_style(
|
114 |
-
$handle,
|
115 |
-
$url,
|
116 |
-
array(),
|
117 |
-
'wpglobus-' . WPGLOBUS_VERSION
|
118 |
-
|
119 |
-
);
|
120 |
-
wp_enqueue_style($handle);
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Filters the file name.
|
125 |
-
*
|
126 |
-
* @since 2.1.13
|
127 |
-
* @since 2.3.3 Handle multiple file names.
|
128 |
-
*
|
129 |
-
* @param string $file_name CSS file name.
|
130 |
-
* @param object $instance The file instance, which inherits Elementor\Core\Files
|
131 |
-
*/
|
132 |
-
public static function filter__elementor_files_file_name( $file_name, $instance ) {
|
133 |
-
|
134 |
-
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
135 |
-
return $file_name;
|
136 |
-
}
|
137 |
-
|
138 |
-
if ( false === strpos( $file_name, self::$file_prefix ) ) {
|
139 |
-
return $file_name;
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* @since 2.3.3 @W.I.P May be check out for global post ID.
|
144 |
-
*/
|
145 |
-
//global $post;
|
146 |
-
//if ( ! $post instanceof WP_Post ) {
|
147 |
-
//return $file_name;
|
148 |
-
//}
|
149 |
-
//$file_unique_part = str_replace( self::$file_prefix, '', $file_name );
|
150 |
-
//if ( false === strpos( $file_unique_part, $post->ID . '.' ) ) {
|
151 |
-
//return $file_name;
|
152 |
-
//}
|
153 |
-
|
154 |
-
static $_file_names = null;
|
155 |
-
|
156 |
-
if ( ! is_null( $_file_names ) && ! empty( $_file_names[$file_name] ) ) {
|
157 |
-
return $_file_names[$file_name];
|
158 |
-
}
|
159 |
-
|
160 |
-
$_file_name = $file_name;
|
161 |
-
if ( false !== strpos( $file_name, '.css' ) ) {
|
162 |
-
$_file_name = str_replace( '.css', '-' . WPGlobus::Config()->language . '.css', $file_name );
|
163 |
-
}
|
164 |
-
|
165 |
-
$_file_names[$file_name] = $_file_name;
|
166 |
-
|
167 |
-
return $_file_name;
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Get meta callback.
|
172 |
-
*
|
173 |
-
* @scope front.
|
174 |
-
* @param $check
|
175 |
-
* @param $object_id
|
176 |
-
* @param $meta_key
|
177 |
-
* @param $single
|
178 |
-
*
|
179 |
-
* @return string
|
180 |
-
*/
|
181 |
-
public static function filter__get_metadata(
|
182 |
-
$check, $object_id, $meta_key, /** @noinspection PhpUnusedParameterInspection */
|
183 |
-
$single
|
184 |
-
) {
|
185 |
-
|
186 |
-
if ( self::$elementor_data_meta_key === $meta_key ) {
|
187 |
-
|
188 |
-
$meta_cache = wp_cache_get( $object_id, 'post_meta' );
|
189 |
-
|
190 |
-
if ( isset( $meta_cache[ $meta_key ] ) && isset( $meta_cache[ $meta_key ][0] ) ) {
|
191 |
-
|
192 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
193 |
-
$_value = '';
|
194 |
-
|
195 |
-
if ( WPGlobus_Core::has_translations( $meta_cache[ $meta_key ][0] ) ) {
|
196 |
-
$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], WPGlobus::Config()->language );
|
197 |
-
} else {
|
198 |
-
$_value = $meta_cache[ $meta_key ][0];
|
199 |
-
}
|
200 |
-
|
201 |
-
return $_value;
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
} elseif ( self::$elementor_css_meta_key === $meta_key ) {
|
206 |
-
|
207 |
-
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
208 |
-
return $check;
|
209 |
-
}
|
210 |
-
|
211 |
-
$meta_cache = wp_cache_get( $object_id, 'post_meta' );
|
212 |
-
|
213 |
-
if ( isset( $meta_cache[ self::$post_css_meta_key ] ) && isset( $meta_cache[ self::$post_css_meta_key ][0] ) ) {
|
214 |
-
|
215 |
-
$_value = '';
|
216 |
-
|
217 |
-
$has_translations = WPGlobus_Core::has_translations( $meta_cache[ self::$post_css_meta_key ][0] );
|
218 |
-
|
219 |
-
if ( $has_translations ) {
|
220 |
-
$_value = WPGlobus_Core::text_filter( $meta_cache[ self::$post_css_meta_key ][0], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
|
221 |
-
}
|
222 |
-
|
223 |
-
if ( ! empty($_value) ) {
|
224 |
-
$_value = maybe_unserialize( $_value );
|
225 |
-
|
226 |
-
/**
|
227 |
-
* @todo may be better return value for default language.
|
228 |
-
*/
|
229 |
-
//if ( isset( $meta_cache[ self::$elementor_css_meta_key ] ) && isset( $meta_cache[ self::$elementor_css_meta_key ][0] ) ) {
|
230 |
-
//$_value = maybe_unserialize( $meta_cache[ self::$elementor_css_meta_key ] );
|
231 |
-
//}
|
232 |
-
}
|
233 |
-
|
234 |
-
return $_value;
|
235 |
-
}
|
236 |
-
|
237 |
-
}
|
238 |
-
|
239 |
-
return $check;
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* @since 2.1.15
|
244 |
-
*/
|
245 |
-
public static function filter__update_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
|
246 |
-
|
247 |
-
if ( self::$elementor_css_meta_key != $meta_key ) {
|
248 |
-
return $check;
|
249 |
-
}
|
250 |
-
|
251 |
-
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
252 |
-
return $check;
|
253 |
-
}
|
254 |
-
|
255 |
-
$meta_cache = wp_cache_get( $object_id, 'post_meta' );
|
256 |
-
|
257 |
-
if ( isset( $meta_cache[ self::$post_css_meta_key ] ) && isset( $meta_cache[ self::$post_css_meta_key ][0] ) ) {
|
258 |
-
|
259 |
-
$new_value = $check;
|
260 |
-
$_tr = array();
|
261 |
-
|
262 |
-
foreach( WPGlobus::Config()->enabled_languages as $language ) {
|
263 |
-
$_s = WPGlobus_Core::text_filter( $meta_cache[ self::$post_css_meta_key ][0], $language, WPGlobus::RETURN_EMPTY );
|
264 |
-
if ( ! empty( $_s ) ) {
|
265 |
-
$_tr[$language] = $_s;
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* Fix for $meta_value[0].
|
271 |
-
*/
|
272 |
-
$meta_value[0] = '';
|
273 |
-
|
274 |
-
$_tr[WPGlobus::Config()->language] = maybe_serialize($meta_value);
|
275 |
-
$new_value = WPGlobus_Utils::build_multilingual_string($_tr);
|
276 |
-
|
277 |
-
if ( $new_value != $check ) {
|
278 |
-
|
279 |
-
global $wpdb;
|
280 |
-
|
281 |
-
$meta_value = $new_value;
|
282 |
-
$table = _get_meta_table('post');
|
283 |
-
$data = compact( 'meta_value' );
|
284 |
-
$where = array(
|
285 |
-
'post_id' => $object_id,
|
286 |
-
'meta_key' => self::$post_css_meta_key
|
287 |
-
);
|
288 |
-
|
289 |
-
$result = $wpdb->update( $table, $data, $where );
|
290 |
-
|
291 |
-
if ( ! $result ) {
|
292 |
-
return false;
|
293 |
-
}
|
294 |
-
|
295 |
-
}
|
296 |
-
|
297 |
-
return $new_value;
|
298 |
-
|
299 |
-
} else {
|
300 |
-
|
301 |
-
/**
|
302 |
-
* $meta_cache[ $meta_key ] is undefined.
|
303 |
-
*/
|
304 |
-
|
305 |
-
global $wpdb;
|
306 |
-
|
307 |
-
$_tr = array();
|
308 |
-
$_tr[WPGlobus::Config()->language] = maybe_serialize($meta_value);
|
309 |
-
$new_value = WPGlobus_Utils::build_multilingual_string($_tr);
|
310 |
-
|
311 |
-
$table = _get_meta_table('post');
|
312 |
-
|
313 |
-
$result = $wpdb->insert(
|
314 |
-
$table,
|
315 |
-
array(
|
316 |
-
'post_id' => $object_id,
|
317 |
-
'meta_key' => self::$post_css_meta_key,
|
318 |
-
'meta_value' => $new_value
|
319 |
-
),
|
320 |
-
array(
|
321 |
-
'%d',
|
322 |
-
'%s',
|
323 |
-
'%s'
|
324 |
-
)
|
325 |
-
);
|
326 |
-
|
327 |
-
if ( ! $result ) {
|
328 |
-
return false;
|
329 |
-
}
|
330 |
-
|
331 |
-
return $new_value;
|
332 |
-
}
|
333 |
-
|
334 |
-
return $check;
|
335 |
-
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* @since 2.3.6
|
340 |
-
*/
|
341 |
-
public static function filter__template_include_handler($handler) {
|
342 |
-
/**
|
343 |
-
* Don't fire `template_include` filter with active Elementor
|
344 |
-
* to prevent `The preview could not be loaded` for language in draft status.
|
345 |
-
*/
|
346 |
-
if ( empty( $_GET['elementor-preview'] ) ) {
|
347 |
-
return $handler;
|
348 |
-
}
|
349 |
-
return false;
|
350 |
-
}
|
351 |
-
} // end class WPGlobus_Elementor_Front.
|
352 |
-
|
353 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/elementor/class-wpglobus-elementor-update-post.php
DELETED
@@ -1,118 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-elementor-update-post.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Elementor
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_elementor_Update_Post.
|
11 |
-
*/
|
12 |
-
if ( ! class_exists( 'WPGlobus_elementor_Update_Post' ) ) :
|
13 |
-
|
14 |
-
// phpcs:ignore PEAR.NamingConventions
|
15 |
-
class WPGlobus_elementor_Update_Post extends WPGlobus_Builder_Update_Post {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Constructor.
|
19 |
-
*/
|
20 |
-
public function __construct() {
|
21 |
-
|
22 |
-
parent::__construct( 'elementor' );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
26 |
-
*/
|
27 |
-
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @todo incorrect the saving post in extra languages with priority = 10
|
31 |
-
*/
|
32 |
-
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Callback for 'wp_insert_post_data'.
|
38 |
-
*
|
39 |
-
* @param array $data
|
40 |
-
* @param array $postarr
|
41 |
-
*
|
42 |
-
* @return mixed
|
43 |
-
*/
|
44 |
-
public function filter__wp_insert_post_data( $data, $postarr ) {
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Prevent to filter disabled post type.
|
48 |
-
*
|
49 |
-
* @since 2.1.4
|
50 |
-
*/
|
51 |
-
if ( in_array( $data['post_type'], WPGlobus::Config()->disabled_entities, true ) ) {
|
52 |
-
return $data;
|
53 |
-
}
|
54 |
-
|
55 |
-
global $wpdb;
|
56 |
-
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d AND post_type = %s LIMIT 1", $postarr['ID'], $postarr['post_type'] ) );
|
57 |
-
|
58 |
-
$fields = array();
|
59 |
-
if ( isset( $postarr['post_title'] ) ) {
|
60 |
-
$fields['post_title'] = $postarr['post_title'];
|
61 |
-
}
|
62 |
-
|
63 |
-
if ( isset( $postarr['post_content'] ) ) {
|
64 |
-
$fields['post_content'] = $postarr['post_content'];
|
65 |
-
}
|
66 |
-
|
67 |
-
if ( isset( $postarr['post_excerpt'] ) ) {
|
68 |
-
$fields['post_excerpt'] = $postarr['post_excerpt'];
|
69 |
-
}
|
70 |
-
|
71 |
-
$builder_language = WPGlobus::Config()->builder->get_language();
|
72 |
-
|
73 |
-
if ( empty( $builder_language ) ) {
|
74 |
-
|
75 |
-
if ( empty( $postarr[ WPGlobus::get_language_meta_key() ] ) ) {
|
76 |
-
$builder_language = WPGlobus::Config()->default_language;
|
77 |
-
} else {
|
78 |
-
$builder_language = $postarr[ WPGlobus::get_language_meta_key() ];
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
foreach ( $fields as $field => $value ) {
|
83 |
-
|
84 |
-
$tr = array();
|
85 |
-
|
86 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
87 |
-
|
88 |
-
if ( $lang === $builder_language ) {
|
89 |
-
|
90 |
-
$text = $value;
|
91 |
-
if ( WPGlobus_Core::has_translations( $value ) ) {
|
92 |
-
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
93 |
-
}
|
94 |
-
if ( ! empty( $text ) ) {
|
95 |
-
$tr[ $lang ] = $text;
|
96 |
-
}
|
97 |
-
} else {
|
98 |
-
if ( isset( $_post->$field ) ) {
|
99 |
-
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
100 |
-
if ( ! empty( $text ) ) {
|
101 |
-
$tr[ $lang ] = $text;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
endforeach;
|
107 |
-
|
108 |
-
$data[ $field ] = WPGlobus_Utils::build_multilingual_string( $tr );
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
return $data;
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/elementor/class-wpglobus-elementor.php
DELETED
@@ -1,483 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-elementor.php
|
4 |
-
*
|
5 |
-
* @since 2.2.31 We are providing support for `External File` only. @see elementor\core\files\css\base.php::use_external_file().
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Builders\Elementor
|
8 |
-
* @author Alex Gor(alexgff)
|
9 |
-
*/
|
10 |
-
|
11 |
-
if ( file_exists( WP_PLUGIN_DIR . '/elementor/core/files/manager.php' ) ) {
|
12 |
-
require_once( WP_PLUGIN_DIR . '/elementor/core/files/manager.php' );
|
13 |
-
}
|
14 |
-
|
15 |
-
if ( ! class_exists( 'WPGlobus_Elementor' ) ) :
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Class WPGlobus_Elementor.
|
19 |
-
*/
|
20 |
-
class WPGlobus_Elementor extends WPGlobus_Builder {
|
21 |
-
|
22 |
-
protected $base_redirect_url = '';
|
23 |
-
|
24 |
-
protected $post_content = null;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @since 2.1.15
|
28 |
-
*/
|
29 |
-
protected static $post_css_meta_key = null;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @since 2.1.15
|
33 |
-
*/
|
34 |
-
protected static $elementor_data_meta_key = null;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Constructor.
|
38 |
-
*/
|
39 |
-
public function __construct() {
|
40 |
-
|
41 |
-
parent::__construct( 'elementor' );
|
42 |
-
|
43 |
-
$_post_css_meta_key = WPGlobus::Config()->builder->get('post_css_meta_key');
|
44 |
-
if ( ! empty( $_post_css_meta_key ) ) {
|
45 |
-
self::$post_css_meta_key = $_post_css_meta_key;
|
46 |
-
}
|
47 |
-
|
48 |
-
$_elementor_data_meta_key = WPGlobus::Config()->builder->get('elementor_data_meta_key');
|
49 |
-
if ( ! empty( $_elementor_data_meta_key ) ) {
|
50 |
-
self::$elementor_data_meta_key = $_elementor_data_meta_key;
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( isset( $_GET['action'] ) && 'elementor' === $_GET['action'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
54 |
-
/**
|
55 |
-
* @see wp-includes/revision.php
|
56 |
-
*/
|
57 |
-
$post_id = $_GET['post']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
58 |
-
if ( (int) $post_id > 0 ) {
|
59 |
-
$revision = wp_get_post_autosave( $post_id );
|
60 |
-
if ( is_object( $revision ) ) {
|
61 |
-
wp_delete_post_revision( $revision->ID );
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
68 |
-
* @todo remove after test.
|
69 |
-
*/
|
70 |
-
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
71 |
-
|
72 |
-
add_filter( 'get_post_metadata', array( $this, 'filter__post_metadata' ), 13, 4 );
|
73 |
-
|
74 |
-
// @todo may be need this filter for admin, @see includes\builders\elementor\class-wpglobus-elementor-front.php
|
75 |
-
//add_filter( 'update_post_metadata', array( $this, 'filter__update_metadata' ), 5, 5 );
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Elementor editor footer.
|
79 |
-
*
|
80 |
-
* @see_file elementor\includes\editor.php
|
81 |
-
*/
|
82 |
-
add_action( 'elementor/editor/footer', array( $this, 'on__elementor_footer' ), 100 );
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @since 2.2.11
|
86 |
-
* @W.I.P
|
87 |
-
* @see meta classic-editor-remember = block-editor OR classic-editor
|
88 |
-
* @todo maybe to use `wp_footer` action instead of `elementor/editor/footer`.
|
89 |
-
*/
|
90 |
-
//add_action( 'wp_footer', array( $this, 'on__elementor_footer' ), 100 );
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @since 2.2.11
|
94 |
-
* @W.I.P
|
95 |
-
* @todo maybe useful
|
96 |
-
*/
|
97 |
-
//add_filter( 'elementor/editor/localize_settings', array( $this, 'on__localize_settings' ), 10, 2 );
|
98 |
-
//add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'on__localize_settings' ) );
|
99 |
-
|
100 |
-
/**
|
101 |
-
* AJAX handling.
|
102 |
-
*/
|
103 |
-
if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
104 |
-
if ( 'elementor_ajax' == $_POST['action'] && false !== strpos($_POST['actions'], '"action":"save_builder"') ) {
|
105 |
-
if ( class_exists( '\Elementor\Core\Files\Manager' ) ) {
|
106 |
-
/**
|
107 |
-
* Clear Elementor cache and WPGlobus css meta.
|
108 |
-
* @since 2.1.15
|
109 |
-
*/
|
110 |
-
$_fm = new \Elementor\Core\Files\Manager;
|
111 |
-
$_fm->clear_cache();
|
112 |
-
if ( ! is_null(self::$post_css_meta_key) ) {
|
113 |
-
update_post_meta( WPGlobus::Config()->builder->get('post_id'), self::$post_css_meta_key, '' );
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( is_admin() ) {
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @since 2.2.31
|
123 |
-
*/
|
124 |
-
add_action( 'admin_notices', array( $this, 'on__admin_notice' ) );
|
125 |
-
|
126 |
-
add_filter( 'the_post', array( $this, 'filter__the_post' ), 5 );
|
127 |
-
|
128 |
-
/**
|
129 |
-
* @see_file elementor\core\base\document.php
|
130 |
-
*/
|
131 |
-
add_filter( 'elementor/document/urls/edit', array( $this, 'filter__url' ), 5, 2 );
|
132 |
-
|
133 |
-
/**
|
134 |
-
* @see_file elementor\core\base\document.php
|
135 |
-
*/
|
136 |
-
add_filter( 'elementor/document/urls/exit_to_dashboard', array( $this, 'filter__url' ), 5, 2 );
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Filter Preview Button link in elementor side panel.
|
140 |
-
*
|
141 |
-
* @see_file elementor\core\base\document.php
|
142 |
-
*/
|
143 |
-
add_filter( 'elementor/document/urls/wp_preview', array( $this, 'filter__preview_url' ), 5, 2 );
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Filter for URL in elementor-preview-iframe.
|
147 |
-
*
|
148 |
-
* @see_file elementor\core\base\document.php
|
149 |
-
*/
|
150 |
-
add_filter( 'elementor/document/urls/preview', array( $this, 'filter__preview_url' ), 5, 2 );
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Filters the editor localized settings.
|
154 |
-
*
|
155 |
-
* @since 2.2.6
|
156 |
-
*
|
157 |
-
* @see_file elementor\includes\editor.php
|
158 |
-
*/
|
159 |
-
add_filter( 'elementor/editor/localize_settings', array( $this, 'filter__localize_settings' ), 5, 2 );
|
160 |
-
|
161 |
-
}
|
162 |
-
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Localize editor settings.
|
167 |
-
*
|
168 |
-
* Filters the editor localized settings.
|
169 |
-
*
|
170 |
-
* @since 2.2.6
|
171 |
-
*
|
172 |
-
* @param array $localized_settings Localized settings.
|
173 |
-
* @param int $post_id The ID of the current post being edited.
|
174 |
-
*
|
175 |
-
* @return array
|
176 |
-
*/
|
177 |
-
public function filter__localize_settings( $localized_settings, $post_id ) {
|
178 |
-
|
179 |
-
if ( WPGlobus::Config()->builder->is_default_language() ) {
|
180 |
-
return $localized_settings;
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* @since 2.2.31
|
185 |
-
*/
|
186 |
-
if ( 'external' !== WPGlobus::Config()->builder->get('elementor_css_print_method') ) {
|
187 |
-
return $localized_settings;
|
188 |
-
}
|
189 |
-
|
190 |
-
$url = get_permalink( $post_id );
|
191 |
-
|
192 |
-
$localized_settings['document']['urls']['permalink'] = WPGlobus_Utils::localize_url( $url, WPGlobus::Config()->builder->get_language() );
|
193 |
-
|
194 |
-
return $localized_settings;
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* To avoid output content with language marks from $post->post_content field on elementor builder page
|
199 |
-
* if "_elementor_data" meta has not content in extra language.
|
200 |
-
*
|
201 |
-
* @param WP_Post $object
|
202 |
-
*
|
203 |
-
* @return WP_Post
|
204 |
-
*/
|
205 |
-
public function filter__the_post( $object ) {
|
206 |
-
|
207 |
-
if ( 'post.php' !== WPGlobus::Config()->builder->get( 'pagenow' ) ) {
|
208 |
-
return $object;
|
209 |
-
}
|
210 |
-
|
211 |
-
if ( is_null( $this->post_content ) ) {
|
212 |
-
$this->post_content = $object->post_content;
|
213 |
-
}
|
214 |
-
|
215 |
-
$_post = clone( $object );
|
216 |
-
$_post->post_content = WPGlobus_Core::text_filter( $this->post_content, WPGlobus::Config()->builder->get_language(), WPGlobus::RETURN_EMPTY );
|
217 |
-
|
218 |
-
/**
|
219 |
-
* @see \wp-includes\cache.php
|
220 |
-
*/
|
221 |
-
wp_cache_replace( $object->ID, $_post, 'posts' );
|
222 |
-
|
223 |
-
return $object;
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
-
/**
|
228 |
-
* @todo W.I.P
|
229 |
-
*/
|
230 |
-
public static function filter__update_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
|
231 |
-
if ( '_elementor_css' != $meta_key ) {
|
232 |
-
return $check;
|
233 |
-
}
|
234 |
-
return $check;
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Get meta callback.
|
239 |
-
*
|
240 |
-
* @param $check
|
241 |
-
* @param $object_id
|
242 |
-
* @param $meta_key
|
243 |
-
* @param $single
|
244 |
-
*
|
245 |
-
* @return string
|
246 |
-
*/
|
247 |
-
public static function filter__post_metadata(
|
248 |
-
$check, $object_id, $meta_key, /** @noinspection PhpUnusedParameterInspection */
|
249 |
-
$single
|
250 |
-
) {
|
251 |
-
|
252 |
-
if ( self::$elementor_data_meta_key === $meta_key ) {
|
253 |
-
|
254 |
-
$meta_cache = wp_cache_get( $object_id, 'post_meta' );
|
255 |
-
|
256 |
-
if ( is_admin() ) {
|
257 |
-
|
258 |
-
if ( isset( $meta_cache[ $meta_key ] ) && isset( $meta_cache[ $meta_key ][0] ) ) {
|
259 |
-
|
260 |
-
$_value = '';
|
261 |
-
|
262 |
-
if ( WPGlobus_Core::has_translations( $meta_cache[ $meta_key ][0] ) ) {
|
263 |
-
$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], WPGlobus::Config()->builder->get_language() );
|
264 |
-
} else {
|
265 |
-
$_value = $meta_cache[ $meta_key ][0];
|
266 |
-
}
|
267 |
-
|
268 |
-
return $_value;
|
269 |
-
|
270 |
-
}
|
271 |
-
} else {
|
272 |
-
|
273 |
-
/**
|
274 |
-
* scope front.
|
275 |
-
*/
|
276 |
-
|
277 |
-
if ( isset( $meta_cache[ $meta_key ] ) && isset( $meta_cache[ $meta_key ][0] ) ) {
|
278 |
-
|
279 |
-
/** @noinspection PhpUnusedLocalVariableInspection */
|
280 |
-
$_value = '';
|
281 |
-
|
282 |
-
if ( WPGlobus_Core::has_translations( $meta_cache[ $meta_key ][0] ) ) {
|
283 |
-
//$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], WPGlobus::Config()->builder->get_language(), WPGlobus::RETURN_EMPTY );
|
284 |
-
/**
|
285 |
-
* We can get current language from WPGlobus::Config().
|
286 |
-
*
|
287 |
-
* @todo just for testing purposes.
|
288 |
-
*/
|
289 |
-
//$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], WPGlobus::Config()->language );
|
290 |
-
|
291 |
-
$_value = WPGlobus_Core::text_filter( $meta_cache[ $meta_key ][0], WPGlobus::Config()->builder->get_language() );
|
292 |
-
} else {
|
293 |
-
$_value = $meta_cache[ $meta_key ][0];
|
294 |
-
}
|
295 |
-
|
296 |
-
return $_value;
|
297 |
-
|
298 |
-
}
|
299 |
-
}
|
300 |
-
}
|
301 |
-
|
302 |
-
return $check;
|
303 |
-
|
304 |
-
}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* Elementor editor footer.
|
308 |
-
*
|
309 |
-
* Fires on Elementor editor before closing the body tag.
|
310 |
-
* Used to prints scripts or any other HTML before closing the body tag.
|
311 |
-
*/
|
312 |
-
public function on__elementor_footer() {
|
313 |
-
|
314 |
-
/**
|
315 |
-
* @since 2.2.31
|
316 |
-
*/
|
317 |
-
if ( 'external' != WPGlobus::Config()->builder->get('elementor_css_print_method') ) {
|
318 |
-
return;
|
319 |
-
}
|
320 |
-
|
321 |
-
$this->base_redirect_url = str_replace( array( '&language=' . WPGlobus::Config()->builder->get_language() ), '', $this->base_redirect_url );
|
322 |
-
$this->base_redirect_url = str_replace( '&action=edit', '&action=elementor', $this->base_redirect_url );
|
323 |
-
?>
|
324 |
-
<div id="wpglobus-elementor-wrapper">
|
325 |
-
<div class="elementor-panel-menu-item" id="wpglobus-elementor-panel-menu-item" style="cursor:auto;">
|
326 |
-
<div class="elementor-panel-menu-item-icon">
|
327 |
-
<i class="fa fa-globe"></i>
|
328 |
-
</div>
|
329 |
-
<div class="elementor-panel-menu-item-title" id="wpglobus-elementor-selector-box"
|
330 |
-
style="padding-top:0;">
|
331 |
-
<span id="wpglobus-elementor-selector-title"
|
332 |
-
style="cursor:pointer;"><?php esc_html_e( 'WPGlobus languages', 'wpglobus' ); ?></span>
|
333 |
-
<ul id="wpglobus-elementor-selector" style="display:none;margin:10px;" class="hidden">
|
334 |
-
<?php
|
335 |
-
foreach ( WPGlobus::Config()->enabled_languages as $language ) {
|
336 |
-
$_current = '';
|
337 |
-
if ( $language == WPGlobus::Config()->builder->get_language() ) {
|
338 |
-
$_current = esc_html__( 'current', 'wpglobus' );
|
339 |
-
$_current = ' - ' . $_current;
|
340 |
-
}
|
341 |
-
?>
|
342 |
-
<li style="margin-bottom:10px;cursor:auto;">
|
343 |
-
<a href="<?php echo esc_url( $this->base_redirect_url . '&language=' . $language ); ?>"><?php echo esc_html( WPGlobus::Config()->en_language_name[ $language ] . " ($language)" ); echo $_current; ?></a>
|
344 |
-
</li>
|
345 |
-
<?php
|
346 |
-
}
|
347 |
-
?>
|
348 |
-
</ul>
|
349 |
-
</div>
|
350 |
-
</div>
|
351 |
-
</div>
|
352 |
-
<?php // phpcs:disable ?>
|
353 |
-
<script type='text/javascript'>
|
354 |
-
/* <![CDATA[ */
|
355 |
-
var WPGlobusTimeID;
|
356 |
-
WPGlobusTimeID = setInterval(function(){
|
357 |
-
if ( jQuery("#elementor-panel-header-menu-button").length === 0 ) {
|
358 |
-
return;
|
359 |
-
}
|
360 |
-
clearInterval(WPGlobusTimeID);
|
361 |
-
var wpglobusElementorPanelMenu = jQuery("#wpglobus-elementor-wrapper").html();
|
362 |
-
jQuery(document).on('click', "#elementor-panel-header-menu-button", function () {
|
363 |
-
jQuery(".elementor-panel-menu-item").eq(7).after(wpglobusElementorPanelMenu);
|
364 |
-
});
|
365 |
-
jQuery(document).on('click', "#wpglobus-elementor-selector-title", function () {
|
366 |
-
var $t = jQuery("#wpglobus-elementor-selector");
|
367 |
-
$t.toggleClass('hidden');
|
368 |
-
if ($t.hasClass('hidden')) {
|
369 |
-
$t.css({'display': 'none'});
|
370 |
-
jQuery('#wpglobus-elementor-selector-box').css({'padding-top': '0'});
|
371 |
-
} else {
|
372 |
-
jQuery('#wpglobus-elementor-selector-box').css({'padding-top': '10px'});
|
373 |
-
$t.css({'display': 'block'});
|
374 |
-
}
|
375 |
-
});
|
376 |
-
}, 500);
|
377 |
-
/* ]]> */
|
378 |
-
</script>
|
379 |
-
<?php // phpcs:enable ?>
|
380 |
-
<?php
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Document edit url.
|
385 |
-
*
|
386 |
-
* Filters the document edit url.
|
387 |
-
*
|
388 |
-
* @param string $url The edit url.
|
389 |
-
* @param mixed $instance The document instance.
|
390 |
-
*
|
391 |
-
* @return string
|
392 |
-
*/
|
393 |
-
public function filter__url(
|
394 |
-
$url,
|
395 |
-
/**
|
396 |
-
* Unused.
|
397 |
-
*
|
398 |
-
* @noinspection PhpUnusedParameterInspection
|
399 |
-
*/
|
400 |
-
$instance
|
401 |
-
) {
|
402 |
-
|
403 |
-
if ( 'external' === WPGlobus::Config()->builder->get('elementor_css_print_method') ) {
|
404 |
-
if ( false === strpos( $url, 'language' ) ) {
|
405 |
-
$url = $url . '&language=' . WPGlobus::Config()->builder->get_language();
|
406 |
-
}
|
407 |
-
} else {
|
408 |
-
if ( false === strpos( $url, 'language' ) ) {
|
409 |
-
$url = $url . '&language=' . WPGlobus::Config()->default_language;
|
410 |
-
}
|
411 |
-
}
|
412 |
-
|
413 |
-
$this->base_redirect_url = $url;
|
414 |
-
|
415 |
-
return $url;
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Document "WordPress preview" URL.
|
420 |
-
*
|
421 |
-
* Filters the WordPress preview URL.
|
422 |
-
*
|
423 |
-
* @param string $url WordPress preview URL.
|
424 |
-
* @param mixed $instance The document instance.
|
425 |
-
*
|
426 |
-
* @return string
|
427 |
-
*/
|
428 |
-
public function filter__preview_url(
|
429 |
-
$url,
|
430 |
-
/**
|
431 |
-
* Unused.
|
432 |
-
*
|
433 |
-
* @noinspection PhpUnusedParameterInspection
|
434 |
-
*/
|
435 |
-
$instance
|
436 |
-
) {
|
437 |
-
/**
|
438 |
-
* @since 2.2.31
|
439 |
-
*/
|
440 |
-
if ( 'external' !== WPGlobus::Config()->builder->get('elementor_css_print_method') ) {
|
441 |
-
return $url;
|
442 |
-
}
|
443 |
-
|
444 |
-
$url = WPGlobus_Utils::localize_url( $url, WPGlobus::Config()->builder->get_language() );
|
445 |
-
|
446 |
-
return $url;
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Prints admin screen notices.
|
451 |
-
*
|
452 |
-
* @since 2.2.31
|
453 |
-
*/
|
454 |
-
public function on__admin_notice() {
|
455 |
-
|
456 |
-
if ( 'post.php' != WPGlobus::Config()->builder->get('pagenow') ) {
|
457 |
-
return;
|
458 |
-
}
|
459 |
-
|
460 |
-
if ( 'external' == WPGlobus::Config()->builder->get('elementor_css_print_method') ) {
|
461 |
-
return;
|
462 |
-
}
|
463 |
-
|
464 |
-
$_url = add_query_arg(
|
465 |
-
array(
|
466 |
-
'page' => 'elementor#tab-advanced',
|
467 |
-
),
|
468 |
-
admin_url( 'admin.php' )
|
469 |
-
);
|
470 |
-
|
471 |
-
echo '<div class="notice error"><p>';
|
472 |
-
printf(
|
473 |
-
esc_html__( 'WPGlobus provides multilingual support for Elementor only when the option %1$s%2$s%3$s is set to %4$s.', 'wpglobus' ),
|
474 |
-
'<a href="'.$_url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|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/elementor/readme.txt
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* File: readme.txt
|
3 |
-
*
|
4 |
-
* @package WPGlobus\Builders\Elementor
|
5 |
-
* @author Alex Gor(alexgff)
|
6 |
-
*/
|
7 |
-
|
8 |
-
The handling of post meta fields @see wpglobus\configs\elementor.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.css
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site,.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site *{fill:#0000ff !important;display:none}.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site,.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site *{fill:#0000ff;display:none}.edit-post-pinned-plugins .wpglobus-switcher-button{border-color:#cccccc;border-radius:3px}.wpglobus-block-editor-panel__notice{border-left:0}.wpglobus-block-editor-panel__notice .components-notice__content{margin-top:0;margin-bottom:0;color:#000;font-weight:500}.edit-post-layout .wpglobus-block-editor-panel__notice.components-notice{min-height:0}.edit-post-layout .wpglobus-block-editor-panel__settings-link{float:right;margin-bottom:10px}.edit-post-layout .wpglobus-block-editor-panel__info{float:left;margin-bottom:10px}.edit-post-layout .wpglobus-block-editor-panel__flag{vertical-align:middle}
|
2 |
-
|
3 |
-
/*# sourceMappingURL=wpglobus-block-editor.css.map */
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["wpglobus-block-editor.scss"],"names":[],"mappings":"AAAA,8KAEE,uBAAwB,CACxB,YAAa,CACd,0LAIC,YAAa,CACb,YAAa,CACd,oDAGC,oBAAqB,CACrB,iBAAkB,CACnB,qCAGC,aAAc,CACf,iEAGC,YAAa,CACb,eAAgB,CAChB,UAAW,CACX,eAAgB,CACjB,yEAGC,YAAa,CACd,8DAGC,WAAY,CACZ,kBAAmB,CACpB,qDAGC,UAAW,CACX,kBAAmB,CACpB,qDAGC,qBAAsB","file":"wpglobus-block-editor.css"}
|
|
trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-block-editor.scss
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site,
|
2 |
-
.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site * {
|
3 |
-
fill: #0000ff !important;
|
4 |
-
display: none;
|
5 |
-
}
|
6 |
-
|
7 |
-
.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site,
|
8 |
-
.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site * {
|
9 |
-
fill: #0000ff;
|
10 |
-
display: none;
|
11 |
-
}
|
12 |
-
|
13 |
-
.edit-post-pinned-plugins .wpglobus-switcher-button {
|
14 |
-
border-color: #cccccc;
|
15 |
-
border-radius: 3px;
|
16 |
-
}
|
17 |
-
|
18 |
-
.wpglobus-block-editor-panel__notice {
|
19 |
-
border-left: 0;
|
20 |
-
}
|
21 |
-
|
22 |
-
.wpglobus-block-editor-panel__notice .components-notice__content {
|
23 |
-
margin-top: 0;
|
24 |
-
margin-bottom: 0;
|
25 |
-
color: #000;
|
26 |
-
font-weight: 500;
|
27 |
-
}
|
28 |
-
|
29 |
-
.edit-post-layout .wpglobus-block-editor-panel__notice.components-notice {
|
30 |
-
min-height: 0;
|
31 |
-
}
|
32 |
-
|
33 |
-
.edit-post-layout .wpglobus-block-editor-panel__settings-link {
|
34 |
-
float: right;
|
35 |
-
margin-bottom: 10px;
|
36 |
-
}
|
37 |
-
|
38 |
-
.edit-post-layout .wpglobus-block-editor-panel__info {
|
39 |
-
float: left;
|
40 |
-
margin-bottom: 10px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.edit-post-layout .wpglobus-block-editor-panel__flag {
|
44 |
-
vertical-align: middle;
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/css/dist/wpglobus-switcher.css
DELETED
@@ -1,116 +0,0 @@
|
|
1 |
-
.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site,
|
2 |
-
.edit-post-pinned-plugins .components-icon-button.is-toggled svg.dashicons-admin-site *{fill:#0000ff !important;display:none}
|
3 |
-
.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site,
|
4 |
-
.edit-post-pinned-plugins .components-icon-button:not(.is-toggled) svg.dashicons-admin-site *{fill:#0000ff;display:none}
|
5 |
-
.edit-post-pinned-plugins .wpglobus-switcher-button{border-color:#cccccc;border-radius:3px}
|
6 |
-
.edit-post-layout .wpglobus-switcher-panel__notice.components-notice{min-height:0}
|
7 |
-
.edit-post-layout .wpglobus-switcher-panel__settings-link{float:right;margin-bottom:10px}
|
8 |
-
.edit-post-layout .wpglobus-switcher-panel__info{float:left;margin-bottom:10px}
|
9 |
-
.edit-post-layout .wpglobus-switcher-panel__flag{vertical-align:middle}
|
10 |
-
.wpglobus-switcher-panel__notice{border-left:0}
|
11 |
-
.wpglobus-switcher-panel__notice .components-notice__content{margin-top:0;margin-bottom:0;color:#000;font-weight:500}
|
12 |
-
.wpglobus-switcher-panel__body .components-base-control__help{margin-top:10px}
|
13 |
-
.wpglobus-switcher-panel__body.is-opened{padding-top:0}
|
14 |
-
.wpglobus-switcher-components-panel .wpglobus-switcher-message {
|
15 |
-
z-index:10;width:90%;position:absolute;border:2px solid #ff8100;margin:5px 10px;padding:5px;border-radius:6px;background-color:#ff8100;
|
16 |
-
font-size:14px;color:#000;font-weight:500;text-align:center;
|
17 |
-
}
|
18 |
-
.wpglobus-switcher-pulsate-radio-on {
|
19 |
-
-webkit-animation: pulsate-radio-on 0.3s ease-in-out both;
|
20 |
-
animation: pulsate-radio-on 0.3s ease-in-out both;
|
21 |
-
}
|
22 |
-
.wpglobus-switcher-pulsate-radio-off {
|
23 |
-
-webkit-animation: pulsate-radio-off 0.3s ease-in-out both;
|
24 |
-
animation: pulsate-radio-off 0.3s ease-in-out both;
|
25 |
-
}
|
26 |
-
.wpglobus-switcher-pulsate-radio {
|
27 |
-
-webkit-animation: pulsate-radio 0.5s ease-in-out infinite both;
|
28 |
-
animation: pulsate-radio 0.5s ease-in-out infinite both;
|
29 |
-
}
|
30 |
-
/** animation pulsate-radio-on */
|
31 |
-
@-webkit-keyframes pulsate-radio-on {
|
32 |
-
0% {
|
33 |
-
-webkit-transform: scale(0);
|
34 |
-
transform: scale(0);
|
35 |
-
}
|
36 |
-
50% {
|
37 |
-
-webkit-transform: scale(0.7);
|
38 |
-
transform: scale(0.7);
|
39 |
-
}
|
40 |
-
100% {
|
41 |
-
-webkit-transform: scale(1.1);
|
42 |
-
transform: scale(1.1);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
@keyframes pulsate-radio-on {
|
46 |
-
0% {
|
47 |
-
-webkit-transform: scale(0);
|
48 |
-
transform: scale(0);
|
49 |
-
}
|
50 |
-
50% {
|
51 |
-
-webkit-transform: scale(0.7);
|
52 |
-
transform: scale(0.7);
|
53 |
-
}
|
54 |
-
100% {
|
55 |
-
-webkit-transform: scale(1.1);
|
56 |
-
transform: scale(1.1);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
/** animation pulsate-radio-off */
|
60 |
-
@-webkit-keyframes pulsate-radio-off {
|
61 |
-
0% {
|
62 |
-
-webkit-transform: scale(1.1);
|
63 |
-
transform: scale(1.1);
|
64 |
-
}
|
65 |
-
50% {
|
66 |
-
-webkit-transform: scale(0.7);
|
67 |
-
transform: scale(0.7);
|
68 |
-
}
|
69 |
-
100% {
|
70 |
-
-webkit-transform: scale(0);
|
71 |
-
transform: scale(0);
|
72 |
-
}
|
73 |
-
}
|
74 |
-
@keyframes pulsate-radio-off {
|
75 |
-
0% {
|
76 |
-
-webkit-transform: scale(1.1);
|
77 |
-
transform: scale(1.1);
|
78 |
-
}
|
79 |
-
50% {
|
80 |
-
-webkit-transform: scale(0.7);
|
81 |
-
transform: scale(0.7);
|
82 |
-
}
|
83 |
-
100% {
|
84 |
-
-webkit-transform: scale(0);
|
85 |
-
transform: scale(0);
|
86 |
-
}
|
87 |
-
}
|
88 |
-
/** animation pulsate-radio */
|
89 |
-
@-webkit-keyframes pulsate-radio {
|
90 |
-
0% {
|
91 |
-
-webkit-transform: scale(1.1);
|
92 |
-
transform: scale(1.1);
|
93 |
-
}
|
94 |
-
50% {
|
95 |
-
-webkit-transform: scale(0.7);
|
96 |
-
transform: scale(0.7);
|
97 |
-
}
|
98 |
-
100% {
|
99 |
-
-webkit-transform: scale(1.1);
|
100 |
-
transform: scale(1.1);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
@keyframes pulsate-radio {
|
104 |
-
0% {
|
105 |
-
-webkit-transform: scale(1.1);
|
106 |
-
transform: scale(1.1);
|
107 |
-
}
|
108 |
-
50% {
|
109 |
-
-webkit-transform: scale(0.7);
|
110 |
-
transform: scale(0.7);
|
111 |
-
}
|
112 |
-
100% {
|
113 |
-
-webkit-transform: scale(1.1);
|
114 |
-
transform: scale(1.1);
|
115 |
-
}
|
116 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.css
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
.wpglobus-selector-grid{display:grid;grid-template-columns:40% 60%;place-items:center;grid-gap:0}.wpglobus-selector-grid .wpglobus-gutenberg-selector-column-2{width:90px}.wpglobus-gutenberg-selector-box{margin-left:220px}@media screen and (max-width: 599px){.wpglobus-gutenberg-selector-box{margin-left:40px}}@media screen and (max-width: 700px){.wpglobus-gutenberg-selector-column-1{height:25px;width:25px}.wpglobus-gutenberg-selector-column-2{display:none}}
|
2 |
-
|
3 |
-
/*# sourceMappingURL=wpglobus-gutenberg.css.map */
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["wpglobus-gutenberg.scss"],"names":[],"mappings":"AAAA,wBACE,YAAa,CACb,6BAA8B,CAC9B,kBAAmB,CACnB,UAAW,CACZ,8DAGC,UAAW,CACZ,iCAGC,iBAAkB,CACnB,qCAGC,iCACE,gBAAiB,CAClB,CAGH,qCACE,sCACE,WAAY,CACZ,UAAW,CACZ,sCAEC,YAAa,CACd","file":"wpglobus-gutenberg.css"}
|
|
trunk/includes/builders/gutenberg/assets/css/wpglobus-gutenberg.scss
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
.wpglobus-selector-grid {
|
2 |
-
display: grid;
|
3 |
-
grid-template-columns: 40% 60%;
|
4 |
-
place-items: center;
|
5 |
-
grid-gap: 0;
|
6 |
-
}
|
7 |
-
|
8 |
-
.wpglobus-selector-grid .wpglobus-gutenberg-selector-column-2 {
|
9 |
-
width: 90px;
|
10 |
-
}
|
11 |
-
|
12 |
-
.wpglobus-gutenberg-selector-box {
|
13 |
-
margin-left: 220px;
|
14 |
-
}
|
15 |
-
|
16 |
-
@media screen and (max-width: 599px) {
|
17 |
-
.wpglobus-gutenberg-selector-box {
|
18 |
-
margin-left: 40px;
|
19 |
-
}
|
20 |
-
}
|
21 |
-
|
22 |
-
@media screen and (max-width: 700px) {
|
23 |
-
.wpglobus-gutenberg-selector-column-1 {
|
24 |
-
height: 25px;
|
25 |
-
width: 25px;
|
26 |
-
}
|
27 |
-
.wpglobus-gutenberg-selector-column-2 {
|
28 |
-
display: none;
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/gutenberg/assets/js/dist/wpglobus-block-editor.js
DELETED
@@ -1,607 +0,0 @@
|
|
1 |
-
/******/ (function(modules) { // webpackBootstrap
|
2 |
-
/******/ // The module cache
|
3 |
-
/******/ var installedModules = {};
|
4 |
-
/******/
|
5 |
-
/******/ // The require function
|
6 |
-
/******/ function __webpack_require__(moduleId) {
|
7 |
-
/******/
|
8 |
-
/******/ // Check if module is in cache
|
9 |
-
/******/ if(installedModules[moduleId]) {
|
10 |
-
/******/ return installedModules[moduleId].exports;
|
11 |
-
/******/ }
|
12 |
-
/******/ // Create a new module (and put it into the cache)
|
13 |
-
/******/ var module = installedModules[moduleId] = {
|
14 |
-
/******/ i: moduleId,
|
15 |
-
/******/ l: false,
|
16 |
-
/******/ exports: {}
|
17 |
-
/******/ };
|
18 |
-
/******/
|
19 |
-
/******/ // Execute the module function
|
20 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
-
/******/
|
22 |
-
/******/ // Flag the module as loaded
|
23 |
-
/******/ module.l = true;
|
24 |
-
/******/
|
25 |
-
/******/ // Return the exports of the module
|
26 |
-
/******/ return module.exports;
|
27 |
-
/******/ }
|
28 |
-
/******/
|
29 |
-
/******/
|
30 |
-
/******/ // expose the modules object (__webpack_modules__)
|
31 |
-
/******/ __webpack_require__.m = modules;
|
32 |
-
/******/
|
33 |
-
/******/ // expose the module cache
|
34 |
-
/******/ __webpack_require__.c = installedModules;
|
35 |
-
/******/
|
36 |
-
/******/ // define getter function for harmony exports
|
37 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
-
/******/ Object.defineProperty(exports, name, {
|
40 |
-
/******/ configurable: false,
|
41 |
-
/******/ enumerable: true,
|
42 |
-
/******/ get: getter
|
43 |
-
/******/ });
|
44 |
-
/******/ }
|
45 |
-
/******/ };
|
46 |
-
/******/
|
47 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
-
/******/ __webpack_require__.n = function(module) {
|
49 |
-
/******/ var getter = module && module.__esModule ?
|
50 |
-
/******/ function getDefault() { return module['default']; } :
|
51 |
-
/******/ function getModuleExports() { return module; };
|
52 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
-
/******/ return getter;
|
54 |
-
/******/ };
|
55 |
-
/******/
|
56 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
-
/******/
|
59 |
-
/******/ // __webpack_public_path__
|
60 |
-
/******/ __webpack_require__.p = "";
|
61 |
-
/******/
|
62 |
-
/******/ // Load entry module and return exports
|
63 |
-
/******/ return __webpack_require__(__webpack_require__.s = 41);
|
64 |
-
/******/ })
|
65 |
-
/************************************************************************/
|
66 |
-
/******/ ([
|
67 |
-
/* 0 */
|
68 |
-
/***/ (function(module, exports) {
|
69 |
-
|
70 |
-
eval("var core = module.exports = { version: '2.6.5' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY29yZS5qcz8xNWUwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gbW9kdWxlLmV4cG9ydHMgPSB7IHZlcnNpb246ICcyLjYuNScgfTtcbmlmICh0eXBlb2YgX19lID09ICdudW1iZXInKSBfX2UgPSBjb3JlOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVuZGVmXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY29yZS5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n");
|
71 |
-
|
72 |
-
/***/ }),
|
73 |
-
/* 1 */
|
74 |
-
/***/ (function(module, exports) {
|
75 |
-
|
76 |
-
eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZ2xvYmFsLmpzP2VjYWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzg2I2lzc3VlY29tbWVudC0xMTU3NTkwMjhcbnZhciBnbG9iYWwgPSBtb2R1bGUuZXhwb3J0cyA9IHR5cGVvZiB3aW5kb3cgIT0gJ3VuZGVmaW5lZCcgJiYgd2luZG93Lk1hdGggPT0gTWF0aFxuICA/IHdpbmRvdyA6IHR5cGVvZiBzZWxmICE9ICd1bmRlZmluZWQnICYmIHNlbGYuTWF0aCA9PSBNYXRoID8gc2VsZlxuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tbmV3LWZ1bmNcbiAgOiBGdW5jdGlvbigncmV0dXJuIHRoaXMnKSgpO1xuaWYgKHR5cGVvZiBfX2cgPT0gJ251bWJlcicpIF9fZyA9IGdsb2JhbDsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bmRlZlxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qc1xuLy8gbW9kdWxlIGlkID0gMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1\n");
|
77 |
-
|
78 |
-
/***/ }),
|
79 |
-
/* 2 */
|
80 |
-
/***/ (function(module, exports) {
|
81 |
-
|
82 |
-
eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGFzLmpzPzBmNjIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGhhc093blByb3BlcnR5ID0ge30uaGFzT3duUHJvcGVydHk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwga2V5KSB7XG4gIHJldHVybiBoYXNPd25Qcm9wZXJ0eS5jYWxsKGl0LCBrZXkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19oYXMuanNcbi8vIG1vZHVsZSBpZCA9IDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n");
|
83 |
-
|
84 |
-
/***/ }),
|
85 |
-
/* 3 */
|
86 |
-
/***/ (function(module, exports, __webpack_require__) {
|
87 |
-
|
88 |
-
eval("var anObject = __webpack_require__(10);\nvar IE8_DOM_DEFINE = __webpack_require__(31);\nvar toPrimitive = __webpack_require__(18);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,ey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bm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZHAuanNcbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3\n");
|
89 |
-
|
90 |
-
/***/ }),
|
91 |
-
/* 4 */
|
92 |
-
/***/ (function(module, exports, __webpack_require__) {
|
93 |
-
|
94 |
-
eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(11)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZGVzY3JpcHRvcnMuanM/Zjg0ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUaGFuaydzIElFOCBmb3IgaGlzIGZ1bm55IGRlZmluZVByb3BlcnR5XG5tb2R1bGUuZXhwb3J0cyA9ICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh7fSwgJ2EnLCB7IGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gNzsgfSB9KS5hICE9IDc7XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4\n");
|
95 |
-
|
96 |
-
/***/ }),
|
97 |
-
/* 5 */
|
98 |
-
/***/ (function(module, exports, __webpack_require__) {
|
99 |
-
|
100 |
-
eval("var global = __webpack_require__(1);\nvar core = __webpack_require__(0);\nvar ctx = __webpack_require__(30);\nvar hide = __webpack_require__(6);\nvar has = __webpack_require__(2);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZXhwb3J0LmpzPzkwY2QiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBQUk9UT1RZUEUgPSAncHJvdG90eXBlJztcblxudmFyICRleHBvcnQgPSBmdW5jdGlvbiAodHlwZSwgbmFtZSwgc291cmNlKSB7XG4gIHZhciBJU19GT1JDRUQgPSB0eXBlICYgJGV4cG9ydC5GO1xuICB2YXIgSVNfR0xPQkFMID0gdHlwZSAmICRleHBvcnQuRztcbiAgdmFyIElTX1NUQVRJQyA9IHR5cGUgJiAkZXhwb3J0LlM7XG4gIHZhciBJU19QUk9UTyA9IHR5cGUgJiAkZXhwb3J0LlA7XG4gIHZhciBJU19CSU5EID0gdHlwZSAmICRleHBvcnQuQjtcbiAgdmFyIElTX1dSQVAgPSB0eXBlICYgJGV4cG9ydC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FDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5\n");
|
101 |
-
|
102 |
-
/***/ }),
|
103 |
-
/* 6 */
|
104 |
-
/***/ (function(module, exports, __webpack_require__) {
|
105 |
-
|
106 |
-
eval("var dP = __webpack_require__(3);\nvar createDesc = __webpack_require__(14);\nmodule.exports = __webpack_require__(4) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGlkZS5qcz84NDljIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGNyZWF0ZURlc2MgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIHJldHVybiBkUC5mKG9iamVjdCwga2V5LCBjcmVhdGVEZXNjKDEsIHZhbHVlKSk7XG59IDogZnVuY3Rpb24gKG9iamVjdCwga2V5LCB2YWx1ZSkge1xuICBvYmplY3Rba2V5XSA9IHZhbHVlO1xuICByZXR1cm4gb2JqZWN0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19oaWRlLmpzXG4vLyBtb2R1bGUgaWQgPSA2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6\n");
|
107 |
-
|
108 |
-
/***/ }),
|
109 |
-
/* 7 */
|
110 |
-
/***/ (function(module, exports) {
|
111 |
-
|
112 |
-
eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtb2JqZWN0LmpzPzEyYTgiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHR5cGVvZiBpdCA9PT0gJ29iamVjdCcgPyBpdCAhPT0gbnVsbCA6IHR5cGVvZiBpdCA9PT0gJ2Z1bmN0aW9uJztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n");
|
113 |
-
|
114 |
-
/***/ }),
|
115 |
-
/* 8 */
|
116 |
-
/***/ (function(module, exports, __webpack_require__) {
|
117 |
-
|
118 |
-
eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(61);\nvar defined = __webpack_require__(15);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW9iamVjdC5qcz80ZGM0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIHRvIGluZGV4ZWQgb2JqZWN0LCB0b09iamVjdCB3aXRoIGZhbGxiYWNrIGZvciBub24tYXJyYXktbGlrZSBFUzMgc3RyaW5nc1xudmFyIElPYmplY3QgPSByZXF1aXJlKCcuL19pb2JqZWN0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBJT2JqZWN0KGRlZmluZWQoaXQpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n");
|
119 |
-
|
120 |
-
/***/ }),
|
121 |
-
/* 9 */
|
122 |
-
/***/ (function(module, exports, __webpack_require__) {
|
123 |
-
|
124 |
-
eval("var store = __webpack_require__(17)('wks');\nvar uid = __webpack_require__(13);\nvar Symbol = __webpack_require__(1).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLmpzPzc1MmMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHN0b3JlID0gcmVxdWlyZSgnLi9fc2hhcmVkJykoJ3drcycpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4vX3VpZCcpO1xudmFyIFN5bWJvbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLlN5bWJvbDtcbnZhciBVU0VfU1lNQk9MID0gdHlwZW9mIFN5bWJvbCA9PSAnZnVuY3Rpb24nO1xuXG52YXIgJGV4cG9ydHMgPSBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIHJldHVybiBzdG9yZVtuYW1lXSB8fCAoc3RvcmVbbmFtZV0gPVxuICAgIFVTRV9TWU1CT0wgJiYgU3ltYm9sW25hbWVdIHx8IChVU0VfU1lNQk9MID8gU3ltYm9sIDogdWlkKSgnU3ltYm9sLicgKyBuYW1lKSk7XG59O1xuXG4kZXhwb3J0cy5zdG9yZSA9IHN0b3JlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///9\n");
|
125 |
-
|
126 |
-
/***/ }),
|
127 |
-
/* 10 */
|
128 |
-
/***/ (function(module, exports, __webpack_require__) {
|
129 |
-
|
130 |
-
eval("var isObject = __webpack_require__(7);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLW9iamVjdC5qcz9lZmIzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///10\n");
|
131 |
-
|
132 |
-
/***/ }),
|
133 |
-
/* 11 */
|
134 |
-
/***/ (function(module, exports) {
|
135 |
-
|
136 |
-
eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzPzRiY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzXG4vLyBtb2R1bGUgaWQgPSAxMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///11\n");
|
137 |
-
|
138 |
-
/***/ }),
|
139 |
-
/* 12 */
|
140 |
-
/***/ (function(module, exports) {
|
141 |
-
|
142 |
-
eval("module.exports = true;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2xpYnJhcnkuanM/M2I4OCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHRydWU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gMTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///12\n");
|
143 |
-
|
144 |
-
/***/ }),
|
145 |
-
/* 13 */
|
146 |
-
/***/ (function(module, exports) {
|
147 |
-
|
148 |
-
eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qcz9kYzRhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpZCA9IDA7XG52YXIgcHggPSBNYXRoLnJhbmRvbSgpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcHgpLnRvU3RyaW5nKDM2KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qc1xuLy8gbW9kdWxlIGlkID0gMTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///13\n");
|
149 |
-
|
150 |
-
/***/ }),
|
151 |
-
/* 14 */
|
152 |
-
/***/ (function(module, exports) {
|
153 |
-
|
154 |
-
eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanM/NWZjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChiaXRtYXAsIHZhbHVlKSB7XG4gIHJldHVybiB7XG4gICAgZW51bWVyYWJsZTogIShiaXRtYXAgJiAxKSxcbiAgICBjb25maWd1cmFibGU6ICEoYml0bWFwICYgMiksXG4gICAgd3JpdGFibGU6ICEoYml0bWFwICYgNCksXG4gICAgdmFsdWU6IHZhbHVlXG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanNcbi8vIG1vZHVsZSBpZCA9IDE0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///14\n");
|
155 |
-
|
156 |
-
/***/ }),
|
157 |
-
/* 15 */
|
158 |
-
/***/ (function(module, exports) {
|
159 |
-
|
160 |
-
eval("// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RlZmluZWQuanM/ZTc2OCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjIuMSBSZXF1aXJlT2JqZWN0Q29lcmNpYmxlKGFyZ3VtZW50KVxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKGl0ID09IHVuZGVmaW5lZCkgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY2FsbCBtZXRob2Qgb24gIFwiICsgaXQpO1xuICByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RlZmluZWQuanNcbi8vIG1vZHVsZSBpZCA9IDE1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///15\n");
|
161 |
-
|
162 |
-
/***/ }),
|
163 |
-
/* 16 */
|
164 |
-
/***/ (function(module, exports, __webpack_require__) {
|
165 |
-
|
166 |
-
eval("var shared = __webpack_require__(17)('keys');\nvar uid = __webpack_require__(13);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC1rZXkuanM/NmIxZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgc2hhcmVkID0gcmVxdWlyZSgnLi9fc2hhcmVkJykoJ2tleXMnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGtleSkge1xuICByZXR1cm4gc2hhcmVkW2tleV0gfHwgKHNoYXJlZFtrZXldID0gdWlkKGtleSkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQta2V5LmpzXG4vLyBtb2R1bGUgaWQgPSAxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///16\n");
|
167 |
-
|
168 |
-
/***/ }),
|
169 |
-
/* 17 */
|
170 |
-
/***/ (function(module, exports, __webpack_require__) {
|
171 |
-
|
172 |
-
eval("var core = __webpack_require__(0);\nvar global = __webpack_require__(1);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: __webpack_require__(12) ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qcz83YmMwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIFNIQVJFRCA9ICdfX2NvcmUtanNfc2hhcmVkX18nO1xudmFyIHN0b3JlID0gZ2xvYmFsW1NIQVJFRF0gfHwgKGdsb2JhbFtTSEFSRURdID0ge30pO1xuXG4obW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xuICByZXR1cm4gc3RvcmVba2V5XSB8fCAoc3RvcmVba2V5XSA9IHZhbHVlICE9PSB1bmRlZmluZWQgPyB2YWx1ZSA6IHt9KTtcbn0pKCd2ZXJzaW9ucycsIFtdKS5wdXNoKHtcbiAgdmVyc2lvbjogY29yZS52ZXJzaW9uLFxuICBtb2RlOiByZXF1aXJlKCcuL19saWJyYXJ5JykgPyAncHVyZScgOiAnZ2xvYmFsJyxcbiAgY29weXJpZ2h0OiAnwqkgMjAxOSBEZW5pcyBQdXNoa2FyZXYgKHpsb2lyb2NrLnJ1KSdcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qc1xuLy8gbW9kdWxlIGlkID0gMTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///17\n");
|
173 |
-
|
174 |
-
/***/ }),
|
175 |
-
/* 18 */
|
176 |
-
/***/ (function(module, exports, __webpack_require__) {
|
177 |
-
|
178 |
-
eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(7);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLXByaW1pdGl2ZS5qcz8zMjYzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xIFRvUHJpbWl0aXZlKGlucHV0IFssIFByZWZlcnJlZFR5cGVdKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG4vLyBpbnN0ZWFkIG9mIHRoZSBFUzYgc3BlYyB2ZXJzaW9uLCB3ZSBkaWRuJ3QgaW1wbGVtZW50IEBAdG9QcmltaXRpdmUgY2FzZVxuLy8gYW5kIHRoZSBzZWNvbmQgYXJndW1lbnQgLSBmbGFnIC0gcHJlZmVycmVkIHR5cGUgaXMgYSBzdHJpbmdcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBTKSB7XG4gIGlmICghaXNPYmplY3QoaXQpKSByZXR1cm4gaXQ7XG4gIHZhciBmbiwgdmFsO1xuICBpZiAoUyAmJiB0eXBlb2YgKGZuID0gaXQudG9TdHJpbmcpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgaWYgKHR5cGVvZiAoZm4gPSBpdC52YWx1ZU9mKSA9PSAnZnVuY3Rpb24nICYmICFpc09iamVjdCh2YWwgPSBmbi5jYWxsKGl0KSkpIHJldHVybiB2YWw7XG4gIGlmICghUyAmJiB0eXBlb2YgKGZuID0gaXQudG9TdHJpbmcpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY29udmVydCBvYmplY3QgdG8gcHJpbWl0aXZlIHZhbHVlXCIpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1wcmltaXRpdmUuanNcbi8vIG1vZHVsZSBpZCA9IDE4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///18\n");
|
179 |
-
|
180 |
-
/***/ }),
|
181 |
-
/* 19 */
|
182 |
-
/***/ (function(module, exports) {
|
183 |
-
|
184 |
-
eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWludGVnZXIuanM/NTJlMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuNCBUb0ludGVnZXJcbnZhciBjZWlsID0gTWF0aC5jZWlsO1xudmFyIGZsb29yID0gTWF0aC5mbG9vcjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpc05hTihpdCA9ICtpdCkgPyAwIDogKGl0ID4gMCA/IGZsb29yIDogY2VpbCkoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///19\n");
|
185 |
-
|
186 |
-
/***/ }),
|
187 |
-
/* 20 */
|
188 |
-
/***/ (function(module, exports) {
|
189 |
-
|
190 |
-
eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXJhdG9ycy5qcz9mZGI0Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlcmF0b3JzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///20\n");
|
191 |
-
|
192 |
-
/***/ }),
|
193 |
-
/* 21 */
|
194 |
-
/***/ (function(module, exports, __webpack_require__) {
|
195 |
-
|
196 |
-
eval("// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(10);\nvar dPs = __webpack_require__(60);\nvar enumBugKeys = __webpack_require__(23);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(32)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(65).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1jcmVhdGUuanM/NjI4NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMiAvIDE1LjIuMy41IE9iamVjdC5jcmVhdGU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F0ZS5qc1xuLy8gbW9kdWxlIGlkID0gMjFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///21\n");
|
197 |
-
|
198 |
-
/***/ }),
|
199 |
-
/* 22 */
|
200 |
-
/***/ (function(module, exports, __webpack_require__) {
|
201 |
-
|
202 |
-
eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(36);\nvar enumBugKeys = __webpack_require__(23);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLmpzPzk2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjE0IC8gMTUuMi4zLjE0IE9iamVjdC5rZXlzKE8pXG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cy1pbnRlcm5hbCcpO1xudmFyIGVudW1CdWdLZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE9iamVjdC5rZXlzIHx8IGZ1bmN0aW9uIGtleXMoTykge1xuICByZXR1cm4gJGtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///22\n");
|
203 |
-
|
204 |
-
/***/ }),
|
205 |
-
/* 23 */
|
206 |
-
/***/ (function(module, exports) {
|
207 |
-
|
208 |
-
eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2VudW0tYnVnLWtleXMuanM/YzY3NyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJRSA4LSBkb24ndCBlbnVtIGJ1ZyBrZXlzXG5tb2R1bGUuZXhwb3J0cyA9IChcbiAgJ2NvbnN0cnVjdG9yLGhhc093blByb3BlcnR5LGlzUHJvdG90eXBlT2YscHJvcGVydHlJc0VudW1lcmFibGUsdG9Mb2NhbGVTdHJpbmcsdG9TdHJpbmcsdmFsdWVPZidcbikuc3BsaXQoJywnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///23\n");
|
209 |
-
|
210 |
-
/***/ }),
|
211 |
-
/* 24 */
|
212 |
-
/***/ (function(module, exports, __webpack_require__) {
|
213 |
-
|
214 |
-
eval("var def = __webpack_require__(3).f;\nvar has = __webpack_require__(2);\nvar TAG = __webpack_require__(9)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC10by1zdHJpbmctdGFnLmpzPzdiYTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRlZiA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgVEFHID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvU3RyaW5nVGFnJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCB0YWcsIHN0YXQpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBzdGF0ID8gaXQgOiBpdC5wcm90b3R5cGUsIFRBRykpIGRlZihpdCwgVEFHLCB7IGNvbmZpZ3VyYWJsZTogdHJ1ZSwgdmFsdWU6IHRhZyB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2V0LXRvLXN0cmluZy10YWcuanNcbi8vIG1vZHVsZSBpZCA9IDI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///24\n");
|
215 |
-
|
216 |
-
/***/ }),
|
217 |
-
/* 25 */
|
218 |
-
/***/ (function(module, exports, __webpack_require__) {
|
219 |
-
|
220 |
-
eval("exports.f = __webpack_require__(9);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1leHQuanM/MmExZSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSByZXF1aXJlKCcuL193a3MnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///25\n");
|
221 |
-
|
222 |
-
/***/ }),
|
223 |
-
/* 26 */
|
224 |
-
/***/ (function(module, exports, __webpack_require__) {
|
225 |
-
|
226 |
-
eval("var global = __webpack_require__(1);\nvar core = __webpack_require__(0);\nvar LIBRARY = __webpack_require__(12);\nvar wksExt = __webpack_require__(25);\nvar defineProperty = __webpack_require__(3).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1kZWZpbmUuanM/NzJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyIHdrc0V4dCA9IHJlcXVpcmUoJy4vX3drcy1leHQnKTtcbnZhciBkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIHZhciAkU3ltYm9sID0gY29yZS5TeW1ib2wgfHwgKGNvcmUuU3ltYm9sID0gTElCUkFSWSA/IHt9IDogZ2xvYmFsLlN5bWJvbCB8fCB7fSk7XG4gIGlmIChuYW1lLmNoYXJBdCgwKSAhPSAnXycgJiYgIShuYW1lIGluICRTeW1ib2wpKSBkZWZpbmVQcm9wZXJ0eSgkU3ltYm9sLCBuYW1lLCB7IHZhbHVlOiB3a3NFeHQuZihuYW1lKSB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///26\n");
|
227 |
-
|
228 |
-
/***/ }),
|
229 |
-
/* 27 */
|
230 |
-
/***/ (function(module, exports) {
|
231 |
-
|
232 |
-
eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1waWUuanM/MzY5MiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSB7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtcGllLmpzXG4vLyBtb2R1bGUgaWQgPSAyN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///27\n");
|
233 |
-
|
234 |
-
/***/ }),
|
235 |
-
/* 28 */
|
236 |
-
/***/ (function(module, exports, __webpack_require__) {
|
237 |
-
|
238 |
-
eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(15);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qcz9iMDFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xMyBUb09iamVjdChhcmd1bWVudClcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIE9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///28\n");
|
239 |
-
|
240 |
-
/***/ }),
|
241 |
-
/* 29 */
|
242 |
-
/***/ (function(module, exports, __webpack_require__) {
|
243 |
-
|
244 |
-
eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(2);\nvar toObject = __webpack_require__(28);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3Vy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QUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///29\n");
|
245 |
-
|
246 |
-
/***/ }),
|
247 |
-
/* 30 */
|
248 |
-
/***/ (function(module, exports, __webpack_require__) {
|
249 |
-
|
250 |
-
eval("// optional / simple context binding\nvar aFunction = __webpack_require__(48);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2N0eC5qcz9mOTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIG9wdGlvbmFsIC8gc2ltcGxlIGNvbnRleHQgYmluZGluZ1xudmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4vX2EtZnVuY3Rpb24nKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGZuLCB0aGF0LCBsZW5ndGgpIHtcbiAgYUZ1bmN0aW9uKGZuKTtcbiAgaWYgKHRoYXQgPT09IHVuZGVmaW5lZCkgcmV0dXJuIGZuO1xuICBzd2l0Y2ggKGxlbmd0aCkge1xuICAgIGNhc2UgMTogcmV0dXJuIGZ1bmN0aW9uIChhKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhKTtcbiAgICB9O1xuICAgIGNhc2UgMjogcmV0dXJuIGZ1bmN0aW9uIChhLCBiKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiKTtcbiAgICB9O1xuICAgIGNhc2UgMzogcmV0dXJuIGZ1bmN0aW9uIChhLCBiLCBjKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiLCBjKTtcbiAgICB9O1xuICB9XG4gIHJldHVybiBmdW5jdGlvbiAoLyogLi4uYXJncyAqLykge1xuICAgIHJldHVybiBmbi5hcHBseSh0aGF0LCBhcmd1bWVudHMpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jdHguanNcbi8vIG1vZHVsZSBpZCA9IDMwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///30\n");
|
251 |
-
|
252 |
-
/***/ }),
|
253 |
-
/* 31 */
|
254 |
-
/***/ (function(module, exports, __webpack_require__) {
|
255 |
-
|
256 |
-
eval("module.exports = !__webpack_require__(4) && !__webpack_require__(11)(function () {\n return Object.defineProperty(__webpack_require__(32)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2llOC1kb20tZGVmaW5lLmpzPzQ5ZjAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAhcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSAmJiAhcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkocmVxdWlyZSgnLi9fZG9tLWNyZWF0ZScpKCdkaXYnKSwgJ2EnLCB7IGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gNzsgfSB9KS5hICE9IDc7XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///31\n");
|
257 |
-
|
258 |
-
/***/ }),
|
259 |
-
/* 32 */
|
260 |
-
/***/ (function(module, exports, __webpack_require__) {
|
261 |
-
|
262 |
-
eval("var isObject = __webpack_require__(7);\nvar document = __webpack_require__(1).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RvbS1jcmVhdGUuanM/MzhkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBkb2N1bWVudCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmRvY3VtZW50O1xuLy8gdHlwZW9mIGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQgaXMgJ29iamVjdCcgaW4gb2xkIElFXG52YXIgaXMgPSBpc09iamVjdChkb2N1bWVudCkgJiYgaXNPYmplY3QoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXMgPyBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGl0KSA6IHt9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kb20tY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///32\n");
|
263 |
-
|
264 |
-
/***/ }),
|
265 |
-
/* 33 */
|
266 |
-
/***/ (function(module, exports, __webpack_require__) {
|
267 |
-
|
268 |
-
"use strict";
|
269 |
-
eval("\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(55);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(70);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3R5cGVvZi5qcz9hNDU2Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5leHBvcnRzLl9fZXNNb2R1bGUgPSB0cnVlO1xuXG52YXIgX2l0ZXJhdG9yID0gcmVxdWlyZShcIi4uL2NvcmUtanMvc3ltYm9sL2l0ZXJhdG9yXCIpO1xuXG52YXIgX2l0ZXJhdG9yMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2l0ZXJhdG9yKTtcblxudmFyIF9zeW1ib2wgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9zeW1ib2xcIik7XG5cbnZhciBfc3ltYm9sMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3N5bWJvbCk7XG5cbnZhciBfdHlwZW9mID0gdHlwZW9mIF9zeW1ib2wyLmRlZmF1bHQgPT09IFwiZnVuY3Rpb25cIiAmJiB0eXBlb2YgX2l0ZXJhdG9yMi5kZWZhdWx0ID09PSBcInN5bWJvbFwiID8gZnVuY3Rpb24gKG9iaikgeyByZXR1cm4gdHlwZW9mIG9iajsgfSA6IGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIG9iaiAmJiB0eXBlb2YgX3N5bWJvbDIuZGVmYXVsdCA9PT0gXCJmdW5jdGlvblwiICYmIG9iai5jb25zdHJ1Y3RvciA9PT0gX3N5bWJvbDIuZGVmYXVsdCAmJiBvYmogIT09IF9zeW1ib2wyLmRlZmF1bHQuc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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///33\n");
|
270 |
-
|
271 |
-
/***/ }),
|
272 |
-
/* 34 */
|
273 |
-
/***/ (function(module, exports, __webpack_require__) {
|
274 |
-
|
275 |
-
"use strict";
|
276 |
-
eval("\nvar LIBRARY = __webpack_require__(12);\nvar $export = __webpack_require__(5);\nvar redefine = __webpack_require__(35);\nvar hide = __webpack_require__(6);\nvar Iterators = __webpack_require__(20);\nvar $iterCreate = __webpack_require__(59);\nvar setToStringTag = __webpack_require__(24);\nvar getPrototypeOf = __webpack_require__(29);\nvar ITERATOR = __webpack_require__(9)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItZGVmaW5lLmpzP2JjODAiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHJlZGVmaW5lID0gcmVxdWlyZSgnLi9fcmVkZWZpbmUnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyICRpdGVyQ3JlYXRlID0gcmVxdWlyZSgnLi9faXRlci1jcmVhdGUnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcX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tleSwgbWV0aG9kc1trZXldKTtcbiAgICB9IGVsc2UgJGV4cG9ydCgkZXhwb3J0LlAgKyAkZXhwb3J0LkYgKiAoQlVHR1kgfHwgVkFMVUVTX0JVRyksIE5BTUUsIG1ldGhvZHMpO1xuICB9XG4gIHJldHVybiBtZXRob2RzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///34\n");
|
277 |
-
|
278 |
-
/***/ }),
|
279 |
-
/* 35 */
|
280 |
-
/***/ (function(module, exports, __webpack_require__) {
|
281 |
-
|
282 |
-
eval("module.exports = __webpack_require__(6);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3JlZGVmaW5lLmpzP2YzY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19oaWRlJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fcmVkZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///35\n");
|
283 |
-
|
284 |
-
/***/ }),
|
285 |
-
/* 36 */
|
286 |
-
/***/ (function(module, exports, __webpack_require__) {
|
287 |
-
|
288 |
-
eval("var has = __webpack_require__(2);\nvar toIObject = __webpack_require__(8);\nvar arrayIndexOf = __webpack_require__(62)(false);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLWludGVybmFsLmpzPzIxYjgiXSwic291cm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DQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///36\n");
|
289 |
-
|
290 |
-
/***/ }),
|
291 |
-
/* 37 */
|
292 |
-
/***/ (function(module, exports) {
|
293 |
-
|
294 |
-
eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvZi5qcz80N2QzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gdG9TdHJpbmcuY2FsbChpdCkuc2xpY2UoOCwgLTEpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jb2YuanNcbi8vIG1vZHVsZSBpZCA9IDM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///37\n");
|
295 |
-
|
296 |
-
/***/ }),
|
297 |
-
/* 38 */
|
298 |
-
/***/ (function(module, exports) {
|
299 |
-
|
300 |
-
eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BzLmpzP2Q2NDQiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wcy5qc1xuLy8gbW9kdWxlIGlkID0gMzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///38\n");
|
301 |
-
|
302 |
-
/***/ }),
|
303 |
-
/* 39 */
|
304 |
-
/***/ (function(module, exports, __webpack_require__) {
|
305 |
-
|
306 |
-
eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(36);\nvar hiddenKeys = __webpack_require__(23).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLmpzPzlmNDQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjcgLyAxNS4yLjMuNCBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhPKVxudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBoaWRkZW5LZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpLmNvbmNhdCgnbGVuZ3RoJywgJ3Byb3RvdHlwZScpO1xuXG5leHBvcnRzLmYgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyB8fCBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eU5hbWVzKE8pIHtcbiAgcmV0dXJuICRrZXlzKE8sIGhpZGRlbktleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi5qc1xuLy8gbW9kdWxlIGlkID0gMzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///39\n");
|
307 |
-
|
308 |
-
/***/ }),
|
309 |
-
/* 40 */
|
310 |
-
/***/ (function(module, exports, __webpack_require__) {
|
311 |
-
|
312 |
-
eval("var pIE = __webpack_require__(27);\nvar createDesc = __webpack_require__(14);\nvar toIObject = __webpack_require__(8);\nvar toPrimitive = __webpack_require__(18);\nvar has = __webpack_require__(2);\nvar IE8_DOM_DEFINE = __webpack_require__(31);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saW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QUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///40\n");
|
313 |
-
|
314 |
-
/***/ }),
|
315 |
-
/* 41 */
|
316 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
317 |
-
|
318 |
-
"use strict";
|
319 |
-
eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss__ = __webpack_require__(42);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sidebar_js__ = __webpack_require__(43);\n// Include stylesheet\n\n\n// Import Click to Tweet Block\n//import './block.js';\n\n// Import Gutenberg Boilerplate Sidebar\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXguanM/ODc0OSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJbmNsdWRlIHN0eWxlc2hlZXRcbmltcG9ydCAnLi9zdHlsZS5zY3NzJztcblxuLy8gSW1wb3J0IENsaWNrIHRvIFR3ZWV0IEJsb2NrXG4vL2ltcG9ydCAnLi9ibG9jay5qcyc7XG5cbi8vIEltcG9ydCBHdXRlbmJlcmcgQm9pbGVycGxhdGUgU2lkZWJhclxuaW1wb3J0ICcuL3NpZGViYXIuanMnO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSA0MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///41\n");
|
320 |
-
|
321 |
-
/***/ }),
|
322 |
-
/* 42 */
|
323 |
-
/***/ (function(module, exports) {
|
324 |
-
|
325 |
-
eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3R5bGUuc2Nzcz9hY2Q4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvc3R5bGUuc2Nzc1xuLy8gbW9kdWxlIGlkID0gNDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///42\n");
|
326 |
-
|
327 |
-
/***/ }),
|
328 |
-
/* 43 */
|
329 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
330 |
-
|
331 |
-
"use strict";
|
332 |
-
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(49);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(80);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n\n\n\n\n\n/**\n * Internal block libraries.\n * @since 2.2.3\n */\nvar __ = wp.i18n.__;\nvar _wp$editPost = wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n Button = _wp$components.Button,\n Notice = _wp$components.Notice;\nvar _wp$element = wp.element,\n Component = _wp$element.Component,\n Fragment = _wp$element.Fragment;\nvar withSelect = wp.data.withSelect;\nvar compose = wp.compose.compose;\n\n\nvar LanguageSwitcherNotice = function LanguageSwitcherNotice(props) {\n\tif (WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage) {\n\t\treturn wp.element.createElement('div', null);\n\t}\n\n\tvar dev = '';\n\tif ('undefined' !== typeof WPGlobusBlockEditorDevelop && !WPGlobusBlockEditorDevelop.production) {\n\t\tdev = '(develop)';\n\t}\n\n\treturn wp.element.createElement(\n\t\tNotice,\n\t\t{ className: 'wpglobus-block-editor-panel__notice', status: 'informational', isDismissible: false },\n\t\t__('Select language'),\n\t\t' ',\n\t\tdev\n\t);\n};\n\nvar LanguageSwitcher = function LanguageSwitcher(props) {\n\n\tif (WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage) {\n\t\treturn wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: 'wpglobus-block-editor-panel__switcher-box' },\n\t\t\tWPGlobusGutenberg.i18n.save_post\n\t\t);\n\t}\n\n\tvar language = WPGlobusGutenberg.language;\n\tvar flagsUrl = WPGlobusGutenberg.flags_url;\n\tvar enabledLanguages = WPGlobusCoreData.enabled_languages;\n\tvar languageNames = WPGlobusCoreData.en_language_name;\n\tvar ref = location.href;\n\tvar refs = {};\n\tfor (var key in enabledLanguages) {\n\t\tif (-1 == ref.indexOf('language=' + language)) {\n\t\t\trefs[enabledLanguages[key]] = ref + '&language=' + enabledLanguages[key];\n\t\t} else {\n\t\t\trefs[enabledLanguages[key]] = ref.replace('language=' + language, 'language=' + enabledLanguages[key]);\n\t\t}\n\t}\n\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__switcher-box' },\n\t\twp.element.createElement(\n\t\t\t'ul',\n\t\t\tnull,\n\t\t\tenabledLanguages.map(function (lang) {\n\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t'li',\n\t\t\t\t\t{ key: lang },\n\t\t\t\t\twp.element.createElement('img', { className: 'wpglobus-block-editor-panel__flag', height: '20px', width: '20px', src: flagsUrl[lang] }),\n\t\t\t\t\t'\\xA0\\xA0',\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tButton,\n\t\t\t\t\t\t{ href: refs[lang], isSmall: true, isPrimary: true },\n\t\t\t\t\t\tlanguageNames[lang]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t})\n\t\t)\n\t);\n};\n\nvar WPGlobusInfo = function WPGlobusInfo(props) {\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__info' },\n\t\twp.element.createElement(\n\t\t\tButton,\n\t\t\t{ href: props.href, target: '_blank', isLink: true },\n\t\t\t__('WPGlobus Premium Add-ons')\n\t\t)\n\t);\n};\n\nvar SettingsLink = function SettingsLink(props) {\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__settings-link' },\n\t\twp.element.createElement(\n\t\t\tButton,\n\t\t\t{ href: props.href, isLink: true },\n\t\t\t__('Settings')\n\t\t)\n\t);\n};\n\nvar registerPlugin = wp.plugins.registerPlugin;\n\nvar WPGlobus_BlockEditor = function (_Component) {\n\t__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(WPGlobus_BlockEditor, _Component);\n\n\tfunction WPGlobus_BlockEditor() {\n\t\t__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, WPGlobus_BlockEditor);\n\n\t\tvar _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (WPGlobus_BlockEditor.__proto__ || __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default()(WPGlobus_BlockEditor)).apply(this, arguments));\n\n\t\tvar dev = '';\n\t\tif ('undefined' !== typeof WPGlobusBlockEditorDevelop && !WPGlobusBlockEditorDevelop.production) {\n\t\t\tdev = ' (develop)';\n\t\t}\n\n\t\t_this.state = {\n\t\t\toptionsTabUrl: WPGlobusGutenberg.block_editor_tab_url,\n\t\t\tstoreLink: WPGlobusGutenberg.store_link,\n\t\t\theaderTitle: __('WPGlobus') + dev,\n\t\t\tmoreMenuItemTitle: __('WPGlobus')\n\t\t};\n\n\t\tsetTimeout(function () {\n\t\t\tvar buttons = document.getElementsByClassName('components-icon-button');\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\t\tvar status = buttons[i].getAttribute('aria-label');\n\t\t\t\t//if ( status == 'WPGlobus' ) { \n\t\t\t\tif (-1 != status.indexOf('WPGlobus')) {\n\t\t\t\t\tvar done = buttons[i].dataset.done;\n\t\t\t\t\tif ('undefined' === typeof done) {\n\t\t\t\t\t\tvar content = buttons[i].innerHTML;\n\t\t\t\t\t\t//@todo buttons[i].classList.add('wpglobus-switcher-button');\n\t\t\t\t\t\tbuttons[i].innerHTML = content + '<img height=\"20px\" width=\"20px\" src=\"' + WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language] + '\" /> ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language];\n\t\t\t\t\t\tbuttons[i].dataset.done = 'yes';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 500);\n\t\treturn _this;\n\t}\n\n\t__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(WPGlobus_BlockEditor, [{\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\treturn wp.element.createElement(\n\t\t\t\tFragment,\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: 'wpglobus-gutenberg-sidebar'\n\t\t\t\t\t},\n\t\t\t\t\tthis.state.moreMenuItemTitle\n\t\t\t\t),\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPluginSidebar,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'wpglobus-gutenberg-sidebar',\n\t\t\t\t\t\ttitle: this.state.headerTitle\n\t\t\t\t\t},\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelBody,\n\t\t\t\t\t\t{ className: 'wpglobus-block-editor-panel__body' },\n\t\t\t\t\t\twp.element.createElement(LanguageSwitcherNotice, null),\n\t\t\t\t\t\twp.element.createElement(LanguageSwitcher, null),\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\twp.element.createElement(WPGlobusInfo, { href: this.state.storeLink }),\n\t\t\t\t\t\t\twp.element.createElement(SettingsLink, { href: this.state.optionsTabUrl })\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn WPGlobus_BlockEditor;\n}(Component);\n\nvar WPGBE = withSelect(function (select, _ref) {\n\tvar forceIsSaving = _ref.forceIsSaving;\n\n\tvar _select = select('core/editor'),\n\t getCurrentPostId = _select.getCurrentPostId,\n\t isSavingPost = _select.isSavingPost,\n\t isPublishingPost = _select.isPublishingPost,\n\t isAutosavingPost = _select.isAutosavingPost;\n\n\treturn {\n\t\tpostId: getCurrentPostId(),\n\t\tisSaving: forceIsSaving || isSavingPost(),\n\t\tisAutoSaving: isAutosavingPost(),\n\t\tisPublishing: isPublishingPost()\n\t};\n})(WPGlobus_BlockEditor);\n\nregisterPlugin('wpglobus-gutenberg', {\n\ticon: 'admin-site',\n\trender: WPGBE\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2lkZWJhci5qcz8yNWQ1Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBfT2JqZWN0JGdldFByb3RvdHlwZU9mIGZyb20gJ2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZ2V0LXByb3RvdHlwZS1vZic7XG5pbXBvcnQgX2NsYXNzQ2FsbENoZWNrIGZyb20gJ2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jbGFzc0NhbGxDaGVjayc7XG5pbXBvcnQgX2NyZWF0ZUNsYXNzIGZyb20gJ2JhYmVsLXJ1bnRpbWUvaGVscGV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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///43\n");
|
333 |
-
|
334 |
-
/***/ }),
|
335 |
-
/* 44 */
|
336 |
-
/***/ (function(module, exports, __webpack_require__) {
|
337 |
-
|
338 |
-
eval("module.exports = { \"default\": __webpack_require__(45), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzY3MWUiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA0NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///44\n");
|
339 |
-
|
340 |
-
/***/ }),
|
341 |
-
/* 45 */
|
342 |
-
/***/ (function(module, exports, __webpack_require__) {
|
343 |
-
|
344 |
-
eval("__webpack_require__(46);\nmodule.exports = __webpack_require__(0).Object.getPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzdkMmUiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1wcm90b3R5cGUtb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLk9iamVjdC5nZXRQcm90b3R5cGVPZjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///45\n");
|
345 |
-
|
346 |
-
/***/ }),
|
347 |
-
/* 46 */
|
348 |
-
/***/ (function(module, exports, __webpack_require__) {
|
349 |
-
|
350 |
-
eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(28);\nvar $getPrototypeOf = __webpack_require__(29);\n\n__webpack_require__(47)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzPzJhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgT2JqZWN0LmdldFByb3RvdHlwZU9mKE8pXG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciAkZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnZ2V0UHJvdG90eXBlT2YnLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZihpdCkge1xuICAgIHJldHVybiAkZ2V0UHJvdG90eXBlT2YodG9PYmplY3QoaXQpKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///46\n");
|
351 |
-
|
352 |
-
/***/ }),
|
353 |
-
/* 47 */
|
354 |
-
/***/ (function(module, exports, __webpack_require__) {
|
355 |
-
|
356 |
-
eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(5);\nvar core = __webpack_require__(0);\nvar fails = __webpack_require__(11);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1zYXAuanM/YmFhNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBtb3N0IE9iamVjdCBtZXRob2RzIGJ5IEVTNiBzaG91bGQgYWNjZXB0IHByaW1pdGl2ZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVksIGV4ZWMpIHtcbiAgdmFyIGZuID0gKGNvcmUuT2JqZWN0IHx8IHt9KVtLRVldIHx8IE9iamVjdFtLRVldO1xuICB2YXIgZXhwID0ge307XG4gIGV4cFtLRVldID0gZXhlYyhmbik7XG4gICRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogZmFpbHMoZnVuY3Rpb24gKCkgeyBmbigxKTsgfSksICdPYmplY3QnLCBleHApO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qtc2FwLmpzXG4vLyBtb2R1bGUgaWQgPSA0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///47\n");
|
357 |
-
|
358 |
-
/***/ }),
|
359 |
-
/* 48 */
|
360 |
-
/***/ (function(module, exports) {
|
361 |
-
|
362 |
-
eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2EtZnVuY3Rpb24uanM/OTRlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAodHlwZW9mIGl0ICE9ICdmdW5jdGlvbicpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGEgZnVuY3Rpb24hJyk7XG4gIHJldHVybiBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYS1mdW5jdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gNDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///48\n");
|
363 |
-
|
364 |
-
/***/ }),
|
365 |
-
/* 49 */
|
366 |
-
/***/ (function(module, exports, __webpack_require__) {
|
367 |
-
|
368 |
-
"use strict";
|
369 |
-
eval("\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NsYXNzQ2FsbENoZWNrLmpzPzY2YjkiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbmV4cG9ydHMuZGVmYXVsdCA9IGZ1bmN0aW9uIChpbnN0YW5jZSwgQ29uc3RydWN0b3IpIHtcbiAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uXCIpO1xuICB9XG59O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jbGFzc0NhbGxDaGVjay5qc1xuLy8gbW9kdWxlIGlkID0gNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///49\n");
|
370 |
-
|
371 |
-
/***/ }),
|
372 |
-
/* 50 */
|
373 |
-
/***/ (function(module, exports, __webpack_require__) {
|
374 |
-
|
375 |
-
"use strict";
|
376 |
-
eval("\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(51);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NyZWF0ZUNsYXNzLmpzP2MzMTAiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfZGVmaW5lUHJvcGVydHkgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5XCIpO1xuXG52YXIgX2RlZmluZVByb3BlcnR5MiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2RlZmluZVByb3BlcnR5KTtcblxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChv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vLyBtb2R1bGUgaWQgPSA1MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///50\n");
|
377 |
-
|
378 |
-
/***/ }),
|
379 |
-
/* 51 */
|
380 |
-
/***/ (function(module, exports, __webpack_require__) {
|
381 |
-
|
382 |
-
eval("module.exports = { \"default\": __webpack_require__(52), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanM/MGI4MyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2RlZmluZS1wcm9wZXJ0eVwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA1MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///51\n");
|
383 |
-
|
384 |
-
/***/ }),
|
385 |
-
/* 52 */
|
386 |
-
/***/ (function(module, exports, __webpack_require__) {
|
387 |
-
|
388 |
-
eval("__webpack_require__(53);\nvar $Object = __webpack_require__(0).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanM/ZjViMCJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5Jyk7XG52YXIgJE9iamVjdCA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Q7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGRlZmluZVByb3BlcnR5KGl0LCBrZXksIGRlc2MpIHtcbiAgcmV0dXJuICRPYmplY3QuZGVmaW5lUHJvcGVydHkoaXQsIGtleSwgZGVzYyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDUyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///52\n");
|
389 |
-
|
390 |
-
/***/ }),
|
391 |
-
/* 53 */
|
392 |
-
/***/ (function(module, exports, __webpack_require__) {
|
393 |
-
|
394 |
-
eval("var $export = __webpack_require__(5);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(4), 'Object', { defineProperty: __webpack_require__(3).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanM/OTgyOSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuLy8gMTkuMS4yLjQgLyAxNS4yLjMuNiBPYmplY3QuZGVmaW5lUHJvcGVydHkoTywgUCwgQXR0cmlidXRlcylcbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJyksICdPYmplY3QnLCB7IGRlZmluZVByb3BlcnR5OiByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDUzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///53\n");
|
395 |
-
|
396 |
-
/***/ }),
|
397 |
-
/* 54 */
|
398 |
-
/***/ (function(module, exports, __webpack_require__) {
|
399 |
-
|
400 |
-
"use strict";
|
401 |
-
eval("\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(33);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4uanM/Y2YwYSJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0cy5fX2VzTW9kdWxlID0gdHJ1ZTtcblxudmFyIF90eXBlb2YyID0gcmVxdWlyZShcIi4uL2hlbHBlcnMvdHlwZW9mXCIpO1xuXG52YXIgX3R5cGVvZjMgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF90eXBlb2YyKTtcblxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHsgcmV0dXJuIG9iaiAmJiBvYmouX19lc01vZHVsZSA/IG9iaiA6IHsgZGVmYXVsdDogb2JqIH07IH1cblxuZXhwb3J0cy5kZWZhdWx0ID0gZnVuY3Rpb24gKHNlbGYsIGNhbGwpIHtcbiAgaWYgKCFzZWxmKSB7XG4gICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIpO1xuICB9XG5cbiAgcmV0dXJuIGNhbGwgJiYgKCh0eXBlb2YgY2FsbCA9PT0gXCJ1bmRlZmluZWRcIiA/IFwidW5kZWZpbmVkXCIgOiAoMCwgX3R5cGVvZjMuZGVmYXVsdCkoY2FsbCkpID09PSBcIm9iamVjdFwiIHx8IHR5cGVvZiBjYWxsID09PSBcImZ1bmN0aW9uXCIpID8gY2FsbCA6IHNlbGY7XG59O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuLmpzXG4vLyBtb2R1bGUgaWQgPSA1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///54\n");
|
402 |
-
|
403 |
-
/***/ }),
|
404 |
-
/* 55 */
|
405 |
-
/***/ (function(module, exports, __webpack_require__) {
|
406 |
-
|
407 |
-
eval("module.exports = { \"default\": __webpack_require__(56), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC9pdGVyYXRvci5qcz82NzM4Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3JcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvc3ltYm9sL2l0ZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSA1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///55\n");
|
408 |
-
|
409 |
-
/***/ }),
|
410 |
-
/* 56 */
|
411 |
-
/***/ (function(module, exports, __webpack_require__) {
|
412 |
-
|
413 |
-
eval("__webpack_require__(57);\n__webpack_require__(66);\nmodule.exports = __webpack_require__(25).f('iterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pdGVyYXRvci5qcz9mZTdlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy93ZWIuZG9tLml0ZXJhYmxlJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX3drcy1leHQnKS5mKCdpdGVyYXRvcicpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///56\n");
|
414 |
-
|
415 |
-
/***/ }),
|
416 |
-
/* 57 */
|
417 |
-
/***/ (function(module, exports, __webpack_require__) {
|
418 |
-
|
419 |
-
"use strict";
|
420 |
-
eval("\nvar $at = __webpack_require__(58)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(34)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qcz9jZDA0Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkYXQgPSByZXF1aXJlKCcuL19zdHJpbmctYXQnKSh0cnVlKTtcblxuLy8gMjEuMS4zLjI3IFN0cmluZy5wcm90b3R5cGVbQEBpdGVyYXRvcl0oKVxucmVxdWlyZSgnLi9faXRlci1kZWZpbmUnKShTdHJpbmcsICdTdHJpbmcnLCBmdW5jdGlvbiAoaXRlcmF0ZWQpIHtcbiAgdGhpcy5fdCA9IFN0cmluZyhpdGVyYXRlZCk7IC8vIHRhcmdldFxuICB0aGlzLl9pID0gMDsgICAgICAgICAgICAgICAgLy8gbmV4dCBpbmRleFxuLy8gMjEuMS41LjIuMSAlU3RyaW5nSXRlcmF0b3JQcm90b3R5cGUlLm5leHQoKVxufSwgZnVuY3Rpb24gKCkge1xuICB2YXIgTyA9IHRoaXMuX3Q7XG4gIHZhciBpbmRleCA9IHRoaXMuX2k7XG4gIHZhciBwb2ludDtcbiAgaWYgKGluZGV4ID49IE8ubGVuZ3RoKSByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIHBvaW50ID0gJGF0KE8sIGluZGV4KTtcbiAgdGhpcy5faSArPSBwb2ludC5sZW5ndGg7XG4gIHJldHVybiB7IHZhbHVlOiBwb2ludCwgZG9uZTogZmFsc2UgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///57\n");
|
421 |
-
|
422 |
-
/***/ }),
|
423 |
-
/* 58 */
|
424 |
-
/***/ (function(module, exports, __webpack_require__) {
|
425 |
-
|
426 |
-
eval("var toInteger = __webpack_require__(19);\nvar defined = __webpack_require__(15);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3N0cmluZy1hdC5qcz84N2FlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbi8vIHRydWUgIC0+IFN0cmluZyNhdFxuLy8gZmFsc2UgLT4gU3RyaW5nI2NvZGVQb2ludEF0XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChUT19TVFJJTkcpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uICh0aGF0LCBwb3MpIHtcbiAgICB2YXIgcyA9IFN0cmluZyhkZWZpbmVkKHRoYXQpKTtcbiAgICB2YXIgaSA9IHRvSW50ZWdlcihwb3MpO1xuICAgIHZhciBsID0gcy5sZW5ndGg7XG4gICAgdmFyIGEsIGI7XG4gICAgaWYgKGkgPCAwIHx8IGkgPj0gbCkgcmV0dXJuIFRPX1NUUklORyA/ICcnIDogdW5kZWZpbmVkO1xuICAgIGEgPSBzLmNoYXJDb2RlQXQoaSk7XG4gICAgcmV0dXJuIGEgPCAweGQ4MDAgfHwgYSA+IDB4ZGJmZiB8fCBpICsgMSA9PT0gbCB8fCAoYiA9IHMuY2hhckNvZGVBdChpICsgMSkpIDwgMHhkYzAwIHx8IGIgPiAweGRmZmZcbiAgICAgID8gVE9fU1RSSU5HID8gcy5jaGFyQXQoaSkgOiBhXG4gICAgICA6IFRPX1NUUklORyA/IHMuc2xpY2UoaSwgaSArIDIpIDogKGEgLSAweGQ4MDAgPDwgMTApICsgKGIgLSAweGRjMDApICsgMHgxMDAwMDtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc3RyaW5nLWF0LmpzXG4vLyBtb2R1bGUgaWQgPSA1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///58\n");
|
427 |
-
|
428 |
-
/***/ }),
|
429 |
-
/* 59 */
|
430 |
-
/***/ (function(module, exports, __webpack_require__) {
|
431 |
-
|
432 |
-
"use strict";
|
433 |
-
eval("\nvar create = __webpack_require__(21);\nvar descriptor = __webpack_require__(14);\nvar setToStringTag = __webpack_require__(24);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(6)(IteratorPrototype, __webpack_require__(9)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItY3JlYXRlLmpzP2Y3ODUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGNyZWF0ZSA9IHJlcXVpcmUoJy4vX29iamVjdC1jcmVhdGUnKTtcbnZhciBkZXNjcmlwdG9yID0gcmVxdWlyZSgnLi9fcHJvcGVydHktZGVzYycpO1xudmFyIHNldFRvU3RyaW5nVGFnID0gcmVxdWlyZSgnLi9fc2V0LXRvLXN0cmluZy10YWcnKTtcbnZhciBJdGVyYXRvclByb3RvdHlwZSA9IHt9O1xuXG4vLyAyNS4xLjIuMS4xICVJdGVyYXRvclByb3RvdHlwZSVbQEBpdGVyYXRvcl0oKVxucmVxdWlyZSgnLi9faGlkZScpKEl0ZXJhdG9yUHJvdG90eXBlLCByZXF1aXJlKCcuL193a3MnKSgnaXRlcmF0b3InKSwgZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpczsgfSk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKENvbnN0cnVjdG9yLCBOQU1FLCBuZXh0KSB7XG4gIENvbnN0cnVjdG9yLnByb3RvdHlwZSA9IGNyZWF0ZShJdGVyYXRvclByb3RvdHlwZSwgeyBuZXh0OiBkZXNjcmlwdG9yKDEsIG5leHQpIH0pO1xuICBzZXRUb1N0cmluZ1RhZyhDb25zdHJ1Y3RvciwgTkFNRSArICcgSXRlcmF0b3InKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlci1jcmVhdGUuanNcbi8vIG1vZHVsZSBpZCA9IDU5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///59\n");
|
434 |
-
|
435 |
-
/***/ }),
|
436 |
-
/* 60 */
|
437 |
-
/***/ (function(module, exports, __webpack_require__) {
|
438 |
-
|
439 |
-
eval("var dP = __webpack_require__(3);\nvar anObject = __webpack_require__(10);\nvar getKeys = __webpack_require__(22);\n\nmodule.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcHMuanM/YWEyYSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA6IGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMoTywgUHJvcGVydGllcykge1xuICBhbk9iamVjdChPKTtcbiAgdmFyIGtleXMgPSBnZXRLZXlzKFByb3BlcnRpZXMpO1xuICB2YXIgbGVuZ3RoID0ga2V5cy5sZW5ndGg7XG4gIHZhciBpID0gMDtcbiAgdmFyIFA7XG4gIHdoaWxlIChsZW5ndGggPiBpKSBkUC5mKE8sIFAgPSBrZXlzW2krK10sIFByb3BlcnRpZXNbUF0pO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWRwcy5qc1xuLy8gbW9kdWxlIGlkID0gNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///60\n");
|
440 |
-
|
441 |
-
/***/ }),
|
442 |
-
/* 61 */
|
443 |
-
/***/ (function(module, exports, __webpack_require__) {
|
444 |
-
|
445 |
-
eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(37);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lvYmplY3QuanM/MzE0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIGFuZCBub24tZW51bWVyYWJsZSBvbGQgVjggc3RyaW5nc1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXByb3RvdHlwZS1idWlsdGluc1xubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QoJ3onKS5wcm9wZXJ0eUlzRW51bWVyYWJsZSgwKSA/IE9iamVjdCA6IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gY29mKGl0KSA9PSAnU3RyaW5nJyA/IGl0LnNwbGl0KCcnKSA6IE9iamVjdChpdCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lvYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDYxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///61\n");
|
446 |
-
|
447 |
-
/***/ }),
|
448 |
-
/* 62 */
|
449 |
-
/***/ (function(module, exports, __webpack_require__) {
|
450 |
-
|
451 |
-
eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(8);\nvar toLength = __webpack_require__(63);\nvar toAbsoluteIndex = __webpack_require__(64);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FycmF5LWluY2x1ZGVzLmpzP2JjNTciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsc2UgLT4gQXJyYXkjaW5kZXhPZlxuLy8gdHJ1ZSAgLT4gQXJ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A9PT0gZWwpIHJldHVybiBJU19JTkNMVURFUyB8fCBpbmRleCB8fCAwO1xuICAgIH0gcmV0dXJuICFJU19JTkNMVURFUyAmJiAtMTtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYXJyYXktaW5jbHVkZXMuanNcbi8vIG1vZHVsZSBpZCA9IDYyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///62\n");
|
452 |
-
|
453 |
-
/***/ }),
|
454 |
-
/* 63 */
|
455 |
-
/***/ (function(module, exports, __webpack_require__) {
|
456 |
-
|
457 |
-
eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(19);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWxlbmd0aC5qcz80MTExIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xNSBUb0xlbmd0aFxudmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciBtaW4gPSBNYXRoLm1pbjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpdCA+IDAgPyBtaW4odG9JbnRlZ2VyKGl0KSwgMHgxZmZmZmZmZmZmZmZmZikgOiAwOyAvLyBwb3coMiwgNTMpIC0gMSA9PSA5MDA3MTk5MjU0NzQwOTkxXG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWxlbmd0aC5qc1xuLy8gbW9kdWxlIGlkID0gNjNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///63\n");
|
458 |
-
|
459 |
-
/***/ }),
|
460 |
-
/* 64 */
|
461 |
-
/***/ (function(module, exports, __webpack_require__) {
|
462 |
-
|
463 |
-
eval("var toInteger = __webpack_require__(19);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWFic29sdXRlLWluZGV4LmpzPzdlNDAiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciBtYXggPSBNYXRoLm1heDtcbnZhciBtaW4gPSBNYXRoLm1pbjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGluZGV4LCBsZW5ndGgpIHtcbiAgaW5kZXggPSB0b0ludGVnZXIoaW5kZXgpO1xuICByZXR1cm4gaW5kZXggPCAwID8gbWF4KGluZGV4ICsgbGVuZ3RoLCAwKSA6IG1pbihpbmRleCwgbGVuZ3RoKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8tYWJzb2x1dGUtaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDY0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///64\n");
|
464 |
-
|
465 |
-
/***/ }),
|
466 |
-
/* 65 */
|
467 |
-
/***/ (function(module, exports, __webpack_require__) {
|
468 |
-
|
469 |
-
eval("var document = __webpack_require__(1).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2h0bWwuanM/NDRmMiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZG9jdW1lbnQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5kb2N1bWVudDtcbm1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQgJiYgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2h0bWwuanNcbi8vIG1vZHVsZSBpZCA9IDY1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///65\n");
|
470 |
-
|
471 |
-
/***/ }),
|
472 |
-
/* 66 */
|
473 |
-
/***/ (function(module, exports, __webpack_require__) {
|
474 |
-
|
475 |
-
eval("__webpack_require__(67);\nvar global = __webpack_require__(1);\nvar hide = __webpack_require__(6);\nvar Iterators = __webpack_require__(20);\nvar TO_STRING_TAG = __webpack_require__(9)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZS5qcz9mYWQzIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vZXM2LmFycmF5Lml0ZXJhdG9yJyk7XG52YXIgZ2xvYmFsID0gcm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iYgQ29sbGVjdGlvbi5wcm90b3R5cGU7XG4gIGlmIChwcm90byAmJiAhcHJvdG9bVE9fU1RSSU5HX1RBR10pIGhpZGUocHJvdG8sIFRPX1NUUklOR19UQUcsIE5BTUUpO1xuICBJdGVyYXRvcnNbTkFNRV0gPSBJdGVyYXRvcnMuQXJyYXk7XG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy93ZWIuZG9tLml0ZXJhYmxlLmpzXG4vLyBtb2R1bGUgaWQgPSA2NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///66\n");
|
476 |
-
|
477 |
-
/***/ }),
|
478 |
-
/* 67 */
|
479 |
-
/***/ (function(module, exports, __webpack_require__) {
|
480 |
-
|
481 |
-
"use strict";
|
482 |
-
eval("\nvar addToUnscopables = __webpack_require__(68);\nvar step = __webpack_require__(69);\nvar Iterators = __webpack_require__(20);\nvar toIObject = __webpack_require__(8);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(34)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LmFycmF5Lml0ZXJhdG9yLmpzP2M0NjkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIGFkZFRvVW5zY29wYWJsZXMgPSByZXF1aXJlKCcuL19hZGQtdG8tdW5zY29wYWJsZXMnKTtcbnZhciBzdGVwID0gcmVxdWlyZSgnLi9faXRlci1zdGVwJyk7XG52YXIgSXRlcmF0b3JzID0gcmVxdWlyZSgnLi9faXRlcmF0b3JzJyk7XG52YXIgdG9JT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8taW9iamVjdCcpO1xuXG4vLyAyMi4xLjMuNCBBcnJheS5wcm90b3R5cGUuZW50cmllcygpXG4vLyAyMi4xLjMuMTMgQXJyYXkucHJvdG90eXBlLmtleXMoKVxuLy8gMjIuMS4zLjI5IEFycmF5LnByb3RvdHlwZS52YWx1ZXMoKVxuLy8gMjIuMS4zLjMwIEFycmF5LnByb3RvdHlwZVtAQGl0ZXJhdG9yXSgpXG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2l0ZXItZGVmaW5lJykoQXJyYXksICdBcnJheScsIGZ1bmN0aW9uIChpdGVyYXRlZCwga2luZCkge1xuICB0aGlzLl90ID0gdG9JT2JqZWN0KGl0ZXJhdGVkKTsgLy8gdGFyZ2V0XG4gIHRoaXMuX2kgPSAwOyA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iQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///67\n");
|
483 |
-
|
484 |
-
/***/ }),
|
485 |
-
/* 68 */
|
486 |
-
/***/ (function(module, exports) {
|
487 |
-
|
488 |
-
eval("module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FkZC10by11bnNjb3BhYmxlcy5qcz9lMjY3Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FkZC10by11bnNjb3BhYmxlcy5qc1xuLy8gbW9kdWxlIGlkID0gNjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///68\n");
|
489 |
-
|
490 |
-
/***/ }),
|
491 |
-
/* 69 */
|
492 |
-
/***/ (function(module, exports) {
|
493 |
-
|
494 |
-
eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItc3RlcC5qcz8xMDY2Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGRvbmUsIHZhbHVlKSB7XG4gIHJldHVybiB7IHZhbHVlOiB2YWx1ZSwgZG9uZTogISFkb25lIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItc3RlcC5qc1xuLy8gbW9kdWxlIGlkID0gNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///69\n");
|
495 |
-
|
496 |
-
/***/ }),
|
497 |
-
/* 70 */
|
498 |
-
/***/ (function(module, exports, __webpack_require__) {
|
499 |
-
|
500 |
-
eval("module.exports = { \"default\": __webpack_require__(71), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC5qcz9lNTA1Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9zeW1ib2xcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvc3ltYm9sLmpzXG4vLyBtb2R1bGUgaWQgPSA3MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///70\n");
|
501 |
-
|
502 |
-
/***/ }),
|
503 |
-
/* 71 */
|
504 |
-
/***/ (function(module, exports, __webpack_require__) {
|
505 |
-
|
506 |
-
eval("__webpack_require__(72);\n__webpack_require__(77);\n__webpack_require__(78);\n__webpack_require__(79);\nmodule.exports = __webpack_require__(0).Symbol;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pbmRleC5qcz8wNzA3Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2LnN5bWJvbCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZycpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcuc3ltYm9sLmFzeW5jLWl0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNy5zeW1ib2wub2JzZXJ2YWJsZScpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuU3ltYm9sO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///71\n");
|
507 |
-
|
508 |
-
/***/ }),
|
509 |
-
/* 72 */
|
510 |
-
/***/ (function(module, exports, __webpack_require__) {
|
511 |
-
|
512 |
-
"use strict";
|
513 |
-
eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(1);\nvar has = __webpack_require__(2);\nvar DESCRIPTORS = __webpack_require__(4);\nvar $export = __webpack_require__(5);\nvar redefine = __webpack_require__(35);\nvar META = __webpack_require__(73).KEY;\nvar $fails = __webpack_require__(11);\nvar shared = __webpack_require__(17);\nvar setToStringTag = __webpack_require__(24);\nvar uid = __webpack_require__(13);\nvar wks = __webpack_require__(9);\nvar wksExt = __webpack_require__(25);\nvar wksDefine = __webpack_require__(26);\nvar enumKeys = __webpack_require__(74);\nvar isArray = __webpack_require__(75);\nvar anObject = __webpack_require__(10);\nvar isObject = __webpack_require__(7);\nvar toIObject = __webpack_require__(8);\nvar toPrimitive = __webpack_require__(18);\nvar createDesc = __webpack_require__(14);\nvar _create = __webpack_require__(21);\nvar gOPNExt = __webpack_require__(76);\nvar $GOPD = __webpack_require__(40);\nvar $DP = __webpack_require__(3);\nvar $keys = __webpack_require__(22);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(39).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(27).f = $propertyIsEnumerable;\n __webpack_require__(38).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(12)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(6)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LnN5bWJvbC5qcz83ZDY3Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0Jztcbi8vIEVDTUFTY3JpcHQgNiBzeW1ib2xzIHNoaW1cbnZhciBnbG9iYWwgPSByZXF1aXJlKCcuL19nbG9iY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
|
519 |
-
eval("var META = __webpack_require__(13)('meta');\nvar isObject = __webpack_require__(7);\nvar has = __webpack_require__(2);\nvar setDesc = __webpack_require__(3).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(11)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX21ldGEuanM/ZDNhMyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgTUVUQSA9IHJlcXVpcmUoJy4vX3VpZCcpKCdtZXRhJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBoYX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dWxlcy9fbWV0YS5qc1xuLy8gbW9kdWxlIGlkID0gNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///73\n");
|
520 |
-
|
521 |
-
/***/ }),
|
522 |
-
/* 74 */
|
523 |
-
/***/ (function(module, exports, __webpack_require__) {
|
524 |
-
|
525 |
-
eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(22);\nvar gOPS = __webpack_require__(38);\nvar pIE = __webpack_require__(27);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2VudW0ta2V5cy5qcz81ZGNlIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGF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webpack_require__) {
|
530 |
-
|
531 |
-
eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(37);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLWFycmF5LmpzP2VkNDMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjIgSXNBcnJheShhcmd1bWVudClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gQXJyYXkuaXNBcnJheSB8fCBmdW5jdGlvbiBpc0FycmF5KGFyZykge1xuICByZXR1cm4gY29mKGFyZykgPT0gJ0FycmF5Jztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///75\n");
|
532 |
-
|
533 |
-
/***/ }),
|
534 |
-
/* 76 */
|
535 |
-
/***/ (function(module, exports, __webpack_require__) {
|
536 |
-
|
537 |
-
eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(8);\nvar gOPN = __webpack_require__(39).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLWV4dC5qcz80NmI3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbGxiYWNrIGZvciBJRTExIGJ1Z2d5IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzIHdpdGggaWZyYW1lIGFuZCB3aW5kb3dcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgZ09QTiA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BuJykuZjtcbnZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG52YXIgd2luZG93TmFtZXMgPSB0eXBlb2Ygd2luZG93ID09ICdvYmplY3QnICYmIHdpbmRvdyAmJiBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lc1xuICA/IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHdpbmRvdykgOiBbXTtcblxudmFyIGdldFdpbmRvd05hbWVzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIGdPUE4oaXQpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgcmV0dXJuIHdpbmRvd05hbWVzLnNsaWNlKCk7XG4gIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzLmYgPSBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eU5hbWVzKGl0KSB7XG4gIHJldHVybiB3aW5kb3dOYW1lcyAmJiB0b1N0cmluZy5jYWxsKGl0KSA9PSAnW29iamVjdCBXaW5kb3ddJyA/IGdldFdpbmRvd05hbWVzKGl0KSA6IGdPUE4odG9JT2JqZWN0KGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLWV4dC5qc1xuLy8gbW9kdWxlIGlkID0gNzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///76\n");
|
538 |
-
|
539 |
-
/***/ }),
|
540 |
-
/* 77 */
|
541 |
-
/***/ (function(module, exports) {
|
542 |
-
|
543 |
-
eval("//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzcuanMiLCJzb3VyY2VzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///77\n");
|
544 |
-
|
545 |
-
/***/ }),
|
546 |
-
/* 78 */
|
547 |
-
/***/ (function(module, exports, __webpack_require__) {
|
548 |
-
|
549 |
-
eval("__webpack_require__(26)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qcz8zOTg5Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3drcy1kZWZpbmUnKSgnYXN5bmNJdGVyYXRvcicpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///78\n");
|
550 |
-
|
551 |
-
/***/ }),
|
552 |
-
/* 79 */
|
553 |
-
/***/ (function(module, exports, __webpack_require__) {
|
554 |
-
|
555 |
-
eval("__webpack_require__(26)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5vYnNlcnZhYmxlLmpzPzQxNjciXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fd2tzLWRlZmluZScpKCdvYnNlcnZhYmxlJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanNcbi8vIG1vZHVsZSBpZCA9IDc5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///79\n");
|
556 |
-
|
557 |
-
/***/ }),
|
558 |
-
/* 80 */
|
559 |
-
/***/ (function(module, exports, __webpack_require__) {
|
560 |
-
|
561 |
-
"use strict";
|
562 |
-
eval("\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(81);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(85);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(33);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzPzNkZmQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfc2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZlwiKTtcblxudmFyIF9zZXRQcm90b3R5cGVPZjIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9zZXRQcm90b3R5cGVPZik7XG5cbnZhciBfY3JlYXRlID0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XG4gIH0pO1xuICBpZiAoc3VwZXJDbGFzcykgX3NldFByb3RvdHlwZU9mMi5kZWZhdWx0ID8gKDAsIF9zZXRQcm90b3R5cGVPZjIuZGVmYXVsdCkoc3ViQ2xhc3MsIHN1cGVyQ2xhc3MpIDogc3ViQ2xhc3MuX19wcm90b19fID0gc3VwZXJDbGFzcztcbn07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzXG4vLyBtb2R1bGUgaWQgPSA4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///80\n");
|
563 |
-
|
564 |
-
/***/ }),
|
565 |
-
/* 81 */
|
566 |
-
/***/ (function(module, exports, __webpack_require__) {
|
567 |
-
|
568 |
-
eval("module.exports = { \"default\": __webpack_require__(82), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzPzkyMjAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9zZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA4MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///81\n");
|
569 |
-
|
570 |
-
/***/ }),
|
571 |
-
/* 82 */
|
572 |
-
/***/ (function(module, exports, __webpack_require__) {
|
573 |
-
|
574 |
-
eval("__webpack_require__(83);\nmodule.exports = __webpack_require__(0).Object.setPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzPzhiZjAiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLk9iamVjdC5zZXRQcm90b3R5cGVPZjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///82\n");
|
575 |
-
|
576 |
-
/***/ }),
|
577 |
-
/* 83 */
|
578 |
-
/***/ (function(module, exports, __webpack_require__) {
|
579 |
-
|
580 |
-
eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(5);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(84).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5zZXQtcHJvdG90eXBlLW9mLmpzPzdiMTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjE5IE9iamVjdC5zZXRQcm90b3R5cGVPZihPLCBwcm90bylcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHsgc2V0UHJvdG90eXBlT2Y6IHJlcXVpcmUoJy4vX3NldC1wcm90bycpLnNldCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gODNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///83\n");
|
581 |
-
|
582 |
-
/***/ }),
|
583 |
-
/* 84 */
|
584 |
-
/***/ (function(module, exports, __webpack_require__) {
|
585 |
-
|
586 |
-
eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(7);\nvar anObject = __webpack_require__(10);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(30)(Function.call, __webpack_require__(40).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC1wcm90by5qcz82NWE0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIFdvcmtzIHdpdGggX19wcm90b19fIG9ubHkuIE9sZCB2OCBjYW4ndCB3b3JrIHdpdGggbnVsbCBwcm90byBvYmplY3RzLlxuLyogZXNsaW50LWRpc2FibGUgbm8tcHJvdG8gKi9cbnZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xudmFyIGFuT2JqZWN0ID0gcmVxdWlyZSgnLi9fYW4tb2JqZWN0Jyk7XG52YXIgY2hlY2sgPSBmdW5jdGlvbiAoTywgcHJvdG8pIHtcbiAgYW5PYmplY3QoTyk7XG4gIGlmICghaXNPYmplY3QocHJvdG8pICYmIHByb3RvICE9PSBudWxsKSB0aHJvdyBUeXBlR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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///84\n");
|
587 |
-
|
588 |
-
/***/ }),
|
589 |
-
/* 85 */
|
590 |
-
/***/ (function(module, exports, __webpack_require__) {
|
591 |
-
|
592 |
-
eval("module.exports = { \"default\": __webpack_require__(86), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9jcmVhdGUuanM/M2FmNCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2NyZWF0ZVwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSA4NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///85\n");
|
593 |
-
|
594 |
-
/***/ }),
|
595 |
-
/* 86 */
|
596 |
-
/***/ (function(module, exports, __webpack_require__) {
|
597 |
-
|
598 |
-
eval("__webpack_require__(87);\nvar $Object = __webpack_require__(0).Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGUuanM/YTBjZSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5vYmplY3QuY3JlYXRlJyk7XG52YXIgJE9iamVjdCA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Q7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGNyZWF0ZShQLCBEKSB7XG4gIHJldHVybiAkT2JqZWN0LmNyZWF0ZShQLCBEKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2NyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///86\n");
|
599 |
-
|
600 |
-
/***/ }),
|
601 |
-
/* 87 */
|
602 |
-
/***/ (function(module, exports, __webpack_require__) {
|
603 |
-
|
604 |
-
eval("var $export = __webpack_require__(5);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(21) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2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g/assets/js/dist/wpglobus-block-editor.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(c){var t={};function l(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return c[e].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.m=c,l.c=t,l.d=function(e,n,c){l.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:c})},l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,"a",n),n},l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.p="",l(l.s=41)}([function(module,exports){eval("var core = module.exports = { version: '2.6.5' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY29yZS5qcz8xNWUwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gbW9kdWxlLmV4cG9ydHMgPSB7IHZlcnNpb246ICcyLjYuNScgfTtcbmlmICh0eXBlb2YgX19lID09ICdudW1iZXInKSBfX2UgPSBjb3JlOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVuZGVmXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fY29yZS5qc1xuLy8gbW9kdWxlIGlkID0gMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n")},function(module,exports){eval("// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZ2xvYmFsLmpzP2VjYWIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gaHR0cHM6Ly9naXRodWIuY29tL3psb2lyb2NrL2NvcmUtanMvaXNzdWVzLzg2I2lzc3VlY29tbWVudC0xMTU3NTkwMjhcbnZhciBnbG9iYWwgPSBtb2R1bGUuZXhwb3J0cyA9IHR5cGVvZiB3aW5kb3cgIT0gJ3VuZGVmaW5lZCcgJiYgd2luZG93Lk1hdGggPT0gTWF0aFxuICA/IHdpbmRvdyA6IHR5cGVvZiBzZWxmICE9ICd1bmRlZmluZWQnICYmIHNlbGYuTWF0aCA9PSBNYXRoID8gc2VsZlxuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tbmV3LWZ1bmNcbiAgOiBGdW5jdGlvbigncmV0dXJuIHRoaXMnKSgpO1xuaWYgKHR5cGVvZiBfX2cgPT0gJ251bWJlcicpIF9fZyA9IGdsb2JhbDsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bmRlZlxuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qc1xuLy8gbW9kdWxlIGlkID0gMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///1\n")},function(module,exports){eval("var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGFzLmpzPzBmNjIiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGhhc093blByb3BlcnR5ID0ge30uaGFzT3duUHJvcGVydHk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwga2V5KSB7XG4gIHJldHVybiBoYXNPd25Qcm9wZXJ0eS5jYWxsKGl0LCBrZXkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19oYXMuanNcbi8vIG1vZHVsZSBpZCA9IDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///2\n")},function(module,exports,__webpack_require__){eval("var anObject = __webpack_require__(10);\nvar IE8_DOM_DEFINE = __webpack_require__(31);\nvar toPrimitive = __webpack_require__(18);\nvar dP = Object.defineProperty;\n\nexports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attribut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i8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZHAuanNcbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///3\n")},function(module,exports,__webpack_require__){eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(11)(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZGVzY3JpcHRvcnMuanM/Zjg0ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUaGFuaydzIElFOCBmb3IgaGlzIGZ1bm55IGRlZmluZVByb3BlcnR5XG5tb2R1bGUuZXhwb3J0cyA9ICFyZXF1aXJlKCcuL19mYWlscycpKGZ1bmN0aW9uICgpIHtcbiAgcmV0dXJuIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh7fSwgJ2EnLCB7IGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gNzsgfSB9KS5hICE9IDc7XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kZXNjcmlwdG9ycy5qc1xuLy8gbW9kdWxlIGlkID0gNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///4\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(1);\nvar core = __webpack_require__(0);\nvar ctx = __webpack_require__(30);\nvar hide = __webpack_require__(6);\nvar has = __webpack_require__(2);\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fZXhwb3J0LmpzPzkwY2QiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIGNvcmUgPSByZXF1aXJlKCcuL19jb3JlJyk7XG52YXIgY3R4ID0gcmVxdWlyZSgnLi9fY3R4Jyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciBoYXMgPSByZXF1aXJlKCcuL19oYXMnKTtcbnZhciBQUk9UT1RZUEUgPSAncHJvdG90eXBlJztcblxudmFyICRleHBvcnQgPSBmdW5jdGlvbiAodHlwZSwgbmFtZSwgc291cmNlKSB7XG4gIHZhciBJU19GT1JDRUQgPSB0eXBlICYgJGV4cG9ydC5GO1xuICB2YXIgSVNfR0xPQkFMID0gdHlwZSAmICRleHBvcnQuRztcbiAgdmFyIElTX1NUQVRJQyA9IHR5cGUgJiAkZXhwb3J0LlM7XG4gIHZhciBJU19QUk9UTyA9IHR5cGUgJiAkZXhwb3J0LlA7XG4gIHZhciBJU19CSU5EID0gdHlwZSAmICRleHBvcnQuQjtcbiAgdmFyIElTX1dSQVAgPSB0eXBlICYgJGV4cG9ydC5XO1xuICB2YXIgZXhwb3J0cyA9IElTX0dMT0JBTCA/IGNvcmUgOiBjb3JlW25hbWVdIHx8IChjb3JlW25hbWVd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3);\nvar createDesc = __webpack_require__(14);\nmodule.exports = __webpack_require__(4) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faGlkZS5qcz84NDljIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBkUCA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpO1xudmFyIGNyZWF0ZURlc2MgPSByZXF1aXJlKCcuL19wcm9wZXJ0eS1kZXNjJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBmdW5jdGlvbiAob2JqZWN0LCBrZXksIHZhbHVlKSB7XG4gIHJldHVybiBkUC5mKG9iamVjdCwga2V5LCBjcmVhdGVEZXNjKDEsIHZhbHVlKSk7XG59IDogZnVuY3Rpb24gKG9iamVjdCwga2V5LCB2YWx1ZSkge1xuICBvYmplY3Rba2V5XSA9IHZhbHVlO1xuICByZXR1cm4gb2JqZWN0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19oaWRlLmpzXG4vLyBtb2R1bGUgaWQgPSA2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///6\n")},function(module,exports){eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtb2JqZWN0LmpzPzEyYTgiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHR5cGVvZiBpdCA9PT0gJ29iamVjdCcgPyBpdCAhPT0gbnVsbCA6IHR5cGVvZiBpdCA9PT0gJ2Z1bmN0aW9uJztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtb2JqZWN0LmpzXG4vLyBtb2R1bGUgaWQgPSA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n")},function(module,exports,__webpack_require__){eval("// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = __webpack_require__(61);\nvar defined = __webpack_require__(15);\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW9iamVjdC5qcz80ZGM0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIHRvIGluZGV4ZWQgb2JqZWN0LCB0b09iamVjdCB3aXRoIGZhbGxiYWNrIGZvciBub24tYXJyYXktbGlrZSBFUzMgc3RyaW5nc1xudmFyIElPYmplY3QgPSByZXF1aXJlKCcuL19pb2JqZWN0Jyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBJT2JqZWN0KGRlZmluZWQoaXQpKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8taW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///8\n")},function(module,exports,__webpack_require__){eval("var store = __webpack_require__(17)('wks');\nvar uid = __webpack_require__(13);\nvar Symbol = __webpack_require__(1).Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLmpzPzc1MmMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHN0b3JlID0gcmVxdWlyZSgnLi9fc2hhcmVkJykoJ3drcycpO1xudmFyIHVpZCA9IHJlcXVpcmUoJy4vX3VpZCcpO1xudmFyIFN5bWJvbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLlN5bWJvbDtcbnZhciBVU0VfU1lNQk9MID0gdHlwZW9mIFN5bWJvbCA9PSAnZnVuY3Rpb24nO1xuXG52YXIgJGV4cG9ydHMgPSBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIHJldHVybiBzdG9yZVtuYW1lXSB8fCAoc3RvcmVbbmFtZV0gPVxuICAgIFVTRV9TWU1CT0wgJiYgU3ltYm9sW25hbWVdIHx8IChVU0VfU1lNQk9MID8gU3ltYm9sIDogdWlkKSgnU3ltYm9sLicgKyBuYW1lKSk7XG59O1xuXG4kZXhwb3J0cy5zdG9yZSA9IHN0b3JlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///9\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(7);\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FuLW9iamVjdC5qcz9lZmIzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpc09iamVjdCA9IHJlcXVpcmUoJy4vX2lzLW9iamVjdCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKCFpc09iamVjdChpdCkpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGFuIG9iamVjdCEnKTtcbiAgcmV0dXJuIGl0O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1vYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///10\n")},function(module,exports){eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzPzRiY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoZXhlYykge1xuICB0cnkge1xuICAgIHJldHVybiAhIWV4ZWMoKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2ZhaWxzLmpzXG4vLyBtb2R1bGUgaWQgPSAxMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///11\n")},function(module,exports){eval("module.exports = true;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2xpYnJhcnkuanM/M2I4OCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHRydWU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbGlicmFyeS5qc1xuLy8gbW9kdWxlIGlkID0gMTJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///12\n")},function(module,exports){eval("var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qcz9kYzRhIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBpZCA9IDA7XG52YXIgcHggPSBNYXRoLnJhbmRvbSgpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcHgpLnRvU3RyaW5nKDM2KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3VpZC5qc1xuLy8gbW9kdWxlIGlkID0gMTNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///13\n")},function(module,exports){eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanM/NWZjMCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChiaXRtYXAsIHZhbHVlKSB7XG4gIHJldHVybiB7XG4gICAgZW51bWVyYWJsZTogIShiaXRtYXAgJiAxKSxcbiAgICBjb25maWd1cmFibGU6ICEoYml0bWFwICYgMiksXG4gICAgd3JpdGFibGU6ICEoYml0bWFwICYgNCksXG4gICAgdmFsdWU6IHZhbHVlXG4gIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3Byb3BlcnR5LWRlc2MuanNcbi8vIG1vZHVsZSBpZCA9IDE0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///14\n")},function(module,exports){eval('// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError("Can\'t call method on " + it);\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RlZmluZWQuanM/ZTc2OCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjIuMSBSZXF1aXJlT2JqZWN0Q29lcmNpYmxlKGFyZ3VtZW50KVxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgaWYgKGl0ID09IHVuZGVmaW5lZCkgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY2FsbCBtZXRob2Qgb24gIFwiICsgaXQpO1xuICByZXR1cm4gaXQ7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RlZmluZWQuanNcbi8vIG1vZHVsZSBpZCA9IDE1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///15\n')},function(module,exports,__webpack_require__){eval("var shared = __webpack_require__(17)('keys');\nvar uid = __webpack_require__(13);\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC1rZXkuanM/NmIxZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgc2hhcmVkID0gcmVxdWlyZSgnLi9fc2hhcmVkJykoJ2tleXMnKTtcbnZhciB1aWQgPSByZXF1aXJlKCcuL191aWQnKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGtleSkge1xuICByZXR1cm4gc2hhcmVkW2tleV0gfHwgKHNoYXJlZFtrZXldID0gdWlkKGtleSkpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zaGFyZWQta2V5LmpzXG4vLyBtb2R1bGUgaWQgPSAxNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///16\n")},function(module,exports,__webpack_require__){eval("var core = __webpack_require__(0);\nvar global = __webpack_require__(1);\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: __webpack_require__(12) ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qcz83YmMwIl0sInNvdXJjZXNDb250ZW50IjpbInZhciBjb3JlID0gcmVxdWlyZSgnLi9fY29yZScpO1xudmFyIGdsb2JhbCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpO1xudmFyIFNIQVJFRCA9ICdfX2NvcmUtanNfc2hhcmVkX18nO1xudmFyIHN0b3JlID0gZ2xvYmFsW1NIQVJFRF0gfHwgKGdsb2JhbFtTSEFSRURdID0ge30pO1xuXG4obW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xuICByZXR1cm4gc3RvcmVba2V5XSB8fCAoc3RvcmVba2V5XSA9IHZhbHVlICE9PSB1bmRlZmluZWQgPyB2YWx1ZSA6IHt9KTtcbn0pKCd2ZXJzaW9ucycsIFtdKS5wdXNoKHtcbiAgdmVyc2lvbjogY29yZS52ZXJzaW9uLFxuICBtb2RlOiByZXF1aXJlKCcuL19saWJyYXJ5JykgPyAncHVyZScgOiAnZ2xvYmFsJyxcbiAgY29weXJpZ2h0OiAnwqkgMjAxOSBEZW5pcyBQdXNoa2FyZXYgKHpsb2lyb2NrLnJ1KSdcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NoYXJlZC5qc1xuLy8gbW9kdWxlIGlkID0gMTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///17\n")},function(module,exports,__webpack_require__){eval("// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = __webpack_require__(7);\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLXByaW1pdGl2ZS5qcz8zMjYzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xIFRvUHJpbWl0aXZlKGlucHV0IFssIFByZWZlcnJlZFR5cGVdKVxudmFyIGlzT2JqZWN0ID0gcmVxdWlyZSgnLi9faXMtb2JqZWN0Jyk7XG4vLyBpbnN0ZWFkIG9mIHRoZSBFUzYgc3BlYyB2ZXJzaW9uLCB3ZSBkaWRuJ3QgaW1wbGVtZW50IEBAdG9QcmltaXRpdmUgY2FzZVxuLy8gYW5kIHRoZSBzZWNvbmQgYXJndW1lbnQgLSBmbGFnIC0gcHJlZmVycmVkIHR5cGUgaXMgYSBzdHJpbmdcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCBTKSB7XG4gIGlmICghaXNPYmplY3QoaXQpKSByZXR1cm4gaXQ7XG4gIHZhciBmbiwgdmFsO1xuICBpZiAoUyAmJiB0eXBlb2YgKGZuID0gaXQudG9TdHJpbmcpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgaWYgKHR5cGVvZiAoZm4gPSBpdC52YWx1ZU9mKSA9PSAnZnVuY3Rpb24nICYmICFpc09iamVjdCh2YWwgPSBmbi5jYWxsKGl0KSkpIHJldHVybiB2YWw7XG4gIGlmICghUyAmJiB0eXBlb2YgKGZuID0gaXQudG9TdHJpbmcpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY29udmVydCBvYmplY3QgdG8gcHJpbWl0aXZlIHZhbHVlXCIpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1wcmltaXRpdmUuanNcbi8vIG1vZHVsZSBpZCA9IDE4XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///18\n")},function(module,exports){eval("// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWludGVnZXIuanM/NTJlMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyA3LjEuNCBUb0ludGVnZXJcbnZhciBjZWlsID0gTWF0aC5jZWlsO1xudmFyIGZsb29yID0gTWF0aC5mbG9vcjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpc05hTihpdCA9ICtpdCkgPyAwIDogKGl0ID4gMCA/IGZsb29yIDogY2VpbCkoaXQpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL190by1pbnRlZ2VyLmpzXG4vLyBtb2R1bGUgaWQgPSAxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///19\n")},function(module,exports){eval("module.exports = {};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXJhdG9ycy5qcz9mZGI0Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXRlcmF0b3JzLmpzXG4vLyBtb2R1bGUgaWQgPSAyMFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///20\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = __webpack_require__(10);\nvar dPs = __webpack_require__(60);\nvar enumBugKeys = __webpack_require__(23);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(32)('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n __webpack_require__(65).appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1jcmVhdGUuanM/NjI4NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuMiAvIDE1LjIuMy41IE9iamVjdC5jcmVhdGUoTyBbLCBQcm9wZXJ0aWVzXSlcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIGRQcyA9IHJlcXVpcmUoJy4vX29iamVjdC1kcHMnKTtcbnZhciBlbnVtQnVnS2V5cyA9IHJlcXVpcmUoJy4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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///21\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = __webpack_require__(36);\nvar enumBugKeys = __webpack_require__(23);\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLmpzPzk2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjE0IC8gMTUuMi4zLjE0IE9iamVjdC5rZXlzKE8pXG52YXIgJGtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cy1pbnRlcm5hbCcpO1xudmFyIGVudW1CdWdLZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE9iamVjdC5rZXlzIHx8IGZ1bmN0aW9uIGtleXMoTykge1xuICByZXR1cm4gJGtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qta2V5cy5qc1xuLy8gbW9kdWxlIGlkID0gMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///22\n")},function(module,exports){eval("// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2VudW0tYnVnLWtleXMuanM/YzY3NyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJRSA4LSBkb24ndCBlbnVtIGJ1ZyBrZXlzXG5tb2R1bGUuZXhwb3J0cyA9IChcbiAgJ2NvbnN0cnVjdG9yLGhhc093blByb3BlcnR5LGlzUHJvdG90eXBlT2YscHJvcGVydHlJc0VudW1lcmFibGUsdG9Mb2NhbGVTdHJpbmcsdG9TdHJpbmcsdmFsdWVPZidcbikuc3BsaXQoJywnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19lbnVtLWJ1Zy1rZXlzLmpzXG4vLyBtb2R1bGUgaWQgPSAyM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///23\n")},function(module,exports,__webpack_require__){eval("var def = __webpack_require__(3).f;\nvar has = __webpack_require__(2);\nvar TAG = __webpack_require__(9)('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3NldC10by1zdHJpbmctdGFnLmpzPzdiYTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRlZiA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG52YXIgaGFzID0gcmVxdWlyZSgnLi9faGFzJyk7XG52YXIgVEFHID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvU3RyaW5nVGFnJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0LCB0YWcsIHN0YXQpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBzdGF0ID8gaXQgOiBpdC5wcm90b3R5cGUsIFRBRykpIGRlZihpdCwgVEFHLCB7IGNvbmZpZ3VyYWJsZTogdHJ1ZSwgdmFsdWU6IHRhZyB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc2V0LXRvLXN0cmluZy10YWcuanNcbi8vIG1vZHVsZSBpZCA9IDI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///24\n")},function(module,exports,__webpack_require__){eval("exports.f = __webpack_require__(9);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1leHQuanM/MmExZSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSByZXF1aXJlKCcuL193a3MnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL193a3MtZXh0LmpzXG4vLyBtb2R1bGUgaWQgPSAyNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///25\n")},function(module,exports,__webpack_require__){eval("var global = __webpack_require__(1);\nvar core = __webpack_require__(0);\nvar LIBRARY = __webpack_require__(12);\nvar wksExt = __webpack_require__(25);\nvar defineProperty = __webpack_require__(3).f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy1kZWZpbmUuanM/NzJiOSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBMSUJSQVJZID0gcmVxdWlyZSgnLi9fbGlicmFyeScpO1xudmFyIHdrc0V4dCA9IHJlcXVpcmUoJy4vX3drcy1leHQnKTtcbnZhciBkZWZpbmVQcm9wZXJ0eSA9IHJlcXVpcmUoJy4vX29iamVjdC1kcCcpLmY7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIHZhciAkU3ltYm9sID0gY29yZS5TeW1ib2wgfHwgKGNvcmUuU3ltYm9sID0gTElCUkFSWSA/IHt9IDogZ2xvYmFsLlN5bWJvbCB8fCB7fSk7XG4gIGlmIChuYW1lLmNoYXJBdCgwKSAhPSAnXycgJiYgIShuYW1lIGluICRTeW1ib2wpKSBkZWZpbmVQcm9wZXJ0eSgkU3ltYm9sLCBuYW1lLCB7IHZhbHVlOiB3a3NFeHQuZihuYW1lKSB9KTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fd2tzLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMjZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///26\n")},function(module,exports){eval("exports.f = {}.propertyIsEnumerable;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1waWUuanM/MzY5MiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzLmYgPSB7fS5wcm9wZXJ0eUlzRW51bWVyYWJsZTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtcGllLmpzXG4vLyBtb2R1bGUgaWQgPSAyN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///27\n")},function(module,exports,__webpack_require__){eval("// 7.1.13 ToObject(argument)\nvar defined = __webpack_require__(15);\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qcz9iMDFkIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xMyBUb09iamVjdChhcmd1bWVudClcbnZhciBkZWZpbmVkID0gcmVxdWlyZSgnLi9fZGVmaW5lZCcpO1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIE9iamVjdChkZWZpbmVkKGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLW9iamVjdC5qc1xuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///28\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = __webpack_require__(2);\nvar toObject = __webpack_require__(28);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1ncG8uanM/M2YzYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyAxOS4xLjIuOSAvIDE1LjIuMy4yIE9iamVjdC5nZXRQcm90b3R5cGVPZihPKVxudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIHRvT2JqZWN0ID0gcmVxdWlyZSgnLi9fdG8tb2JqZWN0Jyk7XG52YXIgSUVfUFJPVE8gPSByZXF1aXJlKCcuL19zaGFyZWQta2V5JykoJ0lFX1BST1RPJyk7XG52YXIgT2JqZWN0UHJvdG8gPSBPYmplY3QucHJvdG90eXBlO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE9iamVjdC5nZXRQcm90b3R5cGVPZiB8fCBmdW5jdGlvbiAoTykge1xuICBPID0gdG9PYmplY3QoTyk7XG4gIGlmIChoYXMoTywgSUVfUFJPVE8pKSByZXR1cm4gT1tJRV9QUk9UT107XG4gIGlmICh0eXBlb2YgTy5jb25zdHJ1Y3RvciA9PSAnZnVuY3Rpb24nICYmIE8gaW5zdGFuY2VvZiBPLmNvbnN0cnVjdG9yKSB7XG4gICAgcmV0dXJuIE8uY29uc3RydWN0b3IucHJvdG90eXBlO1xuICB9IHJldHVybiBPIGluc3RhbmNlb2YgT2JqZWN0ID8gT2JqZWN0UHJvdG8gOiBudWxsO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ3BvLmpzXG4vLyBtb2R1bGUgaWQgPSAyOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///29\n")},function(module,exports,__webpack_require__){eval("// optional / simple context binding\nvar aFunction = __webpack_require__(48);\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2N0eC5qcz9mOTkzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIG9wdGlvbmFsIC8gc2ltcGxlIGNvbnRleHQgYmluZGluZ1xudmFyIGFGdW5jdGlvbiA9IHJlcXVpcmUoJy4vX2EtZnVuY3Rpb24nKTtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGZuLCB0aGF0LCBsZW5ndGgpIHtcbiAgYUZ1bmN0aW9uKGZuKTtcbiAgaWYgKHRoYXQgPT09IHVuZGVmaW5lZCkgcmV0dXJuIGZuO1xuICBzd2l0Y2ggKGxlbmd0aCkge1xuICAgIGNhc2UgMTogcmV0dXJuIGZ1bmN0aW9uIChhKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhKTtcbiAgICB9O1xuICAgIGNhc2UgMjogcmV0dXJuIGZ1bmN0aW9uIChhLCBiKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiKTtcbiAgICB9O1xuICAgIGNhc2UgMzogcmV0dXJuIGZ1bmN0aW9uIChhLCBiLCBjKSB7XG4gICAgICByZXR1cm4gZm4uY2FsbCh0aGF0LCBhLCBiLCBjKTtcbiAgICB9O1xuICB9XG4gIHJldHVybiBmdW5jdGlvbiAoLyogLi4uYXJncyAqLykge1xuICAgIHJldHVybiBmbi5hcHBseSh0aGF0LCBhcmd1bWVudHMpO1xuICB9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jdHguanNcbi8vIG1vZHVsZSBpZCA9IDMwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///30\n")},function(module,exports,__webpack_require__){eval("module.exports = !__webpack_require__(4) && !__webpack_require__(11)(function () {\n return Object.defineProperty(__webpack_require__(32)('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2llOC1kb20tZGVmaW5lLmpzPzQ5ZjAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAhcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSAmJiAhcmVxdWlyZSgnLi9fZmFpbHMnKShmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkocmVxdWlyZSgnLi9fZG9tLWNyZWF0ZScpKCdkaXYnKSwgJ2EnLCB7IGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gNzsgfSB9KS5hICE9IDc7XG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pZTgtZG9tLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///31\n")},function(module,exports,__webpack_require__){eval("var isObject = __webpack_require__(7);\nvar document = __webpack_require__(1).document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2RvbS1jcmVhdGUuanM/MzhkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL19pcy1vYmplY3QnKTtcbnZhciBkb2N1bWVudCA9IHJlcXVpcmUoJy4vX2dsb2JhbCcpLmRvY3VtZW50O1xuLy8gdHlwZW9mIGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQgaXMgJ29iamVjdCcgaW4gb2xkIElFXG52YXIgaXMgPSBpc09iamVjdChkb2N1bWVudCkgJiYgaXNPYmplY3QoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gaXMgPyBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGl0KSA6IHt9O1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19kb20tY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSAzMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///32\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _iterator = __webpack_require__(55);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = __webpack_require__(70);\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {\n return typeof obj === "undefined" ? "undefined" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3R5cGVvZi5qcz9hNDU2Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5leHBvcnRzLl9fZXNNb2R1bGUgPSB0cnVlO1xuXG52YXIgX2l0ZXJhdG9yID0gcmVxdWlyZShcIi4uL2NvcmUtanMvc3ltYm9sL2l0ZXJhdG9yXCIpO1xuXG52YXIgX2l0ZXJhdG9yMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2l0ZXJhdG9yKTtcblxudmFyIF9zeW1ib2wgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9zeW1ib2xcIik7XG5cbnZhciBfc3ltYm9sMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3N5bWJvbCk7XG5cbnZhciBfdHlwZW9mID0gdHlwZW9mIF9zeW1ib2wyLmRlZmF1bHQgPT09IFwiZnVuY3Rpb25cIiAmJiB0eXBlb2YgX2l0ZXJhdG9yMi5kZWZhdWx0ID09PSBcInN5bWJvbFwiID8gZnVuY3Rpb24gKG9iaikgeyByZXR1cm4gdHlwZW9mIG9iajsgfSA6IGZ1bmN0aW9uIChvYmopIHsgcmV0dXJuIG9iaiAmJiB0eXBlb2YgX3N5bWJvbDIuZGVmYXVsdCA9PT0gXCJmdW5jdGlvblwiICYmIG9iai5jb25zdHJ1Y3RvciA9PT0gX3N5bWJvbDIuZGVmYXVsdCAmJiBvYmogIT09IF9zeW1ib2wyLmRlZmF1bHQ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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///33\n')},function(module,exports,__webpack_require__){"use strict";eval("\nvar LIBRARY = __webpack_require__(12);\nvar $export = __webpack_require__(5);\nvar redefine = __webpack_require__(35);\nvar hide = __webpack_require__(6);\nvar Iterators = __webpack_require__(20);\nvar $iterCreate = __webpack_require__(59);\nvar setToStringTag = __webpack_require__(24);\nvar getPrototypeOf = __webpack_require__(29);\nvar ITERATOR = __webpack_require__(9)('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItZGVmaW5lLmpzP2JjODAiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xudmFyIExJQlJBUlkgPSByZXF1aXJlKCcuL19saWJyYXJ5Jyk7XG52YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xudmFyIHJlZGVmaW5lID0gcmVxdWlyZSgnLi9fcmVkZWZpbmUnKTtcbnZhciBoaWRlID0gcmVxdWlyZSgnLi9faGlkZScpO1xudmFyIEl0ZXJhdG9ycyA9IHJlcXVpcmUoJy4vX2l0ZXJhdG9ycycpO1xudmFyICRpdGVyQ3JlYXRlID0gcmVxdWlyZSgnLi9faXRlci1jcmVhdGUnKTtcbnZhciBzZXRUb1N0cmluZ1RhZyA9IHJlcXVpcmUoJy4vX3NldC10by1zdHJpbmctdGFnJyk7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL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gKiAoQlVHR1kgfHwgVkFMVUVTX0JVRyksIE5BTUUsIG1ldGhvZHMpO1xuICB9XG4gIHJldHVybiBtZXRob2RzO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19pdGVyLWRlZmluZS5qc1xuLy8gbW9kdWxlIGlkID0gMzRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///34\n")},function(module,exports,__webpack_require__){eval("module.exports = __webpack_require__(6);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3JlZGVmaW5lLmpzP2YzY2QiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL19oaWRlJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fcmVkZWZpbmUuanNcbi8vIG1vZHVsZSBpZCA9IDM1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///35\n")},function(module,exports,__webpack_require__){eval("var has = __webpack_require__(2);\nvar toIObject = __webpack_require__(8);\nvar arrayIndexOf = __webpack_require__(62)(false);\nvar IE_PROTO = __webpack_require__(16)('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1rZXlzLWludGVybmFsLmpzPzIxYjgiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciBhcnJheUluZGV4T2YgPSByZXF1aXJlKCcuL19hcnJheS1pbmNsdWRlcycpKGZhbHNlKTtcbnZhciBJRV9QUk9UTyA9IHJlcXVpcmUoJy4vX3NoYXJlZC1rZXknKSgnSUVfUFJPVE8nKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAob2JqZWN0LCBuYW1lcykge1xuICB2YXIgTyA9IHRvSU9iamVjdChvYmplY3QpO1xuICB2YXIgaSA9IDA7XG4gIHZhciByZXN1bHQgPSBbXTtcbiAgdmFyIGtleTtcbiAgZm9yIChrZXkgaW4gTykgaWYgKGtleSAhPSBJRV9QUk9UTykgaGFzKE8sIGtleSkgJiYgcmVzdWx0LnB1c2goa2V5KTtcbiAgLy8gRG9uJ3QgZW51bSBidWcgJiBoaWRkZW4ga2V5c1xuICB3aGlsZSAobmFtZXMubGVuZ3RoID4gaSkgaWYgKGhhcyhPLCBrZXkgPSBuYW1lc1tpKytdKSkge1xuICAgIH5hcnJheUluZGV4T2YocmVzdWx0LCBrZXkpIHx8IHJlc3VsdC5wdXNoKGtleSk7XG4gIH1cbiAgcmV0dXJuIHJlc3VsdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWtleXMtaW50ZXJuYWwuanNcbi8vIG1vZHVsZSBpZCA9IDM2XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///36\n")},function(module,exports){eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvZi5qcz80N2QzIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gdG9TdHJpbmcuY2FsbChpdCkuc2xpY2UoOCwgLTEpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19jb2YuanNcbi8vIG1vZHVsZSBpZCA9IDM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///37\n")},function(module,exports){eval("exports.f = Object.getOwnPropertySymbols;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BzLmpzP2Q2NDQiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scztcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wcy5qc1xuLy8gbW9kdWxlIGlkID0gMzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///38\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = __webpack_require__(36);\nvar hiddenKeys = __webpack_require__(23).concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLmpzPzlmNDQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjcgLyAxNS4yLjMuNCBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhPKVxudmFyICRrZXlzID0gcmVxdWlyZSgnLi9fb2JqZWN0LWtleXMtaW50ZXJuYWwnKTtcbnZhciBoaWRkZW5LZXlzID0gcmVxdWlyZSgnLi9fZW51bS1idWcta2V5cycpLmNvbmNhdCgnbGVuZ3RoJywgJ3Byb3RvdHlwZScpO1xuXG5leHBvcnRzLmYgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyB8fCBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eU5hbWVzKE8pIHtcbiAgcmV0dXJuICRrZXlzKE8sIGhpZGRlbktleXMpO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZ29wbi5qc1xuLy8gbW9kdWxlIGlkID0gMzlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///39\n")},function(module,exports,__webpack_require__){eval("var pIE = __webpack_require__(27);\nvar createDesc = __webpack_require__(14);\nvar toIObject = __webpack_require__(8);\nvar toPrimitive = __webpack_require__(18);\nvar has = __webpack_require__(2);\nvar IE8_DOM_DEFINE = __webpack_require__(31);\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BkLmpzPzJjYTYiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHBJRSA9IHJlcXVpcmUoJy4vX29iamVjdC1waWUnKTtcbnZhciBjcmVhdGVEZXNjID0gcmVxdWlyZSgnLi9fcHJvcGVydHktZGVzYycpO1xudmFyIHRvSU9iamVjdCA9IHJlcXVpcmUoJy4vX3RvLWlvYmplY3QnKTtcbnZhciB0b1ByaW1pdGl2ZSA9IHJlcXVpcmUoJy4vX3RvLXByaW1pdGl2ZScpO1xudmFyIGhhcyA9IHJlcXVpcmUoJy4vX2hhcycpO1xudmFyIElFOF9ET01fREVGSU5FID0gcmVxdWlyZSgnLi9faWU4LWRvbS1kZWZpbmUnKTtcbnZhciBnT1BEID0gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcjtcblxuZXhwb3J0cy5mID0gcmVxdWlyZSgnLi9fZGVzY3JpcHRvcnMnKSA/IGdPUEQgOiBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoTywgUCkge1xuICBPID0gdG9JT2JqZWN0KE8pO1xuICBQID0gdG9QcmltaXRpdmUoUCwgdHJ1ZSk7XG4gIGlmIChJRThfRE9NX0RFRklORSkgdHJ5IHtcbiAgICByZXR1cm4gZ09QRChPLCBQKTtcbiAgfSBjYXRjaCAoZSkgeyAvKiBlbXB0eSAqLyB9XG4gIGlmIChoYXMoTywgUCkpIHJldHVybiBjcmVhdGVEZXNjKCFwSUUuZi5jYWxsKE8sIFApLCBPW1BdKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWdvcGQuanNcbi8vIG1vZHVsZSBpZCA9IDQwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///40\n")},function(module,__webpack_exports__,__webpack_require__){"use strict";eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss__ = __webpack_require__(42);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_scss__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sidebar_js__ = __webpack_require__(43);\n// Include stylesheet\n\n\n// Import Click to Tweet Block\n//import './block.js';\n\n// Import Gutenberg Boilerplate Sidebar\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXguanM/ODc0OSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJbmNsdWRlIHN0eWxlc2hlZXRcbmltcG9ydCAnLi9zdHlsZS5zY3NzJztcblxuLy8gSW1wb3J0IENsaWNrIHRvIFR3ZWV0IEJsb2NrXG4vL2ltcG9ydCAnLi9ibG9jay5qcyc7XG5cbi8vIEltcG9ydCBHdXRlbmJlcmcgQm9pbGVycGxhdGUgU2lkZWJhclxuaW1wb3J0ICcuL3NpZGViYXIuanMnO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSA0MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///41\n")},function(module,exports){eval("// removed by extract-text-webpack-plugin//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc3R5bGUuc2Nzcz9hY2Q4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvc3R5bGUuc2Nzc1xuLy8gbW9kdWxlIGlkID0gNDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///42\n")},function(module,__webpack_exports__,__webpack_require__){"use strict";eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(44);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(49);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(50);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(54);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(80);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);\n\n\n\n\n\n/**\n * Internal block libraries.\n * @since 2.2.3\n */\nvar __ = wp.i18n.__;\nvar _wp$editPost = wp.editPost,\n PluginSidebar = _wp$editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = _wp$editPost.PluginSidebarMoreMenuItem;\nvar _wp$components = wp.components,\n PanelBody = _wp$components.PanelBody,\n TextControl = _wp$components.TextControl,\n Button = _wp$components.Button,\n Notice = _wp$components.Notice;\nvar _wp$element = wp.element,\n Component = _wp$element.Component,\n Fragment = _wp$element.Fragment;\nvar withSelect = wp.data.withSelect;\nvar compose = wp.compose.compose;\n\n\nvar LanguageSwitcherNotice = function LanguageSwitcherNotice(props) {\n\tif (WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage) {\n\t\treturn wp.element.createElement('div', null);\n\t}\n\n\tvar dev = '';\n\tif ('undefined' !== typeof WPGlobusBlockEditorDevelop && !WPGlobusBlockEditorDevelop.production) {\n\t\tdev = '(develop)';\n\t}\n\n\treturn wp.element.createElement(\n\t\tNotice,\n\t\t{ className: 'wpglobus-block-editor-panel__notice', status: 'informational', isDismissible: false },\n\t\t__('Select language'),\n\t\t' ',\n\t\tdev\n\t);\n};\n\nvar LanguageSwitcher = function LanguageSwitcher(props) {\n\n\tif (WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage) {\n\t\treturn wp.element.createElement(\n\t\t\t'div',\n\t\t\t{ className: 'wpglobus-block-editor-panel__switcher-box' },\n\t\t\tWPGlobusGutenberg.i18n.save_post\n\t\t);\n\t}\n\n\tvar language = WPGlobusGutenberg.language;\n\tvar flagsUrl = WPGlobusGutenberg.flags_url;\n\tvar enabledLanguages = WPGlobusCoreData.enabled_languages;\n\tvar languageNames = WPGlobusCoreData.en_language_name;\n\tvar ref = location.href;\n\tvar refs = {};\n\tfor (var key in enabledLanguages) {\n\t\tif (-1 == ref.indexOf('language=' + language)) {\n\t\t\trefs[enabledLanguages[key]] = ref + '&language=' + enabledLanguages[key];\n\t\t} else {\n\t\t\trefs[enabledLanguages[key]] = ref.replace('language=' + language, 'language=' + enabledLanguages[key]);\n\t\t}\n\t}\n\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__switcher-box' },\n\t\twp.element.createElement(\n\t\t\t'ul',\n\t\t\tnull,\n\t\t\tenabledLanguages.map(function (lang) {\n\t\t\t\treturn wp.element.createElement(\n\t\t\t\t\t'li',\n\t\t\t\t\t{ key: lang },\n\t\t\t\t\twp.element.createElement('img', { className: 'wpglobus-block-editor-panel__flag', height: '20px', width: '20px', src: flagsUrl[lang] }),\n\t\t\t\t\t'\\xA0\\xA0',\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tButton,\n\t\t\t\t\t\t{ href: refs[lang], isSmall: true, isPrimary: true },\n\t\t\t\t\t\tlanguageNames[lang]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t})\n\t\t)\n\t);\n};\n\nvar WPGlobusInfo = function WPGlobusInfo(props) {\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__info' },\n\t\twp.element.createElement(\n\t\t\tButton,\n\t\t\t{ href: props.href, target: '_blank', isLink: true },\n\t\t\t__('WPGlobus Premium Add-ons')\n\t\t)\n\t);\n};\n\nvar SettingsLink = function SettingsLink(props) {\n\treturn wp.element.createElement(\n\t\t'div',\n\t\t{ className: 'wpglobus-block-editor-panel__settings-link' },\n\t\twp.element.createElement(\n\t\t\tButton,\n\t\t\t{ href: props.href, isLink: true },\n\t\t\t__('Settings')\n\t\t)\n\t);\n};\n\nvar registerPlugin = wp.plugins.registerPlugin;\n\nvar WPGlobus_BlockEditor = function (_Component) {\n\t__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(WPGlobus_BlockEditor, _Component);\n\n\tfunction WPGlobus_BlockEditor() {\n\t\t__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, WPGlobus_BlockEditor);\n\n\t\tvar _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (WPGlobus_BlockEditor.__proto__ || __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default()(WPGlobus_BlockEditor)).apply(this, arguments));\n\n\t\tvar dev = '';\n\t\tif ('undefined' !== typeof WPGlobusBlockEditorDevelop && !WPGlobusBlockEditorDevelop.production) {\n\t\t\tdev = ' (develop)';\n\t\t}\n\n\t\t_this.state = {\n\t\t\toptionsTabUrl: WPGlobusGutenberg.block_editor_tab_url,\n\t\t\tstoreLink: WPGlobusGutenberg.store_link,\n\t\t\theaderTitle: __('WPGlobus') + dev,\n\t\t\tmoreMenuItemTitle: __('WPGlobus')\n\t\t};\n\n\t\tsetTimeout(function () {\n\t\t\tvar buttons = document.getElementsByClassName('components-icon-button');\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\n\t\t\t\tvar status = buttons[i].getAttribute('aria-label');\n\t\t\t\t//if ( status == 'WPGlobus' ) { \n\t\t\t\tif (-1 != status.indexOf('WPGlobus')) {\n\t\t\t\t\tvar done = buttons[i].dataset.done;\n\t\t\t\t\tif ('undefined' === typeof done) {\n\t\t\t\t\t\tvar content = buttons[i].innerHTML;\n\t\t\t\t\t\t//@todo buttons[i].classList.add('wpglobus-switcher-button');\n\t\t\t\t\t\tbuttons[i].innerHTML = content + '<img height=\"20px\" width=\"20px\" src=\"' + WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language] + '\" /> ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language];\n\t\t\t\t\t\tbuttons[i].dataset.done = 'yes';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, 500);\n\t\treturn _this;\n\t}\n\n\t__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(WPGlobus_BlockEditor, [{\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\treturn wp.element.createElement(\n\t\t\t\tFragment,\n\t\t\t\tnull,\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPluginSidebarMoreMenuItem,\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: 'wpglobus-gutenberg-sidebar'\n\t\t\t\t\t},\n\t\t\t\t\tthis.state.moreMenuItemTitle\n\t\t\t\t),\n\t\t\t\twp.element.createElement(\n\t\t\t\t\tPluginSidebar,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'wpglobus-gutenberg-sidebar',\n\t\t\t\t\t\ttitle: this.state.headerTitle\n\t\t\t\t\t},\n\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\tPanelBody,\n\t\t\t\t\t\t{ className: 'wpglobus-block-editor-panel__body' },\n\t\t\t\t\t\twp.element.createElement(LanguageSwitcherNotice, null),\n\t\t\t\t\t\twp.element.createElement(LanguageSwitcher, null),\n\t\t\t\t\t\twp.element.createElement(\n\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\twp.element.createElement(WPGlobusInfo, { href: this.state.storeLink }),\n\t\t\t\t\t\t\twp.element.createElement(SettingsLink, { href: this.state.optionsTabUrl })\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}]);\n\n\treturn WPGlobus_BlockEditor;\n}(Component);\n\nvar WPGBE = withSelect(function (select, _ref) {\n\tvar forceIsSaving = _ref.forceIsSaving;\n\n\tvar _select = select('core/editor'),\n\t getCurrentPostId = _select.getCurrentPostId,\n\t isSavingPost = _select.isSavingPost,\n\t isPublishingPost = _select.isPublishingPost,\n\t isAutosavingPost = _select.isAutosavingPost;\n\n\treturn {\n\t\tpostId: getCurrentPostId(),\n\t\tisSaving: forceIsSaving || isSavingPost(),\n\t\tisAutoSaving: isAutosavingPost(),\n\t\tisPublishing: isPublishingPost()\n\t};\n})(WPGlobus_BlockEditor);\n\nregisterPlugin('wpglobus-gutenberg', {\n\ticon: 'admin-site',\n\trender: WPGBE\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zc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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///43\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(45), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzY3MWUiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA0NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///44\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(46);\nmodule.exports = __webpack_require__(0).Object.getPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9nZXQtcHJvdG90eXBlLW9mLmpzPzdkMmUiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LmdldC1wcm90b3R5cGUtb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLk9iamVjdC5nZXRQcm90b3R5cGVPZjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3QvZ2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gNDVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///45\n")},function(module,exports,__webpack_require__){eval("// 19.1.2.9 Object.getPrototypeOf(O)\nvar toObject = __webpack_require__(28);\nvar $getPrototypeOf = __webpack_require__(29);\n\n__webpack_require__(47)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzPzJhMWUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4yLjkgT2JqZWN0LmdldFByb3RvdHlwZU9mKE8pXG52YXIgdG9PYmplY3QgPSByZXF1aXJlKCcuL190by1vYmplY3QnKTtcbnZhciAkZ2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKCcuL19vYmplY3QtZ3BvJyk7XG5cbnJlcXVpcmUoJy4vX29iamVjdC1zYXAnKSgnZ2V0UHJvdG90eXBlT2YnLCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZihpdCkge1xuICAgIHJldHVybiAkZ2V0UHJvdG90eXBlT2YodG9PYmplY3QoaXQpKTtcbiAgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5nZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA0NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///46\n")},function(module,exports,__webpack_require__){eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(5);\nvar core = __webpack_require__(0);\nvar fails = __webpack_require__(11);\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1zYXAuanM/YmFhNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBtb3N0IE9iamVjdCBtZXRob2RzIGJ5IEVTNiBzaG91bGQgYWNjZXB0IHByaW1pdGl2ZXNcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG52YXIgY29yZSA9IHJlcXVpcmUoJy4vX2NvcmUnKTtcbnZhciBmYWlscyA9IHJlcXVpcmUoJy4vX2ZhaWxzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChLRVksIGV4ZWMpIHtcbiAgdmFyIGZuID0gKGNvcmUuT2JqZWN0IHx8IHt9KVtLRVldIHx8IE9iamVjdFtLRVldO1xuICB2YXIgZXhwID0ge307XG4gIGV4cFtLRVldID0gZXhlYyhmbik7XG4gICRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogZmFpbHMoZnVuY3Rpb24gKCkgeyBmbigxKTsgfSksICdPYmplY3QnLCBleHApO1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3Qtc2FwLmpzXG4vLyBtb2R1bGUgaWQgPSA0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///47\n")},function(module,exports){eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2EtZnVuY3Rpb24uanM/OTRlOSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAodHlwZW9mIGl0ICE9ICdmdW5jdGlvbicpIHRocm93IFR5cGVFcnJvcihpdCArICcgaXMgbm90IGEgZnVuY3Rpb24hJyk7XG4gIHJldHVybiBpdDtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYS1mdW5jdGlvbi5qc1xuLy8gbW9kdWxlIGlkID0gNDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///48\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NsYXNzQ2FsbENoZWNrLmpzPzY2YjkiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbmV4cG9ydHMuZGVmYXVsdCA9IGZ1bmN0aW9uIChpbnN0YW5jZSwgQ29uc3RydWN0b3IpIHtcbiAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uXCIpO1xuICB9XG59O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvaGVscGVycy9jbGFzc0NhbGxDaGVjay5qc1xuLy8gbW9kdWxlIGlkID0gNDlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///49\n')},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _defineProperty = __webpack_require__(51);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2NyZWF0ZUNsYXNzLmpzP2MzMTAiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfZGVmaW5lUHJvcGVydHkgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5XCIpO1xuXG52YXIgX2RlZmluZVByb3BlcnR5MiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2RlZmluZVByb3BlcnR5KTtcblxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHsgcmV0dXJuIG9iaiAmJiBvYmouX19lc01vZHVsZSA/IG9iaiA6IHsgZGVmYXVsdDogb2JqIH07IH1cblxuZXhwb3J0cy5kZWZhdWx0ID0gZnVuY3Rpb24gKCkge1xuICBmdW5jdGlvbiBkZWZpbmVQcm9wZXJ0aWVzKHRhcmdldCwgcHJvcHMpIHtcbiAgICBmb3IgKHZhciB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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///50\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(52), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanM/MGI4MyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2RlZmluZS1wcm9wZXJ0eVwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvZGVmaW5lLXByb3BlcnR5LmpzXG4vLyBtb2R1bGUgaWQgPSA1MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///51\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(53);\nvar $Object = __webpack_require__(0).Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanM/ZjViMCJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5vYmplY3QuZGVmaW5lLXByb3BlcnR5Jyk7XG52YXIgJE9iamVjdCA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Q7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGRlZmluZVByb3BlcnR5KGl0LCBrZXksIGRlc2MpIHtcbiAgcmV0dXJuICRPYmplY3QuZGVmaW5lUHJvcGVydHkoaXQsIGtleSwgZGVzYyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDUyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///52\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(5);\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !__webpack_require__(4), 'Object', { defineProperty: __webpack_require__(3).f });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanM/OTgyOSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuLy8gMTkuMS4yLjQgLyAxNS4yLjMuNiBPYmplY3QuZGVmaW5lUHJvcGVydHkoTywgUCwgQXR0cmlidXRlcylcbiRleHBvcnQoJGV4cG9ydC5TICsgJGV4cG9ydC5GICogIXJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJyksICdPYmplY3QnLCB7IGRlZmluZVByb3BlcnR5OiByZXF1aXJlKCcuL19vYmplY3QtZHAnKS5mIH0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5kZWZpbmUtcHJvcGVydHkuanNcbi8vIG1vZHVsZSBpZCA9IDUzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///53\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _typeof2 = __webpack_require__(33);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n\n return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4uanM/Y2YwYSJdLCJzb3VyY2VzQ29udGVudCI6WyJcIn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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///54\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(56), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC9pdGVyYXRvci5qcz82NzM4Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9zeW1ib2wvaXRlcmF0b3JcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvc3ltYm9sL2l0ZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSA1NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///55\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(57);\n__webpack_require__(66);\nmodule.exports = __webpack_require__(25).f('iterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pdGVyYXRvci5qcz9mZTdlIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvcicpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy93ZWIuZG9tLml0ZXJhYmxlJyk7XG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX3drcy1leHQnKS5mKCdpdGVyYXRvcicpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNTZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///56\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar $at = __webpack_require__(58)(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\n__webpack_require__(34)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qcz9jZDA0Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcbnZhciAkYXQgPSByZXF1aXJlKCcuL19zdHJpbmctYXQnKSh0cnVlKTtcblxuLy8gMjEuMS4zLjI3IFN0cmluZy5wcm90b3R5cGVbQEBpdGVyYXRvcl0oKVxucmVxdWlyZSgnLi9faXRlci1kZWZpbmUnKShTdHJpbmcsICdTdHJpbmcnLCBmdW5jdGlvbiAoaXRlcmF0ZWQpIHtcbiAgdGhpcy5fdCA9IFN0cmluZyhpdGVyYXRlZCk7IC8vIHRhcmdldFxuICB0aGlzLl9pID0gMDsgICAgICAgICAgICAgICAgLy8gbmV4dCBpbmRleFxuLy8gMjEuMS41LjIuMSAlU3RyaW5nSXRlcmF0b3JQcm90b3R5cGUlLm5leHQoKVxufSwgZnVuY3Rpb24gKCkge1xuICB2YXIgTyA9IHRoaXMuX3Q7XG4gIHZhciBpbmRleCA9IHRoaXMuX2k7XG4gIHZhciBwb2ludDtcbiAgaWYgKGluZGV4ID49IE8ubGVuZ3RoKSByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIHBvaW50ID0gJGF0KE8sIGluZGV4KTtcbiAgdGhpcy5faSArPSBwb2ludC5sZW5ndGg7XG4gIHJldHVybiB7IHZhbHVlOiBwb2ludCwgZG9uZTogZmFsc2UgfTtcbn0pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LnN0cmluZy5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNTdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///57\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(19);\nvar defined = __webpack_require__(15);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3N0cmluZy1hdC5qcz84N2FlIl0sInNvdXJjZXNDb250ZW50IjpbInZhciB0b0ludGVnZXIgPSByZXF1aXJlKCcuL190by1pbnRlZ2VyJyk7XG52YXIgZGVmaW5lZCA9IHJlcXVpcmUoJy4vX2RlZmluZWQnKTtcbi8vIHRydWUgIC0+IFN0cmluZyNhdFxuLy8gZmFsc2UgLT4gU3RyaW5nI2NvZGVQb2ludEF0XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChUT19TVFJJTkcpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uICh0aGF0LCBwb3MpIHtcbiAgICB2YXIgcyA9IFN0cmluZyhkZWZpbmVkKHRoYXQpKTtcbiAgICB2YXIgaSA9IHRvSW50ZWdlcihwb3MpO1xuICAgIHZhciBsID0gcy5sZW5ndGg7XG4gICAgdmFyIGEsIGI7XG4gICAgaWYgKGkgPCAwIHx8IGkgPj0gbCkgcmV0dXJuIFRPX1NUUklORyA/ICcnIDogdW5kZWZpbmVkO1xuICAgIGEgPSBzLmNoYXJDb2RlQXQoaSk7XG4gICAgcmV0dXJuIGEgPCAweGQ4MDAgfHwgYSA+IDB4ZGJmZiB8fCBpICsgMSA9PT0gbCB8fCAoYiA9IHMuY2hhckNvZGVBdChpICsgMSkpIDwgMHhkYzAwIHx8IGIgPiAweGRmZmZcbiAgICAgID8gVE9fU1RSSU5HID8gcy5jaGFyQXQoaSkgOiBhXG4gICAgICA6IFRPX1NUUklORyA/IHMuc2xpY2UoaSwgaSArIDIpIDogKGEgLSAweGQ4MDAgPDwgMTApICsgKGIgLSAweGRjMDApICsgMHgxMDAwMDtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fc3RyaW5nLWF0LmpzXG4vLyBtb2R1bGUgaWQgPSA1OFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///58\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar create = __webpack_require__(21);\nvar descriptor = __webpack_require__(14);\nvar setToStringTag = __webpack_require__(24);\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(6)(IteratorPrototype, __webpack_require__(9)('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJ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E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///59\n")},function(module,exports,__webpack_require__){eval("var dP = __webpack_require__(3);\nvar anObject = __webpack_require__(10);\nvar getKeys = __webpack_require__(22);\n\nmodule.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1kcHMuanM/YWEyYSJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZFAgPSByZXF1aXJlKCcuL19vYmplY3QtZHAnKTtcbnZhciBhbk9iamVjdCA9IHJlcXVpcmUoJy4vX2FuLW9iamVjdCcpO1xudmFyIGdldEtleXMgPSByZXF1aXJlKCcuL19vYmplY3Qta2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vX2Rlc2NyaXB0b3JzJykgPyBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA6IGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMoTywgUHJvcGVydGllcykge1xuICBhbk9iamVjdChPKTtcbiAgdmFyIGtleXMgPSBnZXRLZXlzKFByb3BlcnRpZXMpO1xuICB2YXIgbGVuZ3RoID0ga2V5cy5sZW5ndGg7XG4gIHZhciBpID0gMDtcbiAgdmFyIFA7XG4gIHdoaWxlIChsZW5ndGggPiBpKSBkUC5mKE8sIFAgPSBrZXlzW2krK10sIFByb3BlcnRpZXNbUF0pO1xuICByZXR1cm4gTztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fb2JqZWN0LWRwcy5qc1xuLy8gbW9kdWxlIGlkID0gNjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///60\n")},function(module,exports,__webpack_require__){eval("// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = __webpack_require__(37);\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lvYmplY3QuanM/MzE0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIGFuZCBub24tZW51bWVyYWJsZSBvbGQgVjggc3RyaW5nc1xudmFyIGNvZiA9IHJlcXVpcmUoJy4vX2NvZicpO1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXByb3RvdHlwZS1idWlsdGluc1xubW9kdWxlLmV4cG9ydHMgPSBPYmplY3QoJ3onKS5wcm9wZXJ0eUlzRW51bWVyYWJsZSgwKSA/IE9iamVjdCA6IGZ1bmN0aW9uIChpdCkge1xuICByZXR1cm4gY29mKGl0KSA9PSAnU3RyaW5nJyA/IGl0LnNwbGl0KCcnKSA6IE9iamVjdChpdCk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lvYmplY3QuanNcbi8vIG1vZHVsZSBpZCA9IDYxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///61\n")},function(module,exports,__webpack_require__){eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(8);\nvar toLength = __webpack_require__(63);\nvar toAbsoluteIndex = __webpack_require__(64);\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FycmF5LWluY2x1ZGVzLmpzP2JjNTciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZmFsc2UgLT4gQXJyYXkjaW5kZXhPZlxuLy8gdHJ1ZSAgLT4gQXJyYXkjaW5jbHVkZXNcbnZhciB0b0lPYmplY3QgPSByZXF1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CB8fCAwO1xuICAgIH0gcmV0dXJuICFJU19JTkNMVURFUyAmJiAtMTtcbiAgfTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fYXJyYXktaW5jbHVkZXMuanNcbi8vIG1vZHVsZSBpZCA9IDYyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///62\n")},function(module,exports,__webpack_require__){eval("// 7.1.15 ToLength\nvar toInteger = __webpack_require__(19);\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWxlbmd0aC5qcz80MTExIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIDcuMS4xNSBUb0xlbmd0aFxudmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciBtaW4gPSBNYXRoLm1pbjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBpdCA+IDAgPyBtaW4odG9JbnRlZ2VyKGl0KSwgMHgxZmZmZmZmZmZmZmZmZikgOiAwOyAvLyBwb3coMiwgNTMpIC0gMSA9PSA5MDA3MTk5MjU0NzQwOTkxXG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWxlbmd0aC5qc1xuLy8gbW9kdWxlIGlkID0gNjNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///63\n")},function(module,exports,__webpack_require__){eval("var toInteger = __webpack_require__(19);\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3RvLWFic29sdXRlLWluZGV4LmpzPzdlNDAiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHRvSW50ZWdlciA9IHJlcXVpcmUoJy4vX3RvLWludGVnZXInKTtcbnZhciBtYXggPSBNYXRoLm1heDtcbnZhciBtaW4gPSBNYXRoLm1pbjtcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGluZGV4LCBsZW5ndGgpIHtcbiAgaW5kZXggPSB0b0ludGVnZXIoaW5kZXgpO1xuICByZXR1cm4gaW5kZXggPCAwID8gbWF4KGluZGV4ICsgbGVuZ3RoLCAwKSA6IG1pbihpbmRleCwgbGVuZ3RoKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fdG8tYWJzb2x1dGUtaW5kZXguanNcbi8vIG1vZHVsZSBpZCA9IDY0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///64\n")},function(module,exports,__webpack_require__){eval("var document = __webpack_require__(1).document;\nmodule.exports = document && document.documentElement;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2h0bWwuanM/NDRmMiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZG9jdW1lbnQgPSByZXF1aXJlKCcuL19nbG9iYWwnKS5kb2N1bWVudDtcbm1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQgJiYgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2h0bWwuanNcbi8vIG1vZHVsZSBpZCA9IDY1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///65\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(67);\nvar global = __webpack_require__(1);\nvar hide = __webpack_require__(6);\nvar Iterators = __webpack_require__(20);\nvar TO_STRING_TAG = __webpack_require__(9)('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvd2ViLmRvbS5pdGVyYWJsZS5qcz9mYWQzIl0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vZXM2LmFycmF5Lml0ZXJhdG9yJyk7XG52YXIgZ2xvYmFsID0gcmVxdWlyZSgnLi9fZ2xvYmFsJyk7XG52YXIgaGlkZSA9IHJlcXVpcmUoJy4vX2hpZGUnKTtcbnZhciBJdGVyYXRvcnMgPSByZXF1aXJlKCcuL19pdGVyYXRvcnMnKTtcbnZhciBUT19TVFJJTkdfVEFHID0gcmVxdWlyZSgnLi9fd2tzJykoJ3RvU3RyaW5nVGFnJyk7XG5cbnZhciBET01JdGVyYWJsZXMgPSAoJ0NTU1J1bGVMaXN0LENTU1N0eWxlRGVjbGFyYXRpb24sQ1NTVmFsdWVMaXN0LENsaWVudFJlY3RMaXN0LERPTVJlY3RMaXN0LERPT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4vLyBtb2R1bGUgaWQgPSA2NlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///66\n")},function(module,exports,__webpack_require__){"use strict";eval("\nvar addToUnscopables = __webpack_require__(68);\nvar step = __webpack_require__(69);\nvar Iterators = __webpack_require__(20);\nvar toIObject = __webpack_require__(8);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(34)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2LmFycmF5Lml0ZXJhdG9yLmpzP2M0NjkiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzd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BzdGVwKDAsIGluZGV4KTtcbiAgaWYgKGtpbmQgPT0gJ3ZhbHVlcycpIHJldHVybiBzdGVwKDAsIE9baW5kZXhdKTtcbiAgcmV0dXJuIHN0ZXAoMCwgW2luZGV4LCBPW2luZGV4XV0pO1xufSwgJ3ZhbHVlcycpO1xuXG4vLyBhcmd1bWVudHNMaXN0W0BAaXRlcmF0b3JdIGlzICVBcnJheVByb3RvX3ZhbHVlcyUgKDkuNC40LjYsIDkuNC40LjcpXG5JdGVyYXRvcnMuQXJndW1lbnRzID0gSXRlcmF0b3JzLkFycmF5O1xuXG5hZGRUb1Vuc2NvcGFibGVzKCdrZXlzJyk7XG5hZGRUb1Vuc2NvcGFibGVzKCd2YWx1ZXMnKTtcbmFkZFRvVW5zY29wYWJsZXMoJ2VudHJpZXMnKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5hcnJheS5pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNjdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///67\n")},function(module,exports){eval("module.exports = function () { /* empty */ };\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FkZC10by11bnNjb3BhYmxlcy5qcz9lMjY3Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKCkgeyAvKiBlbXB0eSAqLyB9O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2FkZC10by11bnNjb3BhYmxlcy5qc1xuLy8gbW9kdWxlIGlkID0gNjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///68\n")},function(module,exports){eval("module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItc3RlcC5qcz8xMDY2Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGRvbmUsIHZhbHVlKSB7XG4gIHJldHVybiB7IHZhbHVlOiB2YWx1ZSwgZG9uZTogISFkb25lIH07XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2l0ZXItc3RlcC5qc1xuLy8gbW9kdWxlIGlkID0gNjlcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///69\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(71), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL3N5bWJvbC5qcz9lNTA1Il0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0geyBcImRlZmF1bHRcIjogcmVxdWlyZShcImNvcmUtanMvbGlicmFyeS9mbi9zeW1ib2xcIiksIF9fZXNNb2R1bGU6IHRydWUgfTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9iYWJlbC1ydW50aW1lL2NvcmUtanMvc3ltYm9sLmpzXG4vLyBtb2R1bGUgaWQgPSA3MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///70\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(72);\n__webpack_require__(77);\n__webpack_require__(78);\n__webpack_require__(79);\nmodule.exports = __webpack_require__(0).Symbol;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pbmRleC5qcz8wNzA3Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4uLy4uL21vZHVsZXMvZXM2LnN5bWJvbCcpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LnRvLXN0cmluZycpO1xucmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczcuc3ltYm9sLmFzeW5jLWl0ZXJhdG9yJyk7XG5yZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNy5zeW1ib2wub2JzZXJ2YWJsZScpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuLi8uLi9tb2R1bGVzL19jb3JlJykuU3ltYm9sO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL3N5bWJvbC9pbmRleC5qc1xuLy8gbW9kdWxlIGlkID0gNzFcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///71\n")},function(module,exports,__webpack_require__){"use strict";eval("\n// ECMAScript 6 symbols shim\nvar global = __webpack_require__(1);\nvar has = __webpack_require__(2);\nvar DESCRIPTORS = __webpack_require__(4);\nvar $export = __webpack_require__(5);\nvar redefine = __webpack_require__(35);\nvar META = __webpack_require__(73).KEY;\nvar $fails = __webpack_require__(11);\nvar shared = __webpack_require__(17);\nvar setToStringTag = __webpack_require__(24);\nvar uid = __webpack_require__(13);\nvar wks = __webpack_require__(9);\nvar wksExt = __webpack_require__(25);\nvar wksDefine = __webpack_require__(26);\nvar enumKeys = __webpack_require__(74);\nvar isArray = __webpack_require__(75);\nvar anObject = __webpack_require__(10);\nvar isObject = __webpack_require__(7);\nvar toIObject = __webpack_require__(8);\nvar toPrimitive = __webpack_require__(18);\nvar createDesc = __webpack_require__(14);\nvar _create = __webpack_require__(21);\nvar gOPNExt = __webpack_require__(76);\nvar $GOPD = __webpack_require__(40);\nvar $DP = __webpack_require__(3);\nvar $keys = __webpack_require__(22);\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(39).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(27).f = $propertyIsEnumerable;\n __webpack_require__(38).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(12)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(6)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///72\n")},function(module,exports,__webpack_require__){eval("var META = __webpack_require__(13)('meta');\nvar isObject = __webpack_require__(7);\nvar has = __webpack_require__(2);\nvar setDesc = __webpack_require__(3).f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !__webpack_require__(11)(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8v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ZhbHNlLFxuICBmYXN0S2V5OiBmYXN0S2V5LFxuICBnZXRXZWFrOiBnZXRXZWFrLFxuICBvbkZyZWV6ZTogb25GcmVlemVcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9fbWV0YS5qc1xuLy8gbW9kdWxlIGlkID0gNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///73\n")},function(module,exports,__webpack_require__){eval("// all enumerable object keys, includes symbols\nvar getKeys = __webpack_require__(22);\nvar gOPS = __webpack_require__(38);\nvar pIE = __webpack_require__(27);\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQuanMiLC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7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///74\n")},function(module,exports,__webpack_require__){eval("// 7.2.2 IsArray(argument)\nvar cof = __webpack_require__(37);\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2lzLWFycmF5LmpzP2VkNDMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gNy4yLjIgSXNBcnJheShhcmd1bWVudClcbnZhciBjb2YgPSByZXF1aXJlKCcuL19jb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gQXJyYXkuaXNBcnJheSB8fCBmdW5jdGlvbiBpc0FycmF5KGFyZykge1xuICByZXR1cm4gY29mKGFyZykgPT0gJ0FycmF5Jztcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9faXMtYXJyYXkuanNcbi8vIG1vZHVsZSBpZCA9IDc1XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///75\n")},function(module,exports,__webpack_require__){eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(8);\nvar gOPN = __webpack_require__(39).f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLWV4dC5qcz80NmI3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGZhbGxiYWNrIGZvciBJRTExIGJ1Z2d5IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzIHdpdGggaWZyYW1lIGFuZCB3aW5kb3dcbnZhciB0b0lPYmplY3QgPSByZXF1aXJlKCcuL190by1pb2JqZWN0Jyk7XG52YXIgZ09QTiA9IHJlcXVpcmUoJy4vX29iamVjdC1nb3BuJykuZjtcbnZhciB0b1N0cmluZyA9IHt9LnRvU3RyaW5nO1xuXG52YXIgd2luZG93TmFtZXMgPSB0eXBlb2Ygd2luZG93ID09ICdvYmplY3QnICYmIHdpbmRvdyAmJiBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lc1xuICA/IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHdpbmRvdykgOiBbXTtcblxudmFyIGdldFdpbmRvd05hbWVzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuIGdPUE4oaXQpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgcmV0dXJuIHdpbmRvd05hbWVzLnNsaWNlKCk7XG4gIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzLmYgPSBmdW5jdGlvbiBnZXRPd25Qcm9wZXJ0eU5hbWVzKGl0KSB7XG4gIHJldHVybiB3aW5kb3dOYW1lcyAmJiB0b1N0cmluZy5jYWxsKGl0KSA9PSAnW29iamVjdCBXaW5kb3ddJyA/IGdldFdpbmRvd05hbWVzKGl0KSA6IGdPUE4odG9JT2JqZWN0KGl0KSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX29iamVjdC1nb3BuLWV4dC5qc1xuLy8gbW9kdWxlIGlkID0gNzZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///76\n")},function(module,exports){eval("//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzcuanMiLCJzb3VyY2VzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///77\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(26)('asyncIterator');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qcz8zOTg5Il0sInNvdXJjZXNDb250ZW50IjpbInJlcXVpcmUoJy4vX3drcy1kZWZpbmUnKSgnYXN5bmNJdGVyYXRvcicpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5hc3luYy1pdGVyYXRvci5qc1xuLy8gbW9kdWxlIGlkID0gNzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///78\n")},function(module,exports,__webpack_require__){eval("__webpack_require__(26)('observable');\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM3LnN5bWJvbC5vYnNlcnZhYmxlLmpzPzQxNjciXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi9fd2tzLWRlZmluZScpKCdvYnNlcnZhYmxlJyk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczcuc3ltYm9sLm9ic2VydmFibGUuanNcbi8vIG1vZHVsZSBpZCA9IDc5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///79\n")},function(module,exports,__webpack_require__){"use strict";eval('\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = __webpack_require__(81);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = __webpack_require__(85);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = __webpack_require__(33);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9oZWxwZXJzL2luaGVyaXRzLmpzPzNkZmQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmV4cG9ydHMuX19lc01vZHVsZSA9IHRydWU7XG5cbnZhciBfc2V0UHJvdG90eXBlT2YgPSByZXF1aXJlKFwiLi4vY29yZS1qcy9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZlwiKTtcblxudmFyIF9zZXRQcm90b3R5cGVPZjIgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF9zZXRQcm90b3R5cGVPZik7XG5cbnZhciBfY3JlYXRlID0gcmVxdWlyZShcIi4uL2NvcmUtanMvb2JqZWN0L2NyZWF0ZVwiKTtcblxudmFyIF9jcmVhdGUyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfY3JlYXRlKTtcblxudmFyIF90eXBlb2YyID0gcmVxdWlyZShcIi4uL2hlbHBlcnMvdHlwZW9mXCIpO1xuXG52YXIgX3R5cGVvZjMgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KF90eXBlb2YyKTtcblxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHsgcm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aXRzLmpzXG4vLyBtb2R1bGUgaWQgPSA4MFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///80\n')},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(82), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzPzkyMjAiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSB7IFwiZGVmYXVsdFwiOiByZXF1aXJlKFwiY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9zZXQtcHJvdG90eXBlLW9mXCIpLCBfX2VzTW9kdWxlOiB0cnVlIH07XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzXG4vLyBtb2R1bGUgaWQgPSA4MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///81\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(83);\nmodule.exports = __webpack_require__(0).Object.setPrototypeOf;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9zZXQtcHJvdG90eXBlLW9mLmpzPzhiZjAiXSwic291cmNlc0NvbnRlbnQiOlsicmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9lczYub2JqZWN0LnNldC1wcm90b3R5cGUtb2YnKTtcbm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi4vLi4vbW9kdWxlcy9fY29yZScpLk9iamVjdC5zZXRQcm90b3R5cGVPZjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9mbi9vYmplY3Qvc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gODJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///82\n")},function(module,exports,__webpack_require__){eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(5);\n$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(84).set });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5zZXQtcHJvdG90eXBlLW9mLmpzPzdiMTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gMTkuMS4zLjE5IE9iamVjdC5zZXRQcm90b3R5cGVPZihPLCBwcm90bylcbnZhciAkZXhwb3J0ID0gcmVxdWlyZSgnLi9fZXhwb3J0Jyk7XG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHsgc2V0UHJvdG90eXBlT2Y6IHJlcXVpcmUoJy4vX3NldC1wcm90bycpLnNldCB9KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL2VzNi5vYmplY3Quc2V0LXByb3RvdHlwZS1vZi5qc1xuLy8gbW9kdWxlIGlkID0gODNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///83\n")},function(module,exports,__webpack_require__){eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = __webpack_require__(7);\nvar anObject = __webpack_require__(10);\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(30)(Function.call, __webpack_require__(40).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX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HtcbiAgICAgICAgY2hlY2soTywgcHJvdG8pO1xuICAgICAgICBpZiAoYnVnZ3kpIE8uX19wcm90b19fID0gcHJvdG87XG4gICAgICAgIGVsc2Ugc2V0KE8sIHByb3RvKTtcbiAgICAgICAgcmV0dXJuIE87XG4gICAgICB9O1xuICAgIH0oe30sIGZhbHNlKSA6IHVuZGVmaW5lZCksXG4gIGNoZWNrOiBjaGVja1xufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19zZXQtcHJvdG8uanNcbi8vIG1vZHVsZSBpZCA9IDg0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///84\n")},function(module,exports,__webpack_require__){eval('module.exports = { "default": __webpack_require__(86), __esModule: true };//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvYmFiZWwtcnVudGltZS9jb3JlLWpzL29iamVjdC9jcmVhdGUuanM/M2FmNCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHsgXCJkZWZhdWx0XCI6IHJlcXVpcmUoXCJjb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2NyZWF0ZVwiKSwgX19lc01vZHVsZTogdHJ1ZSB9O1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbm9kZV9tb2R1bGVzL2JhYmVsLXJ1bnRpbWUvY29yZS1qcy9vYmplY3QvY3JlYXRlLmpzXG4vLyBtb2R1bGUgaWQgPSA4NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///85\n')},function(module,exports,__webpack_require__){eval("__webpack_require__(87);\nvar $Object = __webpack_require__(0).Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L2ZuL29iamVjdC9jcmVhdGUuanM/YTBjZSJdLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCcuLi8uLi9tb2R1bGVzL2VzNi5vYmplY3QuY3JlYXRlJyk7XG52YXIgJE9iamVjdCA9IHJlcXVpcmUoJy4uLy4uL21vZHVsZXMvX2NvcmUnKS5PYmplY3Q7XG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGNyZWF0ZShQLCBEKSB7XG4gIHJldHVybiAkT2JqZWN0LmNyZWF0ZShQLCBEKTtcbn07XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvZm4vb2JqZWN0L2NyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gODZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///86\n")},function(module,exports,__webpack_require__){eval("var $export = __webpack_require__(5);\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: __webpack_require__(21) });\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvZXM2Lm9iamVjdC5jcmVhdGUuanM/YjA1ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgJGV4cG9ydCA9IHJlcXVpcmUoJy4vX2V4cG9ydCcpO1xuLy8gMTkuMS4yLjIgLyAxNS4yLjMuNSBPYmplY3QuY3JlYXRlKE8gWywgUHJvcGVydGllc10pXG4kZXhwb3J0KCRleHBvcnQuUywgJ09iamVjdCcsIHsgY3JlYXRlOiByZXF1aXJlKCcuL19vYmplY3QtY3JlYXRlJykgfSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2xpYnJhcnkvbW9kdWxlcy9lczYub2JqZWN0LmNyZWF0ZS5qc1xuLy8gbW9kdWxlIGlkID0gODdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///87\n")}]);
|
|
trunk/includes/builders/gutenberg/assets/js/wpglobus-gutenberg.js
DELETED
@@ -1,602 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* WPGlobus Administration
|
3 |
-
* Interface JS functions
|
4 |
-
*
|
5 |
-
* @since 1.9.17
|
6 |
-
* @since 2.2.3
|
7 |
-
*
|
8 |
-
* @package WPGlobus
|
9 |
-
* @subpackage Administration/Gutenberg
|
10 |
-
*/
|
11 |
-
/*jslint browser: true */
|
12 |
-
/*global jQuery, console, _wpGutenbergCodeEditorSettings*/
|
13 |
-
|
14 |
-
jQuery(document).ready(function ($) {
|
15 |
-
"use strict";
|
16 |
-
|
17 |
-
var api = {
|
18 |
-
counter: 0,
|
19 |
-
noticeOn: false,
|
20 |
-
initDone: false,
|
21 |
-
languageSelectorBoxDelta: 0,
|
22 |
-
oldLanguageSelector: false,
|
23 |
-
languageSelectorEnabled: true,
|
24 |
-
parseBool: function(b) {
|
25 |
-
return !(/^(false|0)$/i).test(b) && !!b;
|
26 |
-
},
|
27 |
-
getCounter: function(alias) {
|
28 |
-
return api.counter;
|
29 |
-
},
|
30 |
-
getOptionKey: function(alias) {
|
31 |
-
alias = alias || '';
|
32 |
-
return WPGlobusGutenberg.keyOption[alias];
|
33 |
-
},
|
34 |
-
getOptions: function() {
|
35 |
-
return WPGlobusGutenberg.options;
|
36 |
-
},
|
37 |
-
isOldLanguageSelector: function() {
|
38 |
-
return api.oldLanguageSelector;
|
39 |
-
},
|
40 |
-
isPostDisabled: function() {
|
41 |
-
return WPGlobusGutenberg.__post.disabled;
|
42 |
-
},
|
43 |
-
isEnabledTab: function(tab) {
|
44 |
-
if ( 'undefined' === typeof tab ) {
|
45 |
-
tab = 'options';
|
46 |
-
}
|
47 |
-
var enabled = false;
|
48 |
-
if ( 'options' == tab ) {
|
49 |
-
if ( api.parseBool(WPGlobusGutenberg.enabledOptionsTab) ) {
|
50 |
-
enabled = true;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
return enabled;
|
54 |
-
},
|
55 |
-
init: function() {
|
56 |
-
WPGlobusGutenberg.yoastSeo = api.parseBool(WPGlobusGutenberg.yoastSeo);
|
57 |
-
if ( api.isPostDisabled() ) {
|
58 |
-
return;
|
59 |
-
}
|
60 |
-
api.initListeners();
|
61 |
-
api.setTabs();
|
62 |
-
api.formHandler();
|
63 |
-
api.attachListeners();
|
64 |
-
},
|
65 |
-
initListeners: function() {
|
66 |
-
if ( WPGlobusGutenberg.yoastSeo && 1 == $('.yoast.wpseo-metabox').length ) {
|
67 |
-
/**
|
68 |
-
* Prevent start of alert message when yoast seo is present.
|
69 |
-
* Check getEventListeners(window).beforeunload in Chrome console for beforeunload event.
|
70 |
-
* @see https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference#monitoreventsobject-events
|
71 |
-
*/
|
72 |
-
$(window).on('beforeunload', function (event) {
|
73 |
-
event.stopImmediatePropagation()
|
74 |
-
});
|
75 |
-
}
|
76 |
-
},
|
77 |
-
formHandler: function() {
|
78 |
-
|
79 |
-
var val = $('.metabox-base-form #referredby').attr('value');
|
80 |
-
if ( 'undefined' !== typeof val ) {
|
81 |
-
if( val.indexOf('language=en') == -1 ) {
|
82 |
-
val = val+'&language='+WPGlobusGutenberg.language;
|
83 |
-
} else {
|
84 |
-
val = val.replace('language=en', 'language='+WPGlobusGutenberg.language);
|
85 |
-
}
|
86 |
-
$('.metabox-base-form #referredby').attr('value', val);
|
87 |
-
}
|
88 |
-
|
89 |
-
val = $('input[name="_wp_original_http_referer"]').attr('value');
|
90 |
-
if ( 'undefined' !== typeof val ) {
|
91 |
-
if( val.indexOf('language=en') == -1 ) {
|
92 |
-
val = val+'&language='+WPGlobusGutenberg.language;
|
93 |
-
} else {
|
94 |
-
val = val.replace('language=en', 'language='+WPGlobusGutenberg.language);
|
95 |
-
}
|
96 |
-
$('input[name="_wp_original_http_referer"]').attr('value', val);
|
97 |
-
}
|
98 |
-
},
|
99 |
-
setTabs: function() {
|
100 |
-
if ( WPGlobusGutenberg.tabs.length == 0 ) {
|
101 |
-
api.WPGlobusSwitcherPlugin();
|
102 |
-
return;
|
103 |
-
}
|
104 |
-
api.oldLanguageSelector = true;
|
105 |
-
var intervalID = setInterval( function() {
|
106 |
-
/** var $toolbar = $('.edit-post-header'); **/
|
107 |
-
var $toolbar = $('.edit-post-header__settings');
|
108 |
-
if( $toolbar.length == 1 ) {
|
109 |
-
$toolbar.before(WPGlobusGutenberg.tabs);
|
110 |
-
/*
|
111 |
-
var width = $('.edit-post-header-toolbar').css('width');
|
112 |
-
width = width.replace('px','') * 1;
|
113 |
-
if ( width < 50 ) {
|
114 |
-
width = width + 5;
|
115 |
-
} else {
|
116 |
-
width = width + 30;
|
117 |
-
}
|
118 |
-
$('.wpglobus-gutenberg-selector-box').css({'margin-left':width+'px'});
|
119 |
-
// */
|
120 |
-
clearInterval(intervalID)
|
121 |
-
} else {
|
122 |
-
//console.log('Here: else');
|
123 |
-
}
|
124 |
-
}, 200);
|
125 |
-
},
|
126 |
-
setSelectorStatus: function() {
|
127 |
-
if ( ! api.isOldLanguageSelector() ) {
|
128 |
-
return;
|
129 |
-
}
|
130 |
-
$('.wpglobus-gutenberg-selector-box').css({'opacity':'0.2'}).attr('onclick','return false;');
|
131 |
-
api.languageSelectorEnabled = false;
|
132 |
-
var iID = setInterval( function() {
|
133 |
-
if ( $('.is-saving').length == 0 ) {
|
134 |
-
clearInterval(iID);
|
135 |
-
if ( WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage ) {
|
136 |
-
if ( location.pathname.indexOf(WPGlobusGutenberg.postEditPage) != -1 ) {
|
137 |
-
WPGlobusGutenberg.pagenow = WPGlobusGutenberg.postEditPage;
|
138 |
-
$('.wpglobus-gutenberg-selector-box').css({'opacity':'1'}).attr('onclick','');
|
139 |
-
api.reloadPage();
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
api.languageSelectorEnabled = true;
|
144 |
-
$('.wpglobus-gutenberg-selector-box').css({'opacity':'1'}).attr('onclick','');
|
145 |
-
}
|
146 |
-
}, 400);
|
147 |
-
},
|
148 |
-
reloadPage: function() {
|
149 |
-
$('.wpglobus-selector-grid').css({'grid-template-columns':'10% 90%'});
|
150 |
-
$('.wpglobus-gutenberg-selector-text').text(WPGlobusGutenberg.i18n.reload);
|
151 |
-
(function blink() {
|
152 |
-
$('.wpglobus-gutenberg-selector').fadeOut(500).fadeIn(500, blink);
|
153 |
-
})();
|
154 |
-
setTimeout( function() {
|
155 |
-
location.reload();
|
156 |
-
}, 500);
|
157 |
-
},
|
158 |
-
attachListeners: function() {
|
159 |
-
if ( ! api.isOldLanguageSelector() ) {
|
160 |
-
return;
|
161 |
-
}
|
162 |
-
/**
|
163 |
-
* Language selector.
|
164 |
-
*/
|
165 |
-
$(document).on('mouseenter', '.wpglobus-gutenberg-selector', function(ev) {
|
166 |
-
if ( ! api.languageSelectorEnabled ) {
|
167 |
-
return;
|
168 |
-
}
|
169 |
-
$('.wpglobus-gutenberg-selector-dropdown').css({'display':'block'});
|
170 |
-
api.languageSelectorBoxDelta = ev.screenY;
|
171 |
-
$('.edit-post-header').css({'z-index':'100000'});
|
172 |
-
$('.wpglobus-gutenberg-selector-box').css({'z-index':'100001'});
|
173 |
-
});
|
174 |
-
$(document).on('mouseleave', '.wpglobus-gutenberg-selector', function(ev) {
|
175 |
-
if ( api.languageSelectorBoxDelta != 0 && ev.screenY - api.languageSelectorBoxDelta <= 0) {
|
176 |
-
$('.wpglobus-gutenberg-selector-dropdown').css({'display':'none'});
|
177 |
-
$('.edit-post-header').css({'z-index':'9989'});
|
178 |
-
$('.wpglobus-gutenberg-selector-box').css({'z-index':'100'});
|
179 |
-
}
|
180 |
-
});
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Dropdown list.
|
184 |
-
*/
|
185 |
-
$(document).on('mouseleave', '.wpglobus-gutenberg-selector-dropdown', function(ev) {
|
186 |
-
$('.wpglobus-gutenberg-selector-dropdown').css({'display':'none'});
|
187 |
-
$('.edit-post-header').css({'z-index':'9989'});
|
188 |
-
$('.wpglobus-gutenberg-selector-box').css({'z-index':'10000'});
|
189 |
-
});
|
190 |
-
|
191 |
-
/**
|
192 |
-
* editor-post-save-draft.
|
193 |
-
*/
|
194 |
-
$(document).on('click', '.editor-post-save-draft', function() {
|
195 |
-
api.setSelectorStatus();
|
196 |
-
});
|
197 |
-
|
198 |
-
/**
|
199 |
-
* editor-post-publish-button.
|
200 |
-
*/
|
201 |
-
$(document).on('click', '.editor-post-publish-button', function() {
|
202 |
-
api.setSelectorStatus();
|
203 |
-
});
|
204 |
-
|
205 |
-
},
|
206 |
-
WPGlobusSwitcherPlugin: function(){
|
207 |
-
// @since 2.2.3
|
208 |
-
// @since 2.2.14
|
209 |
-
|
210 |
-
if ( 'undefined' === typeof wp.editPost || 'undefined' === typeof wp.plugins ) {
|
211 |
-
// @since 2.2.15
|
212 |
-
return;
|
213 |
-
}
|
214 |
-
var language = WPGlobusGutenberg.language;
|
215 |
-
var enabledLanguages = WPGlobusCoreData.enabled_languages;
|
216 |
-
var languageNames = WPGlobusCoreData.en_language_name;
|
217 |
-
var flagsUrl = WPGlobusGutenberg.flags_url;
|
218 |
-
var switcherButtonTitle = 'WPGlobus Switcher';
|
219 |
-
var ref = location.href;
|
220 |
-
var refs = {};
|
221 |
-
for (var key in enabledLanguages) {
|
222 |
-
if ( -1 == ref.indexOf('language='+language) ) {
|
223 |
-
refs[enabledLanguages[key]] = ref + '&language='+enabledLanguages[key];
|
224 |
-
} else {
|
225 |
-
refs[enabledLanguages[key]] = ref.replace( 'language='+language, 'language='+enabledLanguages[key] );
|
226 |
-
}
|
227 |
-
}
|
228 |
-
|
229 |
-
var __ = wp.i18n.__;
|
230 |
-
var el = wp.element.createElement;
|
231 |
-
var Fragment = wp.element.Fragment;
|
232 |
-
|
233 |
-
var TabPanel = wp.components.TabPanel;
|
234 |
-
var withState = wp.compose.withState;
|
235 |
-
var RadioControl = wp.components.RadioControl;
|
236 |
-
var Notice = wp.components.Notice;
|
237 |
-
var Button = wp.components.Button;
|
238 |
-
|
239 |
-
var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
|
240 |
-
var PanelBody = wp.components.PanelBody;
|
241 |
-
var PluginSidebar = wp.editPost.PluginSidebar;
|
242 |
-
var registerPlugin = wp.plugins.registerPlugin;
|
243 |
-
|
244 |
-
var pluginStarButton = $('.components-panel__header.edit-post-sidebar-header button.components-icon-button').eq(0);
|
245 |
-
|
246 |
-
var switcherButtonHTML = {
|
247 |
-
flagOnly: '<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" />',
|
248 |
-
flagLanguage: '<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],
|
249 |
-
flagCode: '<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> ' + WPGlobusGutenberg.language,
|
250 |
-
languageOnly: ' ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],
|
251 |
-
languageCode: ' ' + WPGlobusGutenberg.language,
|
252 |
-
};
|
253 |
-
|
254 |
-
var switcherPluginButtonType = '';
|
255 |
-
var promisedPluginButtonType = '';
|
256 |
-
var optionSwitcherButtonType = api.getOptionKey('switcherButtonType');
|
257 |
-
|
258 |
-
function setSwitcherButtonType(type) {
|
259 |
-
type = type || 'flagLanguage';
|
260 |
-
switcherPluginButtonType = type;
|
261 |
-
}
|
262 |
-
|
263 |
-
function getSwitcherButtonType() {
|
264 |
-
return switcherPluginButtonType;
|
265 |
-
}
|
266 |
-
|
267 |
-
function getSwitcherButtonTitle() {
|
268 |
-
return switcherButtonTitle;
|
269 |
-
}
|
270 |
-
|
271 |
-
setSwitcherButtonType(WPGlobusGutenberg.options[optionSwitcherButtonType]);
|
272 |
-
|
273 |
-
promisedPluginButtonType = getSwitcherButtonType();
|
274 |
-
|
275 |
-
$(document).on('click', pluginStarButton, function(){
|
276 |
-
setSwitcherPluginButton();
|
277 |
-
});
|
278 |
-
|
279 |
-
function rbAnimate(start) {
|
280 |
-
if ( 'undefined' === typeof start ) {
|
281 |
-
start = true;
|
282 |
-
}
|
283 |
-
var elems = document.querySelectorAll('.wpglobus-switcher-components-radio-control .components-radio-control__input');
|
284 |
-
if ( elems.length == 0 ) {
|
285 |
-
return;
|
286 |
-
}
|
287 |
-
if ( start ) {
|
288 |
-
elems.forEach(function(elem) {
|
289 |
-
elem.classList.add(elem.value);
|
290 |
-
elem.classList.remove('wpglobus-switcher-pulsate-radio');
|
291 |
-
elem.classList.add('wpglobus-switcher-pulsate-radio-off');
|
292 |
-
});
|
293 |
-
var elem = document.querySelector('.wpglobus-switcher-components-radio-control .'+promisedPluginButtonType);
|
294 |
-
elem.classList.remove('wpglobus-switcher-pulsate-radio-off');
|
295 |
-
elem.classList.add('wpglobus-switcher-pulsate-radio');
|
296 |
-
} else {
|
297 |
-
elems.forEach(function(elem) {
|
298 |
-
elem.classList.remove('wpglobus-switcher-pulsate-radio');
|
299 |
-
elem.classList.remove('wpglobus-switcher-pulsate-radio-off');
|
300 |
-
elem.classList.add('wpglobus-switcher-pulsate-radio-on');
|
301 |
-
});
|
302 |
-
}
|
303 |
-
}
|
304 |
-
function notice(el, mess) {
|
305 |
-
if ( 'undefined' === typeof el || api.noticeOn ) {
|
306 |
-
return;
|
307 |
-
}
|
308 |
-
api.noticeOn = true;
|
309 |
-
el.innerText = mess;
|
310 |
-
el.classList.remove('hidden');
|
311 |
-
setTimeout(function() {
|
312 |
-
el.classList.add('hidden');
|
313 |
-
api.noticeOn = false;
|
314 |
-
}, 3000);
|
315 |
-
}
|
316 |
-
|
317 |
-
function setOption(option, value) {
|
318 |
-
option = option || '';
|
319 |
-
value = value || '';
|
320 |
-
if ( optionSwitcherButtonType == option ) {
|
321 |
-
rbAnimate(true);
|
322 |
-
saveOptions(option, value).then(function(response){
|
323 |
-
if ('success' == response.result) {
|
324 |
-
setSwitcherButtonType(value);
|
325 |
-
WPGlobusGutenberg.options[optionSwitcherButtonType] = value;
|
326 |
-
setSwitcherPluginButton(value);
|
327 |
-
}
|
328 |
-
})
|
329 |
-
.fail( function(response) {
|
330 |
-
var el = document.getElementsByClassName('wpglobus-switcher-error-message');
|
331 |
-
if ('undefined' !== typeof el[0]) {
|
332 |
-
if ('error' == response.result) {
|
333 |
-
notice(el[0], response.message);
|
334 |
-
} else if (response.status == 400) {
|
335 |
-
notice(el[0], 'Error: '+response.status + ' (' + response.statusText + ')' );
|
336 |
-
}
|
337 |
-
promisedPluginButtonType = getSwitcherButtonType();
|
338 |
-
}
|
339 |
-
var tab = document.getElementsByClassName('wpglobus-panel-tab-options');
|
340 |
-
if ('undefined' !== typeof tab[0]) {
|
341 |
-
if ( -1 != tab[0].classList.value.indexOf('is-active') ) {
|
342 |
-
tab[0].click();
|
343 |
-
}
|
344 |
-
}
|
345 |
-
})
|
346 |
-
.always(function() {
|
347 |
-
rbAnimate(false);
|
348 |
-
});
|
349 |
-
}
|
350 |
-
}
|
351 |
-
|
352 |
-
function saveOptions(option, value) {
|
353 |
-
option = option || '';
|
354 |
-
if ( option == '' ) {
|
355 |
-
return;
|
356 |
-
}
|
357 |
-
var data = {};
|
358 |
-
data['sender'] = 'WPGlobusGutenberg';
|
359 |
-
data['_action'] = 'saveOption';
|
360 |
-
data['is_admin'] = 1;
|
361 |
-
data['counter'] = api.counter++;
|
362 |
-
data['options'] = {};
|
363 |
-
data['options'][option] = value;
|
364 |
-
return wp.ajax.post(WPGlobusGutenberg.wpglobusAjax, {data:data});
|
365 |
-
}
|
366 |
-
|
367 |
-
function getSwitcherButton(type) {
|
368 |
-
if ( 'undefined' === typeof switcherButtonHTML[type] ) {
|
369 |
-
type = switcherPluginButtonType;
|
370 |
-
}
|
371 |
-
return switcherButtonHTML[type];
|
372 |
-
}
|
373 |
-
|
374 |
-
function setSwitcherPluginButton(type) {
|
375 |
-
if ( 'undefined' === typeof type || 'undefined' === typeof switcherButtonHTML[type] ) {
|
376 |
-
type = switcherPluginButtonType;
|
377 |
-
}
|
378 |
-
|
379 |
-
setTimeout(function() {
|
380 |
-
var button = document.querySelector('[aria-label="'+getSwitcherButtonTitle()+'"]');
|
381 |
-
if ( 'undefined' === typeof button || null === button ) {
|
382 |
-
return;
|
383 |
-
}
|
384 |
-
var status = button.dataset.status;
|
385 |
-
if ( 'undefined' === typeof status ) {
|
386 |
-
var content = button.innerHTML;
|
387 |
-
button.innerHTML = content + getSwitcherButton(type);
|
388 |
-
button.dataset.status = 'init';
|
389 |
-
} else {
|
390 |
-
button.innerHTML = getSwitcherButton(type);
|
391 |
-
button.dataset.status = 'changed';
|
392 |
-
}
|
393 |
-
}, 300);
|
394 |
-
}
|
395 |
-
|
396 |
-
function languageList() {
|
397 |
-
|
398 |
-
if ( WPGlobusGutenberg.pagenow == WPGlobusGutenberg.postNewPage ) {
|
399 |
-
return el(
|
400 |
-
'div',
|
401 |
-
{style:{marginBottom:'20px'},className: "wpglobus-switcher-panel__switcher-notice"},
|
402 |
-
WPGlobusGutenberg.i18n.save_post
|
403 |
-
);
|
404 |
-
}
|
405 |
-
|
406 |
-
return el(
|
407 |
-
'ul',
|
408 |
-
{className: 'language-list'},
|
409 |
-
enabledLanguages.map(
|
410 |
-
function(lang){
|
411 |
-
return el( 'li', {key:lang, className:'language-item'},
|
412 |
-
el('img', {style:{marginRight:'7px'},className:'wpglobus-switcher-panel__flag', height:'20px', width:'20px', src:flagsUrl[lang]}),
|
413 |
-
el(Button, {href:refs[lang], isSmall:true, isPrimary:true}, languageNames[lang])
|
414 |
-
);
|
415 |
-
}
|
416 |
-
)
|
417 |
-
);
|
418 |
-
}
|
419 |
-
|
420 |
-
function onTabSelect(tab) {
|
421 |
-
if ( tab.name == 'switcher' ) {
|
422 |
-
return SwitcherTabContent();
|
423 |
-
} else if ( tab.name == 'options' ) {
|
424 |
-
return OptionsTabContent();
|
425 |
-
}
|
426 |
-
}
|
427 |
-
|
428 |
-
function TabLayout() {
|
429 |
-
|
430 |
-
var tabs = [
|
431 |
-
{
|
432 |
-
name: 'switcher',
|
433 |
-
title: 'Languages',
|
434 |
-
className: 'wpglobus-panel-tab wpglobus-panel-tab-selector edit-post-sidebar__panel-tab'
|
435 |
-
}
|
436 |
-
];
|
437 |
-
|
438 |
-
if ( WPGlobusGutenberg.isEnabledTab('options') ) {
|
439 |
-
tabs.push(
|
440 |
-
{
|
441 |
-
name: 'options',
|
442 |
-
title: 'Options',
|
443 |
-
className: 'wpglobus-panel-tab wpglobus-panel-tab-options edit-post-sidebar__panel-tab'
|
444 |
-
}
|
445 |
-
);
|
446 |
-
}
|
447 |
-
|
448 |
-
return el(
|
449 |
-
TabPanel,
|
450 |
-
{
|
451 |
-
name: 'WPGlobusSwitcherTabPanel',
|
452 |
-
className: 'wpglobus-tab-panel',
|
453 |
-
activeClass: 'is-active',
|
454 |
-
tabs: tabs
|
455 |
-
},
|
456 |
-
onTabSelect
|
457 |
-
);
|
458 |
-
}
|
459 |
-
|
460 |
-
function SwitcherTabContent() {
|
461 |
-
return el(
|
462 |
-
'div',
|
463 |
-
{
|
464 |
-
className: 'wpglobus-tab-content wpglobus-selector-tab-content',
|
465 |
-
},
|
466 |
-
el(
|
467 |
-
Notice,
|
468 |
-
{
|
469 |
-
className: 'wpglobus-switcher-panel__notice',
|
470 |
-
status: 'informational',
|
471 |
-
isDismissible: false
|
472 |
-
},
|
473 |
-
__( 'Select language' )
|
474 |
-
),
|
475 |
-
el(
|
476 |
-
'div',
|
477 |
-
{
|
478 |
-
className: 'wpglobus-switcher-panel__switcher-box'
|
479 |
-
},
|
480 |
-
languageList()
|
481 |
-
),
|
482 |
-
el(
|
483 |
-
Button,
|
484 |
-
{
|
485 |
-
className: 'wpglobus-switcher-panel__button-link wpglobus-switcher-panel__info',
|
486 |
-
href: WPGlobusGutenberg.store_link,
|
487 |
-
isLink: true,
|
488 |
-
target: "_blank"
|
489 |
-
},
|
490 |
-
__( 'WPGlobus Premium Add-ons' )
|
491 |
-
),
|
492 |
-
el(
|
493 |
-
Button,
|
494 |
-
{
|
495 |
-
className: 'wpglobus-switcher-panel__button-link wpglobus-switcher-panel__settings-link',
|
496 |
-
href: WPGlobusGutenberg.block_editor_tab_url,
|
497 |
-
isLink: true
|
498 |
-
},
|
499 |
-
__( 'Settings' )
|
500 |
-
)
|
501 |
-
);
|
502 |
-
}
|
503 |
-
|
504 |
-
var SwitcherPluginButton = withState({
|
505 |
-
value: promisedPluginButtonType
|
506 |
-
})(({
|
507 |
-
value,
|
508 |
-
setState
|
509 |
-
}) => el(RadioControl, {
|
510 |
-
label: '',
|
511 |
-
help: 'Select type of switcher language button.',
|
512 |
-
selected: promisedPluginButtonType,
|
513 |
-
className: 'wpglobus-switcher-components-radio-control',
|
514 |
-
options: [
|
515 |
-
{ label: 'Flag only', value: 'flagOnly' },
|
516 |
-
{ label: 'Flag with language', value: 'flagLanguage' },
|
517 |
-
{ label: 'Flag with language code', value: 'flagCode' },
|
518 |
-
{ label: 'Language only', value: 'languageOnly' },
|
519 |
-
{ label: 'Language code', value: 'languageCode' },
|
520 |
-
],
|
521 |
-
onChange: value => {
|
522 |
-
promisedPluginButtonType = value;
|
523 |
-
setState({
|
524 |
-
value
|
525 |
-
});
|
526 |
-
// @see setOption function for setSwitcherButtonType(value) and setSwitcherPluginButton(value)
|
527 |
-
setOption(optionSwitcherButtonType, value);
|
528 |
-
}
|
529 |
-
}));
|
530 |
-
|
531 |
-
function OptionsTabContent() {
|
532 |
-
return el(
|
533 |
-
'div',
|
534 |
-
{
|
535 |
-
className: 'wpglobus-tab-content wpglobus-options-tab-content',
|
536 |
-
},
|
537 |
-
el(
|
538 |
-
Notice,
|
539 |
-
{
|
540 |
-
className: 'wpglobus-switcher-panel__notice',
|
541 |
-
status: 'informational',
|
542 |
-
isDismissible: false
|
543 |
-
},
|
544 |
-
__( 'Select type' )
|
545 |
-
),
|
546 |
-
el(
|
547 |
-
SwitcherPluginButton,
|
548 |
-
null
|
549 |
-
)
|
550 |
-
);
|
551 |
-
}
|
552 |
-
|
553 |
-
function Component() {
|
554 |
-
setSwitcherPluginButton();
|
555 |
-
return el(
|
556 |
-
Fragment,
|
557 |
-
{},
|
558 |
-
el(
|
559 |
-
PluginSidebarMoreMenuItem,
|
560 |
-
{
|
561 |
-
target: 'wpglobus-switcher-sidebar',
|
562 |
-
icon: 'admin-site',
|
563 |
-
//onClick: @see wp-includes\js\dist\edit-post.js
|
564 |
-
},
|
565 |
-
__( 'WPGlobus' )
|
566 |
-
),
|
567 |
-
el(
|
568 |
-
PluginSidebar,
|
569 |
-
{
|
570 |
-
name: 'wpglobus-switcher-sidebar',
|
571 |
-
title: getSwitcherButtonTitle(),
|
572 |
-
className: 'wpglobus-switcher-components-panel',
|
573 |
-
//togglePin: @see wp-includes\js\dist\edit-post.js
|
574 |
-
},
|
575 |
-
el(
|
576 |
-
'div',
|
577 |
-
{
|
578 |
-
className: 'wpglobus-switcher-message wpglobus-switcher-error-message hidden',
|
579 |
-
style:{}
|
580 |
-
},
|
581 |
-
''
|
582 |
-
),
|
583 |
-
el(
|
584 |
-
PanelBody,
|
585 |
-
{
|
586 |
-
className: 'wpglobus-switcher-panel__body'
|
587 |
-
},
|
588 |
-
TabLayout()
|
589 |
-
)
|
590 |
-
|
591 |
-
)
|
592 |
-
);
|
593 |
-
}
|
594 |
-
registerPlugin( 'wpglobus-switcher', {
|
595 |
-
icon: '',
|
596 |
-
render: Component,
|
597 |
-
} );
|
598 |
-
}
|
599 |
-
}
|
600 |
-
WPGlobusGutenberg = $.extend({}, WPGlobusGutenberg, api);
|
601 |
-
WPGlobusGutenberg.init();
|
602 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
trunk/includes/builders/gutenberg/assets/js/wpglobus-gutenberg.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
"use strict";jQuery(document).ready(function(D){var I={counter:0,noticeOn:!1,initDone:!1,languageSelectorBoxDelta:0,oldLanguageSelector:!1,languageSelectorEnabled:!0,parseBool:function(e){return!/^(false|0)$/i.test(e)&&!!e},getCounter:function(){return I.counter},getOptionKey:function(e){return e=e||"",WPGlobusGutenberg.keyOption[e]},getOptions:function(){return WPGlobusGutenberg.options},isOldLanguageSelector:function(){return I.oldLanguageSelector},isPostDisabled:function(){return WPGlobusGutenberg.__post.disabled},isEnabledTab:function(e){void 0===e&&(e="options");var t=!1;return"options"==e&&I.parseBool(WPGlobusGutenberg.enabledOptionsTab)&&(t=!0),t},init:function(){WPGlobusGutenberg.yoastSeo=I.parseBool(WPGlobusGutenberg.yoastSeo),I.isPostDisabled()||(I.initListeners(),I.setTabs(),I.formHandler(),I.attachListeners())},initListeners:function(){WPGlobusGutenberg.yoastSeo&&1==D(".yoast.wpseo-metabox").length&&D(window).on("beforeunload",function(e){e.stopImmediatePropagation()})},formHandler:function(){var e=D(".metabox-base-form #referredby").attr("value");void 0!==e&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),D(".metabox-base-form #referredby").attr("value",e)),void 0!==(e=D('input[name="_wp_original_http_referer"]').attr("value"))&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),D('input[name="_wp_original_http_referer"]').attr("value",e))},setTabs:function(){if(0!=WPGlobusGutenberg.tabs.length){I.oldLanguageSelector=!0;var t=setInterval(function(){var e=D(".edit-post-header__settings");1==e.length&&(e.before(WPGlobusGutenberg.tabs),clearInterval(t))},200)}else I.WPGlobusSwitcherPlugin()},setSelectorStatus:function(){if(I.isOldLanguageSelector()){D(".wpglobus-gutenberg-selector-box").css({opacity:"0.2"}).attr("onclick","return false;"),I.languageSelectorEnabled=!1;var e=setInterval(function(){if(0==D(".is-saving").length){if(clearInterval(e),WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage&&-1!=location.pathname.indexOf(WPGlobusGutenberg.postEditPage))return WPGlobusGutenberg.pagenow=WPGlobusGutenberg.postEditPage,D(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick",""),void I.reloadPage();I.languageSelectorEnabled=!0,D(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick","")}},400)}},reloadPage:function(){D(".wpglobus-selector-grid").css({"grid-template-columns":"10% 90%"}),D(".wpglobus-gutenberg-selector-text").text(WPGlobusGutenberg.i18n.reload),function e(){D(".wpglobus-gutenberg-selector").fadeOut(500).fadeIn(500,e)}(),setTimeout(function(){location.reload()},500)},attachListeners:function(){I.isOldLanguageSelector()&&(D(document).on("mouseenter",".wpglobus-gutenberg-selector",function(e){I.languageSelectorEnabled&&(D(".wpglobus-gutenberg-selector-dropdown").css({display:"block"}),I.languageSelectorBoxDelta=e.screenY,D(".edit-post-header").css({"z-index":"100000"}),D(".wpglobus-gutenberg-selector-box").css({"z-index":"100001"}))}),D(document).on("mouseleave",".wpglobus-gutenberg-selector",function(e){0!=I.languageSelectorBoxDelta&&e.screenY-I.languageSelectorBoxDelta<=0&&(D(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),D(".edit-post-header").css({"z-index":"9989"}),D(".wpglobus-gutenberg-selector-box").css({"z-index":"100"}))}),D(document).on("mouseleave",".wpglobus-gutenberg-selector-dropdown",function(e){D(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),D(".edit-post-header").css({"z-index":"9989"}),D(".wpglobus-gutenberg-selector-box").css({"z-index":"10000"})}),D(document).on("click",".editor-post-save-draft",function(){I.setSelectorStatus()}),D(document).on("click",".editor-post-publish-button",function(){I.setSelectorStatus()}))},WPGlobusSwitcherPlugin:function(){if(void 0!==wp.editPost&&void 0!==wp.plugins){var e=WPGlobusGutenberg.language,t=WPGlobusCoreData.enabled_languages,n=WPGlobusCoreData.en_language_name,o=WPGlobusGutenberg.flags_url,a="WPGlobus Switcher",s=location.href,l={};for(var u in t)-1==s.indexOf("language="+e)?l[t[u]]=s+"&language="+t[u]:l[t[u]]=s.replace("language="+e,"language="+t[u]);var i=wp.i18n.__,r=wp.element.createElement,g=wp.element.Fragment,c=wp.components.TabPanel,b=wp.compose.withState,p=wp.components.RadioControl,d=wp.components.Notice,w=wp.components.Button,m=wp.editPost.PluginSidebarMoreMenuItem,f=wp.components.PanelBody,G=wp.editPost.PluginSidebar,h=wp.plugins.registerPlugin,P=D(".components-panel__header.edit-post-sidebar-header button.components-icon-button").eq(0),v={flagOnly:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" />',flagLanguage:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],flagCode:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusGutenberg.language,languageOnly:" "+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],languageCode:" "+WPGlobusGutenberg.language},_="",W="",x=I.getOptionKey("switcherButtonType");S(WPGlobusGutenberg.options[x]),W=L(),D(document).on("click",P,function(){B()});var y=b({value:W})(function(e){e.value;var t=e.setState;return r(p,{label:"",help:"Select type of switcher language button.",selected:W,className:"wpglobus-switcher-components-radio-control",options:[{label:"Flag only",value:"flagOnly"},{label:"Flag with language",value:"flagLanguage"},{label:"Flag with language code",value:"flagCode"},{label:"Language only",value:"languageOnly"},{label:"Language code",value:"languageCode"}],onChange:function(e){t({value:W=e}),T(x,e)}})});h("wpglobus-switcher",{icon:"",render:function(){return B(),r(g,{},r(m,{target:"wpglobus-switcher-sidebar",icon:"admin-site"},i("WPGlobus")),r(G,{name:"wpglobus-switcher-sidebar",title:O(),className:"wpglobus-switcher-components-panel"},r("div",{className:"wpglobus-switcher-message wpglobus-switcher-error-message hidden",style:{}},""),r(f,{className:"wpglobus-switcher-panel__body"},(e=[{name:"switcher",title:"Languages",className:"wpglobus-panel-tab wpglobus-panel-tab-selector edit-post-sidebar__panel-tab"}],WPGlobusGutenberg.isEnabledTab("options")&&e.push({name:"options",title:"Options",className:"wpglobus-panel-tab wpglobus-panel-tab-options edit-post-sidebar__panel-tab"}),r(c,{name:"WPGlobusSwitcherTabPanel",className:"wpglobus-tab-panel",activeClass:"is-active",tabs:e},C)))));var e}})}function S(e){_=e=e||"flagLanguage"}function L(){return _}function O(){return a}function N(e){void 0===e&&(e=!0);var t=document.querySelectorAll(".wpglobus-switcher-components-radio-control .components-radio-control__input");if(0!=t.length)if(e){t.forEach(function(e){e.classList.add(e.value),e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.add("wpglobus-switcher-pulsate-radio-off")});var n=document.querySelector(".wpglobus-switcher-components-radio-control ."+W);n.classList.remove("wpglobus-switcher-pulsate-radio-off"),n.classList.add("wpglobus-switcher-pulsate-radio")}else t.forEach(function(e){e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.remove("wpglobus-switcher-pulsate-radio-off"),e.classList.add("wpglobus-switcher-pulsate-radio-on")})}function k(e,t){void 0===e||I.noticeOn||(I.noticeOn=!0,e.innerText=t,e.classList.remove("hidden"),setTimeout(function(){e.classList.add("hidden"),I.noticeOn=!1},3e3))}function T(e,t){t=t||"",x==(e=e||"")&&(N(!0),function(e,t){if(""==(e=e||""))return;var n={sender:"WPGlobusGutenberg",_action:"saveOption",is_admin:1};return n.counter=I.counter++,n.options={},n.options[e]=t,wp.ajax.post(WPGlobusGutenberg.wpglobusAjax,{data:n})}(e,t).then(function(e){"success"==e.result&&(S(t),B(WPGlobusGutenberg.options[x]=t))}).fail(function(e){var t=document.getElementsByClassName("wpglobus-switcher-error-message");void 0!==t[0]&&("error"==e.result?k(t[0],e.message):400==e.status&&k(t[0],"Error: "+e.status+" ("+e.statusText+")"),W=L());var n=document.getElementsByClassName("wpglobus-panel-tab-options");void 0!==n[0]&&-1!=n[0].classList.value.indexOf("is-active")&&n[0].click()}).always(function(){N(!1)}))}function E(e){return void 0===v[e]&&(e=_),v[e]}function B(n){void 0!==n&&void 0!==v[n]||(n=_),setTimeout(function(){var e=document.querySelector('[aria-label="'+O()+'"]');if(null!=e)if(void 0===e.dataset.status){var t=e.innerHTML;e.innerHTML=t+E(n),e.dataset.status="init"}else e.innerHTML=E(n),e.dataset.status="changed"},300)}function C(e){return"switcher"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-selector-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select language")),r("div",{className:"wpglobus-switcher-panel__switcher-box"},WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage?r("div",{style:{marginBottom:"20px"},className:"wpglobus-switcher-panel__switcher-notice"},WPGlobusGutenberg.i18n.save_post):r("ul",{className:"language-list"},t.map(function(e){return r("li",{key:e,className:"language-item"},r("img",{style:{marginRight:"7px"},className:"wpglobus-switcher-panel__flag",height:"20px",width:"20px",src:o[e]}),r(w,{href:l[e],isSmall:!0,isPrimary:!0},n[e]))}))),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__info",href:WPGlobusGutenberg.store_link,isLink:!0,target:"_blank"},i("WPGlobus Premium Add-ons")),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__settings-link",href:WPGlobusGutenberg.block_editor_tab_url,isLink:!0},i("Settings"))):"options"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-options-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select type")),r(y,null)):void 0}}};WPGlobusGutenberg=D.extend({},WPGlobusGutenberg,I),WPGlobusGutenberg.init()});
|
|
trunk/includes/builders/gutenberg/class-wpglobus-gutenberg-update-post.php
DELETED
@@ -1,304 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-gutenberg-update-post.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Gutenberg
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! class_exists( 'WPGlobus_Gutenberg_Update_Post' ) ) :
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_Gutenberg_Update_Post.
|
13 |
-
*/
|
14 |
-
class WPGlobus_Gutenberg_Update_Post extends WPGlobus_Builder_Update_Post {
|
15 |
-
|
16 |
-
/** @var string */
|
17 |
-
protected $language = null;
|
18 |
-
|
19 |
-
/** @var WP_Post */
|
20 |
-
protected $_prepared_post = null;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Constructor.
|
24 |
-
*/
|
25 |
-
public function __construct() {
|
26 |
-
|
27 |
-
parent::__construct( 'gutenberg' );
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @todo to save meta see request ($_REQUEST)
|
31 |
-
* post.php?post=259&action=edit&classic-editor=1&meta_box=1
|
32 |
-
*/
|
33 |
-
|
34 |
-
//if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
35 |
-
//}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Filter's order:
|
39 |
-
* 1. rest_pre_insert_post
|
40 |
-
* 2. wp_insert_post_data
|
41 |
-
* 3. rest_request_after_callbacks
|
42 |
-
*/
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @see \WP_REST_Posts_Controller::prepare_item_for_database
|
46 |
-
*/
|
47 |
-
if ( 'core' === WPGlobus::Config()->builder->get( 'context' ) ) {
|
48 |
-
|
49 |
-
$post_type = WPGlobus::Config()->builder->get( 'post_type' );
|
50 |
-
if ( ! empty( $post_type ) ) {
|
51 |
-
add_filter( "rest_pre_insert_{$post_type}", array( $this, 'filter__pre_insert_post' ), 2, 2 );
|
52 |
-
}
|
53 |
-
} else {
|
54 |
-
|
55 |
-
add_filter( 'rest_pre_insert_post', array( $this, 'filter__pre_insert_post' ), 2, 2 );
|
56 |
-
add_filter( 'rest_pre_insert_page', array( $this, 'filter__pre_insert_post' ), 2, 2 );
|
57 |
-
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @todo incorrect the saving post in extra languages with priority = 10
|
62 |
-
*/
|
63 |
-
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
64 |
-
|
65 |
-
/**
|
66 |
-
* @see \WP_REST_Server::dispatch in \wp-includes\rest-api\class-wp-rest-server.php
|
67 |
-
*/
|
68 |
-
add_filter( 'rest_request_after_callbacks', array( $this, 'filter__rest_after_callbacks' ), 10, 3 );
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Callback for 'rest_request_after_callbacks' will be fired after 'wp_insert_post_data' filter.
|
74 |
-
*
|
75 |
-
* @see 'filter__wp_insert_post_data'
|
76 |
-
*
|
77 |
-
* @param stdClass $response
|
78 |
-
* @param array $handler
|
79 |
-
* @param mixed $request Unused.
|
80 |
-
*
|
81 |
-
* @return mixed
|
82 |
-
*/
|
83 |
-
public function filter__rest_after_callbacks(
|
84 |
-
$response, $handler, /** @noinspection PhpUnusedParameterInspection */
|
85 |
-
$request
|
86 |
-
) {
|
87 |
-
|
88 |
-
if ( ! empty( $handler['methods']['POST'] ) && ! empty( $handler['methods']['PUT'] ) && ! empty( $handler['methods']['PATCH'] ) ) {
|
89 |
-
/**
|
90 |
-
* Update post.
|
91 |
-
*/
|
92 |
-
|
93 |
-
/**
|
94 |
-
* This returns incorrect language
|
95 |
-
* $builder_language = get_post_meta($post_id, WPGlobus::Config()->builder->get_language_meta_key(), true);
|
96 |
-
*
|
97 |
-
* @todo check updating language meta after UPDATE post
|
98 |
-
*/
|
99 |
-
$builder_language = $this->language;
|
100 |
-
|
101 |
-
// if ( empty( $builder_language ) ) {
|
102 |
-
// @todo incorrect case
|
103 |
-
// }
|
104 |
-
|
105 |
-
$fix_title = true;
|
106 |
-
if ( ! empty( $response->data['title']['raw'] ) && WPGlobus_Core::has_translations( $response->data['title']['raw'] ) ) {
|
107 |
-
$response->data['title']['raw'] = WPGlobus_Core::text_filter( $response->data['title']['raw'], $builder_language, WPGlobus::RETURN_EMPTY );
|
108 |
-
$response->data['title']['rendered'] = $response->data['title']['raw'];
|
109 |
-
$fix_title = false;
|
110 |
-
}
|
111 |
-
|
112 |
-
// $fix_excerpt = true;
|
113 |
-
if ( ! empty( $response->data['excerpt']['raw'] ) && WPGlobus_Core::has_translations( $response->data['excerpt']['raw'] ) ) {
|
114 |
-
$excerpt_in_default = WPGlobus_Core::text_filter( $response->data['excerpt']['raw'], WPGlobus::Config()->default_language );
|
115 |
-
//$excerpt = WPGlobus_Core::text_filter($response->data['excerpt']['raw'], $builder_language);
|
116 |
-
$excerpt = WPGlobus_Core::text_filter( $response->data['excerpt']['raw'], $builder_language, WPGlobus::RETURN_EMPTY );
|
117 |
-
$response->data['excerpt']['raw'] = $excerpt;
|
118 |
-
$response->data['excerpt']['rendered'] = str_replace( $excerpt_in_default, $excerpt, $response->data['excerpt']['rendered'] );
|
119 |
-
// $fix_excerpt = false;
|
120 |
-
}
|
121 |
-
|
122 |
-
if ( WPGlobus::Config()->default_language === $builder_language ) {
|
123 |
-
return $response;
|
124 |
-
}
|
125 |
-
|
126 |
-
if ( $fix_title ) :
|
127 |
-
/**
|
128 |
-
* Fix the title.
|
129 |
-
* When we have title with different value:
|
130 |
-
* $response->data[title][raw] => Русский заголовок
|
131 |
-
* $response->data[title][rendered] => English title
|
132 |
-
*/
|
133 |
-
if ( empty( $response->data['title'] ) ) {
|
134 |
-
return $response;
|
135 |
-
}
|
136 |
-
if ( empty( $response->data['title']['rendered'] ) || empty( $response->data['title']['raw'] ) ) {
|
137 |
-
return $response;
|
138 |
-
}
|
139 |
-
|
140 |
-
if ( $response->data['title']['rendered'] !== $response->data['title']['raw'] ) {
|
141 |
-
$response->data['title']['rendered'] = $response->data['title']['raw'];
|
142 |
-
}
|
143 |
-
|
144 |
-
endif;
|
145 |
-
|
146 |
-
}
|
147 |
-
|
148 |
-
return $response;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Callback for 'rest_pre_insert_post'.
|
153 |
-
*
|
154 |
-
* @param WP_Post $prepared_post
|
155 |
-
* @param mixed $request Unused.
|
156 |
-
*
|
157 |
-
* @return mixed
|
158 |
-
*/
|
159 |
-
public function filter__pre_insert_post(
|
160 |
-
$prepared_post, /** @noinspection PhpUnusedParameterInspection */
|
161 |
-
$request
|
162 |
-
) {
|
163 |
-
|
164 |
-
global $wpdb;
|
165 |
-
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $prepared_post->ID ) );
|
166 |
-
|
167 |
-
$builder_language = WPGlobus::Config()->builder->get_language();
|
168 |
-
|
169 |
-
if ( empty( $builder_language ) ) {
|
170 |
-
/**
|
171 |
-
* @todo Probably we are working with WP Rest API here.
|
172 |
-
* Check superglobal variable $_SERVER or may be something other.
|
173 |
-
*/
|
174 |
-
$builder_language = get_post_meta( $prepared_post->ID, WPGlobus::get_language_meta_key(), true );
|
175 |
-
|
176 |
-
if ( empty( $builder_language ) ) {
|
177 |
-
/**
|
178 |
-
* Case when post is draft and has post_status 'auto-draft'.
|
179 |
-
*/
|
180 |
-
$builder_language = WPGlobus::Config()->default_language;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
$this->language = $builder_language;
|
185 |
-
|
186 |
-
$fields = array();
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Post title.
|
190 |
-
*/
|
191 |
-
if ( ! empty( $prepared_post->post_title ) ) {
|
192 |
-
$fields['post_title'] = $prepared_post->post_title;
|
193 |
-
// } else {
|
194 |
-
//$fields['post_title'] = '';
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Post content.
|
199 |
-
*/
|
200 |
-
if ( ! empty( $prepared_post->post_content ) ) {
|
201 |
-
$fields['post_content'] = $prepared_post->post_content;
|
202 |
-
} else {
|
203 |
-
$fields['post_content'] = '';
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Post excerpt.
|
208 |
-
*/
|
209 |
-
if ( isset( $prepared_post->post_excerpt ) ) {
|
210 |
-
if ( empty( $prepared_post->post_excerpt ) ) {
|
211 |
-
/**
|
212 |
-
* Post excerpt was removed by user.
|
213 |
-
*/
|
214 |
-
$fields['post_excerpt'] = '';
|
215 |
-
} else {
|
216 |
-
$fields['post_excerpt'] = $prepared_post->post_excerpt;
|
217 |
-
}
|
218 |
-
} else {
|
219 |
-
/**
|
220 |
-
* Post excerpt was not modified by user.
|
221 |
-
* so, we have unset '$prepared_post->post_excerpt' field.
|
222 |
-
*/
|
223 |
-
$fields['post_excerpt'] = WPGlobus_Core::text_filter( $_post->post_excerpt, $builder_language, WPGlobus::RETURN_EMPTY );
|
224 |
-
}
|
225 |
-
|
226 |
-
foreach ( $fields as $field => $value ) {
|
227 |
-
|
228 |
-
$tr = array();
|
229 |
-
|
230 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
231 |
-
|
232 |
-
if ( $lang === $builder_language ) {
|
233 |
-
|
234 |
-
$text = $value;
|
235 |
-
if ( WPGlobus_Core::has_translations( $value ) ) {
|
236 |
-
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
237 |
-
}
|
238 |
-
if ( ! empty( $text ) ) {
|
239 |
-
$tr[ $lang ] = $text;
|
240 |
-
}
|
241 |
-
} else {
|
242 |
-
|
243 |
-
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
244 |
-
if ( ! empty( $text ) ) {
|
245 |
-
$tr[ $lang ] = $text;
|
246 |
-
}
|
247 |
-
}
|
248 |
-
|
249 |
-
endforeach;
|
250 |
-
|
251 |
-
/**
|
252 |
-
* @since 2.2.29 we are using `wp_slash` function.
|
253 |
-
* @see https://github.com/WPGlobus/WPGlobus/pull/83
|
254 |
-
*/
|
255 |
-
$prepared_post->$field = wp_slash( WPGlobus_Utils::build_multilingual_string( $tr ) );
|
256 |
-
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* $this->_prepared_post contains 'post_title', 'post_content', 'post_excerpt' with language marks and ready to insert in DB.
|
261 |
-
*/
|
262 |
-
$this->_prepared_post = clone $prepared_post;
|
263 |
-
|
264 |
-
return $prepared_post;
|
265 |
-
|
266 |
-
}
|
267 |
-
|
268 |
-
/**
|
269 |
-
* Callback for 'wp_insert_post_data'.
|
270 |
-
*
|
271 |
-
* @param array $data
|
272 |
-
* @param mixed $postarr Unused.
|
273 |
-
*
|
274 |
-
* @return array
|
275 |
-
*/
|
276 |
-
public function filter__wp_insert_post_data(
|
277 |
-
$data, /** @noinspection PhpUnusedParameterInspection */
|
278 |
-
$postarr
|
279 |
-
) {
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Check $this->_prepared_post was loaded with first XMLHttpRequest.
|
283 |
-
*
|
284 |
-
* @see 'filter__pre_insert_post' filter.
|
285 |
-
* @see Network tab in browser console.
|
286 |
-
*/
|
287 |
-
if ( ! is_object( $this->_prepared_post ) ) {
|
288 |
-
return $data;
|
289 |
-
}
|
290 |
-
|
291 |
-
$_fields = array( 'post_title', 'post_content', 'post_excerpt' );
|
292 |
-
foreach ( $_fields as $_field ) {
|
293 |
-
|
294 |
-
if ( ! empty( $data[ $_field ] ) && ! empty( $this->_prepared_post->$_field ) ) {
|
295 |
-
$data[ $_field ] = $this->_prepared_post->$_field;
|
296 |
-
}
|
297 |
-
}
|
298 |
-
|
299 |
-
return $data;
|
300 |
-
}
|
301 |
-
|
302 |
-
}
|
303 |
-
|
304 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/gutenberg/class-wpglobus-gutenberg.php
DELETED
@@ -1,554 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-gutenberg.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Gutenberg
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Gutenberg.
|
11 |
-
*/
|
12 |
-
class WPGlobus_Gutenberg extends WPGlobus_Builder {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Constructor.
|
16 |
-
*/
|
17 |
-
public function __construct() {
|
18 |
-
|
19 |
-
parent::__construct( 'gutenberg' );
|
20 |
-
|
21 |
-
if ( is_admin() ) {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Filter the post for Gutenberg editor.
|
25 |
-
*
|
26 |
-
* @see wp-includes\class-wp-query.php
|
27 |
-
*/
|
28 |
-
add_action( 'the_post', array( $this, 'translate_post' ), 5 );
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Add 'wpglobus-language' hidden field.
|
32 |
-
*/
|
33 |
-
add_action( 'add_meta_boxes', array( $this, 'on__add_meta_box' ) );
|
34 |
-
|
35 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'on__enqueue_scripts' ), 1000 );
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Action admin_print_styles.
|
39 |
-
*
|
40 |
-
* @since 1.9.29
|
41 |
-
*/
|
42 |
-
add_action( 'admin_print_styles', array( $this, 'on__enqueue_styles' ) );
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Action enqueue_block_assets.
|
46 |
-
*
|
47 |
-
* @see wp-includes\script-loader.php
|
48 |
-
* @since 2.2.3
|
49 |
-
*/
|
50 |
-
add_action( 'enqueue_block_assets', array( $this, 'on__enqueue_block_assets' ) );
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Filter wpglobus_seo_meta_box_title.
|
54 |
-
*
|
55 |
-
* @see wpglobus-seo\includes\class-wpglobus-seo.php
|
56 |
-
*/
|
57 |
-
add_filter( 'wpglobus_seo_meta_box_title', array( $this, 'filter__seo_meta_box_title' ) );
|
58 |
-
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Enqueue block assets.
|
65 |
-
*
|
66 |
-
* @since 2.2.3
|
67 |
-
*/
|
68 |
-
public function on__enqueue_block_assets() {
|
69 |
-
|
70 |
-
if ( ! empty( WPGlobus::Config()->block_editor_old_fashioned_language_switcher ) && '1' === WPGlobus::Config()->block_editor_old_fashioned_language_switcher ) {
|
71 |
-
return;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @since 2.2.3 wpglobus-block-editor.css
|
76 |
-
* @since 2.2.14 wpglobus-switcher.css
|
77 |
-
*/
|
78 |
-
$style_file = WPGlobus::plugin_dir_url() . 'includes/builders/gutenberg/assets/css/dist/wpglobus-switcher.css';
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Enqueue frontend and editor block styles.
|
82 |
-
*/
|
83 |
-
wp_enqueue_style(
|
84 |
-
'wpglobus-switcher-css',
|
85 |
-
$style_file,
|
86 |
-
'',
|
87 |
-
WPGLOBUS_VERSION
|
88 |
-
);
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Using ESNext syntax @W.I.P.
|
92 |
-
*
|
93 |
-
* @since 2.2.3 We are using ES5 syntax for WPGlobus plugin for Block Editor.
|
94 |
-
*/
|
95 |
-
return;
|
96 |
-
|
97 |
-
// phpcs:disable
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Temporarily.
|
101 |
-
*
|
102 |
-
* @noinspection PhpUnreachableStatementInspection
|
103 |
-
*/
|
104 |
-
$script_file = WPGlobus::plugin_dir_url() . 'includes/builders/gutenberg/assets/js/dist/wpglobus-block-editor' . WPGlobus::SCRIPT_SUFFIX() . '.js';
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Enqueue the bundled block JS file.
|
108 |
-
*/
|
109 |
-
wp_enqueue_script(
|
110 |
-
'wpglobus-block-editor-js',
|
111 |
-
$script_file,
|
112 |
-
array(
|
113 |
-
'wp-i18n',
|
114 |
-
'wp-blocks',
|
115 |
-
'wp-edit-post',
|
116 |
-
'wp-element',
|
117 |
-
'wp-editor',
|
118 |
-
'wp-components',
|
119 |
-
'wp-data',
|
120 |
-
'wp-plugins',
|
121 |
-
'wp-edit-post',
|
122 |
-
'wp-api',
|
123 |
-
),
|
124 |
-
WPGLOBUS_VERSION,
|
125 |
-
false
|
126 |
-
);
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Enqueue frontend and editor block styles.
|
130 |
-
*/
|
131 |
-
wp_enqueue_style(
|
132 |
-
'wpglobus-block-editor-css',
|
133 |
-
$style_file,
|
134 |
-
'',
|
135 |
-
WPGLOBUS_VERSION
|
136 |
-
);
|
137 |
-
|
138 |
-
// phpcs:enable
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Translate post.
|
144 |
-
*
|
145 |
-
* @param WP_Post $object The Post object.
|
146 |
-
*/
|
147 |
-
public function translate_post( $object ) {
|
148 |
-
if ( $object instanceof WP_Post ) {
|
149 |
-
WPGlobus_Core::translate_wp_post( $object, $this->language, WPGlobus::RETURN_EMPTY );
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Generate box with language switcher.
|
155 |
-
*
|
156 |
-
* @param string $page The page.
|
157 |
-
*
|
158 |
-
* @return string
|
159 |
-
*/
|
160 |
-
private function get_switcher_box( $page ) {
|
161 |
-
|
162 |
-
global $post;
|
163 |
-
|
164 |
-
// TODO check if $_SERVER['QUERY_STRING'] exists and sanitize it.
|
165 |
-
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized: Detected usage of a non-sanitized input variable: $_SERVER['QUERY_STRING'].
|
166 |
-
// phpcs: WordPress.Security.ValidatedSanitizedInput.InputNotValidated: Detected usage of a possibly undefined superglobal array index: $_SERVER['QUERY_STRING']. Use isset() or empty() to check the index exists before using it.
|
167 |
-
// phpcs: WordPress.Security.ValidatedSanitizedInput.MissingUnslash: $_SERVER data not unslashed before sanitization. Use wp_unslash() or similar.
|
168 |
-
$query_string = explode( '&', $_SERVER['QUERY_STRING'] ); // phpcs:ignore
|
169 |
-
|
170 |
-
foreach ( $query_string as $key => $_q ) {
|
171 |
-
if ( false !== strpos( $_q, 'language=' ) ) {
|
172 |
-
unset( $query_string[ $key ] );
|
173 |
-
}
|
174 |
-
}
|
175 |
-
$query = implode( '&', $query_string );
|
176 |
-
$url = admin_url(
|
177 |
-
add_query_arg(
|
178 |
-
array(
|
179 |
-
'language' => '{{language}}',
|
180 |
-
),
|
181 |
-
'post.php?' . $query
|
182 |
-
)
|
183 |
-
);
|
184 |
-
|
185 |
-
$_box_style = 'position:absolute;top:15px;left:10px;z-index:100;';
|
186 |
-
if ( file_exists( WPGlobus::Config()->flag_path['big'] . WPGlobus::Config()->flag[ $this->language ] ) ) {
|
187 |
-
$_flag_img = WPGlobus::Config()->flag_urls['big'] . WPGlobus::Config()->flag[ $this->language ];
|
188 |
-
$_height = 'height="25px"';
|
189 |
-
$_width = 'width="25px"';
|
190 |
-
$_flag_style = 'style="border: 1px solid #bfbfbf;border-radius: 25px;"';
|
191 |
-
} else {
|
192 |
-
$_flag_img = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $this->language ];
|
193 |
-
$_height = '';
|
194 |
-
$_width = '';
|
195 |
-
$_flag_style = 'style="margin-top:5px;"';
|
196 |
-
|
197 |
-
$_box_style .= 'margin-top:3px;';
|
198 |
-
}
|
199 |
-
|
200 |
-
$out = '';
|
201 |
-
|
202 |
-
if ( 'post-new.php' === $page ) {
|
203 |
-
|
204 |
-
ob_start();
|
205 |
-
?>
|
206 |
-
<div style="<?php echo $_box_style; // phpcs:ignore WordPress.Security.EscapeOutput ?>"
|
207 |
-
class="wpglobus-gutenberg-selector-box">
|
208 |
-
<!--suppress CssInvalidPropertyValue -->
|
209 |
-
<div class="wpglobus-selector-grid"
|
210 |
-
style="">
|
211 |
-
<a style="text-decoration:none;cursor:text;" onclick="return false;"
|
212 |
-
href="#" class="wpglobus-gutenberg-selector wpglobus-gutenberg-selector-column-1"
|
213 |
-
data-language="<?php echo esc_attr( $this->language ); ?>">
|
214 |
-
<img <?php echo $_height . $_width; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
215 |
-
<?php echo $_flag_style; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
216 |
-
src="<?php echo esc_url( $_flag_img ); ?>" alt=""/>
|
217 |
-
</a>
|
218 |
-
<a style="text-decoration:none;cursor:text;" onclick="return false;"
|
219 |
-
href="#" class="wpglobus-gutenberg-selector wpglobus-gutenberg-selector-column-2"
|
220 |
-
data-language="<?php echo esc_attr( $this->language ); ?>">
|
221 |
-
<span
|
222 |
-
class="wpglobus-gutenberg-selector-text"><?php echo esc_html( WPGlobus::Config()->en_language_name[ $this->language ] ); ?></span>
|
223 |
-
</a>
|
224 |
-
</div>
|
225 |
-
<ul class="wpglobus-gutenberg-selector-dropdown"
|
226 |
-
style="display:none;position:fixed;margin:5px;list-style-type:none;">
|
227 |
-
<li class="item" style="border:1px solid #ddd;background-color:#eee;padding:4px;">
|
228 |
-
<?php esc_html_e( 'Before switching the language, please save draft or publish.', 'wpglobus' ); ?>
|
229 |
-
</li>
|
230 |
-
</ul>
|
231 |
-
</div>
|
232 |
-
<?php
|
233 |
-
$out = ob_get_clean();
|
234 |
-
|
235 |
-
} elseif ( 'post.php' === $page ) {
|
236 |
-
|
237 |
-
ob_start();
|
238 |
-
?>
|
239 |
-
<div style="<?php echo $_box_style; // phpcs:ignore WordPress.Security.EscapeOutput ?>"
|
240 |
-
class="wpglobus-gutenberg-selector-box">
|
241 |
-
<!--suppress CssInvalidPropertyValue -->
|
242 |
-
<div class="wpglobus-selector-grid"
|
243 |
-
style="">
|
244 |
-
<a style="text-decoration: none;"
|
245 |
-
href="<?php echo esc_url( str_replace( '{{language}}', $this->language, $url ) ); ?>"
|
246 |
-
class="wpglobus-gutenberg-selector wpglobus-gutenberg-selector-column-1"
|
247 |
-
data-language="<?php echo esc_attr( $this->language ); ?>">
|
248 |
-
<img <?php echo $_height . $_width; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
249 |
-
<?php echo $_flag_style; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
250 |
-
src="<?php echo $_flag_img; // phpcs:ignore WordPress.Security.EscapeOutput ?>" alt=""/>
|
251 |
-
</a>
|
252 |
-
<a style="text-decoration: none;"
|
253 |
-
href="<?php echo esc_url( str_replace( '{{language}}', $this->language, $url ) ); ?>"
|
254 |
-
class="wpglobus-gutenberg-selector wpglobus-gutenberg-selector-column-2"
|
255 |
-
data-language="<?php echo esc_attr( $this->language ); ?>">
|
256 |
-
<span class="wpglobus-gutenberg-selector-text">
|
257 |
-
<?php
|
258 |
-
/**
|
259 |
-
* Filter the current language name.
|
260 |
-
*
|
261 |
-
* @since 2.1.0
|
262 |
-
*
|
263 |
-
* @param string $en_language_name English language name.
|
264 |
-
* @param string $language Current language.
|
265 |
-
* @param WP_Post $post The current post.
|
266 |
-
*
|
267 |
-
* @return string
|
268 |
-
*/
|
269 |
-
$en_language_name = apply_filters(
|
270 |
-
'wpglobus_gutenberg_selector_text',
|
271 |
-
WPGlobus::Config()->en_language_name[ $this->language ],
|
272 |
-
$this->language,
|
273 |
-
$post
|
274 |
-
);
|
275 |
-
echo esc_html( $en_language_name );
|
276 |
-
?>
|
277 |
-
</span>
|
278 |
-
</a>
|
279 |
-
</div>
|
280 |
-
<ul class="wpglobus-gutenberg-selector-dropdown"
|
281 |
-
style="display:none;position:fixed;border-left:1px solid #ddd;border-right:1px solid #ddd;background-color:#eee;margin:5px 0 0;padding:0 5px 5px 0;list-style-type:none;">
|
282 |
-
<?php foreach ( WPGlobus::Config()->enabled_languages as $lang ) : ?>
|
283 |
-
<?php
|
284 |
-
if ( $lang === $this->language ) {
|
285 |
-
continue;
|
286 |
-
}
|
287 |
-
?>
|
288 |
-
<li class="item"
|
289 |
-
style="text-align:left;cursor:pointer;border-bottom:1px solid #ddd;margin:0;height:25px;padding:5px 0 5px 5px;"
|
290 |
-
data-language="<?php echo esc_attr( $lang ); ?>">
|
291 |
-
<a href="<?php echo esc_url( str_replace( '{{language}}', $lang, $url ) ); ?>">
|
292 |
-
<img src="<?php echo esc_url( WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $lang ] ); ?>"
|
293 |
-
alt=""/> <?php echo esc_html( WPGlobus::Config()->en_language_name[ $lang ] ); ?>
|
294 |
-
</a>
|
295 |
-
</li>
|
296 |
-
<?php endforeach; ?>
|
297 |
-
</ul>
|
298 |
-
</div>
|
299 |
-
<?php
|
300 |
-
$out = ob_get_clean();
|
301 |
-
|
302 |
-
}
|
303 |
-
|
304 |
-
return $out;
|
305 |
-
|
306 |
-
}
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Callback for 'wpglobus_seo_meta_box_title'.
|
310 |
-
*
|
311 |
-
* @param string $meta_box_title Metabox title.
|
312 |
-
*
|
313 |
-
* @return string
|
314 |
-
*/
|
315 |
-
public function filter__seo_meta_box_title( $meta_box_title ) {
|
316 |
-
return $meta_box_title . ' ' .
|
317 |
-
// Translators: Metabox title FOR language.
|
318 |
-
_x( 'for', 'filter__seo_meta_box_title', 'wpglobus' )
|
319 |
-
. ' ' . WPGlobus::Config()->en_language_name[ $this->get_current_language() ];
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Enqueue styles.
|
324 |
-
*
|
325 |
-
* @since 1.9.29
|
326 |
-
* @return void
|
327 |
-
*/
|
328 |
-
public function on__enqueue_styles() {
|
329 |
-
/**
|
330 |
-
* Pagenow global.
|
331 |
-
*
|
332 |
-
* @var string $pagenow
|
333 |
-
*/
|
334 |
-
global $pagenow;
|
335 |
-
|
336 |
-
if ( ! in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) ) {
|
337 |
-
return;
|
338 |
-
}
|
339 |
-
|
340 |
-
// phpcs:ignore WordPress.Security.NonceVerification
|
341 |
-
if ( isset( $_GET['classic-editor'] ) ) {
|
342 |
-
return;
|
343 |
-
}
|
344 |
-
|
345 |
-
wp_register_style(
|
346 |
-
'wpglobus-gutenberg',
|
347 |
-
WPGlobus::plugin_dir_url() . 'includes/builders/gutenberg/assets/css/wpglobus-gutenberg.css',
|
348 |
-
array(),
|
349 |
-
WPGLOBUS_VERSION,
|
350 |
-
'all'
|
351 |
-
);
|
352 |
-
wp_enqueue_style( 'wpglobus-gutenberg' );
|
353 |
-
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Enqueue scripts.
|
358 |
-
*
|
359 |
-
* @return void
|
360 |
-
*/
|
361 |
-
public function on__enqueue_scripts() {
|
362 |
-
|
363 |
-
/**
|
364 |
-
* Globals.
|
365 |
-
*
|
366 |
-
* @var string $pagenow
|
367 |
-
* @var string $wp_version
|
368 |
-
* @var \WP_Post $post
|
369 |
-
*/
|
370 |
-
global $pagenow, $wp_version, $post;
|
371 |
-
|
372 |
-
if ( ! in_array( $pagenow, array( 'post.php', 'post-new.php' ), true ) ) {
|
373 |
-
return;
|
374 |
-
}
|
375 |
-
|
376 |
-
// phpcs:ignore WordPress.Security.NonceVerification
|
377 |
-
if ( isset( $_GET['classic-editor'] ) ) {
|
378 |
-
return;
|
379 |
-
}
|
380 |
-
|
381 |
-
/**
|
382 |
-
* Old-style switcher.
|
383 |
-
*
|
384 |
-
* @since 2.2.3
|
385 |
-
*/
|
386 |
-
$tabs = '';
|
387 |
-
if ( ! empty( WPGlobus::Config()->block_editor_old_fashioned_language_switcher ) && 1 === (int) WPGlobus::Config()->block_editor_old_fashioned_language_switcher ) {
|
388 |
-
$tabs = $this->get_switcher_box( $pagenow );
|
389 |
-
}
|
390 |
-
|
391 |
-
$i18n = array();
|
392 |
-
$i18n['reload'] = esc_html__( 'Page is being reloaded. Please wait...', 'wpglobus' );
|
393 |
-
$i18n['save_post'] = esc_html__( 'Before switching the language, please save draft or publish, then reload page.', 'wpglobus' );
|
394 |
-
|
395 |
-
/**
|
396 |
-
* We have Gutenberg in core since WP 5.0.
|
397 |
-
*
|
398 |
-
* @since 2.0
|
399 |
-
*/
|
400 |
-
$version_gutenberg = '';
|
401 |
-
if ( version_compare( $wp_version, '4.9.99', '>' ) ) {
|
402 |
-
$version_gutenberg = $wp_version;
|
403 |
-
} elseif ( defined( 'GUTENBERG_VERSION' ) ) {
|
404 |
-
$version_gutenberg = GUTENBERG_VERSION;
|
405 |
-
}
|
406 |
-
|
407 |
-
/**
|
408 |
-
* Check for Yoast SEO.
|
409 |
-
*/
|
410 |
-
$yoast_seo = false;
|
411 |
-
if ( defined( 'WPSEO_VERSION' ) ) {
|
412 |
-
$yoast_seo = true;
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Block editor tab URL.
|
417 |
-
*
|
418 |
-
* @since 2.2.3
|
419 |
-
*/
|
420 |
-
$block_editor_tab_url = admin_url(
|
421 |
-
add_query_arg(
|
422 |
-
array(
|
423 |
-
'page' => WPGlobus::OPTIONS_PAGE_SLUG,
|
424 |
-
'tab' => 'block-editor',
|
425 |
-
),
|
426 |
-
'admin.php'
|
427 |
-
)
|
428 |
-
);
|
429 |
-
|
430 |
-
/**
|
431 |
-
* Build the flags URL.
|
432 |
-
*
|
433 |
-
* @since 2.2.3
|
434 |
-
*/
|
435 |
-
$flags_url = array();
|
436 |
-
foreach ( WPGlobus::Config()->enabled_languages as $language ) {
|
437 |
-
if ( file_exists( WPGlobus::Config()->flag_path['big'] . WPGlobus::Config()->flag[ $language ] ) ) {
|
438 |
-
$flags_url[ $language ] = WPGlobus::Config()->flag_urls['big'] . WPGlobus::Config()->flag[ $language ];
|
439 |
-
} else {
|
440 |
-
$flags_url[ $language ] = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $language ];
|
441 |
-
}
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Pass the $post to JS.
|
446 |
-
*
|
447 |
-
* @since 2.2.4
|
448 |
-
*/
|
449 |
-
$__post = array(
|
450 |
-
'ID' => '',
|
451 |
-
'type' => '',
|
452 |
-
'disabled' => false,
|
453 |
-
);
|
454 |
-
if ( $post instanceof WP_Post ) {
|
455 |
-
$__post['ID'] = $post->ID;
|
456 |
-
$__post['type'] = $post->post_type;
|
457 |
-
if ( in_array( $post->post_type, WPGlobus::Config()->disabled_entities, true ) ) {
|
458 |
-
$__post['disabled'] = true;
|
459 |
-
}
|
460 |
-
}
|
461 |
-
|
462 |
-
/**
|
463 |
-
* @see includes\class-wpglobus-config.php for config options.
|
464 |
-
* @since 2.2.14
|
465 |
-
*/
|
466 |
-
$key_option = array();
|
467 |
-
$key_option['switcherButtonType'] = 'block_editor_switcher_plugin_button_type';
|
468 |
-
|
469 |
-
$options = array();
|
470 |
-
foreach($key_option as $key=>$option) {
|
471 |
-
$options[ $option ] = '';
|
472 |
-
if ( ! empty( WPGlobus::Config()->$option ) ) {
|
473 |
-
$options[$option] = WPGlobus::Config()->$option;
|
474 |
-
}
|
475 |
-
}
|
476 |
-
|
477 |
-
$data = array(
|
478 |
-
'version' => WPGLOBUS_VERSION,
|
479 |
-
'versionGutenberg' => $version_gutenberg,
|
480 |
-
'wpglobusAjax' => WPGLOBUS_AJAX,
|
481 |
-
'context' => WPGlobus::Config()->builder->get( 'context' ),
|
482 |
-
'tabs' => $tabs,
|
483 |
-
'language' => $this->language,
|
484 |
-
'pagenow' => $pagenow,
|
485 |
-
'postEditPage' => 'post.php',
|
486 |
-
'postNewPage' => 'post-new.php',
|
487 |
-
'defaultLanguage' => WPGlobus::Config()->default_language,
|
488 |
-
'i18n' => $i18n,
|
489 |
-
'yoastSeo' => $yoast_seo,
|
490 |
-
'flags_url' => $flags_url,
|
491 |
-
'store_link' => WPGlobus::URL_WPGLOBUS_SHOP,
|
492 |
-
'__post' => $__post,
|
493 |
-
'block_editor_tab_url' => $block_editor_tab_url,
|
494 |
-
'disabled_entities' => WPGlobus::Config()->disabled_entities,
|
495 |
-
'options' => $options,
|
496 |
-
'enabledOptionsTab' => true,
|
497 |
-
'keyOption' => $key_option
|
498 |
-
);
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Filter for data to send to JS.
|
502 |
-
* Returning array.
|
503 |
-
*
|
504 |
-
* @since 2.2.14
|
505 |
-
*
|
506 |
-
* @param array $data An array with data.
|
507 |
-
*/
|
508 |
-
$data = apply_filters( 'wpglobus_block_editor_localize_data', $data );
|
509 |
-
|
510 |
-
wp_register_script(
|
511 |
-
'wpglobus-gutenberg',
|
512 |
-
WPGlobus::plugin_dir_url() . 'includes/builders/gutenberg/assets/js/wpglobus-gutenberg' . WPGlobus::SCRIPT_SUFFIX() . '.js',
|
513 |
-
array( 'jquery' ),
|
514 |
-
WPGLOBUS_VERSION,
|
515 |
-
true
|
516 |
-
);
|
517 |
-
wp_enqueue_script( 'wpglobus-gutenberg' );
|
518 |
-
wp_localize_script(
|
519 |
-
'wpglobus-gutenberg',
|
520 |
-
'WPGlobusGutenberg',
|
521 |
-
$data
|
522 |
-
);
|
523 |
-
}
|
524 |
-
|
525 |
-
/**
|
526 |
-
* Callback for 'add_meta_boxes'.
|
527 |
-
*/
|
528 |
-
public function on__add_meta_box() {
|
529 |
-
|
530 |
-
global $post;
|
531 |
-
|
532 |
-
if ( in_array( $post->post_type, WPGlobus::Config()->disabled_entities, true ) ) {
|
533 |
-
return;
|
534 |
-
}
|
535 |
-
|
536 |
-
add_meta_box(
|
537 |
-
'wpglobus',
|
538 |
-
__( 'WPGlobus', 'wpglobus' ),
|
539 |
-
array( $this, 'callback__meta_box' ),
|
540 |
-
null,
|
541 |
-
'side',
|
542 |
-
'core'
|
543 |
-
);
|
544 |
-
}
|
545 |
-
|
546 |
-
/**
|
547 |
-
* Callback for 'add_meta_box' function.
|
548 |
-
*/
|
549 |
-
public function call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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/js_composer/class-wpglobus-js_composer-update-post.php
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-js_composer-update-post.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\JS_Composer
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_js_composer_Update_Post.
|
11 |
-
*/
|
12 |
-
|
13 |
-
if ( ! class_exists( 'WPGlobus_js_composer_Update_Post' ) ) :
|
14 |
-
|
15 |
-
// phpcs:ignore PEAR.NamingConventions
|
16 |
-
class WPGlobus_js_composer_Update_Post extends WPGlobus_Builder_Update_Post {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Constructor.
|
20 |
-
*/
|
21 |
-
public function __construct() {
|
22 |
-
|
23 |
-
parent::__construct( 'js_composer' );
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
27 |
-
*/
|
28 |
-
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @todo incorrect the saving post in extra languages with priority = 10
|
32 |
-
*/
|
33 |
-
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Callback for 'wp_insert_post_data'.
|
39 |
-
*
|
40 |
-
* @param array $data
|
41 |
-
* @param array $postarr
|
42 |
-
*
|
43 |
-
* @return array mixed
|
44 |
-
*/
|
45 |
-
public function filter__wp_insert_post_data( $data, $postarr ) {
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Prevent to filter disabled post type.
|
49 |
-
*
|
50 |
-
* @since 2.1.4
|
51 |
-
*/
|
52 |
-
if ( in_array( $data['post_type'], WPGlobus::Config()->disabled_entities, true ) ) {
|
53 |
-
return $data;
|
54 |
-
}
|
55 |
-
|
56 |
-
global $wpdb;
|
57 |
-
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d AND post_type = %s LIMIT 1", $postarr['ID'], $postarr['post_type'] ) );
|
58 |
-
|
59 |
-
$fields = array();
|
60 |
-
if ( isset( $postarr['post_title'] ) ) {
|
61 |
-
$fields['post_title'] = $postarr['post_title'];
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( isset( $postarr['post_content'] ) ) {
|
65 |
-
$fields['post_content'] = $postarr['post_content'];
|
66 |
-
}
|
67 |
-
|
68 |
-
if ( isset( $postarr['post_excerpt'] ) ) {
|
69 |
-
$fields['post_excerpt'] = $postarr['post_excerpt'];
|
70 |
-
}
|
71 |
-
|
72 |
-
$builder_language = WPGlobus::Config()->builder->get_language();
|
73 |
-
|
74 |
-
if ( empty( $builder_language ) ) {
|
75 |
-
|
76 |
-
if ( empty( $postarr[ WPGlobus::get_language_meta_key() ] ) ) {
|
77 |
-
$builder_language = WPGlobus::Config()->default_language;
|
78 |
-
} else {
|
79 |
-
$builder_language = $postarr[ WPGlobus::get_language_meta_key() ];
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
foreach ( $fields as $field => $value ) {
|
84 |
-
|
85 |
-
$tr = array();
|
86 |
-
|
87 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
88 |
-
|
89 |
-
if ( $lang === $builder_language ) {
|
90 |
-
|
91 |
-
$text = $value;
|
92 |
-
if ( WPGlobus_Core::has_translations( $value ) ) {
|
93 |
-
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
94 |
-
}
|
95 |
-
if ( ! empty( $text ) ) {
|
96 |
-
$tr[ $lang ] = $text;
|
97 |
-
}
|
98 |
-
} else {
|
99 |
-
if ( isset( $_post->$field ) ) {
|
100 |
-
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
101 |
-
if ( ! empty( $text ) ) {
|
102 |
-
$tr[ $lang ] = $text;
|
103 |
-
}
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
endforeach;
|
108 |
-
|
109 |
-
$data[ $field ] = WPGlobus_Utils::build_multilingual_string( $tr );
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
return $data;
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
}
|
118 |
-
|
119 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/js_composer/class-wpglobus-js_composer.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-js_composer.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\WPBakeryPageBuilder
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
|
10 |
-
if ( ! class_exists( 'WPGlobus_JS_Composer' ) ) :
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class WPGlobus_JS_Composer.
|
14 |
-
*/
|
15 |
-
class WPGlobus_JS_Composer extends WPGlobus_Builder {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Constructor.
|
19 |
-
*/
|
20 |
-
public function __construct() {
|
21 |
-
parent::__construct( 'js_composer' );
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/pods/class-wpglobus-builder-pods.php
DELETED
@@ -1,110 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-builder-pods.php
|
4 |
-
*
|
5 |
-
* @since 2.3.0
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Builders\Pods.
|
8 |
-
* @author Alex Gor(alexgff)
|
9 |
-
*/
|
10 |
-
|
11 |
-
if ( ! class_exists( 'WPGlobus_Builder_Pods' ) ) :
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class WPGlobus_Builder_Pods.
|
15 |
-
*/
|
16 |
-
class WPGlobus_Builder_Pods {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Default Pods post type.
|
20 |
-
*/
|
21 |
-
protected static $post_type = '_pods_pod';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Type of Pods: `post_type` or `settings`.
|
25 |
-
*/
|
26 |
-
protected static $pods_type = '';
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get attributes.
|
30 |
-
*/
|
31 |
-
public static function get_attrs($attrs) {
|
32 |
-
|
33 |
-
if ( ! function_exists('pods_api') ) {
|
34 |
-
return false;
|
35 |
-
}
|
36 |
-
|
37 |
-
/** @global string $pagenow */
|
38 |
-
/** @global string $wpdb */
|
39 |
-
global $pagenow, $wpdb;
|
40 |
-
|
41 |
-
$result = true;
|
42 |
-
|
43 |
-
if ( 'post.php' === $pagenow ) {
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @see pods\includes\classes.php
|
47 |
-
*/
|
48 |
-
$pods = pods_api()->load_pods( array( 'type' => 'post_type', 'fields' => true ) );
|
49 |
-
|
50 |
-
self::$pods_type = 'post_type';
|
51 |
-
|
52 |
-
$post_id = $attrs['post_id'];
|
53 |
-
|
54 |
-
if ( $post_id > 0 ) {
|
55 |
-
|
56 |
-
$pods_pod = $wpdb->get_results( $wpdb->prepare(
|
57 |
-
"SELECT p.post_name AS name, p.ID, p.post_title AS title, p.post_parent AS parent, pm.meta_value AS type FROM $wpdb->posts as p
|
58 |
-
LEFT JOIN $wpdb->postmeta AS pm ON pm.post_id = p.ID WHERE p.post_type = %s AND p.post_status = 'publish'
|
59 |
-
AND pm.meta_key = 'type' AND pm.meta_value = %s",
|
60 |
-
self::$post_type,
|
61 |
-
self::$pods_type
|
62 |
-
), OBJECT_K );
|
63 |
-
|
64 |
-
if ( ! empty($pods_pod) ) {
|
65 |
-
|
66 |
-
foreach ( $pods_pod as $_pod_key => $_pod ) :
|
67 |
-
|
68 |
-
if ( $attrs['post_type'] != $_pod_key ) {
|
69 |
-
continue;
|
70 |
-
}
|
71 |
-
|
72 |
-
if ( empty($pods[ $_pod->ID ]['fields']) ) {
|
73 |
-
/**
|
74 |
-
* Pods_pod is attached to post type (e.g. for post) but has no fields.
|
75 |
-
*/
|
76 |
-
$result = false;
|
77 |
-
break;
|
78 |
-
}
|
79 |
-
|
80 |
-
endforeach;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
if ( ! $result ) {
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
|
88 |
-
$attrs['builder_page'] = true;
|
89 |
-
return $attrs;
|
90 |
-
|
91 |
-
} else {
|
92 |
-
/**
|
93 |
-
* @todo W.I.P @since 2.3.0
|
94 |
-
*/
|
95 |
-
//
|
96 |
-
//if ( ! empty($_GET['page']) && false !== strpos( $_GET['page'], 'pods-settings' ) ) {
|
97 |
-
// $attrs['builder_page'] = true;
|
98 |
-
// return $attrs;
|
99 |
-
//}
|
100 |
-
}
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
return false;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
endif;
|
109 |
-
|
110 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/pods/class-wpglobus-pods-update-post.php
DELETED
@@ -1,120 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-pods-update-post.php
|
4 |
-
*
|
5 |
-
* @since 2.3.0
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Builders\Pods.
|
8 |
-
* @author Alex Gor(alexgff)
|
9 |
-
*/
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class WPGlobus_pods_Update_Post.
|
13 |
-
*/
|
14 |
-
if ( ! class_exists( 'WPGlobus_pods_Update_Post' ) ) :
|
15 |
-
|
16 |
-
// phpcs:ignore PEAR.NamingConventions
|
17 |
-
class WPGlobus_pods_Update_Post extends WPGlobus_Builder_Update_Post {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructor.
|
21 |
-
*/
|
22 |
-
public function __construct() {
|
23 |
-
|
24 |
-
parent::__construct( 'pods' );
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
28 |
-
*/
|
29 |
-
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @todo incorrect the saving post in extra languages with priority = 10
|
33 |
-
*/
|
34 |
-
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Callback for 'wp_insert_post_data'.
|
40 |
-
*
|
41 |
-
* @param array $data
|
42 |
-
* @param array $postarr
|
43 |
-
*
|
44 |
-
* @return mixed
|
45 |
-
*/
|
46 |
-
public function filter__wp_insert_post_data( $data, $postarr ) {
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Prevent to filter disabled post type.
|
50 |
-
*/
|
51 |
-
if ( in_array( $data['post_type'], WPGlobus::Config()->disabled_entities, true ) ) {
|
52 |
-
return $data;
|
53 |
-
}
|
54 |
-
|
55 |
-
global $wpdb;
|
56 |
-
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d AND post_type = %s LIMIT 1", $postarr['ID'], $postarr['post_type'] ) );
|
57 |
-
|
58 |
-
$fields = array();
|
59 |
-
if ( isset( $postarr['post_title'] ) ) {
|
60 |
-
$fields['post_title'] = $postarr['post_title'];
|
61 |
-
}
|
62 |
-
|
63 |
-
if ( isset( $postarr['post_content'] ) ) {
|
64 |
-
$fields['post_content'] = $postarr['post_content'];
|
65 |
-
}
|
66 |
-
|
67 |
-
if ( isset( $postarr['post_excerpt'] ) ) {
|
68 |
-
$fields['post_excerpt'] = $postarr['post_excerpt'];
|
69 |
-
}
|
70 |
-
|
71 |
-
$builder_language = WPGlobus::Config()->builder->get_language();
|
72 |
-
|
73 |
-
if ( empty( $builder_language ) ) {
|
74 |
-
|
75 |
-
if ( empty( $postarr[ WPGlobus::get_language_meta_key() ] ) ) {
|
76 |
-
$builder_language = WPGlobus::Config()->default_language;
|
77 |
-
} else {
|
78 |
-
$builder_language = $postarr[ WPGlobus::get_language_meta_key() ];
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
foreach ( $fields as $field => $value ) {
|
83 |
-
|
84 |
-
$tr = array();
|
85 |
-
|
86 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
87 |
-
|
88 |
-
if ( $lang === $builder_language ) {
|
89 |
-
|
90 |
-
$text = $value;
|
91 |
-
if ( WPGlobus_Core::has_translations( $value ) ) {
|
92 |
-
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
93 |
-
}
|
94 |
-
if ( ! empty( $text ) ) {
|
95 |
-
$tr[ $lang ] = $text;
|
96 |
-
}
|
97 |
-
} else {
|
98 |
-
if ( isset( $_post->$field ) ) {
|
99 |
-
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
100 |
-
if ( ! empty( $text ) ) {
|
101 |
-
$tr[ $lang ] = $text;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
endforeach;
|
107 |
-
|
108 |
-
$data[ $field ] = WPGlobus_Utils::build_multilingual_string( $tr );
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
return $data;
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
endif;
|
119 |
-
|
120 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/pods/class-wpglobus-pods.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-pods.php
|
4 |
-
*
|
5 |
-
* @since 2.3.0
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Builders\Pods.
|
8 |
-
* @author Alex Gor(alexgff)
|
9 |
-
*/
|
10 |
-
|
11 |
-
if ( ! class_exists( 'WPGlobus_Pods' ) ) :
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class WPGlobus_Pods.
|
15 |
-
*/
|
16 |
-
class WPGlobus_Pods extends WPGlobus_Builder {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Constructor.
|
20 |
-
*/
|
21 |
-
public function __construct() {
|
22 |
-
|
23 |
-
parent::__construct( 'pods' );
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
-
endif;
|
30 |
-
|
31 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/builders/yoast_seo/class-wpglobus-yoast_seo-update-post.php
DELETED
@@ -1,259 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-yoast_seo-update-post.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Yoast_SEO
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_yoast_seo_Update_Post.
|
11 |
-
*/
|
12 |
-
|
13 |
-
if ( ! class_exists( 'WPGlobus_yoast_seo_Update_Post' ) ) :
|
14 |
-
|
15 |
-
// phpcs:ignore PEAR.NamingConventions
|
16 |
-
class WPGlobus_yoast_seo_Update_Post extends WPGlobus_Builder_Update_Post {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Current taxonomy.
|
20 |
-
*/
|
21 |
-
protected $taxonomy = '';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* WP_Term object.
|
25 |
-
*/
|
26 |
-
protected $tag;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Constructor.
|
30 |
-
*/
|
31 |
-
public function __construct() {
|
32 |
-
|
33 |
-
parent::__construct( 'yoast_seo' );
|
34 |
-
|
35 |
-
global $pagenow;
|
36 |
-
|
37 |
-
if ( 'edit-tags.php' === $pagenow && 'editedtag' === $_POST['action'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
38 |
-
/**
|
39 |
-
* Update button was clicked.
|
40 |
-
*/
|
41 |
-
$this->build_ml_description();
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @see_file wpglobus\includes\class-wpglobus.php
|
46 |
-
*/
|
47 |
-
remove_action( 'wp_insert_post_data', array( 'WPGlobus', 'on_save_post_data' ), 10 );
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @todo incorrect the saving post in extra languages with priority = 10
|
51 |
-
*/
|
52 |
-
add_filter( 'wp_insert_post_data', array( $this, 'filter__wp_insert_post_data' ), 100, 2 );
|
53 |
-
|
54 |
-
$this->taxonomy = WPGlobus::Config()->builder->get( 'taxonomy' );
|
55 |
-
|
56 |
-
if ( $this->taxonomy ) {
|
57 |
-
|
58 |
-
add_filter( 'wp_update_term_data', array( $this, 'filter__update_term_data' ), 10, 4 );
|
59 |
-
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Build multilingual description.
|
65 |
-
* We don't have filter for description like filter for name @see 'wp_update_term_data' in wp-includes\taxonomy.php
|
66 |
-
*/
|
67 |
-
public function build_ml_description() {
|
68 |
-
|
69 |
-
global $wpdb;
|
70 |
-
|
71 |
-
$current_language = WPGlobus::Config()->builder->get_language();
|
72 |
-
|
73 |
-
$tag_ID = (int) $_POST['tag_ID'];
|
74 |
-
$taxonomy = $_POST['taxonomy']; // phpcs:ignore WordPress.CSRF.NonceVerification
|
75 |
-
|
76 |
-
$this->tag = get_term( $tag_ID, $taxonomy );
|
77 |
-
|
78 |
-
if ( is_wp_error( $this->tag ) ) {
|
79 |
-
|
80 |
-
$terms = $wpdb->get_results( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id = %d", $tag_ID ) );
|
81 |
-
if ( ! empty( $terms[0] ) && is_object( $terms[0] ) ) {
|
82 |
-
$this->tag = $terms[0];
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( is_wp_error( $this->tag ) ) {
|
87 |
-
/**
|
88 |
-
* @todo Investigate.
|
89 |
-
*/
|
90 |
-
return;
|
91 |
-
}
|
92 |
-
|
93 |
-
$new_desc = array();
|
94 |
-
|
95 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
96 |
-
|
97 |
-
if ( $lang === $current_language ) {
|
98 |
-
|
99 |
-
$text = trim( $_POST['description'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
100 |
-
if ( ! empty( $text ) ) {
|
101 |
-
$new_desc[ $lang ] = $text;
|
102 |
-
}
|
103 |
-
} else {
|
104 |
-
|
105 |
-
$text = WPGlobus_Core::text_filter( $this->tag->description, $lang, WPGlobus::RETURN_EMPTY );
|
106 |
-
if ( ! empty( $text ) ) {
|
107 |
-
$new_desc[ $lang ] = $text;
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
endforeach;
|
112 |
-
|
113 |
-
$_POST['description'] = WPGlobus_Utils::build_multilingual_string( $new_desc );
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Filters term data before it is updated in the database.
|
119 |
-
*
|
120 |
-
* @param array $data Term data to be updated.
|
121 |
-
* @param int $term_id Term ID.
|
122 |
-
* @param string $taxonomy Taxonomy slug.
|
123 |
-
* @param array $args Arguments passed to wp_update_term().
|
124 |
-
*
|
125 |
-
* @return array
|
126 |
-
*/
|
127 |
-
public function filter__update_term_data(
|
128 |
-
$data,
|
129 |
-
/** @noinspection PhpUnusedParameterInspection */
|
130 |
-
$term_id,
|
131 |
-
/** @noinspection PhpUnusedParameterInspection */
|
132 |
-
$taxonomy,
|
133 |
-
/** @noinspection PhpUnusedParameterInspection */
|
134 |
-
$args
|
135 |
-
) {
|
136 |
-
|
137 |
-
if ( is_wp_error( $this->tag ) ) {
|
138 |
-
/**
|
139 |
-
* @todo Investigate.
|
140 |
-
* may be to use $args.
|
141 |
-
*/
|
142 |
-
return $data;
|
143 |
-
}
|
144 |
-
|
145 |
-
if ( WPGlobus::Config()->builder && ! WPGlobus::Config()->builder->is_builder_page() ) {
|
146 |
-
return $data;
|
147 |
-
}
|
148 |
-
|
149 |
-
$current_language = WPGlobus::Config()->builder->get_language();
|
150 |
-
|
151 |
-
$new_name = array();
|
152 |
-
|
153 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
154 |
-
|
155 |
-
if ( $lang === $current_language ) {
|
156 |
-
|
157 |
-
$text = trim( $data['name'] );
|
158 |
-
if ( ! empty( $text ) ) {
|
159 |
-
$new_name[ $lang ] = $text;
|
160 |
-
}
|
161 |
-
} else {
|
162 |
-
|
163 |
-
$text = WPGlobus_Core::text_filter( $this->tag->name, $lang, WPGlobus::RETURN_EMPTY );
|
164 |
-
if ( ! empty( $text ) ) {
|
165 |
-
$new_name[ $lang ] = $text;
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
endforeach;
|
170 |
-
|
171 |
-
$data['name'] = WPGlobus_Utils::build_multilingual_string( $new_name );
|
172 |
-
|
173 |
-
return $data;
|
174 |
-
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Callback for 'wp_insert_post_data'.
|
179 |
-
*
|
180 |
-
* @param array $data
|
181 |
-
* @param array $postarr
|
182 |
-
*
|
183 |
-
* @return array mixed
|
184 |
-
*/
|
185 |
-
public function filter__wp_insert_post_data( $data, $postarr ) {
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Prevent to filter disabled post type.
|
189 |
-
*
|
190 |
-
* @since 2.1.4
|
191 |
-
*/
|
192 |
-
if ( in_array( $data['post_type'], WPGlobus::Config()->disabled_entities, true ) ) {
|
193 |
-
return $data;
|
194 |
-
}
|
195 |
-
|
196 |
-
global $wpdb;
|
197 |
-
$_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d AND post_type = %s LIMIT 1", $postarr['ID'], $postarr['post_type'] ) );
|
198 |
-
|
199 |
-
$fields = array();
|
200 |
-
if ( isset( $postarr['post_title'] ) ) {
|
201 |
-
$fields['post_title'] = $postarr['post_title'];
|
202 |
-
}
|
203 |
-
|
204 |
-
if ( isset( $postarr['post_content'] ) ) {
|
205 |
-
$fields['post_content'] = $postarr['post_content'];
|
206 |
-
}
|
207 |
-
|
208 |
-
if ( isset( $postarr['post_excerpt'] ) ) {
|
209 |
-
$fields['post_excerpt'] = $postarr['post_excerpt'];
|
210 |
-
}
|
211 |
-
|
212 |
-
$builder_language = WPGlobus::Config()->builder->get_language();
|
213 |
-
|
214 |
-
if ( empty( $builder_language ) ) {
|
215 |
-
|
216 |
-
if ( empty( $postarr[ WPGlobus::get_language_meta_key() ] ) ) {
|
217 |
-
$builder_language = WPGlobus::Config()->default_language;
|
218 |
-
} else {
|
219 |
-
$builder_language = $postarr[ WPGlobus::get_language_meta_key() ];
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
foreach ( $fields as $field => $value ) {
|
224 |
-
|
225 |
-
$tr = array();
|
226 |
-
|
227 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
228 |
-
|
229 |
-
if ( $lang === $builder_language ) {
|
230 |
-
|
231 |
-
$text = $value;
|
232 |
-
if ( WPGlobus_Core::has_translations( $value ) ) {
|
233 |
-
$text = WPGlobus_Core::text_filter( $value, $lang, WPGlobus::RETURN_EMPTY );
|
234 |
-
}
|
235 |
-
if ( ! empty( $text ) ) {
|
236 |
-
$tr[ $lang ] = $text;
|
237 |
-
}
|
238 |
-
} else {
|
239 |
-
if ( isset( $_post->$field ) ) {
|
240 |
-
$text = WPGlobus_Core::text_filter( $_post->$field, $lang, WPGlobus::RETURN_EMPTY );
|
241 |
-
if ( ! empty( $text ) ) {
|
242 |
-
$tr[ $lang ] = $text;
|
243 |
-
}
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
endforeach;
|
248 |
-
|
249 |
-
$data[ $field ] = WPGlobus_Utils::build_multilingual_string( $tr );
|
250 |
-
|
251 |
-
}
|
252 |
-
|
253 |
-
return $data;
|
254 |
-
|
255 |
-
}
|
256 |
-
|
257 |
-
}
|
258 |
-
|
259 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-yoast_seo.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus\Builders\Yoast_SEO
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
|
10 |
-
if ( ! class_exists( 'WPGlobus_Yoast_SEO' ) ) :
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class WPGlobus_Yoast_SEO.
|
14 |
-
*/
|
15 |
-
class WPGlobus_Yoast_SEO extends WPGlobus_Builder {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Current taxonomy.
|
19 |
-
*/
|
20 |
-
protected $taxonomy = '';
|
21 |
-
|
22 |
-
protected $wpseo_taxonomy_option_name = '';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Constructor.
|
26 |
-
*/
|
27 |
-
public function __construct() {
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @see 'WPSEO_PREMIUM_FILE' for premium add-on.
|
31 |
-
*/
|
32 |
-
|
33 |
-
parent::__construct( 'yoast_seo' );
|
34 |
-
|
35 |
-
$this->taxonomy = WPGlobus::Config()->builder->get('taxonomy');
|
36 |
-
|
37 |
-
if ( $this->taxonomy ) {
|
38 |
-
|
39 |
-
add_action( "{$this->taxonomy}_pre_edit_form", array( $this, 'on__pre_edit_form' ), 10, 2 );
|
40 |
-
|
41 |
-
add_action( "{$this->taxonomy}_term_edit_form_top", array( $this, 'on__edit_form' ), 10, 2 );
|
42 |
-
|
43 |
-
if ( class_exists('WPSEO_Taxonomy_Meta') ) {
|
44 |
-
$wpseo_taxonomy_meta = WPSEO_Taxonomy_Meta::get_instance();
|
45 |
-
$this->wpseo_taxonomy_option_name = $wpseo_taxonomy_meta::$name;
|
46 |
-
} else {
|
47 |
-
$this->wpseo_taxonomy_option_name = 'wpseo_taxonomy_meta';
|
48 |
-
}
|
49 |
-
|
50 |
-
add_filter( "option_{$this->wpseo_taxonomy_option_name}", array( $this, 'filter__wpseo_taxonomy_meta' ), 5, 2 );
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @see wordpress-seo\inc\class-wpseo-replace-vars.php
|
54 |
-
*/
|
55 |
-
add_filter( 'wpseo_replacements', array( $this, 'filter__wpseo_replacements' ), 5, 2 );
|
56 |
-
|
57 |
-
}
|
58 |
-
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Customization of the replacements before they are applied.
|
63 |
-
*
|
64 |
-
* @api array $replacements The replacements.
|
65 |
-
*
|
66 |
-
* @param array $args The object some of the replacement values might come from,
|
67 |
-
* could be a post, taxonomy or term.
|
68 |
-
*/
|
69 |
-
public function filter__wpseo_replacements( $replacements, $args ) {
|
70 |
-
|
71 |
-
if ( ! is_array($replacements) || empty($replacements) ) {
|
72 |
-
return $replacements;
|
73 |
-
}
|
74 |
-
|
75 |
-
$key = key($replacements);
|
76 |
-
|
77 |
-
if ( WPGlobus_Core::has_translations( $replacements[$key] ) ) {
|
78 |
-
$replacements[$key] = WPGlobus_Core::text_filter( $replacements[$key], WPGlobus::Config()->builder->get_language(), WPGlobus::RETURN_EMPTY );
|
79 |
-
}
|
80 |
-
|
81 |
-
return $replacements;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Filters the value of a 'wpseo_taxonomy_meta' option.
|
86 |
-
*
|
87 |
-
* @param mixed $option_value Value of the option. If stored serialized, it will be
|
88 |
-
* unserialized prior to being returned.
|
89 |
-
* @param string $option_name Option name.
|
90 |
-
*/
|
91 |
-
public function filter__wpseo_taxonomy_meta( $option_value, $option_name ) {
|
92 |
-
|
93 |
-
if ( empty( $option_value[$this->taxonomy] ) ) {
|
94 |
-
return $option_value;
|
95 |
-
}
|
96 |
-
|
97 |
-
$_enabled_keys = array('wpseo_title', 'wpseo_desc', 'wpseo_focuskw');
|
98 |
-
|
99 |
-
$language = WPGlobus::Config()->builder->get_language();
|
100 |
-
|
101 |
-
foreach( $option_value[$this->taxonomy] as $tag_ID=>$values ) {
|
102 |
-
foreach($values as $_key=>$_value) {
|
103 |
-
if ( in_array($_key, $_enabled_keys) ) {
|
104 |
-
if ( WPGlobus_Core::has_translations($_value) ) {
|
105 |
-
$option_value[$this->taxonomy][$tag_ID][$_key] = WPGlobus_Core::text_filter($_value, $language, WPGlobus::RETURN_EMPTY);
|
106 |
-
} else {
|
107 |
-
if ( $language != WPGlobus::Config()->default_language ) {
|
108 |
-
$option_value[$this->taxonomy][$tag_ID][$_key] = '';
|
109 |
-
}
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
return $option_value;
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Fires before the Edit Term form for all taxonomies.
|
120 |
-
*
|
121 |
-
* @param object $tag Current taxonomy term object.
|
122 |
-
* @param string $taxonomy Current $taxonomy slug.
|
123 |
-
*/
|
124 |
-
public function on__pre_edit_form( $tag, $taxonomy ) {
|
125 |
-
|
126 |
-
$language = WPGlobus::Config()->builder->get_language();
|
127 |
-
$tag->description = WPGlobus_Core::text_filter( $tag->description, $language, WPGlobus::RETURN_EMPTY );
|
128 |
-
$tag->name = WPGlobus_Core::text_filter( $tag->name, $language, WPGlobus::RETURN_EMPTY );
|
129 |
-
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Fires at the beginning of the Edit Term form. Add language field to taxonomy edit form.
|
134 |
-
*
|
135 |
-
* @param object $tag Current taxonomy term object.
|
136 |
-
* @param string $taxonomy Current $taxonomy slug.
|
137 |
-
*/
|
138 |
-
public function on__edit_form( $tag, $taxonomy ) {
|
139 |
-
echo '<input type="hidden" name="'.WPGlobus::get_language_meta_key().'" value="'.WPGlobus::Config()->builder->get_language().'">';
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
}
|
144 |
-
|
145 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-config-vendor.php
DELETED
@@ -1,428 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class WPGlobus_Config_Vendor
|
4 |
-
*
|
5 |
-
* @package WPGlobus
|
6 |
-
* @author Alex Gor(alexgff)
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! class_exists( 'WPGlobus_Config_Vendor' ) ) :
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Vendor configuration.
|
13 |
-
*/
|
14 |
-
class WPGlobus_Config_Vendor {
|
15 |
-
|
16 |
-
const PLUGIN_CONFIG_FILES = 'configs/*.json';
|
17 |
-
|
18 |
-
const PLUGIN_CONFIG_DIR = 'configs/';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Instance of this class.
|
22 |
-
*
|
23 |
-
* @var WPGlobus_Config_Vendor
|
24 |
-
*/
|
25 |
-
protected static $instance;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @var array
|
29 |
-
*/
|
30 |
-
protected static $config = array();
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @var array|null
|
34 |
-
*/
|
35 |
-
protected static $post_meta_fields = null;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @var array|null
|
39 |
-
*/
|
40 |
-
protected static $post_ml_fields = null;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* @var array|null
|
44 |
-
*/
|
45 |
-
protected static $wp_options = null;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Builder.
|
49 |
-
*
|
50 |
-
* @var WPGlobus_Config_Builder
|
51 |
-
*/
|
52 |
-
protected static $builder = null;
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Array of registered vendors.
|
56 |
-
*
|
57 |
-
* @var string[]
|
58 |
-
*/
|
59 |
-
protected static $vendors = array();
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Constructor.
|
63 |
-
*
|
64 |
-
* @param WPGlobus_Config_Builder $builder
|
65 |
-
*/
|
66 |
-
protected function __construct( $builder ) {
|
67 |
-
|
68 |
-
self::$builder = $builder;
|
69 |
-
|
70 |
-
self::get_config_files();
|
71 |
-
self::parse_config();
|
72 |
-
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Get instance of this class.
|
77 |
-
*
|
78 |
-
* @param WPGlobus_Config_Builder $builder
|
79 |
-
*
|
80 |
-
* @return WPGlobus_Config_Vendor
|
81 |
-
*/
|
82 |
-
public static function get_instance( $builder ) {
|
83 |
-
if ( ! ( self::$instance instanceof WPGlobus_Config_Vendor ) ) {
|
84 |
-
self::$instance = new self( $builder );
|
85 |
-
}
|
86 |
-
|
87 |
-
return self::$instance;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get meta fields.
|
92 |
-
*
|
93 |
-
* @return array|false
|
94 |
-
*/
|
95 |
-
public static function get_meta_fields() {
|
96 |
-
if ( is_null( self::$post_meta_fields ) ) {
|
97 |
-
return false;
|
98 |
-
}
|
99 |
-
|
100 |
-
return self::$post_meta_fields;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Get multilingual fields.
|
105 |
-
*
|
106 |
-
* @return array|false
|
107 |
-
*/
|
108 |
-
public static function get_ml_fields() {
|
109 |
-
if ( is_null( self::$post_ml_fields ) ) {
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
|
113 |
-
return self::$post_ml_fields;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get wp_options.
|
118 |
-
*
|
119 |
-
* @return array|false
|
120 |
-
*/
|
121 |
-
public static function get_wp_options() {
|
122 |
-
if ( is_null( self::$wp_options ) ) {
|
123 |
-
return false;
|
124 |
-
}
|
125 |
-
|
126 |
-
return self::$wp_options;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Get config files.
|
131 |
-
*/
|
132 |
-
public static function get_config_files() {
|
133 |
-
|
134 |
-
$config_plugin_dir = WPGlobus::$PLUGIN_DIR_PATH . self::PLUGIN_CONFIG_DIR;
|
135 |
-
|
136 |
-
/**
|
137 |
-
* WPGlobus SEO.
|
138 |
-
*/
|
139 |
-
if ( function_exists( 'wpglobus_seo__init' ) ) {
|
140 |
-
self::$vendors[] = 'wpglobus-seo.json';
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Yoast SEO.
|
145 |
-
* https://wordpress.org/plugins/wordpress-seo/
|
146 |
-
*/
|
147 |
-
if ( defined( 'WPSEO_VERSION' ) ) {
|
148 |
-
/**
|
149 |
-
* check 'WPSEO_PREMIUM_PLUGIN_FILE' for premium add-on.
|
150 |
-
*/
|
151 |
-
self::$vendors[] = 'yoast-seo.json';
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* All in One SEO Pack.
|
156 |
-
* https://wordpress.org/plugins/all-in-one-seo-pack/
|
157 |
-
*/
|
158 |
-
if ( defined( 'AIOSEOP_VERSION' ) ) {
|
159 |
-
/**
|
160 |
-
* Load config file for builder page only.
|
161 |
-
*/
|
162 |
-
if ( self::$builder->is_builder_page() ) {
|
163 |
-
self::$vendors[] = 'all-in-one-seo-pack.json';
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Elementor.
|
169 |
-
* https://wordpress.org/plugins/elementor/
|
170 |
-
*/
|
171 |
-
if ( defined( 'ELEMENTOR_VERSION' ) ) {
|
172 |
-
self::$vendors[] = 'elementor.json';
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Advanced Custom Fields.
|
177 |
-
* https://wordpress.org/plugins/advanced-custom-fields/
|
178 |
-
*/
|
179 |
-
if ( function_exists( 'acf' ) ) {
|
180 |
-
/**
|
181 |
-
* Check the existence of function to prevent getting fatal error in older version (checked with 4.4.12).
|
182 |
-
*/
|
183 |
-
if ( function_exists( 'acf_maybe_get_field' ) ) {
|
184 |
-
self::$vendors[] = 'acf.json';
|
185 |
-
}
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Pods – Custom Content Types and Fields.
|
190 |
-
* https://wordpress.org/plugins/pods/
|
191 |
-
* @since 2.3.0
|
192 |
-
*/
|
193 |
-
if ( defined( 'PODS_VERSION' ) ) {
|
194 |
-
self::$vendors[] = 'pods.json';
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Page Builder by SiteOrigin.
|
199 |
-
* https://wordpress.org/plugins/siteorigin-panels/
|
200 |
-
* // if ( defined('SITEORIGIN_PANELS_VERSION') ) {
|
201 |
-
* // self::$vendors[] = 'siteorigin-panels.json';
|
202 |
-
* // }
|
203 |
-
*/
|
204 |
-
|
205 |
-
// TODO: builder ID can be a string or `false`. Need to refactor this condition or the `get_id` method.
|
206 |
-
// phpcs:ignore WordPress.PHP.StrictComparisons
|
207 |
-
if ( self::$builder->get_id() != '' && self::$builder->is_builder_page() ) {
|
208 |
-
|
209 |
-
$addons = WPGlobus_Builders::get_addons();
|
210 |
-
|
211 |
-
if ( ! empty( $addons ) ) {
|
212 |
-
foreach ( $addons as $id => $addon ) {
|
213 |
-
if ( 'add-on' === $addon['role'] ) {
|
214 |
-
if ( ! empty( $addon['const'] ) && defined( $addon['const'] ) ) {
|
215 |
-
self::$vendors[] = $addon['config_file'];
|
216 |
-
}
|
217 |
-
}
|
218 |
-
}
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Now handle with config files.
|
224 |
-
*/
|
225 |
-
foreach ( self::$vendors as $file ) {
|
226 |
-
|
227 |
-
if ( is_readable( $config_plugin_dir . $file ) ) {
|
228 |
-
$file_name = pathinfo( $file, PATHINFO_FILENAME );
|
229 |
-
|
230 |
-
self::$config[ $file_name ] = json_decode( file_get_contents( $config_plugin_dir . $file ), true );
|
231 |
-
}
|
232 |
-
}
|
233 |
-
|
234 |
-
/**
|
235 |
-
* Filter vendor's config.
|
236 |
-
*
|
237 |
-
* @since 2.1.10
|
238 |
-
*
|
239 |
-
* @param array $config Config.
|
240 |
-
* @param object $builder An object WPGlobus_Config_Builder.
|
241 |
-
*
|
242 |
-
* @return array
|
243 |
-
*/
|
244 |
-
self::$config = apply_filters( 'wpglobus_config_vendors', self::$config, self::$builder );
|
245 |
-
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Get multilingual fields for post.
|
250 |
-
*
|
251 |
-
* @param mixed $_meta Unused.
|
252 |
-
* @param array $_init
|
253 |
-
*
|
254 |
-
* @return array|false
|
255 |
-
*/
|
256 |
-
public static function get_post_ml_fields(
|
257 |
-
/** @noinspection PhpUnusedParameterInspection */
|
258 |
-
$_meta, $_init
|
259 |
-
) {
|
260 |
-
|
261 |
-
if ( ! self::$builder->is_builder_page() ) {
|
262 |
-
/**
|
263 |
-
* Prevent getting multilingual fields for no builder page.
|
264 |
-
*
|
265 |
-
* @since 2.1.11
|
266 |
-
*/
|
267 |
-
return false;
|
268 |
-
}
|
269 |
-
|
270 |
-
$_post_ml_fields = array();
|
271 |
-
|
272 |
-
if ( empty( $_init ) ) {
|
273 |
-
return $_post_ml_fields;
|
274 |
-
}
|
275 |
-
|
276 |
-
// phpcs:ignore
|
277 |
-
// $file = empty( $_init['file'] ) ? '' : WPGlobus::$PLUGIN_DIR_PATH . 'includes/' . $_init['file']; // TODO remove
|
278 |
-
|
279 |
-
/** @var WPGlobus_Acf_2 $class */
|
280 |
-
$class = empty( $_init['class'] ) ? '' : $_init['class'];
|
281 |
-
|
282 |
-
if ( ! empty( $class ) && class_exists( $class ) ) {
|
283 |
-
$_post_ml_fields = $class::get_post_multilingual_fields();
|
284 |
-
}
|
285 |
-
|
286 |
-
return $_post_ml_fields;
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Get meta fields for post.
|
291 |
-
*
|
292 |
-
* @param mixed $_meta Unused.
|
293 |
-
* @param array $_init
|
294 |
-
*
|
295 |
-
* @return array|false
|
296 |
-
*/
|
297 |
-
public static function get_post_meta_fields(
|
298 |
-
/** @noinspection PhpUnusedParameterInspection */
|
299 |
-
$_meta, $_init
|
300 |
-
) {
|
301 |
-
|
302 |
-
if ( ! self::$builder->is_builder_page() ) {
|
303 |
-
/**
|
304 |
-
* Prevent getting meta fields for no builder page.
|
305 |
-
*
|
306 |
-
* @since 2.1.11
|
307 |
-
*/
|
308 |
-
return false;
|
309 |
-
}
|
310 |
-
|
311 |
-
$_post_meta_fields = array();
|
312 |
-
|
313 |
-
if ( empty( $_init ) ) {
|
314 |
-
return $_post_meta_fields;
|
315 |
-
}
|
316 |
-
|
317 |
-
$file = empty( $_init['file'] ) ? '' : WPGlobus::$PLUGIN_DIR_PATH . 'includes/' . $_init['file'];
|
318 |
-
|
319 |
-
/** @var WPGlobus_Acf_2 $class */
|
320 |
-
$class = empty( $_init['class'] ) ? '' : $_init['class'];
|
321 |
-
|
322 |
-
if ( ! empty( $file ) && file_exists( $file ) ) {
|
323 |
-
/** @noinspection PhpIncludeInspection */
|
324 |
-
include_once $file;
|
325 |
-
if ( ! empty( $class ) && class_exists( $class ) ) {
|
326 |
-
/**
|
327 |
-
* @since 2.1.3 Added post type parameter.
|
328 |
-
*/
|
329 |
-
$_post_meta_fields = $class::get_post_meta_fields( self::$builder->get( 'post_id' ), self::$builder->get( 'post_type' ) );
|
330 |
-
} else {
|
331 |
-
/**
|
332 |
-
* Mark as being incorrectly called.
|
333 |
-
*/
|
334 |
-
_doing_it_wrong( 'Class `' . $class . '` (in ' . __FILE__ . ')', 'Check out `configs\*.json` files.', '2.3.0' );
|
335 |
-
}
|
336 |
-
} else {
|
337 |
-
/**
|
338 |
-
* Mark as being incorrectly called.
|
339 |
-
*/
|
340 |
-
_doing_it_wrong( 'File `' . $file . '` (in ' . __FILE__ . ')', 'Check out `configs\*.json` files.', '2.3.0' );
|
341 |
-
}
|
342 |
-
|
343 |
-
return $_post_meta_fields;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Parse config files.
|
348 |
-
*/
|
349 |
-
public static function parse_config() {
|
350 |
-
|
351 |
-
/**
|
352 |
-
* Parse post meta fields.
|
353 |
-
*/
|
354 |
-
if ( is_null( self::$post_meta_fields ) ) {
|
355 |
-
|
356 |
-
self::$post_meta_fields = array();
|
357 |
-
self::$post_ml_fields = array();
|
358 |
-
|
359 |
-
foreach ( self::$config as $vendor => $data ) {
|
360 |
-
|
361 |
-
if ( isset( $data['post_meta_fields'] ) && is_array( $data['post_meta_fields'] ) ) :
|
362 |
-
|
363 |
-
foreach ( $data['post_meta_fields'] as $_meta => $_init ) {
|
364 |
-
|
365 |
-
if ( isset( $data['post_meta_fields'][ $_meta ] ) ) {
|
366 |
-
|
367 |
-
if ( '*' === $_meta ) {
|
368 |
-
$_arr = self::get_post_meta_fields( $_meta, $_init );
|
369 |
-
if ( ! empty( $_arr ) ) {
|
370 |
-
self::$post_meta_fields = array_merge( self::$post_meta_fields, $_arr );
|
371 |
-
}
|
372 |
-
} else {
|
373 |
-
self::$post_meta_fields[] = $_meta;
|
374 |
-
}
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
endif;
|
379 |
-
|
380 |
-
if ( isset( $data['post_ml_fields'] ) && is_array( $data['post_ml_fields'] ) ) :
|
381 |
-
foreach ( $data['post_ml_fields'] as $_meta => $_init ) {
|
382 |
-
if ( isset( $data['post_ml_fields'][ $_meta ] ) ) {
|
383 |
-
|
384 |
-
if ( '*' === $_meta ) {
|
385 |
-
$_arr = self::get_post_ml_fields( $_meta, $_init );
|
386 |
-
if ( ! empty( $_arr ) ) {
|
387 |
-
self::$post_ml_fields = array_merge( self::$post_ml_fields, $_arr );
|
388 |
-
}
|
389 |
-
} else {
|
390 |
-
self::$post_ml_fields[] = $_meta;
|
391 |
-
}
|
392 |
-
}
|
393 |
-
}
|
394 |
-
endif;
|
395 |
-
|
396 |
-
}
|
397 |
-
|
398 |
-
}
|
399 |
-
|
400 |
-
/**
|
401 |
-
* Parse WP options.
|
402 |
-
*/
|
403 |
-
if ( is_null( self::$wp_options ) ) {
|
404 |
-
|
405 |
-
foreach ( self::$config as $vendor => $data ) {
|
406 |
-
|
407 |
-
if ( isset( $data['wp_options'] ) && is_array( $data['wp_options'] ) ) :
|
408 |
-
foreach ( $data['wp_options'] as $_option => $_init ) {
|
409 |
-
if ( isset( $data['wp_options'][ $_option ] ) ) {
|
410 |
-
self::$wp_options[] = $_option;
|
411 |
-
}
|
412 |
-
}
|
413 |
-
endif;
|
414 |
-
|
415 |
-
}
|
416 |
-
|
417 |
-
if ( ! is_null( self::$wp_options ) ) {
|
418 |
-
self::$wp_options = array_unique( self::$wp_options );
|
419 |
-
}
|
420 |
-
}
|
421 |
-
|
422 |
-
}
|
423 |
-
|
424 |
-
}
|
425 |
-
|
426 |
-
endif;
|
427 |
-
|
428 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-config.php
DELETED
@@ -1,965 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package WPGlobus
|
4 |
-
*/
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Class WPGlobus_Config
|
8 |
-
*/
|
9 |
-
class WPGlobus_Config {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Language by default
|
13 |
-
* @var string
|
14 |
-
*/
|
15 |
-
public $default_language = 'en';
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Current language. Should be set to default initially.
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
public $language = 'en';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Enabled languages
|
25 |
-
* @var string[]
|
26 |
-
*/
|
27 |
-
public $enabled_languages = array(
|
28 |
-
'en',
|
29 |
-
'es',
|
30 |
-
'de',
|
31 |
-
'fr',
|
32 |
-
'ru',
|
33 |
-
);
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Hide from URL language by default
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
public $hide_default_language = true;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Opened languages
|
43 |
-
* @var string[]
|
44 |
-
*/
|
45 |
-
public $open_languages = array();
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Flag images configuration
|
49 |
-
* Look in /flags/ directory for a huge list of flags for usage
|
50 |
-
* @var array
|
51 |
-
*/
|
52 |
-
public $flag = array();
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Location of flags (needs trailing slash!)
|
56 |
-
* @var string
|
57 |
-
*/
|
58 |
-
public $flags_url = '';
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Path to flags.
|
62 |
-
* @var array
|
63 |
-
* @since 1.9.17
|
64 |
-
*/
|
65 |
-
public $flag_path = array();
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Location of flags.
|
69 |
-
* @var array
|
70 |
-
* @since 1.9.17
|
71 |
-
*/
|
72 |
-
public $flag_urls = array();
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Stores languages in pairs code=>name
|
76 |
-
* @var array
|
77 |
-
*/
|
78 |
-
public $language_name = array();
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Stores languages names in English
|
82 |
-
* @var array
|
83 |
-
*/
|
84 |
-
public $en_language_name = array();
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Stores locales
|
88 |
-
* @var array
|
89 |
-
*/
|
90 |
-
public $locale = array();
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Stores enabled locales
|
94 |
-
* @since 1.0.10
|
95 |
-
* @var array
|
96 |
-
*/
|
97 |
-
public $enabled_locale = array();
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Stores version and update from WPGlobus Mini info
|
101 |
-
* @var array
|
102 |
-
*/
|
103 |
-
public $version = array();
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Use flag name for navigation menu : 'name' || 'code' || ''
|
107 |
-
* @var string
|
108 |
-
*/
|
109 |
-
public $show_flag_name = 'code';
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Use navigation menu by slug
|
113 |
-
* for use in all nav menu set value to 'all'
|
114 |
-
* @var string
|
115 |
-
*/
|
116 |
-
public $nav_menu = '';
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Add language selector to navigation menu which was created with wp_list_pages
|
120 |
-
* @since 1.0.7
|
121 |
-
* @var bool
|
122 |
-
*/
|
123 |
-
public $selector_wp_list_pages = true;
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Custom CSS
|
127 |
-
* @var string
|
128 |
-
*/
|
129 |
-
public $custom_css = '';
|
130 |
-
|
131 |
-
/**
|
132 |
-
* WPGlobus option key
|
133 |
-
* @var string
|
134 |
-
*/
|
135 |
-
public $option = 'wpglobus_option';
|
136 |
-
|
137 |
-
/**
|
138 |
-
* WPGlobus option versioning key
|
139 |
-
* @var string
|
140 |
-
*/
|
141 |
-
public static $option_versioning = 'wpglobus_option_versioning';
|
142 |
-
|
143 |
-
/**
|
144 |
-
* WPGlobus option key for $language_name
|
145 |
-
* @var string
|
146 |
-
*/
|
147 |
-
public $option_language_names = 'wpglobus_option_language_names';
|
148 |
-
|
149 |
-
/**
|
150 |
-
* WPGlobus option key for $en_language_name
|
151 |
-
* @var string
|
152 |
-
*/
|
153 |
-
public $option_en_language_names = 'wpglobus_option_en_language_names';
|
154 |
-
|
155 |
-
/**
|
156 |
-
* WPGlobus option key for $locale
|
157 |
-
* @var string
|
158 |
-
*/
|
159 |
-
public $option_locale = 'wpglobus_option_locale';
|
160 |
-
|
161 |
-
/**
|
162 |
-
* WPGlobus option key for $flag
|
163 |
-
* @var string
|
164 |
-
*/
|
165 |
-
public $option_flags = 'wpglobus_option_flags';
|
166 |
-
|
167 |
-
/**
|
168 |
-
* WPGlobus option key for meta settings
|
169 |
-
* @var string
|
170 |
-
*/
|
171 |
-
public $option_post_meta_settings = 'wpglobus_option_post_meta_settings';
|
172 |
-
|
173 |
-
/**
|
174 |
-
* WPGlobus option key for registered post types.
|
175 |
-
* @since 2.2.24
|
176 |
-
* @var string
|
177 |
-
*/
|
178 |
-
public $option_register_post_types = 'wpglobus_option_register_post_types';
|
179 |
-
|
180 |
-
/**
|
181 |
-
* @var string
|
182 |
-
*/
|
183 |
-
public $css_editor = '';
|
184 |
-
|
185 |
-
/**
|
186 |
-
* @var string
|
187 |
-
*/
|
188 |
-
public $js_editor = '';
|
189 |
-
|
190 |
-
/**
|
191 |
-
* WPGlobus devmode.
|
192 |
-
* @var string
|
193 |
-
*/
|
194 |
-
public $toggle = 'on';
|
195 |
-
|
196 |
-
/**
|
197 |
-
* @todo Refactor this
|
198 |
-
* Duplicate var @see WPGlobus
|
199 |
-
* @var array
|
200 |
-
*/
|
201 |
-
public $disabled_entities = array();
|
202 |
-
|
203 |
-
/**
|
204 |
-
* WPGlobus extended options can be added via filter 'wpglobus_option_sections'
|
205 |
-
*
|
206 |
-
* @since 1.2.3
|
207 |
-
* @var array
|
208 |
-
*/
|
209 |
-
public $extended_options = array();
|
210 |
-
|
211 |
-
/**
|
212 |
-
* @var array
|
213 |
-
* @since 1.8.0
|
214 |
-
*/
|
215 |
-
public $browser_redirect;
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Used to temporarily store the language detected from the URL processed by oembed.
|
219 |
-
* @var string
|
220 |
-
* @since 1.8.4
|
221 |
-
*/
|
222 |
-
protected $language_for_oembed = '';
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Builder.
|
226 |
-
*
|
227 |
-
* @var WPGlobus_Config_Builder
|
228 |
-
* @since 1.9.17
|
229 |
-
*/
|
230 |
-
public $builder = null;
|
231 |
-
|
232 |
-
/**
|
233 |
-
* True if builder is disabled.
|
234 |
-
*
|
235 |
-
* @var boolean
|
236 |
-
* @since 1.9.17
|
237 |
-
*/
|
238 |
-
public $builder_disabled = true;
|
239 |
-
|
240 |
-
/**
|
241 |
-
* If '1', use the old style language switcher in Gutenberg. Set through the Options Panel.
|
242 |
-
*
|
243 |
-
* @var string
|
244 |
-
* @since 2.2.3
|
245 |
-
*/
|
246 |
-
public $block_editor_old_fashioned_language_switcher = '';
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Type of switcher button for WPGlobusSwitcherPlugin.
|
250 |
-
*
|
251 |
-
* @var string
|
252 |
-
* @since 2.2.14
|
253 |
-
*/
|
254 |
-
public $block_editor_switcher_plugin_button_type = '';
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Language- and region-specific hreflang.
|
258 |
-
*
|
259 |
-
* @var string
|
260 |
-
* @since 2.3.4
|
261 |
-
*/
|
262 |
-
public $seo_hreflang_type = 'zz-ZZ';
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Language- and region-specific hreflang for default language.
|
266 |
-
*
|
267 |
-
* @var string
|
268 |
-
* @since 2.3.4
|
269 |
-
*/
|
270 |
-
public $seo_hreflang_default_language_type = false;
|
271 |
-
|
272 |
-
/**
|
273 |
-
* Can get it only once.
|
274 |
-
*
|
275 |
-
* @since 1.8.4
|
276 |
-
* @return string
|
277 |
-
*/
|
278 |
-
public function getAndResetLanguageForOembed() {
|
279 |
-
$to_return = $this->language_for_oembed;
|
280 |
-
$this->language_for_oembed = '';
|
281 |
-
|
282 |
-
return $to_return;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Setter.
|
287 |
-
* @param string $language_for_oembed
|
288 |
-
* @since 1.8.4
|
289 |
-
*/
|
290 |
-
public function setLanguageForOembed( $language_for_oembed ) {
|
291 |
-
$this->language_for_oembed = $language_for_oembed;
|
292 |
-
}
|
293 |
-
|
294 |
-
/**
|
295 |
-
* Constructor
|
296 |
-
*/
|
297 |
-
public function __construct() {
|
298 |
-
|
299 |
-
/**
|
300 |
-
* @since 1.0.9 Hooked to 'plugins_loaded'. The 'init' is too late, because it happens after all plugins already loaded their translations.
|
301 |
-
*/
|
302 |
-
add_action( 'plugins_loaded', array(
|
303 |
-
$this,
|
304 |
-
'init_current_language'
|
305 |
-
), 0 );
|
306 |
-
|
307 |
-
add_action( 'plugins_loaded', array(
|
308 |
-
$this,
|
309 |
-
'on_load_textdomain'
|
310 |
-
), 1 );
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Sets the current language and switches the translations according to the given locale.
|
314 |
-
*
|
315 |
-
* @param string $locale The locale to switch to.
|
316 |
-
*
|
317 |
-
* @since 1.9.14
|
318 |
-
*/
|
319 |
-
add_action( 'switch_locale', array( $this, 'on_switch_locale' ), - PHP_INT_MAX );
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Sets the current language and switches the translations according to the given locale.
|
323 |
-
*
|
324 |
-
* @param string $locale The locale to switch to.
|
325 |
-
*
|
326 |
-
* @since 1.9.14
|
327 |
-
*/
|
328 |
-
add_action( 'restore_previous_locale', array( $this, 'on_switch_locale' ), - PHP_INT_MAX );
|
329 |
-
|
330 |
-
add_action( 'upgrader_process_complete', array( $this, 'on_activate' ), 10, 2 );
|
331 |
-
|
332 |
-
|
333 |
-
$this->_get_options();
|
334 |
-
}
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Sets the current language and switches the translations according to the given locale.
|
338 |
-
*
|
339 |
-
* @param string $locale The locale to switch to.
|
340 |
-
*
|
341 |
-
* @since 1.9.14
|
342 |
-
*/
|
343 |
-
public function on_switch_locale( $locale ) {
|
344 |
-
$this->set_language( $locale );
|
345 |
-
$this->on_load_textdomain();
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Set the current language: if not found in the URL or REFERER, then keep the default
|
350 |
-
* @since 1.1.1
|
351 |
-
*/
|
352 |
-
public function init_current_language() {
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Keep the default language if any of the code before does not detect another one.
|
356 |
-
*/
|
357 |
-
$this->language = $this->default_language;
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Theoretically, we might not have any URL to get the language info from.
|
361 |
-
*/
|
362 |
-
$url_to_check = '';
|
363 |
-
|
364 |
-
if ( WPGlobus_WP::is_doing_ajax() ) {
|
365 |
-
/**
|
366 |
-
* If DOING_AJAX, we cannot retrieve the language information from the URL,
|
367 |
-
* because it's always `admin-ajax`.
|
368 |
-
* Therefore, we'll rely on the HTTP_REFERER (if it exists).
|
369 |
-
*/
|
370 |
-
if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) { // WPCS: input var ok, sanitization ok.
|
371 |
-
$url_to_check = $_SERVER['HTTP_REFERER']; // WPCS: input var ok, sanitization ok.
|
372 |
-
}
|
373 |
-
} else {
|
374 |
-
/**
|
375 |
-
* If not AJAX and not ADMIN then we are at the front. Will use the current URL.
|
376 |
-
*/
|
377 |
-
if ( ! is_admin() ) {
|
378 |
-
$url_to_check = WPGlobus_Utils::current_url();
|
379 |
-
}
|
380 |
-
}
|
381 |
-
|
382 |
-
/**
|
383 |
-
* If we have an URL, extract language from it.
|
384 |
-
* If extracted, set it as a current.
|
385 |
-
*/
|
386 |
-
if ( $url_to_check ) {
|
387 |
-
$language_from_url = WPGlobus_Utils::extract_language_from_url( $url_to_check );
|
388 |
-
if ( $language_from_url ) {
|
389 |
-
$this->language = $language_from_url;
|
390 |
-
}
|
391 |
-
/**
|
392 |
-
* @since 1.9.17
|
393 |
-
* Set language for builder.
|
394 |
-
* For compatibility we set language here for front-end only.
|
395 |
-
* As for the setting in admin @see wpglobus\includes\builders\class-wpglobus-config-builder.php
|
396 |
-
*/
|
397 |
-
if ( $this->builder && ! is_admin() ) {
|
398 |
-
/**
|
399 |
-
* We can work with Gutenberg that was defined as front-end but we should set 'language' for real front-end without builder.
|
400 |
-
* Any builder may have behavior like Gutenberg.
|
401 |
-
* @todo check each builder that WPGlobus will be support.
|
402 |
-
*/
|
403 |
-
if ( ! $this->builder->is_builder_page() ) {
|
404 |
-
$this->builder->set_language($this->language);
|
405 |
-
}
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
}
|
410 |
-
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Check plugin version and update versioning option
|
414 |
-
*
|
415 |
-
* @param stdClass $object Plugin_Upgrader
|
416 |
-
* @param array $options
|
417 |
-
*
|
418 |
-
* @return void
|
419 |
-
*/
|
420 |
-
public function on_activate(
|
421 |
-
/** @noinspection PhpUnusedParameterInspection */
|
422 |
-
$object = null,
|
423 |
-
$options = array()
|
424 |
-
) {
|
425 |
-
|
426 |
-
if (
|
427 |
-
empty( $options['plugin'] ) or $options['plugin'] !== WPGLOBUS_PLUGIN_BASENAME or
|
428 |
-
empty( $options['action'] ) or $options['action'] !== 'update'
|
429 |
-
) {
|
430 |
-
/**
|
431 |
-
* Not our business
|
432 |
-
*/
|
433 |
-
return;
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Here we can read the previous version value and do some actions if necessary.
|
438 |
-
* For example, warn the users about breaking changes.
|
439 |
-
* $version = get_option( self::$option_versioning );
|
440 |
-
* ...
|
441 |
-
*/
|
442 |
-
|
443 |
-
/**
|
444 |
-
* Store the current version
|
445 |
-
*/
|
446 |
-
update_option( self::$option_versioning, array(
|
447 |
-
'current_version' => WPGLOBUS_VERSION
|
448 |
-
) );
|
449 |
-
|
450 |
-
}
|
451 |
-
|
452 |
-
/**
|
453 |
-
* Set the current language to match the given locale.
|
454 |
-
*
|
455 |
-
* @since 1.9.14 : If we do not know such locale, set to default.
|
456 |
-
*
|
457 |
-
* @param string $locale The locale ('en_US', 'fr_FR', etc.).
|
458 |
-
*/
|
459 |
-
public function set_language( $locale ) {
|
460 |
-
|
461 |
-
$locale_to_language = array_flip( $this->locale );
|
462 |
-
|
463 |
-
$this->language = empty( $locale_to_language[ $locale ] )
|
464 |
-
? $this->default_language
|
465 |
-
: $locale_to_language[ $locale ];
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* Check for enabled locale
|
470 |
-
* @since 1.0.10
|
471 |
-
*
|
472 |
-
* @param string $locale
|
473 |
-
*
|
474 |
-
* @return boolean
|
475 |
-
*/
|
476 |
-
public function is_enabled_locale( $locale ) {
|
477 |
-
return in_array( $locale, $this->enabled_locale, true );
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Load textdomain
|
482 |
-
* @since 1.0.0
|
483 |
-
* @return void
|
484 |
-
*/
|
485 |
-
public function on_load_textdomain() {
|
486 |
-
self::load_mofile();
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Can use this action to load additional translations.
|
490 |
-
*
|
491 |
-
* @since 1.9.14
|
492 |
-
*/
|
493 |
-
do_action( 'wpglobus_after_load_textdomain' );
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* Load .MO file from the plugin's `languages` folder.
|
498 |
-
* Used instead of @see load_plugin_textdomain to ignore translation files from WordPress.org, which are outdated.
|
499 |
-
* To force loading from a different place, use the `load_textdomain_mofile` filter.
|
500 |
-
*
|
501 |
-
* @since 1.9.6
|
502 |
-
*/
|
503 |
-
protected function load_mofile() {
|
504 |
-
$domain = 'wpglobus';
|
505 |
-
|
506 |
-
/**
|
507 |
-
* Delete translations that could be loaded already from the main /languages/ folder.
|
508 |
-
*
|
509 |
-
* @since 1.9.10
|
510 |
-
*/
|
511 |
-
unload_textdomain( $domain );
|
512 |
-
|
513 |
-
/**
|
514 |
-
* Load our translations.
|
515 |
-
*/
|
516 |
-
$locale = apply_filters( 'plugin_locale', is_admin() ? get_user_locale() : get_locale(), $domain );
|
517 |
-
$mofile = WPGlobus::languages_path() . '/' . $domain . '-' . $locale . '.mo';
|
518 |
-
load_textdomain( $domain, $mofile );
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* Set flags URL.
|
523 |
-
* @return void
|
524 |
-
*/
|
525 |
-
public function _set_flags_url() {
|
526 |
-
$this->flags_url = WPGlobus::$PLUGIN_DIR_URL . 'flags/';
|
527 |
-
/**
|
528 |
-
* @since 1.9.17
|
529 |
-
*/
|
530 |
-
$this->flag_urls['small'] = WPGlobus::$PLUGIN_DIR_URL . 'flags/';
|
531 |
-
$this->flag_urls['big'] = WPGlobus::$PLUGIN_DIR_URL . 'flags/big/';
|
532 |
-
}
|
533 |
-
|
534 |
-
/**
|
535 |
-
* Set flag PATH.
|
536 |
-
* @return void
|
537 |
-
*/
|
538 |
-
public function _set_flag_path() {
|
539 |
-
$this->flag_path['small'] = WPGlobus::$PLUGIN_DIR_PATH . 'flags/';
|
540 |
-
$this->flag_path['big'] = WPGlobus::$PLUGIN_DIR_PATH . 'flags/big/';
|
541 |
-
}
|
542 |
-
|
543 |
-
/**
|
544 |
-
* Set languages by default.
|
545 |
-
*/
|
546 |
-
public function _set_languages() {
|
547 |
-
|
548 |
-
/**
|
549 |
-
* Names, flags and locales
|
550 |
-
* Useful links
|
551 |
-
* - languages in ISO 639-1 format http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
552 |
-
* - regions http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
553 |
-
* - WordPress locales https://make.wordpress.org/polyglots/teams/
|
554 |
-
* - converter https://www.unicodetools.com/unicode/convert-to-html.php
|
555 |
-
*/
|
556 |
-
|
557 |
-
/* @noinspection SpellCheckingInspection */
|
558 |
-
$language_table = array(
|
559 |
-
// Prefix => Name, Native name, locale, flag.
|
560 |
-
'ar' => array( 'Arabic', 'العربية', 'ar', 'arle.png' ),
|
561 |
-
'en' => array( 'English', 'English', 'en_US', 'us.png' ),
|
562 |
-
'au' => array( 'English (AU)', 'English (AU)', 'en_AU', 'au.png' ),
|
563 |
-
'ca' => array( 'English (CA)', 'English (CA)', 'en_CA', 'ca.png' ),
|
564 |
-
'gb' => array( 'English (UK)', 'English (UK)', 'en_GB', 'uk.png' ),
|
565 |
-
'zh' => array( 'Chinese', '简体中文', 'zh_CN', 'cn.png' ),
|
566 |
-
'tw' => array( 'Chinese (TW)', '繁體中文', 'zh_TW', 'mm.png' ),
|
567 |
-
'da' => array( 'Danish', 'Dansk', 'da_DK', 'dk.png' ),
|
568 |
-
'nl' => array( 'Dutch', 'Nederlands', 'nl_NL', 'nl.png' ),
|
569 |
-
'gl' => array( 'Galician', 'Galego', 'gl_ES', 'galego.png' ),
|
570 |
-
'de' => array( 'German', 'Deutsch', 'de_DE', 'de.png' ),
|
571 |
-
'fi' => array( 'Finnish', 'Suomi', 'fi', 'fi.png' ),
|
572 |
-
'fr' => array( 'French', 'Français', 'fr_FR', 'fr.png' ),
|
573 |
-
'qc' => array( 'French (CA)', 'Français (CA)', 'fr_CA', 'fr_CA.png' ),
|
574 |
-
'he' => array( 'Hebrew', 'עברית', 'he_IL', 'il.png' ),
|
575 |
-
'hi' => array( 'Hindi', 'हिन्दी', 'hi_IN', 'in.png' ),
|
576 |
-
'hu' => array( 'Hungarian', 'Magyar', 'hu_HU', 'hu.png' ),
|
577 |
-
'it' => array( 'Italian', 'Italiano', 'it_IT', 'it.png' ),
|
578 |
-
'ja' => array( 'Japanese', '日本語', 'ja', 'jp.png' ),
|
579 |
-
'ko' => array( 'Korean', '한국어', 'ko_KR', 'kr.png' ),
|
580 |
-
'no' => array( 'Norwegian', 'Norsk', 'nb_NO', 'no.png' ),
|
581 |
-
'fa' => array( 'Persian', 'فارسی', 'fa_IR', 'ir.png' ),
|
582 |
-
'pl' => array( 'Polish', 'Polski', 'pl_PL', 'pl.png' ),
|
583 |
-
'pt' => array( 'Portuguese', 'Português', 'pt_PT', 'pt.png' ),
|
584 |
-
'br' => array( 'Portuguese (BR)', 'Português (BR)', 'pt_BR', 'br.png' ),
|
585 |
-
'ro' => array( 'Romanian', 'Română', 'ro_RO', 'ro.png' ),
|
586 |
-
'ru' => array( 'Russian', 'Русский', 'ru_RU', 'ru.png' ),
|
587 |
-
'es' => array( 'Spanish', 'Español', 'es_ES', 'es.png' ),
|
588 |
-
'mx' => array( 'Spanish (MX)', 'Español (MX)', 'es_MX', 'mx.png' ),
|
589 |
-
'sv' => array( 'Swedish', 'Svenska', 'sv_SE', 'se.png' ),
|
590 |
-
'tr' => array( 'Turkish', 'Türkçe', 'tr_TR', 'tr.png' ),
|
591 |
-
'uk' => array( 'Ukrainian', 'Українська', 'uk', 'ua.png' ),
|
592 |
-
'vi' => array( 'Vietnamese', 'Tiếng Việt', 'vi', 'vn.png' ),
|
593 |
-
'cy' => array( 'Welsh', 'Cymraeg', 'cy', 'cy.png' ),
|
594 |
-
);
|
595 |
-
|
596 |
-
foreach ( $language_table as $language => $data ) {
|
597 |
-
list(
|
598 |
-
$this->en_language_name[ $language ],
|
599 |
-
$this->language_name[ $language ],
|
600 |
-
$this->locale[ $language ],
|
601 |
-
$this->flag[ $language ]
|
602 |
-
) = $data;
|
603 |
-
}
|
604 |
-
|
605 |
-
}
|
606 |
-
|
607 |
-
/**
|
608 |
-
* Initialize the language table with the hard-coded names, locales and flags.
|
609 |
-
*
|
610 |
-
* @see _set_languages For the hard-coded table.
|
611 |
-
*/
|
612 |
-
protected function _init_language_table() {
|
613 |
-
|
614 |
-
update_option( $this->option_language_names, $this->language_name );
|
615 |
-
update_option( $this->option_en_language_names, $this->en_language_name );
|
616 |
-
update_option( $this->option_locale, $this->locale );
|
617 |
-
update_option( $this->option_flags, $this->flag );
|
618 |
-
|
619 |
-
}
|
620 |
-
|
621 |
-
/**
|
622 |
-
* Get options from DB and wp-config.php
|
623 |
-
* @return void
|
624 |
-
*/
|
625 |
-
protected function _get_options() {
|
626 |
-
|
627 |
-
/**
|
628 |
-
* For developers use only. Re-creates language table with no warning! Irreversible!
|
629 |
-
*
|
630 |
-
* @link wp-admin/?wpglobus-reset-language-table=1
|
631 |
-
*/
|
632 |
-
if ( ! defined( 'DOING_AJAX' ) && ! empty( $_GET['wpglobus-reset-language-table'] ) && is_admin() ) { // WPCS: input var ok, sanitization ok.
|
633 |
-
delete_option( $this->option_language_names );
|
634 |
-
}
|
635 |
-
|
636 |
-
|
637 |
-
$wpglobus_option = get_option( $this->option );
|
638 |
-
|
639 |
-
/**
|
640 |
-
* Get enabled languages and default language ( just one main language )
|
641 |
-
*/
|
642 |
-
if ( isset( $wpglobus_option['enabled_languages'] ) && ! empty( $wpglobus_option['enabled_languages'] ) ) {
|
643 |
-
$this->enabled_languages = array();
|
644 |
-
foreach ( $wpglobus_option['enabled_languages'] as $lang => $value ) {
|
645 |
-
if ( ! empty( $value ) ) {
|
646 |
-
$this->enabled_languages[] = $lang;
|
647 |
-
}
|
648 |
-
}
|
649 |
-
|
650 |
-
/**
|
651 |
-
* Set default language
|
652 |
-
*/
|
653 |
-
$this->default_language = $this->enabled_languages[0];
|
654 |
-
|
655 |
-
unset( $wpglobus_option['enabled_languages'] );
|
656 |
-
}
|
657 |
-
|
658 |
-
/**
|
659 |
-
* Set available languages for editors
|
660 |
-
*/
|
661 |
-
$this->open_languages = $this->enabled_languages;
|
662 |
-
|
663 |
-
/**
|
664 |
-
* Set flags URL
|
665 |
-
*/
|
666 |
-
$this->_set_flags_url();
|
667 |
-
|
668 |
-
/**
|
669 |
-
* Set flags PATH.
|
670 |
-
*/
|
671 |
-
$this->_set_flag_path();
|
672 |
-
|
673 |
-
/**
|
674 |
-
* Get languages name
|
675 |
-
* big array of used languages
|
676 |
-
*/
|
677 |
-
$this->language_name = get_option( $this->option_language_names );
|
678 |
-
|
679 |
-
if ( empty( $this->language_name ) ) {
|
680 |
-
|
681 |
-
$this->_set_languages();
|
682 |
-
$this->_init_language_table();
|
683 |
-
|
684 |
-
}
|
685 |
-
|
686 |
-
/**
|
687 |
-
* Get locales
|
688 |
-
*/
|
689 |
-
$this->locale = get_option( $this->option_locale );
|
690 |
-
if ( empty( $this->locale ) ) {
|
691 |
-
|
692 |
-
$this->_set_languages();
|
693 |
-
$this->_init_language_table();
|
694 |
-
|
695 |
-
}
|
696 |
-
|
697 |
-
/**
|
698 |
-
* Get enabled locales
|
699 |
-
*/
|
700 |
-
foreach ( $this->enabled_languages as $language ) {
|
701 |
-
$this->enabled_locale[] = $this->locale[ $language ];
|
702 |
-
}
|
703 |
-
|
704 |
-
/**
|
705 |
-
* Get en_language_name
|
706 |
-
*/
|
707 |
-
$this->en_language_name = get_option( $this->option_en_language_names );
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Get option 'show_flag_name'
|
711 |
-
*/
|
712 |
-
if ( isset( $wpglobus_option['show_flag_name'] ) ) {
|
713 |
-
$this->show_flag_name = $wpglobus_option['show_flag_name'];
|
714 |
-
unset( $wpglobus_option['show_flag_name'] );
|
715 |
-
}
|
716 |
-
if ( defined( 'WPGLOBUS_SHOW_FLAG_NAME' ) ) {
|
717 |
-
if ( 'name' === WPGLOBUS_SHOW_FLAG_NAME ) {
|
718 |
-
$this->show_flag_name = 'name';
|
719 |
-
} elseif ( false === WPGLOBUS_SHOW_FLAG_NAME || '' === WPGLOBUS_SHOW_FLAG_NAME ) {
|
720 |
-
$this->show_flag_name = '';
|
721 |
-
}
|
722 |
-
}
|
723 |
-
|
724 |
-
/**
|
725 |
-
* Get navigation menu slug for add flag in front-end 'use_nav_menu'.
|
726 |
-
*/
|
727 |
-
$this->nav_menu = '';
|
728 |
-
|
729 |
-
if ( isset( $wpglobus_option['use_nav_menu'] ) ) {
|
730 |
-
if ( '--none--' != $wpglobus_option['use_nav_menu'] ) {
|
731 |
-
$this->nav_menu = $wpglobus_option['use_nav_menu'];
|
732 |
-
}
|
733 |
-
unset( $wpglobus_option['use_nav_menu'] );
|
734 |
-
}
|
735 |
-
|
736 |
-
// This can be used in `wp-config` to override the options settings.
|
737 |
-
if ( defined( 'WPGLOBUS_USE_NAV_MENU' ) ) {
|
738 |
-
$this->nav_menu = WPGLOBUS_USE_NAV_MENU;
|
739 |
-
}
|
740 |
-
|
741 |
-
|
742 |
-
/**
|
743 |
-
* Get selector_wp_list_pages option
|
744 |
-
* @since 1.0.7
|
745 |
-
*/
|
746 |
-
if ( empty( $wpglobus_option['selector_wp_list_pages']['show_selector'] ) ||
|
747 |
-
(int) $wpglobus_option['selector_wp_list_pages']['show_selector'] === 0
|
748 |
-
) {
|
749 |
-
$this->selector_wp_list_pages = false;
|
750 |
-
}
|
751 |
-
if ( isset( $wpglobus_option['selector_wp_list_pages'] ) ) {
|
752 |
-
unset( $wpglobus_option['selector_wp_list_pages'] );
|
753 |
-
}
|
754 |
-
|
755 |
-
/**
|
756 |
-
* Get custom CSS
|
757 |
-
*/
|
758 |
-
if ( isset( $wpglobus_option['css_editor'] ) ) {
|
759 |
-
$this->css_editor = $wpglobus_option['css_editor'];
|
760 |
-
unset( $wpglobus_option['css_editor'] );
|
761 |
-
}
|
762 |
-
|
763 |
-
/**
|
764 |
-
* Get custom JS.
|
765 |
-
* @since 1.7.6
|
766 |
-
*/
|
767 |
-
if ( isset( $wpglobus_option['js_editor'] ) ) {
|
768 |
-
$this->js_editor = $wpglobus_option['js_editor'];
|
769 |
-
unset( $wpglobus_option['js_editor'] );
|
770 |
-
}
|
771 |
-
|
772 |
-
/**
|
773 |
-
* Old fashioned language switcher for Block Editor (Gutenberg).
|
774 |
-
* @since 2.2.3
|
775 |
-
*/
|
776 |
-
if ( isset( $wpglobus_option['block_editor_old_fashioned_language_switcher'] ) ) {
|
777 |
-
$this->block_editor_old_fashioned_language_switcher = $wpglobus_option['block_editor_old_fashioned_language_switcher'];
|
778 |
-
unset( $wpglobus_option['block_editor_old_fashioned_language_switcher'] );
|
779 |
-
}
|
780 |
-
|
781 |
-
/**
|
782 |
-
* Type of switcher button for WPGlobusSwitcherPlugin (Gutenberg).
|
783 |
-
* @since 2.2.14
|
784 |
-
*/
|
785 |
-
if ( isset( $wpglobus_option['block_editor_switcher_plugin_button_type'] ) ) {
|
786 |
-
$this->block_editor_switcher_plugin_button_type = $wpglobus_option['block_editor_switcher_plugin_button_type'];
|
787 |
-
unset( $wpglobus_option['block_editor_switcher_plugin_button_type'] );
|
788 |
-
}
|
789 |
-
|
790 |
-
/**
|
791 |
-
* Type of hreflang tag. Language- and region-specific hreflang.
|
792 |
-
* @since 2.3.4
|
793 |
-
*/
|
794 |
-
if ( isset( $wpglobus_option['seo_hreflang_type'] ) ) {
|
795 |
-
$this->seo_hreflang_type = $wpglobus_option['seo_hreflang_type'];
|
796 |
-
unset( $wpglobus_option['seo_hreflang_type'] );
|
797 |
-
}
|
798 |
-
|
799 |
-
/**
|
800 |
-
* Type of hreflang tag for default language. Language- and region-specific hreflang for default language.
|
801 |
-
* @since 2.3.4
|
802 |
-
*/
|
803 |
-
if ( isset( $wpglobus_option['seo_hreflang_default_language_type'] ) ) {
|
804 |
-
$this->seo_hreflang_default_language_type = $wpglobus_option['seo_hreflang_default_language_type'];
|
805 |
-
unset( $wpglobus_option['seo_hreflang_default_language_type'] );
|
806 |
-
}
|
807 |
-
|
808 |
-
/**
|
809 |
-
* Get flag files without path
|
810 |
-
*/
|
811 |
-
$option = get_option( $this->option_flags );
|
812 |
-
if ( ! empty( $option ) ) {
|
813 |
-
$this->flag = $option;
|
814 |
-
}
|
815 |
-
|
816 |
-
/**
|
817 |
-
* Get versioning info
|
818 |
-
*/
|
819 |
-
$option = get_option( self::$option_versioning );
|
820 |
-
if ( empty( $option ) ) {
|
821 |
-
$this->version = array();
|
822 |
-
} else {
|
823 |
-
$this->version = $option;
|
824 |
-
}
|
825 |
-
|
826 |
-
/**
|
827 |
-
* WPGlobus devmode.
|
828 |
-
*/
|
829 |
-
if ( isset( $_GET['wpglobus'] ) && 'off' === $_GET['wpglobus'] ) { // WPCS: input var ok, sanitization ok.
|
830 |
-
$this->toggle = 'off';
|
831 |
-
} else {
|
832 |
-
$this->toggle = 'on';
|
833 |
-
}
|
834 |
-
|
835 |
-
/**
|
836 |
-
* Need additional check for devmode (toggle=OFF)
|
837 |
-
* in case 'wpglobus' was not set to 'off' at /wp-admin/post.php
|
838 |
-
* and $_SERVER[QUERY_STRING] is empty at the time of `wp_insert_post_data` action
|
839 |
-
* @see WPGlobus::on_save_post_data
|
840 |
-
*/
|
841 |
-
if (
|
842 |
-
empty( $_SERVER['QUERY_STRING'] ) // WPCS: input var ok, sanitization ok.
|
843 |
-
&& isset( $_SERVER['HTTP_REFERER'] ) // WPCS: input var ok, sanitization ok.
|
844 |
-
&& WPGlobus_WP::is_pagenow( 'post.php' )
|
845 |
-
&& false !== strpos( $_SERVER['HTTP_REFERER'], 'wpglobus=off' ) // WPCS: input var ok, sanitization ok.
|
846 |
-
) {
|
847 |
-
$this->toggle = 'off';
|
848 |
-
}
|
849 |
-
|
850 |
-
if ( isset( $wpglobus_option['last_tab'] ) ) {
|
851 |
-
unset( $wpglobus_option['last_tab'] );
|
852 |
-
}
|
853 |
-
|
854 |
-
/**
|
855 |
-
* Builders.
|
856 |
-
* @since 1.9.17
|
857 |
-
*/
|
858 |
-
if ( isset( $wpglobus_option['builder_disabled'] ) && 1 === (int) $wpglobus_option['builder_disabled'] ) {
|
859 |
-
|
860 |
-
require_once dirname( __FILE__ ).'/builders/class-wpglobus-config-builder.php' ;
|
861 |
-
$this->builder = new WPGlobus_Config_Builder(false);
|
862 |
-
|
863 |
-
$this->builder_disabled = true;
|
864 |
-
unset( $wpglobus_option['builder_disabled'] );
|
865 |
-
|
866 |
-
} else {
|
867 |
-
|
868 |
-
$this->builder_disabled = false;
|
869 |
-
|
870 |
-
/**
|
871 |
-
* @since 2.2.11
|
872 |
-
*/
|
873 |
-
if ( empty( $wpglobus_option['builder_post_types'] ) ) {
|
874 |
-
$builder_post_types = array();
|
875 |
-
} else {
|
876 |
-
$builder_post_types = $wpglobus_option['builder_post_types'];
|
877 |
-
unset( $wpglobus_option['builder_post_types'] );
|
878 |
-
}
|
879 |
-
|
880 |
-
/**
|
881 |
-
* Init post types settings.
|
882 |
-
*
|
883 |
-
* @since 2.2.11
|
884 |
-
*/
|
885 |
-
$builder_default_post_types = array(
|
886 |
-
'post' => true,
|
887 |
-
'page' => true,
|
888 |
-
'attachment' => false
|
889 |
-
);
|
890 |
-
|
891 |
-
/** $wpglobus_option['post_type'] contains disabled post types. */
|
892 |
-
if ( empty( $wpglobus_option['post_type'] ) ) {
|
893 |
-
$post_types_disabled = array();
|
894 |
-
} else {
|
895 |
-
$post_types_disabled = array_intersect_key($builder_default_post_types, $wpglobus_option['post_type']);
|
896 |
-
}
|
897 |
-
|
898 |
-
if ( ! empty( $post_types_disabled ) ) {
|
899 |
-
foreach( $post_types_disabled as $_post_type=>$status ) {
|
900 |
-
if ( array_key_exists($_post_type, $builder_default_post_types) ) {
|
901 |
-
$builder_default_post_types[$_post_type] = false;
|
902 |
-
}
|
903 |
-
}
|
904 |
-
}
|
905 |
-
|
906 |
-
if ( empty($builder_post_types) ) {
|
907 |
-
$builder_post_types = $builder_default_post_types;
|
908 |
-
} else {
|
909 |
-
$builder_post_types = array_merge( $builder_default_post_types, $builder_post_types );
|
910 |
-
}
|
911 |
-
|
912 |
-
require_once dirname( __FILE__ ).'/builders/class-wpglobus-config-builder.php' ;
|
913 |
-
$this->builder = new WPGlobus_Config_Builder(
|
914 |
-
true,
|
915 |
-
array(
|
916 |
-
'default_language' => $this->default_language,
|
917 |
-
'post_types' => $builder_post_types,
|
918 |
-
'options' => array(
|
919 |
-
'register_post_types' => $this->option_register_post_types, // @since 2.2.24
|
920 |
-
)
|
921 |
-
)
|
922 |
-
);
|
923 |
-
|
924 |
-
if ( is_admin() ) {
|
925 |
-
|
926 |
-
require_once dirname( __FILE__ ) . '/class-wpglobus-config-vendor.php';
|
927 |
-
$config_vendor = WPGlobus_Config_Vendor::get_instance( $this->builder );
|
928 |
-
|
929 |
-
require_once dirname( __FILE__ ).'/admin/meta/class-wpglobus-meta.php' ;
|
930 |
-
WPGlobus_Meta::get_instance( $config_vendor::get_meta_fields(), $this->builder );
|
931 |
-
$this->meta = $config_vendor::get_meta_fields();
|
932 |
-
|
933 |
-
require_once dirname( __FILE__ ).'/wp_options/class-wpglobus-wp_options.php' ;
|
934 |
-
WPGlobus_WP_Options::get_instance( $config_vendor::get_wp_options() );
|
935 |
-
|
936 |
-
$this->builder->set_multilingual_fields($config_vendor::get_ml_fields());
|
937 |
-
}
|
938 |
-
}
|
939 |
-
|
940 |
-
/**
|
941 |
-
* @since 2.2.11
|
942 |
-
*/
|
943 |
-
if ( isset( $wpglobus_option['post_type'] ) ) {
|
944 |
-
unset( $wpglobus_option['post_type'] );
|
945 |
-
}
|
946 |
-
|
947 |
-
/**
|
948 |
-
* Remaining wpglobus options after unset() is extended options
|
949 |
-
* @since 1.2.3
|
950 |
-
*/
|
951 |
-
$this->extended_options = $wpglobus_option;
|
952 |
-
|
953 |
-
/**
|
954 |
-
* Option browser_redirect.
|
955 |
-
* @since 1.8.0
|
956 |
-
*/
|
957 |
-
if ( isset( $wpglobus_option['browser_redirect'] ) ) {
|
958 |
-
$this->browser_redirect = $wpglobus_option['browser_redirect'];
|
959 |
-
unset( $wpglobus_option['browser_redirect'] );
|
960 |
-
}
|
961 |
-
}
|
962 |
-
|
963 |
-
} //class
|
964 |
-
|
965 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-core.php
DELETED
@@ -1,338 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-core.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class WPGlobus_Core
|
10 |
-
*/
|
11 |
-
class WPGlobus_Core {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* The main filter function.
|
15 |
-
* Default behavior: extracts text in one language from multi-lingual strings.
|
16 |
-
*
|
17 |
-
* @param string $text Multilingual text, with special delimiters between languages
|
18 |
-
* @param string $language The code of the language to be extracted from the `$text`
|
19 |
-
* @param string $return What to do if the text in the `$language` was not found
|
20 |
-
* @param string $default_language Pass this if you want to return a non-default language content, when the content in `$language` is not available
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public static function text_filter(
|
25 |
-
$text = '',
|
26 |
-
$language = '',
|
27 |
-
$return = WPGlobus::RETURN_IN_DEFAULT_LANGUAGE,
|
28 |
-
$default_language = ''
|
29 |
-
) {
|
30 |
-
|
31 |
-
if ( empty( $text ) ) {
|
32 |
-
// Nothing to do
|
33 |
-
return $text;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* There are cases when numeric terms are passed here. We should not tamper with them.
|
38 |
-
* @since 1.0.8.1 Before, was returning empty string, which was incorrect.
|
39 |
-
*/
|
40 |
-
if ( ! is_string( $text ) ) {
|
41 |
-
return $text;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* `$default_language` not passed
|
46 |
-
*/
|
47 |
-
if ( ! $default_language ) {
|
48 |
-
if ( class_exists( 'WPGlobus_Config' ) ) {
|
49 |
-
$default_language = WPGlobus::Config()->default_language;
|
50 |
-
} else {
|
51 |
-
// When in unit tests
|
52 |
-
$default_language = 'en';
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* `$language` not passed
|
58 |
-
*/
|
59 |
-
if ( empty( $language ) ) {
|
60 |
-
$language = $default_language;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Fix for the case
|
65 |
-
* <!--:en-->ENG<!--:--><!--:ru-->RUS<!--:-->
|
66 |
-
* @todo need careful investigation
|
67 |
-
*/
|
68 |
-
$text = htmlspecialchars_decode( $text );
|
69 |
-
|
70 |
-
$possible_delimiters =
|
71 |
-
array(
|
72 |
-
/**
|
73 |
-
* Our delimiters
|
74 |
-
*/
|
75 |
-
array(
|
76 |
-
'start' => sprintf( WPGlobus::LOCALE_TAG_START, $language ),
|
77 |
-
'end' => WPGlobus::LOCALE_TAG_END,
|
78 |
-
),
|
79 |
-
/**
|
80 |
-
* qTranslate compatibility
|
81 |
-
* qTranslate uses these two types of delimiters
|
82 |
-
* @example
|
83 |
-
* <!--:en-->English<!--:--><!--:ru-->Russian<!--:-->
|
84 |
-
* [:en]English S[:ru]Russian S
|
85 |
-
* The [] delimiter does not have the closing tag, so we will look for the next opening [: or
|
86 |
-
* take the rest until end of end of the string
|
87 |
-
*/
|
88 |
-
array(
|
89 |
-
'start' => "<!--:{$language}-->",
|
90 |
-
'end' => '<!--:-->',
|
91 |
-
),
|
92 |
-
array(
|
93 |
-
'start' => "[:{$language}]",
|
94 |
-
'end' => '[:',
|
95 |
-
),
|
96 |
-
);
|
97 |
-
|
98 |
-
/**
|
99 |
-
* We'll use this flag after the loop to see if the loop was successful. See the `break` clause in the loop.
|
100 |
-
*/
|
101 |
-
$is_local_text_found = false;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* We do not know which delimiter was used, so we'll try both, in a loop
|
105 |
-
*/
|
106 |
-
/* @noinspection LoopWhichDoesNotLoopInspection */
|
107 |
-
foreach ( $possible_delimiters as $delimiters ) {
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Try the starting position. If not found, continue the loop to the next set of delimiters.
|
111 |
-
*/
|
112 |
-
$pos_start = strpos( $text, $delimiters['start'] );
|
113 |
-
if ( false === $pos_start ) {
|
114 |
-
continue;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* The starting position found..adjust the pointer to the text start
|
119 |
-
* (Do not need mb_strlen here, because we expect delimiters to be Latin only)
|
120 |
-
*/
|
121 |
-
$pos_start += strlen( $delimiters['start'] );
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Try to find the ending position.
|
125 |
-
* If could not find, will extract the text until end of string.
|
126 |
-
*/
|
127 |
-
$pos_end = strpos( $text, $delimiters['end'], $pos_start );
|
128 |
-
if ( false === $pos_end ) {
|
129 |
-
// - Until end of string
|
130 |
-
$text = substr( $text, $pos_start );
|
131 |
-
} else {
|
132 |
-
$text = substr( $text, $pos_start, $pos_end - $pos_start );
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Set the "found" flag and end the loop.
|
137 |
-
*/
|
138 |
-
$is_local_text_found = true;
|
139 |
-
break;
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* If we could not find anything in the current language...
|
145 |
-
*/
|
146 |
-
if ( ! $is_local_text_found ) {
|
147 |
-
if ( WPGlobus::RETURN_EMPTY === $return ) {
|
148 |
-
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIF
|
149 |
-
if ( $language === $default_language && ! self::has_translations( $text ) ) {
|
150 |
-
/**
|
151 |
-
* @todo Check the above condition. What if only one part is true?
|
152 |
-
* If text does not contain language delimiters nothing to do
|
153 |
-
*/
|
154 |
-
} else {
|
155 |
-
/** We are forced to return empty string. */
|
156 |
-
$text = '';
|
157 |
-
}
|
158 |
-
} else {
|
159 |
-
/**
|
160 |
-
* Try RETURN_IN_DEFAULT_LANGUAGE
|
161 |
-
*/
|
162 |
-
if ( $language === $default_language ) {
|
163 |
-
if ( self::has_translations( $text ) ) {
|
164 |
-
/**
|
165 |
-
* Rare case of text in default language doesn't exist
|
166 |
-
* @todo make option for return warning message or maybe another action
|
167 |
-
*/
|
168 |
-
$text = '';
|
169 |
-
}
|
170 |
-
} else {
|
171 |
-
/**
|
172 |
-
* Try the default language (recursion)
|
173 |
-
* @qa covered by the 'one_tag' case
|
174 |
-
* @see WPGlobus_QA::_test_string_parsing()
|
175 |
-
*/
|
176 |
-
$text = self::text_filter( $text, $default_language );
|
177 |
-
}
|
178 |
-
}
|
179 |
-
/** else - we do not change the input string, and it will be returned as-is */
|
180 |
-
}
|
181 |
-
|
182 |
-
return $text;
|
183 |
-
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Extract text from a string which is either:
|
188 |
-
* - in the requested language (could be multiple blocks)
|
189 |
-
* - or does not have the language marks
|
190 |
-
* @todo May fail on large texts because regex are used.
|
191 |
-
*
|
192 |
-
* @example
|
193 |
-
* Input:
|
194 |
-
* '{:en}first_EN{:}{:ru}first_RU{:} blah-blah {:en}second_EN{:}{:ru}second_RU{:}'
|
195 |
-
* Language: en
|
196 |
-
* Output:
|
197 |
-
* 'first_EN blah-blah second_EN'
|
198 |
-
*
|
199 |
-
* @param string $text Input text.
|
200 |
-
* @param string $language Language to extract. Default is the current language.
|
201 |
-
*
|
202 |
-
* @return string
|
203 |
-
* @since 1.7.9
|
204 |
-
* @since 2.2.12 Fixed regex to support line breaks in strings.
|
205 |
-
*/
|
206 |
-
public static function extract_text( $text = '', $language = '' ) {
|
207 |
-
if ( ! $text || ! is_string( $text ) ) {
|
208 |
-
return $text;
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* `$language` not passed
|
213 |
-
*/
|
214 |
-
if ( ! $language ) {
|
215 |
-
// When in unit tests.
|
216 |
-
$language = 'en';
|
217 |
-
// Normally.
|
218 |
-
if ( class_exists( 'WPGlobus_Config', false ) ) {
|
219 |
-
$language = WPGlobus::Config()->language;
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
// Pass 1. Remove the language marks surrounding the language we need.
|
224 |
-
// Pass 2. Remove the texts surrounded with other language marks, together with the marks.
|
225 |
-
return preg_replace(
|
226 |
-
array( '/{:' . $language . '}([\S\s]+?){:}/m', '/{:.+?}[\S\s]+?{:}/m' ),
|
227 |
-
array( '\\1', '' ),
|
228 |
-
$text
|
229 |
-
);
|
230 |
-
}
|
231 |
-
|
232 |
-
/**
|
233 |
-
* Check if string has language delimiters
|
234 |
-
*
|
235 |
-
* @param string $string
|
236 |
-
*
|
237 |
-
* @return bool
|
238 |
-
*/
|
239 |
-
public static function has_translations( $string ) {
|
240 |
-
|
241 |
-
/**
|
242 |
-
* This should detect majority of the strings with our delimiters without calling preg_match
|
243 |
-
* @var int $pos_start
|
244 |
-
*/
|
245 |
-
$pos_start = strpos( $string, WPGlobus::LOCALE_TAG_OPEN );
|
246 |
-
if ( false !== $pos_start ) {
|
247 |
-
if ( ctype_lower( $string[ $pos_start + 2 ] ) && ctype_lower( $string[ $pos_start + 3 ] ) ) {
|
248 |
-
return true;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* For compatibility, etc. - the universal procedure with regexp
|
254 |
-
*/
|
255 |
-
|
256 |
-
return (bool) preg_match( '/(\{:|\[:|<!--:)[a-z]{2}/', $string );
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Keeps only one language in all textual fields of the `$post` object.
|
261 |
-
*
|
262 |
-
* @see \WPGlobus_Core::text_filter for the parameters description
|
263 |
-
*
|
264 |
-
* @param WP_Post|mixed $post The Post object. Object always passed by reference.
|
265 |
-
* @param string $language
|
266 |
-
* @param string $return
|
267 |
-
* @param string $default_language
|
268 |
-
*/
|
269 |
-
public static function translate_wp_post(
|
270 |
-
&$post,
|
271 |
-
$language = '',
|
272 |
-
$return = WPGlobus::RETURN_IN_DEFAULT_LANGUAGE,
|
273 |
-
$default_language = ''
|
274 |
-
) {
|
275 |
-
|
276 |
-
/**
|
277 |
-
* `$default_language` not passed
|
278 |
-
*/
|
279 |
-
if ( ! $default_language ) {
|
280 |
-
if ( class_exists( 'WPGlobus_Config' ) ) {
|
281 |
-
$default_language = WPGlobus::Config()->default_language;
|
282 |
-
} else {
|
283 |
-
// When in unit tests
|
284 |
-
$default_language = 'en';
|
285 |
-
}
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* `$language` not passed
|
290 |
-
*/
|
291 |
-
if ( empty( $language ) ) {
|
292 |
-
$language = $default_language;
|
293 |
-
}
|
294 |
-
|
295 |
-
$fields = array(
|
296 |
-
'post_title',
|
297 |
-
'post_content',
|
298 |
-
'post_excerpt',
|
299 |
-
'title',
|
300 |
-
'attr_title',
|
301 |
-
);
|
302 |
-
|
303 |
-
foreach ( $fields as $field ) {
|
304 |
-
if ( ! empty( $post->$field ) ) {
|
305 |
-
$post->$field = self::text_filter( $post->$field, $language, $return, $default_language );
|
306 |
-
}
|
307 |
-
}
|
308 |
-
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Translate a term (category, post_tag, etc.)
|
313 |
-
* Term can be an object (default for the @see wp_get_object_terms() filter)
|
314 |
-
* or a string (for example, when wp_get_object_terms is called with the 'fields'=>'names' argument)
|
315 |
-
*
|
316 |
-
* @param string|object $term
|
317 |
-
* @param string $language
|
318 |
-
*/
|
319 |
-
public static function translate_term( &$term, $language = '' ) {
|
320 |
-
if ( is_object( $term ) ) {
|
321 |
-
if ( ! empty( $term->name ) ) {
|
322 |
-
$term->name = self::text_filter( $term->name, $language );
|
323 |
-
}
|
324 |
-
if ( ! empty( $term->description ) ) {
|
325 |
-
$term->description = self::text_filter( $term->description, $language );
|
326 |
-
}
|
327 |
-
} else {
|
328 |
-
if ( ! empty( $term ) ) {
|
329 |
-
$term = self::text_filter( $term, $language );
|
330 |
-
}
|
331 |
-
}
|
332 |
-
|
333 |
-
}
|
334 |
-
|
335 |
-
|
336 |
-
} // class
|
337 |
-
|
338 |
-
# --- EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-filters.php
DELETED
@@ -1,1257 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Filters and actions
|
4 |
-
* Only methods here. The add_filter calls are in the Controller
|
5 |
-
*
|
6 |
-
* @package WPGlobus
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Filters
|
11 |
-
*/
|
12 |
-
class WPGlobus_Filters {
|
13 |
-
|
14 |
-
/** @var string[] Meta keys where data can be multilingual */
|
15 |
-
protected static $multilingual_meta_keys = array();
|
16 |
-
|
17 |
-
/**
|
18 |
-
* This is the basic filter used to extract the text portion in the current language from a string.
|
19 |
-
* Applied to the main WP texts, such as post title, content and excerpt.
|
20 |
-
*
|
21 |
-
* @param string $text
|
22 |
-
*
|
23 |
-
* @return string
|
24 |
-
*/
|
25 |
-
public static function filter__text( $text ) {
|
26 |
-
|
27 |
-
return WPGlobus_Core::text_filter(
|
28 |
-
$text,
|
29 |
-
WPGlobus::Config()->language,
|
30 |
-
null,
|
31 |
-
WPGlobus::Config()->default_language
|
32 |
-
);
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* This filter is needed to display correctly the posts with the '--- MORE ---' separator
|
38 |
-
* in archives.
|
39 |
-
* Without it, the post content is truncated at the beginning of <!--more-->, thus keeping
|
40 |
-
* only the first language.
|
41 |
-
* *
|
42 |
-
* 'the_posts' filter is used by @see get_posts(), which is commonly used in all sorts of places,
|
43 |
-
* including, for instance, @see wp_get_associated_nav_menu_items while deleting a post.
|
44 |
-
* So, to minimize potential side effects, we limit the scope to main queries, or
|
45 |
-
* when the 'wpglobus_force_filter__the_posts' is set
|
46 |
-
* (@see WPGlobus_QA::_test_get_posts for example).
|
47 |
-
*
|
48 |
-
* @param array $posts
|
49 |
-
* @param WP_Query $query
|
50 |
-
*
|
51 |
-
* @return array
|
52 |
-
* @since 1.0.14
|
53 |
-
*/
|
54 |
-
public static function filter__the_posts( $posts, $query ) {
|
55 |
-
|
56 |
-
if ( $query->is_main_query() || $query->get( 'wpglobus_force_filter__the_posts' ) ) {
|
57 |
-
foreach ( $posts as $post ) {
|
58 |
-
WPGlobus_Core::translate_wp_post(
|
59 |
-
$post,
|
60 |
-
WPGlobus::Config()->language,
|
61 |
-
WPGlobus::RETURN_IN_DEFAULT_LANGUAGE
|
62 |
-
);
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
return $posts;
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* This is similar to the @see filter__text filter,
|
72 |
-
* but it returns text in the DEFAULT language.
|
73 |
-
*
|
74 |
-
* @param string $text
|
75 |
-
*
|
76 |
-
* @return string
|
77 |
-
* @since 1.0.8
|
78 |
-
*/
|
79 |
-
public static function filter__text_default_language( $text ) {
|
80 |
-
|
81 |
-
return WPGlobus_Core::text_filter(
|
82 |
-
$text,
|
83 |
-
WPGlobus::Config()->default_language,
|
84 |
-
null,
|
85 |
-
WPGlobus::Config()->default_language
|
86 |
-
);
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Filter @see get_terms
|
93 |
-
*
|
94 |
-
* @scope admin
|
95 |
-
* @scope front
|
96 |
-
*
|
97 |
-
* @param string[]|object[] $terms
|
98 |
-
*
|
99 |
-
* @return array
|
100 |
-
*/
|
101 |
-
public static function filter__get_terms( array $terms ) {
|
102 |
-
|
103 |
-
/**
|
104 |
-
* @todo Example of a "stopper" filter
|
105 |
-
* if ( apply_filters( 'wpglobus_do_filter__get_terms', true ) ) {}
|
106 |
-
* Because it might affect the performance, this is a to-do for now.
|
107 |
-
*/
|
108 |
-
|
109 |
-
foreach ( $terms as &$_term ) {
|
110 |
-
WPGlobus_Core::translate_term( $_term, WPGlobus::Config()->language );
|
111 |
-
}
|
112 |
-
unset( $_term );
|
113 |
-
|
114 |
-
reset( $terms );
|
115 |
-
|
116 |
-
return $terms;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Filter @see get_the_terms
|
121 |
-
*
|
122 |
-
* @scope admin
|
123 |
-
*
|
124 |
-
* @param stdClass[]|WP_Error $terms List of attached terms, or WP_Error on failure.
|
125 |
-
*
|
126 |
-
* @return array
|
127 |
-
*/
|
128 |
-
public static function filter__get_the_terms( $terms ) {
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @internal 15.01.31
|
132 |
-
* Theoretically, we should not have this filter because @see get_the_terms
|
133 |
-
* calls @see wp_get_object_terms, which is already filtered.
|
134 |
-
* However, there is a case when the terms are retrieved from @see get_object_term_cache,
|
135 |
-
* and when we do a Quick Edit / inline-save, we ourselves write raw terms to the cache.
|
136 |
-
* As of now, we know only one such case, so we activate this filter only in admin,
|
137 |
-
* and only on the 'single_row' call
|
138 |
-
* @todo Keep watching this
|
139 |
-
*/
|
140 |
-
|
141 |
-
if ( ! is_wp_error( $terms ) && WPGlobus_WP::is_function_in_backtrace( 'single_row' ) ) {
|
142 |
-
|
143 |
-
// Casting $terms to (array) causes syntax error in PHP 5.3 and older.
|
144 |
-
/* @noinspection ForeachSourceInspection */
|
145 |
-
foreach ( $terms as &$_term ) {
|
146 |
-
WPGlobus_Core::translate_term( $_term, WPGlobus::Config()->language );
|
147 |
-
}
|
148 |
-
unset( $_term );
|
149 |
-
|
150 |
-
reset( $terms );
|
151 |
-
}
|
152 |
-
|
153 |
-
return $terms;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Filter @see wp_get_object_terms()
|
158 |
-
*
|
159 |
-
* @scope admin
|
160 |
-
* @scope front
|
161 |
-
*
|
162 |
-
* @param string[]|stdClass[] $terms An array of terms for the given object or objects.
|
163 |
-
*
|
164 |
-
* @return array
|
165 |
-
*/
|
166 |
-
public static function filter__wp_get_object_terms( array $terms ) {
|
167 |
-
|
168 |
-
/**
|
169 |
-
* @internal
|
170 |
-
* Do not need to check for is_wp_error($terms),
|
171 |
-
* because the WP_Error is returned by wp_get_object_terms() before applying filter.
|
172 |
-
*/
|
173 |
-
|
174 |
-
if ( ! count( $terms ) ) {
|
175 |
-
return $terms;
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Don't filter term names when saving or publishing posts
|
180 |
-
*
|
181 |
-
* @todo Check this before add_filter and not here
|
182 |
-
* @todo Describe exactly how to check this visually, and is possible - write the acceptance test
|
183 |
-
*/
|
184 |
-
if (
|
185 |
-
is_admin() &&
|
186 |
-
WPGlobus_WP::is_pagenow( 'post.php' ) &&
|
187 |
-
( ! empty( $_POST['save'] ) || ! empty( $_POST['publish'] ) ) // phpcs:ignore WordPress.CSRF.NonceVerification
|
188 |
-
) {
|
189 |
-
return $terms;
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
* Don't filter term names for trash and un-trash single post
|
194 |
-
*
|
195 |
-
* @see we check post.php page instead of edit.php because redirect
|
196 |
-
*/
|
197 |
-
if ( is_admin() && WPGlobus_WP::is_pagenow( 'post.php' ) && isset( $_GET['action'] ) && ( 'trash' === $_GET['action'] || 'untrash' === $_GET['action'] ) // phpcs:ignore WordPress.CSRF.NonceVerification
|
198 |
-
) {
|
199 |
-
return $terms;
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Don't filter term names bulk trash and untrash posts
|
204 |
-
*/
|
205 |
-
if ( is_admin() && WPGlobus_WP::is_pagenow( 'edit.php' ) && isset( $_GET['action'] ) && ( 'trash' === $_GET['action'] || 'untrash' === $_GET['action'] ) // phpcs:ignore WordPress.CSRF.NonceVerification
|
206 |
-
) {
|
207 |
-
return $terms;
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Don't filter term names for bulk edit post from edit.php page
|
212 |
-
*/
|
213 |
-
if ( is_admin() && WPGlobus_WP::is_function_in_backtrace( 'bulk_edit_posts' ) ) {
|
214 |
-
return $terms;
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Don't filter term names for inline-save ajax action from edit.php page
|
219 |
-
*
|
220 |
-
* @see wp_ajax_inline_save
|
221 |
-
* ...except when the same AJAX refreshes the table row @see WP_Posts_List_Table::single_row
|
222 |
-
* -
|
223 |
-
* @qa At the "All posts" admin page, do Quick Edit on any post. After update, categories and tags
|
224 |
-
* must not show multilingual strings with delimiters.
|
225 |
-
* @qa At Quick Edit, enter an existing tag. After save, check if there is no additional tag
|
226 |
-
* on the "Tags" page. If a new tag is created then the "is tag exists" check was checking
|
227 |
-
* only a single language representation of the tag, while there is a multilingual tag in the DB.
|
228 |
-
*/
|
229 |
-
if ( WPGlobus_WP::is_http_post_action( 'inline-save' ) &&
|
230 |
-
WPGlobus_WP::is_pagenow( 'admin-ajax.php' )
|
231 |
-
) {
|
232 |
-
if ( ! WPGlobus_WP::is_function_in_backtrace( 'single_row' ) ) {
|
233 |
-
return $terms;
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Don't filter term names for heartbeat autosave
|
239 |
-
*/
|
240 |
-
if ( WPGlobus_WP::is_http_post_action( 'heartbeat' ) &&
|
241 |
-
WPGlobus_WP::is_pagenow( 'admin-ajax.php' ) &&
|
242 |
-
! empty( $_POST['data']['wp_autosave'] ) // phpcs:ignore WordPress.CSRF
|
243 |
-
) {
|
244 |
-
return $terms;
|
245 |
-
}
|
246 |
-
|
247 |
-
/**
|
248 |
-
* Don't filter term name at time generate checklist categories in metabox
|
249 |
-
*/
|
250 |
-
if (
|
251 |
-
empty( $_POST ) && // phpcs:ignore WordPress.CSRF
|
252 |
-
is_admin() &&
|
253 |
-
WPGlobus_WP::is_pagenow( 'post.php' ) &&
|
254 |
-
WPGlobus_WP::is_function_in_backtrace( 'wp_terms_checklist' )
|
255 |
-
) {
|
256 |
-
return $terms;
|
257 |
-
}
|
258 |
-
|
259 |
-
foreach ( $terms as &$_term ) {
|
260 |
-
WPGlobus_Core::translate_term( $_term, WPGlobus::Config()->language );
|
261 |
-
}
|
262 |
-
unset( $_term );
|
263 |
-
|
264 |
-
reset( $terms );
|
265 |
-
|
266 |
-
return $terms;
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* This filter is needed to build correct permalink (slug, post_name)
|
271 |
-
* using only the main part of the post title (in the default language).
|
272 |
-
* -
|
273 |
-
* Because 'sanitize_title' is a commonly used function, we have to apply our filter
|
274 |
-
* only on very specific calls. Therefore, there are (ugly) debug_backtrace checks.
|
275 |
-
* -
|
276 |
-
* Case 1
|
277 |
-
* When a draft post is created,
|
278 |
-
* the post title is converted to the slug in the @see get_sample_permalink function,
|
279 |
-
* using the 'sanitize_title' filter.
|
280 |
-
* -
|
281 |
-
* Case 2
|
282 |
-
* When the draft is published, @see wp_insert_post calls
|
283 |
-
*
|
284 |
-
* @see sanitize_title to set the slug
|
285 |
-
* -
|
286 |
-
* @see WPGLobus_QA::_test_post_name
|
287 |
-
* -
|
288 |
-
* @see WPSEO_Metabox::localize_script
|
289 |
-
* @todo Check what's going on in localize_script of WPSEO?
|
290 |
-
* @todo What if there is no EN language? Only ru and kz but - we cannot use 'en' for permalink
|
291 |
-
* @todo check guid
|
292 |
-
*
|
293 |
-
* @param string $title
|
294 |
-
*
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
public static function filter__sanitize_title( $title ) {
|
298 |
-
|
299 |
-
if (
|
300 |
-
WPGlobus_WP::is_filter_called_by( 'get_sample_permalink' ) ||
|
301 |
-
WPGlobus_WP::is_filter_called_by( 'wp_insert_post' ) ||
|
302 |
-
WPGlobus_WP::is_filter_called_by( 'wp_update_term' )
|
303 |
-
) {
|
304 |
-
/**
|
305 |
-
* @internal_note: the DEFAULT language, not the current one
|
306 |
-
*/
|
307 |
-
$title = WPGlobus_Core::text_filter(
|
308 |
-
$title, WPGlobus::Config()->default_language
|
309 |
-
);
|
310 |
-
}
|
311 |
-
|
312 |
-
return $title;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Filter @see get_term()
|
317 |
-
*
|
318 |
-
* @param string|object $term
|
319 |
-
*
|
320 |
-
* @return string|object
|
321 |
-
*/
|
322 |
-
public static function filter__get_term( $term ) {
|
323 |
-
|
324 |
-
if ( WPGlobus_WP::is_http_post_action( 'inline-save-tax' ) ) { // phpcs:ignore Generic
|
325 |
-
/**
|
326 |
-
* Don't filter ajax action 'inline-save-tax' from edit-tags.php page.
|
327 |
-
* See quick_edit() in includes/js/wpglobus.admin.js
|
328 |
-
* for and example of working with taxonomy name and description
|
329 |
-
* wp_current_filter contains
|
330 |
-
* 0=wp_ajax_inline-save-tax
|
331 |
-
* 1=get_term
|
332 |
-
*
|
333 |
-
* @see wp_ajax_inline_save_tax()
|
334 |
-
*/
|
335 |
-
// do nothing
|
336 |
-
} else {
|
337 |
-
WPGlobus_Core::translate_term( $term, WPGlobus::Config()->language );
|
338 |
-
}
|
339 |
-
|
340 |
-
return $term;
|
341 |
-
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Filter @see get_terms_to_edit()
|
346 |
-
*
|
347 |
-
* @since 1.6.4
|
348 |
-
*
|
349 |
-
* @param string
|
350 |
-
*
|
351 |
-
* @return string
|
352 |
-
*/
|
353 |
-
public static function filter__terms_to_edit( $terms_to_edit ) {
|
354 |
-
|
355 |
-
if ( ! WPGlobus_Core::has_translations( $terms_to_edit ) ) {
|
356 |
-
return $terms_to_edit;
|
357 |
-
}
|
358 |
-
|
359 |
-
$terms = explode( ',', $terms_to_edit );
|
360 |
-
|
361 |
-
foreach ( $terms as $k => $term ) {
|
362 |
-
$terms[ $k ] = WPGlobus_Core::text_filter( $term, WPGlobus::Config()->language );
|
363 |
-
}
|
364 |
-
|
365 |
-
return implode( ',', $terms );
|
366 |
-
}
|
367 |
-
|
368 |
-
/**
|
369 |
-
* Filter @see wp_insert_term().
|
370 |
-
*
|
371 |
-
* @since 1.6.6
|
372 |
-
*
|
373 |
-
* @param string $term The term to add or update.
|
374 |
-
* @param string $taxonomy Taxonomy slug.
|
375 |
-
*
|
376 |
-
* @return string
|
377 |
-
*/
|
378 |
-
public static function filter__pre_insert_term(
|
379 |
-
$term,
|
380 |
-
/** @noinspection PhpUnusedParameterInspection */
|
381 |
-
$taxonomy
|
382 |
-
) {
|
383 |
-
|
384 |
-
$multilingual_term = esc_sql( $term );
|
385 |
-
if ( WPGlobus::Config()->language !== WPGlobus::Config()->default_language ) {
|
386 |
-
$multilingual_term = WPGlobus_Utils::build_multilingual_string( array( WPGlobus::Config()->language => $term ) );
|
387 |
-
}
|
388 |
-
|
389 |
-
global $wpdb;
|
390 |
-
// phpcs:ignore WordPress.WP.PreparedSQL
|
391 |
-
$data = $wpdb->get_results( "SELECT * FROM $wpdb->terms AS terms WHERE terms.name LIKE '%{$multilingual_term}%'" );
|
392 |
-
|
393 |
-
if ( count( $data ) > 0 ) {
|
394 |
-
/**
|
395 |
-
* Return empty to prevent creating duplicate term.
|
396 |
-
*
|
397 |
-
* @see wp_insert_term() in wp-includes\taxonomy.php
|
398 |
-
*/
|
399 |
-
return '';
|
400 |
-
}
|
401 |
-
|
402 |
-
return $term;
|
403 |
-
}
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Localize home_url
|
407 |
-
* Should be processed on:
|
408 |
-
* - front
|
409 |
-
* - AJAX, except for several specific actions
|
410 |
-
*
|
411 |
-
* @param string $url
|
412 |
-
*
|
413 |
-
* @return string
|
414 |
-
*/
|
415 |
-
public static function filter__home_url( $url ) {
|
416 |
-
|
417 |
-
/**
|
418 |
-
* @internal note
|
419 |
-
* Example of URL in admin:
|
420 |
-
* When admin interface is not in default language, we still should not see
|
421 |
-
* any permalinks with language prefixes.
|
422 |
-
* For that, we could check if we are at the 'post.php' screen:
|
423 |
-
* if ( 'post.php' == $pagenow ) ....
|
424 |
-
* However, we do not need it, because we disallowed almost any processing in admin.
|
425 |
-
*/
|
426 |
-
|
427 |
-
/**
|
428 |
-
* 1. Do not work in admin
|
429 |
-
*/
|
430 |
-
$need_to_process = ( ! is_admin() );
|
431 |
-
|
432 |
-
if ( WPGlobus_WP::is_pagenow( 'admin-ajax.php' ) ) {
|
433 |
-
/**
|
434 |
-
* 2. But work in AJAX, which is also admin
|
435 |
-
*/
|
436 |
-
$need_to_process = true;
|
437 |
-
|
438 |
-
/**
|
439 |
-
* 3. However, don't convert url for these AJAX actions:
|
440 |
-
*/
|
441 |
-
if ( WPGlobus_WP::is_http_post_action(
|
442 |
-
array(
|
443 |
-
'heartbeat',
|
444 |
-
'sample-permalink',
|
445 |
-
'add-menu-item',
|
446 |
-
)
|
447 |
-
)
|
448 |
-
) {
|
449 |
-
$need_to_process = false;
|
450 |
-
}
|
451 |
-
}
|
452 |
-
|
453 |
-
if ( $need_to_process ) {
|
454 |
-
$url = WPGlobus_Utils::localize_url( $url );
|
455 |
-
}
|
456 |
-
|
457 |
-
return $url;
|
458 |
-
}
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Filter @see get_pages
|
462 |
-
*
|
463 |
-
* @qa See a list of available pages in the "Parent Page" metabox when editing a page.
|
464 |
-
*
|
465 |
-
* @param WP_Post[] $pages
|
466 |
-
*
|
467 |
-
* @return WP_Post[]
|
468 |
-
*/
|
469 |
-
public static function filter__get_pages( $pages ) {
|
470 |
-
|
471 |
-
foreach ( $pages as &$_page ) {
|
472 |
-
WPGlobus_Core::translate_wp_post( $_page, WPGlobus::Config()->language );
|
473 |
-
}
|
474 |
-
unset( $_page );
|
475 |
-
|
476 |
-
reset( $pages );
|
477 |
-
|
478 |
-
return $pages;
|
479 |
-
}
|
480 |
-
|
481 |
-
/**
|
482 |
-
* Filter for @see get_locale
|
483 |
-
*
|
484 |
-
* @param string $locale
|
485 |
-
*
|
486 |
-
* @return string
|
487 |
-
* @todo Do we need to do setlocale(LC_???, $locale)? (*** NOT HERE )
|
488 |
-
* @see setlocale
|
489 |
-
* @link http://php.net/manual/en/function.setlocale.php
|
490 |
-
* @example echo setlocale(LC_ALL, 'Russian'); => Russian_Russia.1251
|
491 |
-
*/
|
492 |
-
public static function filter__get_locale(
|
493 |
-
/** @noinspection PhpUnusedParameterInspection */
|
494 |
-
$locale
|
495 |
-
) {
|
496 |
-
|
497 |
-
/**
|
498 |
-
* @todo This caching breaks the admin language switcher.
|
499 |
-
*/
|
500 |
-
/* static $cached_locale = null;
|
501 |
-
if ( null !== $cached_locale ) {
|
502 |
-
return $cached_locale;
|
503 |
-
}*/
|
504 |
-
|
505 |
-
/**
|
506 |
-
* Special case: in admin area, show everything in the language of admin interface.
|
507 |
-
* (set in the General Settings in WP 4.1)
|
508 |
-
*/
|
509 |
-
/**
|
510 |
-
* @internal
|
511 |
-
* We need to exclude is_admin when it's a front-originated AJAX,
|
512 |
-
* so we are doing a "hack" checking @see WPGlobus_WP::is_admin_doing_ajax.
|
513 |
-
*/
|
514 |
-
if (
|
515 |
-
is_admin() &&
|
516 |
-
( ! WPGlobus_WP::is_doing_ajax() || WPGlobus_WP::is_admin_doing_ajax() )
|
517 |
-
&& apply_filters( 'wpglobus_use_admin_wplang', true )
|
518 |
-
) {
|
519 |
-
/**
|
520 |
-
* @todo is_multisite
|
521 |
-
* @todo Pre-WP4, WPLANG constant from wp-config
|
522 |
-
*/
|
523 |
-
$WPLANG = get_option( 'WPLANG' );
|
524 |
-
if ( empty( $WPLANG ) ) {
|
525 |
-
$WPLANG = 'en_US';
|
526 |
-
}
|
527 |
-
WPGlobus::Config()->set_language( $WPLANG );
|
528 |
-
|
529 |
-
}
|
530 |
-
|
531 |
-
if ( is_admin() ) {
|
532 |
-
/**
|
533 |
-
* Checking case for set locale which does not set in WPGlobus
|
534 |
-
*/
|
535 |
-
if ( WPGlobus::Config()->is_enabled_locale( $locale ) ) {
|
536 |
-
$locale = WPGlobus::Config()->locale[ WPGlobus::Config()->language ];
|
537 |
-
}
|
538 |
-
} else {
|
539 |
-
$locale = WPGlobus::Config()->locale[ WPGlobus::Config()->language ];
|
540 |
-
}
|
541 |
-
|
542 |
-
/* $cached_locale = $locale;*/
|
543 |
-
|
544 |
-
return $locale;
|
545 |
-
|
546 |
-
}
|
547 |
-
|
548 |
-
/**
|
549 |
-
* Filter @see wp_setup_nav_menu_item in wp-includes\nav-menu.php for more info
|
550 |
-
*
|
551 |
-
* @since 1.0.0
|
552 |
-
*
|
553 |
-
* @param WP_Post[] $object
|
554 |
-
*
|
555 |
-
* @return WP_Post[]
|
556 |
-
*/
|
557 |
-
public static function filter__nav_menu_item( $object ) {
|
558 |
-
/**
|
559 |
-
* This filter is used at nav-menus.php page for .field-move elements
|
560 |
-
*/
|
561 |
-
if ( is_object( $object ) && 'WP_Post' === get_class( $object ) ) {
|
562 |
-
|
563 |
-
if ( ! empty( $object->title ) ) {
|
564 |
-
$object->title = WPGlobus_Core::text_filter( $object->title, WPGlobus::Config()->language );
|
565 |
-
}
|
566 |
-
if ( ! empty( $object->description ) ) {
|
567 |
-
$object->description = WPGlobus_Core::text_filter( $object->description, WPGlobus::Config()->language );
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
return $object;
|
572 |
-
}
|
573 |
-
|
574 |
-
/**
|
575 |
-
* Filter @see nav_menu_description
|
576 |
-
*
|
577 |
-
* @since 1.0.0
|
578 |
-
*
|
579 |
-
* @param string $description
|
580 |
-
*
|
581 |
-
* @return string
|
582 |
-
*/
|
583 |
-
public static function filter__nav_menu_description( $description ) {
|
584 |
-
/**
|
585 |
-
* This filter for translate menu item description
|
586 |
-
*/
|
587 |
-
if ( ! empty( $description ) ) {
|
588 |
-
$description = WPGlobus_Core::text_filter( $description, WPGlobus::Config()->language );
|
589 |
-
}
|
590 |
-
|
591 |
-
return $description;
|
592 |
-
}
|
593 |
-
|
594 |
-
/**
|
595 |
-
* Filter @see heartbeat_received
|
596 |
-
*
|
597 |
-
* @since 1.0.1
|
598 |
-
*
|
599 |
-
* @param array $response
|
600 |
-
* @param array $data
|
601 |
-
* @param string $screen_id
|
602 |
-
*
|
603 |
-
* @return array
|
604 |
-
*/
|
605 |
-
public static function filter__heartbeat_received(
|
606 |
-
$response, $data,
|
607 |
-
/** @noinspection PhpUnusedParameterInspection */
|
608 |
-
$screen_id
|
609 |
-
) {
|
610 |
-
|
611 |
-
if ( false !== strpos( $_SERVER['HTTP_REFERER'], 'wpglobus=off' ) ) { // WPCS: input var ok, sanitization ok.
|
612 |
-
/**
|
613 |
-
* Check $_SERVER['HTTP_REFERER'] for wpglobus toggle is off because wpglobus-admin.js doesn't loaded in this mode
|
614 |
-
*/
|
615 |
-
return $response;
|
616 |
-
}
|
617 |
-
|
618 |
-
if ( ! empty( $data['wp_autosave'] ) ) {
|
619 |
-
|
620 |
-
if ( empty( $data['wp_autosave']['post_id'] ) || 0 === (int) $data['wp_autosave']['post_id'] ) {
|
621 |
-
/**
|
622 |
-
* wp_autosave may come from edit.php page
|
623 |
-
*/
|
624 |
-
return $response;
|
625 |
-
}
|
626 |
-
|
627 |
-
if ( empty( $data['wpglobus_heartbeat'] ) ) {
|
628 |
-
/**
|
629 |
-
* Check for wpglobus key
|
630 |
-
*/
|
631 |
-
return $response;
|
632 |
-
}
|
633 |
-
|
634 |
-
$title_wrap = false;
|
635 |
-
$content_wrap = false;
|
636 |
-
$post_title_ext = '';
|
637 |
-
$content_ext = '';
|
638 |
-
|
639 |
-
foreach ( WPGlobus::Config()->enabled_languages as $language ) {
|
640 |
-
if ( WPGlobus::Config()->default_language === $language ) {
|
641 |
-
|
642 |
-
$post_title_ext .= WPGlobus::add_locale_marks( $data['wp_autosave']['post_title'], $language );
|
643 |
-
$content_ext .= WPGlobus::add_locale_marks( $data['wp_autosave']['content'], $language );
|
644 |
-
|
645 |
-
} else {
|
646 |
-
|
647 |
-
if ( ! empty( $data['wp_autosave'][ 'post_title_' . $language ] ) ) {
|
648 |
-
$title_wrap = true;
|
649 |
-
|
650 |
-
$post_title_ext .= WPGlobus::add_locale_marks( $data['wp_autosave'][ 'post_title_' . $language ], $language );
|
651 |
-
}
|
652 |
-
|
653 |
-
if ( ! empty( $data['wp_autosave'][ 'content_' . $language ] ) ) {
|
654 |
-
$content_wrap = true;
|
655 |
-
|
656 |
-
$content_ext .= WPGlobus::add_locale_marks( $data['wp_autosave'][ 'content_' . $language ], $language );
|
657 |
-
}
|
658 |
-
}
|
659 |
-
}
|
660 |
-
|
661 |
-
if ( $title_wrap ) {
|
662 |
-
$data['wp_autosave']['post_title'] = $post_title_ext;
|
663 |
-
}
|
664 |
-
|
665 |
-
if ( $content_wrap ) {
|
666 |
-
$data['wp_autosave']['content'] = $content_ext;
|
667 |
-
}
|
668 |
-
|
669 |
-
/**
|
670 |
-
* Filter before autosave
|
671 |
-
*
|
672 |
-
* @since 1.0.2
|
673 |
-
*
|
674 |
-
* @param array $data ['wp_autosave'] Array of post data.
|
675 |
-
*/
|
676 |
-
$data['wp_autosave'] = apply_filters( 'wpglobus_autosave_post_data', $data['wp_autosave'] );
|
677 |
-
|
678 |
-
$saved = wp_autosave( $data['wp_autosave'] );
|
679 |
-
|
680 |
-
if ( is_wp_error( $saved ) ) {
|
681 |
-
$response['wp_autosave'] = array(
|
682 |
-
'success' => false,
|
683 |
-
'message' => $saved->get_error_message(),
|
684 |
-
);
|
685 |
-
} elseif ( empty( $saved ) ) {
|
686 |
-
$response['wp_autosave'] = array(
|
687 |
-
'success' => false,
|
688 |
-
'message' => __( 'Error while saving.' ),
|
689 |
-
);
|
690 |
-
} else {
|
691 |
-
$draft_saved_date_format = __( 'g:i:s a' );
|
692 |
-
$response['wp_autosave'] = array(
|
693 |
-
'success' => true,
|
694 |
-
'message' => sprintf(
|
695 |
-
__( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format )
|
696 |
-
),
|
697 |
-
);
|
698 |
-
}
|
699 |
-
}
|
700 |
-
|
701 |
-
return $response;
|
702 |
-
}
|
703 |
-
|
704 |
-
/**
|
705 |
-
* Filter @see wp_nav_menu_objects
|
706 |
-
*
|
707 |
-
* @since 1.0.2
|
708 |
-
*
|
709 |
-
* @param array $object
|
710 |
-
*
|
711 |
-
* @return array
|
712 |
-
*/
|
713 |
-
public static function filter__nav_menu_objects( $object ) {
|
714 |
-
|
715 |
-
if ( is_array( $object ) ) {
|
716 |
-
foreach ( $object as &$post ) {
|
717 |
-
if ( ! empty( $post->attr_title ) ) {
|
718 |
-
$post->attr_title = WPGlobus_Core::text_filter( $post->attr_title, WPGlobus::Config()->language );
|
719 |
-
}
|
720 |
-
}
|
721 |
-
}
|
722 |
-
|
723 |
-
return $object;
|
724 |
-
|
725 |
-
}
|
726 |
-
|
727 |
-
/**
|
728 |
-
* Translate widget strings (besides the title handled by the `widget_title` filter)
|
729 |
-
*
|
730 |
-
* @see WP_Widget::display_callback
|
731 |
-
* @scope front
|
732 |
-
*
|
733 |
-
* @param string[] $instance
|
734 |
-
*
|
735 |
-
* @return string[]
|
736 |
-
* @since 1.0.6
|
737 |
-
*/
|
738 |
-
public static function filter__widget_display_callback( $instance ) {
|
739 |
-
|
740 |
-
foreach ( $instance as &$widget_setting ) {
|
741 |
-
|
742 |
-
/** @noinspection ReferenceMismatchInspection */
|
743 |
-
if ( ! empty( $widget_setting ) && is_string( $widget_setting ) ) {
|
744 |
-
$widget_setting =
|
745 |
-
WPGlobus_Core::text_filter( $widget_setting, WPGlobus::Config()->language );
|
746 |
-
}
|
747 |
-
}
|
748 |
-
|
749 |
-
return $instance;
|
750 |
-
}
|
751 |
-
|
752 |
-
/**
|
753 |
-
* Filter @see comment_moderation_text,
|
754 |
-
*
|
755 |
-
* @see comment_moderation_subject
|
756 |
-
* @since 1.0.6
|
757 |
-
*
|
758 |
-
* @param string $text
|
759 |
-
* @param int $comment_id
|
760 |
-
*
|
761 |
-
* @return string
|
762 |
-
*/
|
763 |
-
public static function filter__comment_moderation( $text, $comment_id ) {
|
764 |
-
|
765 |
-
$comment = get_comment( $comment_id );
|
766 |
-
$post = get_post( $comment->comment_post_ID );
|
767 |
-
$title = WPGlobus_Core::text_filter( $post->post_title, WPGlobus::Config()->language );
|
768 |
-
|
769 |
-
return str_replace( $post->post_title, $title, $text );
|
770 |
-
|
771 |
-
}
|
772 |
-
|
773 |
-
/**
|
774 |
-
* Filter @see wp_trim_words
|
775 |
-
*
|
776 |
-
* @qa At the /wp-admin/index.php page is a Quick Draft metabox
|
777 |
-
* which shows 3 last post drafts. This filter lets post content in default language.
|
778 |
-
* @since 1.0.14
|
779 |
-
*
|
780 |
-
* @param string $text The trimmed text.
|
781 |
-
* @param int $num_words The number of words to trim the text to.
|
782 |
-
* @param string $more An optional string to append to the end of the trimmed text, e.g. ….
|
783 |
-
* @param string $original_text The text before it was trimmed.
|
784 |
-
*
|
785 |
-
* @return string
|
786 |
-
*/
|
787 |
-
public static function filter__wp_trim_words(
|
788 |
-
/** @noinspection PhpUnusedParameterInspection */
|
789 |
-
$text, $num_words, $more, $original_text
|
790 |
-
) {
|
791 |
-
|
792 |
-
// Method argument is ignored.
|
793 |
-
/* @noinspection SuspiciousAssignmentsInspection */
|
794 |
-
$text = WPGlobus_Core::text_filter( $original_text, WPGlobus::Config()->language );
|
795 |
-
|
796 |
-
if ( null === $more ) {
|
797 |
-
$more = __( '…' );
|
798 |
-
}
|
799 |
-
|
800 |
-
$text = wp_strip_all_tags( $text );
|
801 |
-
if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {//phpcs:ignore WordPress.PHP.StrictComparisons
|
802 |
-
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
803 |
-
preg_match_all( '/./u', $text, $words_array );
|
804 |
-
$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
|
805 |
-
$sep = '';
|
806 |
-
} else {
|
807 |
-
$words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
|
808 |
-
$sep = ' ';
|
809 |
-
}
|
810 |
-
if ( count( $words_array ) > $num_words ) {
|
811 |
-
array_pop( $words_array );
|
812 |
-
$text = implode( $sep, $words_array );
|
813 |
-
$text = $text . $more;
|
814 |
-
} else {
|
815 |
-
$text = implode( $sep, $words_array );
|
816 |
-
}
|
817 |
-
|
818 |
-
return $text;
|
819 |
-
|
820 |
-
}
|
821 |
-
|
822 |
-
/**
|
823 |
-
* Register the WPGlobus widgets
|
824 |
-
*
|
825 |
-
* @wp-hook widgets_init
|
826 |
-
* @since 1.0.7
|
827 |
-
*/
|
828 |
-
public static function register_widgets() {
|
829 |
-
register_widget( 'WPGlobusWidget' );
|
830 |
-
}
|
831 |
-
|
832 |
-
/**
|
833 |
-
* Do something on admin_init hook.
|
834 |
-
*
|
835 |
-
* @todo Note: runs on admin-ajax and admin-post, too
|
836 |
-
*/
|
837 |
-
public static function action__admin_init() {
|
838 |
-
/**
|
839 |
-
* Display blog name correctly on the WooThemes Helper page
|
840 |
-
* wp-admin/index.php?page=woothemes-helper
|
841 |
-
*/
|
842 |
-
if ( WPGlobus_WP::is_plugin_page( 'woothemes-helper' ) ) {
|
843 |
-
add_filter( 'option_blogname', array( 'WPGlobus_Filters', 'filter__text' ), 0 );
|
844 |
-
}
|
845 |
-
}
|
846 |
-
|
847 |
-
/**
|
848 |
-
* Specify meta keys where the meta data can be multilingual.
|
849 |
-
*
|
850 |
-
* @example
|
851 |
-
* <code>
|
852 |
-
* add_filter( 'wpglobus_multilingual_meta_keys',
|
853 |
-
* function ( $multilingual_meta_keys ) {
|
854 |
-
* $multilingual_meta_keys['slides'] = true;
|
855 |
-
* return $multilingual_meta_keys;
|
856 |
-
* }
|
857 |
-
* );
|
858 |
-
* </code>
|
859 |
-
* @since 1.2.1
|
860 |
-
*/
|
861 |
-
public static function set_multilingual_meta_keys() {
|
862 |
-
|
863 |
-
/**
|
864 |
-
* Add Alternative Text meta value for media.
|
865 |
-
* We need to use only one meta because Title, Caption and Description was stored in wp_posts table.
|
866 |
-
*
|
867 |
-
* @todo may be to use another class to store keys for $multilingual_meta_keys in future version.
|
868 |
-
*
|
869 |
-
* @since 1.9.11
|
870 |
-
*/
|
871 |
-
self::$multilingual_meta_keys['_wp_attachment_image_alt'] = true;
|
872 |
-
|
873 |
-
self::$multilingual_meta_keys = apply_filters(
|
874 |
-
'wpglobus_multilingual_meta_keys', self::$multilingual_meta_keys
|
875 |
-
);
|
876 |
-
}
|
877 |
-
|
878 |
-
/**
|
879 |
-
* Translate meta data
|
880 |
-
*
|
881 |
-
* @see \WPGlobus_Filters::set_multilingual_meta_keys
|
882 |
-
*
|
883 |
-
* @param string|array $value Null is passed. We set the value.
|
884 |
-
* @param int $object_id Post ID
|
885 |
-
* @param string $meta_key Passed by the filter. We need only one key.
|
886 |
-
* @param string|array $single Meta value, or an array of values.
|
887 |
-
*
|
888 |
-
* @return string|array
|
889 |
-
*/
|
890 |
-
public static function filter__postmeta( $value, $object_id, $meta_key, $single ) {
|
891 |
-
|
892 |
-
/**
|
893 |
-
* @todo Currently, only single values are supported
|
894 |
-
*/
|
895 |
-
if ( ! $single ) {
|
896 |
-
return $value;
|
897 |
-
}
|
898 |
-
|
899 |
-
/**
|
900 |
-
* Will process only if the `meta_key` is one of the explicitly set.
|
901 |
-
*/
|
902 |
-
if ( ! isset( self::$multilingual_meta_keys[ $meta_key ] ) ) {
|
903 |
-
return $value;
|
904 |
-
}
|
905 |
-
|
906 |
-
/**
|
907 |
-
* May be called many times on one page. Let's cache.
|
908 |
-
*/
|
909 |
-
static $_cache;
|
910 |
-
if ( isset( $_cache[ $meta_key ][ $object_id ] ) ) {
|
911 |
-
return $_cache[ $meta_key ][ $object_id ];
|
912 |
-
}
|
913 |
-
|
914 |
-
/** @global wpdb $wpdb */
|
915 |
-
global $wpdb;
|
916 |
-
$meta_value = $wpdb->get_var(
|
917 |
-
$wpdb->prepare(
|
918 |
-
"SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = %s AND post_id = %d LIMIT 1;",
|
919 |
-
$meta_key, $object_id
|
920 |
-
)
|
921 |
-
);
|
922 |
-
|
923 |
-
if ( $meta_value ) {
|
924 |
-
|
925 |
-
if ( is_serialized( $meta_value ) ) {
|
926 |
-
/**
|
927 |
-
* @todo Refactor this. Write a `filter__array` method.
|
928 |
-
*/
|
929 |
-
$_meta_array = unserialize( $meta_value ); //phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions
|
930 |
-
foreach ( $_meta_array as &$_value ) {
|
931 |
-
if ( is_array( $_value ) ) {
|
932 |
-
foreach ( $_value as &$_deep_value ) {
|
933 |
-
/**
|
934 |
-
* @todo Assuming that the array had max. two levels, which is wrong.
|
935 |
-
*/
|
936 |
-
$_deep_value = self::filter__text( $_deep_value );
|
937 |
-
}
|
938 |
-
unset( $_deep_value );
|
939 |
-
} else {
|
940 |
-
$_value = self::filter__text( $_value );
|
941 |
-
}
|
942 |
-
}
|
943 |
-
unset( $_value );
|
944 |
-
$value = $_meta_array;
|
945 |
-
|
946 |
-
/**
|
947 |
-
* If single is requested, the following code is executed by
|
948 |
-
*
|
949 |
-
* @see get_metadata
|
950 |
-
* <code>
|
951 |
-
* if ( $single && is_array( $check ) )
|
952 |
-
* return $check[0];
|
953 |
-
* </code>
|
954 |
-
* Therefore, we need to return the entire `$value` as the first element of
|
955 |
-
* an array.
|
956 |
-
*/
|
957 |
-
if ( $single ) {
|
958 |
-
$value = array( $value );
|
959 |
-
}
|
960 |
-
} else {
|
961 |
-
$value = self::filter__text( $meta_value );
|
962 |
-
}
|
963 |
-
}
|
964 |
-
|
965 |
-
/**
|
966 |
-
* Save to cache, even if we did not do anything
|
967 |
-
*/
|
968 |
-
$_cache[ $meta_key ][ $object_id ] = $value;
|
969 |
-
|
970 |
-
return $value;
|
971 |
-
}
|
972 |
-
|
973 |
-
/**
|
974 |
-
* Localize feed url
|
975 |
-
*
|
976 |
-
* @since 1.5.3
|
977 |
-
*
|
978 |
-
* @scope both (RSS are shown in admin dashboard "News" widgets).
|
979 |
-
*
|
980 |
-
* @param SimplePie $obj
|
981 |
-
*/
|
982 |
-
public static function fetch_feed_options( $obj ) {
|
983 |
-
|
984 |
-
$need_to_localize = true;
|
985 |
-
/**
|
986 |
-
* Filter to disable localize feed url.
|
987 |
-
*
|
988 |
-
* @since 1.5.3
|
989 |
-
*
|
990 |
-
* @param bool $need_to_localize True is value by default.
|
991 |
-
* @param SimplePie $obj The feed object.
|
992 |
-
*
|
993 |
-
* @return bool
|
994 |
-
*/
|
995 |
-
$need_to_localize = apply_filters( 'wpglobus_localize_feed_url', $need_to_localize, $obj );
|
996 |
-
|
997 |
-
if ( ! empty( $obj->feed_url ) && $need_to_localize ) {
|
998 |
-
$obj->feed_url = WPGlobus_Utils::localize_url( $obj->feed_url );
|
999 |
-
}
|
1000 |
-
|
1001 |
-
}
|
1002 |
-
|
1003 |
-
/**
|
1004 |
-
* Filter CSS rules for frontend.
|
1005 |
-
*
|
1006 |
-
* @since 1.6.6
|
1007 |
-
*
|
1008 |
-
* @scope front
|
1009 |
-
*
|
1010 |
-
* @param string $css
|
1011 |
-
* @param string $css_editor
|
1012 |
-
*
|
1013 |
-
* @return string
|
1014 |
-
*/
|
1015 |
-
public static function filter__front_styles( $css, $css_editor ) {
|
1016 |
-
if ( ! empty( $css_editor ) ) {
|
1017 |
-
$css .= strip_tags( $css_editor );
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
return $css;
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
/**
|
1024 |
-
* De-localize URL to the default language so that @see url_to_postid() can
|
1025 |
-
* determine the post ID.
|
1026 |
-
*
|
1027 |
-
* @since 1.8.4
|
1028 |
-
*
|
1029 |
-
* @param string $url The URL to derive the post ID from.
|
1030 |
-
*
|
1031 |
-
* @return string
|
1032 |
-
*/
|
1033 |
-
public static function filter__url_to_postid( $url ) {
|
1034 |
-
$url = WPGlobus_Utils::localize_url( $url, WPGlobus::Config()->default_language );
|
1035 |
-
|
1036 |
-
return $url;
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
/**
|
1040 |
-
* The post ID has been changed already by the @see filter__url_to_postid,
|
1041 |
-
* so we do not need to modify it here.
|
1042 |
-
* However, oembed does not know which language to use to fill in its $data
|
1043 |
-
* from the post.
|
1044 |
-
* Therefore, we use a workaround: extract the language from the URL and
|
1045 |
-
* store it in a special variable, to use later in
|
1046 |
-
*
|
1047 |
-
* @see filter__oembed_response_data.
|
1048 |
-
*
|
1049 |
-
* @since 1.8.4
|
1050 |
-
*
|
1051 |
-
* @param int $post_id The post ID.
|
1052 |
-
* @param string $url The requested URL.
|
1053 |
-
*
|
1054 |
-
* @return int The post ID, unchanged.
|
1055 |
-
*/
|
1056 |
-
public static function filter__oembed_request_post_id( $post_id, $url ) {
|
1057 |
-
$language = WPGlobus_Utils::extract_language_from_url( $url );
|
1058 |
-
if ( WPGlobus::Config()->default_language !== $language ) {
|
1059 |
-
WPGlobus::Config()->setLanguageForOembed( $language );
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
return $post_id;
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
/**
|
1066 |
-
* Filter the oembed data returned by the /wp-json/oembed/... calls.
|
1067 |
-
*
|
1068 |
-
* @param array $data The response data.
|
1069 |
-
*
|
1070 |
-
* @return array
|
1071 |
-
* @since 1.8.4
|
1072 |
-
*/
|
1073 |
-
public static function filter__oembed_response_data( $data ) {
|
1074 |
-
// If $language_for_oembed is empty, text_filter will use the default language.
|
1075 |
-
$language_for_oembed = WPGlobus::Config()->getAndResetLanguageForOembed();
|
1076 |
-
foreach ( array( 'author_name', 'title' ) as $field ) {
|
1077 |
-
if ( ! empty( $data[ $field ] ) ) {
|
1078 |
-
$data[ $field ] = WPGlobus_Core::text_filter( $data[ $field ], $language_for_oembed );
|
1079 |
-
}
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
return $data;
|
1083 |
-
}
|
1084 |
-
|
1085 |
-
/**
|
1086 |
-
* Filters the wp_mail() arguments.
|
1087 |
-
*
|
1088 |
-
* @see wp-includes\pluggable.php
|
1089 |
-
*
|
1090 |
-
* @param array $atts A compacted array of wp_mail() arguments.
|
1091 |
-
*
|
1092 |
-
* @return array
|
1093 |
-
* @since 1.9.5
|
1094 |
-
*/
|
1095 |
-
public static function filter__wp_mail( $atts ) {
|
1096 |
-
|
1097 |
-
/**
|
1098 |
-
* May be called many times. Let's cache.
|
1099 |
-
*/
|
1100 |
-
/*
|
1101 |
-
static $_cache;
|
1102 |
-
if ( isset( $_cache ) ) {
|
1103 |
-
return $_cache;
|
1104 |
-
} // */
|
1105 |
-
|
1106 |
-
/**
|
1107 |
-
* Array of enabled attributes to translate.
|
1108 |
-
* Full array is 'to', 'subject', 'message', 'headers', 'attachments';
|
1109 |
-
*/
|
1110 |
-
$keys = array( 'subject', 'message', 'headers' );
|
1111 |
-
|
1112 |
-
foreach ( $keys as $key ) :
|
1113 |
-
|
1114 |
-
if ( empty( $atts[ $key ] ) ) {
|
1115 |
-
continue;
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
if ( 'message' === $key ) {
|
1119 |
-
$atts[ $key ] = str_replace( "\n", '[[wpg-newline]]', $atts[ $key ] );
|
1120 |
-
}
|
1121 |
-
|
1122 |
-
$atts[ $key ] = WPGlobus_Core::extract_text( $atts[ $key ], WPGlobus::Config()->default_language );
|
1123 |
-
|
1124 |
-
if ( 'message' === $key ) {
|
1125 |
-
$atts[ $key ] = str_replace( '[[wpg-newline]]', "\n", $atts[ $key ] );
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
endforeach;
|
1129 |
-
|
1130 |
-
/**
|
1131 |
-
* Save to cache.
|
1132 |
-
*/
|
1133 |
-
// $_cache = $atts;
|
1134 |
-
|
1135 |
-
return $atts;
|
1136 |
-
}
|
1137 |
-
|
1138 |
-
/**
|
1139 |
-
* Filters oEmbed HTML.
|
1140 |
-
*
|
1141 |
-
* @param mixed $cache The cached HTML result, stored in post meta.
|
1142 |
-
* @param string $url The attempted embed URL.
|
1143 |
-
* @param array $attr An array of shortcode attributes.
|
1144 |
-
* @param int $post_ID Post ID.
|
1145 |
-
*
|
1146 |
-
* @return string
|
1147 |
-
* @since 1.9.8
|
1148 |
-
*/
|
1149 |
-
public static function filter__embed_oembed_html(
|
1150 |
-
$cache, $url,
|
1151 |
-
/** @noinspection PhpUnusedParameterInspection */
|
1152 |
-
$attr,
|
1153 |
-
/** @noinspection PhpUnusedParameterInspection */
|
1154 |
-
$post_ID
|
1155 |
-
) {
|
1156 |
-
|
1157 |
-
if ( ! is_string( $cache ) ) {
|
1158 |
-
/**
|
1159 |
-
* @since 1.9.8. We are working with string.
|
1160 |
-
*/
|
1161 |
-
return $cache;
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
$language = WPGlobus_Utils::extract_language_from_url( $url );
|
1165 |
-
|
1166 |
-
if ( empty( $language ) ) {
|
1167 |
-
/**
|
1168 |
-
* URL has no language code. So this is default language.
|
1169 |
-
*/
|
1170 |
-
return $cache;
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
$cache = str_replace( WPGlobus_Utils::localize_url( $url, WPGlobus::Config()->default_language ), $url, $cache );
|
1174 |
-
|
1175 |
-
return $cache;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
/**
|
1179 |
-
* Filters a 'wpseo_taxonomy_meta' option before its value is updated.
|
1180 |
-
*
|
1181 |
-
* @since 2.0
|
1182 |
-
*
|
1183 |
-
* @param mixed $new_value The new, unserialized option value.
|
1184 |
-
* @param mixed $old_value The old option value.
|
1185 |
-
* @param string $option Option name.
|
1186 |
-
*
|
1187 |
-
* @return mixed
|
1188 |
-
*/
|
1189 |
-
public static function filter__pre_update_wpseo_taxonomy_meta(
|
1190 |
-
$new_value,
|
1191 |
-
/** @noinspection PhpUnusedParameterInspection */
|
1192 |
-
$old_value,
|
1193 |
-
/** @noinspection PhpUnusedParameterInspection */
|
1194 |
-
$option
|
1195 |
-
) {
|
1196 |
-
|
1197 |
-
global $pagenow;
|
1198 |
-
|
1199 |
-
if ( 'edit-tags.php' === $pagenow && 'editedtag' === $_POST['action'] ) { // phpcs:ignore WordPress.CSRF.NonceVerification
|
1200 |
-
/**
|
1201 |
-
* Update button was clicked on term.php page.
|
1202 |
-
*/
|
1203 |
-
$current_language = WPGlobus::Config()->builder->get_language();
|
1204 |
-
$taxonomy = WPGlobus::Config()->builder->get( 'taxonomy' );
|
1205 |
-
$tag_ID = (int) $_POST['tag_ID'];
|
1206 |
-
|
1207 |
-
$_enabled_keys = array( 'wpseo_title', 'wpseo_desc', 'wpseo_focuskw' );
|
1208 |
-
|
1209 |
-
/**
|
1210 |
-
* Get option.
|
1211 |
-
*/
|
1212 |
-
global $wpdb;
|
1213 |
-
$query = "SELECT option_value FROM $wpdb->options WHERE option_name = 'wpseo_taxonomy_meta'";
|
1214 |
-
$result = $wpdb->get_col( $query ); // phpcs:ignore WordPress.WP.PreparedSQL
|
1215 |
-
|
1216 |
-
if ( ! empty($result[0]) ) {
|
1217 |
-
$option_values = maybe_unserialize( $result[0] );
|
1218 |
-
} else {
|
1219 |
-
$option_values = array();
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
foreach ( $_enabled_keys as $field ) {
|
1223 |
-
|
1224 |
-
$new = array();
|
1225 |
-
|
1226 |
-
foreach ( WPGlobus::Config()->enabled_languages as $lang ) :
|
1227 |
-
|
1228 |
-
if ( $lang === $current_language ) {
|
1229 |
-
|
1230 |
-
if ( empty( $new_value[ $taxonomy ][ $tag_ID ][ $field ] ) ) {//phpcs:ignore Generic.CodeAnalysis
|
1231 |
-
//$text = '';
|
1232 |
-
} else {
|
1233 |
-
$new[ $lang ] = $new_value[ $taxonomy ][ $tag_ID ][ $field ];
|
1234 |
-
}
|
1235 |
-
} else {
|
1236 |
-
|
1237 |
-
if ( ! empty( $option_values[ $taxonomy ][ $tag_ID ][ $field ] ) ) {
|
1238 |
-
|
1239 |
-
$_text = WPGlobus_Core::text_filter( $option_values[ $taxonomy ][ $tag_ID ][ $field ], $lang, WPGlobus::RETURN_EMPTY );
|
1240 |
-
if ( ! empty( $_text ) ) {
|
1241 |
-
$new[ $lang ] = $_text;
|
1242 |
-
}
|
1243 |
-
}
|
1244 |
-
}
|
1245 |
-
|
1246 |
-
endforeach;
|
1247 |
-
|
1248 |
-
$new_value[ $taxonomy ][ $tag_ID ][ $field ] = WPGlobus_Utils::build_multilingual_string( $new );
|
1249 |
-
|
1250 |
-
} // endforeach
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
return $new_value;
|
1254 |
-
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-plugin.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-plugin.php
|
4 |
-
*
|
5 |
-
* @package WPGlobus
|
6 |
-
* @since 1.6.1
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Plugin
|
11 |
-
*/
|
12 |
-
abstract class WPGlobus_Plugin {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* `__FILE__` from the loader.
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
public $plugin_file = '';
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Basename from `__FILE__`.
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
public $plugin_basename = '';
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Plugin directory URL. Initialized by the constructor.
|
30 |
-
*
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $plugin_dir_url = '';
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Parameter for the updater: slug of the product URL.
|
37 |
-
*
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
protected $product_slug = '';
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Parameter for the updater: product ID (name).
|
44 |
-
*
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
protected $product_id = '';
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Used in the `load_textdomain` call.
|
51 |
-
*
|
52 |
-
* @var string
|
53 |
-
*/
|
54 |
-
protected $textdomain = '';
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Constructor.
|
58 |
-
*
|
59 |
-
* @param string $the__file__ Pass `__FILE__` from the loader.
|
60 |
-
*/
|
61 |
-
public function __construct( $the__file__ ) {
|
62 |
-
$this->plugin_file = $the__file__;
|
63 |
-
$this->plugin_basename = plugin_basename( $this->plugin_file );
|
64 |
-
$this->plugin_dir_url = plugin_dir_url( $this->plugin_file );
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Setup updater.
|
69 |
-
* All parameters must be set by the child class' constructor.
|
70 |
-
*/
|
71 |
-
public function setup_updater() {
|
72 |
-
if ( $this->plugin_file && $this->product_id && $this->product_slug ) {
|
73 |
-
/* @noinspection PhpUndefinedClassInspection */
|
74 |
-
new TIVWP_Updater( array(
|
75 |
-
'plugin_file' => $this->plugin_file,
|
76 |
-
'product_id' => $this->product_id,
|
77 |
-
'url_product' => WPGlobus::URL_WPGLOBUS_SITE . 'product/' .
|
78 |
-
$this->product_slug . '/',
|
79 |
-
) );
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Load PO/MO.
|
85 |
-
* The parameter must be set by the child class' constructor.
|
86 |
-
*/
|
87 |
-
public function load_translations() {
|
88 |
-
if ( $this->textdomain ) {
|
89 |
-
load_plugin_textdomain( $this->textdomain, false,
|
90 |
-
dirname( $this->plugin_basename ) . '/languages'
|
91 |
-
);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
/* EOF */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-post-types.php
DELETED
@@ -1,133 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WPGlobus Post Types
|
4 |
-
*
|
5 |
-
* @package WPGlobus
|
6 |
-
* @since 1.9.10
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class WPGlobus_Post_Types
|
11 |
-
*/
|
12 |
-
class WPGlobus_Post_Types {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Names of the CPTs that should not be visible in the WPGlobus options panel.
|
16 |
-
*
|
17 |
-
* @var string[]
|
18 |
-
*/
|
19 |
-
protected static $hidden_types_main = array(
|
20 |
-
/**
|
21 |
-
* Built-in.
|
22 |
-
* @see create_initial_post_types() in wp-includes\post.php
|
23 |
-
*/
|
24 |
-
'attachment',
|
25 |
-
'revision',
|
26 |
-
'nav_menu_item',
|
27 |
-
'custom_css',
|
28 |
-
'customize_changeset',
|
29 |
-
'oembed_cache',
|
30 |
-
'user_request', // @since 1.9.17
|
31 |
-
// Custom types that do not need WPGlobus' tabbed interface or those that we cannot handle.
|
32 |
-
'scheduled-action',
|
33 |
-
'wp-types-group',
|
34 |
-
'wp-types-user-group',
|
35 |
-
'wp-types-term-group',
|
36 |
-
'wpcf7_contact_form',
|
37 |
-
'tablepress_table',
|
38 |
-
// ACF: free and pro.
|
39 |
-
'acf',
|
40 |
-
'acf-field',
|
41 |
-
'acf-field-group',
|
42 |
-
// Gutenberg: @since 1.9.17
|
43 |
-
'wp_block',
|
44 |
-
// Gutenberg: @since 2.2.20
|
45 |
-
'wp_template',
|
46 |
-
'wp_area',
|
47 |
-
// WPBakery PB: @since 1.9.17
|
48 |
-
'vc4_templates',
|
49 |
-
'vc_grid_item',
|
50 |
-
// Elementor: @since 2.2.7
|
51 |
-
'elementor_library',
|
52 |
-
// NextGEN Gallery: @since 2.2.29
|
53 |
-
'ngg_album',
|
54 |
-
'ngg_gallery',
|
55 |
-
'ngg_pictures',
|
56 |
-
'lightbox_library',
|
57 |
-
'displayed_gallery',
|
58 |
-
'display_type',
|
59 |
-
'gal_display_source',
|
60 |
-
// MC4WP: Mailchimp for WordPress(https://wordpress.org/plugins/mailchimp-for-wp/) : @since 2.2.32
|
61 |
-
'mc4wp-form',
|
62 |
-
// Pods: https://wordpress.org/plugins/pods/ @since 2.2.34
|
63 |
-
'_pods_template',
|
64 |
-
'_pods_pod',
|
65 |
-
'_pods_field',
|
66 |
-
// Elementor Pro: @since 2.3.1
|
67 |
-
'elementor_font',
|
68 |
-
'elementor_icons',
|
69 |
-
// WPForms Lite: https://wordpress.org/plugins/wpforms-lite/ @since 2.3.6
|
70 |
-
'wpforms',
|
71 |
-
'wpforms_log',
|
72 |
-
// rtMedia for WordPress, BuddyPress and bbPress: https://wordpress.org/plugins/buddypress-media/ @since 2.3.12
|
73 |
-
'rtmedia_album',
|
74 |
-
// Divi: https://www.elegantthemes.com/gallery/divi/ @since 2.3.12
|
75 |
-
'et_theme_builder',
|
76 |
-
'et_template',
|
77 |
-
'et_header_layout',
|
78 |
-
'et_body_layout',
|
79 |
-
'et_footer_layout',
|
80 |
-
);
|
81 |
-
|
82 |
-
/**
|
83 |
-
* WooCommerce types: we either force-enable them in WPG-WC or we do not need to handle them.
|
84 |
-
* Will hide them only if WooCommerce is active, to prevent potential conflict with other plugins
|
85 |
-
* that may use the same ("product") type(s).
|
86 |
-
*
|
87 |
-
* @var string[]
|
88 |
-
*/
|
89 |
-
protected static $hidden_types_wc = array(
|
90 |
-
'product',
|
91 |
-
'product_variation',
|
92 |
-
'shop_subscription',
|
93 |
-
'shop_coupon',
|
94 |
-
'shop_order',
|
95 |
-
'shop_order_refund',
|
96 |
-
);
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get hidden post types.
|
100 |
-
*
|
101 |
-
* @return string[]
|
102 |
-
*/
|
103 |
-
public static function hidden_types() {
|
104 |
-
|
105 |
-
/**
|
106 |
-
* @since 2.3.6
|
107 |
-
* @see https://themeforest.net/item/bodega-a-stylish-theme-for-small-businesses/10276763
|
108 |
-
*/
|
109 |
-
if ( defined('BODEGA_CORE_VERSION') ) {
|
110 |
-
self::$hidden_types_main[] = 'testimonials';
|
111 |
-
self::$hidden_types_main[] = 'slides';
|
112 |
-
self::$hidden_types_main[] = 'carousels';
|
113 |
-
}
|
114 |
-
|
115 |
-
$hidden_types = self::$hidden_types_main;
|
116 |
-
|
117 |
-
if ( class_exists( 'WooCommerce', false ) ) {
|
118 |
-
$hidden_types = array_merge( $hidden_types, self::$hidden_types_wc );
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Filter for hidden post types.
|
123 |
-
* @see filter `wpglobus_disabled_entities` in includes\class-wpglobus.php for admin.
|
124 |
-
*
|
125 |
-
* @since 2.3.2
|
126 |
-
*
|
127 |
-
* @param array $hidden_types Array of hidden types.
|
128 |
-
*/
|
129 |
-
$hidden_types = apply_filters( 'wpglobus_hidden_types', $hidden_types );
|
130 |
-
|
131 |
-
return $hidden_types;
|
132 |
-
}
|
133 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/includes/class-wpglobus-redirect.php
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package WPGlobus
|
4 |
-
* @since 1.8.0
|
5 |
-
*/
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class WPGlobus_Redirect
|
9 |
-
*/
|
10 |
-
class WPGlobus_Redirect {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Constructor.
|
14 |
-
*/
|
15 |
-
public static function construct() {
|
16 |
-
add_action( 'wp', array( __CLASS__, 'on__init' ), 1 );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Init action.
|
21 |
-
*/
|
22 |
-
public static function on__init() {
|
23 |
-
|
24 |
-
if ( empty( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) { // WPCS: input var ok, sanitization ok.
|
25 |
-
// No language information in browser.
|
26 |
-
return;
|
27 |
-
}
|
28 |
-
|
29 |
-
$cookie_name = WPGlobus::_COOKIE;
|
30 |
-
|
31 |
-
if ( ! isset( $_COOKIE[ $cookie_name ] ) ) { // WPCS: input var ok, sanitization ok.
|
32 |
-
/**
|
33 |
-
* First visit.
|
34 |
-
*/
|
35 |
-
$browser_language = substr( $_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2 ); // WPCS: input var ok, sanitization ok.
|
36 |
-
/* @noinspection SummerTimeUnsafeTimeManipulationInspection */
|
37 |
-
setcookie( $cookie_name, $browser_language, time() + 3600 * 24 * 365, '/' );
|
38 |
-
self::redirect( $browser_language );
|
39 |
-
|
40 |
-
return;
|
41 |
-
}
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Redirect to specified language.
|
47 |
-
*
|
48 |
-
* @param string $language
|
49 |
-
*/
|
50 |
-
public static function redirect( $language ) {
|
51 |
-
|
52 |
-
if ( $language === WPGlobus::Config()->language ) {
|
53 |
-
// Already in that language.
|
54 |
-
return;
|
55 |
-
}
|
56 |
-
|
57 |
-
if ( ! in_array( $language, WPGlobus::Config()->enabled_languages, true ) ) {
|
58 |
-
// No such language.
|
59 |
-
return;
|
60 |
-
}
|
61 |
-
|
62 |
-
// Convert the current URL to the requested language and redirect.
|
63 |
-
$current_url = WPGlobus_Utils::current_url();
|
64 |
-
$redirect_to = WPGlobus_Utils::localize_url( $current_url, $language );
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Filter the `$redirect_to` URL.
|
68 |
-
* Returning a false value cancels redirect.
|
69 |
-
*
|
70 |
-
* @param string $redirect_to URL redirect to.
|
71 |
-
* @param string $language Language redirect to.
|
72 |
-
*
|
73 |
-
* @return string|false
|
74 |
-
*/
|
75 |
-
$redirect_to = apply_filters( 'wpglobus_first_visit_redirect', $redirect_to, $language );
|
76 |
-
|
77 |
-
if ( ! $redirect_to ) {
|
78 |
-
return;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* @todo This is for the old versions of WPGlobus Plus that do not have the above filter.
|
83 |
-
*/
|
84 |
-
if ( class_exists( 'WPGlobusPlus_Publish' )
|
85 |
-
&& version_compare( WPGLOBUS_PLUS_VERSION, '1.1.31', '<' )
|
86 |
-
&& is_singular()
|
87 |
-
) {
|
88 |
-
$post_status = get_post_meta( get_the_ID(), WPGlobusPlus_Publish::LANGUAGE_POST_STATUS, true );
|
89 |
-
if ( isset( $post_status[ $langua
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|