├── languages ├── readme ├── bp-xprofile-custom-field-types.mo ├── bp-xprofile-custom-field-types-de_DE.mo ├── bp-xprofile-custom-field-types-fr_FR.mo └── bp-xprofile-custom-field-types-de_DE_formal.mo ├── assets ├── vendors │ ├── jscolor │ │ ├── hs.png │ │ ├── hv.png │ │ ├── arrow.gif │ │ └── cross.gif │ ├── select2 │ │ └── i18n │ │ │ ├── zh-TW.js │ │ │ ├── zh-CN.js │ │ │ ├── ja.js │ │ │ ├── az.js │ │ │ ├── ko.js │ │ │ ├── vi.js │ │ │ ├── tk.js │ │ │ ├── tr.js │ │ │ ├── id.js │ │ │ ├── th.js │ │ │ ├── ar.js │ │ │ ├── km.js │ │ │ ├── nb.js │ │ │ ├── sv.js │ │ │ ├── is.js │ │ │ ├── fi.js │ │ │ ├── et.js │ │ │ ├── ms.js │ │ │ ├── hu.js │ │ │ ├── ka.js │ │ │ ├── bg.js │ │ │ ├── da.js │ │ │ ├── hy.js │ │ │ ├── fa.js │ │ │ ├── en.js │ │ │ ├── he.js │ │ │ ├── hi.js │ │ │ ├── hr.js │ │ │ ├── af.js │ │ │ ├── de.js │ │ │ ├── eu.js │ │ │ ├── pt-BR.js │ │ │ ├── mk.js │ │ │ ├── pt.js │ │ │ ├── lv.js │ │ │ ├── bn.js │ │ │ ├── sq.js │ │ │ ├── ca.js │ │ │ ├── it.js │ │ │ ├── ps.js │ │ │ ├── nl.js │ │ │ ├── fr.js │ │ │ ├── ne.js │ │ │ ├── sl.js │ │ │ ├── es.js │ │ │ ├── gl.js │ │ │ ├── ro.js │ │ │ ├── lt.js │ │ │ ├── pl.js │ │ │ ├── el.js │ │ │ ├── bs.js │ │ │ ├── sr.js │ │ │ ├── uk.js │ │ │ ├── sr-Cyrl.js │ │ │ ├── ru.js │ │ │ ├── dsb.js │ │ │ ├── hsb.js │ │ │ ├── cs.js │ │ │ └── sk.js │ └── modernizr.js ├── css │ └── bp-xprofile-custom-field-types.css └── js │ ├── bp-xprofile-custom-field-types.js │ └── bp-xprofile-custom-field-types-admin.js ├── src ├── contracts │ ├── interface-field-type-selectable.php │ ├── interface-field-type-multi-valued.php │ └── inteface-field-type-multi-selectable.php ├── field-types │ ├── class-field-type-oembed.php │ ├── class-field-type-color.php │ ├── class-field-type-web.php │ ├── class-field-type-email.php │ ├── class-field-type-datepicker.php │ ├── class-field-type-token.php │ ├── class-field-type-number-min-max.php │ ├── class-field-type-slider.php │ ├── class-field-type-decimal-number.php │ ├── class-field-type-image.php │ ├── class-field-type-file.php │ ├── class-field-type-checkbox-acceptance.php │ ├── class-field-type-tags.php │ ├── class-field-type-select-post-type.php │ ├── class-field-type-select-taxonomy.php │ └── class-field-type-multi-select-post-type.php ├── core │ ├── class-data-store.php │ └── bp-xprofile-custom-field-types-functions.php ├── admin │ └── class-admin.php ├── filters │ ├── class-xprofile-kses-filter.php │ └── class-bp-profile-search-helper.php ├── handlers │ ├── class-label-filter.php │ ├── class-taxonomy-terms-creator.php │ ├── class-birthdate-field-validator.php │ ├── class-field-settings-handler.php │ ├── class-from-to-helper.php │ ├── class-tags-creator.php │ └── class-signup-validator.php └── bootstrap │ ├── class-bootstrapper.php │ ├── class-autoloader.php │ └── class-assets-loader.php └── bp-xprofile-custom-field-types.php /languages/readme: -------------------------------------------------------------------------------- 1 | Credits: 2 | German Translation:- Thorsten Wollenhöfer 3 | -------------------------------------------------------------------------------- /assets/vendors/jscolor/hs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/assets/vendors/jscolor/hs.png -------------------------------------------------------------------------------- /assets/vendors/jscolor/hv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/assets/vendors/jscolor/hv.png -------------------------------------------------------------------------------- /assets/vendors/jscolor/arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/assets/vendors/jscolor/arrow.gif -------------------------------------------------------------------------------- /assets/vendors/jscolor/cross.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/assets/vendors/jscolor/cross.gif -------------------------------------------------------------------------------- /languages/bp-xprofile-custom-field-types.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/languages/bp-xprofile-custom-field-types.mo -------------------------------------------------------------------------------- /languages/bp-xprofile-custom-field-types-de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/languages/bp-xprofile-custom-field-types-de_DE.mo -------------------------------------------------------------------------------- /languages/bp-xprofile-custom-field-types-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/languages/bp-xprofile-custom-field-types-fr_FR.mo -------------------------------------------------------------------------------- /languages/bp-xprofile-custom-field-types-de_DE_formal.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/buddydev/bp-xprofile-custom-field-types/HEAD/languages/bp-xprofile-custom-field-types-de_DE_formal.mo -------------------------------------------------------------------------------- /assets/css/bp-xprofile-custom-field-types.css: -------------------------------------------------------------------------------- 1 | .standard-form input[type="color"] { 2 | width: auto !important; /*override the 100% specified by BuddyPress*/ 3 | } 4 | 5 | .field_type_image .bpxcftr-image { 6 | max-width: 100%; 7 | } 8 | 9 | /** 10 | * From to value field 11 | **/ 12 | .bpxcftr-from-to-edit-field input[type="text"] { 13 | width: 10em !important; 14 | display: inline; 15 | } 16 | 17 | .bpxcftr-from-to-edit-field-integer input[type="text"], 18 | .bpxcftr-from-to-edit-field-numeric input[type="text"] { 19 | width: 4em !important; 20 | } 21 | -------------------------------------------------------------------------------- /src/contracts/interface-field-type-selectable.php: -------------------------------------------------------------------------------- 1 | 1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ka.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/bg.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/hy.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها میتوانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/af.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/bn.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/sq.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ps.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ne.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/sl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/bs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/dsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/hsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /assets/js/bp-xprofile-custom-field-types.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 'use strict'; 3 | // colors 4 | if (!Modernizr.inputtypes.color) { 5 | // No html5 field colorpicker => Calling jscolor. 6 | $('.bpxcftr-color').addClass('color'); 7 | } 8 | 9 | $('#profile-edit-form').attr('enctype', 'multipart/form-data'); 10 | $('#signup-form').attr('enctype', 'multipart/form-data'); 11 | $('#your-profile').attr('enctype', 'multipart/form-data'); 12 | 13 | // Slider. 14 | $('input.bpxcftr-slider').on('input', function () { 15 | $('#output-' + $(this).attr('id')).html($(this).val()); 16 | }); 17 | 18 | $('.bpxcftr-remove-tag').on('click', function () { 19 | 20 | var $this = $(this); 21 | 22 | $.post( 23 | ajaxurl, 24 | { 25 | action: 'bpxcftr_remove_user_tag', 26 | nonce: $this.data('nonce'), 27 | field_id: $this.data('fieldId'), 28 | tag: $this.data('tag') 29 | }, 30 | function (resp) { 31 | if (resp.success) { 32 | $this.remove(); 33 | } 34 | } 35 | ); 36 | 37 | }); 38 | 39 | })(jQuery); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /assets/vendors/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.12 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /src/field-types/class-field-type-oembed.php: -------------------------------------------------------------------------------- 1 | name = _x( 'oEmbed URL', 'xprofile field type', 'bp-xprofile-custom-field-types' ); 27 | $this->category = _x( 'Custom Fields', 'xprofile field type category', 'bp-xprofile-custom-field-types' ); 28 | } 29 | 30 | /** 31 | * Formats URL values for display. 32 | * 33 | * @param string $field_value The URL value, as saved in the database. 34 | * @param string|int $field_id Optional. ID of the field. 35 | * 36 | * @return string URL converted to oembed content. 37 | */ 38 | public static function display_filter( $field_value, $field_id = '' ) { 39 | // Can not cache oEmbed response currently. We will need either data id or user id to allow us caching. 40 | if ( ! empty( $field_value ) ) { 41 | return wp_oembed_get( $field_value ); 42 | } 43 | 44 | return $field_value; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/core/class-data-store.php: -------------------------------------------------------------------------------- 1 | data[ $name ] ) ? $this->data[ $name ] : null; 39 | } 40 | 41 | /** 42 | * Checks if a property is set. 43 | * 44 | * @param string $name property name. 45 | * 46 | * @return bool 47 | */ 48 | public function __isset( $name ) { 49 | return isset( $this->data[ $name ] ); 50 | } 51 | 52 | /** 53 | * Sets a property. 54 | * 55 | * @param string $name property name. 56 | * @param mixed $value value. 57 | */ 58 | public function __set( $name, $value ) { 59 | $this->data[ $name ] = $value; 60 | } 61 | 62 | /** 63 | * Unsets a property. 64 | * 65 | * @param string $name property name. 66 | */ 67 | public function __unset( $name ) { 68 | unset( $this->data[ $name ] ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/admin/class-admin.php: -------------------------------------------------------------------------------- 1 | setup(); 29 | } 30 | 31 | /** 32 | * Binds hooks 33 | */ 34 | private function setup() { 35 | // called after pp_loaded. 36 | add_action( 'admin_init', array( $this, 'init' ) ); 37 | add_action( 'admin_notices', array( $this, 'notices' ) ); 38 | } 39 | 40 | /** 41 | * Initializes. 42 | */ 43 | public function init() { 44 | 45 | if ( ! bp_is_active( 'xprofile' ) ) { 46 | $notices = (array) get_option( 'bpxcftr_notices', array() ); 47 | 48 | $notices[] = __( 'BuddyPress Xprofile Custom Field Types plugin needs Buddypress Xprofile Component. Please enable Xprofile first.', 'buddypress-xprofile-custom-fields-types' ); 49 | update_option( 'bpxcftr_notices', $notices ); 50 | } 51 | } 52 | 53 | /** 54 | * Shows notices. 55 | */ 56 | public function notices() { 57 | $notices = get_option( 'bpxcftr_notices' ); 58 | 59 | if ( $notices ) { 60 | foreach ( $notices as $notice ) { 61 | $notice = wp_kses_data( $notice ); 62 | $notice = wpautop( $notice ); 63 | 64 | echo "
82 | 83 |
84 | 85 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Users->Profile Fields 101 | * 102 | * @param array $raw_properties atts. 103 | */ 104 | public function admin_field_html( array $raw_properties = array() ) { 105 | 106 | $html = $this->get_edit_field_html_elements( 107 | array_merge( 108 | array( 'type' => 'file' ), 109 | $raw_properties 110 | ) 111 | ); 112 | ?> 113 | /> 114 | Users->Profile Fields->New|Edit entry. 119 | * 120 | * @param \BP_XProfile_Field $current_field object. 121 | * @param string $control_type type. 122 | */ 123 | public function admin_new_field_html( \BP_XProfile_Field $current_field, $control_type = '' ) { 124 | } 125 | 126 | /** 127 | * Formats value for display. 128 | * 129 | * @param string $field_value Original value of field. 130 | * @param int $field_id Id of field. 131 | * 132 | * @return string Value formatted 133 | */ 134 | public static function display_filter( $field_value, $field_id = 0 ) { 135 | 136 | if ( empty( $field_value ) ) { 137 | return ''; 138 | } 139 | 140 | $field_value = trim( $field_value, '/\\' );// no absolute path or dir please. 141 | // the BP Xprofile Custom Fields type stored /path which was a bad decision 142 | // we are using the above line for back compatibility with them. 143 | $uploads = wp_upload_dir(); 144 | 145 | $new_field_value = trailingslashit( $uploads['baseurl'] ) . $field_value; 146 | 147 | $new_field_value = sprintf( '84 | 85 |
86 | 87 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | get_edit_field_html_elements( 109 | array_merge( 110 | array( 'type' => 'file' ), 111 | $raw_properties 112 | ) 113 | ); 114 | ?> 115 | 116 | /> 117 | 118 | Users->Profile Fields->New|Edit entry. 123 | * 124 | * @param \BP_XProfile_Field $current_field object. 125 | * @param string $control_type type. 126 | */ 127 | public function admin_new_field_html( \BP_XProfile_Field $current_field, $control_type = '' ) { 128 | } 129 | 130 | /** 131 | * Formats value for display. 132 | * 133 | * @param string $field_value Original value of field. 134 | * @param int $field_id field id. 135 | * 136 | * @return string Value formatted 137 | */ 138 | public static function display_filter( $field_value, $field_id = 0 ) { 139 | 140 | if ( empty( $field_value ) ) { 141 | return ''; 142 | } 143 | 144 | $field_value = trim( $field_value, '/\\' );// no absolute path or dir please. 145 | // the BP Xprofile Custom Fields type stored '/path' which was a bad decision 146 | // we are using the above line for back compatibility with them. 147 | $uploads = wp_upload_dir(); 148 | 149 | $new_field_value = trailingslashit( $uploads['baseurl'] ) . $field_value; 150 | $new_field_value = apply_filters( 'bpxcftr_file_type_field_data', $new_field_value, $field_id ); 151 | 152 | $new_field_value = sprintf( '%s', esc_url( $new_field_value ), __( 'Download file', 'bp-xprofile-custom-field-types' ) ); 153 | 154 | return apply_filters( 'bpxcftr_file_display_data', $new_field_value, $field_id ); 155 | } 156 | 157 | /** 158 | * Overrides parent's implementation to avoid required attribute on input elements. 159 | * 160 | * @see \BP_XProfile_Field_Type::get_edit_field_html_elements() 161 | * 162 | * Get a sanitised and escaped string of the edit field's HTML elements and attributes. 163 | * 164 | * Must be used inside the {@link bp_profile_fields()} template loop. 165 | * This method was intended to be static but couldn't be because php.net/lsb/ requires PHP >= 5.3. 166 | * 167 | * @param array $properties Optional key/value array of attributes for this edit field. 168 | * @return string 169 | */ 170 | protected function get_edit_field_html_elements( array $properties = array() ) { 171 | 172 | $required = isset( $properties['required'] ) ? true : false; 173 | unset( $properties['required'] ); 174 | $r = bp_parse_args( 175 | $properties, 176 | array( 177 | 'id' => bp_get_the_profile_field_input_name(), 178 | 'name' => bp_get_the_profile_field_input_name(), 179 | ) 180 | ); 181 | 182 | if ( $required ) { 183 | $r['aria-required'] = 'true'; 184 | 185 | // Moderators can bypass field requirements. 186 | if ( ! bp_current_user_can( 'bp_moderate' ) ) { 187 | $r[] = 'required'; 188 | } 189 | } 190 | 191 | /** 192 | * Filters the edit html elements and attributes. 193 | * 194 | * @param array $r Array of parsed arguments. 195 | * @param string $value Class name for the current class instance. 196 | */ 197 | $r = (array) apply_filters( 'bp_xprofile_field_edit_html_elements', $r, get_class( $this ) ); 198 | 199 | return bp_get_form_field_attributes( sanitize_key( bp_get_the_profile_field_name() ), $r ); 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /src/bootstrap/class-assets-loader.php: -------------------------------------------------------------------------------- 1 | setup(); 36 | } 37 | 38 | /** 39 | * Sets up 40 | */ 41 | public function setup() { 42 | add_action( 'bp_enqueue_scripts', array( $this, 'register_front_assets' ) ); 43 | add_action( 'bp_admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); 44 | 45 | add_action( 'bp_enqueue_scripts', array( $this, 'load_assets' ) ); 46 | add_action( 'bp_admin_enqueue_scripts', array( $this, 'load_admin_assets' ) ); 47 | add_action( 'bp_admin_enqueue_scripts', array( $this, 'load_user_admin_assets' ) ); 48 | } 49 | 50 | /** 51 | * Registers front assets. 52 | */ 53 | public function register_front_assets() { 54 | 55 | if ( ! $this->should_load_front_assets() ) { 56 | return; 57 | } 58 | 59 | $this->register(); 60 | } 61 | 62 | /** 63 | * Loads plugin assets 64 | */ 65 | public function load_assets() { 66 | // css should always be loaded. 67 | wp_enqueue_style( 'bp-xprofile-custom-field-types' ); 68 | 69 | if ( ! $this->should_load_front_assets() ) { 70 | return; 71 | } 72 | $this->enqueue_vendors(); 73 | $this->enqueue_front(); 74 | } 75 | 76 | /** 77 | * Registers admin assets. 78 | */ 79 | public function register_admin_assets() { 80 | 81 | if ( ! $this->should_load_admin_assets() ) { 82 | return; 83 | } 84 | 85 | $this->register(); 86 | } 87 | 88 | /** 89 | * Loads plugin assets 90 | */ 91 | public function load_admin_assets() { 92 | 93 | if ( ! $this->should_load_admin_assets() ) { 94 | return; 95 | } 96 | 97 | $this->enqueue_vendors(); 98 | $this->enqueue_admin(); 99 | } 100 | 101 | /** 102 | * Loads plugin assets 103 | */ 104 | public function load_user_admin_assets() { 105 | 106 | $load = isset( $_GET['page'] ) && 'bp-profile-edit' === $_GET['page']; 107 | $load = apply_filters( 'bpxcftr_load_user_admin_assets', $load ); 108 | 109 | if ( ! $load ) { 110 | return; 111 | } 112 | 113 | $this->enqueue_vendors(); 114 | $this->enqueue_user_admin(); 115 | } 116 | 117 | /** 118 | * Registers assets. 119 | */ 120 | private function register() { 121 | $this->register_vendors(); 122 | $this->register_core(); 123 | $this->register_admin(); 124 | } 125 | 126 | /** 127 | * Enqueues front end assets. 128 | */ 129 | public function enqueue_front() { 130 | wp_enqueue_script( 'bp-xprofile-custom-field-types' ); 131 | 132 | wp_localize_script( 'bp-xprofile-custom-field-types', 'BPXprofileCFTR', $this->data ); 133 | } 134 | 135 | /** 136 | * Loads vendor assets. 137 | */ 138 | public function enqueue_vendors() { 139 | wp_enqueue_style( 'select2' ); 140 | wp_enqueue_script( 'modernizr' ); 141 | wp_enqueue_script( 'jscolor' ); 142 | wp_enqueue_script( 'select2' ); 143 | wp_enqueue_script( 'select2-i18n' ); 144 | } 145 | 146 | /** 147 | * Enqueues admin assets for add/edit field screen. 148 | */ 149 | public function enqueue_admin() { 150 | wp_enqueue_script( 'bp-xprofile-custom-field-types-admin' ); 151 | 152 | wp_localize_script( 'bp-xprofile-custom-field-types', 'BPXprofileCFTR', $this->data ); 153 | 154 | wp_localize_script( 'bp-xprofile-custom-field-types-admin', 'BPXprofileCFTRAdmin', $this->data ); 155 | } 156 | 157 | /** 158 | * Enqueues admin assets needed for user profile edit page. 159 | */ 160 | public function enqueue_user_admin() { 161 | wp_enqueue_script( 'bp-xprofile-custom-field-types' ); 162 | wp_localize_script( 'bp-xprofile-custom-field-types', 'BPXprofileCFTR', $this->data ); 163 | } 164 | 165 | /** 166 | * Registers vendor scripts. 167 | */ 168 | private function register_vendors() { 169 | 170 | $url = bp_xprofile_cftr()->url; 171 | $path = bp_xprofile_cftr()->path; 172 | 173 | $version = bp_xprofile_cftr()->version; 174 | 175 | wp_register_script( 'modernizr', $url . 'assets/vendors/modernizr.js', array(), $version, false ); 176 | wp_register_script( 'jscolor', $url . 'assets/vendors/jscolor/jscolor.js', array(), '1.4.1', true ); 177 | 178 | wp_register_script( 'select2', $url . 'assets/vendors/select2/select2.full.min.js', array( 'jquery' ), '4.0.12', true ); 179 | 180 | $locale = apply_filters( 'bpxcftr_select2_js_locale', get_locale() ); 181 | // Select 2, locale. 182 | $locale_js = is_readable( $path . "assets/vendors/select2/i18n/{$locale}.js" ) ? "{$locale}.js" : 'en.js'; 183 | 184 | wp_register_script( 'select2-i18n', $url . "assets/vendors/select2/i18n/{$locale_js}", array( 'select2' ), '4.0.12', true ); 185 | 186 | wp_register_style( 'select2', $url . 'assets/vendors/select2/select2.min.css', array(), '4.0.2' ); 187 | 188 | } 189 | 190 | /** 191 | * Registers core assets. 192 | */ 193 | private function register_core() { 194 | $url = bp_xprofile_cftr()->url; 195 | $version = bp_xprofile_cftr()->version; 196 | 197 | wp_register_style( 'bp-xprofile-custom-field-types', $url . 'assets/css/bp-xprofile-custom-field-types.css', false, $version ); 198 | 199 | wp_register_script( 'bp-xprofile-custom-field-types', $url . 'assets/js/bp-xprofile-custom-field-types.js', array( 'jquery' ), $version, true ); 200 | 201 | $this->data = array(); 202 | } 203 | 204 | /** 205 | * Registers core assets. 206 | */ 207 | private function register_admin() { 208 | $url = bp_xprofile_cftr()->url; 209 | $version = bp_xprofile_cftr()->version; 210 | 211 | wp_register_script( 'bp-xprofile-custom-field-types-admin', $url . 'assets/js/bp-xprofile-custom-field-types-admin.js', array( 'jquery' ), $version, true ); 212 | 213 | $this->data = array( 214 | 'selectableTypes' => bpxcftr_get_selectable_field_types(), 215 | ); 216 | } 217 | 218 | /** 219 | * Should we load admin assets? 220 | * 221 | * @return bool 222 | */ 223 | private function should_load_admin_assets() { 224 | $load = isset( $_GET['page'] ) && ( 'bp-profile-setup' === $_GET['page'] || 'bp-profile-edit' == $_GET['page'] ); 225 | 226 | return apply_filters( 'bpxcftr_load_admin_assets', $load ); 227 | } 228 | 229 | /** 230 | * Should we load front assets. 231 | * 232 | * @return bool 233 | */ 234 | private function should_load_front_assets() { 235 | $load = bp_is_user_profile_edit() || bp_is_register_page(); 236 | 237 | return apply_filters( 'bpxcftr_load_front_assets', $load ); 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /src/field-types/class-field-type-checkbox-acceptance.php: -------------------------------------------------------------------------------- 1 | name = _x( 'Checkbox Acceptance', 'xprofile field type', 'bp-xprofile-custom-field-types' ); 31 | $this->category = _x( 'Custom Fields', 'xprofile field type category', 'bp-xprofile-custom-field-types' ); 32 | 33 | $this->supports_multiple_defaults = false; 34 | $this->accepts_null_value = false; 35 | $this->supports_options = false; 36 | 37 | $this->set_format( '/^.+$/', 'replace' ); 38 | do_action( 'bp_xprofile_field_type_checkbox_acceptance', $this ); 39 | } 40 | 41 | /** 42 | * Edit field html. 43 | * 44 | * @param array $raw_properties properties. 45 | */ 46 | public function edit_field_html( array $raw_properties = array() ) { 47 | 48 | $user_id = bp_displayed_user_id(); 49 | 50 | if ( isset( $raw_properties['user_id'] ) ) { 51 | $user_id = (int) $raw_properties['user_id']; 52 | unset( $raw_properties['user_id'] ); 53 | } 54 | 55 | // HTML5 required attribute. 56 | if ( bp_get_the_profile_field_is_required() ) { 57 | $raw_properties['required'] = 'required'; 58 | $required = true; 59 | } else { 60 | $required = false; 61 | } 62 | ?> 63 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | 77 | User->Profile Fields screen. 82 | * 83 | * @param array $raw_properties properties. 84 | */ 85 | public function admin_field_html( array $raw_properties = array() ) { 86 | global $field; 87 | 88 | $text = wp_kses_data( self::get_content( $field ) ); 89 | 90 | $html = $this->get_edit_field_html_elements( array_merge( 91 | array( 'type' => 'checkbox' ), 92 | $raw_properties 93 | ) ); 94 | ?> 95 | 99 | type != $type ? 'display: none;' : ''; 117 | $text = self::get_content( $current_field ); 118 | 119 | ?> 120 | 129 | field_obj->id, $args['user_id'] ) ); 141 | 142 | if ( ! empty( $_POST[ 'field_' . $this->field_obj->id ] ) ) { 143 | $new_checkbox_acceptance = $_POST[ 'field_' . $this->field_obj->id ]; 144 | $checkbox_acceptance = ( $checkbox_acceptance != $new_checkbox_acceptance ) ? $new_checkbox_acceptance : $checkbox_acceptance; 145 | } 146 | 147 | $checkbox_acceptance = absint( $checkbox_acceptance ); 148 | 149 | $atts = array( 150 | 'type' => 'checkbox', 151 | 'name' => bp_get_the_profile_field_input_name(), 152 | 'id' => bp_get_the_profile_field_input_name(), 153 | 'value' => 1, 154 | 'class' => 'bpxcftr-tos-checkbox', 155 | ); 156 | 157 | if ( $checkbox_acceptance == 1 ) { 158 | $atts['checked'] = "checked"; 159 | } 160 | 161 | $html = 'get_edit_field_html_elements( $atts ) . ' />'; 162 | // we should most probably avoid kses on output. 163 | $html .= wp_kses_post( self::get_content( $field ) ); 164 | echo apply_filters( 'bp_get_the_profile_field_checkbox_acceptance', $html, $args['type'], $this->field_obj->id, $checkbox_acceptance ); 165 | ?> 166 | id; 210 | } 211 | 212 | if ( ! $field_id ) { 213 | return ''; 214 | } 215 | 216 | return bp_xprofile_get_meta( $field_id, 'field', 'tos_content', true ); 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /src/field-types/class-field-type-tags.php: -------------------------------------------------------------------------------- 1 | category = _x( 'Custom Fields', 'xprofile field type category', 'bp-xprofile-custom-field-types' ); 32 | $this->name = _x( 'Tags', 'xprofile field type', 'bp-xprofile-custom-field-types' ); 33 | 34 | $this->supports_multiple_defaults = false; 35 | $this->accepts_null_value = true; 36 | $this->supports_options = false; 37 | 38 | $this->set_format( '/^.+$/', 'replace' ); 39 | 40 | /** 41 | * Fires inside __construct() method for Field_Type_Tags class. 42 | * 43 | * @param Field_Type_Tags $this Current instance of the field type tags. 44 | */ 45 | do_action( 'bp_xprofile_field_type_tags', $this ); 46 | } 47 | 48 | /** 49 | * Outputs HTML for this field type on the wp-admin Profile Fields screen. 50 | * 51 | * Must be used inside the {@link bp_profile_fields()} template loop. 52 | * 53 | * @param BP_XProfile_Field $current_field Current field object. 54 | * @param string $control_type Current field object. 55 | */ 56 | public function admin_new_field_html( \BP_XProfile_Field $current_field, $control_type = '' ) { 57 | $type = array_search( get_class( $this ), bp_xprofile_get_field_types(), false ); 58 | 59 | if ( false === $type ) { 60 | return; 61 | } 62 | 63 | $class = $current_field->type != $type ? 'display: none;' : ''; 64 | $text = join( ',', self::get_default_tags( $current_field->id ) ); 65 | 66 | // phpcs:disable 67 | ?> 68 | 83 | 'multiple', 108 | 'id' => bp_get_the_profile_field_input_name() . '[]', 109 | 'name' => bp_get_the_profile_field_input_name() . '[]', 110 | ) 111 | ); 112 | 113 | $field_id = bp_get_the_profile_field_id(); 114 | 115 | $default_tags = self::get_default_tags( bp_get_the_profile_field_id() ); 116 | $user_tags = xprofile_get_field_data( $field_id, $user_id ); 117 | $user_tags = $user_tags ? $user_tags : array(); 118 | 119 | $tags = array_unique( array_map( 'trim', array_merge( $default_tags, $user_tags ) ) ); 120 | 121 | $options = array(); 122 | 123 | if ( ! $default_tags && ! $user_tags ) { 124 | //$options[''] = __( '', 'bp-xprofile-custom-field-types' ); 125 | } 126 | 127 | $options = array_merge( $options, array_combine( $tags, $tags ) ); 128 | 129 | ?> 130 | 131 | 135 | 136 | 137 | 138 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | name = _x( 'Custom Post Type Selector', 'xprofile field type', 'bp-xprofile-custom-field-types' ); 30 | $this->category = _x( 'Custom Fields', 'xprofile field type category', 'bp-xprofile-custom-field-types' ); 31 | 32 | $this->supports_options = false; 33 | 34 | do_action( 'bp_xprofile_field_type_select_custom_post_type', $this ); 35 | } 36 | 37 | /** 38 | * Edit field html. 39 | * 40 | * @param array $raw_properties properties. 41 | */ 42 | public function edit_field_html( array $raw_properties = array() ) { 43 | $user_id = bp_displayed_user_id(); 44 | 45 | if ( isset( $raw_properties['user_id'] ) ) { 46 | $user_id = (int) $raw_properties['user_id']; 47 | unset( $raw_properties['user_id'] ); 48 | } 49 | 50 | $html = $this->get_edit_field_html_elements( $raw_properties ); 51 | ?> 52 | 53 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | 67 | 68 | 69 | id ); 80 | $post_selected = \BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] ); 81 | 82 | $html = ''; 83 | 84 | 85 | if ( ! empty( $_POST[ 'field_' . $this->field_obj->id ] ) ) { 86 | $new_post_selected = (int) $_POST[ 'field_' . $this->field_obj->id ]; 87 | $post_selected = ( $post_selected != $new_post_selected ) ? $new_post_selected : $post_selected; 88 | } 89 | // Get posts of custom post type selected. 90 | $posts = new \WP_Query( 91 | array( 92 | 'posts_per_page' => - 1, 93 | 'post_type' => $post_type_selected, 94 | 'orderby' => 'title', 95 | 'order' => 'ASC', 96 | ) 97 | ); 98 | 99 | if ( $posts ) { 100 | foreach ( $posts->posts as $post ) { 101 | $html .= sprintf( 102 | '', 103 | $post->ID, 104 | ( $post_selected == $post->ID ) ? ' selected="selected"' : '', 105 | $post->post_title 106 | ); 107 | } 108 | } 109 | 110 | echo apply_filters( 'bp_get_the_profile_field_select_custom_post_type', $html, $args['type'], $post_type_selected, $this->field_obj->id ); 111 | } 112 | 113 | /** 114 | * Dashboard->Users->Profile Fields entry. 115 | * 116 | * @param array $raw_properties properties. 117 | */ 118 | public function admin_field_html( array $raw_properties = array() ) { 119 | $html = $this->get_edit_field_html_elements( $raw_properties ); 120 | ?> 121 | 124 | Users->Profile Fields->New|Edit entry. 129 | * 130 | * @param \BP_XProfile_Field $current_field object. 131 | * @param string $control_type type. 132 | */ 133 | public function admin_new_field_html( \BP_XProfile_Field $current_field, $control_type = '' ) { 134 | 135 | $type = array_search( get_class( $this ), bp_xprofile_get_field_types() ); 136 | 137 | if ( false === $type ) { 138 | return; 139 | } 140 | 141 | $class = $current_field->type != $type ? 'display: none;' : ''; 142 | 143 | $post_types = get_post_types( array( 'public' => true ) ); 144 | 145 | $selected_post_type = self::get_selected_post_type( $current_field->id ); 146 | 147 | ?> 148 | 167 | %2$s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); 198 | } 199 | 200 | /** 201 | * Returns the selected post type. 202 | * 203 | * @param int $field_id field id. 204 | * 205 | * @return string 206 | */ 207 | private static function get_selected_post_type( $field_id ) { 208 | 209 | if ( ! $field_id ) { 210 | return ''; 211 | } 212 | 213 | return bp_xprofile_get_meta( $field_id, 'field', 'selected_post_type', true ); 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /src/field-types/class-field-type-select-taxonomy.php: -------------------------------------------------------------------------------- 1 | name = _x( 'Custom Taxonomy Selector', 'xprofile field type', 'bp-xprofile-custom-field-types' ); 31 | $this->category = _x( 'Custom Fields', 'xprofile field type category', 'bp-xprofile-custom-field-types' ); 32 | 33 | $this->supports_options = false; 34 | 35 | do_action( 'bp_xprofile_field_type_select_custom_taxonomy', $this ); 36 | } 37 | 38 | /** 39 | * Field edit screen. 40 | * 41 | * @param array $raw_properties properties. 42 | */ 43 | public function edit_field_html( array $raw_properties = array() ) { 44 | 45 | $user_id = bp_displayed_user_id(); 46 | 47 | if ( isset( $raw_properties['user_id'] ) ) { 48 | $user_id = (int) $raw_properties['user_id']; 49 | unset( $raw_properties['user_id'] ); 50 | } 51 | 52 | $html = $this->get_edit_field_html_elements( $raw_properties ); 53 | ?> 54 | 55 | 59 | 60 | 61 | 65 | 66 | 67 | 68 | 69 | 70 | id ); 82 | 83 | $term_selected = \BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] ); 84 | 85 | $html = ''; 86 | 87 | if ( ! empty( $_POST[ 'field_' . $this->field_obj->id ] ) ) { 88 | $new_term_selected = (int) $_POST[ 'field_' . $this->field_obj->id ]; 89 | $term_selected = ( $term_selected != $new_term_selected ) ? $new_term_selected : $term_selected; 90 | } 91 | 92 | // Get terms of custom taxonomy selected. 93 | $terms = get_terms( $taxonomy_selected, array( 'hide_empty' => false ) ); 94 | 95 | if ( $terms && ! is_wp_error( $terms ) ) { 96 | 97 | foreach ( $terms as $term ) { 98 | $html .= sprintf( 99 | '', 100 | $term->term_id, 101 | ( $term_selected == $term->term_id ) ? ' selected="selected"' : '', 102 | $term->name 103 | ); 104 | } 105 | } 106 | 107 | echo apply_filters( 'bp_get_the_profile_field_select_custom_taxonomy', $html, $args['type'], $term_selected, $this->field_obj->id ); 108 | } 109 | 110 | /** 111 | * Dashboard->Users->Profile Fields entry. 112 | * 113 | * @param array $raw_properties properties. 114 | */ 115 | public function admin_field_html( array $raw_properties = array() ) { 116 | $html = $this->get_edit_field_html_elements( $raw_properties ); 117 | ?> 118 | 119 | 122 | 123 | Users->Profile Fields->New|Edit entry. 128 | * 129 | * @param \BP_XProfile_Field $current_field object. 130 | * @param string $control_type type. 131 | */ 132 | public function admin_new_field_html( \BP_XProfile_Field $current_field, $control_type = '' ) { 133 | 134 | $type = array_search( get_class( $this ), bp_xprofile_get_field_types() ); 135 | 136 | if ( false === $type ) { 137 | return; 138 | } 139 | 140 | $class = $current_field->type != $type ? 'display: none;' : ''; 141 | 142 | $taxonomies = get_taxonomies( array( 'public' => true ) ); 143 | 144 | $selected_tax = self::get_selected_taxonomy( $current_field->id ); 145 | ?> 146 | 166 | %2$s', esc_url( get_term_link( $term, $tax ) ), esc_html( $term->name ) ); 214 | } 215 | 216 | /** 217 | * Returns selected taxonomy. 218 | * 219 | * @param int $field_id field id. 220 | * 221 | * @return string 222 | */ 223 | public static function get_selected_taxonomy( $field_id ) { 224 | 225 | if ( ! $field_id ) { 226 | return ''; 227 | } 228 | 229 | return bp_xprofile_get_meta( $field_id, 'field', 'selected_taxonomy', true ); 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /assets/vendors/modernizr.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-inputtypes-shiv-cssclasses-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function v(a){j.cssText=a}function w(a,b){return v(prefixes.join(a+";")+(b||""))}function x(a,b){return typeof a===b}function y(a,b){return!!~(""+a).indexOf(b)}function z(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:x(f,"function")?f.bind(d||b):f}return!1}function A(){e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e