Version Description
Download this release
Release Info
Developer | machothemes |
Plugin | Strong Testimonials |
Version | 2.37 |
Comparing to | |
See all releases |
Code changes from version 2.36 to 2.37
- admin/about/addons.php +0 -0
- admin/about/class-strong-testimonials-about.php +8 -8
- admin/about/how-to.php +0 -0
- admin/about/links.php +0 -0
- admin/about/privacy.php +0 -0
- admin/about/whats-new.php +0 -0
- admin/admin-notices.php +3 -1
- admin/admin.php +0 -0
- admin/class-strong-testimonials-admin-category-list.php +0 -0
- admin/class-strong-testimonials-admin-list.php +0 -0
- admin/class-strong-testimonials-admin-scripts.php +8 -4
- admin/class-strong-testimonials-defaults.php +13 -21
- admin/class-strong-testimonials-exporter.php +80 -0
- admin/class-strong-testimonials-help.php +53 -53
- admin/class-strong-testimonials-list-table.php +1011 -946
- admin/class-strong-testimonials-page-shortcodes.php +2 -2
- admin/class-strong-testimonials-post-editor.php +8 -12
- admin/class-strong-testimonials-updater.php +9 -0
- admin/class-strong-views-list-table.php +5 -4
- admin/class-walker-strong-category-checklist.php +0 -0
- admin/class-walker-strong-form-category-checklist.php +0 -0
- admin/compat.php +0 -0
- admin/css/about.css +0 -0
- admin/css/admin-compat.css +0 -0
- admin/css/admin-form.css +0 -0
- admin/css/fields.css +0 -0
- admin/css/form-preview.css +0 -0
- admin/css/number-spinner.css +0 -0
- admin/css/order.css +0 -0
- admin/css/polylang.css +0 -0
- admin/css/post-editor.css +0 -0
- admin/css/views.css +0 -0
- admin/css/wpml.css +0 -0
- admin/custom-fields-ajax.php +0 -0
- admin/custom-fields.php +132 -112
- admin/form-preview.php +0 -0
- admin/img/logo-long.svg +0 -0
- admin/img/mascot.png +0 -0
- admin/img/quotes.png +0 -0
- admin/img/screen-options.png +0 -0
- admin/img/strong-date.png +0 -0
- admin/img/strong-testimonials-badge.png +0 -0
- admin/js/addon-licenses.js +0 -0
- admin/js/admin-compat.js +0 -0
- admin/js/admin-fields.js +6 -5
- admin/js/admin-form.js +0 -0
- admin/js/admin-global.js +0 -0
- admin/js/admin-order.js +0 -0
- admin/js/admin.js +0 -106
- admin/js/custom-spinner.js +0 -0
- admin/js/help.js +0 -0
- admin/js/lib/are-you-sure/jquery.are-you-sure.js +0 -0
- admin/js/lib/are-you-sure/jquery.are-you-sure.min.js +0 -0
- admin/js/lib/autosize/autosize.min.js +0 -0
- admin/js/rating-edit.js +0 -0
- admin/js/view-category-filter.js +0 -0
- admin/js/views.js +0 -0
- admin/menu/class-strong-testimonials-menu-fields.php +0 -0
- admin/menu/class-strong-testimonials-menu-settings.php +0 -0
- admin/menu/class-strong-testimonials-menu-shortcodes.php +0 -0
- admin/menu/class-strong-testimonials-menu-views.php +0 -0
- admin/menu/class-strong-testimonials-menu.php +0 -0
- admin/partials/fields/field-controls.php +1 -1
- admin/partials/fields/field-header.php +0 -0
- admin/partials/fields/field-label.php +0 -0
- admin/partials/fields/field-name.php +0 -0
- admin/partials/fields/field-text.php +0 -0
- admin/partials/fields/field-type.php +0 -0
- admin/partials/templates/form-preview-template.php +0 -0
- admin/partials/views/group-compat.php +0 -0
- admin/partials/views/group-extra.php +0 -0
- admin/partials/views/group-fields.php +0 -0
- admin/partials/views/group-form.php +0 -0
- admin/partials/views/group-query.php +3 -3
- admin/partials/views/group-slideshow.php +0 -0
- admin/partials/views/group-style.php +0 -0
- admin/partials/views/option-background.php +0 -0
- admin/partials/views/option-boilerplate.php +0 -0
- admin/partials/views/option-category.php +3 -3
- admin/partials/views/option-classes.php +0 -0
- admin/partials/views/option-client-section.php +0 -0
- admin/partials/views/option-color.php +0 -0
- admin/partials/views/option-content.php +3 -1
- admin/partials/views/option-divi.php +0 -0
- admin/partials/views/option-form-ajax.php +0 -0
- admin/partials/views/option-form-category.php +0 -0
- admin/partials/views/option-id.php +1 -1
- admin/partials/views/option-layout.php +0 -0
- admin/partials/views/option-limit.php +3 -3
- admin/partials/views/option-order.php +4 -4
- admin/partials/views/option-pagination.php +3 -2
- admin/partials/views/option-read-more-page.php +13 -12
- admin/partials/views/option-select.php +3 -3
- admin/partials/views/option-slideshow-behavior.php +1 -1
- admin/partials/views/option-slideshow-breakpoints.php +0 -0
- admin/partials/views/option-slideshow-navigation.php +0 -0
- admin/partials/views/option-slideshow-num.php +0 -0
- admin/partials/views/option-slideshow-transition.php +0 -0
- admin/partials/views/option-slideshow-type.php +0 -0
- admin/partials/views/option-template-list.php +0 -0
- admin/partials/views/option-thumbnail.php +0 -0
- admin/partials/views/option-title.php +0 -0
- admin/partials/views/template-input.php +0 -0
- admin/partials/views/template-not-found.php +0 -0
- admin/partials/views/template-options.php +0 -0
- admin/partials/views/view-mode.php +0 -0
- admin/partials/views/view-name.php +0 -0
- admin/partials/views/view-shortcode.php +0 -0
- admin/scss/_partials/_background.scss +0 -0
- admin/scss/_partials/_category-checkboxes.scss +0 -0
- admin/scss/_partials/_category-filter.scss +0 -0
- admin/scss/_partials/_checkbox-icons.scss +0 -0
- admin/scss/_partials/_custom-fields.scss +0 -0
- admin/scss/_partials/_elements.scss +0 -0
- admin/scss/_partials/_form-table.scss +0 -0
- admin/scss/_partials/_help-tab.scss +0 -0
- admin/scss/_partials/_inner-table.scss +0 -0
- admin/scss/_partials/_inputs.scss +0 -0
- admin/scss/_partials/_layout-example-columns.scss +0 -0
- admin/scss/_partials/_layout-example-grid.scss +0 -0
- admin/scss/_partials/_layout-example-masonry.scss +0 -0
- admin/scss/_partials/_layout-examples.scss +0 -0
- admin/scss/_partials/_layout.scss +0 -0
- admin/scss/_partials/_list-radio-buttons.scss +0 -0
- admin/scss/_partials/_misc.scss +0 -0
- admin/scss/_partials/_screenshots.scss +0 -0
- admin/scss/_partials/_sticky-views.scss +0 -0
- admin/scss/_partials/_structure.scss +0 -0
- admin/scss/_partials/_template.scss +0 -0
- admin/scss/_partials/_view-info.scss +0 -0
- admin/scss/about.scss +0 -0
- admin/scss/admin-compat.scss +0 -0
- admin/scss/number-spinner.scss +0 -0
- admin/scss/post-editor.scss +0 -0
- admin/scss/views.scss +0 -0
- admin/settings/class-strong-testimonials-settings-compat.php +3 -3
- admin/settings/class-strong-testimonials-settings-form.php +1 -5
- admin/settings/class-strong-testimonials-settings-general.php +13 -12
- admin/settings/class-strong-testimonials-settings-licenses.php +0 -0
- admin/settings/class-strong-testimonials-settings.php +5 -5
- admin/settings/partials/email-from.php +0 -0
- admin/settings/partials/email-to.php +0 -0
- admin/settings/partials/email.php +0 -0
- admin/settings/partials/form.php +86 -101
- admin/settings/partials/general.php +12 -0
- admin/settings/partials/licenses.php +0 -0
- admin/settings/partials/recipient.php +0 -0
- admin/view-list-order.php +0 -0
- admin/views-ajax.php +0 -0
- admin/views-validate.php +0 -0
- admin/views.php +12 -11
- {admin → assets}/css/admin.css +202 -374
- assets/js/admin-js.js +261 -0
- assets/src/js/admin.js +125 -0
- assets/src/js/modules/notice.js +21 -0
- assets/src/js/modules/range-slider.js +26 -0
- assets/src/scss/admin.scss +853 -0
- assets/src/scss/admin/_notices.scss +1 -0
- assets/src/scss/admin/_pages.scss +28 -0
- changelog.txt +12 -0
- includes/class-strong-form.php +0 -0
- includes/class-strong-log.php +0 -0
- includes/class-strong-mail.php +0 -0
- includes/class-strong-templates.php +0 -0
- includes/class-strong-testimonials-order.php +0 -0
- includes/class-strong-testimonials-privacy.php +0 -0
- includes/class-strong-testimonials-render.php +3 -1
- includes/class-strong-testimonials-shortcode-average.php +0 -0
- includes/class-strong-testimonials-shortcode-count.php +0 -0
- includes/class-strong-testimonials-shortcode.php +0 -0
- includes/class-strong-view-display.php +0 -0
- includes/class-strong-view-form.php +0 -0
- includes/class-strong-view-slideshow.php +0 -0
- includes/class-strong-view.php +0 -0
- includes/class-walker-strong-category-checklist-front.php +0 -0
- includes/deprecated.php +0 -0
- includes/filters.php +118 -0
- includes/functions-activation.php +0 -0
- includes/functions-content.php +3 -3
- includes/functions-image.php +0 -0
- includes/functions-rating.php +0 -0
- includes/functions-template-form.php +111 -101
- includes/functions-template.php +3 -3
- includes/functions-views.php +0 -0
- includes/functions.php +23 -2
- includes/integrations/class-integration-captcha-pro.php +0 -0
- includes/integrations/class-integration-captcha.php +0 -0
- includes/integrations/class-integration-google-captcha.php +0 -0
- includes/integrations/class-integration-really-simple-captcha.php +0 -0
- includes/l10n-polylang.php +0 -0
- includes/l10n-wpml.php +0 -0
- includes/post-types.php +15 -15
- includes/retro.php +0 -0
- includes/scripts.php +2 -0
- includes/widget2.php +6 -7
- languages/strong-testimonials-ar_AR.mo +0 -0
- languages/strong-testimonials-ar_AR.po +0 -0
- languages/strong-testimonials-es_ES.mo +0 -0
- languages/strong-testimonials-es_ES.po +0 -0
- languages/strong-testimonials-fa_IR.mo +0 -0
- languages/strong-testimonials-fa_IR.po +0 -0
- languages/strong-testimonials-fr_FR.mo +0 -0
- languages/strong-testimonials-fr_FR.po +0 -0
- languages/strong-testimonials-he_IL.mo +0 -0
- languages/strong-testimonials-he_IL.po +0 -0
- languages/strong-testimonials-pt_BR.mo +0 -0
- languages/strong-testimonials-pt_BR.po +0 -0
- languages/strong-testimonials-ru_RU.mo +0 -0
- languages/strong-testimonials-ru_RU.po +0 -0
- languages/strong-testimonials-sv_SE.mo +0 -0
- languages/strong-testimonials-sv_SE.po +0 -0
- languages/strong-testimonials.pot +0 -0
- license.txt +0 -0
- public/css/animate.min.css +0 -0
- public/css/columns.css +0 -0
- public/css/grid.css +0 -0
- public/css/masonry.css +0 -0
- public/css/rating-display.css +0 -0
- public/css/rating-form.css +0 -0
- public/css/slider-controls-full-buttons.css +0 -0
- public/css/slider-controls-full-buttons2.css +0 -0
- public/css/slider-controls-full-buttons3.css +0 -0
- public/css/slider-controls-full-text.css +0 -0
- public/css/slider-controls-sides-buttons-pager-buttons.css +0 -0
- public/css/slider-controls-sides-buttons-pager-text.css +0 -0
- public/css/slider-controls-sides-buttons.css +0 -0
- public/css/slider-controls-sides-buttons2-pager-buttons.css +0 -0
- public/css/slider-controls-sides-buttons2-pager-text.css +0 -0
- public/css/slider-controls-sides-buttons2.css +0 -0
- public/css/slider-controls-sides-buttons3-pager-buttons.css +0 -0
- public/css/slider-controls-sides-buttons3-pager-text.css +0 -0
- public/css/slider-controls-sides-buttons3.css +0 -0
- public/css/slider-controls-sides-inside-buttons-pager-buttons.css +0 -0
- public/css/slider-controls-sides-inside-buttons-pager-text.css +0 -0
- public/css/slider-controls-sides-inside-buttons.css +0 -0
- public/css/slider-controls-sides-inside-buttons2-pager-buttons.css +0 -0
- public/css/slider-controls-sides-inside-buttons2-pager-text.css +0 -0
- public/css/slider-controls-sides-inside-buttons2.css +0 -0
- public/css/slider-controls-sides-inside-buttons3-pager-buttons.css +0 -0
- public/css/slider-controls-sides-inside-buttons3-pager-text.css +0 -0
- public/css/slider-controls-sides-inside-buttons3.css +0 -0
- public/css/slider-controls-sides-outside-buttons-pager-buttons.css +0 -0
- public/css/slider-controls-sides-outside-buttons-pager-text.css +0 -0
- public/css/slider-controls-sides-outside-buttons.css +0 -0
- public/css/slider-controls-sides-outside-buttons2-pager-buttons.css +0 -0
- public/css/slider-controls-sides-outside-buttons2-pager-text.css +0 -0
- public/css/slider-controls-sides-outside-buttons2.css +0 -0
- public/css/slider-controls-sides-outside-buttons3-pager-buttons.css +0 -0
- public/css/slider-controls-sides-outside-buttons3-pager-text.css +0 -0
- public/css/slider-controls-sides-outside-buttons3.css +0 -0
- public/css/slider-controls-simple-buttons-pager-buttons.css +0 -0
- public/css/slider-controls-simple-buttons-pager-text.css +0 -0
- public/css/slider-controls-simple-buttons.css +0 -0
- public/css/slider-controls-simple-buttons2-pager-buttons.css +0 -0
- public/css/slider-controls-simple-buttons2-pager-text.css +0 -0
- public/css/slider-controls-simple-buttons2.css +0 -0
- public/css/slider-controls-simple-buttons3-pager-buttons.css +0 -0
- public/css/slider-controls-simple-buttons3-pager-text.css +0 -0
- public/css/slider-controls-simple-buttons3.css +0 -0
- public/css/slider-controls-simple-text-pager-buttons.css +0 -0
- public/css/slider-controls-simple-text-pager-text.css +0 -0
- public/css/slider-controls-simple-text.css +0 -0
- public/css/slider-pager-buttons.css +0 -0
- public/css/slider-pager-text.css +0 -0
- public/fonts/font-awesome-4.6.3/css/font-awesome.css +0 -0
- public/fonts/font-awesome-4.6.3/css/font-awesome.min.css +0 -0
- public/fonts/font-awesome-4.6.3/css/index.php +0 -0
- public/fonts/font-awesome-4.6.3/fonts/FontAwesome.otf +0 -0
- public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.eot +0 -0
- public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.svg +0 -0
- public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf +0 -0
- public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff +0 -0
- public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff2 +0 -0
- public/index.php +0 -0
- public/js/controller.js +10 -1
- public/js/controller.min.js +1 -1
- public/js/lib/actual/jquery.actual.js +0 -0
- public/js/lib/actual/jquery.actual.min.js +0 -0
- public/js/lib/form-validation/form-validation.js +0 -0
- public/js/lib/form-validation/form-validation.min.js +0 -0
- public/js/lib/imagesloaded/imagesloaded.pkgd.min.js +0 -0
- public/js/lib/readmore/readmore.js +0 -0
- public/js/lib/readmore/readmore.min.js +0 -0
- public/js/lib/strongpager/jquery.strongpager.js +0 -0
- public/js/lib/strongpager/jquery.strongpager.min.js +0 -0
- public/js/lib/strongslider/LICENSE.md +0 -0
- public/js/lib/strongslider/jquery.strongslider.js +1972 -1969
- public/js/lib/strongslider/jquery.strongslider.min.js +1 -1
- public/js/lib/validate/additional-methods.js +0 -0
- public/js/lib/validate/additional-methods.min.js +0 -0
- public/js/lib/validate/jquery.validate.js +0 -0
- public/js/lib/validate/jquery.validate.min.js +0 -0
- public/js/lib/validate/localization/messages_ar.js +0 -0
- public/js/lib/validate/localization/messages_ar.min.js +0 -0
- public/js/lib/validate/localization/messages_az.js +0 -0
- public/js/lib/validate/localization/messages_az.min.js +0 -0
- public/js/lib/validate/localization/messages_bg.js +0 -0
- public/js/lib/validate/localization/messages_bg.min.js +0 -0
- public/js/lib/validate/localization/messages_bn_BD.js +0 -0
- public/js/lib/validate/localization/messages_bn_BD.min.js +0 -0
- public/js/lib/validate/localization/messages_ca.js +0 -0
- public/js/lib/validate/localization/messages_ca.min.js +0 -0
- public/js/lib/validate/localization/messages_cs.js +0 -0
- public/js/lib/validate/localization/messages_cs.min.js +0 -0
- public/js/lib/validate/localization/messages_da.js +0 -0
- public/js/lib/validate/localization/messages_da.min.js +0 -0
- public/js/lib/validate/localization/messages_de.js +0 -0
- public/js/lib/validate/localization/messages_de.min.js +0 -0
- public/js/lib/validate/localization/messages_el.js +0 -0
- public/js/lib/validate/localization/messages_el.min.js +0 -0
- public/js/lib/validate/localization/messages_es.js +0 -0
- public/js/lib/validate/localization/messages_es.min.js +0 -0
- public/js/lib/validate/localization/messages_es_AR.js +0 -0
- public/js/lib/validate/localization/messages_es_AR.min.js +0 -0
- public/js/lib/validate/localization/messages_es_PE.js +0 -0
- public/js/lib/validate/localization/messages_es_PE.min.js +0 -0
- public/js/lib/validate/localization/messages_et.js +0 -0
- public/js/lib/validate/localization/messages_et.min.js +0 -0
- public/js/lib/validate/localization/messages_eu.js +0 -0
- public/js/lib/validate/localization/messages_eu.min.js +0 -0
- public/js/lib/validate/localization/messages_fa.js +0 -0
- public/js/lib/validate/localization/messages_fa.min.js +0 -0
- public/js/lib/validate/localization/messages_fi.js +0 -0
- public/js/lib/validate/localization/messages_fi.min.js +0 -0
- public/js/lib/validate/localization/messages_fr.js +0 -0
- public/js/lib/validate/localization/messages_fr.min.js +0 -0
- public/js/lib/validate/localization/messages_ge.js +0 -0
- public/js/lib/validate/localization/messages_ge.min.js +0 -0
- public/js/lib/validate/localization/messages_gl.js +0 -0
- public/js/lib/validate/localization/messages_gl.min.js +0 -0
- public/js/lib/validate/localization/messages_he.js +0 -0
- public/js/lib/validate/localization/messages_he.min.js +0 -0
- public/js/lib/validate/localization/messages_hr.js +0 -0
- public/js/lib/validate/localization/messages_hr.min.js +0 -0
- public/js/lib/validate/localization/messages_hu.js +0 -0
- public/js/lib/validate/localization/messages_hu.min.js +0 -0
- public/js/lib/validate/localization/messages_hy_AM.js +0 -0
- public/js/lib/validate/localization/messages_hy_AM.min.js +0 -0
- public/js/lib/validate/localization/messages_id.js +0 -0
- public/js/lib/validate/localization/messages_id.min.js +0 -0
- public/js/lib/validate/localization/messages_is.js +0 -0
- public/js/lib/validate/localization/messages_is.min.js +0 -0
- public/js/lib/validate/localization/messages_it.js +0 -0
- public/js/lib/validate/localization/messages_it.min.js +0 -0
- public/js/lib/validate/localization/messages_ja.js +0 -0
- public/js/lib/validate/localization/messages_ja.min.js +0 -0
- public/js/lib/validate/localization/messages_ka.js +0 -0
- public/js/lib/validate/localization/messages_ka.min.js +0 -0
- public/js/lib/validate/localization/messages_kk.js +0 -0
- public/js/lib/validate/localization/messages_kk.min.js +0 -0
- public/js/lib/validate/localization/messages_ko.js +0 -0
- public/js/lib/validate/localization/messages_ko.min.js +0 -0
- public/js/lib/validate/localization/messages_lt.js +0 -0
- public/js/lib/validate/localization/messages_lt.min.js +0 -0
- public/js/lib/validate/localization/messages_lv.js +0 -0
- public/js/lib/validate/localization/messages_lv.min.js +0 -0
- public/js/lib/validate/localization/messages_mk.js +0 -0
- public/js/lib/validate/localization/messages_mk.min.js +0 -0
- public/js/lib/validate/localization/messages_my.js +0 -0
- public/js/lib/validate/localization/messages_my.min.js +0 -0
- public/js/lib/validate/localization/messages_nl.js +0 -0
- public/js/lib/validate/localization/messages_nl.min.js +0 -0
- public/js/lib/validate/localization/messages_no.js +0 -0
- public/js/lib/validate/localization/messages_no.min.js +0 -0
- public/js/lib/validate/localization/messages_pl.js +0 -0
- public/js/lib/validate/localization/messages_pl.min.js +0 -0
- public/js/lib/validate/localization/messages_pt_BR.js +0 -0
- public/js/lib/validate/localization/messages_pt_BR.min.js +0 -0
- public/js/lib/validate/localization/messages_pt_PT.js +0 -0
- public/js/lib/validate/localization/messages_pt_PT.min.js +0 -0
- public/js/lib/validate/localization/messages_ro.js +0 -0
- public/js/lib/validate/localization/messages_ro.min.js +0 -0
- public/js/lib/validate/localization/messages_ru.js +0 -0
- public/js/lib/validate/localization/messages_ru.min.js +0 -0
- public/js/lib/validate/localization/messages_si.js +0 -0
- public/js/lib/validate/localization/messages_si.min.js +0 -0
- public/js/lib/validate/localization/messages_sk.js +0 -0
- public/js/lib/validate/localization/messages_sk.min.js +0 -0
- public/js/lib/validate/localization/messages_sl.js +0 -0
- public/js/lib/validate/localization/messages_sl.min.js +0 -0
- public/js/lib/validate/localization/messages_sr.js +0 -0
- public/js/lib/validate/localization/messages_sr.min.js +0 -0
- public/js/lib/validate/localization/messages_sr_lat.js +0 -0
- public/js/lib/validate/localization/messages_sr_lat.min.js +0 -0
- public/js/lib/validate/localization/messages_sv.js +0 -0
- public/js/lib/validate/localization/messages_sv.min.js +0 -0
- public/js/lib/validate/localization/messages_th.js +0 -0
- public/js/lib/validate/localization/messages_th.min.js +0 -0
- public/js/lib/validate/localization/messages_tj.js +0 -0
- public/js/lib/validate/localization/messages_tj.min.js +0 -0
- public/js/lib/validate/localization/messages_tr.js +0 -0
- public/js/lib/validate/localization/messages_tr.min.js +0 -0
- public/js/lib/validate/localization/messages_uk.js +0 -0
- public/js/lib/validate/localization/messages_uk.min.js +0 -0
- public/js/lib/validate/localization/messages_ur.js +0 -0
- public/js/lib/validate/localization/messages_ur.min.js +0 -0
- public/js/lib/validate/localization/messages_vi.js +0 -0
- public/js/lib/validate/localization/messages_vi.min.js +0 -0
- public/js/lib/validate/localization/messages_zh.js +0 -0
- public/js/lib/validate/localization/messages_zh.min.js +0 -0
- public/js/lib/validate/localization/messages_zh_TW.js +0 -0
- public/js/lib/validate/localization/messages_zh_TW.min.js +0 -0
- public/js/lib/validate/localization/methods_de.js +0 -0
- public/js/lib/validate/localization/methods_de.min.js +0 -0
- public/js/lib/validate/localization/methods_es_CL.js +0 -0
- public/js/lib/validate/localization/methods_es_CL.min.js +0 -0
- public/js/lib/validate/localization/methods_fi.js +0 -0
- public/js/lib/validate/localization/methods_fi.min.js +0 -0
- public/js/lib/validate/localization/methods_nl.js +0 -0
- public/js/lib/validate/localization/methods_nl.min.js +0 -0
- public/js/lib/validate/localization/methods_pt.js +0 -0
- public/js/lib/validate/localization/methods_pt.min.js +0 -0
- public/js/lib/verge/verge.js +0 -0
- public/js/lib/verge/verge.min.js +0 -0
- public/scss/_partials/_base.scss +0 -0
- public/scss/_partials/_buttons.scss +0 -0
- public/scss/_partials/_buttons2.scss +0 -0
- public/scss/_partials/_buttons3.scss +0 -0
- public/scss/_partials/_inside.scss +0 -0
- public/scss/_partials/_outside.scss +0 -0
- public/scss/_partials/_pager_buttons.scss +0 -0
- public/scss/_partials/_pager_inside.scss +0 -0
- public/scss/_partials/_pager_text.scss +0 -0
- public/scss/_partials/_sides.scss +0 -0
- public/scss/_partials/_sides_outside.scss +0 -0
- public/scss/_partials/_sides_pager.scss +0 -0
- public/scss/_partials/_text.scss +0 -0
- public/scss/slider-controls-full-buttons.scss +0 -0
- public/scss/slider-controls-full-buttons2.scss +0 -0
- public/scss/slider-controls-full-buttons3.scss +0 -0
- public/scss/slider-controls-full-text.scss +0 -0
- public/scss/slider-controls-sides-buttons-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-buttons-pager-text.scss +0 -0
- public/scss/slider-controls-sides-buttons.scss +0 -0
- public/scss/slider-controls-sides-buttons2-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-buttons2-pager-text.scss +0 -0
- public/scss/slider-controls-sides-buttons2.scss +0 -0
- public/scss/slider-controls-sides-buttons3-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-buttons3-pager-text.scss +0 -0
- public/scss/slider-controls-sides-buttons3.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons-pager-text.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons2-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons2-pager-text.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons2.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons3-pager-buttons.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons3-pager-text.scss +0 -0
- public/scss/slider-controls-sides-outside-buttons3.scss +0 -0
- public/scss/slider-controls-simple-buttons-pager-buttons.scss +0 -0
- public/scss/slider-controls-simple-buttons-pager-text.scss +0 -0
- public/scss/slider-controls-simple-buttons.scss +0 -0
- public/scss/slider-controls-simple-buttons2-pager-buttons.scss +0 -0
- public/scss/slider-controls-simple-buttons2-pager-text.scss +0 -0
- public/scss/slider-controls-simple-buttons2.scss +0 -0
- public/scss/slider-controls-simple-buttons3-pager-buttons.scss +0 -0
- public/scss/slider-controls-simple-buttons3-pager-text.scss +0 -0
- public/scss/slider-controls-simple-buttons3.scss +0 -0
- public/scss/slider-controls-simple-text-pager-buttons.scss +0 -0
- public/scss/slider-controls-simple-text-pager-text.scss +0 -0
- public/scss/slider-controls-simple-text.scss +0 -0
- public/scss/slider-pager-buttons.scss +0 -0
- public/scss/slider-pager-text.scss +0 -0
- readme.txt +2 -2
- strong-testimonials.php +7 -2
- templates-scss/_mixins/_testimonial.scss +0 -0
- templates-scss/_partials/_base.scss +0 -0
- templates-scss/_partials/_clear.scss +0 -0
- templates-scss/_partials/_form-wait.scss +0 -0
- templates-scss/_partials/_pagination-modern.scss +0 -0
- templates-scss/_partials/_pagination-simple.scss +0 -0
- templates-scss/_partials/_pagination-standard.scss +0 -0
- templates-scss/_partials/_responsive-no-heading-background.scss +0 -0
- templates-scss/_partials/_responsive.scss +0 -0
- templates-scss/_partials/_rtl.scss +0 -0
- templates-scss/_partials/_structure-form.scss +0 -0
- templates-scss/bold/content.scss +0 -0
- templates-scss/default-form/form.scss +0 -0
- templates-scss/default/content.scss +0 -0
- templates-scss/modern/content.scss +0 -0
- templates-scss/simple-form/form.scss +0 -0
- templates-scss/simple/content.scss +0 -0
- templates-scss/small-widget/content.scss +0 -0
- templates-scss/unstyled-form/form.scss +0 -0
- templates/bold/config.json +0 -0
- templates/bold/content.css +0 -0
- templates/bold/content.php +0 -0
- templates/default-form/config.json +0 -0
- templates/default-form/form.css +0 -0
- templates/default-form/form.php +0 -0
- templates/default/config.json +0 -0
- templates/default/content.css +0 -0
- templates/default/content.php +0 -0
- templates/default/img/quotes.png +0 -0
- templates/index.php +0 -0
- templates/modern/config.json +0 -0
- templates/modern/content.css +0 -0
- templates/modern/content.php +0 -0
- templates/simple-form/config.json +0 -0
- templates/simple-form/form.css +0 -0
- templates/simple-form/form.php +0 -0
- templates/simple/config.json +0 -0
- templates/simple/content.css +0 -0
- templates/simple/content.php +0 -0
- templates/small-widget/config.json +0 -0
- templates/small-widget/content.css +0 -0
- templates/small-widget/content.php +0 -0
- templates/unstyled-form/config.json +0 -0
- templates/unstyled-form/form.css +0 -0
- templates/unstyled-form/form.php +0 -0
- templates/unstyled/config.json +0 -0
- templates/unstyled/content.php +0 -0
- uninstall.php +0 -0
- wpml-config.xml +0 -0
admin/about/addons.php
CHANGED
File without changes
|
admin/about/class-strong-testimonials-about.php
CHANGED
@@ -39,9 +39,9 @@ class Strong_Testimonials_About {
|
|
39 |
Â
*/
|
40 |
Â
public function get_submenu() {
|
41 |
Â
return array(
|
42 |
-
'page_title' => __( 'About' ),
|
43 |
-
|
44 |
-
|
45 |
Â
'menu_slug' => 'about-strong-testimonials',
|
46 |
Â
'function' => array( $this, 'about_page' ),
|
47 |
Â
);
|
@@ -57,21 +57,21 @@ class Strong_Testimonials_About {
|
|
57 |
Â
?>
|
58 |
Â
<div class="wrap about-wrap">
|
59 |
Â
|
Â
|
|
Â
|
|
60 |
Â
<?php /* translators: %s is the plugin version number */ ?>
|
61 |
Â
<h1><?php printf( __( 'Welcome to Strong Testimonials %s', 'strong-testimonials' ), $major_minor ); ?></h1>
|
62 |
Â
|
63 |
Â
<p class="about-text">
|
64 |
-
|
65 |
Â
<?php /* translators: %s is the plugin version number */ ?>
|
66 |
Â
</p>
|
67 |
-
|
68 |
-
<div class="wp-badge strong-testimonials"><?php printf( __( 'Version %s' ), $major_minor ); ?></div>
|
69 |
Â
|
70 |
Â
<h2 class="nav-tab-wrapper wp-clearfix">
|
71 |
Â
|
72 |
Â
<a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
|
73 |
-
|
74 |
-
<a href="<?php echo add_query_arg( 'tab', 'privacy', $url ); ?>" class="nav-tab <?php echo $active_tab == 'privacy' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Privacy' ); ?></a>
|
75 |
Â
|
76 |
Â
</h2>
|
77 |
Â
|
39 |
Â
*/
|
40 |
Â
public function get_submenu() {
|
41 |
Â
return array(
|
42 |
+
'page_title' => __( 'About', 'strong-testimonials' ),
|
43 |
+
'menu_title' => __( 'About', 'strong-testimonials' ),
|
44 |
+
'capability' => 'strong_testimonials_about',
|
45 |
Â
'menu_slug' => 'about-strong-testimonials',
|
46 |
Â
'function' => array( $this, 'about_page' ),
|
47 |
Â
);
|
57 |
Â
?>
|
58 |
Â
<div class="wrap about-wrap">
|
59 |
Â
|
60 |
+
<img class="wpmst-mascot" src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/mascot.png" />
|
61 |
+
|
62 |
Â
<?php /* translators: %s is the plugin version number */ ?>
|
63 |
Â
<h1><?php printf( __( 'Welcome to Strong Testimonials %s', 'strong-testimonials' ), $major_minor ); ?></h1>
|
64 |
Â
|
65 |
Â
<p class="about-text">
|
66 |
+
<?php esc_html_e( 'Thank you for updating to the latest version!', 'strong-testimonials' ); ?>
|
67 |
Â
<?php /* translators: %s is the plugin version number */ ?>
|
68 |
Â
</p>
|
69 |
+
<br/>
|
Â
|
|
70 |
Â
|
71 |
Â
<h2 class="nav-tab-wrapper wp-clearfix">
|
72 |
Â
|
73 |
Â
<a href="<?php echo add_query_arg( 'tab', 'how-to', $url ); ?>" class="nav-tab <?php echo $active_tab == 'how-to' ? 'nav-tab-active' : ''; ?>"><?php _e( 'How To', 'strong-testimonials' ); ?></a>
|
74 |
+
<a href="<?php echo esc_url( add_query_arg( 'tab', 'privacy', $url ) ); ?>" class="nav-tab <?php echo $active_tab == 'privacy' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Privacy', 'strong-testimonials' ); ?></a>
|
Â
|
|
75 |
Â
|
76 |
Â
</h2>
|
77 |
Â
|
admin/about/how-to.php
CHANGED
File without changes
|
admin/about/links.php
CHANGED
File without changes
|
admin/about/privacy.php
CHANGED
File without changes
|
admin/about/whats-new.php
CHANGED
File without changes
|
admin/admin-notices.php
CHANGED
@@ -182,8 +182,10 @@ function wpmtst_admin_feedback_notice() {
|
|
182 |
Â
if ( $screen->id !== 'edit-wpm-testimonial' ) {
|
183 |
Â
return;
|
184 |
Â
}
|
Â
|
|
185 |
Â
?>
|
186 |
-
<div class="notice wpmtst-notice">
|
Â
|
|
187 |
Â
<img src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/logo-long.svg" width="400"/>
|
188 |
Â
<p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
|
189 |
Â
<a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
|
182 |
Â
if ( $screen->id !== 'edit-wpm-testimonial' ) {
|
183 |
Â
return;
|
184 |
Â
}
|
185 |
+
|
186 |
Â
?>
|
187 |
+
<div class="notice wpmtst-notice is-dismissible" data-key="feedback-notice" data-nonce="<?php echo esc_attr( wp_create_nonce( "wpmtst-admin" ) ); ?>">
|
188 |
+
<img class="wpmst-mascot" src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/mascot.png" />
|
189 |
Â
<img src="<?php echo esc_url( WPMTST_ADMIN_URL ); ?>/img/logo-long.svg" width="400"/>
|
190 |
Â
<p><?php esc_html_e( 'Do you enjoy using Strong Testimonials? Please take a minute to suggest a feature or tell us what you think.', 'strong-testimonials' ); ?></p>
|
191 |
Â
<a class="button" target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLScch0AchtnzxJsSrjUcW9ypcr1fZ9r-vyk3emEp8Sv47brb2g/viewform"><?php esc_html_e( 'Submit Feedback', 'strong-testimonials' ); ?></a>
|
admin/admin.php
CHANGED
File without changes
|
admin/class-strong-testimonials-admin-category-list.php
CHANGED
File without changes
|
admin/class-strong-testimonials-admin-list.php
CHANGED
File without changes
|
admin/class-strong-testimonials-admin-scripts.php
CHANGED
@@ -56,14 +56,18 @@ class Strong_Testimonials_Admin_Scripts {
|
|
56 |
Â
$plugin_version,
|
57 |
Â
true );
|
58 |
Â
|
59 |
-
|
60 |
-
|
Â
|
|
Â
|
|
61 |
Â
array( 'jquery', 'underscore' ),
|
62 |
Â
$plugin_version,
|
63 |
Â
true );
|
64 |
Â
|
65 |
-
|
66 |
-
|
Â
|
|
Â
|
|
67 |
Â
array( 'wpmtst-font-awesome' ),
|
68 |
Â
$plugin_version );
|
69 |
Â
|
56 |
Â
$plugin_version,
|
57 |
Â
true );
|
58 |
Â
|
59 |
+
|
60 |
+
wp_register_script(
|
61 |
+
'wpmtst-admin-script',
|
62 |
+
WPMTST_ASSETS_JS . 'admin-js.js',
|
63 |
Â
array( 'jquery', 'underscore' ),
|
64 |
Â
$plugin_version,
|
65 |
Â
true );
|
66 |
Â
|
67 |
+
|
68 |
+
wp_register_style(
|
69 |
+
'wpmtst-admin-style',
|
70 |
+
WPMTST_ASSETS_CSS . 'admin.css',
|
71 |
Â
array( 'wpmtst-font-awesome' ),
|
72 |
Â
$plugin_version );
|
73 |
Â
|
admin/class-strong-testimonials-defaults.php
CHANGED
@@ -29,18 +29,19 @@ class Strong_Testimonials_Defaults {
|
|
29 |
Â
*/
|
30 |
Â
public static function get_options() {
|
31 |
Â
$default_options = array(
|
32 |
-
'embed_width'
|
33 |
-
'load_font_awesome'
|
34 |
-
'nofollow'
|
35 |
-
'pending_indicator'
|
36 |
-
'remove_whitespace'
|
37 |
-
'reorder'
|
38 |
-
'support_comments'
|
39 |
-
'support_custom_fields'
|
40 |
-
'
|
41 |
-
'
|
42 |
-
'
|
43 |
-
'
|
Â
|
|
44 |
Â
);
|
45 |
Â
|
46 |
Â
return $default_options;
|
@@ -865,15 +866,6 @@ class Strong_Testimonials_Defaults {
|
|
865 |
Â
'installed' => false,
|
866 |
Â
'active' => false,
|
867 |
Â
),
|
868 |
-
'really-simple-captcha' => array(
|
869 |
-
'name' => 'Really Simple Captcha by Takayuki Miyoshi (free)',
|
870 |
-
'class' => 'Really_Simple_Captcha',
|
871 |
-
'file' => 'really-simple-captcha/really-simple-captcha.php',
|
872 |
-
'search' => 'plugin-install.php?tab=search&s=Really+Simple+Captcha',
|
873 |
-
'url' => 'https://wordpress.org/plugins/really-simple-captcha/',
|
874 |
-
'installed' => false,
|
875 |
-
'active' => false,
|
876 |
-
),
|
877 |
Â
);
|
878 |
Â
|
879 |
Â
return $plugins;
|
29 |
Â
*/
|
30 |
Â
public static function get_options() {
|
31 |
Â
$default_options = array(
|
32 |
+
'embed_width' => '',
|
33 |
+
'load_font_awesome' => true,
|
34 |
+
'nofollow' => false,
|
35 |
+
'pending_indicator' => true,
|
36 |
+
'remove_whitespace' => true,
|
37 |
+
'reorder' => false,
|
38 |
+
'support_comments' => false,
|
39 |
+
'support_custom_fields' => false,
|
40 |
+
'single_testimonial_slug' => 'testimonial',
|
41 |
+
'scrolltop' => true,
|
42 |
+
'scrolltop_offset' => 80,
|
43 |
+
'no_lazyload' => true,
|
44 |
+
'touch_enabled' => true,
|
45 |
Â
);
|
46 |
Â
|
47 |
Â
return $default_options;
|
866 |
Â
'installed' => false,
|
867 |
Â
'active' => false,
|
868 |
Â
),
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
869 |
Â
);
|
870 |
Â
|
871 |
Â
return $plugins;
|
admin/class-strong-testimonials-exporter.php
ADDED
@@ -0,0 +1,80 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Strong_Testimonials_Exporter
|
5 |
+
*
|
6 |
+
* exports testimonials along with their featured media
|
7 |
+
*
|
8 |
+
* @since 2.36
|
9 |
+
*/
|
10 |
+
class Strong_Testimonials_Exporter {
|
11 |
+
|
12 |
+
public $args = array();
|
13 |
+
public $query_done = false;
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
add_action( 'export_wp', array( $this, 'export_wp' ), 10, 1 );
|
17 |
+
add_filter( 'export_query', array( $this, 'export_query' ), 10, 1 );
|
18 |
+
}
|
19 |
+
|
20 |
+
public function export_wp( $args ) {
|
21 |
+
$this->args = $args;
|
22 |
+
add_filter( 'query', array( $this, 'export_query_filter' ), 10, 1 );
|
23 |
+
}
|
24 |
+
|
25 |
+
public function export_query_filter( $query ) {
|
26 |
+
|
27 |
+
global $wpdb;
|
28 |
+
if ( false === $this->query_done && 0 === strpos( $query, "SELECT ID FROM {$wpdb->posts} " ) ) {
|
29 |
+
$this->query_done = true;
|
30 |
+
remove_filter( 'query', array( $this, 'export_query_filter' ), 10 );
|
31 |
+
$query = apply_filters( 'export_query', $query );
|
32 |
+
}
|
33 |
+
return $query;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function export_query( $query ) {
|
37 |
+
global $wpdb;
|
38 |
+
|
39 |
+
if ( isset( $this->args['content'] ) && 'wpm-testimonial' === $this->args['content'] ) {
|
40 |
+
|
41 |
+
$attachments = $wpdb->get_results( "SELECT ID, guid, post_parent FROM {$wpdb->posts} WHERE post_type = 'attachment'", OBJECT_K );
|
42 |
+
if ( empty( $attachments ) ) {
|
43 |
+
return $query;
|
44 |
+
}
|
45 |
+
|
46 |
+
$ids = array();
|
47 |
+
|
48 |
+
// get attachments who are post thumbnails
|
49 |
+
$posts = $wpdb->get_col( $query );
|
50 |
+
if ( $posts ) {
|
51 |
+
$ids = $wpdb->get_col( sprintf( "SELECT meta_value FROM {$wpdb->postmeta} WHERE meta_key = '_thumbnail_id' AND post_id IN(%s)", implode( ',', $posts ) ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
// get atachments who have a post parent.
|
55 |
+
foreach ( $attachments as $id => $att ) {
|
56 |
+
if ( in_array( $att->post_parent, $posts ) ) {
|
57 |
+
$ids[] = $id;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
$ids = array_unique( $ids );
|
62 |
+
if ( count( $ids ) === 0 ) {
|
63 |
+
return $query;
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( 0 === strpos( $query, "SELECT ID FROM {$wpdb->posts} INNER JOIN {$wpdb->term_relationships} " ) ) {
|
67 |
+
// replace INNER JOIN with LEFT JOIN.
|
68 |
+
$query = str_replace( "SELECT ID FROM {$wpdb->posts} INNER JOIN {$wpdb->term_relationships} ", "SELECT ID FROM {$wpdb->posts} LEFT JOIN {$wpdb->term_relationships} ", $query );
|
69 |
+
}
|
70 |
+
$query .= sprintf( " OR {$wpdb->posts}.ID IN (%s) ", implode( ',', $ids ) );
|
71 |
+
|
72 |
+
}
|
73 |
+
return $query;
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
new Strong_Testimonials_Exporter();
|
80 |
+
|
admin/class-strong-testimonials-help.php
CHANGED
@@ -115,21 +115,21 @@ class Strong_Testimonials_Help {
|
|
115 |
Â
|
116 |
Â
ob_start();
|
117 |
Â
?>
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
Â
<?php
|
134 |
Â
$content = ob_get_clean();
|
135 |
Â
|
@@ -150,44 +150,44 @@ class Strong_Testimonials_Help {
|
|
150 |
Â
|
151 |
Â
ob_start();
|
152 |
Â
?>
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
Â
<?php
|
192 |
Â
$content = ob_get_clean();
|
193 |
Â
|
115 |
Â
|
116 |
Â
ob_start();
|
117 |
Â
?>
|
118 |
+
<div>
|
119 |
+
<p><?php echo wp_kses_post( _e( 'Optional shortcode attributes will override the view settings. Use this to create reusable view <strong>patterns</strong>.', 'strong-testimonials' ) ); ?>
|
120 |
+
<p><?php echo wp_kses_post( _e( 'Overridable settings: <code>post_ids</code>, <code>category</code>, <code>order</code>, <code>count</code>.', 'strong-testimonials' ) ); ?>
|
121 |
+
<p><?php echo wp_kses_post( _e( 'For example, imagine you have five services, a sales page for each service, and a testimonial category for each service. To display the testimonials on each service page, you can create five duplicate views, one for each category.', 'strong-testimonials' ) ); ?>
|
122 |
+
<p><?php echo wp_kses_post( _e( 'Or you can configure one view as a pattern and add it to each service page with the <code>category</code> attribute.', 'strong-testimonials' ) ); ?>
|
123 |
+
<p>
|
124 |
+
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-1"]</code>' ); ?>,
|
125 |
+
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-2"]</code>' ); ?>, etc.
|
126 |
+
</p>
|
127 |
+
<p>
|
128 |
+
<?php echo wp_kses_post( _e( 'Attributes may be used in combination. For example:', 'strong-testimonials' ) ); ?>
|
129 |
+
<?php echo wp_kses_post( '<code>[testimonial_view id="1" category="service-3" order="random" count="5"]</code>' ); ?>
|
130 |
+
</p>
|
131 |
+
<p><?php echo wp_kses_post( _e( 'Using <code>post_ids</code> is the most specific method and it will override category and count (whether settings or attributes).', 'strong-testimonials' ) ); ?></p>
|
132 |
+
</div>
|
133 |
Â
<?php
|
134 |
Â
$content = ob_get_clean();
|
135 |
Â
|
150 |
Â
|
151 |
Â
ob_start();
|
152 |
Â
?>
|
153 |
+
<p><?php esc_html_e( 'Some of the features and drawbacks for each method.', 'strong-testimonials' ); ?></p>
|
154 |
+
|
155 |
+
<table class="wpmtst-help-tab" cellpadding="0" cellspacing="0">
|
156 |
+
<thead>
|
157 |
+
<tr>
|
158 |
+
<th></th>
|
159 |
+
<th><?php esc_html_e( 'Simple', 'strong-testimonials' ); ?></th>
|
160 |
+
<th><?php esc_html_e( 'Standard', 'strong-testimonials' ); ?></th>
|
161 |
+
</tr>
|
162 |
+
</thead>
|
163 |
+
<tbody>
|
164 |
+
<tr>
|
165 |
+
<td><?php esc_html_e( 'best use', 'strong-testimonials' ); ?></td>
|
166 |
+
<td><?php esc_html_e( 'ten pages or less', 'strong-testimonials' ); ?></td>
|
167 |
+
<td><?php esc_html_e( 'more than ten pages', 'strong-testimonials' ); ?></td>
|
168 |
+
</tr>
|
169 |
+
<tr>
|
170 |
+
<td><?php esc_html_e( 'URLs', 'strong-testimonials' ); ?></td>
|
171 |
+
<td><?php esc_html_e( 'does not change the URL', 'strong-testimonials' ); ?></td>
|
172 |
+
<td><?php esc_html_e( 'uses paged URLs just like standard WordPress posts', 'strong-testimonials' ); ?></td>
|
173 |
+
</tr>
|
174 |
+
<tr>
|
175 |
+
<td><?php esc_html_e( 'the Back button', 'strong-testimonials' ); ?></td>
|
176 |
+
<td><?php esc_html_e( 'It does not remember which page of testimonials you are on. If you click away – for example, on a "Read more" link – then click back, you will return to page one.', 'strong-testimonials' ); ?></td>
|
177 |
+
<td><?php esc_html_e( 'You will return the last page you were on so this works well with "Read more" links.', 'strong-testimonials' ); ?></td>
|
178 |
+
</tr>
|
179 |
+
<tr>
|
180 |
+
<td><?php esc_html_e( 'works with random order option', 'strong-testimonials' ); ?></td>
|
181 |
+
<td><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></td>
|
182 |
+
<td><?php esc_html_e( 'no', 'strong-testimonials' ); ?></td>
|
183 |
+
</tr>
|
184 |
+
<tr>
|
185 |
+
<td><?php esc_html_e( 'works in a widget', 'strong-testimonials' ); ?></td>
|
186 |
+
<td><?php esc_html_e( 'yes', 'strong-testimonials' ); ?></td>
|
187 |
+
<td><?php esc_html_e( 'no', 'strong-testimonials' ); ?></td>
|
188 |
+
</tr>
|
189 |
+
</tbody>
|
190 |
+
</table>
|
191 |
Â
<?php
|
192 |
Â
$content = ob_get_clean();
|
193 |
Â
|
admin/class-strong-testimonials-list-table.php
CHANGED
@@ -10,585 +10,629 @@
|
|
10 |
Â
* @access private
|
11 |
Â
*/
|
12 |
Â
|
13 |
-
if ( !class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
14 |
-
|
15 |
-
class Strong_Testimonials_List_Table {
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
/**
|
71 |
-
* The view switcher modes.
|
72 |
-
*
|
73 |
-
* @since 4.1.0
|
74 |
-
* @var array
|
75 |
-
* @access protected
|
76 |
-
*/
|
77 |
-
protected $modes = array();
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Stores the value returned by ->get_column_info()
|
81 |
-
*
|
82 |
-
* @var array
|
83 |
-
*/
|
84 |
-
protected $_column_headers;
|
85 |
-
|
86 |
-
protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' );
|
87 |
-
|
88 |
-
protected $compat_methods = array( 'set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions',
|
89 |
-
'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination',
|
90 |
-
'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav',
|
91 |
-
'single_row_columns' );
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Constructor.
|
95 |
-
*
|
96 |
-
* The child class should call this constructor from its own constructor to override
|
97 |
-
* the default $args.
|
98 |
-
*
|
99 |
-
* @since 3.1.0
|
100 |
-
* @access public
|
101 |
-
*
|
102 |
-
* @param array|string $args {
|
103 |
-
* Array or string of arguments.
|
104 |
-
*
|
105 |
-
* @type string $plural Plural value used for labels and the objects being listed.
|
106 |
-
* This affects things such as CSS class-names and nonces used
|
107 |
-
* in the list table, e.g. 'posts'. Default empty.
|
108 |
-
* @type string $singular Singular label for an object being listed, e.g. 'post'.
|
109 |
-
* Default empty
|
110 |
-
* @type bool $ajax Whether the list table supports AJAX. This includes loading
|
111 |
-
* and sorting data, for example. If true, the class will call
|
112 |
-
* the {@see _js_vars()} method in the footer to provide variables
|
113 |
-
* to any scripts handling AJAX events. Default false.
|
114 |
-
* @type string $screen String containing the hook name used to determine the current
|
115 |
-
* screen. If left null, the current screen will be automatically set.
|
116 |
-
* Default null.
|
117 |
-
* }
|
118 |
-
*/
|
119 |
-
public function __construct( $args = array() ) {
|
120 |
-
$args = wp_parse_args( $args, array(
|
121 |
-
'plural' => '',
|
122 |
-
'singular' => '',
|
123 |
-
'ajax' => false,
|
124 |
-
'screen' => null,
|
125 |
-
) );
|
126 |
-
|
127 |
-
$this->screen = convert_to_screen( $args['screen'] );
|
128 |
-
|
129 |
-
add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
|
130 |
-
|
131 |
-
if ( !$args['plural'] )
|
132 |
-
$args['plural'] = $this->screen->base;
|
133 |
-
|
134 |
-
$args['plural'] = sanitize_key( $args['plural'] );
|
135 |
-
$args['singular'] = sanitize_key( $args['singular'] );
|
136 |
-
|
137 |
-
$this->_args = $args;
|
138 |
-
|
139 |
-
if ( $args['ajax'] ) {
|
140 |
-
// wp_enqueue_script( 'list-table' );
|
141 |
-
add_action( 'admin_footer', array( $this, '_js_vars' ) );
|
142 |
-
}
|
143 |
Â
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
);
|
149 |
-
}
|
150 |
-
}
|
151 |
Â
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
164 |
Â
}
|
165 |
-
}
|
166 |
Â
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
Â
}
|
181 |
-
}
|
182 |
Â
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
Â
|
|
Â
|
|
195 |
Â
}
|
196 |
-
}
|
197 |
Â
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
Â
|
|
Â
|
|
209 |
Â
}
|
210 |
-
}
|
211 |
Â
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
return call_user_func_array( array( $this, $name ), $arguments );
|
225 |
Â
}
|
226 |
-
return false;
|
227 |
-
}
|
228 |
Â
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
239 |
Â
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
}
|
251 |
Â
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
'
|
262 |
-
'per_page' => 0,
|
263 |
-
) );
|
264 |
-
|
265 |
-
if ( !$args['total_pages'] && $args['per_page'] > 0 )
|
266 |
-
$args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
|
267 |
-
|
268 |
-
// Redirect if page number is invalid and headers are not already sent.
|
269 |
-
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
270 |
-
wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
|
271 |
-
exit;
|
272 |
Â
}
|
273 |
Â
|
274 |
-
|
275 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
276 |
Â
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
* @since 3.1.0
|
281 |
-
* @access public
|
282 |
-
*
|
283 |
-
* @param string $key Pagination argument to retrieve. Common values include 'total_items',
|
284 |
-
* 'total_pages', 'per_page', or 'infinite_scroll'.
|
285 |
-
* @return int Number of items that correspond to the given pagination argument.
|
286 |
-
*/
|
287 |
-
public function get_pagination_arg( $key ) {
|
288 |
-
if ( 'page' == $key )
|
289 |
-
return $this->get_pagenum();
|
290 |
-
|
291 |
-
if ( isset( $this->_pagination_args[$key] ) )
|
292 |
-
return $this->_pagination_args[$key];
|
293 |
-
}
|
294 |
Â
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
*
|
301 |
-
* @return bool
|
302 |
-
*/
|
303 |
-
public function has_items() {
|
304 |
-
return !empty( $this->items );
|
305 |
-
}
|
306 |
Â
|
307 |
-
|
308 |
-
|
309 |
-
*
|
310 |
-
* @since 3.1.0
|
311 |
-
* @access public
|
312 |
-
*/
|
313 |
-
public function no_items() {
|
314 |
-
_e( 'No items found.' );
|
315 |
-
}
|
316 |
Â
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
if ( ! empty( $_REQUEST['orderby'] ) )
|
333 |
-
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '">';
|
334 |
-
if ( ! empty( $_REQUEST['order'] ) )
|
335 |
-
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '">';
|
336 |
-
if ( ! empty( $_REQUEST['post_mime_type'] ) )
|
337 |
-
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '">';
|
338 |
-
if ( ! empty( $_REQUEST['detached'] ) )
|
339 |
-
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '">';
|
340 |
-
?>
|
341 |
-
<p class="search-box">
|
342 |
-
<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
|
343 |
-
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>">
|
344 |
-
<?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
|
345 |
-
</p>
|
346 |
-
<?php
|
347 |
-
}
|
348 |
Â
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
* @since 3.1.0
|
354 |
-
* @access protected
|
355 |
-
*
|
356 |
-
* @return array
|
357 |
-
*/
|
358 |
-
protected function get_views() {
|
359 |
-
return array();
|
360 |
-
}
|
361 |
Â
|
362 |
-
/**
|
363 |
-
* Display the list of views available on this table.
|
364 |
-
*
|
365 |
-
* @since 3.1.0
|
366 |
-
* @access public
|
367 |
-
*/
|
368 |
-
public function views() {
|
369 |
-
$views = $this->get_views();
|
370 |
Â
/**
|
371 |
-
*
|
372 |
Â
*
|
373 |
-
*
|
374 |
-
*
|
375 |
Â
*
|
376 |
-
* @
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
377 |
Â
*
|
378 |
-
* @
|
Â
|
|
379 |
Â
*/
|
380 |
-
|
Â
|
|
Â
|
|
381 |
Â
|
382 |
-
|
383 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
384 |
Â
|
385 |
-
|
386 |
-
|
387 |
-
$
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
388 |
Â
}
|
389 |
-
echo implode( " |</li>\n", $views ) . "</li>\n";
|
390 |
-
echo "</ul>";
|
391 |
-
}
|
392 |
Â
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
Â
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
*/
|
415 |
-
protected function bulk_actions( $which = '' ) {
|
416 |
-
if ( is_null( $this->_actions ) ) {
|
417 |
-
$no_new_actions = $this->_actions = $this->get_bulk_actions();
|
418 |
Â
/**
|
419 |
-
* Filter the list
|
420 |
Â
*
|
421 |
Â
* The dynamic portion of the hook name, `$this->screen->id`, refers
|
422 |
Â
* to the ID of the current screen, usually a string.
|
423 |
Â
*
|
424 |
-
* This filter can currently only be used to remove bulk actions.
|
425 |
-
*
|
426 |
Â
* @since 3.5.0
|
427 |
Â
*
|
428 |
-
* @param array $
|
429 |
Â
*/
|
430 |
-
$
|
431 |
-
$this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
|
432 |
-
$two = '';
|
433 |
-
} else {
|
434 |
-
$two = '2';
|
435 |
-
}
|
436 |
Â
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
|
441 |
-
echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
|
442 |
-
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
|
443 |
Â
|
444 |
-
|
445 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
446 |
Â
|
447 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
448 |
Â
}
|
449 |
Â
|
450 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
451 |
Â
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
Â
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
* @since 3.1.0
|
460 |
-
* @access public
|
461 |
-
*
|
462 |
-
* @return string|bool The action name or False if no action was selected
|
463 |
-
*/
|
464 |
-
public function current_action() {
|
465 |
-
if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
|
466 |
-
return false;
|
467 |
Â
|
468 |
-
|
469 |
-
|
470 |
Â
|
471 |
-
|
472 |
-
|
473 |
Â
|
474 |
-
|
475 |
-
}
|
476 |
Â
|
477 |
-
|
478 |
-
|
479 |
-
*
|
480 |
-
* @since 3.1.0
|
481 |
-
* @access protected
|
482 |
-
*
|
483 |
-
* @param array $actions The list of actions
|
484 |
-
* @param bool $always_visible Whether the actions should be always visible
|
485 |
-
* @return string
|
486 |
-
*/
|
487 |
-
protected function row_actions( $actions, $always_visible = false ) {
|
488 |
-
$action_count = count( $actions );
|
489 |
-
$i = 0;
|
490 |
-
|
491 |
-
if ( !$action_count )
|
492 |
-
return '';
|
493 |
-
|
494 |
-
$out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
|
495 |
-
foreach ( $actions as $action => $link ) {
|
496 |
-
++$i;
|
497 |
-
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
|
498 |
-
$out .= "<span class='$action'>$link$sep</span>";
|
499 |
Â
}
|
500 |
-
$out .= '</div>';
|
501 |
Â
|
502 |
-
|
503 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
504 |
Â
|
505 |
-
|
506 |
-
|
507 |
-
*
|
508 |
-
* @since 3.1.0
|
509 |
-
* @access protected
|
510 |
-
*
|
511 |
-
* @param string $post_type
|
512 |
-
*/
|
513 |
-
protected function months_dropdown( $post_type ) {
|
514 |
-
global $wpdb, $wp_locale;
|
515 |
Â
|
516 |
Â
/**
|
517 |
-
*
|
518 |
Â
*
|
519 |
-
* @since
|
Â
|
|
520 |
Â
*
|
521 |
-
* @param
|
522 |
-
* @param
|
Â
|
|
523 |
Â
*/
|
524 |
-
|
525 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
526 |
Â
}
|
527 |
Â
|
528 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
529 |
Â
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
530 |
Â
FROM $wpdb->posts
|
531 |
Â
WHERE post_type = %s
|
532 |
Â
ORDER BY post_date DESC
|
533 |
-
",
|
Â
|
|
Â
|
|
Â
|
|
534 |
Â
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
Â
|
545 |
-
|
546 |
Â
|
547 |
-
|
548 |
-
|
Â
|
|
549 |
Â
|
550 |
-
|
551 |
-
?>
|
552 |
-
<label for="filter-by-date" class="screen-reader-text"><?php
|
553 |
Â
<select name="m" id="filter-by-date">
|
554 |
-
<option<?php selected( $m, 0 ); ?> value="0"><?php
|
555 |
-
<?php
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
Â
|
|
Â
|
|
571 |
Â
</select>
|
572 |
-
<?php
|
573 |
-
|
574 |
Â
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
?>
|
585 |
Â
<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>">
|
586 |
Â
<div class="view-switch">
|
587 |
-
<?php
|
588 |
Â
foreach ( $this->modes as $mode => $title ) {
|
589 |
Â
$classes = array( 'view-' . $mode );
|
590 |
-
if ( $current_mode == $mode )
|
591 |
Â
$classes[] = 'current';
|
Â
|
|
592 |
Â
printf(
|
593 |
Â
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
|
594 |
Â
esc_url( add_query_arg( 'mode', $mode ) ),
|
@@ -596,552 +640,573 @@ class Strong_Testimonials_List_Table {
|
|
596 |
Â
$title
|
597 |
Â
);
|
598 |
Â
}
|
599 |
-
|
600 |
Â
</div>
|
601 |
-
<?php
|
602 |
-
|
603 |
Â
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
if ( $pending_comments )
|
617 |
-
echo '<strong>';
|
618 |
-
|
619 |
-
echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
|
620 |
-
|
621 |
-
if ( $pending_comments )
|
622 |
-
echo '</strong>';
|
623 |
-
}
|
624 |
Â
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
* @since 3.1.0
|
629 |
-
* @access public
|
630 |
-
*
|
631 |
-
* @return int
|
632 |
-
*/
|
633 |
-
public function get_pagenum() {
|
634 |
-
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
635 |
-
|
636 |
-
if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
|
637 |
-
$pagenum = $this->_pagination_args['total_pages'];
|
638 |
-
|
639 |
-
return max( 1, $pagenum );
|
640 |
-
}
|
641 |
Â
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
* @param string $option
|
649 |
-
* @param int $default
|
650 |
-
* @return int
|
651 |
-
*/
|
652 |
-
protected function get_items_per_page( $option, $default = 20 ) {
|
653 |
-
$per_page = (int) get_user_option( $option );
|
654 |
-
if ( empty( $per_page ) || $per_page < 1 )
|
655 |
-
$per_page = $default;
|
656 |
Â
|
657 |
Â
/**
|
658 |
-
*
|
659 |
-
*
|
660 |
-
* The dynamic hook name, $option, refers to the `per_page` option depending
|
661 |
-
* on the type of list table in use. Possible values include: 'edit_comments_per_page',
|
662 |
-
* 'sites_network_per_page', 'site_themes_network_per_page', 'themes_network_per_page',
|
663 |
-
* 'users_network_per_page', 'edit_post_per_page', 'edit_page_per_page',
|
664 |
-
* 'edit_{$post_type}_per_page', etc.
|
665 |
Â
*
|
666 |
-
* @since
|
Â
|
|
667 |
Â
*
|
668 |
-
* @
|
669 |
Â
*/
|
670 |
-
|
671 |
-
|
672 |
Â
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
*
|
679 |
-
* @param string $which
|
680 |
-
*/
|
681 |
-
protected function pagination( $which ) {
|
682 |
-
if ( empty( $this->_pagination_args ) ) {
|
683 |
-
return;
|
684 |
Â
}
|
685 |
Â
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
691 |
Â
}
|
692 |
Â
|
693 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
694 |
Â
|
695 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
696 |
Â
|
697 |
-
|
698 |
Â
|
699 |
-
|
700 |
Â
|
701 |
-
|
702 |
Â
|
703 |
-
|
704 |
-
if ( $current == 1 ) {
|
705 |
-
$disable_first = ' disabled';
|
706 |
-
}
|
707 |
-
if ( $current == $total_pages ) {
|
708 |
-
$disable_last = ' disabled';
|
709 |
-
}
|
710 |
-
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
711 |
-
'first-page' . $disable_first,
|
712 |
-
esc_attr__( 'Go to the first page' ),
|
713 |
-
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
714 |
-
'«'
|
715 |
-
);
|
716 |
Â
|
717 |
-
|
718 |
-
'prev-page' . $disable_first,
|
719 |
-
esc_attr__( 'Go to the previous page' ),
|
720 |
-
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
|
721 |
-
'‹'
|
722 |
-
);
|
723 |
Â
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
732 |
Â
);
|
733 |
-
}
|
734 |
-
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
735 |
-
$page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
|
736 |
-
|
737 |
-
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
738 |
-
'next-page' . $disable_last,
|
739 |
-
esc_attr__( 'Go to the next page' ),
|
740 |
-
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
|
741 |
-
'›'
|
742 |
-
);
|
743 |
-
|
744 |
-
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
745 |
-
'last-page' . $disable_last,
|
746 |
-
esc_attr__( 'Go to the last page' ),
|
747 |
-
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
748 |
-
'»'
|
749 |
-
);
|
750 |
Â
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
Â
|
|
Â
|
|
756 |
Â
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
763 |
Â
|
764 |
-
|
765 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
766 |
Â
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
* @access public
|
773 |
-
* @abstract
|
774 |
-
*
|
775 |
-
* @return array
|
776 |
-
*/
|
777 |
-
public function get_columns() {
|
778 |
-
die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
|
779 |
-
}
|
780 |
Â
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
* The second format will make the initial sorting order be descending
|
788 |
-
*
|
789 |
-
* @since 3.1.0
|
790 |
-
* @access protected
|
791 |
-
*
|
792 |
-
* @return array
|
793 |
-
*/
|
794 |
-
protected function get_sortable_columns() {
|
795 |
-
return array();
|
796 |
-
}
|
797 |
Â
|
798 |
-
|
799 |
-
|
800 |
-
*
|
801 |
-
* @since 3.1.0
|
802 |
-
* @access protected
|
803 |
-
*
|
804 |
-
* @return array
|
805 |
-
*/
|
806 |
-
protected function get_column_info() {
|
807 |
-
if ( isset( $this->_column_headers ) )
|
808 |
-
return $this->_column_headers;
|
809 |
Â
|
810 |
-
|
811 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
812 |
Â
|
813 |
-
$sortable_columns = $this->get_sortable_columns();
|
814 |
Â
/**
|
815 |
-
*
|
Â
|
|
Â
|
|
Â
|
|
816 |
Â
*
|
817 |
-
* The
|
818 |
-
* to the ID of the current screen, usually a string.
|
819 |
Â
*
|
820 |
-
* @since 3.
|
Â
|
|
821 |
Â
*
|
822 |
-
* @
|
823 |
Â
*/
|
824 |
-
|
Â
|
|
Â
|
|
825 |
Â
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
830 |
Â
|
831 |
-
$
|
832 |
-
|
833 |
-
$data[1] = false;
|
834 |
Â
|
835 |
-
$
|
836 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
837 |
Â
|
838 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
839 |
Â
|
840 |
-
|
841 |
-
|
Â
|
|
Â
|
|
842 |
Â
|
843 |
-
|
844 |
-
|
845 |
-
*
|
846 |
-
* @since 3.1.0
|
847 |
-
* @access public
|
848 |
-
*
|
849 |
-
* @return int
|
850 |
-
*/
|
851 |
-
public function get_column_count() {
|
852 |
-
list ( $columns, $hidden ) = $this->get_column_info();
|
853 |
-
$hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
|
854 |
-
return count( $columns ) - count( $hidden );
|
855 |
-
}
|
856 |
Â
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
* @since 3.1.0
|
861 |
-
* @access public
|
862 |
-
*
|
863 |
-
* @param bool $with_id Whether to set the id attribute or not
|
864 |
-
*/
|
865 |
-
public function print_column_headers( $with_id = true ) {
|
866 |
-
list( $columns, $hidden, $sortable ) = $this->get_column_info();
|
867 |
-
|
868 |
-
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
869 |
-
$current_url = remove_query_arg( 'paged', $current_url );
|
870 |
-
|
871 |
-
if ( isset( $_GET['orderby'] ) )
|
872 |
-
$current_orderby = $_GET['orderby'];
|
873 |
-
else
|
874 |
-
$current_orderby = '';
|
875 |
-
|
876 |
-
if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
|
877 |
-
$current_order = 'desc';
|
878 |
-
else
|
879 |
-
$current_order = 'asc';
|
880 |
-
|
881 |
-
if ( ! empty( $columns['cb'] ) ) {
|
882 |
-
static $cb_counter = 1;
|
883 |
-
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
|
884 |
-
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox">';
|
885 |
-
$cb_counter++;
|
886 |
Â
}
|
887 |
Â
|
888 |
-
|
889 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
890 |
Â
|
891 |
-
|
892 |
-
|
893 |
-
|
Â
|
|
Â
|
|
894 |
Â
|
895 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
896 |
Â
|
897 |
-
if ( 'cb'
|
898 |
-
$
|
899 |
-
|
900 |
-
|
Â
|
|
Â
|
|
901 |
Â
|
902 |
-
|
903 |
-
|
904 |
Â
|
905 |
-
|
906 |
-
|
907 |
-
$
|
908 |
-
$class[] = $current_order;
|
909 |
-
} else {
|
910 |
-
$order = $desc_first ? 'desc' : 'asc';
|
911 |
-
$class[] = 'sortable';
|
912 |
-
$class[] = $desc_first ? 'asc' : 'desc';
|
913 |
Â
}
|
914 |
Â
|
915 |
-
$
|
916 |
-
}
|
917 |
Â
|
918 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
919 |
Â
|
920 |
-
|
921 |
-
|
Â
|
|
Â
|
|
922 |
Â
|
923 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
924 |
Â
}
|
925 |
-
}
|
926 |
Â
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
Â
|
936 |
-
|
937 |
Â
|
938 |
-
?>
|
939 |
Â
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
940 |
Â
<thead>
|
941 |
Â
<tr>
|
942 |
-
|
943 |
Â
</tr>
|
944 |
Â
</thead>
|
945 |
Â
|
946 |
-
<tbody id="the-list"
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
Â
|
|
Â
|
|
Â
|
|
951 |
Â
</tbody>
|
952 |
Â
|
953 |
Â
<tfoot>
|
954 |
Â
<tr>
|
955 |
-
|
956 |
Â
</tr>
|
957 |
Â
</tfoot>
|
958 |
Â
|
959 |
Â
</table>
|
960 |
-
<?php
|
961 |
-
|
962 |
-
|
963 |
Â
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
Â
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
Â
|
|
987 |
Â
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
988 |
Â
|
989 |
Â
<div class="alignleft actions bulkactions">
|
990 |
Â
<?php $this->bulk_actions( $which ); ?>
|
991 |
Â
</div>
|
992 |
-
<?php
|
993 |
-
|
994 |
-
|
995 |
-
?>
|
996 |
Â
|
997 |
Â
<br class="clear">
|
998 |
Â
</div>
|
999 |
-
<?php
|
1000 |
-
|
1001 |
Â
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
Â
|
|
1025 |
Â
}
|
1026 |
-
}
|
1027 |
Â
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
Â
|
|
1038 |
Â
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
Â
|
1053 |
-
|
1054 |
Â
|
1055 |
-
|
1056 |
Â
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
Â
|
1068 |
-
|
1069 |
-
|
1070 |
Â
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
Â
|
|
1074 |
Â
|
1075 |
-
|
1076 |
Â
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
echo "</td>";
|
1091 |
Â
}
|
1092 |
Â
}
|
1093 |
-
}
|
1094 |
Â
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
Â
|
1111 |
-
|
1112 |
Â
|
1113 |
-
|
1114 |
Â
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
Â
|
1126 |
-
|
1127 |
-
|
1128 |
Â
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
Â
|
1143 |
-
|
Â
|
|
1144 |
Â
}
|
1145 |
-
}
|
1146 |
Â
|
1147 |
-
endif;
|
10 |
Â
* @access private
|
11 |
Â
*/
|
12 |
Â
|
13 |
+
if ( ! class_exists( 'Strong_Testimonials_List_Table' ) ) :
|
14 |
+
|
15 |
+
class Strong_Testimonials_List_Table {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The current list of items
|
19 |
+
*
|
20 |
+
* @since 3.1.0
|
21 |
+
* @var array
|
22 |
+
* @access public
|
23 |
+
*/
|
24 |
+
public $items;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Various information about the current table
|
28 |
+
*
|
29 |
+
* @since 3.1.0
|
30 |
+
* @var array
|
31 |
+
* @access protected
|
32 |
+
*/
|
33 |
+
protected $_args;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Various information needed for displaying the pagination
|
37 |
+
*
|
38 |
+
* @since 3.1.0
|
39 |
+
* @var array
|
40 |
+
*/
|
41 |
+
protected $_pagination_args = array();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The current screen
|
45 |
+
*
|
46 |
+
* @since 3.1.0
|
47 |
+
* @var object
|
48 |
+
* @access protected
|
49 |
+
*/
|
50 |
+
protected $screen;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Cached bulk actions
|
54 |
+
*
|
55 |
+
* @since 3.1.0
|
56 |
+
* @var array
|
57 |
+
* @access private
|
58 |
+
*/
|
59 |
+
private $_actions;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Cached pagination output
|
63 |
+
*
|
64 |
+
* @since 3.1.0
|
65 |
+
* @var string
|
66 |
+
* @access private
|
67 |
+
*/
|
68 |
+
private $_pagination;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
69 |
Â
|
70 |
+
/**
|
71 |
+
* The view switcher modes.
|
72 |
+
*
|
73 |
+
* @since 4.1.0
|
74 |
+
* @var array
|
75 |
+
* @access protected
|
76 |
+
*/
|
77 |
+
protected $modes = array();
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Stores the value returned by ->get_column_info()
|
81 |
+
*
|
82 |
+
* @var array
|
83 |
+
*/
|
84 |
+
protected $_column_headers;
|
85 |
+
|
86 |
+
protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' );
|
87 |
+
|
88 |
+
protected $compat_methods = array(
|
89 |
+
'set_pagination_args',
|
90 |
+
'get_views',
|
91 |
+
'get_bulk_actions',
|
92 |
+
'bulk_actions',
|
93 |
+
'row_actions',
|
94 |
+
'months_dropdown',
|
95 |
+
'view_switcher',
|
96 |
+
'comments_bubble',
|
97 |
+
'get_items_per_page',
|
98 |
+
'pagination',
|
99 |
+
'get_sortable_columns',
|
100 |
+
'get_column_info',
|
101 |
+
'get_table_classes',
|
102 |
+
'display_tablenav',
|
103 |
+
'extra_tablenav',
|
104 |
+
'single_row_columns',
|
105 |
+
);
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Constructor.
|
109 |
+
*
|
110 |
+
* The child class should call this constructor from its own constructor to override
|
111 |
+
* the default $args.
|
112 |
+
*
|
113 |
+
* @since 3.1.0
|
114 |
+
* @access public
|
115 |
+
*
|
116 |
+
* @param array|string $args {
|
117 |
+
* Array or string of arguments.
|
118 |
+
*
|
119 |
+
* @type string $plural Plural value used for labels and the objects being listed.
|
120 |
+
* This affects things such as CSS class-names and nonces used
|
121 |
+
* in the list table, e.g. 'posts'. Default empty.
|
122 |
+
* @type string $singular Singular label for an object being listed, e.g. 'post'.
|
123 |
+
* Default empty
|
124 |
+
* @type bool $ajax Whether the list table supports AJAX. This includes loading
|
125 |
+
* and sorting data, for example. If true, the class will call
|
126 |
+
* the {@see _js_vars()} method in the footer to provide variables
|
127 |
+
* to any scripts handling AJAX events. Default false.
|
128 |
+
* @type string $screen String containing the hook name used to determine the current
|
129 |
+
* screen. If left null, the current screen will be automatically set.
|
130 |
+
* Default null.
|
131 |
+
* }
|
132 |
+
*/
|
133 |
+
public function __construct( $args = array() ) {
|
134 |
+
$args = wp_parse_args(
|
135 |
+
$args,
|
136 |
+
array(
|
137 |
+
'plural' => '',
|
138 |
+
'singular' => '',
|
139 |
+
'ajax' => false,
|
140 |
+
'screen' => null,
|
141 |
+
)
|
142 |
Â
);
|
Â
|
|
Â
|
|
143 |
Â
|
144 |
+
$this->screen = convert_to_screen( $args['screen'] );
|
145 |
+
|
146 |
+
add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
|
147 |
+
|
148 |
+
if ( ! $args['plural'] ) {
|
149 |
+
$args['plural'] = $this->screen->base;
|
150 |
+
}
|
151 |
+
|
152 |
+
$args['plural'] = sanitize_key( $args['plural'] );
|
153 |
+
$args['singular'] = sanitize_key( $args['singular'] );
|
154 |
+
|
155 |
+
$this->_args = $args;
|
156 |
+
|
157 |
+
if ( $args['ajax'] ) {
|
158 |
+
// wp_enqueue_script( 'list-table' );
|
159 |
+
add_action( 'admin_footer', array( $this, '_js_vars' ) );
|
160 |
+
}
|
161 |
+
|
162 |
+
if ( empty( $this->modes ) ) {
|
163 |
+
$this->modes = array(
|
164 |
+
'list' => __( 'List View', 'strong-testimonials' ),
|
165 |
+
'excerpt' => __( 'Excerpt View', 'strong-testimonials' ),
|
166 |
+
);
|
167 |
+
}
|
168 |
Â
}
|
Â
|
|
169 |
Â
|
170 |
+
/**
|
171 |
+
* Make private properties readable for backwards compatibility.
|
172 |
+
*
|
173 |
+
* @since 4.0.0
|
174 |
+
* @access public
|
175 |
+
*
|
176 |
+
* @param string $name Property to get.
|
177 |
+
* @return mixed Property.
|
178 |
+
*/
|
179 |
+
public function __get( $name ) {
|
180 |
+
if ( in_array( $name, $this->compat_fields ) ) {
|
181 |
+
return $this->$name;
|
182 |
+
}
|
183 |
Â
}
|
Â
|
|
184 |
Â
|
185 |
+
/**
|
186 |
+
* Make private properties settable for backwards compatibility.
|
187 |
+
*
|
188 |
+
* @since 4.0.0
|
189 |
+
* @access public
|
190 |
+
*
|
191 |
+
* @param string $name Property to check if set.
|
192 |
+
* @param mixed $value Property value.
|
193 |
+
* @return mixed Newly-set property.
|
194 |
+
*/
|
195 |
+
public function __set( $name, $value ) {
|
196 |
+
if ( in_array( $name, $this->compat_fields ) ) {
|
197 |
+
return $this->$name = $value;
|
198 |
+
}
|
199 |
Â
}
|
Â
|
|
200 |
Â
|
201 |
+
/**
|
202 |
+
* Make private properties checkable for backwards compatibility.
|
203 |
+
*
|
204 |
+
* @since 4.0.0
|
205 |
+
* @access public
|
206 |
+
*
|
207 |
+
* @param string $name Property to check if set.
|
208 |
+
* @return bool Whether the property is set.
|
209 |
+
*/
|
210 |
+
public function __isset( $name ) {
|
211 |
+
if ( in_array( $name, $this->compat_fields ) ) {
|
212 |
+
return isset( $this->$name );
|
213 |
+
}
|
214 |
Â
}
|
Â
|
|
215 |
Â
|
216 |
+
/**
|
217 |
+
* Make private properties un-settable for backwards compatibility.
|
218 |
+
*
|
219 |
+
* @since 4.0.0
|
220 |
+
* @access public
|
221 |
+
*
|
222 |
+
* @param string $name Property to unset.
|
223 |
+
*/
|
224 |
+
public function __unset( $name ) {
|
225 |
+
if ( in_array( $name, $this->compat_fields ) ) {
|
226 |
+
unset( $this->$name );
|
227 |
+
}
|
Â
|
|
228 |
Â
}
|
Â
|
|
Â
|
|
229 |
Â
|
230 |
+
/**
|
231 |
+
* Make private/protected methods readable for backwards compatibility.
|
232 |
+
*
|
233 |
+
* @since 4.0.0
|
234 |
+
* @access public
|
235 |
+
*
|
236 |
+
* @param callable $name Method to call.
|
237 |
+
* @param array $arguments Arguments to pass when calling.
|
238 |
+
* @return mixed|bool Return value of the callback, false otherwise.
|
239 |
+
*/
|
240 |
+
public function __call( $name, $arguments ) {
|
241 |
+
if ( in_array( $name, $this->compat_methods ) ) {
|
242 |
+
return call_user_func_array( array( $this, $name ), $arguments );
|
243 |
+
}
|
244 |
+
return false;
|
245 |
+
}
|
246 |
Â
|
247 |
+
/**
|
248 |
+
* Checks the current user's permissions
|
249 |
+
*
|
250 |
+
* @since 3.1.0
|
251 |
+
* @access public
|
252 |
+
* @abstract
|
253 |
+
*/
|
254 |
+
public function ajax_user_can() {
|
255 |
+
die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
|
256 |
+
}
|
Â
|
|
257 |
Â
|
258 |
+
/**
|
259 |
+
* Prepares the list of items for displaying.
|
260 |
+
* @uses WP_List_Table::set_pagination_args()
|
261 |
+
*
|
262 |
+
* @since 3.1.0
|
263 |
+
* @access public
|
264 |
+
* @abstract
|
265 |
+
*/
|
266 |
+
public function prepare_items() {
|
267 |
+
die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
268 |
Â
}
|
269 |
Â
|
270 |
+
/**
|
271 |
+
* An internal method that sets all the necessary pagination arguments
|
272 |
+
*
|
273 |
+
* @param array $args An associative array with information about the pagination
|
274 |
+
* @access protected
|
275 |
+
*/
|
276 |
+
protected function set_pagination_args( $args ) {
|
277 |
+
$args = wp_parse_args(
|
278 |
+
$args,
|
279 |
+
array(
|
280 |
+
'total_items' => 0,
|
281 |
+
'total_pages' => 0,
|
282 |
+
'per_page' => 0,
|
283 |
+
)
|
284 |
+
);
|
285 |
Â
|
286 |
+
if ( ! $args['total_pages'] && $args['per_page'] > 0 ) {
|
287 |
+
$args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
|
288 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
289 |
Â
|
290 |
+
// Redirect if page number is invalid and headers are not already sent.
|
291 |
+
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
292 |
+
wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
|
293 |
+
exit;
|
294 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
295 |
Â
|
296 |
+
$this->_pagination_args = $args;
|
297 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
298 |
Â
|
299 |
+
/**
|
300 |
+
* Access the pagination args.
|
301 |
+
*
|
302 |
+
* @since 3.1.0
|
303 |
+
* @access public
|
304 |
+
*
|
305 |
+
* @param string $key Pagination argument to retrieve. Common values include 'total_items',
|
306 |
+
* 'total_pages', 'per_page', or 'infinite_scroll'.
|
307 |
+
* @return int Number of items that correspond to the given pagination argument.
|
308 |
+
*/
|
309 |
+
public function get_pagination_arg( $key ) {
|
310 |
+
if ( 'page' == $key ) {
|
311 |
+
return $this->get_pagenum();
|
312 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
313 |
Â
|
314 |
+
if ( isset( $this->_pagination_args[ $key ] ) ) {
|
315 |
+
return $this->_pagination_args[ $key ];
|
316 |
+
}
|
317 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
318 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
319 |
Â
/**
|
320 |
+
* Whether the table has items to display or not
|
321 |
Â
*
|
322 |
+
* @since 3.1.0
|
323 |
+
* @access public
|
324 |
Â
*
|
325 |
+
* @return bool
|
326 |
+
*/
|
327 |
+
public function has_items() {
|
328 |
+
return ! empty( $this->items );
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Message to be displayed when there are no items
|
333 |
Â
*
|
334 |
+
* @since 3.1.0
|
335 |
+
* @access public
|
336 |
Â
*/
|
337 |
+
public function no_items() {
|
338 |
+
esc_html_e( 'No items found.', 'strong-testimonials' );
|
339 |
+
}
|
340 |
Â
|
341 |
+
/**
|
342 |
+
* Display the search box.
|
343 |
+
*
|
344 |
+
* @since 3.1.0
|
345 |
+
* @access public
|
346 |
+
*
|
347 |
+
* @param string $text The search button text
|
348 |
+
* @param string $input_id The search input id
|
349 |
+
*/
|
350 |
+
public function search_box( $text, $input_id ) {
|
351 |
+
if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
|
352 |
+
return;
|
353 |
+
}
|
354 |
Â
|
355 |
+
$input_id = $input_id . '-search-input';
|
356 |
+
|
357 |
+
if ( ! empty( $_REQUEST['orderby'] ) ) {
|
358 |
+
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '">';
|
359 |
+
}
|
360 |
+
if ( ! empty( $_REQUEST['order'] ) ) {
|
361 |
+
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '">';
|
362 |
+
}
|
363 |
+
if ( ! empty( $_REQUEST['post_mime_type'] ) ) {
|
364 |
+
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '">';
|
365 |
+
}
|
366 |
+
if ( ! empty( $_REQUEST['detached'] ) ) {
|
367 |
+
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '">';
|
368 |
+
}
|
369 |
+
?>
|
370 |
+
<p class="search-box">
|
371 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $text ); ?>:</label>
|
372 |
+
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>">
|
373 |
+
<?php submit_button( $text, 'button', '', false, array( 'id' => 'search-submit' ) ); ?>
|
374 |
+
</p>
|
375 |
+
<?php
|
376 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
377 |
Â
|
378 |
+
/**
|
379 |
+
* Get an associative array ( id => link ) with the list
|
380 |
+
* of views available on this table.
|
381 |
+
*
|
382 |
+
* @since 3.1.0
|
383 |
+
* @access protected
|
384 |
+
*
|
385 |
+
* @return array
|
386 |
+
*/
|
387 |
+
protected function get_views() {
|
388 |
+
return array();
|
389 |
+
}
|
390 |
Â
|
391 |
+
/**
|
392 |
+
* Display the list of views available on this table.
|
393 |
+
*
|
394 |
+
* @since 3.1.0
|
395 |
+
* @access public
|
396 |
+
*/
|
397 |
+
public function views() {
|
398 |
+
$views = $this->get_views();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
399 |
Â
/**
|
400 |
+
* Filter the list of available list table views.
|
401 |
Â
*
|
402 |
Â
* The dynamic portion of the hook name, `$this->screen->id`, refers
|
403 |
Â
* to the ID of the current screen, usually a string.
|
404 |
Â
*
|
Â
|
|
Â
|
|
405 |
Â
* @since 3.5.0
|
406 |
Â
*
|
407 |
+
* @param array $views An array of available list table views.
|
408 |
Â
*/
|
409 |
+
$views = apply_filters( "views_{$this->screen->id}", $views );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
410 |
Â
|
411 |
+
if ( empty( $views ) ) {
|
412 |
+
return;
|
413 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
414 |
Â
|
415 |
+
echo "<ul class='subsubsub'>\n";
|
416 |
+
foreach ( $views as $class => $view ) {
|
417 |
+
$views[ $class ] = "\t<li class='$class'>$view";
|
418 |
+
}
|
419 |
+
echo implode( " |</li>\n", wp_kses_post( $views ) ) . "</li>\n";
|
420 |
+
echo '</ul>';
|
421 |
+
}
|
422 |
Â
|
423 |
+
/**
|
424 |
+
* Get an associative array ( option_name => option_title ) with the list
|
425 |
+
* of bulk actions available on this table.
|
426 |
+
*
|
427 |
+
* @since 3.1.0
|
428 |
+
* @access protected
|
429 |
+
*
|
430 |
+
* @return array
|
431 |
+
*/
|
432 |
+
protected function get_bulk_actions() {
|
433 |
+
return array();
|
434 |
Â
}
|
435 |
Â
|
436 |
+
/**
|
437 |
+
* Display the bulk actions dropdown.
|
438 |
+
*
|
439 |
+
* @since 3.1.0
|
440 |
+
* @access protected
|
441 |
+
*
|
442 |
+
* @param string $which The location of the bulk actions: 'top' or 'bottom'.
|
443 |
+
* This is designated as optional for backwards-compatibility.
|
444 |
+
*/
|
445 |
+
protected function bulk_actions( $which = '' ) {
|
446 |
+
if ( is_null( $this->_actions ) ) {
|
447 |
+
$no_new_actions = $this->_actions = $this->get_bulk_actions();
|
448 |
+
/**
|
449 |
+
* Filter the list table Bulk Actions drop-down.
|
450 |
+
*
|
451 |
+
* The dynamic portion of the hook name, `$this->screen->id`, refers
|
452 |
+
* to the ID of the current screen, usually a string.
|
453 |
+
*
|
454 |
+
* This filter can currently only be used to remove bulk actions.
|
455 |
+
*
|
456 |
+
* @since 3.5.0
|
457 |
+
*
|
458 |
+
* @param array $actions An array of the available bulk actions.
|
459 |
+
*/
|
460 |
+
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
|
461 |
+
$this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
|
462 |
+
$two = '';
|
463 |
+
} else {
|
464 |
+
$two = '2';
|
465 |
+
}
|
466 |
Â
|
467 |
+
if ( empty( $this->_actions ) ) {
|
468 |
+
return;
|
469 |
+
}
|
470 |
Â
|
471 |
+
echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . esc_html__( 'Select bulk action', 'strong-testimonials' ) . '</label>';
|
472 |
+
echo "<select name='action" . esc_attr( $two ) . "' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
|
473 |
+
echo "<option value='-1' selected='selected'>" . esc_html__( 'Bulk Actions', 'strong-testimonials' ) . "</option>\n";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
474 |
Â
|
475 |
+
foreach ( $this->_actions as $name => $title ) {
|
476 |
+
$class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
|
477 |
Â
|
478 |
+
echo "\t<option value='$name'$class>$title</option>\n";
|
479 |
+
}
|
480 |
Â
|
481 |
+
echo "</select>\n";
|
Â
|
|
482 |
Â
|
483 |
+
submit_button( __( 'Apply', 'strong-testimonials' ), 'action', '', false, array( 'id' => "doaction$two" ) );
|
484 |
+
echo "\n";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
485 |
Â
}
|
Â
|
|
486 |
Â
|
487 |
+
/**
|
488 |
+
* Get the current action selected from the bulk actions dropdown.
|
489 |
+
*
|
490 |
+
* @since 3.1.0
|
491 |
+
* @access public
|
492 |
+
*
|
493 |
+
* @return string|bool The action name or False if no action was selected
|
494 |
+
*/
|
495 |
+
public function current_action() {
|
496 |
+
if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) ) {
|
497 |
+
return false;
|
498 |
+
}
|
499 |
+
|
500 |
+
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
|
501 |
+
return $_REQUEST['action'];
|
502 |
+
}
|
503 |
+
|
504 |
+
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
|
505 |
+
return $_REQUEST['action2'];
|
506 |
+
}
|
507 |
Â
|
508 |
+
return false;
|
509 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
510 |
Â
|
511 |
Â
/**
|
512 |
+
* Generate row actions div
|
513 |
Â
*
|
514 |
+
* @since 3.1.0
|
515 |
+
* @access protected
|
516 |
Â
*
|
517 |
+
* @param array $actions The list of actions
|
518 |
+
* @param bool $always_visible Whether the actions should be always visible
|
519 |
+
* @return string
|
520 |
Â
*/
|
521 |
+
protected function row_actions( $actions, $always_visible = false ) {
|
522 |
+
$action_count = count( $actions );
|
523 |
+
$i = 0;
|
524 |
+
|
525 |
+
if ( ! $action_count ) {
|
526 |
+
return '';
|
527 |
+
}
|
528 |
+
|
529 |
+
$out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
|
530 |
+
foreach ( $actions as $action => $link ) {
|
531 |
+
++$i;
|
532 |
+
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
|
533 |
+
$out .= "<span class='$action'>$link$sep</span>";
|
534 |
+
}
|
535 |
+
$out .= '</div>';
|
536 |
+
|
537 |
+
return $out;
|
538 |
Â
}
|
539 |
Â
|
540 |
+
/**
|
541 |
+
* Display a monthly dropdown for filtering items
|
542 |
+
*
|
543 |
+
* @since 3.1.0
|
544 |
+
* @access protected
|
545 |
+
*
|
546 |
+
* @param string $post_type
|
547 |
+
*/
|
548 |
+
protected function months_dropdown( $post_type ) {
|
549 |
+
global $wpdb, $wp_locale;
|
550 |
+
|
551 |
+
/**
|
552 |
+
* Filter whether to remove the 'Months' drop-down from the post list table.
|
553 |
+
*
|
554 |
+
* @since 4.2.0
|
555 |
+
*
|
556 |
+
* @param bool $disable Whether to disable the drop-down. Default false.
|
557 |
+
* @param string $post_type The post type.
|
558 |
+
*/
|
559 |
+
if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {
|
560 |
+
return;
|
561 |
+
}
|
562 |
+
|
563 |
+
$months = $wpdb->get_results(
|
564 |
+
$wpdb->prepare(
|
565 |
+
"
|
566 |
Â
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
567 |
Â
FROM $wpdb->posts
|
568 |
Â
WHERE post_type = %s
|
569 |
Â
ORDER BY post_date DESC
|
570 |
+
",
|
571 |
+
$post_type
|
572 |
+
)
|
573 |
+
);
|
574 |
Â
|
575 |
+
/**
|
576 |
+
* Filter the 'Months' drop-down results.
|
577 |
+
*
|
578 |
+
* @since 3.7.0
|
579 |
+
*
|
580 |
+
* @param object $months The months drop-down query results.
|
581 |
+
* @param string $post_type The post type.
|
582 |
+
*/
|
583 |
+
$months = apply_filters( 'months_dropdown_results', $months, $post_type );
|
584 |
Â
|
585 |
+
$month_count = count( $months );
|
586 |
Â
|
587 |
+
if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {
|
588 |
+
return;
|
589 |
+
}
|
590 |
Â
|
591 |
+
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
592 |
+
?>
|
593 |
+
<label for="filter-by-date" class="screen-reader-text"><?php esc_html_e( 'Filter by date', 'strong-testimonials' ); ?></label>
|
594 |
Â
<select name="m" id="filter-by-date">
|
595 |
+
<option<?php selected( $m, 0 ); ?> value="0"><?php esc_html_e( 'All dates', 'strong-testimonials' ); ?></option>
|
596 |
+
<?php
|
597 |
+
foreach ( $months as $arc_row ) {
|
598 |
+
if ( 0 == $arc_row->year ) {
|
599 |
+
continue;
|
600 |
+
}
|
601 |
+
|
602 |
+
$month = zeroise( $arc_row->month, 2 );
|
603 |
+
$year = $arc_row->year;
|
604 |
+
|
605 |
+
printf(
|
606 |
+
"<option %s value='%s'>%s</option>\n",
|
607 |
+
selected( $m, $year . $month, false ),
|
608 |
+
esc_attr( $arc_row->year . $month ),
|
609 |
+
/* translators: 1: month name, 2: 4-digit year */
|
610 |
+
sprintf( '%1$s %2$d', $wp_locale->get_month( $month ), $year )
|
611 |
+
);
|
612 |
+
}
|
613 |
+
?>
|
614 |
Â
</select>
|
615 |
+
<?php
|
616 |
+
}
|
617 |
Â
|
618 |
+
/**
|
619 |
+
* Display a view switcher
|
620 |
+
*
|
621 |
+
* @since 3.1.0
|
622 |
+
* @access protected
|
623 |
+
*
|
624 |
+
* @param string $current_mode
|
625 |
+
*/
|
626 |
+
protected function view_switcher( $current_mode ) {
|
627 |
+
?>
|
628 |
Â
<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>">
|
629 |
Â
<div class="view-switch">
|
630 |
+
<?php
|
631 |
Â
foreach ( $this->modes as $mode => $title ) {
|
632 |
Â
$classes = array( 'view-' . $mode );
|
633 |
+
if ( $current_mode == $mode ) {
|
634 |
Â
$classes[] = 'current';
|
635 |
+
}
|
636 |
Â
printf(
|
637 |
Â
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
|
638 |
Â
esc_url( add_query_arg( 'mode', $mode ) ),
|
640 |
Â
$title
|
641 |
Â
);
|
642 |
Â
}
|
643 |
+
?>
|
644 |
Â
</div>
|
645 |
+
<?php
|
646 |
+
}
|
647 |
Â
|
648 |
+
/**
|
649 |
+
* Display a comment count bubble
|
650 |
+
*
|
651 |
+
* @since 3.1.0
|
652 |
+
* @access protected
|
653 |
+
*
|
654 |
+
* @param int $post_id The post ID.
|
655 |
+
* @param int $pending_comments Number of pending comments.
|
656 |
+
*/
|
657 |
+
protected function comments_bubble( $post_id, $pending_comments ) {
|
658 |
+
$pending_phrase = sprintf( __( '%s pending', 'strong-testimonials' ), number_format( $pending_comments ) );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
659 |
Â
|
660 |
+
if ( $pending_comments ) {
|
661 |
+
echo '<strong>';
|
662 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
663 |
Â
|
664 |
+
echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . '</span></a>';
|
665 |
+
|
666 |
+
if ( $pending_comments ) {
|
667 |
+
echo '</strong>';
|
668 |
+
}
|
669 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
670 |
Â
|
671 |
Â
/**
|
672 |
+
* Get the current page number
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
673 |
Â
*
|
674 |
+
* @since 3.1.0
|
675 |
+
* @access public
|
676 |
Â
*
|
677 |
+
* @return int
|
678 |
Â
*/
|
679 |
+
public function get_pagenum() {
|
680 |
+
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
681 |
Â
|
682 |
+
if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
|
683 |
+
$pagenum = $this->_pagination_args['total_pages'];
|
684 |
+
}
|
685 |
+
|
686 |
+
return max( 1, $pagenum );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
687 |
Â
}
|
688 |
Â
|
689 |
+
/**
|
690 |
+
* Get number of items to display on a single page
|
691 |
+
*
|
692 |
+
* @since 3.1.0
|
693 |
+
* @access protected
|
694 |
+
*
|
695 |
+
* @param string $option
|
696 |
+
* @param int $default
|
697 |
+
* @return int
|
698 |
+
*/
|
699 |
+
protected function get_items_per_page( $option, $default = 20 ) {
|
700 |
+
$per_page = (int) get_user_option( $option );
|
701 |
+
if ( empty( $per_page ) || $per_page < 1 ) {
|
702 |
+
$per_page = $default;
|
703 |
+
}
|
704 |
+
|
705 |
+
/**
|
706 |
+
* Filter the number of items to be displayed on each page of the list table.
|
707 |
+
*
|
708 |
+
* The dynamic hook name, $option, refers to the `per_page` option depending
|
709 |
+
* on the type of list table in use. Possible values include: 'edit_comments_per_page',
|
710 |
+
* 'sites_network_per_page', 'site_themes_network_per_page', 'themes_network_per_page',
|
711 |
+
* 'users_network_per_page', 'edit_post_per_page', 'edit_page_per_page',
|
712 |
+
* 'edit_{$post_type}_per_page', etc.
|
713 |
+
*
|
714 |
+
* @since 2.9.0
|
715 |
+
*
|
716 |
+
* @param int $per_page Number of items to be displayed. Default 20.
|
717 |
+
*/
|
718 |
+
return (int) apply_filters( $option, $per_page );
|
719 |
Â
}
|
720 |
Â
|
721 |
+
/**
|
722 |
+
* Display the pagination.
|
723 |
+
*
|
724 |
+
* @since 3.1.0
|
725 |
+
* @access protected
|
726 |
+
*
|
727 |
+
* @param string $which
|
728 |
+
*/
|
729 |
+
protected function pagination( $which ) {
|
730 |
+
if ( empty( $this->_pagination_args ) ) {
|
731 |
+
return;
|
732 |
+
}
|
733 |
Â
|
734 |
+
$total_items = $this->_pagination_args['total_items'];
|
735 |
+
$total_pages = $this->_pagination_args['total_pages'];
|
736 |
+
$infinite_scroll = false;
|
737 |
+
if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
|
738 |
+
$infinite_scroll = $this->_pagination_args['infinite_scroll'];
|
739 |
+
}
|
740 |
Â
|
741 |
+
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items, 'strong-testimonials' ), number_format_i18n( $total_items ) ) . '</span>';
|
742 |
Â
|
743 |
+
$current = $this->get_pagenum();
|
744 |
Â
|
745 |
+
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
746 |
Â
|
747 |
+
$current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
748 |
Â
|
749 |
+
$page_links = array();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
750 |
Â
|
751 |
+
$disable_first = $disable_last = '';
|
752 |
+
if ( $current == 1 ) {
|
753 |
+
$disable_first = ' disabled';
|
754 |
+
}
|
755 |
+
if ( $current == $total_pages ) {
|
756 |
+
$disable_last = ' disabled';
|
757 |
+
}
|
758 |
+
$page_links[] = sprintf(
|
759 |
+
"<a class='%s' title='%s' href='%s'>%s</a>",
|
760 |
+
'first-page' . $disable_first,
|
761 |
+
esc_attr__( 'Go to the first page', 'strong-testimonials' ),
|
762 |
+
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
763 |
+
'«'
|
764 |
Â
);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
765 |
Â
|
766 |
+
$page_links[] = sprintf(
|
767 |
+
"<a class='%s' title='%s' href='%s'>%s</a>",
|
768 |
+
'prev-page' . $disable_first,
|
769 |
+
esc_attr__( 'Go to the previous page', 'strong-testimonials' ),
|
770 |
+
esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
|
771 |
+
'‹'
|
772 |
+
);
|
773 |
Â
|
774 |
+
if ( 'bottom' == $which ) {
|
775 |
+
$html_current_page = $current;
|
776 |
+
} else {
|
777 |
+
$html_current_page = sprintf(
|
778 |
+
"%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d'>",
|
779 |
+
'<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page', 'strong-testimonials' ) . '</label>',
|
780 |
+
esc_attr__( 'Current page', 'strong-testimonials' ),
|
781 |
+
$current,
|
782 |
+
strlen( $total_pages )
|
783 |
+
);
|
784 |
+
}
|
785 |
+
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
786 |
+
$page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging', 'strong-testimonials' ), $html_current_page, $html_total_pages ) . '</span>';
|
787 |
+
|
788 |
+
$page_links[] = sprintf(
|
789 |
+
"<a class='%s' title='%s' href='%s'>%s</a>",
|
790 |
+
'next-page' . $disable_last,
|
791 |
+
esc_attr__( 'Go to the next page', 'strong-testimonials' ),
|
792 |
+
esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
|
793 |
+
'›'
|
794 |
+
);
|
795 |
Â
|
796 |
+
$page_links[] = sprintf(
|
797 |
+
"<a class='%s' title='%s' href='%s'>%s</a>",
|
798 |
+
'last-page' . $disable_last,
|
799 |
+
esc_attr__( 'Go to the last page', 'strong-testimonials' ),
|
800 |
+
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
801 |
+
'»'
|
802 |
+
);
|
803 |
Â
|
804 |
+
$pagination_links_class = 'pagination-links';
|
805 |
+
if ( ! empty( $infinite_scroll ) ) {
|
806 |
+
$pagination_links_class = ' hide-if-js';
|
807 |
+
}
|
808 |
+
$output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
809 |
Â
|
810 |
+
if ( $total_pages ) {
|
811 |
+
$page_class = $total_pages < 2 ? ' one-page' : '';
|
812 |
+
} else {
|
813 |
+
$page_class = ' no-pages';
|
814 |
+
}
|
815 |
+
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
816 |
Â
|
817 |
+
echo $this->_pagination;
|
818 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
819 |
Â
|
820 |
+
/**
|
821 |
+
* Get a list of columns. The format is:
|
822 |
+
* 'internal-name' => 'Title'
|
823 |
+
*
|
824 |
+
* @since 3.1.0
|
825 |
+
* @access public
|
826 |
+
* @abstract
|
827 |
+
*
|
828 |
+
* @return array
|
829 |
+
*/
|
830 |
+
public function get_columns() {
|
831 |
+
die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
|
832 |
+
}
|
833 |
Â
|
Â
|
|
834 |
Â
/**
|
835 |
+
* Get a list of sortable columns. The format is:
|
836 |
+
* 'internal-name' => 'orderby'
|
837 |
+
* or
|
838 |
+
* 'internal-name' => array( 'orderby', true )
|
839 |
Â
*
|
840 |
+
* The second format will make the initial sorting order be descending
|
Â
|
|
841 |
Â
*
|
842 |
+
* @since 3.1.0
|
843 |
+
* @access protected
|
844 |
Â
*
|
845 |
+
* @return array
|
846 |
Â
*/
|
847 |
+
protected function get_sortable_columns() {
|
848 |
+
return array();
|
849 |
+
}
|
850 |
Â
|
851 |
+
/**
|
852 |
+
* Get a list of all, hidden and sortable columns, with filter applied
|
853 |
+
*
|
854 |
+
* @since 3.1.0
|
855 |
+
* @access protected
|
856 |
+
*
|
857 |
+
* @return array
|
858 |
+
*/
|
859 |
+
protected function get_column_info() {
|
860 |
+
if ( isset( $this->_column_headers ) ) {
|
861 |
+
return $this->_column_headers;
|
862 |
+
}
|
863 |
Â
|
864 |
+
$columns = get_column_headers( $this->screen );
|
865 |
+
$hidden = get_hidden_columns( $this->screen );
|
Â
|
|
866 |
Â
|
867 |
+
$sortable_columns = $this->get_sortable_columns();
|
868 |
+
/**
|
869 |
+
* Filter the list table sortable columns for a specific screen.
|
870 |
+
*
|
871 |
+
* The dynamic portion of the hook name, `$this->screen->id`, refers
|
872 |
+
* to the ID of the current screen, usually a string.
|
873 |
+
*
|
874 |
+
* @since 3.5.0
|
875 |
+
*
|
876 |
+
* @param array $sortable_columns An array of sortable columns.
|
877 |
+
*/
|
878 |
+
$_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
|
879 |
Â
|
880 |
+
$sortable = array();
|
881 |
+
foreach ( $_sortable as $id => $data ) {
|
882 |
+
if ( empty( $data ) ) {
|
883 |
+
continue;
|
884 |
+
}
|
885 |
Â
|
886 |
+
$data = (array) $data;
|
887 |
+
if ( ! isset( $data[1] ) ) {
|
888 |
+
$data[1] = false;
|
889 |
+
}
|
890 |
Â
|
891 |
+
$sortable[ $id ] = $data;
|
892 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
893 |
Â
|
894 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
895 |
+
|
896 |
+
return $this->_column_headers;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
897 |
Â
}
|
898 |
Â
|
899 |
+
/**
|
900 |
+
* Return number of visible columns
|
901 |
+
*
|
902 |
+
* @since 3.1.0
|
903 |
+
* @access public
|
904 |
+
*
|
905 |
+
* @return int
|
906 |
+
*/
|
907 |
+
public function get_column_count() {
|
908 |
+
list ( $columns, $hidden ) = $this->get_column_info();
|
909 |
+
$hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
|
910 |
+
return count( $columns ) - count( $hidden );
|
911 |
+
}
|
912 |
+
|
913 |
+
/**
|
914 |
+
* Print column headers, accounting for hidden and sortable columns.
|
915 |
+
*
|
916 |
+
* @since 3.1.0
|
917 |
+
* @access public
|
918 |
+
*
|
919 |
+
* @param bool $with_id Whether to set the id attribute or not
|
920 |
+
*/
|
921 |
+
public function print_column_headers( $with_id = true ) {
|
922 |
+
list( $columns, $hidden, $sortable ) = $this->get_column_info();
|
923 |
+
|
924 |
+
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
925 |
+
$current_url = remove_query_arg( 'paged', $current_url );
|
926 |
Â
|
927 |
+
if ( isset( $_GET['orderby'] ) ) {
|
928 |
+
$current_orderby = $_GET['orderby'];
|
929 |
+
} else {
|
930 |
+
$current_orderby = '';
|
931 |
+
}
|
932 |
Â
|
933 |
+
if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] ) {
|
934 |
+
$current_order = 'desc';
|
935 |
+
} else {
|
936 |
+
$current_order = 'asc';
|
937 |
+
}
|
938 |
Â
|
939 |
+
if ( ! empty( $columns['cb'] ) ) {
|
940 |
+
static $cb_counter = 1;
|
941 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All', 'strong-testimonials' ) . '</label>'
|
942 |
+
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox">';
|
943 |
+
$cb_counter++;
|
944 |
+
}
|
945 |
Â
|
946 |
+
foreach ( $columns as $column_key => $column_display_name ) {
|
947 |
+
$class = array( 'manage-column', "column-$column_key" );
|
948 |
Â
|
949 |
+
$style = '';
|
950 |
+
if ( in_array( $column_key, $hidden ) ) {
|
951 |
+
$style = 'display:none;';
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
952 |
Â
}
|
953 |
Â
|
954 |
+
$style = ' style="' . $style . '"';
|
Â
|
|
955 |
Â
|
956 |
+
if ( 'cb' == $column_key ) {
|
957 |
+
$class[] = 'check-column';
|
958 |
+
} elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) ) {
|
959 |
+
$class[] = 'num';
|
960 |
+
}
|
961 |
+
|
962 |
+
if ( isset( $sortable[ $column_key ] ) ) {
|
963 |
+
list( $orderby, $desc_first ) = $sortable[ $column_key ];
|
964 |
+
|
965 |
+
if ( $current_orderby == $orderby ) {
|
966 |
+
$order = 'asc' == $current_order ? 'desc' : 'asc';
|
967 |
+
$class[] = 'sorted';
|
968 |
+
$class[] = $current_order;
|
969 |
+
} else {
|
970 |
+
$order = $desc_first ? 'desc' : 'asc';
|
971 |
+
$class[] = 'sortable';
|
972 |
+
$class[] = $desc_first ? 'asc' : 'desc';
|
973 |
+
}
|
974 |
Â
|
975 |
+
$column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
|
976 |
+
}
|
977 |
+
|
978 |
+
$id = $with_id ? "id='$column_key'" : '';
|
979 |
Â
|
980 |
+
if ( ! empty( $class ) ) {
|
981 |
+
$class = "class='" . join( ' ', $class ) . "'";
|
982 |
+
}
|
983 |
+
|
984 |
+
echo "<th scope='col' $id $class $style>$column_display_name</th>";
|
985 |
+
}
|
986 |
Â
}
|
Â
|
|
987 |
Â
|
988 |
+
/**
|
989 |
+
* Display the table
|
990 |
+
*
|
991 |
+
* @since 3.1.0
|
992 |
+
* @access public
|
993 |
+
*/
|
994 |
+
public function display() {
|
995 |
+
$singular = $this->_args['singular'];
|
996 |
Â
|
997 |
+
$this->display_tablenav( 'top' );
|
998 |
Â
|
999 |
+
?>
|
1000 |
Â
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
1001 |
Â
<thead>
|
1002 |
Â
<tr>
|
1003 |
+
<?php $this->print_column_headers(); ?>
|
1004 |
Â
</tr>
|
1005 |
Â
</thead>
|
1006 |
Â
|
1007 |
+
<tbody id="the-list"
|
1008 |
+
<?php
|
1009 |
+
if ( $singular ) {
|
1010 |
+
echo " data-wp-lists='list:$singular'";
|
1011 |
+
}
|
1012 |
+
?>
|
1013 |
+
>
|
1014 |
+
<?php $this->display_rows_or_placeholder(); ?>
|
1015 |
Â
</tbody>
|
1016 |
Â
|
1017 |
Â
<tfoot>
|
1018 |
Â
<tr>
|
1019 |
+
<?php $this->print_column_headers( false ); ?>
|
1020 |
Â
</tr>
|
1021 |
Â
</tfoot>
|
1022 |
Â
|
1023 |
Â
</table>
|
1024 |
+
<?php
|
1025 |
+
$this->display_tablenav( 'bottom' );
|
1026 |
+
}
|
1027 |
Â
|
1028 |
+
/**
|
1029 |
+
* Get a list of CSS classes for the list table table tag.
|
1030 |
+
*
|
1031 |
+
* @since 3.1.0
|
1032 |
+
* @access protected
|
1033 |
+
*
|
1034 |
+
* @return array List of CSS classes for the table tag.
|
1035 |
+
*/
|
1036 |
+
protected function get_table_classes() {
|
1037 |
+
return array( 'widefat', 'fixed', 'striped', $this->_args['plural'] );
|
1038 |
+
}
|
1039 |
Â
|
1040 |
+
/**
|
1041 |
+
* Generate the table navigation above or below the table
|
1042 |
+
*
|
1043 |
+
* @since 3.1.0
|
1044 |
+
* @access protected
|
1045 |
+
* @param string $which
|
1046 |
+
*/
|
1047 |
+
protected function display_tablenav( $which ) {
|
1048 |
+
if ( 'top' == $which ) {
|
1049 |
+
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
|
1050 |
+
}
|
1051 |
+
?>
|
1052 |
Â
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
1053 |
Â
|
1054 |
Â
<div class="alignleft actions bulkactions">
|
1055 |
Â
<?php $this->bulk_actions( $which ); ?>
|
1056 |
Â
</div>
|
1057 |
+
<?php
|
1058 |
+
$this->extra_tablenav( $which );
|
1059 |
+
$this->pagination( $which );
|
1060 |
+
?>
|
1061 |
Â
|
1062 |
Â
<br class="clear">
|
1063 |
Â
</div>
|
1064 |
+
<?php
|
1065 |
+
}
|
1066 |
Â
|
1067 |
+
/**
|
1068 |
+
* Extra controls to be displayed between bulk actions and pagination
|
1069 |
+
*
|
1070 |
+
* @since 3.1.0
|
1071 |
+
* @access protected
|
1072 |
+
*
|
1073 |
+
* @param string $which
|
1074 |
+
*/
|
1075 |
+
protected function extra_tablenav( $which ) {}
|
1076 |
+
|
1077 |
+
/**
|
1078 |
+
* Generate the tbody element for the list table.
|
1079 |
+
*
|
1080 |
+
* @since 3.1.0
|
1081 |
+
* @access public
|
1082 |
+
*/
|
1083 |
+
public function display_rows_or_placeholder() {
|
1084 |
+
if ( $this->has_items() ) {
|
1085 |
+
$this->display_rows();
|
1086 |
+
} else {
|
1087 |
+
echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
|
1088 |
+
$this->no_items();
|
1089 |
+
echo '</td></tr>';
|
1090 |
+
}
|
1091 |
Â
}
|
Â
|
|
1092 |
Â
|
1093 |
+
/**
|
1094 |
+
* Generate the table rows
|
1095 |
+
*
|
1096 |
+
* @since 3.1.0
|
1097 |
+
* @access public
|
1098 |
+
*/
|
1099 |
+
public function display_rows() {
|
1100 |
+
foreach ( $this->items as $item ) {
|
1101 |
+
$this->single_row( $item );
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
Â
|
1105 |
+
/**
|
1106 |
+
* Generates content for a single row of the table
|
1107 |
+
*
|
1108 |
+
* @since 3.1.0
|
1109 |
+
* @access public
|
1110 |
+
*
|
1111 |
+
* @param object $item The current item
|
1112 |
+
*/
|
1113 |
+
public function single_row( $item ) {
|
1114 |
+
echo '<tr>';
|
1115 |
+
$this->single_row_columns( $item );
|
1116 |
+
echo '</tr>';
|
1117 |
+
}
|
1118 |
Â
|
1119 |
+
protected function column_default( $item, $column_name ) {}
|
1120 |
Â
|
1121 |
+
protected function column_cb( $item ) {}
|
1122 |
Â
|
1123 |
+
/**
|
1124 |
+
* Generates the columns for a single row of the table
|
1125 |
+
*
|
1126 |
+
* @since 3.1.0
|
1127 |
+
* @access protected
|
1128 |
+
*
|
1129 |
+
* @param object $item The current item
|
1130 |
+
*/
|
1131 |
+
protected function single_row_columns( $item ) {
|
1132 |
+
list( $columns, $hidden ) = $this->get_column_info();
|
1133 |
Â
|
1134 |
+
foreach ( $columns as $column_name => $column_display_name ) {
|
1135 |
+
$class = "class='$column_name column-$column_name'";
|
1136 |
Â
|
1137 |
+
$style = '';
|
1138 |
+
if ( in_array( $column_name, $hidden ) ) {
|
1139 |
+
$style = ' style="display:none;"';
|
1140 |
+
}
|
1141 |
Â
|
1142 |
+
$attributes = "$class$style";
|
1143 |
Â
|
1144 |
+
if ( 'cb' == $column_name ) {
|
1145 |
+
echo '<th scope="row" class="check-column">';
|
1146 |
+
echo $this->column_cb( $item );
|
1147 |
+
echo '</th>';
|
1148 |
+
} elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
1149 |
+
echo "<td $attributes>";
|
1150 |
+
echo call_user_func( array( $this, 'column_' . $column_name ), $item );
|
1151 |
+
echo '</td>';
|
1152 |
+
} else {
|
1153 |
+
echo "<td $attributes>";
|
1154 |
+
echo $this->column_default( $item, $column_name );
|
1155 |
+
echo '</td>';
|
1156 |
+
}
|
Â
|
|
1157 |
Â
}
|
1158 |
Â
}
|
Â
|
|
1159 |
Â
|
1160 |
+
/**
|
1161 |
+
* Handle an incoming ajax request (called from admin-ajax.php)
|
1162 |
+
*
|
1163 |
+
* @since 3.1.0
|
1164 |
+
* @access public
|
1165 |
+
*/
|
1166 |
+
public function ajax_response() {
|
1167 |
+
$this->prepare_items();
|
1168 |
+
|
1169 |
+
ob_start();
|
1170 |
+
if ( ! empty( $_REQUEST['no_placeholder'] ) ) {
|
1171 |
+
$this->display_rows();
|
1172 |
+
} else {
|
1173 |
+
$this->display_rows_or_placeholder();
|
1174 |
+
}
|
1175 |
Â
|
1176 |
+
$rows = ob_get_clean();
|
1177 |
Â
|
1178 |
+
$response = array( 'rows' => $rows );
|
1179 |
Â
|
1180 |
+
if ( isset( $this->_pagination_args['total_items'] ) ) {
|
1181 |
+
$response['total_items_i18n'] = sprintf(
|
1182 |
+
_n( '1 item', '%s items', $this->_pagination_args['total_items'], 'strong-testimonials' ),
|
1183 |
+
number_format_i18n( $this->_pagination_args['total_items'] )
|
1184 |
+
);
|
1185 |
+
}
|
1186 |
+
if ( isset( $this->_pagination_args['total_pages'] ) ) {
|
1187 |
+
$response['total_pages'] = $this->_pagination_args['total_pages'];
|
1188 |
+
$response['total_pages_i18n'] = number_format_i18n( $this->_pagination_args['total_pages'] );
|
1189 |
+
}
|
1190 |
Â
|
1191 |
+
die( wp_json_encode( $response ) );
|
1192 |
+
}
|
1193 |
Â
|
1194 |
+
/**
|
1195 |
+
* Send required variables to JavaScript land
|
1196 |
+
*
|
1197 |
+
* @access public
|
1198 |
+
*/
|
1199 |
+
public function _js_vars() {
|
1200 |
+
$args = array(
|
1201 |
+
'class' => get_class( $this ),
|
1202 |
+
'screen' => array(
|
1203 |
+
'id' => $this->screen->id,
|
1204 |
+
'base' => $this->screen->base,
|
1205 |
+
),
|
1206 |
+
);
|
1207 |
Â
|
1208 |
+
printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args ) );
|
1209 |
+
}
|
1210 |
Â
}
|
Â
|
|
1211 |
Â
|
1212 |
+
endif;
|
admin/class-strong-testimonials-page-shortcodes.php
CHANGED
@@ -34,8 +34,8 @@ class Strong_Testimonials_Page_Shortcodes {
|
|
34 |
Â
<h2><?php _e( 'Testimonial Views', 'strong-testimonials' ); ?></h2>
|
35 |
Â
|
36 |
Â
<p>
|
37 |
-
<?php _e( 'Each view has a unique shortcode like
|
38 |
-
<?php printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ),
|
39 |
Â
</p>
|
40 |
Â
|
41 |
Â
<h2><?php _e( 'Testimonial Count', 'strong-testimonials' ); ?></h2>
|
34 |
Â
<h2><?php _e( 'Testimonial Views', 'strong-testimonials' ); ?></h2>
|
35 |
Â
|
36 |
Â
<p>
|
37 |
+
<?php echo wp_kses_post( _e( 'Each view has a unique shortcode like ', 'strong-testimonials' ) ); ?><code>[testimonial_view id="1"]</code>.
|
38 |
+
<?php printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views' ) ), esc_html__( 'Go to views', 'strong-testimonials' ) ); ?>
|
39 |
Â
</p>
|
40 |
Â
|
41 |
Â
<h2><?php _e( 'Testimonial Count', 'strong-testimonials' ); ?></h2>
|
admin/class-strong-testimonials-post-editor.php
CHANGED
@@ -210,12 +210,11 @@ class Strong_Testimonials_Post_Editor {
|
|
210 |
Â
<?php wpmtst_star_rating_form( $field, $rating, 'in-metabox', true, 'custom' ); ?>
|
211 |
Â
</span>
|
212 |
Â
<?php if ( ! $is_new ) : ?>
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
</span>
|
219 |
Â
<?php endif; ?>
|
220 |
Â
</div>
|
221 |
Â
|
@@ -226,12 +225,9 @@ class Strong_Testimonials_Post_Editor {
|
|
226 |
Â
</span>
|
227 |
Â
|
228 |
Â
<?php if ( ! $is_new ) : ?>
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
class="edit-rating button button-small hide-if-no-js"
|
233 |
-
aria-label="Edit rating"><?php _e( 'Edit' ); ?></button>
|
234 |
-
</span>
|
235 |
Â
<?php endif; ?>
|
236 |
Â
</div>
|
237 |
Â
|
210 |
Â
<?php wpmtst_star_rating_form( $field, $rating, 'in-metabox', true, 'custom' ); ?>
|
211 |
Â
</span>
|
212 |
Â
<?php if ( ! $is_new ) : ?>
|
213 |
+
<span class="edit-rating-buttons-2">
|
214 |
+
<button type="button" class="zero button-link"><?php esc_html_e( 'Zero', 'strong-testimonials' ); ?></button>
|
215 |
+
<button type="button" class="save button button-small"><?php esc_html_e( 'OK', 'strong-testimonials' ); ?></button>
|
216 |
+
<button type="button" class="cancel button-link"><?php esc_html_e( 'Cancel', 'strong-testimonials' ); ?></button>
|
217 |
+
</span>
|
Â
|
|
218 |
Â
<?php endif; ?>
|
219 |
Â
</div>
|
220 |
Â
|
225 |
Â
</span>
|
226 |
Â
|
227 |
Â
<?php if ( ! $is_new ) : ?>
|
228 |
+
<span class="edit-rating-buttons-1">
|
229 |
+
<button type="button" id="" class="edit-rating button button-small hide-if-no-js" aria-label="Edit rating"><?php esc_html_e( 'Edit', 'strong-testimonials' ); ?></button>
|
230 |
+
</span>
|
Â
|
|
Â
|
|
Â
|
|
231 |
Â
<?php endif; ?>
|
232 |
Â
</div>
|
233 |
Â
|
admin/class-strong-testimonials-updater.php
CHANGED
@@ -196,6 +196,11 @@ class Strong_Testimonials_Updater {
|
|
196 |
Â
*/
|
197 |
Â
$this->update_log();
|
198 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
199 |
Â
delete_transient( 'wpmtst_update_in_progress' );
|
200 |
Â
}
|
201 |
Â
|
@@ -225,6 +230,10 @@ class Strong_Testimonials_Updater {
|
|
225 |
Â
update_option( 'wpmtst_update_log', $log );
|
226 |
Â
}
|
227 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
228 |
Â
/**
|
229 |
Â
* Return admin role.
|
230 |
Â
*
|
196 |
Â
*/
|
197 |
Â
$this->update_log();
|
198 |
Â
|
199 |
+
/**
|
200 |
+
* Update admin notices.
|
201 |
+
*/
|
202 |
+
$this->update_admin_notices();
|
203 |
+
|
204 |
Â
delete_transient( 'wpmtst_update_in_progress' );
|
205 |
Â
}
|
206 |
Â
|
230 |
Â
update_option( 'wpmtst_update_log', $log );
|
231 |
Â
}
|
232 |
Â
|
233 |
+
public function update_admin_notices() {
|
234 |
+
wpmtst_add_admin_notice( 'feedback-notice', true );
|
235 |
+
}
|
236 |
+
|
237 |
Â
/**
|
238 |
Â
* Return admin role.
|
239 |
Â
*
|
admin/class-strong-views-list-table.php
CHANGED
@@ -123,10 +123,11 @@ class Strong_Views_List_Table extends Strong_Testimonials_List_Table {
|
|
123 |
Â
$delete_link = 'admin.php?action=delete-strong-view&id=' . $item['id'];
|
124 |
Â
|
125 |
Â
// Assemble links
|
126 |
-
|
127 |
-
$actions
|
128 |
-
$actions['
|
129 |
-
$actions['
|
Â
|
|
130 |
Â
|
131 |
Â
echo $this->row_actions( $actions );
|
132 |
Â
}
|
123 |
Â
$delete_link = 'admin.php?action=delete-strong-view&id=' . $item['id'];
|
124 |
Â
|
125 |
Â
// Assemble links
|
126 |
+
|
127 |
+
$actions = array();
|
128 |
+
$actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit', 'strong-testimonials' ) . '</a>';
|
129 |
+
$actions['duplicate'] = '<a href="' . $duplicate_link . '">' . __( 'Duplicate', 'strong-testimonials' ) . '</a>';
|
130 |
+
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( $delete_link, 'delete-strong-view_' . $item['id'] ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( 'Delete "%s"?', 'strong-testimonials' ), $item['name'] ) ) . "' ) ) { return true;} return false;\">" . __( 'Delete', 'strong-testimonials' ) . '</a>';
|
131 |
Â
|
132 |
Â
echo $this->row_actions( $actions );
|
133 |
Â
}
|
admin/class-walker-strong-category-checklist.php
CHANGED
File without changes
|
admin/class-walker-strong-form-category-checklist.php
CHANGED
File without changes
|
admin/compat.php
CHANGED
File without changes
|
admin/css/about.css
CHANGED
File without changes
|
admin/css/admin-compat.css
CHANGED
File without changes
|
admin/css/admin-form.css
CHANGED
File without changes
|
admin/css/fields.css
CHANGED
File without changes
|
admin/css/form-preview.css
CHANGED
File without changes
|
admin/css/number-spinner.css
CHANGED
File without changes
|
admin/css/order.css
CHANGED
File without changes
|
admin/css/polylang.css
CHANGED
File without changes
|
admin/css/post-editor.css
CHANGED
File without changes
|
admin/css/views.css
CHANGED
File without changes
|
admin/css/wpml.css
CHANGED
File without changes
|
admin/custom-fields-ajax.php
CHANGED
File without changes
|
admin/custom-fields.php
CHANGED
@@ -94,11 +94,11 @@ function wpmtst_update_custom_fields() {
|
|
94 |
Â
|
95 |
Â
$field['placeholder'] = sanitize_text_field( $field['placeholder'] );
|
96 |
Â
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
Â
|
103 |
Â
$field['shortcode_on_form'] = sanitize_text_field( $field['shortcode_on_form'] );
|
104 |
Â
$field['shortcode_on_display'] = sanitize_text_field( $field['shortcode_on_display'] );
|
@@ -144,7 +144,7 @@ add_action( 'admin_post_wpmtst_update_custom_fields', 'wpmtst_update_custom_fiel
|
|
144 |
Â
*/
|
145 |
Â
function wpmtst_settings_custom_fields( $form_id = 1 ) {
|
146 |
Â
if ( ! current_user_can( 'strong_testimonials_fields' ) ) {
|
147 |
-
wp_die(
|
148 |
Â
}
|
149 |
Â
|
150 |
Â
if ( ! $form_id ) {
|
@@ -155,59 +155,60 @@ function wpmtst_settings_custom_fields( $form_id = 1 ) {
|
|
155 |
Â
$forms = get_option( 'wpmtst_custom_forms' );
|
156 |
Â
$fields = $forms[$form_id]['fields'];
|
157 |
Â
?>
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
Â
|
|
211 |
Â
<?php
|
212 |
Â
}
|
213 |
Â
|
@@ -229,25 +230,27 @@ function wpmtst_show_field( $key, $field, $adding ) {
|
|
229 |
Â
include 'partials/fields/field-header.php';
|
230 |
Â
?>
|
231 |
Â
<div class="custom-field" style="display: none;">
|
232 |
-
<table class="field-table">
|
233 |
-
<?php
|
234 |
-
include 'partials/fields/field-type.php';
|
235 |
-
include 'partials/fields/field-label.php';
|
236 |
-
include 'partials/fields/field-name.php';
|
237 |
-
|
238 |
-
if ( ! $adding ) {
|
239 |
-
echo wpmtst_show_field_secondary( $key, $field );
|
240 |
-
echo wpmtst_show_field_admin_table( $key, $field );
|
241 |
-
}
|
242 |
-
?>
|
243 |
-
</table>
|
244 |
Â
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
251 |
Â
</div><!-- .custom-field -->
|
252 |
Â
|
253 |
Â
<?php
|
@@ -278,17 +281,17 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
278 |
Â
if ( isset( $field['core'] ) && $field['core'] ) {
|
279 |
Â
$disabled = ' disabled="disabled"';
|
280 |
Â
} else {
|
281 |
-
$disabled =
|
282 |
Â
}
|
283 |
Â
|
284 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
285 |
-
$html .= '<th>' .
|
286 |
Â
$html .= '<td>' . "\n";
|
287 |
Â
if ( $disabled ) {
|
288 |
-
$html .= '<input type="hidden" name="fields[' . $key . '][required]" value="' . $field['required'] . '">';
|
289 |
Â
$html .= '<input type="checkbox" ' . checked( $field['required'], true, false ) . $disabled . '>';
|
290 |
Â
} else {
|
291 |
-
$html .= '<input type="checkbox" name="fields[' . $key . '][required]" ' . checked( $field['required'], true, false ) . '>';
|
292 |
Â
}
|
293 |
Â
$html .= '</td>' . "\n";
|
294 |
Â
$html .= '</tr>' . "\n";
|
@@ -300,8 +303,8 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
300 |
Â
if ( $field['show_placeholder_option'] ) {
|
301 |
Â
if ( isset( $field['placeholder'] ) ) {
|
302 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
303 |
-
$html .= '<th>' .
|
304 |
-
$html .= '<td><input type="text" name="fields[' . $key . '][placeholder]" value="' . esc_attr( $field['placeholder'] ) . '"></td>' . "\n";
|
305 |
Â
$html .= '</tr>' . "\n";
|
306 |
Â
}
|
307 |
Â
}
|
@@ -314,8 +317,8 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
314 |
Â
if ( $field['show_text_option'] ) {
|
315 |
Â
if ( isset( $field['text'] ) ) {
|
316 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
317 |
-
$html .= '<th>' .
|
318 |
-
$html .= '<td><input type="text" name="fields[' . $key . '][text]" value="' . esc_attr( $field['text'] ) . '" placeholder="' .
|
319 |
Â
$html .= '</tr>' . "\n";
|
320 |
Â
}
|
321 |
Â
}
|
@@ -324,16 +327,16 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
324 |
Â
* Before
|
325 |
Â
*/
|
326 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
327 |
-
$html .= '<th>' .
|
328 |
-
$html .= '<td><input type="text" name="fields[' . $key . '][before]" value="' . esc_attr( $field['before'] ) . '"></td>' . "\n";
|
329 |
Â
$html .= '</tr>' . "\n";
|
330 |
Â
|
331 |
Â
/*
|
332 |
Â
* After
|
333 |
Â
*/
|
334 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
335 |
-
$html .= '<th>' .
|
336 |
-
$html .= '<td><input type="text" name="fields[' . $key . '][after]" value="' . esc_attr( $field['after'] ) . '"></td>' . "\n";
|
337 |
Â
$html .= '</tr>' . "\n";
|
338 |
Â
|
339 |
Â
/*
|
@@ -342,27 +345,27 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
342 |
Â
if ( $field['show_default_options'] ) {
|
343 |
Â
if ( isset( $field['default_form_value'] ) ) {
|
344 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
345 |
-
$html .= '<th>' .
|
346 |
Â
$html .= '<td>' . "\n";
|
347 |
Â
|
348 |
Â
// TODO Replace this special handling
|
349 |
Â
if ( 'rating' == $field['input_type'] ) {
|
350 |
Â
|
351 |
-
$html .= '<input type="text" name="fields[' . $key . '][default_form_value]" value="' . esc_attr( $field['default_form_value'] ) . '" class="as-number">';
|
352 |
-
$html .= '<span class="help inline">' .
|
353 |
-
$html .= '<span class="help">' .
|
354 |
Â
|
355 |
Â
} elseif ( 'checkbox' == $field['input_type'] ) {
|
356 |
Â
|
357 |
Â
$html .= '<label>';
|
358 |
-
$html .= '<input type="checkbox" name="fields[' . $key . '][default_form_value]" ' . checked( $field['default_form_value'], true, false ) . '>';
|
359 |
-
$html .= '<span class="help inline">' .
|
360 |
Â
$html .= '</label>';
|
361 |
Â
|
362 |
Â
} else {
|
363 |
Â
|
364 |
-
$html .= '<input type="text" name="fields[' . $key . '][default_form_value]" value="' . esc_attr( $field['default_form_value'] ) . '">';
|
365 |
-
$html .= '<span class="help">' .
|
366 |
Â
|
367 |
Â
}
|
368 |
Â
|
@@ -379,18 +382,18 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
379 |
Â
if ( 'checkbox' != $field['input_type'] ) {
|
380 |
Â
if ( isset( $field['default_display_value'] ) ) {
|
381 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
382 |
-
$html .= '<th>' .
|
383 |
Â
$html .= '<td>' . "\n";
|
384 |
Â
|
385 |
Â
// TODO Replace this special handling
|
386 |
Â
if ( 'rating' == $field['input_type'] ) {
|
387 |
-
$html .= '<input type="text" name="fields[' . $key . '][default_display_value]" value="' . esc_attr( $field['default_display_value'] ) . '" class="as-number">';
|
388 |
-
$html .= '<span class="help inline">' .
|
389 |
Â
} else {
|
390 |
-
$html .= '<input type="text" name="fields[' . $key . '][default_display_value]" value="' . esc_attr( $field['default_display_value'] ) . '">';
|
391 |
Â
}
|
392 |
Â
|
393 |
-
$html .= '<span class="help">' .
|
394 |
Â
$html .= '</td>' . "\n";
|
395 |
Â
$html .= '</tr>' . "\n";
|
396 |
Â
}
|
@@ -403,22 +406,24 @@ function wpmtst_show_field_secondary( $key, $field ) {
|
|
403 |
Â
if ( $field['show_shortcode_options'] ) {
|
404 |
Â
if ( isset( $field['shortcode_on_form'] ) ) {
|
405 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
406 |
-
$html .= '<th>' .
|
407 |
Â
$html .= '<td>' . "\n";
|
408 |
-
$html .= '<input type="text" name="fields[' . $key . '][shortcode_on_form]" value="' . esc_attr( $field['shortcode_on_form'] ) . '">';
|
409 |
Â
$html .= '</td>' . "\n";
|
410 |
Â
$html .= '</tr>' . "\n";
|
411 |
Â
}
|
412 |
Â
if ( isset( $field['shortcode_on_display'] ) ) {
|
413 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
414 |
-
$html .= '<th>' .
|
415 |
Â
$html .= '<td>' . "\n";
|
416 |
-
$html .= '<input type="text" name="fields[' . $key . '][shortcode_on_display]" value="' . esc_attr( $field['shortcode_on_display'] ) . '">';
|
417 |
Â
$html .= '</td>' . "\n";
|
418 |
Â
$html .= '</tr>' . "\n";
|
419 |
Â
}
|
420 |
Â
}
|
421 |
Â
|
Â
|
|
Â
|
|
422 |
Â
return $html;
|
423 |
Â
}
|
424 |
Â
|
@@ -431,20 +436,20 @@ function wpmtst_show_field_admin_table( $key, $field ) {
|
|
431 |
Â
// Show in Admin Table
|
432 |
Â
// -------------------
|
433 |
Â
if ( ! $field['show_admin_table_option'] ) {
|
434 |
-
$html = '<input type="hidden" name="fields[' . $key . '][show_admin_table_option]" value="' . $field['show_admin_table_option'] . '">';
|
435 |
Â
return $html;
|
436 |
Â
}
|
437 |
Â
|
438 |
Â
$html = '<tr class="field-admin-table">' . "\n";
|
439 |
-
$html .= '<th>' .
|
440 |
Â
$html .= '<td>' . "\n";
|
441 |
Â
if ( $field['admin_table_option'] ) {
|
442 |
-
$html .= '<label><input type="checkbox" class="field-admin-table" name="fields[' . $key . '][admin_table]" ' . checked( $field['admin_table'], 1, false ) . '>';
|
443 |
Â
} else {
|
444 |
-
$html .= '<input type="checkbox" ' . checked( $field['admin_table'], 1, false ) . ' disabled="disabled"> <em>' .
|
445 |
-
$html .= '<input type="hidden" name="fields[' . $key . '][admin_table]" value="' . $field['admin_table'] . '">';
|
446 |
Â
}
|
447 |
-
$html .= '<span class="help inline">' .
|
448 |
Â
$html .= '</label>';
|
449 |
Â
$html .= '</td>' . "\n";
|
450 |
Â
$html .= '</tr>' . "\n";
|
@@ -453,6 +458,21 @@ function wpmtst_show_field_admin_table( $key, $field ) {
|
|
453 |
Â
}
|
454 |
Â
|
455 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
456 |
Â
/**
|
457 |
Â
* Add hidden fields to form.
|
458 |
Â
*
|
94 |
Â
|
95 |
Â
$field['placeholder'] = sanitize_text_field( $field['placeholder'] );
|
96 |
Â
|
97 |
+
if ( isset( $field['text'] ) ) {
|
98 |
+
$field['text'] = wp_filter_post_kses( $field['text'] );
|
99 |
+
}
|
100 |
+
$field['before'] = wp_filter_post_kses( $field['before'] );
|
101 |
+
$field['after'] = wp_filter_post_kses( $field['after'] );
|
102 |
Â
|
103 |
Â
$field['shortcode_on_form'] = sanitize_text_field( $field['shortcode_on_form'] );
|
104 |
Â
$field['shortcode_on_display'] = sanitize_text_field( $field['shortcode_on_display'] );
|
144 |
Â
*/
|
145 |
Â
function wpmtst_settings_custom_fields( $form_id = 1 ) {
|
146 |
Â
if ( ! current_user_can( 'strong_testimonials_fields' ) ) {
|
147 |
+
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'strong-testimonials' ) );
|
148 |
Â
}
|
149 |
Â
|
150 |
Â
if ( ! $form_id ) {
|
155 |
Â
$forms = get_option( 'wpmtst_custom_forms' );
|
156 |
Â
$fields = $forms[$form_id]['fields'];
|
157 |
Â
?>
|
158 |
+
|
159 |
+
<div class="wrap wpmtst">
|
160 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'Fields', 'strong-testimonials' ); ?></h1>
|
161 |
+
<hr class="wp-header-end">
|
162 |
+
<?php do_action( 'wpmtst_fields_editor_before_fields_intro' ); ?>
|
163 |
+
|
164 |
+
<div id="left-col">
|
165 |
+
<div>
|
166 |
+
<h3><?php esc_html_e( 'Editor', 'strong-testimonials' ); ?></h3>
|
167 |
+
<p>
|
168 |
+
<?php esc_html_e( 'Click a field to open its options panel.', 'strong-testimonials' ); ?>
|
169 |
+
<a class="open-help-tab" href="#tab-panel-wpmtst-help"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
170 |
+
</p>
|
171 |
+
<?php do_action( 'wpmtst_before_fields_settings', 'form-fields' ); ?>
|
172 |
+
</div>
|
173 |
+
|
174 |
+
<form id="wpmtst-custom-fields-form" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" autocomplete="off">
|
175 |
+
<?php wp_nonce_field( 'wpmtst_custom_fields_form', 'wpmtst_form_submitted' ); ?>
|
176 |
+
<input type="hidden" name="action" value="wpmtst_update_custom_fields">
|
177 |
+
<input type="hidden" name="form_id" value="<?php echo esc_attr( $form_id ); ?>">
|
178 |
+
|
179 |
+
<?php do_action( 'wpmtst_fields_editor_before_fields_editor', $forms[ $form_id ] ); ?>
|
180 |
+
|
181 |
+
<ul id="custom-field-list">
|
182 |
+
<?php
|
183 |
+
foreach ( $fields as $key => $field ) {
|
184 |
+
echo '<li id="field-' . esc_attr( $key ) . '">' . wpmtst_show_field( $key, $field, false ) . '</li>' . "\n";
|
185 |
+
}
|
186 |
+
?>
|
187 |
+
</ul>
|
188 |
+
|
189 |
+
<div id="add-field-bar">
|
190 |
+
<input id="add-field" type="button" class="button" name="add-field" value="<?php esc_attr_e( 'Add New Field', 'strong-testimonials' ); ?>">
|
191 |
+
</div>
|
192 |
+
|
193 |
+
<div id="field-group-actions">
|
194 |
+
<div><?php submit_button( '', 'primary', 'submit-form', false ); ?></div>
|
195 |
+
<div><?php submit_button( esc_html__( 'Cancel Changes', 'strong-testimonials' ), 'secondary', 'reset', false ); ?></div>
|
196 |
+
<div><?php submit_button( esc_html__( 'Restore Defaults', 'strong-testimonials' ), 'secondary', 'restore-defaults', false ); ?></div>
|
197 |
+
</div>
|
198 |
+
</form>
|
199 |
+
</div><!-- #left-col -->
|
200 |
+
|
201 |
+
<div id="right-col">
|
202 |
+
<div class="intro">
|
203 |
+
<h3><?php esc_html_e( 'Basic Preview', 'strong-testimonials' ); ?></h3>
|
204 |
+
<p><?php esc_html_e( 'Only to demonstrate the fields. May look different in your theme.', 'strong-testimonials' ); ?></p>
|
205 |
+
</div>
|
206 |
+
<div id="fields-editor-preview">
|
207 |
+
<div><!-- placeholder --></div>
|
208 |
+
</div>
|
209 |
+
</div><!-- #right-col -->
|
210 |
+
|
211 |
+
</div><!-- .wrap -->
|
212 |
Â
<?php
|
213 |
Â
}
|
214 |
Â
|
230 |
Â
include 'partials/fields/field-header.php';
|
231 |
Â
?>
|
232 |
Â
<div class="custom-field" style="display: none;">
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
233 |
Â
|
234 |
+
<table class="field-table">
|
235 |
+
<?php
|
236 |
+
include 'partials/fields/field-type.php';
|
237 |
+
include 'partials/fields/field-label.php';
|
238 |
+
include 'partials/fields/field-name.php';
|
239 |
+
|
240 |
+
if ( ! $adding ) {
|
241 |
+
echo wpmtst_show_field_secondary( $key, $field );
|
242 |
+
echo wpmtst_show_field_admin_table( $key, $field );
|
243 |
+
}
|
244 |
+
|
245 |
+
?>
|
246 |
+
</table>
|
247 |
+
|
248 |
+
<?php
|
249 |
+
if ( ! $adding ) {
|
250 |
+
echo wp_kses_post( wpmtst_show_field_hidden( $key, $field ) );
|
251 |
+
}
|
252 |
+
include 'partials/fields/field-controls.php';
|
253 |
+
?>
|
254 |
Â
</div><!-- .custom-field -->
|
255 |
Â
|
256 |
Â
<?php
|
281 |
Â
if ( isset( $field['core'] ) && $field['core'] ) {
|
282 |
Â
$disabled = ' disabled="disabled"';
|
283 |
Â
} else {
|
284 |
+
$disabled = '';
|
285 |
Â
}
|
286 |
Â
|
287 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
288 |
+
$html .= '<th>' . esc_html__( 'Required', 'strong-testimonials' ) . '</th>' . "\n";
|
289 |
Â
$html .= '<td>' . "\n";
|
290 |
Â
if ( $disabled ) {
|
291 |
+
$html .= '<input type="hidden" name="fields[' . esc_attr( $key ) . '][required]" value="' . esc_attr( $field['required'] ) . '">';
|
292 |
Â
$html .= '<input type="checkbox" ' . checked( $field['required'], true, false ) . $disabled . '>';
|
293 |
Â
} else {
|
294 |
+
$html .= '<input type="checkbox" name="fields[' . esc_attr( $key ) . '][required]" ' . checked( $field['required'], true, false ) . '>';
|
295 |
Â
}
|
296 |
Â
$html .= '</td>' . "\n";
|
297 |
Â
$html .= '</tr>' . "\n";
|
303 |
Â
if ( $field['show_placeholder_option'] ) {
|
304 |
Â
if ( isset( $field['placeholder'] ) ) {
|
305 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
306 |
+
$html .= '<th>' . esc_html__( 'Placeholder', 'strong-testimonials' ) . '</th>' . "\n";
|
307 |
+
$html .= '<td><input type="text" name="fields[' . esc_attr( $key ) . '][placeholder]" value="' . esc_attr( $field['placeholder'] ) . '"></td>' . "\n";
|
308 |
Â
$html .= '</tr>' . "\n";
|
309 |
Â
}
|
310 |
Â
}
|
317 |
Â
if ( $field['show_text_option'] ) {
|
318 |
Â
if ( isset( $field['text'] ) ) {
|
319 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
320 |
+
$html .= '<th>' . esc_html__( 'Text', 'strong-testimonials' ) . '</th>' . "\n";
|
321 |
+
$html .= '<td><input type="text" name="fields[' . esc_attr( $key ) . '][text]" value="' . esc_attr( $field['text'] ) . '" placeholder="' . esc_html__( 'next to the checkbox', 'strong-testimonials' ) . '"></td>' . "\n";
|
322 |
Â
$html .= '</tr>' . "\n";
|
323 |
Â
}
|
324 |
Â
}
|
327 |
Â
* Before
|
328 |
Â
*/
|
329 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
330 |
+
$html .= '<th>' . esc_html__( 'Before', 'strong-testimonials' ) . '</th>' . "\n";
|
331 |
+
$html .= '<td><input type="text" name="fields[' . esc_attr( $key ) . '][before]" value="' . esc_attr( $field['before'] ) . '"></td>' . "\n";
|
332 |
Â
$html .= '</tr>' . "\n";
|
333 |
Â
|
334 |
Â
/*
|
335 |
Â
* After
|
336 |
Â
*/
|
337 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
338 |
+
$html .= '<th>' . esc_html__( 'After', 'strong-testimonials' ) . '</th>' . "\n";
|
339 |
+
$html .= '<td><input type="text" name="fields[' . esc_attr( $key ) . '][after]" value="' . esc_attr( $field['after'] ) . '"></td>' . "\n";
|
340 |
Â
$html .= '</tr>' . "\n";
|
341 |
Â
|
342 |
Â
/*
|
345 |
Â
if ( $field['show_default_options'] ) {
|
346 |
Â
if ( isset( $field['default_form_value'] ) ) {
|
347 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
348 |
+
$html .= '<th>' . esc_html__( 'Default Form Value', 'strong-testimonials' ) . '</th>' . "\n";
|
349 |
Â
$html .= '<td>' . "\n";
|
350 |
Â
|
351 |
Â
// TODO Replace this special handling
|
352 |
Â
if ( 'rating' == $field['input_type'] ) {
|
353 |
Â
|
354 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][default_form_value]" value="' . esc_attr( $field['default_form_value'] ) . '" class="as-number">';
|
355 |
+
$html .= '<span class="help inline">' . esc_html__( 'stars', 'strong-testimonials' ) . '</span>';
|
356 |
+
$html .= '<span class="help">' . esc_html__( 'Populate the field with this value.', 'strong-testimonials' ) . '</span>';
|
357 |
Â
|
358 |
Â
} elseif ( 'checkbox' == $field['input_type'] ) {
|
359 |
Â
|
360 |
Â
$html .= '<label>';
|
361 |
+
$html .= '<input type="checkbox" name="fields[' . esc_attr( $key ) . '][default_form_value]" ' . checked( $field['default_form_value'], true, false ) . '>';
|
362 |
+
$html .= '<span class="help inline">' . esc_html__( 'Checked by default.', 'strong-testimonials' ) . '</span>';
|
363 |
Â
$html .= '</label>';
|
364 |
Â
|
365 |
Â
} else {
|
366 |
Â
|
367 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][default_form_value]" value="' . esc_attr( $field['default_form_value'] ) . '">';
|
368 |
+
$html .= '<span class="help">' . esc_html__( 'Populate the field with this value.', 'strong-testimonials' ) . '</span>';
|
369 |
Â
|
370 |
Â
}
|
371 |
Â
|
382 |
Â
if ( 'checkbox' != $field['input_type'] ) {
|
383 |
Â
if ( isset( $field['default_display_value'] ) ) {
|
384 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
385 |
+
$html .= '<th>' . esc_html__( 'Default Display Value', 'strong-testimonials' ) . '</th>' . "\n";
|
386 |
Â
$html .= '<td>' . "\n";
|
387 |
Â
|
388 |
Â
// TODO Replace this special handling
|
389 |
Â
if ( 'rating' == $field['input_type'] ) {
|
390 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][default_display_value]" value="' . esc_attr( $field['default_display_value'] ) . '" class="as-number">';
|
391 |
+
$html .= '<span class="help inline">' . esc_html__( 'stars', 'strong-testimonials' ) . '</span>';
|
392 |
Â
} else {
|
393 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][default_display_value]" value="' . esc_attr( $field['default_display_value'] ) . '">';
|
394 |
Â
}
|
395 |
Â
|
396 |
+
$html .= '<span class="help">' . esc_html__( 'Display this on the testimonial if no value is submitted.', 'strong-testimonials' ) . '</span>';
|
397 |
Â
$html .= '</td>' . "\n";
|
398 |
Â
$html .= '</tr>' . "\n";
|
399 |
Â
}
|
406 |
Â
if ( $field['show_shortcode_options'] ) {
|
407 |
Â
if ( isset( $field['shortcode_on_form'] ) ) {
|
408 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
409 |
+
$html .= '<th>' . esc_html__( 'Shortcode on form', 'strong-testimonials' ) . '</th>' . "\n";
|
410 |
Â
$html .= '<td>' . "\n";
|
411 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][shortcode_on_form]" value="' . esc_attr( $field['shortcode_on_form'] ) . '">';
|
412 |
Â
$html .= '</td>' . "\n";
|
413 |
Â
$html .= '</tr>' . "\n";
|
414 |
Â
}
|
415 |
Â
if ( isset( $field['shortcode_on_display'] ) ) {
|
416 |
Â
$html .= '<tr class="field-secondary">' . "\n";
|
417 |
+
$html .= '<th>' . esc_html__( 'Shortcode on display', 'strong-testimonials' ) . '</th>' . "\n";
|
418 |
Â
$html .= '<td>' . "\n";
|
419 |
+
$html .= '<input type="text" name="fields[' . esc_attr( $key ) . '][shortcode_on_display]" value="' . esc_attr( $field['shortcode_on_display'] ) . '">';
|
420 |
Â
$html .= '</td>' . "\n";
|
421 |
Â
$html .= '</tr>' . "\n";
|
422 |
Â
}
|
423 |
Â
}
|
424 |
Â
|
425 |
+
$html = apply_filters( 'wpmtst_fields_secondary', $html, $key, $field );
|
426 |
+
|
427 |
Â
return $html;
|
428 |
Â
}
|
429 |
Â
|
436 |
Â
// Show in Admin Table
|
437 |
Â
// -------------------
|
438 |
Â
if ( ! $field['show_admin_table_option'] ) {
|
439 |
+
$html = '<input type="hidden" name="fields[' . esc_attr( $key ) . '][show_admin_table_option]" value="' . esc_attr( $field['show_admin_table_option'] ) . '">';
|
440 |
Â
return $html;
|
441 |
Â
}
|
442 |
Â
|
443 |
Â
$html = '<tr class="field-admin-table">' . "\n";
|
444 |
+
$html .= '<th>' . esc_html__( 'Admin List', 'strong-testimonials' ) . '</th>' . "\n";
|
445 |
Â
$html .= '<td>' . "\n";
|
446 |
Â
if ( $field['admin_table_option'] ) {
|
447 |
+
$html .= '<label><input type="checkbox" class="field-admin-table" name="fields[' . esc_attr( $key ) . '][admin_table]" ' . checked( $field['admin_table'], 1, false ) . '>';
|
448 |
Â
} else {
|
449 |
+
$html .= '<input type="checkbox" ' . checked( $field['admin_table'], 1, false ) . ' disabled="disabled"> <em>' . esc_html__( 'required', 'strong-testimonials' ) . '</em>';
|
450 |
+
$html .= '<input type="hidden" name="fields[' . esc_attr( $key ) . '][admin_table]" value="' . esc_attr( $field['admin_table'] ) . '">';
|
451 |
Â
}
|
452 |
+
$html .= '<span class="help inline">' . esc_html__( 'Show this field in the admin list table.', 'strong-testimonials' ) . '</span>';
|
453 |
Â
$html .= '</label>';
|
454 |
Â
$html .= '</td>' . "\n";
|
455 |
Â
$html .= '</tr>' . "\n";
|
458 |
Â
}
|
459 |
Â
|
460 |
Â
|
461 |
+
/**
|
462 |
+
* Add type-specific select options field
|
463 |
+
*/
|
464 |
+
function wpmtst_show_field_select_options( $key, $field ) {
|
465 |
+
|
466 |
+
if( $field['input_type'] !== 'select' ) {
|
467 |
+
return;
|
468 |
+
}
|
469 |
+
|
470 |
+
ob_start();
|
471 |
+
include 'partials/fields/field-select-options.php';
|
472 |
+
return ob_get_clean();
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
Â
/**
|
477 |
Â
* Add hidden fields to form.
|
478 |
Â
*
|
admin/form-preview.php
CHANGED
File without changes
|
admin/img/logo-long.svg
CHANGED
File without changes
|
admin/img/mascot.png
ADDED
Binary file
|
admin/img/quotes.png
CHANGED
File without changes
|
admin/img/screen-options.png
CHANGED
File without changes
|
admin/img/strong-date.png
CHANGED
File without changes
|
admin/img/strong-testimonials-badge.png
CHANGED
File without changes
|
admin/js/addon-licenses.js
CHANGED
File without changes
|
admin/js/admin-compat.js
CHANGED
File without changes
|
admin/js/admin-fields.js
CHANGED
@@ -178,7 +178,7 @@ function sanitizeName(label) {
|
|
178 |
Â
* Open/close
|
179 |
Â
*/
|
180 |
Â
$fieldList.on("click", "span.link", function () {
|
181 |
-
|
182 |
Â
return false;
|
183 |
Â
});
|
184 |
Â
|
@@ -311,7 +311,7 @@ function sanitizeName(label) {
|
|
311 |
Â
|
312 |
Â
if ($parent.data('status') !== 'new') {
|
313 |
Â
$table.find(".field-secondary, .field-admin-table").remove();
|
314 |
-
|
315 |
Â
|
316 |
Â
if ('none' === fieldType) {
|
317 |
Â
$parent.find('.field-label-row').hide();
|
@@ -323,7 +323,7 @@ function sanitizeName(label) {
|
|
323 |
Â
return;
|
324 |
Â
}
|
325 |
Â
$parent.find('tr').removeClass('form-error');
|
326 |
-
|
327 |
Â
|
328 |
Â
var key_id = $parent.attr("id");
|
329 |
Â
var key = key_id.substr(key_id.lastIndexOf("-") + 1);
|
@@ -334,7 +334,7 @@ function sanitizeName(label) {
|
|
334 |
Â
|
335 |
Â
// get type of field from its optgroup
|
336 |
Â
var fieldOption = $(this).find("option[value='" + fieldType + "']");
|
337 |
-
|
338 |
Â
|
339 |
Â
switch (fieldClass) {
|
340 |
Â
|
@@ -404,7 +404,8 @@ function sanitizeName(label) {
|
|
404 |
Â
};
|
405 |
Â
|
406 |
Â
var ajax1 = $.get(ajaxurl, data1, function (response) {
|
407 |
-
|
Â
|
|
408 |
Â
});
|
409 |
Â
|
410 |
Â
|
178 |
Â
* Open/close
|
179 |
Â
*/
|
180 |
Â
$fieldList.on("click", "span.link", function () {
|
181 |
+
toggleField($(this).closest("li"));
|
182 |
Â
return false;
|
183 |
Â
});
|
184 |
Â
|
311 |
Â
|
312 |
Â
if ($parent.data('status') !== 'new') {
|
313 |
Â
$table.find(".field-secondary, .field-admin-table").remove();
|
314 |
+
}
|
315 |
Â
|
316 |
Â
if ('none' === fieldType) {
|
317 |
Â
$parent.find('.field-label-row').hide();
|
323 |
Â
return;
|
324 |
Â
}
|
325 |
Â
$parent.find('tr').removeClass('form-error');
|
326 |
+
$parent.find('.form-error-text').hide();
|
327 |
Â
|
328 |
Â
var key_id = $parent.attr("id");
|
329 |
Â
var key = key_id.substr(key_id.lastIndexOf("-") + 1);
|
334 |
Â
|
335 |
Â
// get type of field from its optgroup
|
336 |
Â
var fieldOption = $(this).find("option[value='" + fieldType + "']");
|
337 |
+
var fieldClass = fieldOption.closest("optgroup").attr("class");
|
338 |
Â
|
339 |
Â
switch (fieldClass) {
|
340 |
Â
|
404 |
Â
};
|
405 |
Â
|
406 |
Â
var ajax1 = $.get(ajaxurl, data1, function (response) {
|
407 |
+
$table.append(response);
|
408 |
+
$( document ).trigger( "st-done-loading-secondary-fields", [ $table ] );
|
409 |
Â
});
|
410 |
Â
|
411 |
Â
|
admin/js/admin-form.js
CHANGED
File without changes
|
admin/js/admin-global.js
CHANGED
File without changes
|
admin/js/admin-order.js
CHANGED
File without changes
|
admin/js/admin.js
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Strong Testimonials admin
|
3 |
-
*
|
4 |
-
* @namespace jQuery
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Function to get the Max value in Array
|
8 |
-
Array.max = function (array) {
|
9 |
-
return Math.max.apply(Math, array);
|
10 |
-
};
|
11 |
-
|
12 |
-
jQuery(document).ready(function ($) {
|
13 |
-
|
14 |
-
// Convert "A String" to "a_string"
|
15 |
-
function convertLabel (label) {
|
16 |
-
return label.replace(/\s+/g, '_').replace(/\W/g, '').toLowerCase();
|
17 |
-
}
|
18 |
-
|
19 |
-
// Remove invalid characters
|
20 |
-
function removeSpaces (word) {
|
21 |
-
//return word.replace(/\s+/g, "_");
|
22 |
-
return word.replace(/[^\w\s(?!\-)]/gi, '');
|
23 |
-
}
|
24 |
-
|
25 |
-
$.fn.showInlineBlock = function () {
|
26 |
-
return this.css('display', 'inline-block');
|
27 |
-
};
|
28 |
-
|
29 |
-
/**
|
30 |
-
* ----------------------------------------
|
31 |
-
* General events
|
32 |
-
* ----------------------------------------
|
33 |
-
*/
|
34 |
-
|
35 |
-
// Add protocol if missing
|
36 |
-
// Thanks http://stackoverflow.com/a/36429927/51600
|
37 |
-
$('input[type=url]').change(function () {
|
38 |
-
if (this.value.length && !/^https*:\/\//.test(this.value)) {
|
39 |
-
this.value = 'http://' + this.value;
|
40 |
-
}
|
41 |
-
});
|
42 |
-
|
43 |
-
$('ul.ui-tabs-nav li a').click(function () {
|
44 |
-
$(this).blur();
|
45 |
-
});
|
46 |
-
|
47 |
-
$('.focus-next-field').change(function (e) {
|
48 |
-
if ($(e.target).is(':checked')) {
|
49 |
-
$(e.target).parent().next().find('input').focus().select();
|
50 |
-
}
|
51 |
-
});
|
52 |
-
|
53 |
-
// toggle screenshots
|
54 |
-
$('#toggle-screen-options').add('#screenshot-screen-options').click(function (e) {
|
55 |
-
$(this).blur();
|
56 |
-
$('#screenshot-screen-options').slideToggle();
|
57 |
-
});
|
58 |
-
|
59 |
-
// toggle screenshots
|
60 |
-
$('#toggle-help').click(function (e) {
|
61 |
-
$(this).toggleClass('closed open').blur();
|
62 |
-
$('#help-section').slideToggle();
|
63 |
-
});
|
64 |
-
|
65 |
-
/**
|
66 |
-
* ----------------------------------------
|
67 |
-
* View List Table
|
68 |
-
* ----------------------------------------
|
69 |
-
*/
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Save sort order
|
73 |
-
*/
|
74 |
-
$('table.wpm-testimonial_page_testimonial-views th.manage-column').on('click', function (e) {
|
75 |
-
var columnName = $(this).attr('id');
|
76 |
-
// get the opposite class
|
77 |
-
var columnOrder = $(this).hasClass('asc') ? 'desc' : $(this).hasClass('desc') ? 'asc' : '';
|
78 |
-
var data = {
|
79 |
-
'action': 'wpmtst_save_view_list_order',
|
80 |
-
'name': columnName,
|
81 |
-
'order': columnOrder
|
82 |
-
};
|
83 |
-
$.get(ajaxurl, data, function (response) {
|
84 |
-
});
|
85 |
-
});
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Sticky views
|
89 |
-
*/
|
90 |
-
$('table.wpm-testimonial_page_testimonial-views').on('click', '.stickit', function (e) {
|
91 |
-
var icon = $(this);
|
92 |
-
icon.closest('.wp-list-table-wrap').find('.overlay').fadeIn(200);
|
93 |
-
icon.blur().toggleClass('stuck');
|
94 |
-
var id = $(this).closest('tr').find('td.id').html();
|
95 |
-
var data = {
|
96 |
-
'action': 'wpmtst_save_view_sticky',
|
97 |
-
'id': id
|
98 |
-
};
|
99 |
-
$.get(ajaxurl, data, function (response) {
|
100 |
-
if (response) {
|
101 |
-
window.location.reload();
|
102 |
-
}
|
103 |
-
});
|
104 |
-
});
|
105 |
-
|
106 |
-
});
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
admin/js/custom-spinner.js
CHANGED
File without changes
|
admin/js/help.js
CHANGED
File without changes
|
admin/js/lib/are-you-sure/jquery.are-you-sure.js
CHANGED
File without changes
|
admin/js/lib/are-you-sure/jquery.are-you-sure.min.js
CHANGED
File without changes
|
admin/js/lib/autosize/autosize.min.js
CHANGED
File without changes
|
admin/js/rating-edit.js
CHANGED
File without changes
|
admin/js/view-category-filter.js
CHANGED
File without changes
|
admin/js/views.js
CHANGED
File without changes
|
admin/menu/class-strong-testimonials-menu-fields.php
CHANGED
File without changes
|
admin/menu/class-strong-testimonials-menu-settings.php
CHANGED
File without changes
|
admin/menu/class-strong-testimonials-menu-shortcodes.php
CHANGED
File without changes
|
admin/menu/class-strong-testimonials-menu-views.php
CHANGED
File without changes
|
admin/menu/class-strong-testimonials-menu.php
CHANGED
File without changes
|
admin/partials/fields/field-controls.php
CHANGED
@@ -6,7 +6,7 @@ $is_core = ( isset( $field['core'] ) && $field['core'] );
|
|
6 |
Â
?>
|
7 |
Â
<div class="controls">
|
8 |
Â
<?php if ( $adding || ! $is_core ) : ?>
|
9 |
-
<span><a href="#" class="delete-field"><?php
|
10 |
Â
<?php endif; ?>
|
11 |
Â
<span class="close-field"><a href="#"><?php _ex( 'Close', 'verb', 'strong-testimonials' ); ?></a></span>
|
12 |
Â
</div>
|
6 |
Â
?>
|
7 |
Â
<div class="controls">
|
8 |
Â
<?php if ( $adding || ! $is_core ) : ?>
|
9 |
+
<span><a href="#" class="delete-field"><?php esc_html_e( 'Delete', 'strong-testimonials' ); ?></a></span>
|
10 |
Â
<?php endif; ?>
|
11 |
Â
<span class="close-field"><a href="#"><?php _ex( 'Close', 'verb', 'strong-testimonials' ); ?></a></span>
|
12 |
Â
</div>
|
admin/partials/fields/field-header.php
CHANGED
File without changes
|
admin/partials/fields/field-label.php
CHANGED
File without changes
|
admin/partials/fields/field-name.php
CHANGED
File without changes
|
admin/partials/fields/field-text.php
CHANGED
File without changes
|
admin/partials/fields/field-type.php
CHANGED
File without changes
|
admin/partials/templates/form-preview-template.php
CHANGED
File without changes
|
admin/partials/views/group-compat.php
CHANGED
File without changes
|
admin/partials/views/group-extra.php
CHANGED
File without changes
|
admin/partials/views/group-fields.php
CHANGED
File without changes
|
admin/partials/views/group-form.php
CHANGED
File without changes
|
admin/partials/views/group-query.php
CHANGED
@@ -21,7 +21,7 @@ $then_classes = array(
|
|
21 |
Â
<?php _e( 'or Shortcode Attribute', 'strong-testimonials' ); ?>
|
22 |
Â
<span class="help-links">
|
23 |
Â
<span class="description">
|
24 |
-
<a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab"><?php
|
25 |
Â
</span>
|
26 |
Â
</span>
|
27 |
Â
</td>
|
@@ -39,6 +39,6 @@ $then_classes = array(
|
|
39 |
Â
<tr class="then then_slideshow then_not_single then_multiple" style="display: none;">
|
40 |
Â
<?php include( 'option-limit.php' ); ?>
|
41 |
Â
</tr>
|
42 |
-
<?php
|
43 |
-
|
44 |
Â
</div>
|
21 |
Â
<?php _e( 'or Shortcode Attribute', 'strong-testimonials' ); ?>
|
22 |
Â
<span class="help-links">
|
23 |
Â
<span class="description">
|
24 |
+
<a href="#tab-panel-wpmtst-help-shortcode" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
25 |
Â
</span>
|
26 |
Â
</span>
|
27 |
Â
</td>
|
39 |
Â
<tr class="then then_slideshow then_not_single then_multiple" style="display: none;">
|
40 |
Â
<?php include( 'option-limit.php' ); ?>
|
41 |
Â
</tr>
|
42 |
+
<?php do_action( 'wpmtst_views_group_query', $view ); ?>
|
43 |
+
</table>
|
44 |
Â
</div>
|
admin/partials/views/group-slideshow.php
CHANGED
File without changes
|
admin/partials/views/group-style.php
CHANGED
File without changes
|
admin/partials/views/option-background.php
CHANGED
File without changes
|
admin/partials/views/option-boilerplate.php
CHANGED
File without changes
|
admin/partials/views/option-category.php
CHANGED
@@ -46,11 +46,11 @@
|
|
46 |
Â
</td>
|
47 |
Â
<?php endif; ?>
|
48 |
Â
<td class="divider">
|
49 |
-
|
50 |
Â
</td>
|
51 |
Â
<td>
|
52 |
Â
<p><?php _e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
|
53 |
Â
</td>
|
54 |
Â
<td>
|
55 |
-
|
56 |
-
</td>
|
46 |
Â
</td>
|
47 |
Â
<?php endif; ?>
|
48 |
Â
<td class="divider">
|
49 |
+
<p><?php echo wp_kses_post( '<code>category</code>' ); ?></p>
|
50 |
Â
</td>
|
51 |
Â
<td>
|
52 |
Â
<p><?php _e( 'a comma-separated list of category slugs or ID\'s', 'strong-testimonials' ); ?></p>
|
53 |
Â
</td>
|
54 |
Â
<td>
|
55 |
+
<p><?php echo wp_kses_post( '<code>category="accounting"</code>' ); ?></p>
|
56 |
+
</td>
|
admin/partials/views/option-classes.php
CHANGED
File without changes
|
admin/partials/views/option-client-section.php
CHANGED
File without changes
|
admin/partials/views/option-color.php
CHANGED
File without changes
|
admin/partials/views/option-content.php
CHANGED
@@ -210,7 +210,9 @@
|
|
210 |
Â
|
211 |
Â
<div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
|
212 |
Â
<p class="description tall solo">
|
213 |
-
<?php
|
Â
|
|
Â
|
|
214 |
Â
</p>
|
215 |
Â
</div>
|
216 |
Â
|
210 |
Â
|
211 |
Â
<div class="row links then then_not_entire then_truncated then_excerpt" style="display: none;">
|
212 |
Â
<p class="description tall solo">
|
213 |
+
<?php
|
214 |
+
echo wp_kses_post( printf( __( '<a href="%s" target="_blank">Learn more about WordPress excerpts</a>', 'strong-testimonials' ), esc_url( 'http://buildwpyourself.com/wordpress-manual-excerpts-more-tag/' ) ) );
|
215 |
+
?>
|
216 |
Â
</p>
|
217 |
Â
</div>
|
218 |
Â
|
admin/partials/views/option-divi.php
CHANGED
File without changes
|
admin/partials/views/option-form-ajax.php
CHANGED
File without changes
|
admin/partials/views/option-form-category.php
CHANGED
File without changes
|
admin/partials/views/option-id.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Â
<div class="row-inner">
|
5 |
Â
<label>
|
6 |
Â
<select id="view-id" name="view[data][id]">
|
7 |
-
<option value="0"><?php _e( '— select —' ); ?></option>
|
8 |
Â
<?php foreach ( $testimonials_list as $post ) : ?>
|
9 |
Â
<option value="<?php echo $post->ID; ?>" <?php selected( $view['id'], $post->ID ); ?>>
|
10 |
Â
<?php echo $post->post_title ? $post->post_title : __( '(untitled)', 'strong-testimonials' ); ?>
|
4 |
Â
<div class="row-inner">
|
5 |
Â
<label>
|
6 |
Â
<select id="view-id" name="view[data][id]">
|
7 |
+
<option value="0"><?php _e( '— select —', 'strong-testimonials' ); ?></option>
|
8 |
Â
<?php foreach ( $testimonials_list as $post ) : ?>
|
9 |
Â
<option value="<?php echo $post->ID; ?>" <?php selected( $view['id'], $post->ID ); ?>>
|
10 |
Â
<?php echo $post->post_title ? $post->post_title : __( '(untitled)', 'strong-testimonials' ); ?>
|
admin/partials/views/option-layout.php
CHANGED
File without changes
|
admin/partials/views/option-limit.php
CHANGED
@@ -25,9 +25,9 @@
|
|
25 |
Â
</div>
|
26 |
Â
</td>
|
27 |
Â
<td class="divider">
|
28 |
-
|
29 |
Â
</td>
|
30 |
Â
<td></td>
|
31 |
Â
<td>
|
32 |
-
|
33 |
-
</td>
|
25 |
Â
</div>
|
26 |
Â
</td>
|
27 |
Â
<td class="divider">
|
28 |
+
<p><?php echo wp_kses_post( '<code>count</code>' ); ?></p>
|
29 |
Â
</td>
|
30 |
Â
<td></td>
|
31 |
Â
<td>
|
32 |
+
<p><?php echo wp_kses_post( '<code>count=5</code>' ); ?></p>
|
33 |
+
</td>
|
admin/partials/views/option-order.php
CHANGED
@@ -16,11 +16,11 @@
|
|
16 |
Â
</div>
|
17 |
Â
</td>
|
18 |
Â
<td class="divider">
|
19 |
-
|
20 |
Â
</td>
|
21 |
Â
<td>
|
22 |
-
|
23 |
Â
</td>
|
24 |
Â
<td>
|
25 |
-
|
26 |
-
</td>
|
16 |
Â
</div>
|
17 |
Â
</td>
|
18 |
Â
<td class="divider">
|
19 |
+
<p><?php echo wp_kses_post( '<code>order</code>' ); ?></p>
|
20 |
Â
</td>
|
21 |
Â
<td>
|
22 |
+
<p><?php echo wp_kses_post( 'oldest | newest | random | menu_order' ); ?></p>
|
23 |
Â
</td>
|
24 |
Â
<td>
|
25 |
+
<p><?php echo wp_kses_post( '<code>order="random"</code>' ); ?></p>
|
26 |
+
</td>
|
admin/partials/views/option-pagination.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
Â
<?php
|
2 |
-
|
3 |
-
$links
|
Â
|
|
4 |
Â
$links .= '</span>';
|
5 |
Â
?>
|
6 |
Â
<?php /* translators: On the Views admin screen. */ ?>
|
1 |
Â
<?php
|
2 |
+
|
3 |
+
$links = '<span class="help-links">';
|
4 |
+
$links .= '<a href="#tab-panel-wpmtst-help-pagination" class="open-help-tab">' . __( 'Help', 'strong-testimonials' ) . '</a>';
|
5 |
Â
$links .= '</span>';
|
6 |
Â
?>
|
7 |
Â
<?php /* translators: On the Views admin screen. */ ?>
|
admin/partials/views/option-read-more-page.php
CHANGED
@@ -19,27 +19,28 @@
|
|
19 |
Â
<div class="row-inner">
|
20 |
Â
<label>
|
21 |
Â
<select id="view-page" name="view[data][more_page_id]">
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
Â
|
|
31 |
Â
}
|
32 |
Â
?>
|
33 |
Â
</optgroup>
|
34 |
Â
<?php
|
35 |
Â
}
|
36 |
-
|
37 |
-
<optgroup label="<?php
|
38 |
Â
<?php foreach ( $pages_list as $pages ) : ?>
|
39 |
Â
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $pages->ID ); ?>><?php echo $pages->post_title; ?></option>
|
40 |
Â
<?php endforeach; ?>
|
41 |
Â
</optgroup>
|
42 |
-
<optgroup label="<?php
|
43 |
Â
<?php foreach ( $posts_list as $posts ) : ?>
|
44 |
Â
<option value="<?php echo $posts->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $posts->ID ); ?>><?php echo $posts->post_title; ?></option>
|
45 |
Â
<?php endforeach; ?>
|
19 |
Â
<div class="row-inner">
|
20 |
Â
<label>
|
21 |
Â
<select id="view-page" name="view[data][more_page_id]">
|
22 |
+
|
23 |
+
<option value=""><?php _e( '— select —', 'strong-testimonials' ); ?></option>
|
24 |
+
<?php
|
25 |
+
do_action( 'wpmtst_readmore_page_list', $view );
|
26 |
+
if ( $custom_list ) {
|
27 |
+
?>
|
28 |
+
<optgroup label="<?php esc_html_e( 'Custom', 'strong-testimonials' ); ?>">
|
29 |
+
<?php
|
30 |
+
foreach ( $custom_list as $page ) {
|
31 |
+
echo wp_kses_post( $page );
|
32 |
Â
}
|
33 |
Â
?>
|
34 |
Â
</optgroup>
|
35 |
Â
<?php
|
36 |
Â
}
|
37 |
+
?>
|
38 |
+
<optgroup label="<?php esc_attr_e( 'Pages', 'strong-testimonials' ); ?>">
|
39 |
Â
<?php foreach ( $pages_list as $pages ) : ?>
|
40 |
Â
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $pages->ID ); ?>><?php echo $pages->post_title; ?></option>
|
41 |
Â
<?php endforeach; ?>
|
42 |
Â
</optgroup>
|
43 |
+
<optgroup label="<?php esc_attr_e( 'Posts', 'strong-testimonials' ); ?>">
|
44 |
Â
<?php foreach ( $posts_list as $posts ) : ?>
|
45 |
Â
<option value="<?php echo $posts->ID; ?>" <?php selected( isset( $view['more_page_id'] ) ? $view['more_page_id'] : 0, $posts->ID ); ?>><?php echo $posts->post_title; ?></option>
|
46 |
Â
<?php endforeach; ?>
|
admin/partials/views/option-select.php
CHANGED
@@ -19,11 +19,11 @@
|
|
19 |
Â
|
20 |
Â
</td>
|
21 |
Â
<td class="divider">
|
22 |
-
|
23 |
Â
</td>
|
24 |
Â
<td>
|
25 |
Â
<p><?php _e( 'a comma-separated list of post ID\'s' , 'strong-testimonials' ); ?></p>
|
26 |
Â
</td>
|
27 |
Â
<td>
|
28 |
-
|
29 |
-
</td>
|
19 |
Â
|
20 |
Â
</td>
|
21 |
Â
<td class="divider">
|
22 |
+
<p><?php echo wp_kses_post( '<code>post_ids</code>' ); ?></p>
|
23 |
Â
</td>
|
24 |
Â
<td>
|
25 |
Â
<p><?php _e( 'a comma-separated list of post ID\'s' , 'strong-testimonials' ); ?></p>
|
26 |
Â
</td>
|
27 |
Â
<td>
|
28 |
+
<p><?php echo wp_kses_post( '<code>post_ids="123,456"</code>' ); ?></p>
|
29 |
+
</td>
|
admin/partials/views/option-slideshow-behavior.php
CHANGED
@@ -79,7 +79,7 @@
|
|
79 |
Â
</label>
|
80 |
Â
|
81 |
Â
<div class="inline description">
|
82 |
-
<a href="#tab-panel-wpmtst-help-stretch" class="open-help-tab"><?php
|
83 |
Â
</div>
|
84 |
Â
</div>
|
85 |
Â
|
79 |
Â
</label>
|
80 |
Â
|
81 |
Â
<div class="inline description">
|
82 |
+
<a href="#tab-panel-wpmtst-help-stretch" class="open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
83 |
Â
</div>
|
84 |
Â
</div>
|
85 |
Â
|
admin/partials/views/option-slideshow-breakpoints.php
CHANGED
File without changes
|
admin/partials/views/option-slideshow-navigation.php
CHANGED
File without changes
|
admin/partials/views/option-slideshow-num.php
CHANGED
File without changes
|
admin/partials/views/option-slideshow-transition.php
CHANGED
File without changes
|
admin/partials/views/option-slideshow-type.php
CHANGED
File without changes
|
admin/partials/views/option-template-list.php
CHANGED
File without changes
|
admin/partials/views/option-thumbnail.php
CHANGED
File without changes
|
admin/partials/views/option-title.php
CHANGED
File without changes
|
admin/partials/views/template-input.php
CHANGED
File without changes
|
admin/partials/views/template-not-found.php
CHANGED
File without changes
|
admin/partials/views/template-options.php
CHANGED
File without changes
|
admin/partials/views/view-mode.php
CHANGED
File without changes
|
admin/partials/views/view-name.php
CHANGED
File without changes
|
admin/partials/views/view-shortcode.php
CHANGED
File without changes
|
admin/scss/_partials/_background.scss
CHANGED
File without changes
|
admin/scss/_partials/_category-checkboxes.scss
CHANGED
File without changes
|
admin/scss/_partials/_category-filter.scss
CHANGED
File without changes
|
admin/scss/_partials/_checkbox-icons.scss
CHANGED
File without changes
|
admin/scss/_partials/_custom-fields.scss
CHANGED
File without changes
|
admin/scss/_partials/_elements.scss
CHANGED
File without changes
|
admin/scss/_partials/_form-table.scss
CHANGED
File without changes
|
admin/scss/_partials/_help-tab.scss
CHANGED
File without changes
|
admin/scss/_partials/_inner-table.scss
CHANGED
File without changes
|
admin/scss/_partials/_inputs.scss
CHANGED
File without changes
|
admin/scss/_partials/_layout-example-columns.scss
CHANGED
File without changes
|
admin/scss/_partials/_layout-example-grid.scss
CHANGED
File without changes
|
admin/scss/_partials/_layout-example-masonry.scss
CHANGED
File without changes
|
admin/scss/_partials/_layout-examples.scss
CHANGED
File without changes
|
admin/scss/_partials/_layout.scss
CHANGED
File without changes
|
admin/scss/_partials/_list-radio-buttons.scss
CHANGED
File without changes
|
admin/scss/_partials/_misc.scss
CHANGED
File without changes
|
admin/scss/_partials/_screenshots.scss
CHANGED
File without changes
|
admin/scss/_partials/_sticky-views.scss
CHANGED
File without changes
|
admin/scss/_partials/_structure.scss
CHANGED
File without changes
|
admin/scss/_partials/_template.scss
CHANGED
File without changes
|
admin/scss/_partials/_view-info.scss
CHANGED
File without changes
|
admin/scss/about.scss
CHANGED
File without changes
|
admin/scss/admin-compat.scss
CHANGED
File without changes
|
admin/scss/number-spinner.scss
CHANGED
File without changes
|
admin/scss/post-editor.scss
CHANGED
File without changes
|
admin/scss/views.scss
CHANGED
File without changes
|
admin/settings/class-strong-testimonials-settings-compat.php
CHANGED
@@ -367,8 +367,8 @@ class Strong_Testimonials_Settings_Compat {
|
|
367 |
Â
</th>
|
368 |
Â
<td>
|
369 |
Â
<div class="row header">
|
370 |
-
<p><?php
|
371 |
-
<a class="open-help-tab" href="#tab-panel-wpmtst-help-prerender"><?php
|
372 |
Â
</p>
|
373 |
Â
</div>
|
374 |
Â
<fieldset data-radio-group="prerender">
|
@@ -725,7 +725,7 @@ class Strong_Testimonials_Settings_Compat {
|
|
725 |
Â
<div>
|
726 |
Â
<select id="script-name" name="wpmtst_compat_options[ajax][script]">
|
727 |
Â
<option value="" <?php selected( $this->options['ajax']['script'], '' ); ?>>
|
728 |
-
<?php
|
729 |
Â
</option>
|
730 |
Â
<option value="barba" <?php selected( $this->options['ajax']['script'], 'barba' ); ?>>
|
731 |
Â
Barba.js
|
367 |
Â
</th>
|
368 |
Â
<td>
|
369 |
Â
<div class="row header">
|
370 |
+
<p><?php esc_html_e( 'Load stylesheets and populate script variables up front.', 'strong-testimonials' ); ?>
|
371 |
+
<a class="open-help-tab" href="#tab-panel-wpmtst-help-prerender"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
372 |
Â
</p>
|
373 |
Â
</div>
|
374 |
Â
<fieldset data-radio-group="prerender">
|
725 |
Â
<div>
|
726 |
Â
<select id="script-name" name="wpmtst_compat_options[ajax][script]">
|
727 |
Â
<option value="" <?php selected( $this->options['ajax']['script'], '' ); ?>>
|
728 |
+
<?php esc_html_e( '— Select —', 'strong-testimonials' ); ?>
|
729 |
Â
</option>
|
730 |
Â
<option value="barba" <?php selected( $this->options['ajax']['script'], 'barba' ); ?>>
|
731 |
Â
Barba.js
|
admin/settings/class-strong-testimonials-settings-form.php
CHANGED
@@ -164,11 +164,7 @@ class Strong_Testimonials_Settings_Form {
|
|
164 |
Â
|
165 |
Â
$input['success_action'] = sanitize_text_field( $input['success_action'] );
|
166 |
Â
|
167 |
-
|
168 |
-
$input['success_redirect_url'] = wp_validate_redirect( $input['success_redirect_url'] );
|
169 |
-
} else {
|
170 |
-
$input['success_redirect_url'] = '';
|
171 |
-
}
|
172 |
Â
|
173 |
Â
// Check the "ID or slug" field next
|
174 |
Â
if ( isset( $input['success_redirect_2']) && $input['success_redirect_2'] ) {
|
164 |
Â
|
165 |
Â
$input['success_action'] = sanitize_text_field( $input['success_action'] );
|
166 |
Â
|
167 |
+
$input['success_redirect_url'] = esc_url_raw( $input['success_redirect_url'] );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
168 |
Â
|
169 |
Â
// Check the "ID or slug" field next
|
170 |
Â
if ( isset( $input['success_redirect_2']) && $input['success_redirect_2'] ) {
|
admin/settings/class-strong-testimonials-settings-general.php
CHANGED
@@ -80,18 +80,19 @@ class Strong_Testimonials_Settings_General {
|
|
80 |
Â
* @return array
|
81 |
Â
*/
|
82 |
Â
public static function sanitize_options( $input ) {
|
83 |
-
$input['embed_width']
|
84 |
-
$input['load_font_awesome']
|
85 |
-
$input['nofollow']
|
86 |
-
$input['pending_indicator']
|
87 |
-
$input['remove_whitespace']
|
88 |
-
$input['reorder']
|
89 |
-
$input['scrolltop']
|
90 |
-
$input['scrolltop_offset']
|
91 |
-
$input['support_comments']
|
92 |
-
$input['support_custom_fields']
|
93 |
-
$input['
|
94 |
-
$input['
|
Â
|
|
95 |
Â
|
96 |
Â
return $input;
|
97 |
Â
}
|
80 |
Â
* @return array
|
81 |
Â
*/
|
82 |
Â
public static function sanitize_options( $input ) {
|
83 |
+
$input['embed_width'] = $input['embed_width'] ? (int) sanitize_text_field( $input['embed_width'] ) : '';
|
84 |
+
$input['load_font_awesome'] = wpmtst_sanitize_checkbox( $input, 'load_font_awesome' );
|
85 |
+
$input['nofollow'] = wpmtst_sanitize_checkbox( $input, 'nofollow' );
|
86 |
+
$input['pending_indicator'] = wpmtst_sanitize_checkbox( $input, 'pending_indicator' );
|
87 |
+
$input['remove_whitespace'] = wpmtst_sanitize_checkbox( $input, 'remove_whitespace' );
|
88 |
+
$input['reorder'] = wpmtst_sanitize_checkbox( $input, 'reorder' );
|
89 |
+
$input['scrolltop'] = wpmtst_sanitize_checkbox( $input, 'scrolltop' );
|
90 |
+
$input['scrolltop_offset'] = (int) sanitize_text_field( $input['scrolltop_offset'] );
|
91 |
+
$input['support_comments'] = wpmtst_sanitize_checkbox( $input, 'support_comments' );
|
92 |
+
$input['support_custom_fields'] = wpmtst_sanitize_checkbox( $input, 'support_custom_fields' );
|
93 |
+
$input['single_testimonial_slug'] = sanitize_text_field( $input['single_testimonial_slug'] );
|
94 |
+
$input['no_lazyload'] = wpmtst_sanitize_checkbox( $input, 'no_lazyload' );
|
95 |
+
$input['touch_enabled'] = wpmtst_sanitize_checkbox( $input, 'touch_enabled' );
|
96 |
Â
|
97 |
Â
return $input;
|
98 |
Â
}
|
admin/settings/class-strong-testimonials-settings-licenses.php
CHANGED
File without changes
|
admin/settings/class-strong-testimonials-settings.php
CHANGED
@@ -40,19 +40,19 @@ class Strong_Testimonials_Settings {
|
|
40 |
Â
* Settings page
|
41 |
Â
*/
|
42 |
Â
public static function settings_page() {
|
43 |
-
if ( ! current_user_can( 'strong_testimonials_options' ) )
|
44 |
-
wp_die(
|
45 |
-
|
46 |
Â
$tab = self::get_tab();
|
47 |
Â
$url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-settings' );
|
48 |
Â
?>
|
49 |
Â
<div class="wrap wpmtst">
|
50 |
Â
|
51 |
-
<h1><?php echo apply_filters( 'wpmtst_cpt_singular_name',
|
52 |
Â
|
53 |
Â
<?php if ( isset( $_GET['settings-updated'] ) ) : ?>
|
54 |
Â
<div id="message" class="updated notice is-dismissible">
|
55 |
-
<p><?php
|
56 |
Â
</div>
|
57 |
Â
<?php endif; ?>
|
58 |
Â
|
40 |
Â
* Settings page
|
41 |
Â
*/
|
42 |
Â
public static function settings_page() {
|
43 |
+
if ( ! current_user_can( 'strong_testimonials_options' ) ) {
|
44 |
+
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'strong-testimonials' ) );
|
45 |
+
}
|
46 |
Â
$tab = self::get_tab();
|
47 |
Â
$url = admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-settings' );
|
48 |
Â
?>
|
49 |
Â
<div class="wrap wpmtst">
|
50 |
Â
|
51 |
+
<h1><?php echo wp_kses_post( apply_filters( 'wpmtst_cpt_singular_name', esc_html__( 'Testimonial', 'strong-testimonials' ) ) ); ?> <?php esc_html_e( 'Settings', 'strong-testimonials' ); ?></h1>
|
52 |
Â
|
53 |
Â
<?php if ( isset( $_GET['settings-updated'] ) ) : ?>
|
54 |
Â
<div id="message" class="updated notice is-dismissible">
|
55 |
+
<p><?php esc_html_e( 'Settings saved.', 'strong-testimonials' ); ?></p>
|
56 |
Â
</div>
|
57 |
Â
<?php endif; ?>
|
58 |
Â
|
admin/settings/partials/email-from.php
CHANGED
File without changes
|
admin/settings/partials/email-to.php
CHANGED
File without changes
|
admin/settings/partials/email.php
CHANGED
File without changes
|
admin/settings/partials/form.php
CHANGED
@@ -150,32 +150,27 @@ foreach ( $plugins as $key => $plugin ) {
|
|
150 |
Â
<h3><?php _e( 'Form Actions', 'strong-testimonials' ); ?></h3>
|
151 |
Â
|
152 |
Â
<table class="form-table" cellpadding="0" cellspacing="0">
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
<?php
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
<select id="redirect-page" name="wpmtst_form_options[success_redirect_id]">
|
176 |
-
|
177 |
-
<option value=""><?php _e( '— select a page —' ); ?></option>
|
178 |
-
|
179 |
Â
<?php foreach ( $pages_list as $pages ) : ?>
|
180 |
Â
|
181 |
Â
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $form_options['success_redirect_id'] ) ? $form_options['success_redirect_id'] : 0, $pages->ID ); ?>>
|
@@ -184,81 +179,71 @@ foreach ( $plugins as $key => $plugin ) {
|
|
184 |
Â
|
185 |
Â
<?php endforeach; ?>
|
186 |
Â
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
<?php
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
<fieldset>
|
253 |
-
<label for="wpmtst-options-admin-notify">
|
254 |
-
<input id="wpmtst-options-admin-notify" type="checkbox" name="wpmtst_form_options[admin_notify]"
|
255 |
-
<?php checked( $form_options['admin_notify'] ); ?>/>
|
256 |
-
<?php _e( 'Send an email upon new testimonial submission.', 'strong-testimonials' ); ?>
|
257 |
-
</label>
|
258 |
-
</fieldset>
|
259 |
-
</div>
|
260 |
-
<div class="email-container"
|
261 |
-
id="admin-notify-fields" <?php echo ( $form_options['admin_notify'] ) ? '' : 'style="display: none;"'; ?>>
|
262 |
Â
<?php
|
263 |
Â
include 'email-from.php';
|
264 |
Â
include 'email-to.php';
|
150 |
Â
<h3><?php _e( 'Form Actions', 'strong-testimonials' ); ?></h3>
|
151 |
Â
|
152 |
Â
<table class="form-table" cellpadding="0" cellspacing="0">
|
153 |
+
<tr>
|
154 |
+
<th scope="row">
|
155 |
+
<label for="redirect-page">
|
156 |
+
<?php esc_html_e( 'Upon Successful Submission', 'strong-testimonials' ); ?>
|
157 |
+
</label>
|
158 |
+
</th>
|
159 |
+
<td>
|
160 |
+
<div>
|
161 |
+
<label class="success-action">
|
162 |
+
<input type="radio" name="wpmtst_form_options[success_action]" value="message" <?php checked( 'message', $form_options['success_action'] ); ?>/> <?php esc_html_e( 'display message', 'strong-testimonials' ); ?>
|
163 |
+
</label>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<div>
|
167 |
+
<label class="success-action">
|
168 |
+
<input type="radio" name="wpmtst_form_options[success_action]" value="id" <?php checked( 'id', $form_options['success_action'] ); ?>/> <?php esc_html_e( 'redirect to a page', 'strong-testimonials' ); ?>
|
169 |
+
</label>
|
170 |
+
|
171 |
+
<select id="redirect-page" name="wpmtst_form_options[success_redirect_id]">
|
172 |
+
|
173 |
+
<option value=""><?php esc_html_e( '— select a page —', 'strong-testimonials' ); ?></option>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
174 |
Â
<?php foreach ( $pages_list as $pages ) : ?>
|
175 |
Â
|
176 |
Â
<option value="<?php echo $pages->ID; ?>" <?php selected( isset( $form_options['success_redirect_id'] ) ? $form_options['success_redirect_id'] : 0, $pages->ID ); ?>>
|
179 |
Â
|
180 |
Â
<?php endforeach; ?>
|
181 |
Â
|
182 |
+
</select>
|
183 |
+
|
184 |
+
<div style="display: inline-block; text-indent: 20px;">
|
185 |
+
<label>
|
186 |
+
<?php echo esc_html_x( 'or enter its ID or slug', 'to select a redirect page', 'strong-testimonials' ); ?>
|
187 |
+
|
188 |
+
<input type="text" id="redirect-page-2" name="wpmtst_form_options[success_redirect_2]" size="30">
|
189 |
+
</label>
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
|
193 |
+
<div>
|
194 |
+
<label class="success-action">
|
195 |
+
<input type="radio" name="wpmtst_form_options[success_action]" value="url" <?php checked( 'url', $form_options['success_action'] ); ?>/>
|
196 |
+
<?php esc_html_e( 'redirect to a URL', 'strong-testimonials' ); ?>
|
197 |
+
</label>
|
198 |
+
<label>
|
199 |
+
<input type="text" id="redirect-page-3" name="wpmtst_form_options[success_redirect_url]" value="<?php echo esc_attr( $form_options['success_redirect_url'] ); ?>" size="75"/>
|
200 |
+
</label>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
</td>
|
204 |
+
</tr>
|
205 |
+
|
206 |
+
<tr>
|
207 |
+
<th scope="row">
|
208 |
+
<label>
|
209 |
+
<?php esc_html_e( 'Post Status', 'strong-testimonials' ); ?>
|
210 |
+
</label>
|
211 |
+
</th>
|
212 |
+
<td>
|
213 |
+
<ul class="compact">
|
214 |
+
<li>
|
215 |
+
<label>
|
216 |
+
<input type="radio" name="wpmtst_form_options[post_status]" value="pending" <?php checked( 'pending', $form_options['post_status'] ); ?>/>
|
217 |
+
<?php esc_html_e( 'Pending', 'strong-testimonials' ); ?>
|
218 |
+
</label>
|
219 |
+
</li>
|
220 |
+
<li>
|
221 |
+
<label>
|
222 |
+
<input type="radio" name="wpmtst_form_options[post_status]" value="publish" <?php checked( 'publish', $form_options['post_status'] ); ?>/>
|
223 |
+
<?php esc_html_e( 'Published', 'strong-testimonials' ); ?>
|
224 |
+
</label>
|
225 |
+
</li>
|
226 |
+
</ul>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
|
230 |
+
<tr>
|
231 |
+
<th scope="row">
|
232 |
+
<label for="wpmtst-options-admin-notify">
|
233 |
+
<?php esc_html_e( 'Notification Email', 'strong-testimonials' ); ?>
|
234 |
+
</label>
|
235 |
+
</th>
|
236 |
+
|
237 |
+
<td>
|
238 |
+
<div class="match-height">
|
239 |
+
<fieldset>
|
240 |
+
<label for="wpmtst-options-admin-notify">
|
241 |
+
<input id="wpmtst-options-admin-notify" type="checkbox" name="wpmtst_form_options[admin_notify]" <?php checked( $form_options['admin_notify'] ); ?>/>
|
242 |
+
<?php esc_html_e( 'Send an email upon new testimonial submission.', 'strong-testimonials' ); ?>
|
243 |
+
</label>
|
244 |
+
</fieldset>
|
245 |
+
</div>
|
246 |
+
<div class="email-container" id="admin-notify-fields" <?php echo ( $form_options['admin_notify'] ) ? '' : 'style="display: none;"'; ?>>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
247 |
Â
<?php
|
248 |
Â
include 'email-from.php';
|
249 |
Â
include 'email-to.php';
|
admin/settings/partials/general.php
CHANGED
@@ -58,6 +58,18 @@ $options = get_option( 'wpmtst_options' );
|
|
58 |
Â
</td>
|
59 |
Â
</tr>
|
60 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
61 |
Â
</table>
|
62 |
Â
|
63 |
Â
<hr/>
|
58 |
Â
</td>
|
59 |
Â
</tr>
|
60 |
Â
|
61 |
+
<tr valign="top">
|
62 |
+
<th scope="row">
|
63 |
+
<?php esc_html_e( 'Single Testimonial Slug', 'strong-testimonials' ); ?>
|
64 |
+
</th>
|
65 |
+
<td>
|
66 |
+
<label>
|
67 |
+
<input type="text" name="wpmtst_options[single_testimonial_slug]" value="<?php echo esc_attr( $options['single_testimonial_slug'] ); ?>"/>
|
68 |
+
</label>
|
69 |
+
<p class="description"><?php esc_html_e( 'Change the permalink slug for a single entry testimonial. After changing this field, reset permalinks by going to Settings > Permalinks and clicking Save Changes.', 'strong-testimonials' ); ?></p>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
|
73 |
Â
</table>
|
74 |
Â
|
75 |
Â
<hr/>
|
admin/settings/partials/licenses.php
CHANGED
File without changes
|
admin/settings/partials/recipient.php
CHANGED
File without changes
|
admin/view-list-order.php
CHANGED
File without changes
|
admin/views-ajax.php
CHANGED
File without changes
|
admin/views-validate.php
CHANGED
File without changes
|
admin/views.php
CHANGED
@@ -12,8 +12,9 @@
|
|
12 |
Â
* @since 1.21.0
|
13 |
Â
*/
|
14 |
Â
function wpmtst_views_admin() {
|
15 |
-
if ( ! current_user_can( 'strong_testimonials_views' ) )
|
16 |
-
wp_die(
|
Â
|
|
17 |
Â
|
18 |
Â
$tags = array(
|
19 |
Â
'a' => array(
|
@@ -67,9 +68,9 @@ function wpmtst_views_admin() {
|
|
67 |
Â
*/
|
68 |
Â
?>
|
69 |
Â
<h1>
|
70 |
-
<?php
|
71 |
-
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add' ) ); ?>" class="add-new-h2"><?php
|
72 |
-
|
73 |
Â
</h1>
|
74 |
Â
|
75 |
Â
<?php
|
@@ -204,12 +205,12 @@ function wpmtst_view_settings( $action = '', $view_id = null ) {
|
|
204 |
Â
$url2 = $url . '&action=duplicate&id=' . $view_id;
|
205 |
Â
?>
|
206 |
Â
<h1>
|
207 |
-
<?php 'edit' == $action ?
|
208 |
-
<a href="<?php echo esc_url( $url1 ); ?>" class="add-new-h2"><?php
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
Â
</h1>
|
214 |
Â
|
215 |
Â
<form id="wpmtst-views-form" method="post" action="<?php echo admin_url( 'admin-post.php' ); ?>" autocomplete="off">
|
12 |
Â
* @since 1.21.0
|
13 |
Â
*/
|
14 |
Â
function wpmtst_views_admin() {
|
15 |
+
if ( ! current_user_can( 'strong_testimonials_views' ) ) {
|
16 |
+
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'strong-testimonials' ) );
|
17 |
+
}
|
18 |
Â
|
19 |
Â
$tags = array(
|
20 |
Â
'a' => array(
|
68 |
Â
*/
|
69 |
Â
?>
|
70 |
Â
<h1>
|
71 |
+
<?php esc_html_e( 'Views', 'strong-testimonials' ); ?>
|
72 |
+
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add' ) ); ?>" class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
|
73 |
+
<a href="#tab-panel-wpmtst-help-views" class="add-new-h2 open-help-tab"><?php esc_html_e( 'Help', 'strong-testimonials' ); ?></a>
|
74 |
Â
</h1>
|
75 |
Â
|
76 |
Â
<?php
|
205 |
Â
$url2 = $url . '&action=duplicate&id=' . $view_id;
|
206 |
Â
?>
|
207 |
Â
<h1>
|
208 |
+
<?php 'edit' == $action ? esc_html_e( 'Edit View', 'strong-testimonials' ) : esc_html_e( 'Add View', 'strong-testimonials' ); ?>
|
209 |
+
<a href="<?php echo esc_url( $url1 ); ?>" class="add-new-h2"><?php esc_html_e( 'Add New', 'strong-testimonials' ); ?></a>
|
210 |
+
<a href="<?php echo esc_url( $url ); ?>" class="add-new-h2"><?php esc_html_e( 'Return To List', 'strong-testimonials' ); ?></a>
|
211 |
+
<?php if ( 'edit' == $action ) : ?>
|
212 |
+
<a href="<?php echo esc_url( $url2 ); ?>" class="add-new-h2"><?php esc_html_e( 'Duplicate This View', 'strong-testimonials' ); ?></a>
|
213 |
+
<?php endif; ?>
|
214 |
Â
</h1>
|
215 |
Â
|
216 |
Â
<form id="wpmtst-views-form" method="post" action="<?php echo admin_url( 'admin-post.php' ); ?>" autocomplete="off">
|
{admin → assets}/css/admin.css
RENAMED
@@ -1,21 +1,17 @@
|
|
1 |
Â
/**
|
2 |
Â
* Strong Testimonials admin stylesheet
|
3 |
Â
*/
|
4 |
-
|
5 |
Â
.icon-blue {
|
6 |
-
color: #0073aa;
|
7 |
-
}
|
8 |
Â
|
9 |
Â
.error {
|
10 |
-
color: red !important;
|
11 |
-
}
|
12 |
Â
|
13 |
Â
.required-phrase {
|
14 |
Â
color: red;
|
15 |
Â
font-style: normal;
|
16 |
Â
font-weight: 400;
|
17 |
-
font-size: 0.9em;
|
18 |
-
}
|
19 |
Â
|
20 |
Â
.required-phrase:before,
|
21 |
Â
label.required:after {
|
@@ -28,119 +24,93 @@ label.required:after {
|
|
28 |
Â
font-weight: 600;
|
29 |
Â
vertical-align: middle;
|
30 |
Â
position: relative;
|
31 |
-
top: 1px;
|
32 |
-
}
|
33 |
Â
|
34 |
Â
.has-input {
|
35 |
-
display: inline-block;
|
36 |
-
}
|
37 |
Â
|
38 |
Â
.error-message {
|
39 |
Â
display: inline-block;
|
40 |
-
margin-left: 0.5em;
|
41 |
-
}
|
42 |
Â
|
43 |
Â
button.nogo {
|
44 |
-
margin: 0 3px;
|
45 |
-
}
|
46 |
Â
|
47 |
Â
li.warning {
|
48 |
-
background: lightyellow;
|
49 |
-
}
|
50 |
Â
|
51 |
Â
.between-inputs {
|
52 |
Â
margin-left: 0.3em;
|
53 |
-
margin-right: 0.3em;
|
54 |
-
}
|
55 |
Â
|
56 |
Â
.intro p {
|
57 |
-
font-size: 14px;
|
58 |
-
}
|
59 |
Â
|
60 |
Â
.wrap.wpmtst h2 {
|
61 |
-
margin: 2em 0 1em;
|
62 |
-
}
|
63 |
Â
|
64 |
Â
.wrap.wpmtst p {
|
65 |
-
font-size: 14px;
|
66 |
-
}
|
67 |
Â
|
68 |
Â
.wrap.wpmtst .notice p {
|
69 |
-
font-size: 13px;
|
70 |
-
}
|
71 |
Â
|
72 |
Â
.wpmtst .list-wrap {
|
73 |
-
padding: .5em;
|
74 |
-
}
|
75 |
Â
|
76 |
Â
.wp-core-ui .button-primary.active,
|
77 |
Â
.wp-core-ui .button-primary.active:hover,
|
78 |
Â
.wp-core-ui .button-primary.active:focus,
|
79 |
Â
.wp-core-ui .button-primary:active {
|
80 |
-
vertical-align: baseline;
|
81 |
-
}
|
82 |
Â
|
83 |
Â
/* Firefox fix */
|
84 |
Â
a.widget-action:focus {
|
85 |
-
outline: none;
|
86 |
-
}
|
87 |
Â
|
88 |
Â
/* Slug field */
|
89 |
Â
input#post_name {
|
90 |
-
width: 98%;
|
91 |
-
}
|
92 |
Â
|
93 |
Â
fieldset > div {
|
94 |
-
min-height: 30px;
|
95 |
-
}
|
96 |
Â
|
97 |
Â
/* Help sections
|
98 |
-
---------------------------------------------------------*/
|
99 |
-
|
100 |
Â
div.help {
|
101 |
-
margin-left: 0;
|
102 |
-
}
|
103 |
Â
|
104 |
Â
div.help.minor {
|
105 |
Â
font-size: 0.9em;
|
106 |
-
text-align: left;
|
107 |
-
}
|
108 |
Â
|
109 |
Â
/* Settings table
|
110 |
-
---------------------------------------------------------*/
|
111 |
-
|
112 |
Â
.wpmtst i.fa.example {
|
113 |
-
color: #0073aa;
|
114 |
-
}
|
115 |
Â
|
116 |
Â
.stackem ul {
|
117 |
-
margin: 14px 0 0 0;
|
118 |
-
}
|
119 |
Â
|
120 |
Â
.stackem li {
|
121 |
Â
margin-top: 16px;
|
122 |
-
margin-bottom: 16px;
|
123 |
-
}
|
124 |
Â
|
125 |
Â
.stackem label {
|
126 |
Â
display: inline-block;
|
127 |
Â
line-height: 28px;
|
128 |
Â
margin-right: 0.5em;
|
129 |
-
vertical-align: baseline;
|
130 |
-
}
|
131 |
Â
|
132 |
Â
.stackem label.inline {
|
133 |
-
display: inline-block;
|
134 |
-
}
|
135 |
Â
|
136 |
Â
.stackem p.description {
|
137 |
Â
margin-top: 0;
|
138 |
-
margin-left: 22px;
|
139 |
-
}
|
140 |
Â
|
141 |
Â
.stackem p.description.warning {
|
142 |
-
color: #CD0000;
|
143 |
-
}
|
144 |
Â
|
145 |
Â
.stackem .notice {
|
146 |
Â
background: none;
|
@@ -151,271 +121,208 @@ div.help.minor {
|
|
151 |
Â
font-style: italic;
|
152 |
Â
margin: 0 .2em;
|
153 |
Â
padding: 0;
|
154 |
-
color: #868686;
|
155 |
-
}
|
156 |
Â
|
157 |
Â
.stackem span.link {
|
158 |
Â
display: inline-block;
|
159 |
Â
margin: 0 .3em;
|
160 |
Â
font-size: .9em;
|
161 |
-
line-height: 28px;
|
162 |
-
}
|
163 |
Â
|
164 |
Â
.stackem label.disabled {
|
165 |
-
color: #888;
|
166 |
-
}
|
167 |
Â
|
168 |
Â
div.radio {
|
169 |
-
line-height: 1.5em;
|
170 |
-
}
|
171 |
Â
|
172 |
Â
div.radio:hover {
|
173 |
-
color: #000;
|
174 |
-
}
|
175 |
Â
|
176 |
Â
#screenshot-screen-options,
|
177 |
Â
#help-section {
|
178 |
-
display: none;
|
179 |
-
}
|
180 |
Â
|
181 |
Â
.screenshot > div {
|
182 |
Â
display: inline-block;
|
183 |
-
|
184 |
-
-moz-box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8);
|
185 |
-
box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8);
|
186 |
-
}
|
187 |
Â
|
188 |
Â
.help-text {
|
189 |
-
padding: 0.5em 0;
|
190 |
-
}
|
191 |
Â
|
192 |
Â
/* form table */
|
193 |
-
|
194 |
Â
.wpmtst .form-table {
|
195 |
-
vertical-align: middle;
|
196 |
-
}
|
197 |
Â
|
198 |
Â
.wpmtst .form-table .actions {
|
199 |
-
/*vertical-align: top;*/
|
200 |
-
}
|
201 |
Â
|
202 |
Â
.wpmtst .form-table td {
|
203 |
-
padding-top: 15px;
|
204 |
-
}
|
205 |
Â
|
206 |
Â
.wpmtst .form-table td:nth-child(1) {
|
207 |
-
width: 200px;
|
208 |
-
}
|
209 |
Â
|
210 |
Â
.wpmtst .form-table .parent {
|
211 |
Â
border-bottom: 0;
|
212 |
-
vertical-align: top;
|
213 |
-
}
|
214 |
-
|
215 |
-
.wpmtst .form-table th.parent + td {
|
216 |
-
}
|
217 |
Â
|
218 |
Â
.wpmtst .form-table .child {
|
219 |
-
border-top: 0;
|
220 |
-
}
|
221 |
Â
|
222 |
Â
.wpmtst .form-table p {
|
223 |
-
/*margin-bottom: 1em;*/
|
224 |
-
}
|
225 |
Â
|
226 |
Â
.wpmtst .form-table td p:last-child {
|
227 |
-
margin-bottom: 0;
|
228 |
-
}
|
229 |
Â
|
230 |
Â
.wpmtst .form-table input,
|
231 |
Â
.wpmtst .form-table select,
|
232 |
Â
.wpmtst .form-table textarea {
|
233 |
-
/*line-height: 1.5em;*/
|
234 |
-
}
|
235 |
Â
|
236 |
Â
.wpmtst .form-table input[type="button"] {
|
237 |
Â
line-height: 26px;
|
238 |
-
height: 28px;
|
239 |
-
}
|
240 |
Â
|
241 |
Â
.wpmtst select {
|
242 |
-
min-width: 120px;
|
243 |
-
}
|
244 |
Â
|
245 |
Â
.wpmtst option {
|
246 |
-
padding-left: 5px;
|
247 |
-
}
|
248 |
Â
|
249 |
Â
.wpmtst .form-table div.box {
|
250 |
Â
border: 1px solid #DDD;
|
251 |
Â
display: inline-block;
|
252 |
-
padding: 10px;
|
253 |
-
}
|
254 |
Â
|
255 |
Â
.wpmtst .form-table .row {
|
256 |
-
line-height: 2.5em;
|
257 |
-
}
|
258 |
Â
|
259 |
Â
.wpmtst .form-table .alpha {
|
260 |
-
width: 120px;
|
261 |
-
}
|
262 |
Â
|
263 |
Â
.wpmtst .form-table .alpha.alpha-110 {
|
264 |
-
width: 110px;
|
265 |
-
}
|
266 |
Â
|
267 |
Â
.wpmtst .form-table .alpha + div {
|
268 |
-
display: inline-block;
|
269 |
-
}
|
270 |
Â
|
271 |
Â
.wpmtst label.success-action {
|
272 |
Â
display: inline-block;
|
273 |
Â
width: 11em;
|
274 |
-
padding: 10px 0;
|
275 |
-
}
|
276 |
Â
|
277 |
Â
/* compact */
|
278 |
-
|
279 |
Â
.wpmtst .form-table.compact th {
|
280 |
-
vertical-align: top;
|
281 |
-
}
|
282 |
Â
|
283 |
Â
.wpmtst .form-table.compact td {
|
284 |
-
vertical-align: middle;
|
285 |
-
}
|
286 |
Â
|
287 |
Â
/*.wpmtst .form-table.compact td:nth-child(3) {*/
|
288 |
Â
.wpmtst .form-table.compact td.actions {
|
289 |
Â
width: 100px;
|
290 |
-
vertical-align: bottom;
|
291 |
-
}
|
292 |
Â
|
293 |
Â
/*.wpmtst .form-table.compact td:nth-child(3) input.button {*/
|
294 |
Â
.wpmtst .form-table.compact td.actions input.button {
|
295 |
Â
margin-right: 0;
|
296 |
-
margin-bottom: 3px;
|
297 |
-
}
|
298 |
Â
|
299 |
Â
.wpmtst .form-table.compact input[type="text"] {
|
300 |
-
width: 100%;
|
301 |
-
}
|
302 |
Â
|
303 |
Â
.wpmtst .form-table.compact input.error {
|
304 |
Â
border-color: red;
|
305 |
Â
border-radius: 2px;
|
306 |
-
box-shadow: none;
|
307 |
-
}
|
308 |
Â
|
309 |
Â
.wpmtst .form-table.compact label.error {
|
310 |
Â
color: red;
|
311 |
-
display: block;
|
312 |
-
}
|
313 |
Â
|
314 |
Â
/* end: form-table */
|
315 |
-
|
316 |
Â
.code {
|
317 |
-
background: #FFF;
|
318 |
-
}
|
319 |
Â
|
320 |
Â
.code.wide {
|
321 |
Â
padding: 2px 5px;
|
322 |
Â
margin: 3px;
|
323 |
-
border-radius: 2px;
|
324 |
-
}
|
325 |
Â
|
326 |
Â
.submit-buttons input.button {
|
327 |
-
margin-right: 10px;
|
328 |
-
}
|
329 |
Â
|
330 |
Â
.custom-input {
|
331 |
-
line-height: 1.3em;
|
332 |
-
}
|
333 |
Â
|
334 |
Â
.indent {
|
335 |
-
margin-left: 2em;
|
336 |
-
}
|
337 |
Â
|
338 |
Â
.outdent {
|
339 |
-
margin-left: -2em;
|
340 |
-
}
|
341 |
Â
|
342 |
Â
.hilite {
|
343 |
Â
background: lightyellow;
|
344 |
Â
border-radius: 4px;
|
345 |
Â
display: inline-block;
|
346 |
Â
padding: .25em .75em;
|
347 |
-
|
348 |
-
-moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
349 |
-
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
350 |
-
}
|
351 |
Â
|
352 |
Â
p.description.hilite {
|
353 |
-
margin-bottom: 2em;
|
354 |
-
}
|
355 |
Â
|
356 |
Â
ul.compact {
|
357 |
-
margin: 0;
|
358 |
-
}
|
359 |
Â
|
360 |
Â
ul.compact li {
|
361 |
Â
display: inline-block;
|
362 |
-
margin: 6px 30px 6px 0;
|
363 |
-
}
|
364 |
Â
|
365 |
Â
/* Add-on license table
|
366 |
-
------------------------------------------------*/
|
367 |
-
|
368 |
Â
#licenses-form .form-table {
|
369 |
Â
width: auto;
|
370 |
-
max-width: 1024px;
|
371 |
-
}
|
372 |
Â
|
373 |
Â
#licenses-form .form-table label {
|
374 |
Â
/* to match text inputs */
|
375 |
-
line-height: 27px;
|
376 |
-
}
|
377 |
Â
|
378 |
Â
#licenses-form .form-table th,
|
379 |
Â
#licenses-form .form-table td {
|
380 |
-
vertical-align: top;
|
381 |
-
}
|
382 |
Â
|
383 |
Â
#licenses-form th.for-license-key,
|
384 |
Â
#licenses-form th.for-license-status {
|
385 |
-
width: 350px;
|
386 |
-
}
|
387 |
Â
|
388 |
Â
#licenses-form .form-table th {
|
389 |
-
padding: 15px;
|
390 |
-
}
|
391 |
Â
|
392 |
Â
#licenses-form .form-table td {
|
393 |
Â
white-space: nowrap;
|
394 |
-
padding: 15px;
|
395 |
-
}
|
396 |
Â
|
397 |
Â
#licenses-form .form-table th:first-child,
|
398 |
Â
#licenses-form .form-table td:first-child {
|
399 |
-
padding-left: 0;
|
400 |
-
}
|
401 |
Â
|
402 |
Â
#licenses-form .form-table input[type="text"] {
|
403 |
Â
font-family: Consolas, Monaco, monospace;
|
404 |
-
width: 100%;
|
405 |
-
}
|
406 |
Â
|
407 |
Â
#licenses-form .form-table label {
|
408 |
Â
padding-left: 0;
|
409 |
-
text-indent: 0;
|
410 |
-
}
|
411 |
Â
|
412 |
Â
#licenses-form .doing-ajax:before {
|
413 |
Â
display: inline-block;
|
414 |
Â
font: normal 22px/29px dashicons;
|
415 |
-
content: "\
|
416 |
Â
text-align: center;
|
417 |
Â
vertical-align: middle;
|
418 |
-
|
419 |
Â
-webkit-animation-name: rotate;
|
420 |
Â
-webkit-animation-duration: 1.5s;
|
421 |
Â
-webkit-animation-iteration-count: infinite;
|
@@ -427,8 +334,7 @@ ul.compact li {
|
|
427 |
Â
animation-name: rotate;
|
428 |
Â
animation-duration: 1.5s;
|
429 |
Â
animation-iteration-count: infinite;
|
430 |
-
animation-timing-function: linear;
|
431 |
-
}
|
432 |
Â
|
433 |
Â
#licenses-form span.license-status {
|
434 |
Â
display: inline-block;
|
@@ -439,62 +345,49 @@ ul.compact li {
|
|
439 |
Â
padding: 0 8px;
|
440 |
Â
text-transform: uppercase;
|
441 |
Â
border-radius: 3px;
|
442 |
-
vertical-align: middle;
|
443 |
-
}
|
444 |
Â
|
445 |
Â
#licenses-form span.active {
|
446 |
Â
background: green;
|
447 |
-
color: #FFF;
|
448 |
-
}
|
449 |
Â
|
450 |
Â
#licenses-form span.inactive {
|
451 |
Â
background: #999;
|
452 |
-
color: #FFF;
|
453 |
-
}
|
454 |
Â
|
455 |
Â
#licenses-form span.ib {
|
456 |
Â
display: inline-block;
|
457 |
-
vertical-align: middle;
|
458 |
-
}
|
459 |
Â
|
460 |
Â
.activation-error {
|
461 |
-
color: red;
|
462 |
-
}
|
463 |
Â
|
464 |
Â
/* Descriptions
|
465 |
-
------------------------------------------------*/
|
466 |
-
|
467 |
Â
.form-table th .description,
|
468 |
Â
.form-table td .description {
|
469 |
Â
font-size: 14px;
|
470 |
Â
font-style: italic;
|
471 |
-
/*text-indent: 24px;*/
|
472 |
-
}
|
473 |
Â
|
474 |
Â
.description.inline {
|
475 |
Â
display: inline-block;
|
476 |
-
margin-left: 1em;
|
477 |
-
}
|
478 |
Â
|
479 |
Â
.description a {
|
480 |
-
text-decoration: underline;
|
481 |
-
}
|
482 |
Â
|
483 |
Â
.description a:hover {
|
484 |
-
text-decoration: none;
|
485 |
-
}
|
486 |
Â
|
487 |
Â
.radio .description {
|
488 |
-
padding-left: 20px;
|
489 |
-
}
|
490 |
Â
|
491 |
Â
li.checkbox {
|
492 |
-
margin-bottom: 10px;
|
493 |
-
}
|
494 |
Â
|
495 |
Â
.checkbox .description {
|
496 |
-
padding-left: 24px;
|
497 |
-
}
|
498 |
Â
|
499 |
Â
ul.description {
|
500 |
Â
font-style: italic;
|
@@ -502,159 +395,111 @@ ul.description {
|
|
502 |
Â
margin-top: 4px;
|
503 |
Â
list-style-type: disc;
|
504 |
Â
margin-left: 21px;
|
505 |
-
margin-bottom: 0;
|
506 |
-
}
|
507 |
Â
|
508 |
Â
/* Widget
|
509 |
-
------------------------------------------------*/
|
510 |
Â
.wpmtst-widget-form {
|
511 |
-
margin-bottom: 1em;
|
512 |
-
}
|
513 |
Â
|
514 |
Â
.widget-inside p {
|
515 |
-
margin: .5em 0;
|
516 |
-
}
|
517 |
Â
|
518 |
Â
input[disabled],
|
519 |
Â
input[readonly] {
|
520 |
Â
color: #999;
|
521 |
-
background: rgba(0, 0, 0, 0.04);
|
522 |
-
}
|
523 |
Â
|
524 |
Â
/* Categories admin list
|
525 |
-
------------------------------------------------*/
|
526 |
Â
.widefat th.column-ID {
|
527 |
-
width: 2.2em;
|
528 |
-
}
|
529 |
Â
|
530 |
Â
/* Post list table
|
531 |
-
------------------------------------------------*/
|
532 |
Â
td.column-shortcode,
|
533 |
Â
td.column-id {
|
534 |
Â
white-space: nowrap;
|
535 |
-
font-family: Consolas, Monaco, monospace;
|
536 |
-
}
|
537 |
Â
|
538 |
Â
th.sortable.column-id a span {
|
539 |
-
float: right;
|
540 |
-
}
|
541 |
Â
|
542 |
Â
td.column-id {
|
543 |
-
text-align: right;
|
544 |
-
}
|
545 |
Â
|
546 |
Â
/* Star rating in list table
|
547 |
-
--------------------------------------------------*/
|
548 |
Â
.column-rating {
|
549 |
-
width: auto !important;
|
550 |
-
}
|
551 |
Â
|
552 |
Â
/* Views list table
|
553 |
-
--------------------------------------------------*/
|
554 |
Â
.wp-list-table.fixed.wpm-testimonial_page_testimonial-views {
|
555 |
-
table-layout: auto;
|
556 |
-
}
|
557 |
Â
|
558 |
Â
.wpmtst2 > h1 {
|
559 |
-
margin-bottom: 15px;
|
560 |
-
}
|
561 |
Â
|
562 |
Â
/* WordPress fixes
|
563 |
-
--------------------------------------------------*/
|
564 |
-
|
565 |
Â
/* settings page */
|
566 |
Â
@media screen and (max-width: 782px) {
|
567 |
Â
.wpm-testimonial_page_testimonial-settings .form-table td input[type="text"] {
|
568 |
Â
display: inline-block;
|
569 |
-
width: auto;
|
570 |
-
}
|
571 |
-
}
|
572 |
Â
|
573 |
Â
/* Animation
|
574 |
-
--------------------------------------------------*/
|
575 |
-
|
576 |
-
@-webkit-keyframes rotate {
|
577 |
-
from {
|
578 |
-
-webkit-transform: rotate(0deg);
|
579 |
-
}
|
580 |
-
to {
|
581 |
-
-webkit-transform: rotate(360deg);
|
582 |
-
}
|
583 |
-
}
|
584 |
-
|
585 |
-
@-moz-keyframes rotate {
|
586 |
-
from {
|
587 |
-
-moz-transform: rotate(0deg);
|
588 |
-
}
|
589 |
-
to {
|
590 |
-
-moz-transform: rotate(360deg);
|
591 |
-
}
|
592 |
-
}
|
593 |
Â
|
594 |
Â
@keyframes rotate {
|
595 |
Â
from {
|
596 |
-
transform: rotate(0deg);
|
597 |
-
}
|
598 |
Â
to {
|
599 |
-
transform: rotate(360deg);
|
600 |
-
}
|
601 |
-
}
|
602 |
Â
|
603 |
Â
/* Admin > Shortcode example table
|
604 |
-
--------------------------------------------------*/
|
605 |
Â
.form-table.shortcodes tbody tr:hover {
|
606 |
-
background: #FFF;
|
607 |
-
}
|
608 |
Â
|
609 |
Â
.form-table.shortcodes th {
|
610 |
Â
padding-left: 10px;
|
611 |
-
width: auto;
|
612 |
-
}
|
613 |
Â
|
614 |
Â
.form-table.shortcodes td {
|
615 |
-
border: 1px solid #DDD;
|
616 |
-
}
|
617 |
Â
|
618 |
Â
.form-table.shortcodes td.shortcode {
|
619 |
-
font-family: Consolas, Monaco, monospace;
|
620 |
-
}
|
621 |
Â
|
622 |
Â
.form-table.shortcodes td p {
|
623 |
-
margin: 1em 0;
|
624 |
-
}
|
625 |
Â
|
626 |
Â
.form-table.shortcodes td p:first-child {
|
627 |
-
margin-top: 0;
|
628 |
-
}
|
629 |
Â
|
630 |
Â
.form-table.shortcodes td p:last-child {
|
631 |
-
margin-bottom: 0;
|
632 |
-
}
|
633 |
Â
|
634 |
Â
/* special */
|
635 |
-
|
636 |
Â
.form-table.shortcodes tr.important {
|
637 |
-
background: #FFF;
|
638 |
-
}
|
639 |
Â
|
640 |
Â
.form-table.shortcodes tr.important td {
|
641 |
-
border: 1px solid #CCC;
|
642 |
-
}
|
643 |
Â
|
644 |
Â
/* Misc
|
645 |
-
--------------------------------------------------*/
|
646 |
Â
.slug-example {
|
647 |
Â
font-weight: bold;
|
648 |
-
color: #0073aa;
|
649 |
-
}
|
650 |
Â
|
651 |
Â
.form-table.width-auto {
|
652 |
-
width: auto;
|
653 |
-
}
|
654 |
Â
|
655 |
Â
.form-table td p:first-child {
|
656 |
-
margin-top: 6px;
|
657 |
-
}
|
658 |
Â
|
659 |
Â
.current-dashicon {
|
660 |
Â
display: inline-block;
|
@@ -666,167 +511,150 @@ td.column-id {
|
|
666 |
Â
width: 28px;
|
667 |
Â
height: 28px;
|
668 |
Â
position: relative;
|
669 |
-
top: -3px;
|
670 |
-
}
|
671 |
Â
|
672 |
Â
.current-dashicon .dashicons {
|
673 |
Â
vertical-align: middle;
|
674 |
-
line-height: 1.3;
|
675 |
-
}
|
676 |
Â
|
677 |
Â
/*
|
678 |
-
Back these out to have normal "reset" buttons
|
679 |
-
*/
|
680 |
-
|
681 |
Â
/* wp-includes/css/buttons.css:109 */
|
682 |
Â
/*
|
683 |
-
.wp-core-ui input[type="reset"],
|
684 |
-
.wp-core-ui input[type="reset"]:hover,
|
685 |
-
.wp-core-ui input[type="reset"]:active,
|
686 |
-
.wp-core-ui input[type="reset"]:focus {
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
}
|
694 |
-
*/
|
695 |
Â
.wp-core-ui input[type="reset"],
|
696 |
Â
.wp-core-ui input[type="reset"]:hover,
|
697 |
Â
.wp-core-ui input[type="reset"]:active,
|
698 |
Â
.wp-core-ui input[type="reset"]:focus {
|
699 |
Â
background: #F7F7F7;
|
700 |
Â
border: 1px solid #CCC;
|
701 |
-
-webkit-box-shadow: 0 1px 0 #CCC;
|
702 |
Â
box-shadow: 0 1px 0 #CCC;
|
703 |
Â
padding: 0 10px 1px;
|
704 |
-
width: auto;
|
705 |
-
}
|
706 |
Â
|
707 |
Â
/* wp-admin/css/forms.css:102 */
|
708 |
Â
/*
|
709 |
-
.wp-core-ui input[type="reset"]:hover,
|
710 |
-
.wp-core-ui input[type="reset"]:active {
|
711 |
-
|
712 |
-
}
|
713 |
-
*/
|
714 |
Â
/* Based on section 2.0 in wp-includes/css/buttons.css:125 */
|
715 |
Â
.wp-core-ui input[type="reset"]:hover,
|
716 |
Â
.wp-core-ui input[type="reset"]:focus {
|
717 |
Â
background: #fafafa;
|
718 |
Â
border-color: #999;
|
719 |
-
color: #23282d;
|
720 |
-
}
|
721 |
Â
|
722 |
Â
.wp-core-ui input[type="reset"]:focus {
|
723 |
Â
border-color: #5b9dd9;
|
724 |
-
|
725 |
-
box-shadow: 0 0 3px rgba(0, 115, 170, .8);
|
726 |
-
}
|
727 |
Â
|
728 |
Â
.wp-core-ui input[type="reset"]:active {
|
729 |
Â
background: #eee;
|
730 |
Â
border-color: #999;
|
731 |
-
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
732 |
Â
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
733 |
-
|
734 |
-
-ms-transform: translateY(1px);
|
735 |
-
transform: translateY(1px);
|
736 |
-
}
|
737 |
Â
|
738 |
Â
input.button.restore-default {
|
739 |
Â
font: normal 20px/1 dashicons;
|
740 |
-
padding: 1px 3px;
|
741 |
-
}
|
742 |
Â
|
743 |
Â
.wpmtst .subsubsub {
|
744 |
Â
float: none;
|
745 |
-
margin-left: 16px;
|
746 |
-
}
|
747 |
Â
|
748 |
Â
.regular-text.half {
|
749 |
-
width: 12.5em;
|
750 |
-
}
|
751 |
Â
|
752 |
Â
.regular-text.third {
|
753 |
-
width: 20em;
|
754 |
-
}
|
755 |
Â
|
756 |
Â
input.code {
|
757 |
Â
font-size: 13px;
|
758 |
-
font-family: Consolas, Monaco, monospace;
|
759 |
-
}
|
760 |
Â
|
761 |
Â
.wrap h2.nav-tab-wrapper {
|
762 |
-
margin-top: 6px;
|
763 |
-
}
|
764 |
Â
|
765 |
Â
.tab-header {
|
766 |
-
padding: 1em 0;
|
767 |
-
}
|
768 |
Â
|
769 |
Â
.striped > tbody > tr.readonly {
|
770 |
-
background: lightyellow;
|
771 |
-
}
|
772 |
Â
|
773 |
Â
ul.standard {
|
774 |
Â
list-style: disc;
|
775 |
-
padding-left: 1.5em;
|
776 |
-
}
|
777 |
Â
|
778 |
Â
.form-table p.error {
|
779 |
-
margin: 0.5em 0;
|
780 |
-
}
|
781 |
Â
|
782 |
Â
/* shortcodes page */
|
783 |
Â
.wpmtst.shortcode {
|
784 |
-
vertical-align: middle;
|
785 |
-
|
786 |
Â
.wpmtst.shortcodes.has-stars table {
|
787 |
-
margin-bottom: 1em;
|
788 |
-
|
789 |
Â
.wpmtst.shortcodes.has-stars td:nth-child(2) {
|
790 |
Â
width: 70%;
|
791 |
-
/*white-space: nowrap;*/
|
792 |
-
|
793 |
Â
.wpmtst.shortcodes td {
|
794 |
-
padding: 10px;
|
795 |
-
|
796 |
Â
.wpmtst.shortcodes tr.important td {
|
797 |
-
border: 1px solid #DDD;
|
798 |
-
|
799 |
Â
.wpmtst.shortcodes tr:hover {
|
800 |
-
background: #FFF;
|
801 |
-
}
|
802 |
Â
|
803 |
Â
/* inner table */
|
804 |
Â
.wpmtst.shortcodes td.has-inner {
|
805 |
-
padding: 0;
|
806 |
-
|
807 |
Â
.wpmtst.shortcodes table.inner {
|
808 |
Â
margin: 0;
|
809 |
Â
vertical-align: middle;
|
810 |
-
width: 100%;
|
811 |
-
|
812 |
Â
.wpmtst.shortcodes table.inner,
|
813 |
Â
.wpmtst.shortcodes table.inner tr,
|
814 |
Â
.wpmtst.shortcodes table.inner td {
|
815 |
-
border: 0;
|
816 |
-
|
817 |
Â
.wpmtst.shortcodes table.inner tr:first-child td {
|
818 |
-
border-bottom: 1px solid #DDD;
|
819 |
-
}
|
820 |
Â
|
821 |
Â
.wp-list-table .type-wpm-testimonial .row-actions span.id span {
|
822 |
-
color: #777;
|
823 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
824 |
Â
|
825 |
-
.wpmtst-notice {
|
826 |
-
|
827 |
-
|
828 |
-
}
|
829 |
Â
|
830 |
-
.wpmtst-notice img {
|
831 |
-
|
832 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
Â
/**
|
2 |
Â
* Strong Testimonials admin stylesheet
|
3 |
Â
*/
|
Â
|
|
4 |
Â
.icon-blue {
|
5 |
+
color: #0073aa; }
|
Â
|
|
6 |
Â
|
7 |
Â
.error {
|
8 |
+
color: red !important; }
|
Â
|
|
9 |
Â
|
10 |
Â
.required-phrase {
|
11 |
Â
color: red;
|
12 |
Â
font-style: normal;
|
13 |
Â
font-weight: 400;
|
14 |
+
font-size: 0.9em; }
|
Â
|
|
15 |
Â
|
16 |
Â
.required-phrase:before,
|
17 |
Â
label.required:after {
|
24 |
Â
font-weight: 600;
|
25 |
Â
vertical-align: middle;
|
26 |
Â
position: relative;
|
27 |
+
top: 1px; }
|
Â
|
|
28 |
Â
|
29 |
Â
.has-input {
|
30 |
+
display: inline-block; }
|
Â
|
|
31 |
Â
|
32 |
Â
.error-message {
|
33 |
Â
display: inline-block;
|
34 |
+
margin-left: 0.5em; }
|
Â
|
|
35 |
Â
|
36 |
Â
button.nogo {
|
37 |
+
margin: 0 3px; }
|
Â
|
|
38 |
Â
|
39 |
Â
li.warning {
|
40 |
+
background: lightyellow; }
|
Â
|
|
41 |
Â
|
42 |
Â
.between-inputs {
|
43 |
Â
margin-left: 0.3em;
|
44 |
+
margin-right: 0.3em; }
|
Â
|
|
45 |
Â
|
46 |
Â
.intro p {
|
47 |
+
font-size: 14px; }
|
Â
|
|
48 |
Â
|
49 |
Â
.wrap.wpmtst h2 {
|
50 |
+
margin: 2em 0 1em; }
|
Â
|
|
51 |
Â
|
52 |
Â
.wrap.wpmtst p {
|
53 |
+
font-size: 14px; }
|
Â
|
|
54 |
Â
|
55 |
Â
.wrap.wpmtst .notice p {
|
56 |
+
font-size: 13px; }
|
Â
|
|
57 |
Â
|
58 |
Â
.wpmtst .list-wrap {
|
59 |
+
padding: .5em; }
|
Â
|
|
60 |
Â
|
61 |
Â
.wp-core-ui .button-primary.active,
|
62 |
Â
.wp-core-ui .button-primary.active:hover,
|
63 |
Â
.wp-core-ui .button-primary.active:focus,
|
64 |
Â
.wp-core-ui .button-primary:active {
|
65 |
+
vertical-align: baseline; }
|
Â
|
|
66 |
Â
|
67 |
Â
/* Firefox fix */
|
68 |
Â
a.widget-action:focus {
|
69 |
+
outline: none; }
|
Â
|
|
70 |
Â
|
71 |
Â
/* Slug field */
|
72 |
Â
input#post_name {
|
73 |
+
width: 98%; }
|
Â
|
|
74 |
Â
|
75 |
Â
fieldset > div {
|
76 |
+
min-height: 30px; }
|
Â
|
|
77 |
Â
|
78 |
Â
/* Help sections
|
79 |
+
---------------------------------------------------------*/
|
Â
|
|
80 |
Â
div.help {
|
81 |
+
margin-left: 0; }
|
Â
|
|
82 |
Â
|
83 |
Â
div.help.minor {
|
84 |
Â
font-size: 0.9em;
|
85 |
+
text-align: left; }
|
Â
|
|
86 |
Â
|
87 |
Â
/* Settings table
|
88 |
+
---------------------------------------------------------*/
|
Â
|
|
89 |
Â
.wpmtst i.fa.example {
|
90 |
+
color: #0073aa; }
|
Â
|
|
91 |
Â
|
92 |
Â
.stackem ul {
|
93 |
+
margin: 14px 0 0 0; }
|
Â
|
|
94 |
Â
|
95 |
Â
.stackem li {
|
96 |
Â
margin-top: 16px;
|
97 |
+
margin-bottom: 16px; }
|
Â
|
|
98 |
Â
|
99 |
Â
.stackem label {
|
100 |
Â
display: inline-block;
|
101 |
Â
line-height: 28px;
|
102 |
Â
margin-right: 0.5em;
|
103 |
+
vertical-align: baseline; }
|
Â
|
|
104 |
Â
|
105 |
Â
.stackem label.inline {
|
106 |
+
display: inline-block; }
|
Â
|
|
107 |
Â
|
108 |
Â
.stackem p.description {
|
109 |
Â
margin-top: 0;
|
110 |
+
margin-left: 22px; }
|
Â
|
|
111 |
Â
|
112 |
Â
.stackem p.description.warning {
|
113 |
+
color: #CD0000; }
|
Â
|
|
114 |
Â
|
115 |
Â
.stackem .notice {
|
116 |
Â
background: none;
|
121 |
Â
font-style: italic;
|
122 |
Â
margin: 0 .2em;
|
123 |
Â
padding: 0;
|
124 |
+
color: #868686; }
|
Â
|
|
125 |
Â
|
126 |
Â
.stackem span.link {
|
127 |
Â
display: inline-block;
|
128 |
Â
margin: 0 .3em;
|
129 |
Â
font-size: .9em;
|
130 |
+
line-height: 28px; }
|
Â
|
|
131 |
Â
|
132 |
Â
.stackem label.disabled {
|
133 |
+
color: #888; }
|
Â
|
|
134 |
Â
|
135 |
Â
div.radio {
|
136 |
+
line-height: 1.5em; }
|
Â
|
|
137 |
Â
|
138 |
Â
div.radio:hover {
|
139 |
+
color: #000; }
|
Â
|
|
140 |
Â
|
141 |
Â
#screenshot-screen-options,
|
142 |
Â
#help-section {
|
143 |
+
display: none; }
|
Â
|
|
144 |
Â
|
145 |
Â
.screenshot > div {
|
146 |
Â
display: inline-block;
|
147 |
+
box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8); }
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
|
149 |
Â
.help-text {
|
150 |
+
padding: 0.5em 0; }
|
Â
|
|
151 |
Â
|
152 |
Â
/* form table */
|
Â
|
|
153 |
Â
.wpmtst .form-table {
|
154 |
+
vertical-align: middle; }
|
Â
|
|
155 |
Â
|
156 |
Â
.wpmtst .form-table .actions {
|
157 |
+
/*vertical-align: top;*/ }
|
Â
|
|
158 |
Â
|
159 |
Â
.wpmtst .form-table td {
|
160 |
+
padding-top: 15px;
|
161 |
+
/* override PopupMaker's override */ }
|
162 |
Â
|
163 |
Â
.wpmtst .form-table td:nth-child(1) {
|
164 |
+
width: 200px; }
|
Â
|
|
165 |
Â
|
166 |
Â
.wpmtst .form-table .parent {
|
167 |
Â
border-bottom: 0;
|
168 |
+
vertical-align: top; }
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
169 |
Â
|
170 |
Â
.wpmtst .form-table .child {
|
171 |
+
border-top: 0; }
|
Â
|
|
172 |
Â
|
173 |
Â
.wpmtst .form-table p {
|
174 |
+
/*margin-bottom: 1em;*/ }
|
Â
|
|
175 |
Â
|
176 |
Â
.wpmtst .form-table td p:last-child {
|
177 |
+
margin-bottom: 0; }
|
Â
|
|
178 |
Â
|
179 |
Â
.wpmtst .form-table input,
|
180 |
Â
.wpmtst .form-table select,
|
181 |
Â
.wpmtst .form-table textarea {
|
182 |
+
/*line-height: 1.5em;*/ }
|
Â
|
|
183 |
Â
|
184 |
Â
.wpmtst .form-table input[type="button"] {
|
185 |
Â
line-height: 26px;
|
186 |
+
height: 28px; }
|
Â
|
|
187 |
Â
|
188 |
Â
.wpmtst select {
|
189 |
+
min-width: 120px; }
|
Â
|
|
190 |
Â
|
191 |
Â
.wpmtst option {
|
192 |
+
padding-left: 5px; }
|
Â
|
|
193 |
Â
|
194 |
Â
.wpmtst .form-table div.box {
|
195 |
Â
border: 1px solid #DDD;
|
196 |
Â
display: inline-block;
|
197 |
+
padding: 10px; }
|
Â
|
|
198 |
Â
|
199 |
Â
.wpmtst .form-table .row {
|
200 |
+
line-height: 2.5em; }
|
Â
|
|
201 |
Â
|
202 |
Â
.wpmtst .form-table .alpha {
|
203 |
+
width: 120px; }
|
Â
|
|
204 |
Â
|
205 |
Â
.wpmtst .form-table .alpha.alpha-110 {
|
206 |
+
width: 110px; }
|
Â
|
|
207 |
Â
|
208 |
Â
.wpmtst .form-table .alpha + div {
|
209 |
+
display: inline-block; }
|
Â
|
|
210 |
Â
|
211 |
Â
.wpmtst label.success-action {
|
212 |
Â
display: inline-block;
|
213 |
Â
width: 11em;
|
214 |
+
padding: 10px 0; }
|
Â
|
|
215 |
Â
|
216 |
Â
/* compact */
|
Â
|
|
217 |
Â
.wpmtst .form-table.compact th {
|
218 |
+
vertical-align: top; }
|
Â
|
|
219 |
Â
|
220 |
Â
.wpmtst .form-table.compact td {
|
221 |
+
vertical-align: middle; }
|
Â
|
|
222 |
Â
|
223 |
Â
/*.wpmtst .form-table.compact td:nth-child(3) {*/
|
224 |
Â
.wpmtst .form-table.compact td.actions {
|
225 |
Â
width: 100px;
|
226 |
+
vertical-align: bottom; }
|
Â
|
|
227 |
Â
|
228 |
Â
/*.wpmtst .form-table.compact td:nth-child(3) input.button {*/
|
229 |
Â
.wpmtst .form-table.compact td.actions input.button {
|
230 |
Â
margin-right: 0;
|
231 |
+
margin-bottom: 3px; }
|
Â
|
|
232 |
Â
|
233 |
Â
.wpmtst .form-table.compact input[type="text"] {
|
234 |
+
width: 100%; }
|
Â
|
|
235 |
Â
|
236 |
Â
.wpmtst .form-table.compact input.error {
|
237 |
Â
border-color: red;
|
238 |
Â
border-radius: 2px;
|
239 |
+
box-shadow: none; }
|
Â
|
|
240 |
Â
|
241 |
Â
.wpmtst .form-table.compact label.error {
|
242 |
Â
color: red;
|
243 |
+
display: block; }
|
Â
|
|
244 |
Â
|
245 |
Â
/* end: form-table */
|
Â
|
|
246 |
Â
.code {
|
247 |
+
background: #FFF; }
|
Â
|
|
248 |
Â
|
249 |
Â
.code.wide {
|
250 |
Â
padding: 2px 5px;
|
251 |
Â
margin: 3px;
|
252 |
+
border-radius: 2px; }
|
Â
|
|
253 |
Â
|
254 |
Â
.submit-buttons input.button {
|
255 |
+
margin-right: 10px; }
|
Â
|
|
256 |
Â
|
257 |
Â
.custom-input {
|
258 |
+
line-height: 1.3em; }
|
Â
|
|
259 |
Â
|
260 |
Â
.indent {
|
261 |
+
margin-left: 2em; }
|
Â
|
|
262 |
Â
|
263 |
Â
.outdent {
|
264 |
+
margin-left: -2em; }
|
Â
|
|
265 |
Â
|
266 |
Â
.hilite {
|
267 |
Â
background: lightyellow;
|
268 |
Â
border-radius: 4px;
|
269 |
Â
display: inline-block;
|
270 |
Â
padding: .25em .75em;
|
271 |
+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
|
Â
|
|
Â
|
|
Â
|
|
272 |
Â
|
273 |
Â
p.description.hilite {
|
274 |
+
margin-bottom: 2em; }
|
Â
|
|
275 |
Â
|
276 |
Â
ul.compact {
|
277 |
+
margin: 0; }
|
Â
|
|
278 |
Â
|
279 |
Â
ul.compact li {
|
280 |
Â
display: inline-block;
|
281 |
+
margin: 6px 30px 6px 0; }
|
Â
|
|
282 |
Â
|
283 |
Â
/* Add-on license table
|
284 |
+
------------------------------------------------*/
|
Â
|
|
285 |
Â
#licenses-form .form-table {
|
286 |
Â
width: auto;
|
287 |
+
max-width: 1024px; }
|
Â
|
|
288 |
Â
|
289 |
Â
#licenses-form .form-table label {
|
290 |
Â
/* to match text inputs */
|
291 |
+
line-height: 27px; }
|
Â
|
|
292 |
Â
|
293 |
Â
#licenses-form .form-table th,
|
294 |
Â
#licenses-form .form-table td {
|
295 |
+
vertical-align: top; }
|
Â
|
|
296 |
Â
|
297 |
Â
#licenses-form th.for-license-key,
|
298 |
Â
#licenses-form th.for-license-status {
|
299 |
+
width: 350px; }
|
Â
|
|
300 |
Â
|
301 |
Â
#licenses-form .form-table th {
|
302 |
+
padding: 15px; }
|
Â
|
|
303 |
Â
|
304 |
Â
#licenses-form .form-table td {
|
305 |
Â
white-space: nowrap;
|
306 |
+
padding: 15px; }
|
Â
|
|
307 |
Â
|
308 |
Â
#licenses-form .form-table th:first-child,
|
309 |
Â
#licenses-form .form-table td:first-child {
|
310 |
+
padding-left: 0; }
|
Â
|
|
311 |
Â
|
312 |
Â
#licenses-form .form-table input[type="text"] {
|
313 |
Â
font-family: Consolas, Monaco, monospace;
|
314 |
+
width: 100%; }
|
Â
|
|
315 |
Â
|
316 |
Â
#licenses-form .form-table label {
|
317 |
Â
padding-left: 0;
|
318 |
+
text-indent: 0; }
|
Â
|
|
319 |
Â
|
320 |
Â
#licenses-form .doing-ajax:before {
|
321 |
Â
display: inline-block;
|
322 |
Â
font: normal 22px/29px dashicons;
|
323 |
+
content: "\F463";
|
324 |
Â
text-align: center;
|
325 |
Â
vertical-align: middle;
|
Â
|
|
326 |
Â
-webkit-animation-name: rotate;
|
327 |
Â
-webkit-animation-duration: 1.5s;
|
328 |
Â
-webkit-animation-iteration-count: infinite;
|
334 |
Â
animation-name: rotate;
|
335 |
Â
animation-duration: 1.5s;
|
336 |
Â
animation-iteration-count: infinite;
|
337 |
+
animation-timing-function: linear; }
|
Â
|
|
338 |
Â
|
339 |
Â
#licenses-form span.license-status {
|
340 |
Â
display: inline-block;
|
345 |
Â
padding: 0 8px;
|
346 |
Â
text-transform: uppercase;
|
347 |
Â
border-radius: 3px;
|
348 |
+
vertical-align: middle; }
|
Â
|
|
349 |
Â
|
350 |
Â
#licenses-form span.active {
|
351 |
Â
background: green;
|
352 |
+
color: #FFF; }
|
Â
|
|
353 |
Â
|
354 |
Â
#licenses-form span.inactive {
|
355 |
Â
background: #999;
|
356 |
+
color: #FFF; }
|
Â
|
|
357 |
Â
|
358 |
Â
#licenses-form span.ib {
|
359 |
Â
display: inline-block;
|
360 |
+
vertical-align: middle; }
|
Â
|
|
361 |
Â
|
362 |
Â
.activation-error {
|
363 |
+
color: red; }
|
Â
|
|
364 |
Â
|
365 |
Â
/* Descriptions
|
366 |
+
------------------------------------------------*/
|
Â
|
|
367 |
Â
.form-table th .description,
|
368 |
Â
.form-table td .description {
|
369 |
Â
font-size: 14px;
|
370 |
Â
font-style: italic;
|
371 |
+
/*text-indent: 24px;*/ }
|
Â
|
|
372 |
Â
|
373 |
Â
.description.inline {
|
374 |
Â
display: inline-block;
|
375 |
+
margin-left: 1em; }
|
Â
|
|
376 |
Â
|
377 |
Â
.description a {
|
378 |
+
text-decoration: underline; }
|
Â
|
|
379 |
Â
|
380 |
Â
.description a:hover {
|
381 |
+
text-decoration: none; }
|
Â
|
|
382 |
Â
|
383 |
Â
.radio .description {
|
384 |
+
padding-left: 20px; }
|
Â
|
|
385 |
Â
|
386 |
Â
li.checkbox {
|
387 |
+
margin-bottom: 10px; }
|
Â
|
|
388 |
Â
|
389 |
Â
.checkbox .description {
|
390 |
+
padding-left: 24px; }
|
Â
|
|
391 |
Â
|
392 |
Â
ul.description {
|
393 |
Â
font-style: italic;
|
395 |
Â
margin-top: 4px;
|
396 |
Â
list-style-type: disc;
|
397 |
Â
margin-left: 21px;
|
398 |
+
margin-bottom: 0; }
|
Â
|
|
399 |
Â
|
400 |
Â
/* Widget
|
401 |
+
------------------------------------------------*/
|
402 |
Â
.wpmtst-widget-form {
|
403 |
+
margin-bottom: 1em; }
|
Â
|
|
404 |
Â
|
405 |
Â
.widget-inside p {
|
406 |
+
margin: .5em 0; }
|
Â
|
|
407 |
Â
|
408 |
Â
input[disabled],
|
409 |
Â
input[readonly] {
|
410 |
Â
color: #999;
|
411 |
+
background: rgba(0, 0, 0, 0.04); }
|
Â
|
|
412 |
Â
|
413 |
Â
/* Categories admin list
|
414 |
+
------------------------------------------------*/
|
415 |
Â
.widefat th.column-ID {
|
416 |
+
width: 2.2em; }
|
Â
|
|
417 |
Â
|
418 |
Â
/* Post list table
|
419 |
+
------------------------------------------------*/
|
420 |
Â
td.column-shortcode,
|
421 |
Â
td.column-id {
|
422 |
Â
white-space: nowrap;
|
423 |
+
font-family: Consolas, Monaco, monospace; }
|
Â
|
|
424 |
Â
|
425 |
Â
th.sortable.column-id a span {
|
426 |
+
float: right; }
|
Â
|
|
427 |
Â
|
428 |
Â
td.column-id {
|
429 |
+
text-align: right; }
|
Â
|
|
430 |
Â
|
431 |
Â
/* Star rating in list table
|
432 |
+
--------------------------------------------------*/
|
433 |
Â
.column-rating {
|
434 |
+
width: auto !important; }
|
Â
|
|
435 |
Â
|
436 |
Â
/* Views list table
|
437 |
+
--------------------------------------------------*/
|
438 |
Â
.wp-list-table.fixed.wpm-testimonial_page_testimonial-views {
|
439 |
+
table-layout: auto; }
|
Â
|
|
440 |
Â
|
441 |
Â
.wpmtst2 > h1 {
|
442 |
+
margin-bottom: 15px; }
|
Â
|
|
443 |
Â
|
444 |
Â
/* WordPress fixes
|
445 |
+
--------------------------------------------------*/
|
Â
|
|
446 |
Â
/* settings page */
|
447 |
Â
@media screen and (max-width: 782px) {
|
448 |
Â
.wpm-testimonial_page_testimonial-settings .form-table td input[type="text"] {
|
449 |
Â
display: inline-block;
|
450 |
+
width: auto; } }
|
Â
|
|
Â
|
|
451 |
Â
|
452 |
Â
/* Animation
|
453 |
+
--------------------------------------------------*/
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
454 |
Â
|
455 |
Â
@keyframes rotate {
|
456 |
Â
from {
|
457 |
+
transform: rotate(0deg); }
|
Â
|
|
458 |
Â
to {
|
459 |
+
transform: rotate(360deg); } }
|
Â
|
|
Â
|
|
460 |
Â
|
461 |
Â
/* Admin > Shortcode example table
|
462 |
+
--------------------------------------------------*/
|
463 |
Â
.form-table.shortcodes tbody tr:hover {
|
464 |
+
background: #FFF; }
|
Â
|
|
465 |
Â
|
466 |
Â
.form-table.shortcodes th {
|
467 |
Â
padding-left: 10px;
|
468 |
+
width: auto; }
|
Â
|
|
469 |
Â
|
470 |
Â
.form-table.shortcodes td {
|
471 |
+
border: 1px solid #DDD; }
|
Â
|
|
472 |
Â
|
473 |
Â
.form-table.shortcodes td.shortcode {
|
474 |
+
font-family: Consolas, Monaco, monospace; }
|
Â
|
|
475 |
Â
|
476 |
Â
.form-table.shortcodes td p {
|
477 |
+
margin: 1em 0; }
|
Â
|
|
478 |
Â
|
479 |
Â
.form-table.shortcodes td p:first-child {
|
480 |
+
margin-top: 0; }
|
Â
|
|
481 |
Â
|
482 |
Â
.form-table.shortcodes td p:last-child {
|
483 |
+
margin-bottom: 0; }
|
Â
|
|
484 |
Â
|
485 |
Â
/* special */
|
Â
|
|
486 |
Â
.form-table.shortcodes tr.important {
|
487 |
+
background: #FFF; }
|
Â
|
|
488 |
Â
|
489 |
Â
.form-table.shortcodes tr.important td {
|
490 |
+
border: 1px solid #CCC; }
|
Â
|
|
491 |
Â
|
492 |
Â
/* Misc
|
493 |
+
--------------------------------------------------*/
|
494 |
Â
.slug-example {
|
495 |
Â
font-weight: bold;
|
496 |
+
color: #0073aa; }
|
Â
|
|
497 |
Â
|
498 |
Â
.form-table.width-auto {
|
499 |
+
width: auto; }
|
Â
|
|
500 |
Â
|
501 |
Â
.form-table td p:first-child {
|
502 |
+
margin-top: 6px; }
|
Â
|
|
503 |
Â
|
504 |
Â
.current-dashicon {
|
505 |
Â
display: inline-block;
|
511 |
Â
width: 28px;
|
512 |
Â
height: 28px;
|
513 |
Â
position: relative;
|
514 |
+
top: -3px; }
|
Â
|
|
515 |
Â
|
516 |
Â
.current-dashicon .dashicons {
|
517 |
Â
vertical-align: middle;
|
518 |
+
line-height: 1.3; }
|
Â
|
|
519 |
Â
|
520 |
Â
/*
|
521 |
+
Back these out to have normal "reset" buttons
|
522 |
+
*/
|
Â
|
|
523 |
Â
/* wp-includes/css/buttons.css:109 */
|
524 |
Â
/*
|
525 |
+
.wp-core-ui input[type="reset"],
|
526 |
+
.wp-core-ui input[type="reset"]:hover,
|
527 |
+
.wp-core-ui input[type="reset"]:active,
|
528 |
+
.wp-core-ui input[type="reset"]:focus {
|
529 |
+
background: none;
|
530 |
+
border: none;
|
531 |
+
-webkit-box-shadow: none;
|
532 |
+
box-shadow: none;
|
533 |
+
padding: 0 2px 1px;
|
534 |
+
width: auto;
|
535 |
+
}
|
536 |
+
*/
|
537 |
Â
.wp-core-ui input[type="reset"],
|
538 |
Â
.wp-core-ui input[type="reset"]:hover,
|
539 |
Â
.wp-core-ui input[type="reset"]:active,
|
540 |
Â
.wp-core-ui input[type="reset"]:focus {
|
541 |
Â
background: #F7F7F7;
|
542 |
Â
border: 1px solid #CCC;
|
Â
|
|
543 |
Â
box-shadow: 0 1px 0 #CCC;
|
544 |
Â
padding: 0 10px 1px;
|
545 |
+
width: auto; }
|
Â
|
|
546 |
Â
|
547 |
Â
/* wp-admin/css/forms.css:102 */
|
548 |
Â
/*
|
549 |
+
.wp-core-ui input[type="reset"]:hover,
|
550 |
+
.wp-core-ui input[type="reset"]:active {
|
551 |
+
color: #00a0d2;
|
552 |
+
}
|
553 |
+
*/
|
554 |
Â
/* Based on section 2.0 in wp-includes/css/buttons.css:125 */
|
555 |
Â
.wp-core-ui input[type="reset"]:hover,
|
556 |
Â
.wp-core-ui input[type="reset"]:focus {
|
557 |
Â
background: #fafafa;
|
558 |
Â
border-color: #999;
|
559 |
+
color: #23282d; }
|
Â
|
|
560 |
Â
|
561 |
Â
.wp-core-ui input[type="reset"]:focus {
|
562 |
Â
border-color: #5b9dd9;
|
563 |
+
box-shadow: 0 0 3px rgba(0, 115, 170, 0.8); }
|
Â
|
|
Â
|
|
564 |
Â
|
565 |
Â
.wp-core-ui input[type="reset"]:active {
|
566 |
Â
background: #eee;
|
567 |
Â
border-color: #999;
|
Â
|
|
568 |
Â
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
569 |
+
transform: translateY(1px); }
|
Â
|
|
Â
|
|
Â
|
|
570 |
Â
|
571 |
Â
input.button.restore-default {
|
572 |
Â
font: normal 20px/1 dashicons;
|
573 |
+
padding: 1px 3px; }
|
Â
|
|
574 |
Â
|
575 |
Â
.wpmtst .subsubsub {
|
576 |
Â
float: none;
|
577 |
+
margin-left: 16px; }
|
Â
|
|
578 |
Â
|
579 |
Â
.regular-text.half {
|
580 |
+
width: 12.5em; }
|
Â
|
|
581 |
Â
|
582 |
Â
.regular-text.third {
|
583 |
+
width: 20em; }
|
Â
|
|
584 |
Â
|
585 |
Â
input.code {
|
586 |
Â
font-size: 13px;
|
587 |
+
font-family: Consolas, Monaco, monospace; }
|
Â
|
|
588 |
Â
|
589 |
Â
.wrap h2.nav-tab-wrapper {
|
590 |
+
margin-top: 6px; }
|
Â
|
|
591 |
Â
|
592 |
Â
.tab-header {
|
593 |
+
padding: 1em 0; }
|
Â
|
|
594 |
Â
|
595 |
Â
.striped > tbody > tr.readonly {
|
596 |
+
background: lightyellow; }
|
Â
|
|
597 |
Â
|
598 |
Â
ul.standard {
|
599 |
Â
list-style: disc;
|
600 |
+
padding-left: 1.5em; }
|
Â
|
|
601 |
Â
|
602 |
Â
.form-table p.error {
|
603 |
+
margin: 0.5em 0; }
|
Â
|
|
604 |
Â
|
605 |
Â
/* shortcodes page */
|
606 |
Â
.wpmtst.shortcode {
|
607 |
+
vertical-align: middle; }
|
608 |
+
|
609 |
Â
.wpmtst.shortcodes.has-stars table {
|
610 |
+
margin-bottom: 1em; }
|
611 |
+
|
612 |
Â
.wpmtst.shortcodes.has-stars td:nth-child(2) {
|
613 |
Â
width: 70%;
|
614 |
+
/*white-space: nowrap;*/ }
|
615 |
+
|
616 |
Â
.wpmtst.shortcodes td {
|
617 |
+
padding: 10px; }
|
618 |
+
|
619 |
Â
.wpmtst.shortcodes tr.important td {
|
620 |
+
border: 1px solid #DDD; }
|
621 |
+
|
622 |
Â
.wpmtst.shortcodes tr:hover {
|
623 |
+
background: #FFF; }
|
Â
|
|
624 |
Â
|
625 |
Â
/* inner table */
|
626 |
Â
.wpmtst.shortcodes td.has-inner {
|
627 |
+
padding: 0; }
|
628 |
+
|
629 |
Â
.wpmtst.shortcodes table.inner {
|
630 |
Â
margin: 0;
|
631 |
Â
vertical-align: middle;
|
632 |
+
width: 100%; }
|
633 |
+
|
634 |
Â
.wpmtst.shortcodes table.inner,
|
635 |
Â
.wpmtst.shortcodes table.inner tr,
|
636 |
Â
.wpmtst.shortcodes table.inner td {
|
637 |
+
border: 0; }
|
638 |
+
|
639 |
Â
.wpmtst.shortcodes table.inner tr:first-child td {
|
640 |
+
border-bottom: 1px solid #DDD; }
|
Â
|
|
641 |
Â
|
642 |
Â
.wp-list-table .type-wpm-testimonial .row-actions span.id span {
|
643 |
+
color: #777; }
|
644 |
+
|
645 |
+
.wpm-testimonial_page_about-strong-testimonials .wpmst-mascot {
|
646 |
+
width: 160px;
|
647 |
+
margin-left: 1rem;
|
648 |
+
float: right; }
|
649 |
Â
|
650 |
+
.edit-php.post-type-wpm-testimonial .wpmtst-notice {
|
651 |
+
padding: 2.5rem 2rem;
|
652 |
+
border: 2px solid #7F22DE; }
|
Â
|
|
653 |
Â
|
654 |
+
.edit-php.post-type-wpm-testimonial .wpmtst-notice img {
|
655 |
+
max-width: 100%; }
|
656 |
+
|
657 |
+
.edit-php.post-type-wpm-testimonial .wpmst-mascot {
|
658 |
+
width: 120px;
|
659 |
+
margin-right: 2rem;
|
660 |
+
float: left; }
|
assets/js/admin-js.js
ADDED
@@ -0,0 +1,261 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 |
+
/******/ // identity function for calling harmony imports with the correct context
|
37 |
+
/******/ __webpack_require__.i = function(value) { return value; };
|
38 |
+
/******/
|
39 |
+
/******/ // define getter function for harmony exports
|
40 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
41 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
42 |
+
/******/ Object.defineProperty(exports, name, {
|
43 |
+
/******/ configurable: false,
|
44 |
+
/******/ enumerable: true,
|
45 |
+
/******/ get: getter
|
46 |
+
/******/ });
|
47 |
+
/******/ }
|
48 |
+
/******/ };
|
49 |
+
/******/
|
50 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51 |
+
/******/ __webpack_require__.n = function(module) {
|
52 |
+
/******/ var getter = module && module.__esModule ?
|
53 |
+
/******/ function getDefault() { return module['default']; } :
|
54 |
+
/******/ function getModuleExports() { return module; };
|
55 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
56 |
+
/******/ return getter;
|
57 |
+
/******/ };
|
58 |
+
/******/
|
59 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
60 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61 |
+
/******/
|
62 |
+
/******/ // __webpack_public_path__
|
63 |
+
/******/ __webpack_require__.p = "";
|
64 |
+
/******/
|
65 |
+
/******/ // Load entry module and return exports
|
66 |
+
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
67 |
+
/******/ })
|
68 |
+
/************************************************************************/
|
69 |
+
/******/ ([
|
70 |
+
/* 0 */
|
71 |
+
/***/ (function(module, exports, __webpack_require__) {
|
72 |
+
|
73 |
+
"use strict";
|
74 |
+
|
75 |
+
|
76 |
+
Object.defineProperty(exports, "__esModule", {
|
77 |
+
value: true
|
78 |
+
});
|
79 |
+
|
80 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
81 |
+
|
82 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
83 |
+
|
84 |
+
var Notice = function () {
|
85 |
+
function Notice($element) {
|
86 |
+
var _this = this;
|
87 |
+
|
88 |
+
_classCallCheck(this, Notice);
|
89 |
+
|
90 |
+
this.$element = $element;
|
91 |
+
this.key = $element.data('key');
|
92 |
+
this.nonce = $element.data('nonce');
|
93 |
+
|
94 |
+
jQuery(document).on('click', '.wpmtst-notice .notice-dismiss', function () {
|
95 |
+
return _this.onDismissClick();
|
96 |
+
});
|
97 |
+
}
|
98 |
+
|
99 |
+
_createClass(Notice, [{
|
100 |
+
key: 'onDismissClick',
|
101 |
+
value: function onDismissClick() {
|
102 |
+
jQuery.ajax({
|
103 |
+
type: "POST",
|
104 |
+
data: { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
|
105 |
+
url: ajaxurl
|
106 |
+
});
|
107 |
+
}
|
108 |
+
}]);
|
109 |
+
|
110 |
+
return Notice;
|
111 |
+
}();
|
112 |
+
|
113 |
+
exports.default = Notice;
|
114 |
+
|
115 |
+
/***/ }),
|
116 |
+
/* 1 */
|
117 |
+
/***/ (function(module, exports, __webpack_require__) {
|
118 |
+
|
119 |
+
"use strict";
|
120 |
+
|
121 |
+
|
122 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
123 |
+
|
124 |
+
var _notice = __webpack_require__(0);
|
125 |
+
|
126 |
+
var _notice2 = _interopRequireDefault(_notice);
|
127 |
+
|
128 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
129 |
+
|
130 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Strong Testimonials admin
|
134 |
+
*
|
135 |
+
* @namespace jQuery
|
136 |
+
*/
|
137 |
+
|
138 |
+
// Function to get the Max value in Array
|
139 |
+
Array.max = function (array) {
|
140 |
+
return Math.max.apply(Math, array);
|
141 |
+
};
|
142 |
+
|
143 |
+
jQuery(document).ready(function ($) {
|
144 |
+
|
145 |
+
// Convert "A String" to "a_string"
|
146 |
+
function convertLabel(label) {
|
147 |
+
return label.replace(/\s+/g, '_').replace(/\W/g, '').toLowerCase();
|
148 |
+
}
|
149 |
+
|
150 |
+
// Remove invalid characters
|
151 |
+
function removeSpaces(word) {
|
152 |
+
//return word.replace(/\s+/g, "_");
|
153 |
+
return word.replace(/[^\w\s(?!\-)]/gi, '');
|
154 |
+
}
|
155 |
+
|
156 |
+
$.fn.showInlineBlock = function () {
|
157 |
+
return this.css('display', 'inline-block');
|
158 |
+
};
|
159 |
+
|
160 |
+
/**
|
161 |
+
* ----------------------------------------
|
162 |
+
* General events
|
163 |
+
* ----------------------------------------
|
164 |
+
*/
|
165 |
+
|
166 |
+
// Add protocol if missing
|
167 |
+
// Thanks http://stackoverflow.com/a/36429927/51600
|
168 |
+
$('input[type=url]').change(function () {
|
169 |
+
if (this.value.length && !/^https*:\/\//.test(this.value)) {
|
170 |
+
this.value = 'http://' + this.value;
|
171 |
+
}
|
172 |
+
});
|
173 |
+
|
174 |
+
$('ul.ui-tabs-nav li a').click(function () {
|
175 |
+
$(this).blur();
|
176 |
+
});
|
177 |
+
|
178 |
+
$('.focus-next-field').change(function (e) {
|
179 |
+
if ($(e.target).is(':checked')) {
|
180 |
+
$(e.target).parent().next().find('input').focus().select();
|
181 |
+
}
|
182 |
+
});
|
183 |
+
|
184 |
+
// toggle screenshots
|
185 |
+
$('#toggle-screen-options').add('#screenshot-screen-options').click(function (e) {
|
186 |
+
$(this).blur();
|
187 |
+
$('#screenshot-screen-options').slideToggle();
|
188 |
+
});
|
189 |
+
|
190 |
+
// toggle screenshots
|
191 |
+
$('#toggle-help').click(function (e) {
|
192 |
+
$(this).toggleClass('closed open').blur();
|
193 |
+
$('#help-section').slideToggle();
|
194 |
+
});
|
195 |
+
|
196 |
+
/**
|
197 |
+
* ----------------------------------------
|
198 |
+
* View List Table
|
199 |
+
* ----------------------------------------
|
200 |
+
*/
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Save sort order
|
204 |
+
*/
|
205 |
+
$('table.wpm-testimonial_page_testimonial-views th.manage-column').on('click', function (e) {
|
206 |
+
var columnName = $(this).attr('id');
|
207 |
+
// get the opposite class
|
208 |
+
var columnOrder = $(this).hasClass('asc') ? 'desc' : $(this).hasClass('desc') ? 'asc' : '';
|
209 |
+
var data = {
|
210 |
+
'action': 'wpmtst_save_view_list_order',
|
211 |
+
'name': columnName,
|
212 |
+
'order': columnOrder
|
213 |
+
};
|
214 |
+
$.get(ajaxurl, data, function (response) {});
|
215 |
+
});
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Sticky views
|
219 |
+
*/
|
220 |
+
$('table.wpm-testimonial_page_testimonial-views').on('click', '.stickit', function (e) {
|
221 |
+
var icon = $(this);
|
222 |
+
icon.closest('.wp-list-table-wrap').find('.overlay').fadeIn(200);
|
223 |
+
icon.blur().toggleClass('stuck');
|
224 |
+
var id = $(this).closest('tr').find('td.id').html();
|
225 |
+
var data = {
|
226 |
+
'action': 'wpmtst_save_view_sticky',
|
227 |
+
'id': id
|
228 |
+
};
|
229 |
+
$.get(ajaxurl, data, function (response) {
|
230 |
+
if (response) {
|
231 |
+
window.location.reload();
|
232 |
+
}
|
233 |
+
});
|
234 |
+
});
|
235 |
+
});
|
236 |
+
|
237 |
+
var WPMTST_Admin = function () {
|
238 |
+
function WPMTST_Admin() {
|
239 |
+
_classCallCheck(this, WPMTST_Admin);
|
240 |
+
|
241 |
+
this.initNotices();
|
242 |
+
}
|
243 |
+
|
244 |
+
_createClass(WPMTST_Admin, [{
|
245 |
+
key: 'initNotices',
|
246 |
+
value: function initNotices() {
|
247 |
+
var $div = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : jQuery("body");
|
248 |
+
|
249 |
+
$div.find('.wpmtst-notice').each(function (index) {
|
250 |
+
new _notice2.default(jQuery(this));
|
251 |
+
});
|
252 |
+
}
|
253 |
+
}]);
|
254 |
+
|
255 |
+
return WPMTST_Admin;
|
256 |
+
}();
|
257 |
+
|
258 |
+
window.WPMTST_Admin = new WPMTST_Admin();
|
259 |
+
|
260 |
+
/***/ })
|
261 |
+
/******/ ]);
|
assets/src/js/admin.js
ADDED
@@ -0,0 +1,125 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Strong Testimonials admin
|
3 |
+
*
|
4 |
+
* @namespace jQuery
|
5 |
+
*/
|
6 |
+
|
7 |
+
// Function to get the Max value in Array
|
8 |
+
Array.max = function (array) {
|
9 |
+
return Math.max.apply(Math, array);
|
10 |
+
};
|
11 |
+
|
12 |
+
jQuery(document).ready(function ($) {
|
13 |
+
|
14 |
+
// Convert "A String" to "a_string"
|
15 |
+
function convertLabel(label) {
|
16 |
+
return label.replace(/\s+/g, '_').replace(/\W/g, '').toLowerCase();
|
17 |
+
}
|
18 |
+
|
19 |
+
// Remove invalid characters
|
20 |
+
function removeSpaces(word) {
|
21 |
+
//return word.replace(/\s+/g, "_");
|
22 |
+
return word.replace(/[^\w\s(?!\-)]/gi, '');
|
23 |
+
}
|
24 |
+
|
25 |
+
$.fn.showInlineBlock = function () {
|
26 |
+
return this.css('display', 'inline-block');
|
27 |
+
};
|
28 |
+
|
29 |
+
/**
|
30 |
+
* ----------------------------------------
|
31 |
+
* General events
|
32 |
+
* ----------------------------------------
|
33 |
+
*/
|
34 |
+
|
35 |
+
// Add protocol if missing
|
36 |
+
// Thanks http://stackoverflow.com/a/36429927/51600
|
37 |
+
$('input[type=url]').change(function () {
|
38 |
+
if (this.value.length && !/^https*:\/\//.test(this.value)) {
|
39 |
+
this.value = 'http://' + this.value;
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
$('ul.ui-tabs-nav li a').click(function () {
|
44 |
+
$(this).blur();
|
45 |
+
});
|
46 |
+
|
47 |
+
$('.focus-next-field').change(function (e) {
|
48 |
+
if ($(e.target).is(':checked')) {
|
49 |
+
$(e.target).parent().next().find('input').focus().select();
|
50 |
+
}
|
51 |
+
});
|
52 |
+
|
53 |
+
// toggle screenshots
|
54 |
+
$('#toggle-screen-options').add('#screenshot-screen-options').click(function (e) {
|
55 |
+
$(this).blur();
|
56 |
+
$('#screenshot-screen-options').slideToggle();
|
57 |
+
});
|
58 |
+
|
59 |
+
// toggle screenshots
|
60 |
+
$('#toggle-help').click(function (e) {
|
61 |
+
$(this).toggleClass('closed open').blur();
|
62 |
+
$('#help-section').slideToggle();
|
63 |
+
});
|
64 |
+
|
65 |
+
/**
|
66 |
+
* ----------------------------------------
|
67 |
+
* View List Table
|
68 |
+
* ----------------------------------------
|
69 |
+
*/
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Save sort order
|
73 |
+
*/
|
74 |
+
$('table.wpm-testimonial_page_testimonial-views th.manage-column').on('click', function (e) {
|
75 |
+
var columnName = $(this).attr('id');
|
76 |
+
// get the opposite class
|
77 |
+
var columnOrder = $(this).hasClass('asc') ? 'desc' : $(this).hasClass('desc') ? 'asc' : '';
|
78 |
+
var data = {
|
79 |
+
'action': 'wpmtst_save_view_list_order',
|
80 |
+
'name': columnName,
|
81 |
+
'order': columnOrder
|
82 |
+
};
|
83 |
+
$.get(ajaxurl, data, function (response) {
|
84 |
+
});
|
85 |
+
});
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Sticky views
|
89 |
+
*/
|
90 |
+
$('table.wpm-testimonial_page_testimonial-views').on('click', '.stickit', function (e) {
|
91 |
+
var icon = $(this);
|
92 |
+
icon.closest('.wp-list-table-wrap').find('.overlay').fadeIn(200);
|
93 |
+
icon.blur().toggleClass('stuck');
|
94 |
+
var id = $(this).closest('tr').find('td.id').html();
|
95 |
+
var data = {
|
96 |
+
'action': 'wpmtst_save_view_sticky',
|
97 |
+
'id': id
|
98 |
+
};
|
99 |
+
$.get(ajaxurl, data, function (response) {
|
100 |
+
if (response) {
|
101 |
+
window.location.reload();
|
102 |
+
}
|
103 |
+
});
|
104 |
+
});
|
105 |
+
|
106 |
+
});
|
107 |
+
|
108 |
+
|
109 |
+
import Notice from './modules/notice';
|
110 |
+
|
111 |
+
class WPMTST_Admin {
|
112 |
+
|
113 |
+
constructor(){
|
114 |
+
this.initNotices();
|
115 |
+
}
|
116 |
+
|
117 |
+
initNotices( $div = jQuery("body") ) {
|
118 |
+
$div.find('.wpmtst-notice').each( function( index ) {
|
119 |
+
new Notice( jQuery(this) );
|
120 |
+
});
|
121 |
+
}
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
window.WPMTST_Admin = new WPMTST_Admin();
|
assets/src/js/modules/notice.js
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
export default class Notice {
|
2 |
+
|
3 |
+
constructor($element){
|
4 |
+
this.$element = $element;
|
5 |
+
this.key = $element.data('key');
|
6 |
+
this.nonce = $element.data('nonce');
|
7 |
+
|
8 |
+
jQuery(document).on( 'click', '.wpmtst-notice .notice-dismiss', () => this.onDismissClick() );
|
9 |
+
}
|
10 |
+
|
11 |
+
onDismissClick() {
|
12 |
+
jQuery.ajax({
|
13 |
+
type: "POST",
|
14 |
+
data : { action: "wpmtst_dismiss_notice", nonce: this.nonce, key: this.key },
|
15 |
+
url : ajaxurl
|
16 |
+
});
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
|
assets/src/js/modules/range-slider.js
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
export default class RangeSlider {
|
2 |
+
|
3 |
+
constructor($element){
|
4 |
+
this.$element = $element;
|
5 |
+
this.$slider = this.$element.find('.wpmtst-range__slider');
|
6 |
+
this.$minInput = this.$element.find('.wpmtst-range__min');
|
7 |
+
this.$maxInput = this.$element.find('.wpmtst-range__max');
|
8 |
+
|
9 |
+
this.initRangeSlider();
|
10 |
+
}
|
11 |
+
|
12 |
+
initRangeSlider() {
|
13 |
+
this.$slider.slider({
|
14 |
+
range: true,
|
15 |
+
min: this.$slider.data('min'),
|
16 |
+
max: this.$slider.data('max'),
|
17 |
+
values: this.$slider.data('values').split(","),
|
18 |
+
slide: ( event, ui ) => {
|
19 |
+
this.$minInput.val( ui.values[ 0 ] );
|
20 |
+
this.$maxInput.val( ui.values[ 1 ] );
|
21 |
+
}
|
22 |
+
});
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
|
assets/src/scss/admin.scss
ADDED
@@ -0,0 +1,853 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Strong Testimonials admin stylesheet
|
3 |
+
*/
|
4 |
+
|
5 |
+
.icon-blue {
|
6 |
+
color: #0073aa;
|
7 |
+
}
|
8 |
+
|
9 |
+
.error {
|
10 |
+
color: red !important;
|
11 |
+
}
|
12 |
+
|
13 |
+
.required-phrase {
|
14 |
+
color: red;
|
15 |
+
font-style: normal;
|
16 |
+
font-weight: 400;
|
17 |
+
font-size: 0.9em;
|
18 |
+
}
|
19 |
+
|
20 |
+
.required-phrase:before,
|
21 |
+
label.required:after {
|
22 |
+
content: '*';
|
23 |
+
display: inline-block;
|
24 |
+
color: red;
|
25 |
+
font-size: 27px;
|
26 |
+
line-height: 19px;
|
27 |
+
height: 19px;
|
28 |
+
font-weight: 600;
|
29 |
+
vertical-align: middle;
|
30 |
+
position: relative;
|
31 |
+
top: 1px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.has-input {
|
35 |
+
display: inline-block;
|
36 |
+
}
|
37 |
+
|
38 |
+
.error-message {
|
39 |
+
display: inline-block;
|
40 |
+
margin-left: 0.5em;
|
41 |
+
}
|
42 |
+
|
43 |
+
button.nogo {
|
44 |
+
margin: 0 3px;
|
45 |
+
}
|
46 |
+
|
47 |
+
li.warning {
|
48 |
+
background: lightyellow;
|
49 |
+
}
|
50 |
+
|
51 |
+
.between-inputs {
|
52 |
+
margin-left: 0.3em;
|
53 |
+
margin-right: 0.3em;
|
54 |
+
}
|
55 |
+
|
56 |
+
.intro p {
|
57 |
+
font-size: 14px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.wrap.wpmtst h2 {
|
61 |
+
margin: 2em 0 1em;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wrap.wpmtst p {
|
65 |
+
font-size: 14px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.wrap.wpmtst .notice p {
|
69 |
+
font-size: 13px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.wpmtst .list-wrap {
|
73 |
+
padding: .5em;
|
74 |
+
}
|
75 |
+
|
76 |
+
.wp-core-ui .button-primary.active,
|
77 |
+
.wp-core-ui .button-primary.active:hover,
|
78 |
+
.wp-core-ui .button-primary.active:focus,
|
79 |
+
.wp-core-ui .button-primary:active {
|
80 |
+
vertical-align: baseline;
|
81 |
+
}
|
82 |
+
|
83 |
+
/* Firefox fix */
|
84 |
+
|
85 |
+
a.widget-action:focus {
|
86 |
+
outline: none;
|
87 |
+
}
|
88 |
+
|
89 |
+
/* Slug field */
|
90 |
+
|
91 |
+
input#post_name {
|
92 |
+
width: 98%;
|
93 |
+
}
|
94 |
+
|
95 |
+
fieldset>div {
|
96 |
+
min-height: 30px;
|
97 |
+
}
|
98 |
+
|
99 |
+
/* Help sections
|
100 |
+
---------------------------------------------------------*/
|
101 |
+
|
102 |
+
div.help {
|
103 |
+
margin-left: 0;
|
104 |
+
}
|
105 |
+
|
106 |
+
div.help.minor {
|
107 |
+
font-size: 0.9em;
|
108 |
+
text-align: left;
|
109 |
+
}
|
110 |
+
|
111 |
+
/* Settings table
|
112 |
+
---------------------------------------------------------*/
|
113 |
+
|
114 |
+
.wpmtst i.fa.example {
|
115 |
+
color: #0073aa;
|
116 |
+
}
|
117 |
+
|
118 |
+
.stackem ul {
|
119 |
+
margin: 14px 0 0 0;
|
120 |
+
}
|
121 |
+
|
122 |
+
.stackem li {
|
123 |
+
margin-top: 16px;
|
124 |
+
margin-bottom: 16px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.stackem label {
|
128 |
+
display: inline-block;
|
129 |
+
line-height: 28px;
|
130 |
+
margin-right: 0.5em;
|
131 |
+
vertical-align: baseline;
|
132 |
+
}
|
133 |
+
|
134 |
+
.stackem label.inline {
|
135 |
+
display: inline-block;
|
136 |
+
}
|
137 |
+
|
138 |
+
.stackem p.description {
|
139 |
+
margin-top: 0;
|
140 |
+
margin-left: 22px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.stackem p.description.warning {
|
144 |
+
color: #CD0000;
|
145 |
+
}
|
146 |
+
|
147 |
+
.stackem .notice {
|
148 |
+
background: none;
|
149 |
+
border: none;
|
150 |
+
box-shadow: none;
|
151 |
+
display: inline-block;
|
152 |
+
font-size: .9em;
|
153 |
+
font-style: italic;
|
154 |
+
margin: 0 .2em;
|
155 |
+
padding: 0;
|
156 |
+
color: #868686;
|
157 |
+
}
|
158 |
+
|
159 |
+
.stackem span.link {
|
160 |
+
display: inline-block;
|
161 |
+
margin: 0 .3em;
|
162 |
+
font-size: .9em;
|
163 |
+
line-height: 28px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.stackem label.disabled {
|
167 |
+
color: #888;
|
168 |
+
}
|
169 |
+
|
170 |
+
div.radio {
|
171 |
+
line-height: 1.5em;
|
172 |
+
}
|
173 |
+
|
174 |
+
div.radio:hover {
|
175 |
+
color: #000;
|
176 |
+
}
|
177 |
+
|
178 |
+
#screenshot-screen-options,
|
179 |
+
#help-section {
|
180 |
+
display: none;
|
181 |
+
}
|
182 |
+
|
183 |
+
.screenshot>div {
|
184 |
+
display: inline-block;
|
185 |
+
-webkit-box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8);
|
186 |
+
-moz-box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8);
|
187 |
+
box-shadow: inset 0px 0px 40px rgba(0, 0, 0, 0.8);
|
188 |
+
}
|
189 |
+
|
190 |
+
.help-text {
|
191 |
+
padding: 0.5em 0;
|
192 |
+
}
|
193 |
+
|
194 |
+
/* form table */
|
195 |
+
|
196 |
+
.wpmtst .form-table {
|
197 |
+
vertical-align: middle;
|
198 |
+
}
|
199 |
+
|
200 |
+
.wpmtst .form-table .actions {
|
201 |
+
/*vertical-align: top;*/
|
202 |
+
}
|
203 |
+
|
204 |
+
.wpmtst .form-table td {
|
205 |
+
padding-top: 15px;
|
206 |
+
/* override PopupMaker's override */
|
207 |
+
}
|
208 |
+
|
209 |
+
.wpmtst .form-table td:nth-child(1) {
|
210 |
+
width: 200px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.wpmtst .form-table .parent {
|
214 |
+
border-bottom: 0;
|
215 |
+
vertical-align: top;
|
216 |
+
}
|
217 |
+
|
218 |
+
.wpmtst .form-table th.parent+td {}
|
219 |
+
|
220 |
+
.wpmtst .form-table .child {
|
221 |
+
border-top: 0;
|
222 |
+
}
|
223 |
+
|
224 |
+
.wpmtst .form-table p {
|
225 |
+
/*margin-bottom: 1em;*/
|
226 |
+
}
|
227 |
+
|
228 |
+
.wpmtst .form-table td p:last-child {
|
229 |
+
margin-bottom: 0;
|
230 |
+
}
|
231 |
+
|
232 |
+
.wpmtst .form-table input,
|
233 |
+
.wpmtst .form-table select,
|
234 |
+
.wpmtst .form-table textarea {
|
235 |
+
/*line-height: 1.5em;*/
|
236 |
+
}
|
237 |
+
|
238 |
+
.wpmtst .form-table input[type="button"] {
|
239 |
+
line-height: 26px;
|
240 |
+
height: 28px;
|
241 |
+
}
|
242 |
+
|
243 |
+
.wpmtst select {
|
244 |
+
min-width: 120px;
|
245 |
+
}
|
246 |
+
|
247 |
+
.wpmtst option {
|
248 |
+
padding-left: 5px;
|
249 |
+
}
|
250 |
+
|
251 |
+
.wpmtst .form-table div.box {
|
252 |
+
border: 1px solid #DDD;
|
253 |
+
display: inline-block;
|
254 |
+
padding: 10px;
|
255 |
+
}
|
256 |
+
|
257 |
+
.wpmtst .form-table .row {
|
258 |
+
line-height: 2.5em;
|
259 |
+
}
|
260 |
+
|
261 |
+
.wpmtst .form-table .alpha {
|
262 |
+
width: 120px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.wpmtst .form-table .alpha.alpha-110 {
|
266 |
+
width: 110px;
|
267 |
+
}
|
268 |
+
|
269 |
+
.wpmtst .form-table .alpha+div {
|
270 |
+
display: inline-block;
|
271 |
+
}
|
272 |
+
|
273 |
+
.wpmtst label.success-action {
|
274 |
+
display: inline-block;
|
275 |
+
width: 11em;
|
276 |
+
padding: 10px 0;
|
277 |
+
}
|
278 |
+
|
279 |
+
/* compact */
|
280 |
+
|
281 |
+
.wpmtst .form-table.compact th {
|
282 |
+
vertical-align: top;
|
283 |
+
}
|
284 |
+
|
285 |
+
.wpmtst .form-table.compact td {
|
286 |
+
vertical-align: middle;
|
287 |
+
}
|
288 |
+
|
289 |
+
/*.wpmtst .form-table.compact td:nth-child(3) {*/
|
290 |
+
|
291 |
+
.wpmtst .form-table.compact td.actions {
|
292 |
+
width: 100px;
|
293 |
+
vertical-align: bottom;
|
294 |
+
}
|
295 |
+
|
296 |
+
/*.wpmtst .form-table.compact td:nth-child(3) input.button {*/
|
297 |
+
|
298 |
+
.wpmtst .form-table.compact td.actions input.button {
|
299 |
+
margin-right: 0;
|
300 |
+
margin-bottom: 3px;
|
301 |
+
}
|
302 |
+
|
303 |
+
.wpmtst .form-table.compact input[type="text"] {
|
304 |
+
width: 100%;
|
305 |
+
}
|
306 |
+
|
307 |
+
.wpmtst .form-table.compact input.error {
|
308 |
+
border-color: red;
|
309 |
+
border-radius: 2px;
|
310 |
+
box-shadow: none;
|
311 |
+
}
|
312 |
+
|
313 |
+
.wpmtst .form-table.compact label.error {
|
314 |
+
color: red;
|
315 |
+
display: block;
|
316 |
+
}
|
317 |
+
|
318 |
+
/* end: form-table */
|
319 |
+
|
320 |
+
.code {
|
321 |
+
background: #FFF;
|
322 |
+
}
|
323 |
+
|
324 |
+
.code.wide {
|
325 |
+
padding: 2px 5px;
|
326 |
+
margin: 3px;
|
327 |
+
border-radius: 2px;
|
328 |
+
}
|
329 |
+
|
330 |
+
.submit-buttons input.button {
|
331 |
+
margin-right: 10px;
|
332 |
+
}
|
333 |
+
|
334 |
+
.custom-input {
|
335 |
+
line-height: 1.3em;
|
336 |
+
}
|
337 |
+
|
338 |
+
.indent {
|
339 |
+
margin-left: 2em;
|
340 |
+
}
|
341 |
+
|
342 |
+
.outdent {
|
343 |
+
margin-left: -2em;
|
344 |
+
}
|
345 |
+
|
346 |
+
.hilite {
|
347 |
+
background: lightyellow;
|
348 |
+
border-radius: 4px;
|
349 |
+
display: inline-block;
|
350 |
+
padding: .25em .75em;
|
351 |
+
-webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
352 |
+
-moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
353 |
+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
354 |
+
}
|
355 |
+
|
356 |
+
p.description.hilite {
|
357 |
+
margin-bottom: 2em;
|
358 |
+
}
|
359 |
+
|
360 |
+
ul.compact {
|
361 |
+
margin: 0;
|
362 |
+
}
|
363 |
+
|
364 |
+
ul.compact li {
|
365 |
+
display: inline-block;
|
366 |
+
margin: 6px 30px 6px 0;
|
367 |
+
}
|
368 |
+
|
369 |
+
/* Add-on license table
|
370 |
+
------------------------------------------------*/
|
371 |
+
|
372 |
+
#licenses-form .form-table {
|
373 |
+
width: auto;
|
374 |
+
max-width: 1024px;
|
375 |
+
}
|
376 |
+
|
377 |
+
#licenses-form .form-table label {
|
378 |
+
/* to match text inputs */
|
379 |
+
line-height: 27px;
|
380 |
+
}
|
381 |
+
|
382 |
+
#licenses-form .form-table th,
|
383 |
+
#licenses-form .form-table td {
|
384 |
+
vertical-align: top;
|
385 |
+
}
|
386 |
+
|
387 |
+
#licenses-form th.for-license-key,
|
388 |
+
#licenses-form th.for-license-status {
|
389 |
+
width: 350px;
|
390 |
+
}
|
391 |
+
|
392 |
+
#licenses-form .form-table th {
|
393 |
+
padding: 15px;
|
394 |
+
}
|
395 |
+
|
396 |
+
#licenses-form .form-table td {
|
397 |
+
white-space: nowrap;
|
398 |
+
padding: 15px;
|
399 |
+
}
|
400 |
+
|
401 |
+
#licenses-form .form-table th:first-child,
|
402 |
+
#licenses-form .form-table td:first-child {
|
403 |
+
padding-left: 0;
|
404 |
+
}
|
405 |
+
|
406 |
+
#licenses-form .form-table input[type="text"] {
|
407 |
+
font-family: Consolas, Monaco, monospace;
|
408 |
+
width: 100%;
|
409 |
+
}
|
410 |
+
|
411 |
+
#licenses-form .form-table label {
|
412 |
+
padding-left: 0;
|
413 |
+
text-indent: 0;
|
414 |
+
}
|
415 |
+
|
416 |
+
#licenses-form .doing-ajax:before {
|
417 |
+
display: inline-block;
|
418 |
+
font: normal 22px/29px dashicons;
|
419 |
+
content: "\f463";
|
420 |
+
text-align: center;
|
421 |
+
vertical-align: middle;
|
422 |
+
-webkit-animation-name: rotate;
|
423 |
+
-webkit-animation-duration: 1.5s;
|
424 |
+
-webkit-animation-iteration-count: infinite;
|
425 |
+
-webkit-animation-timing-function: linear;
|
426 |
+
-moz-animation-name: rotate;
|
427 |
+
-moz-animation-duration: 1.5s;
|
428 |
+
-moz-animation-iteration-count: infinite;
|
429 |
+
-moz-animation-timing-function: linear;
|
430 |
+
animation-name: rotate;
|
431 |
+
animation-duration: 1.5s;
|
432 |
+
animation-iteration-count: infinite;
|
433 |
+
animation-timing-function: linear;
|
434 |
+
}
|
435 |
+
|
436 |
+
#licenses-form span.license-status {
|
437 |
+
display: inline-block;
|
438 |
+
font-size: 0.9em;
|
439 |
+
line-height: 28px;
|
440 |
+
height: 27px;
|
441 |
+
margin: 1px 10px 1px 0;
|
442 |
+
padding: 0 8px;
|
443 |
+
text-transform: uppercase;
|
444 |
+
border-radius: 3px;
|
445 |
+
vertical-align: middle;
|
446 |
+
}
|
447 |
+
|
448 |
+
#licenses-form span.active {
|
449 |
+
background: green;
|
450 |
+
color: #FFF;
|
451 |
+
}
|
452 |
+
|
453 |
+
#licenses-form span.inactive {
|
454 |
+
background: #999;
|
455 |
+
color: #FFF;
|
456 |
+
}
|
457 |
+
|
458 |
+
#licenses-form span.ib {
|
459 |
+
display: inline-block;
|
460 |
+
vertical-align: middle;
|
461 |
+
}
|
462 |
+
|
463 |
+
.activation-error {
|
464 |
+
color: red;
|
465 |
+
}
|
466 |
+
|
467 |
+
/* Descriptions
|
468 |
+
------------------------------------------------*/
|
469 |
+
|
470 |
+
.form-table th .description,
|
471 |
+
.form-table td .description {
|
472 |
+
font-size: 14px;
|
473 |
+
font-style: italic;
|
474 |
+
/*text-indent: 24px;*/
|
475 |
+
}
|
476 |
+
|
477 |
+
.description.inline {
|
478 |
+
display: inline-block;
|
479 |
+
margin-left: 1em;
|
480 |
+
}
|
481 |
+
|
482 |
+
.description a {
|
483 |
+
text-decoration: underline;
|
484 |
+
}
|
485 |
+
|
486 |
+
.description a:hover {
|
487 |
+
text-decoration: none;
|
488 |
+
}
|
489 |
+
|
490 |
+
.radio .description {
|
491 |
+
padding-left: 20px;
|
492 |
+
}
|
493 |
+
|
494 |
+
li.checkbox {
|
495 |
+
margin-bottom: 10px;
|
496 |
+
}
|
497 |
+
|
498 |
+
.checkbox .description {
|
499 |
+
padding-left: 24px;
|
500 |
+
}
|
501 |
+
|
502 |
+
ul.description {
|
503 |
+
font-style: italic;
|
504 |
+
color: #666;
|
505 |
+
margin-top: 4px;
|
506 |
+
list-style-type: disc;
|
507 |
+
margin-left: 21px;
|
508 |
+
margin-bottom: 0;
|
509 |
+
}
|
510 |
+
|
511 |
+
/* Widget
|
512 |
+
------------------------------------------------*/
|
513 |
+
|
514 |
+
.wpmtst-widget-form {
|
515 |
+
margin-bottom: 1em;
|
516 |
+
}
|
517 |
+
|
518 |
+
.widget-inside p {
|
519 |
+
margin: .5em 0;
|
520 |
+
}
|
521 |
+
|
522 |
+
input[disabled],
|
523 |
+
input[readonly] {
|
524 |
+
color: #999;
|
525 |
+
background: rgba(0, 0, 0, 0.04);
|
526 |
+
}
|
527 |
+
|
528 |
+
/* Categories admin list
|
529 |
+
------------------------------------------------*/
|
530 |
+
|
531 |
+
.widefat th.column-ID {
|
532 |
+
width: 2.2em;
|
533 |
+
}
|
534 |
+
|
535 |
+
/* Post list table
|
536 |
+
------------------------------------------------*/
|
537 |
+
|
538 |
+
td.column-shortcode,
|
539 |
+
td.column-id {
|
540 |
+
white-space: nowrap;
|
541 |
+
font-family: Consolas, Monaco, monospace;
|
542 |
+
}
|
543 |
+
|
544 |
+
th.sortable.column-id a span {
|
545 |
+
float: right;
|
546 |
+
}
|
547 |
+
|
548 |
+
td.column-id {
|
549 |
+
text-align: right;
|
550 |
+
}
|
551 |
+
|
552 |
+
/* Star rating in list table
|
553 |
+
--------------------------------------------------*/
|
554 |
+
|
555 |
+
.column-rating {
|
556 |
+
width: auto !important;
|
557 |
+
}
|
558 |
+
|
559 |
+
/* Views list table
|
560 |
+
--------------------------------------------------*/
|
561 |
+
|
562 |
+
.wp-list-table.fixed.wpm-testimonial_page_testimonial-views {
|
563 |
+
table-layout: auto;
|
564 |
+
}
|
565 |
+
|
566 |
+
.wpmtst2>h1 {
|
567 |
+
margin-bottom: 15px;
|
568 |
+
}
|
569 |
+
|
570 |
+
/* WordPress fixes
|
571 |
+
--------------------------------------------------*/
|
572 |
+
|
573 |
+
/* settings page */
|
574 |
+
|
575 |
+
@media screen and (max-width: 782px) {
|
576 |
+
.wpm-testimonial_page_testimonial-settings .form-table td input[type="text"] {
|
577 |
+
display: inline-block;
|
578 |
+
width: auto;
|
579 |
+
}
|
580 |
+
}
|
581 |
+
|
582 |
+
/* Animation
|
583 |
+
--------------------------------------------------*/
|
584 |
+
|
585 |
+
@-webkit-keyframes rotate {
|
586 |
+
from {
|
587 |
+
-webkit-transform: rotate(0deg);
|
588 |
+
}
|
589 |
+
to {
|
590 |
+
-webkit-transform: rotate(360deg);
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
@-moz-keyframes rotate {
|
595 |
+
from {
|
596 |
+
-moz-transform: rotate(0deg);
|
597 |
+
}
|
598 |
+
to {
|
599 |
+
-moz-transform: rotate(360deg);
|
600 |
+
}
|
601 |
+
}
|
602 |
+
|
603 |
+
@keyframes rotate {
|
604 |
+
from {
|
605 |
+
transform: rotate(0deg);
|
606 |
+
}
|
607 |
+
to {
|
608 |
+
transform: rotate(360deg);
|
609 |
+
}
|
610 |
+
}
|
611 |
+
|
612 |
+
/* Admin > Shortcode example table
|
613 |
+
--------------------------------------------------*/
|
614 |
+
|
615 |
+
.form-table.shortcodes tbody tr:hover {
|
616 |
+
background: #FFF;
|
617 |
+
}
|
618 |
+
|
619 |
+
.form-table.shortcodes th {
|
620 |
+
padding-left: 10px;
|
621 |
+
width: auto;
|
622 |
+
}
|
623 |
+
|
624 |
+
.form-table.shortcodes td {
|
625 |
+
border: 1px solid #DDD;
|
626 |
+
}
|
627 |
+
|
628 |
+
.form-table.shortcodes td.shortcode {
|
629 |
+
font-family: Consolas, Monaco, monospace;
|
630 |
+
}
|
631 |
+
|
632 |
+
.form-table.shortcodes td p {
|
633 |
+
margin: 1em 0;
|
634 |
+
}
|
635 |
+
|
636 |
+
.form-table.shortcodes td p:first-child {
|
637 |
+
margin-top: 0;
|
638 |
+
}
|
639 |
+
|
640 |
+
.form-table.shortcodes td p:last-child {
|
641 |
+
margin-bottom: 0;
|
642 |
+
}
|
643 |
+
|
644 |
+
/* special */
|
645 |
+
|
646 |
+
.form-table.shortcodes tr.important {
|
647 |
+
background: #FFF;
|
648 |
+
}
|
649 |
+
|
650 |
+
.form-table.shortcodes tr.important td {
|
651 |
+
border: 1px solid #CCC;
|
652 |
+
}
|
653 |
+
|
654 |
+
/* Misc
|
655 |
+
--------------------------------------------------*/
|
656 |
+
|
657 |
+
.slug-example {
|
658 |
+
font-weight: bold;
|
659 |
+
color: #0073aa;
|
660 |
+
}
|
661 |
+
|
662 |
+
.form-table.width-auto {
|
663 |
+
width: auto;
|
664 |
+
}
|
665 |
+
|
666 |
+
.form-table td p:first-child {
|
667 |
+
margin-top: 6px;
|
668 |
+
}
|
669 |
+
|
670 |
+
.current-dashicon {
|
671 |
+
display: inline-block;
|
672 |
+
background: #0073aa;
|
673 |
+
color: #FFF;
|
674 |
+
border-radius: 2px;
|
675 |
+
text-align: center;
|
676 |
+
vertical-align: middle;
|
677 |
+
width: 28px;
|
678 |
+
height: 28px;
|
679 |
+
position: relative;
|
680 |
+
top: -3px;
|
681 |
+
}
|
682 |
+
|
683 |
+
.current-dashicon .dashicons {
|
684 |
+
vertical-align: middle;
|
685 |
+
line-height: 1.3;
|
686 |
+
}
|
687 |
+
|
688 |
+
/*
|
689 |
+
Back these out to have normal "reset" buttons
|
690 |
+
*/
|
691 |
+
|
692 |
+
/* wp-includes/css/buttons.css:109 */
|
693 |
+
|
694 |
+
/*
|
695 |
+
.wp-core-ui input[type="reset"],
|
696 |
+
.wp-core-ui input[type="reset"]:hover,
|
697 |
+
.wp-core-ui input[type="reset"]:active,
|
698 |
+
.wp-core-ui input[type="reset"]:focus {
|
699 |
+
background: none;
|
700 |
+
border: none;
|
701 |
+
-webkit-box-shadow: none;
|
702 |
+
box-shadow: none;
|
703 |
+
padding: 0 2px 1px;
|
704 |
+
width: auto;
|
705 |
+
}
|
706 |
+
*/
|
707 |
+
|
708 |
+
.wp-core-ui input[type="reset"],
|
709 |
+
.wp-core-ui input[type="reset"]:hover,
|
710 |
+
.wp-core-ui input[type="reset"]:active,
|
711 |
+
.wp-core-ui input[type="reset"]:focus {
|
712 |
+
background: #F7F7F7;
|
713 |
+
border: 1px solid #CCC;
|
714 |
+
-webkit-box-shadow: 0 1px 0 #CCC;
|
715 |
+
box-shadow: 0 1px 0 #CCC;
|
716 |
+
padding: 0 10px 1px;
|
717 |
+
width: auto;
|
718 |
+
}
|
719 |
+
|
720 |
+
/* wp-admin/css/forms.css:102 */
|
721 |
+
|
722 |
+
/*
|
723 |
+
.wp-core-ui input[type="reset"]:hover,
|
724 |
+
.wp-core-ui input[type="reset"]:active {
|
725 |
+
color: #00a0d2;
|
726 |
+
}
|
727 |
+
*/
|
728 |
+
|
729 |
+
/* Based on section 2.0 in wp-includes/css/buttons.css:125 */
|
730 |
+
|
731 |
+
.wp-core-ui input[type="reset"]:hover,
|
732 |
+
.wp-core-ui input[type="reset"]:focus {
|
733 |
+
background: #fafafa;
|
734 |
+
border-color: #999;
|
735 |
+
color: #23282d;
|
736 |
+
}
|
737 |
+
|
738 |
+
.wp-core-ui input[type="reset"]:focus {
|
739 |
+
border-color: #5b9dd9;
|
740 |
+
-webkit-box-shadow: 0 0 3px rgba(0, 115, 170, .8);
|
741 |
+
box-shadow: 0 0 3px rgba(0, 115, 170, .8);
|
742 |
+
}
|
743 |
+
|
744 |
+
.wp-core-ui input[type="reset"]:active {
|
745 |
+
background: #eee;
|
746 |
+
border-color: #999;
|
747 |
+
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
748 |
+
box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
|
749 |
+
-webkit-transform: translateY(1px);
|
750 |
+
-ms-transform: translateY(1px);
|
751 |
+
transform: translateY(1px);
|
752 |
+
}
|
753 |
+
|
754 |
+
input.button.restore-default {
|
755 |
+
font: normal 20px/1 dashicons;
|
756 |
+
padding: 1px 3px;
|
757 |
+
}
|
758 |
+
|
759 |
+
.wpmtst .subsubsub {
|
760 |
+
float: none;
|
761 |
+
margin-left: 16px;
|
762 |
+
}
|
763 |
+
|
764 |
+
.regular-text.half {
|
765 |
+
width: 12.5em;
|
766 |
+
}
|
767 |
+
|
768 |
+
.regular-text.third {
|
769 |
+
width: 20em;
|
770 |
+
}
|
771 |
+
|
772 |
+
input.code {
|
773 |
+
font-size: 13px;
|
774 |
+
font-family: Consolas, Monaco, monospace;
|
775 |
+
}
|
776 |
+
|
777 |
+
.wrap h2.nav-tab-wrapper {
|
778 |
+
margin-top: 6px;
|
779 |
+
}
|
780 |
+
|
781 |
+
.tab-header {
|
782 |
+
padding: 1em 0;
|
783 |
+
}
|
784 |
+
|
785 |
+
.striped>tbody>tr.readonly {
|
786 |
+
background: lightyellow;
|
787 |
+
}
|
788 |
+
|
789 |
+
ul.standard {
|
790 |
+
list-style: disc;
|
791 |
+
padding-left: 1.5em;
|
792 |
+
}
|
793 |
+
|
794 |
+
.form-table p.error {
|
795 |
+
margin: 0.5em 0;
|
796 |
+
}
|
797 |
+
|
798 |
+
/* shortcodes page */
|
799 |
+
|
800 |
+
.wpmtst.shortcode {
|
801 |
+
vertical-align: middle;
|
802 |
+
}
|
803 |
+
|
804 |
+
.wpmtst.shortcodes.has-stars table {
|
805 |
+
margin-bottom: 1em;
|
806 |
+
}
|
807 |
+
|
808 |
+
.wpmtst.shortcodes.has-stars td:nth-child(2) {
|
809 |
+
width: 70%;
|
810 |
+
/*white-space: nowrap;*/
|
811 |
+
}
|
812 |
+
|
813 |
+
.wpmtst.shortcodes td {
|
814 |
+
padding: 10px;
|
815 |
+
}
|
816 |
+
|
817 |
+
.wpmtst.shortcodes tr.important td {
|
818 |
+
border: 1px solid #DDD;
|
819 |
+
}
|
820 |
+
|
821 |
+
.wpmtst.shortcodes tr:hover {
|
822 |
+
background: #FFF;
|
823 |
+
}
|
824 |
+
|
825 |
+
/* inner table */
|
826 |
+
|
827 |
+
.wpmtst.shortcodes td.has-inner {
|
828 |
+
padding: 0;
|
829 |
+
}
|
830 |
+
|
831 |
+
.wpmtst.shortcodes table.inner {
|
832 |
+
margin: 0;
|
833 |
+
vertical-align: middle;
|
834 |
+
width: 100%;
|
835 |
+
}
|
836 |
+
|
837 |
+
.wpmtst.shortcodes table.inner,
|
838 |
+
.wpmtst.shortcodes table.inner tr,
|
839 |
+
.wpmtst.shortcodes table.inner td {
|
840 |
+
border: 0;
|
841 |
+
}
|
842 |
+
|
843 |
+
.wpmtst.shortcodes table.inner tr:first-child td {
|
844 |
+
border-bottom: 1px solid #DDD;
|
845 |
+
}
|
846 |
+
|
847 |
+
.wp-list-table .type-wpm-testimonial .row-actions span.id span {
|
848 |
+
color: #777;
|
849 |
+
}
|
850 |
+
|
851 |
+
@import 'admin/pages';
|
852 |
+
@import 'admin/notices';
|
853 |
+
|
assets/src/scss/admin/_notices.scss
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
|
assets/src/scss/admin/_pages.scss
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.wpm-testimonial_page_about-strong-testimonials {
|
2 |
+
|
3 |
+
|
4 |
+
.wpmst-mascot {
|
5 |
+
width: 160px;
|
6 |
+
margin-left: 1rem;
|
7 |
+
float: right;
|
8 |
+
}
|
9 |
+
}
|
10 |
+
|
11 |
+
.edit-php.post-type-wpm-testimonial {
|
12 |
+
|
13 |
+
.wpmtst-notice {
|
14 |
+
padding: 2.5rem 2rem;
|
15 |
+
border: 2px solid #7F22DE;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wpmtst-notice img {
|
19 |
+
max-width: 100%;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wpmst-mascot {
|
23 |
+
width: 120px;
|
24 |
+
margin-right: 2rem;
|
25 |
+
float: left;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
changelog.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1 |
Â
= 2.36 - Feb. 15, 2019 =
|
2 |
Â
* bug fixes and tweaks
|
3 |
Â
|
1 |
+
= 2.37 - Mar. 18, 2019 =
|
2 |
+
* added ability to export testimonials with featured images included.
|
3 |
+
* added option to change single testimonial permalink slug.
|
4 |
+
* fixed a conflict with `Mesmerize` theme not displaying the views.
|
5 |
+
* fixed issue with audio shortcode not playing in the testimonial content.
|
6 |
+
* fixed form redirect url not saving.
|
7 |
+
* fixed issue when testimonial slideshows has only one testimonial.
|
8 |
+
* fixed issue with the `read more` link in a slideshow not toggling correctly.
|
9 |
+
* removed `Really Simple Captcha` from captcha settings.
|
10 |
+
* fixed wp_debug warnings.
|
11 |
+
* minor backend tweaks.
|
12 |
+
|
13 |
Â
= 2.36 - Feb. 15, 2019 =
|
14 |
Â
* bug fixes and tweaks
|
15 |
Â
|
includes/class-strong-form.php
CHANGED
File without changes
|
includes/class-strong-log.php
CHANGED
File without changes
|
includes/class-strong-mail.php
CHANGED
File without changes
|
includes/class-strong-templates.php
CHANGED
File without changes
|
includes/class-strong-testimonials-order.php
CHANGED
File without changes
|
includes/class-strong-testimonials-privacy.php
CHANGED
File without changes
|
includes/class-strong-testimonials-render.php
CHANGED
@@ -441,7 +441,9 @@ class Strong_Testimonials_Render {
|
|
441 |
Â
|
442 |
Â
if ( isset( $custom_html_widgets[ $id ] ) ) {
|
443 |
Â
$widget = $custom_html_widgets[ $id ];
|
444 |
-
|
Â
|
|
Â
|
|
445 |
Â
}
|
446 |
Â
}
|
447 |
Â
|
441 |
Â
|
442 |
Â
if ( isset( $custom_html_widgets[ $id ] ) ) {
|
443 |
Â
$widget = $custom_html_widgets[ $id ];
|
444 |
+
if ( isset( $widget['content'] ) ) {
|
445 |
+
$this->process_content( $widget['content'] );
|
446 |
+
}
|
447 |
Â
}
|
448 |
Â
}
|
449 |
Â
|
includes/class-strong-testimonials-shortcode-average.php
CHANGED
File without changes
|
includes/class-strong-testimonials-shortcode-count.php
CHANGED
File without changes
|
includes/class-strong-testimonials-shortcode.php
CHANGED
File without changes
|
includes/class-strong-view-display.php
CHANGED
File without changes
|
includes/class-strong-view-form.php
CHANGED
File without changes
|
includes/class-strong-view-slideshow.php
CHANGED
File without changes
|
includes/class-strong-view.php
CHANGED
File without changes
|
includes/class-walker-strong-category-checklist-front.php
CHANGED
File without changes
|
includes/deprecated.php
CHANGED
File without changes
|
includes/filters.php
CHANGED
@@ -50,3 +50,121 @@ function wpmtst_content_filters() {
|
|
50 |
Â
add_filter( 'wpmtst_the_excerpt', 'convert_smilies', 20 );
|
51 |
Â
}
|
52 |
Â
add_action( 'init', 'wpmtst_content_filters' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
50 |
Â
add_filter( 'wpmtst_the_excerpt', 'convert_smilies', 20 );
|
51 |
Â
}
|
52 |
Â
add_action( 'init', 'wpmtst_content_filters' );
|
53 |
+
|
54 |
+
function wpmtst_add_allowed_tags( $tags ) {
|
55 |
+
|
56 |
+
// iframe
|
57 |
+
$tags['iframe'] = array(
|
58 |
+
'src' => true,
|
59 |
+
'height' => true,
|
60 |
+
'width' => true,
|
61 |
+
'frameborder' => true,
|
62 |
+
'allowfullscreen' => true,
|
63 |
+
'style' => true,
|
64 |
+
'data-*' => true,
|
65 |
+
'hidden' => true,
|
66 |
+
);
|
67 |
+
// form fields - input
|
68 |
+
$tags['input'] = array(
|
69 |
+
'class' => true,
|
70 |
+
'id' => true,
|
71 |
+
'name' => true,
|
72 |
+
'value' => true,
|
73 |
+
'type' => true,
|
74 |
+
'placeholder' => true,
|
75 |
+
'required' => true,
|
76 |
+
'checked' => true,
|
77 |
+
'title' => true,
|
78 |
+
'style' => true,
|
79 |
+
'data-*' => true,
|
80 |
+
'hidden' => true,
|
81 |
+
);
|
82 |
+
// textarea
|
83 |
+
$tags['textarea'] = array(
|
84 |
+
'class' => true,
|
85 |
+
'id' => true,
|
86 |
+
'name' => true,
|
87 |
+
'value' => true,
|
88 |
+
'type' => true,
|
89 |
+
'placeholder' => true,
|
90 |
+
'required' => true,
|
91 |
+
'style' => true,
|
92 |
+
'data-*' => true,
|
93 |
+
'hidden' => true,
|
94 |
+
);
|
95 |
+
// select
|
96 |
+
$tags['select'] = array(
|
97 |
+
'class' => true,
|
98 |
+
'id' => true,
|
99 |
+
'name' => true,
|
100 |
+
'value' => true,
|
101 |
+
'type' => true,
|
102 |
+
'style' => true,
|
103 |
+
'data-*' => true,
|
104 |
+
'hidden' => true,
|
105 |
+
);
|
106 |
+
// select options
|
107 |
+
$tags['option'] = array(
|
108 |
+
'selected' => true,
|
109 |
+
'class' => true,
|
110 |
+
'id' => true,
|
111 |
+
'name' => true,
|
112 |
+
'value' => true,
|
113 |
+
'style' => true,
|
114 |
+
'data-*' => true,
|
115 |
+
'hidden' => true,
|
116 |
+
);
|
117 |
+
$tags['optgroup'] = array(
|
118 |
+
'class' => true,
|
119 |
+
'id' => true,
|
120 |
+
'name' => true,
|
121 |
+
'value' => true,
|
122 |
+
'label' => true,
|
123 |
+
'style' => true,
|
124 |
+
'data-*' => true,
|
125 |
+
'hidden' => true,
|
126 |
+
);
|
127 |
+
$tags['source'] = array(
|
128 |
+
'type' => true,
|
129 |
+
'src' => true,
|
130 |
+
);
|
131 |
+
|
132 |
+
$tags['span']['hidden'] = true;
|
133 |
+
|
134 |
+
$tags['img']['srcset'] = true;
|
135 |
+
$tags['img']['sizes'] = true;
|
136 |
+
|
137 |
+
$tags['div']['data-*'] = true;
|
138 |
+
|
139 |
+
$tags['noscript'] = array();
|
140 |
+
|
141 |
+
$tags['style'] = array(
|
142 |
+
'types' => true,
|
143 |
+
);
|
144 |
+
|
145 |
+
return $tags;
|
146 |
+
}
|
147 |
+
add_filter( 'wp_kses_allowed_html', 'wpmtst_add_allowed_tags' );
|
148 |
+
|
149 |
+
|
150 |
+
function wpmtst_safe_style_css( $styles ) {
|
151 |
+
$styles[] = 'display';
|
152 |
+
return $styles;
|
153 |
+
}
|
154 |
+
add_filter( 'safe_style_css', 'wpmtst_safe_style_css' );
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Change single testimonial slug.
|
159 |
+
*/
|
160 |
+
add_filter( 'wpmtst_post_type', 'wpmtst_change_testimonial_slug' );
|
161 |
+
function wpmtst_change_testimonial_slug( $args ) {
|
162 |
+
|
163 |
+
$options = get_option( 'wpmtst_options' );
|
164 |
+
|
165 |
+
if ( isset( $options['single_testimonial_slug'] ) && $options['single_testimonial_slug'] != '' ) {
|
166 |
+
$args['rewrite']['slug'] = $options['single_testimonial_slug'];
|
167 |
+
}
|
168 |
+
|
169 |
+
return $args;
|
170 |
+
}
|
includes/functions-activation.php
CHANGED
File without changes
|
includes/functions-content.php
CHANGED
@@ -42,7 +42,7 @@ function wpmtst_get_the_excerpt( $post = null ) {
|
|
42 |
Â
}
|
43 |
Â
|
44 |
Â
if ( post_password_required( $post ) ) {
|
45 |
-
return __( 'There is no excerpt because this is a protected post.' );
|
46 |
Â
}
|
47 |
Â
|
48 |
Â
/**
|
@@ -172,7 +172,7 @@ function wpmtst_get_excerpt_more_link() {
|
|
172 |
Â
*/
|
173 |
Â
function wpmtst_trim_words( $text, $num_words = 55, $more = null, $hybrid = false ) {
|
174 |
Â
if ( null === $more ) {
|
175 |
-
$more = __( '…' );
|
176 |
Â
}
|
177 |
Â
|
178 |
Â
$text = wp_strip_all_tags( $text );
|
@@ -182,7 +182,7 @@ function wpmtst_trim_words( $text, $num_words = 55, $more = null, $hybrid = fals
|
|
182 |
Â
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
|
183 |
Â
* Do not translate into your own language.
|
184 |
Â
*/
|
185 |
-
if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
|
186 |
Â
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
187 |
Â
preg_match_all( '/./u', $text, $words_array );
|
188 |
Â
$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
|
42 |
Â
}
|
43 |
Â
|
44 |
Â
if ( post_password_required( $post ) ) {
|
45 |
+
return __( 'There is no excerpt because this is a protected post.', 'strong-testimonials' );
|
46 |
Â
}
|
47 |
Â
|
48 |
Â
/**
|
172 |
Â
*/
|
173 |
Â
function wpmtst_trim_words( $text, $num_words = 55, $more = null, $hybrid = false ) {
|
174 |
Â
if ( null === $more ) {
|
175 |
+
$more = __( '…', 'strong-testimonials' );
|
176 |
Â
}
|
177 |
Â
|
178 |
Â
$text = wp_strip_all_tags( $text );
|
182 |
Â
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
|
183 |
Â
* Do not translate into your own language.
|
184 |
Â
*/
|
185 |
+
if ( strpos( _x( 'words', 'Word count type. Do not translate!', 'strong-testimonials' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
|
186 |
Â
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
187 |
Â
preg_match_all( '/./u', $text, $words_array );
|
188 |
Â
$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
|
includes/functions-image.php
CHANGED
File without changes
|
includes/functions-rating.php
CHANGED
File without changes
|
includes/functions-template-form.php
CHANGED
@@ -84,91 +84,97 @@ function wpmtst_single_form_field( $field ) {
|
|
84 |
Â
}
|
85 |
Â
|
86 |
Â
// Check for callback first.
|
87 |
-
|
88 |
Â
|
89 |
-
|
90 |
-
|
91 |
Â
|
92 |
-
|
93 |
-
|
94 |
-
// Check field type.
|
95 |
-
switch ( $field['input_type'] ) {
|
96 |
-
|
97 |
-
case 'category-selector' :
|
98 |
-
$value = isset( $form_values[ $field['name'] ] ) ? (array) $form_values[ $field['name'] ] : array();
|
99 |
-
|
100 |
-
echo '<div class="field-wrap">';
|
101 |
-
printf( '<select id="wpmtst_%s" name="%s" class="%s" %s tabindex="0">',
|
102 |
-
$field['name'],
|
103 |
-
$field['name'],
|
104 |
-
wpmtst_field_classes( $field['input_type'], $field['name'] ),
|
105 |
-
wpmtst_field_required_tag( $field ) );
|
106 |
-
|
107 |
-
echo '<option value="">—</option>';
|
108 |
-
wpmtst_nested_cats( $value );
|
109 |
-
echo '</select>';
|
110 |
-
echo '</div>';
|
111 |
-
break;
|
112 |
-
|
113 |
-
case 'category-checklist' :
|
114 |
-
$value = isset( $form_values[ $field['name'] ] ) ? (array) $form_values[ $field['name'] ] : array();
|
115 |
-
echo '<div class="field-wrap">';
|
116 |
-
wpmtst_form_category_checklist_frontend( $value );
|
117 |
-
echo '</div>';
|
118 |
-
break;
|
119 |
-
|
120 |
-
case 'textarea' :
|
121 |
-
$value = ( isset( $form_values[ $field['name'] ] ) && $form_values[ $field['name'] ] ) ? $form_values[ $field['name'] ] : '';
|
122 |
-
|
123 |
-
// textarea tags must be on same line for placeholder to work
|
124 |
-
printf( '<textarea id="wpmtst_%s" name="%s" class="%s" %s %s tabindex="0">%s</textarea>',
|
125 |
-
$field['name'],
|
126 |
-
$field['name'],
|
127 |
-
wpmtst_field_classes( $field['input_type'], $field['name'] ),
|
128 |
-
wpmtst_field_required_tag( $field ),
|
129 |
-
wpmtst_field_placeholder( $field ),
|
130 |
-
esc_textarea( $value ) );
|
131 |
-
break;
|
132 |
-
|
133 |
-
case 'file' :
|
134 |
-
echo '<div class="field-wrap">';
|
135 |
-
echo '<input id="wpmtst_' . $field['name'] . '" type="file" name="' . $field['name'] . '"' . wpmtst_field_required_tag( $field ) . ' tabindex="0">';
|
136 |
-
echo '</div>';
|
137 |
-
break;
|
138 |
-
|
139 |
-
case 'shortcode' :
|
140 |
-
if ( isset( $field['shortcode_on_form'] ) && $field['shortcode_on_form'] ) {
|
141 |
-
echo do_shortcode( $field['shortcode_on_form'], true );
|
142 |
-
}
|
143 |
-
break;
|
144 |
-
|
145 |
-
case 'rating' :
|
146 |
-
wpmtst_star_rating_form( $field, $field['default_form_value'], 'in-form' );
|
147 |
-
break;
|
148 |
-
|
149 |
-
case 'checkbox' :
|
150 |
-
if ( ! isset( $field['show_label'] ) || $field['show_label'] ) {
|
151 |
-
printf( '<label for="wpmtst_%s" class="%s">%s</label>',
|
152 |
-
$field['name'],
|
153 |
-
wpmtst_field_label_classes($field['input_type'], $field['name']),
|
154 |
-
wpmtst_form_field_meta_l10n( $field['label'], $field, 'label' ) );
|
155 |
-
}
|
156 |
-
|
157 |
-
wpmtst_field_before( $field );
|
158 |
-
|
159 |
-
echo '<div class="field-wrap">';
|
160 |
-
|
161 |
-
printf( '<input id="wpmtst_%s" type="%s" class="%s" name="%s" %s %s tabindex="0">',
|
162 |
-
$field['name'],
|
163 |
-
$field['input_type'],
|
164 |
-
wpmtst_field_classes( $field['input_type'], $field['name'] ),
|
165 |
-
$field['name'],
|
166 |
-
wpmtst_field_required_tag( $field ),
|
167 |
-
checked( $field['default_form_value'], 1, false ) );
|
168 |
-
|
169 |
-
if ( isset( $field['text'] ) ) {
|
170 |
-
echo '<label for="wpmtst_' . $field['name'] . '" class="checkbox-label">' . wpmtst_form_field_meta_l10n( $field['text'], $field, 'text' ) . '</label>';
|
171 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
172 |
Â
if ( isset( $field['required'] ) && $field['required'] ) {
|
173 |
Â
wpmtst_field_required_symbol();
|
174 |
Â
}
|
@@ -441,6 +447,11 @@ function wpmtst_form_captcha() {
|
|
441 |
Â
return;
|
442 |
Â
}
|
443 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
444 |
Â
/**
|
445 |
Â
* Only display Captcha label if properly configured.
|
446 |
Â
*/
|
@@ -457,31 +468,30 @@ function wpmtst_form_captcha() {
|
|
457 |
Â
*/
|
458 |
Â
if ( $invisible && 'captcha-pro' == $form_options['captcha']) {
|
459 |
Â
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
} elseif ( $invisible ) {
|
465 |
-
|
466 |
-
echo $captcha_html;
|
467 |
Â
|
468 |
-
|
Â
|
|
469 |
Â
|
470 |
-
|
471 |
-
|
Â
|
|
472 |
Â
<?php if ( wpmtst_get_form_message( 'captcha' ) ) : ?>
|
473 |
Â
<label for="wpmtst_captcha"><?php wpmtst_form_message( 'captcha' ); ?></label><span class="required symbol"></span>
|
474 |
Â
<?php endif; ?>
|
475 |
-
<div>
|
476 |
-
<?php echo $captcha_html; ?>
|
477 |
-
<?php if ( isset( $errors['captcha'] ) ) : ?>
|
478 |
-
<p><label class="error"><?php echo esc_html( $errors['captcha'] ); ?></label></p>
|
479 |
-
<?php endif; ?>
|
480 |
-
</div>
|
481 |
-
</div>
|
482 |
-
<?php
|
483 |
Â
|
484 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
485 |
Â
}
|
486 |
Â
add_action( 'wpmtst_form_after_fields', 'wpmtst_form_captcha' );
|
487 |
Â
|
84 |
Â
}
|
85 |
Â
|
86 |
Â
// Check for callback first.
|
87 |
+
if ( isset( $field['action_input'] ) && $field['action_input'] ) {
|
88 |
Â
|
89 |
+
$value = ( isset( $form_values[ $field['name'] ] ) && $form_values[ $field['name'] ] ) ? $form_values[ $field['name'] ] : '';
|
90 |
+
do_action( $field['action_input'], $field, $value );
|
91 |
Â
|
92 |
+
} else {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
93 |
Â
|
94 |
+
// Check field type.
|
95 |
+
switch ( $field['input_type'] ) {
|
96 |
+
|
97 |
+
case 'category-selector':
|
98 |
+
$value = isset( $form_values[ $field['name'] ] ) ? (array) $form_values[ $field['name'] ] : array();
|
99 |
+
|
100 |
+
echo '<div class="field-wrap">';
|
101 |
+
printf(
|
102 |
+
'<select id="wpmtst_%s" name="%s" class="%s" %s tabindex="0">',
|
103 |
+
esc_attr( $field['name'] ),
|
104 |
+
esc_attr( $field['name'] ),
|
105 |
+
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'] ) ),
|
106 |
+
esc_attr( wpmtst_field_required_tag( $field ) )
|
107 |
+
);
|
108 |
+
|
109 |
+
echo '<option value="">—</option>';
|
110 |
+
wpmtst_nested_cats( $value );
|
111 |
+
echo '</select>';
|
112 |
+
echo '</div>';
|
113 |
+
break;
|
114 |
+
|
115 |
+
case 'category-checklist':
|
116 |
+
$value = isset( $form_values[ $field['name'] ] ) ? (array) $form_values[ $field['name'] ] : array();
|
117 |
+
echo '<div class="field-wrap">';
|
118 |
+
wpmtst_form_category_checklist_frontend( $value );
|
119 |
+
echo '</div>';
|
120 |
+
break;
|
121 |
+
|
122 |
+
case 'textarea':
|
123 |
+
$value = ( isset( $form_values[ $field['name'] ] ) && $form_values[ $field['name'] ] ) ? $form_values[ $field['name'] ] : '';
|
124 |
+
// textarea tags must be on same line for placeholder to work
|
125 |
+
printf(
|
126 |
+
'<textarea id="wpmtst_%s" name="%s" class="%s" %s placeholder="%s" tabindex="0">%s</textarea>',
|
127 |
+
esc_attr( $field['name'] ),
|
128 |
+
esc_attr( $field['name'] ),
|
129 |
+
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'] ) ),
|
130 |
+
esc_attr( wpmtst_field_required_tag( $field ) ),
|
131 |
+
esc_attr( wpmtst_field_placeholder( $field ) ),
|
132 |
+
esc_textarea( $value )
|
133 |
+
);
|
134 |
+
break;
|
135 |
+
|
136 |
+
case 'file':
|
137 |
+
echo '<div class="field-wrap">';
|
138 |
+
echo '<input id="wpmtst_' . esc_attr( $field['name'] ) . '" type="file" name="' . esc_attr( $field['name'] ) . '"' . esc_attr( wpmtst_field_required_tag( $field ) ) . ' tabindex="0">';
|
139 |
+
echo '</div>';
|
140 |
+
break;
|
141 |
+
|
142 |
+
case 'shortcode':
|
143 |
+
if ( isset( $field['shortcode_on_form'] ) && $field['shortcode_on_form'] ) {
|
144 |
+
echo do_shortcode( $field['shortcode_on_form'], true );
|
145 |
+
}
|
146 |
+
break;
|
147 |
+
|
148 |
+
case 'rating':
|
149 |
+
wpmtst_star_rating_form( $field, $field['default_form_value'], 'in-form' );
|
150 |
+
break;
|
151 |
+
|
152 |
+
case 'checkbox':
|
153 |
+
if ( ! isset( $field['show_label'] ) || $field['show_label'] ) {
|
154 |
+
printf(
|
155 |
+
'<label for="wpmtst_%s" class="%s">%s</label>',
|
156 |
+
esc_attr( $field['name'] ),
|
157 |
+
esc_attr( wpmtst_field_label_classes( $field['input_type'], $field['name'] ) ),
|
158 |
+
esc_html( wpmtst_form_field_meta_l10n( $field['label'], $field, 'label' ) )
|
159 |
+
);
|
160 |
+
}
|
161 |
+
|
162 |
+
wpmtst_field_before( $field );
|
163 |
+
|
164 |
+
echo '<div class="field-wrap">';
|
165 |
+
|
166 |
+
printf(
|
167 |
+
'<input id="wpmtst_%s" type="%s" class="%s" name="%s" %s %s tabindex="0">',
|
168 |
+
esc_attr( $field['name'] ),
|
169 |
+
esc_attr( $field['input_type'] ),
|
170 |
+
esc_attr( wpmtst_field_classes( $field['input_type'], $field['name'] ) ),
|
171 |
+
esc_attr( $field['name'] ),
|
172 |
+
esc_attr( wpmtst_field_required_tag( $field ) ),
|
173 |
+
checked( $field['default_form_value'], 1, false )
|
174 |
+
);
|
175 |
+
|
176 |
+
if ( isset( $field['text'] ) ) {
|
177 |
+
echo '<label for="wpmtst_' . esc_attr( $field['name'] ) . '" class="checkbox-label">' . wp_kses_post( wpmtst_form_field_meta_l10n( $field['text'], $field, 'text' ) ) . '</label>';
|
178 |
Â
if ( isset( $field['required'] ) && $field['required'] ) {
|
179 |
Â
wpmtst_field_required_symbol();
|
180 |
Â
}
|
447 |
Â
return;
|
448 |
Â
}
|
449 |
Â
|
450 |
+
// removed `really simple captcha` as of 2.37
|
451 |
+
if ( 'really-simple-captcha' === $form_options['captcha'] ) {
|
452 |
+
return;
|
453 |
+
}
|
454 |
+
|
455 |
Â
/**
|
456 |
Â
* Only display Captcha label if properly configured.
|
457 |
Â
*/
|
468 |
Â
*/
|
469 |
Â
if ( $invisible && 'captcha-pro' == $form_options['captcha']) {
|
470 |
Â
|
471 |
+
echo '<div class="form-field wpmtst-captcha">';
|
472 |
+
echo $captcha_html;
|
473 |
+
echo '</div>';
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
474 |
Â
|
475 |
+
} elseif ( $invisible ) {
|
476 |
+
echo $captcha_html;
|
477 |
Â
|
478 |
+
} else {
|
479 |
+
?>
|
480 |
+
<div class="form-field wpmtst-captcha">
|
481 |
Â
<?php if ( wpmtst_get_form_message( 'captcha' ) ) : ?>
|
482 |
Â
<label for="wpmtst_captcha"><?php wpmtst_form_message( 'captcha' ); ?></label><span class="required symbol"></span>
|
483 |
Â
<?php endif; ?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
484 |
Â
|
485 |
+
<div>
|
486 |
+
<?php echo $captcha_html; ?>
|
487 |
+
<?php if ( isset( $errors['captcha'] ) ) : ?>
|
488 |
+
<p><label class="error"><?php echo esc_html( $errors['captcha'] ); ?></label></p>
|
489 |
+
<?php endif; ?>
|
490 |
+
</div>
|
491 |
+
</div>
|
492 |
+
<?php
|
493 |
+
|
494 |
+
}
|
495 |
Â
}
|
496 |
Â
add_action( 'wpmtst_form_after_fields', 'wpmtst_form_captcha' );
|
497 |
Â
|
includes/functions-template.php
CHANGED
@@ -98,7 +98,7 @@ function wpmtst_the_excerpt() {
|
|
98 |
Â
*/
|
99 |
Â
function wpmtst_ellipsis() {
|
100 |
Â
if ( apply_filters( 'wpmtst_use_ellipsis', true ) ) {
|
101 |
-
return apply_filters( 'wpmtst_ellipsis', __( '…' ) );
|
102 |
Â
}
|
103 |
Â
|
104 |
Â
return '';
|
@@ -534,8 +534,8 @@ if ( ! function_exists( 'wpmtst_standard_pagination' ) ) :
|
|
534 |
Â
'end_size' => isset( $options['end_size'] ) ? $options['end_size'] : 1,
|
535 |
Â
'mid_size' => isset( $options['mid_size'] ) ? $options['mid_size'] : 2,
|
536 |
Â
'prev_next' => isset( $options['prev_next'] ) ? $options['prev_next'] : true,
|
537 |
-
'prev_text' => isset( $options['prev_text'] ) ? $options['prev_text'] : __( '« Previous' ),
|
538 |
-
'next_text' => isset( $options['next_text'] ) ? $options['next_text'] : __( 'Next »' ),
|
539 |
Â
'before_page_number' => isset( $options['before_page_number'] ) ? $options['before_page_number'] : '',
|
540 |
Â
'after_page_number' => isset( $options['after_page_number'] ) ? $options['after_page_number'] : '',
|
541 |
Â
);
|
98 |
Â
*/
|
99 |
Â
function wpmtst_ellipsis() {
|
100 |
Â
if ( apply_filters( 'wpmtst_use_ellipsis', true ) ) {
|
101 |
+
return apply_filters( 'wpmtst_ellipsis', __( '…', 'strong-testimonials' ) );
|
102 |
Â
}
|
103 |
Â
|
104 |
Â
return '';
|
534 |
Â
'end_size' => isset( $options['end_size'] ) ? $options['end_size'] : 1,
|
535 |
Â
'mid_size' => isset( $options['mid_size'] ) ? $options['mid_size'] : 2,
|
536 |
Â
'prev_next' => isset( $options['prev_next'] ) ? $options['prev_next'] : true,
|
537 |
+
'prev_text' => isset( $options['prev_text'] ) ? $options['prev_text'] : __( '« Previous', 'strong-testimonials' ),
|
538 |
+
'next_text' => isset( $options['next_text'] ) ? $options['next_text'] : __( 'Next »', 'strong-testimonials' ),
|
539 |
Â
'before_page_number' => isset( $options['before_page_number'] ) ? $options['before_page_number'] : '',
|
540 |
Â
'after_page_number' => isset( $options['after_page_number'] ) ? $options['after_page_number'] : '',
|
541 |
Â
);
|
includes/functions-views.php
CHANGED
File without changes
|
includes/functions.php
CHANGED
@@ -16,7 +16,7 @@ function wpmtst_support_url() {
|
|
16 |
Â
* @return string
|
17 |
Â
*/
|
18 |
Â
function wpmtst_l10n_default( $string ) {
|
19 |
-
return
|
20 |
Â
}
|
21 |
Â
add_filter( 'wpmtst_l10n', 'wpmtst_l10n_default' );
|
22 |
Â
|
@@ -259,6 +259,27 @@ function wpmtst_get_all_fields() {
|
|
259 |
Â
return $all_fields;
|
260 |
Â
}
|
261 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
262 |
Â
/**
|
263 |
Â
* Get the built-in fields.
|
264 |
Â
*
|
@@ -533,7 +554,7 @@ function wpmtst_post_submitbox_misc_actions( $post ) {
|
|
533 |
Â
echo '<span id="submit-timestamp"> ';
|
534 |
Â
$submit_date = get_post_meta( $post->ID, 'submit_date', true );
|
535 |
Â
if ( $submit_date ) {
|
536 |
-
echo 'Submitted on: <strong>' .
|
537 |
Â
} else {
|
538 |
Â
echo 'No submit date';
|
539 |
Â
}
|
16 |
Â
* @return string
|
17 |
Â
*/
|
18 |
Â
function wpmtst_l10n_default( $string ) {
|
19 |
+
return $string;
|
20 |
Â
}
|
21 |
Â
add_filter( 'wpmtst_l10n', 'wpmtst_l10n_default' );
|
22 |
Â
|
259 |
Â
return $all_fields;
|
260 |
Â
}
|
261 |
Â
|
262 |
+
/**
|
263 |
+
* Get all rating fields
|
264 |
+
*
|
265 |
+
* @return array
|
266 |
+
*/
|
267 |
+
function wpmtst_get_all_rating_fields() {
|
268 |
+
|
269 |
+
$all_fields = wpmtst_get_all_fields();
|
270 |
+
|
271 |
+
$rating_fields = array();
|
272 |
+
|
273 |
+
foreach ( $all_fields as $key => $field ) :
|
274 |
+
if ( $field['input_type'] !== 'rating' ) {
|
275 |
+
continue;
|
276 |
+
}
|
277 |
+
$rating_fields[] = $field;
|
278 |
+
endforeach;
|
279 |
+
|
280 |
+
return $rating_fields;
|
281 |
+
}
|
282 |
+
|
283 |
Â
/**
|
284 |
Â
* Get the built-in fields.
|
285 |
Â
*
|
554 |
Â
echo '<span id="submit-timestamp"> ';
|
555 |
Â
$submit_date = get_post_meta( $post->ID, 'submit_date', true );
|
556 |
Â
if ( $submit_date ) {
|
557 |
+
echo 'Submitted on: <strong>' . wp_kses_post( date_i18n( 'M j, Y @ H:i', strtotime( $submit_date ) ) ) . '</strong>';
|
558 |
Â
} else {
|
559 |
Â
echo 'No submit date';
|
560 |
Â
}
|
includes/integrations/class-integration-captcha-pro.php
CHANGED
File without changes
|
includes/integrations/class-integration-captcha.php
CHANGED
File without changes
|
includes/integrations/class-integration-google-captcha.php
CHANGED
File without changes
|
includes/integrations/class-integration-really-simple-captcha.php
CHANGED
File without changes
|
includes/l10n-polylang.php
CHANGED
File without changes
|
includes/l10n-wpml.php
CHANGED
File without changes
|
includes/post-types.php
CHANGED
@@ -53,24 +53,24 @@ function wpmtst_get_cpt_defaults() {
|
|
53 |
Â
$labels = array(
|
54 |
Â
'name' => _x( 'Testimonials', 'post type general name', 'strong-testimonials' ),
|
55 |
Â
'singular_name' => _x( 'Testimonial', 'post type singular name', 'strong-testimonials' ),
|
56 |
-
'add_new' => __( 'Add New' ),
|
57 |
Â
'add_new_item' => __( 'Add New Testimonial', 'strong-testimonials' ),
|
58 |
Â
'edit_item' => __( 'Edit Testimonial', 'strong-testimonials' ),
|
59 |
Â
'new_item' => __( 'New Testimonial', 'strong-testimonials' ),
|
60 |
Â
'view_item' => __( 'View Testimonial', 'strong-testimonials' ),
|
61 |
Â
'view_items' => __( 'View Testimonials', 'strong-testimonials' ),
|
62 |
Â
'search_items' => __( 'Search Testimonials', 'strong-testimonials' ),
|
63 |
-
'not_found' => __( 'Nothing Found' ),
|
64 |
-
'not_found_in_trash' => __( 'Nothing found in Trash' ),
|
65 |
Â
'all_items' => __( 'All Testimonials', 'strong-testimonials' ),
|
66 |
Â
'archives' => __( 'Testimonial Archives', 'strong-testimonials' ),
|
67 |
Â
'attributes' => __( 'Attributes', 'strong-testimonials' ),
|
68 |
Â
'insert_into_item' => __( 'Insert into testimonial', 'strong-testimonials' ),
|
69 |
Â
'uploaded_to_this_item' => __( 'Uploaded to this testimonial', 'strong-testimonials' ),
|
70 |
-
'featured_image' => __( 'Featured Image' ),
|
71 |
-
'set_featured_image' => __( 'Set featured image' ),
|
72 |
-
'remove_featured_image' => __( 'Remove featured image' ),
|
73 |
-
'use_featured_image' => __( 'Use as featured image' ),
|
74 |
Â
'filter_items_list' => __( 'Filter testimonials list', 'strong-testimonials' ),
|
75 |
Â
'items_list_navigation' => __( 'Testimonials list navigation', 'strong-testimonials' ),
|
76 |
Â
'items_list' => __( 'Testimonials list', 'strong-testimonials' ),
|
@@ -125,8 +125,8 @@ function wpmtst_get_tax_defaults() {
|
|
125 |
Â
$labels = array(
|
126 |
Â
'name' => __( 'Testimonial Categories', 'strong-testimonials' ),
|
127 |
Â
'singular_name' => __( 'Testimonial Category', 'strong-testimonials' ),
|
128 |
-
'menu_name' => __( 'Categories' ),
|
129 |
-
'all_items' => __( 'All categories' ),
|
130 |
Â
);
|
131 |
Â
|
132 |
Â
$args = array(
|
@@ -199,14 +199,14 @@ function wpmtst_updated_messages( $messages ) {
|
|
199 |
Â
);
|
200 |
Â
|
201 |
Â
/* translators: Publish box date format, see https://secure.php.net/date */
|
202 |
-
$scheduled_date = date_i18n(
|
203 |
Â
|
204 |
Â
$messages['wpm-testimonial'] = array(
|
205 |
-
0
|
206 |
-
1
|
207 |
-
2
|
208 |
-
3
|
209 |
-
4
|
210 |
Â
/* translators: %s: date and time of the revision */
|
211 |
Â
5 => isset($_GET['revision']) ? sprintf( __( 'Testimonial restored to revision from %s.', 'strong-testimonials' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
212 |
Â
6 => __( 'Testimonial published.', 'strong-testimonials' ) . $view_post_link_html,
|
53 |
Â
$labels = array(
|
54 |
Â
'name' => _x( 'Testimonials', 'post type general name', 'strong-testimonials' ),
|
55 |
Â
'singular_name' => _x( 'Testimonial', 'post type singular name', 'strong-testimonials' ),
|
56 |
+
'add_new' => __( 'Add New', 'strong-testimonials' ),
|
57 |
Â
'add_new_item' => __( 'Add New Testimonial', 'strong-testimonials' ),
|
58 |
Â
'edit_item' => __( 'Edit Testimonial', 'strong-testimonials' ),
|
59 |
Â
'new_item' => __( 'New Testimonial', 'strong-testimonials' ),
|
60 |
Â
'view_item' => __( 'View Testimonial', 'strong-testimonials' ),
|
61 |
Â
'view_items' => __( 'View Testimonials', 'strong-testimonials' ),
|
62 |
Â
'search_items' => __( 'Search Testimonials', 'strong-testimonials' ),
|
63 |
+
'not_found' => __( 'Nothing Found', 'strong-testimonials' ),
|
64 |
+
'not_found_in_trash' => __( 'Nothing found in Trash', 'strong-testimonials' ),
|
65 |
Â
'all_items' => __( 'All Testimonials', 'strong-testimonials' ),
|
66 |
Â
'archives' => __( 'Testimonial Archives', 'strong-testimonials' ),
|
67 |
Â
'attributes' => __( 'Attributes', 'strong-testimonials' ),
|
68 |
Â
'insert_into_item' => __( 'Insert into testimonial', 'strong-testimonials' ),
|
69 |
Â
'uploaded_to_this_item' => __( 'Uploaded to this testimonial', 'strong-testimonials' ),
|
70 |
+
'featured_image' => __( 'Featured Image', 'strong-testimonials' ),
|
71 |
+
'set_featured_image' => __( 'Set featured image', 'strong-testimonials' ),
|
72 |
+
'remove_featured_image' => __( 'Remove featured image', 'strong-testimonials' ),
|
73 |
+
'use_featured_image' => __( 'Use as featured image', 'strong-testimonials' ),
|
74 |
Â
'filter_items_list' => __( 'Filter testimonials list', 'strong-testimonials' ),
|
75 |
Â
'items_list_navigation' => __( 'Testimonials list navigation', 'strong-testimonials' ),
|
76 |
Â
'items_list' => __( 'Testimonials list', 'strong-testimonials' ),
|
125 |
Â
$labels = array(
|
126 |
Â
'name' => __( 'Testimonial Categories', 'strong-testimonials' ),
|
127 |
Â
'singular_name' => __( 'Testimonial Category', 'strong-testimonials' ),
|
128 |
+
'menu_name' => __( 'Categories', 'strong-testimonials' ),
|
129 |
+
'all_items' => __( 'All categories', 'strong-testimonials' ),
|
130 |
Â
);
|
131 |
Â
|
132 |
Â
$args = array(
|
199 |
Â
);
|
200 |
Â
|
201 |
Â
/* translators: Publish box date format, see https://secure.php.net/date */
|
202 |
+
$scheduled_date = date_i18n( 'M j, Y @ H:i', strtotime( $post->post_date ) );
|
203 |
Â
|
204 |
Â
$messages['wpm-testimonial'] = array(
|
205 |
+
0 => '', // Unused. Messages start at index 1.
|
206 |
+
1 => __( 'Testimonial updated.', 'strong-testimonials' ) . $view_post_link_html,
|
207 |
+
2 => __( 'Custom field updated.', 'strong-testimonials' ),
|
208 |
+
3 => __( 'Custom field deleted.', 'strong-testimonials' ),
|
209 |
+
4 => __( 'Testimonial updated.', 'strong-testimonials' ),
|
210 |
Â
/* translators: %s: date and time of the revision */
|
211 |
Â
5 => isset($_GET['revision']) ? sprintf( __( 'Testimonial restored to revision from %s.', 'strong-testimonials' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
212 |
Â
6 => __( 'Testimonial published.', 'strong-testimonials' ) . $view_post_link_html,
|
includes/retro.php
CHANGED
File without changes
|
includes/scripts.php
CHANGED
@@ -220,6 +220,8 @@ function wpmtst_defer_scripts( $tag, $handle ) {
|
|
220 |
Â
'verge',
|
221 |
Â
'wpmtst-slider',
|
222 |
Â
'wpmtst-readmore',
|
Â
|
|
Â
|
|
223 |
Â
);
|
224 |
Â
|
225 |
Â
if ( in_array( $handle, $scripts_to_defer ) ) {
|
220 |
Â
'verge',
|
221 |
Â
'wpmtst-slider',
|
222 |
Â
'wpmtst-readmore',
|
223 |
+
'jquery-masonry',
|
224 |
+
'wpmtst-admin-views-script',
|
225 |
Â
);
|
226 |
Â
|
227 |
Â
if ( in_array( $handle, $scripts_to_defer ) ) {
|
includes/widget2.php
CHANGED
@@ -74,15 +74,15 @@ class Strong_Testimonials_View_Widget extends WP_Widget {
|
|
74 |
Â
?>
|
75 |
Â
<div class="wpmtst-widget-form">
|
76 |
Â
<p>
|
77 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
78 |
-
<?php
|
79 |
Â
</label>
|
80 |
Â
<input class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
81 |
Â
name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>">
|
82 |
Â
</p>
|
83 |
Â
<p>
|
84 |
-
<label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php
|
85 |
-
<textarea class="widefat" rows="8" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
86 |
Â
</p>
|
87 |
Â
<p>
|
88 |
Â
<input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox"<?php checked( $filter ); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e( 'Automatically add paragraphs to above Content only', 'strong-testimonials' ); ?></label>
|
@@ -91,9 +91,8 @@ class Strong_Testimonials_View_Widget extends WP_Widget {
|
|
91 |
Â
<label for="<?php echo $this->get_field_id( 'view' ); ?>">
|
92 |
Â
<?php _ex( 'View:', 'widget setting', 'strong-testimonials' ); ?>
|
93 |
Â
</label>
|
94 |
-
<select class="widefat" id="<?php echo $this->get_field_id( 'view' ); ?>"
|
95 |
-
|
96 |
-
<option value=""><?php _e( '— Select —' ); ?></option>
|
97 |
Â
<?php
|
98 |
Â
foreach ( $views as $view ) {
|
99 |
Â
printf( '<option value="%s" %s>%s</option>', $view['id'], selected( $view['id'], $instance['view'] ), $view['name'] );
|
74 |
Â
?>
|
75 |
Â
<div class="wpmtst-widget-form">
|
76 |
Â
<p>
|
77 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
78 |
+
<?php esc_html_e( 'Title:', 'strong-testimonials' ); ?>
|
79 |
Â
</label>
|
80 |
Â
<input class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>"
|
81 |
Â
name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>">
|
82 |
Â
</p>
|
83 |
Â
<p>
|
84 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>"><?php esc_html_e( 'Content:', 'strong-testimonials' ); ?></label>
|
85 |
+
<textarea class="widefat" rows="8" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
86 |
Â
</p>
|
87 |
Â
<p>
|
88 |
Â
<input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox"<?php checked( $filter ); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e( 'Automatically add paragraphs to above Content only', 'strong-testimonials' ); ?></label>
|
91 |
Â
<label for="<?php echo $this->get_field_id( 'view' ); ?>">
|
92 |
Â
<?php _ex( 'View:', 'widget setting', 'strong-testimonials' ); ?>
|
93 |
Â
</label>
|
94 |
+
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'view' ) ); ?>" autocomplete="off">
|
95 |
+
<option value=""><?php esc_html_e( '— Select —', 'strong-testimonials' ); ?></option>
|
Â
|
|
96 |
Â
<?php
|
97 |
Â
foreach ( $views as $view ) {
|
98 |
Â
printf( '<option value="%s" %s>%s</option>', $view['id'], selected( $view['id'], $instance['view'] ), $view['name'] );
|
languages/strong-testimonials-ar_AR.mo
CHANGED
File without changes
|
languages/strong-testimonials-ar_AR.po
CHANGED
File without changes
|
languages/strong-testimonials-es_ES.mo
CHANGED
File without changes
|
languages/strong-testimonials-es_ES.po
CHANGED
File without changes
|
languages/strong-testimonials-fa_IR.mo
CHANGED
File without changes
|
languages/strong-testimonials-fa_IR.po
CHANGED
File without changes
|
languages/strong-testimonials-fr_FR.mo
CHANGED
File without changes
|
languages/strong-testimonials-fr_FR.po
CHANGED
File without changes
|
languages/strong-testimonials-he_IL.mo
CHANGED
File without changes
|
languages/strong-testimonials-he_IL.po
CHANGED
File without changes
|
languages/strong-testimonials-pt_BR.mo
CHANGED
File without changes
|
languages/strong-testimonials-pt_BR.po
CHANGED
File without changes
|
languages/strong-testimonials-ru_RU.mo
CHANGED
File without changes
|
languages/strong-testimonials-ru_RU.po
CHANGED
File without changes
|
languages/strong-testimonials-sv_SE.mo
CHANGED
File without changes
|
languages/strong-testimonials-sv_SE.po
CHANGED
File without changes
|
languages/strong-testimonials.pot
CHANGED
File without changes
|
license.txt
CHANGED
File without changes
|
public/css/animate.min.css
CHANGED
File without changes
|
public/css/columns.css
CHANGED
File without changes
|
public/css/grid.css
CHANGED
File without changes
|
public/css/masonry.css
CHANGED
File without changes
|
public/css/rating-display.css
CHANGED
File without changes
|
public/css/rating-form.css
CHANGED
File without changes
|
public/css/slider-controls-full-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-full-buttons2.css
CHANGED
File without changes
|
public/css/slider-controls-full-buttons3.css
CHANGED
File without changes
|
public/css/slider-controls-full-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons2-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons2-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons2.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons3-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons3-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-buttons3.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons2-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons2-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons2.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons3-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons3-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-inside-buttons3.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons2-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons2-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons2.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons3-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons3-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-sides-outside-buttons3.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons2-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons2-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons2.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons3-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons3-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-simple-buttons3.css
CHANGED
File without changes
|
public/css/slider-controls-simple-text-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-controls-simple-text-pager-text.css
CHANGED
File without changes
|
public/css/slider-controls-simple-text.css
CHANGED
File without changes
|
public/css/slider-pager-buttons.css
CHANGED
File without changes
|
public/css/slider-pager-text.css
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/css/font-awesome.css
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/css/font-awesome.min.css
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/css/index.php
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/FontAwesome.otf
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.eot
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.svg
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff
CHANGED
File without changes
|
public/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff2
CHANGED
File without changes
|
public/index.php
CHANGED
File without changes
|
public/js/controller.js
CHANGED
@@ -58,7 +58,16 @@ var strongController = {
|
|
58 |
Â
if (sliders.length) {
|
59 |
Â
// Initialize independently
|
60 |
Â
sliders.each(function () {
|
61 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
62 |
Â
});
|
63 |
Â
}
|
64 |
Â
},
|
58 |
Â
if (sliders.length) {
|
59 |
Â
// Initialize independently
|
60 |
Â
sliders.each(function () {
|
61 |
+
|
62 |
+
var $slider = jQuery(this);
|
63 |
+
|
64 |
+
// don't init if it's only a single testimonial
|
65 |
+
var count = $slider.data('count');
|
66 |
+
if( count !== undefined && count === 1 ) {
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
$slider.strongSlider();
|
71 |
Â
});
|
72 |
Â
}
|
73 |
Â
},
|
public/js/controller.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";var debugit
|
1 |
+
"use strict";var debugit=!1,strongController={grids:{},iframes:{},defaults:{initializeOn:"windowLoad",method:"",universalTimer:500,observerTimer:500,containerId:"page",addedNodeId:"content",event:"",script:"",debug:!1},config:{},setup:function(t){t.universalTimer=parseInt(t.universalTimer),t.observerTimer=parseInt(t.observerTimer),t.debug=!!t.debug,debugit=t.debug,this.config=jQuery.extend({},this.defaults,t)},mutationObserver:window.MutationObserver||window.WebKitMutationObserver,eventListenerSupported:window.addEventListener,checkInit:function(){return jQuery('.strong-view[data-state="idle"]').length},initSliders:function(){var t=jQuery('.strong-view.slider-container[data-state="idle"]');debugit&&console.log("sliders found:",t.length),t.length&&t.each(function(){var t=jQuery(this),e=t.data("count");void 0!==e&&1===e||t.strongSlider()})},initPagers:function(){var t=jQuery('.strong-pager[data-state="idle"]');debugit&&console.log("pagers found:",t.length),t.length&&t.each(function(){jQuery(this).strongPager()})},initLayouts:function(){this.grids=jQuery('.strong-view[data-state="idle"] .strong-masonry'),debugit&&console.log("Masonry found:",this.grids.length),this.grids.length&&(this.grids.prepend('<div class="grid-sizer"></div><div class="gutter-sizer"></div>'),this.grids.imagesLoaded(function(){strongController.grids.masonry({columnWidth:".grid-sizer",gutter:".gutter-sizer",itemSelector:".testimonial",percentPosition:!0}),strongController.grids.closest(".strong-view").attr("data-state","init")}))},initForm:function(){var t=jQuery('.strong-form[data-state="idle"]'),e=jQuery(".testimonial-success");debugit&&console.log("forms found:",t.length),debugit&&console.log("messages found:",e.length),(t.length||e.length)&&strongValidation.init()},initIframes:function(){this.iframes=jQuery("iframe")},customEvents:function(){addEventListener("toggleFullContent",function(t){strongController.grids.length&&strongController.grids.masonry()})},observer:function(t,e){this.mutationObserver?new this.mutationObserver(function(t){for(var o=0;o<t.length;o++)if(t[o].addedNodes.length){debugit&&console.log("mutation observed",t);for(var n=0;n<t[o].addedNodes.length;n++)if(t[o].addedNodes[n].id===strongController.config.containerId)return debugit&&console.log("+",strongController.config.containerId),void e()}}).observe(t,{childList:!0,subtree:!0}):this.eventListenerSupported&&t.addEventListener("DOMNodeInserted",function(o){o.currentTarget.id===t.id&&(debugit&&console.log("DOMNodeInserted:",o.currentTarget.id),e())},!1)},intervalId:null,timeoutId:null,newInterval:function(){strongController.intervalId=setInterval(function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()},strongController.config.universalTimer)},newTimeout:function(){strongController.timeoutId=setTimeout(function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()},strongController.config.observerTimer)},init:function(){debugit&&console.log("strongController init");var t={};void 0!==window.strongControllerParms?t=window.strongControllerParms:debugit&&console.log("settings not found"),this.setup(t),debugit&&console.log("config",this.config),"documentReady"===this.config.initializeOn?jQuery(document).ready(function(){debugit&&console.log("document ready"),strongController.start(),strongController.listen()}):jQuery(window).on("load",function(){debugit&&console.log("window load"),strongController.start(),strongController.listen()}),jQuery(window).on("load",function(){strongController.listenForIframeReady()})},start:function(){debugit&&console.log("start"),strongController.initSliders(),strongController.initPagers(),strongController.initLayouts(),strongController.initForm(),strongController.initIframes(),strongController.customEvents()},listen:function(){switch(debugit&&console.log("listen"),this.config.method){case"universal":this.newInterval();break;case"observer":this.observer(document.getElementById(this.config.containerId),this.newTimeout);break;case"event":document.addEventListener(this.config.event,this.start);break;case"script":switch(this.config.script){case"barba":"object"==typeof Barba&&Barba.hasOwnProperty("Dispatcher")&&Barba.Dispatcher.on("transitionCompleted",this.start)}}},listenForIframeReady:function(){debugit&&console.log("listenForIframeReady"),strongController.iframes.length&&strongController.grids.length?strongController.iframes.ready(function(){setTimeout(function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 1")},1e3),setTimeout(function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 2")},2e3)}):debugit&&console.log("listenForIframeReady","no iframes or Masonry found")}};strongController.init();
|
public/js/lib/actual/jquery.actual.js
CHANGED
File without changes
|
public/js/lib/actual/jquery.actual.min.js
CHANGED
File without changes
|
public/js/lib/form-validation/form-validation.js
CHANGED
File without changes
|
public/js/lib/form-validation/form-validation.min.js
CHANGED
File without changes
|
public/js/lib/imagesloaded/imagesloaded.pkgd.min.js
CHANGED
File without changes
|
public/js/lib/readmore/readmore.js
CHANGED
File without changes
|
public/js/lib/readmore/readmore.min.js
CHANGED
File without changes
|
public/js/lib/strongpager/jquery.strongpager.js
CHANGED
File without changes
|
public/js/lib/strongpager/jquery.strongpager.min.js
CHANGED
File without changes
|
public/js/lib/strongslider/LICENSE.md
CHANGED
File without changes
|
public/js/lib/strongslider/jquery.strongslider.js
CHANGED
@@ -16,1972 +16,1975 @@
|
|
16 |
Â
|
17 |
Â
;(function ($) {
|
18 |
Â
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
Â
|
|
Â
|
|
Â
|
16 |
Â
|
17 |
Â
;(function ($) {
|
18 |
Â
|
19 |
+
var defaults = {
|
20 |
+
debug: false,
|
21 |
+
logAs: 'strongSlider',
|
22 |
+
compat: {
|
23 |
+
lazyload: {
|
24 |
+
active: false,
|
25 |
+
classes: {}
|
26 |
+
}
|
27 |
+
},
|
28 |
+
|
29 |
+
// GENERAL
|
30 |
+
mode: 'horizontal',
|
31 |
+
slideSelector: 'div.t-slide',
|
32 |
+
infiniteLoop: true,
|
33 |
+
hideControlOnEnd: false,
|
34 |
+
speed: 500,
|
35 |
+
easing: null,
|
36 |
+
slideMargin: 10,
|
37 |
+
startSlide: 0,
|
38 |
+
randomStart: false,
|
39 |
+
captions: false,
|
40 |
+
adaptiveHeight: false,
|
41 |
+
adaptiveHeightSpeed: 500,
|
42 |
+
video: false,
|
43 |
+
useCSS: true,
|
44 |
+
preloadImages: 'visible',
|
45 |
+
responsive: true,
|
46 |
+
slideZIndex: 50,
|
47 |
+
wrapperClass: 'wpmslider-wrapper',
|
48 |
+
stretch: false,
|
49 |
+
imagesLoaded: true,
|
50 |
+
|
51 |
+
// TOUCH
|
52 |
+
touchEnabled: true,
|
53 |
+
swipeThreshold: 50,
|
54 |
+
oneToOneTouch: true,
|
55 |
+
preventDefaultSwipeX: true,
|
56 |
+
preventDefaultSwipeY: false,
|
57 |
+
|
58 |
+
// ACCESSIBILITY
|
59 |
+
ariaLive: true,
|
60 |
+
ariaHidden: true,
|
61 |
+
|
62 |
+
// KEYBOARD
|
63 |
+
keyboardEnabled: false,
|
64 |
+
|
65 |
+
// PAGER
|
66 |
+
pager: true,
|
67 |
+
pagerType: 'full',
|
68 |
+
pagerShortSeparator: ' / ',
|
69 |
+
pagerSelector: null,
|
70 |
+
buildPager: null,
|
71 |
+
pagerCustom: null,
|
72 |
+
|
73 |
+
// CONTROLS
|
74 |
+
controls: true,
|
75 |
+
nextText: 'Next',
|
76 |
+
prevText: 'Prev',
|
77 |
+
nextSelector: null,
|
78 |
+
prevSelector: null,
|
79 |
+
autoControls: false,
|
80 |
+
startText: 'Start',
|
81 |
+
stopText: 'Stop',
|
82 |
+
autoControlsCombine: false,
|
83 |
+
autoControlsSelector: null,
|
84 |
+
|
85 |
+
// AUTO
|
86 |
+
auto: true,
|
87 |
+
pause: 4000,
|
88 |
+
autoStart: true,
|
89 |
+
autoDirection: 'next',
|
90 |
+
stopAutoOnClick: false,
|
91 |
+
autoHover: false,
|
92 |
+
autoDelay: 0,
|
93 |
+
autoSlideForOnePage: false,
|
94 |
+
|
95 |
+
// CAROUSEL
|
96 |
+
minSlides: 1,
|
97 |
+
maxSlides: 1,
|
98 |
+
moveSlides: 0,
|
99 |
+
|
100 |
+
// CALLBACKS
|
101 |
+
onSliderLoad: function () { return true; },
|
102 |
+
onSlideBefore: function () { return true; },
|
103 |
+
onSlideAfter: function () { return true; },
|
104 |
+
onSlideNext: function () { return true; },
|
105 |
+
onSlidePrev: function () { return true; },
|
106 |
+
onSliderResize: function() { return true; },
|
107 |
+
onAutoChange: function() { return true; } //calls when auto slides starts and stops
|
108 |
+
};
|
109 |
+
|
110 |
+
$.fn.strongSlider = function (options) {
|
111 |
+
|
112 |
+
if (this.length === 0) {
|
113 |
+
return this;
|
114 |
+
}
|
115 |
+
|
116 |
+
// create a namespace to be used throughout the plugin
|
117 |
+
var slider = {},
|
118 |
+
// set a reference to our slider element
|
119 |
+
viewEl = this,
|
120 |
+
el = this.find('.wpmslider-content');
|
121 |
+
|
122 |
+
// Return if slider is already initialized
|
123 |
+
if ($(el).data('strongSlider')) { return; }
|
124 |
+
|
125 |
+
/**
|
126 |
+
* ===================================================================================
|
127 |
+
* = PRIVATE FUNCTIONS
|
128 |
+
* ===================================================================================
|
129 |
+
*/
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Initializes namespace settings to be used throughout plugin
|
133 |
+
*/
|
134 |
+
var init = function () {
|
135 |
+
// Return if slider is already initialized
|
136 |
+
if ($(el).data('strongSlider')) { return; }
|
137 |
+
|
138 |
+
// timer to check visibility; used to control sliders in hidden tabs
|
139 |
+
slider.visibilityInterval = 0;
|
140 |
+
// slider state
|
141 |
+
slider.hidden = false;
|
142 |
+
|
143 |
+
// merge user-supplied options with the defaults
|
144 |
+
var sliderVar = viewEl.data('slider-var');
|
145 |
+
var config = {};
|
146 |
+
if (typeof(window[sliderVar]) !== 'undefined') {
|
147 |
+
config = window[sliderVar].config;
|
148 |
+
}
|
149 |
+
|
150 |
+
slider.settings = $.extend({}, defaults, config, options);
|
151 |
+
slider.debug = slider.settings.debug;
|
152 |
+
slider.logAs = slider.settings.logAs;
|
153 |
+
|
154 |
+
if (slider.debug) console.log(slider.logAs, 'slider.settings', slider.settings);
|
155 |
+
|
156 |
+
// store the original children
|
157 |
+
slider.children = el.children(slider.settings.slideSelector);
|
158 |
+
|
159 |
+
// check if actual number of slides is less than minSlides / maxSlides
|
160 |
+
if (slider.children.length < slider.settings.minSlides) {
|
161 |
+
slider.settings.minSlides = slider.children.length;
|
162 |
+
}
|
163 |
+
if (slider.children.length < slider.settings.maxSlides) {
|
164 |
+
slider.settings.maxSlides = slider.children.length;
|
165 |
+
}
|
166 |
+
|
167 |
+
// if random start, set the startSlide setting to random number
|
168 |
+
if (slider.settings.randomStart) {
|
169 |
+
slider.settings.startSlide = Math.floor(Math.random() * slider.children.length);
|
170 |
+
}
|
171 |
+
|
172 |
+
// store active slide information
|
173 |
+
slider.active = {index: slider.settings.startSlide};
|
174 |
+
|
175 |
+
// store if the slider is in carousel mode (displaying / moving multiple slides)
|
176 |
+
setBreakpoint();
|
177 |
+
// slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
|
178 |
+
|
179 |
+
// if carousel, force preloadImages = 'all'
|
180 |
+
if (slider.carousel) {
|
181 |
+
slider.settings.preloadImages = 'all';
|
182 |
+
}
|
183 |
+
|
184 |
+
// store the current state of the slider (if currently animating, working is true)
|
185 |
+
slider.working = false;
|
186 |
+
|
187 |
+
// initialize the controls object
|
188 |
+
slider.controls = {};
|
189 |
+
|
190 |
+
// initialize an auto interval (no interval = is paused or waiting for user to start)
|
191 |
+
slider.interval = null;
|
192 |
+
|
193 |
+
// determine which property to use for transitions
|
194 |
+
slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';
|
195 |
+
|
196 |
+
// determine if hardware acceleration can be used
|
197 |
+
slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function () {
|
198 |
+
// create our test div element
|
199 |
+
var div = document.createElement('div'),
|
200 |
+
// css transition properties
|
201 |
+
props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
202 |
+
// test for each property
|
203 |
+
for (var i = 0; i < props.length; i++) {
|
204 |
+
if (div.style[props[i]] !== undefined) {
|
205 |
+
slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
|
206 |
+
slider.animProp = '-' + slider.cssPrefix + '-transform';
|
207 |
+
return true;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
return false;
|
211 |
+
}());
|
212 |
+
|
213 |
+
// if vertical mode always make maxSlides and minSlides equal
|
214 |
+
if (slider.settings.mode === 'vertical') {
|
215 |
+
slider.settings.maxSlides = slider.settings.minSlides;
|
216 |
+
}
|
217 |
+
// save original style data
|
218 |
+
el.data('origStyle', el.attr('style'));
|
219 |
+
el.children(slider.settings.slideSelector).each(function () {
|
220 |
+
$(this).data('origStyle', $(this).attr('style'));
|
221 |
+
});
|
222 |
+
|
223 |
+
// Bail if no slides
|
224 |
+
if (!el.getSlideCount()) { return; }
|
225 |
+
|
226 |
+
// Wait for images loaded
|
227 |
+
if (slider.settings.imagesLoaded) {
|
228 |
+
viewEl.imagesLoaded(function () { initVisibilityCheck(); });
|
229 |
+
} else {
|
230 |
+
initVisibilityCheck();
|
231 |
+
}
|
232 |
+
|
233 |
+
};
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Primary
|
237 |
+
*
|
238 |
+
* @returns {boolean}
|
239 |
+
*/
|
240 |
+
var reallyVisible = function () {
|
241 |
+
return (viewEl.is(':visible') && viewEl.css('visibility') !== 'hidden');
|
242 |
+
};
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Secondary
|
246 |
+
*
|
247 |
+
* @returns {boolean}
|
248 |
+
*/
|
249 |
+
var compatCheck = function () {
|
250 |
+
if (slider.settings.compat.lazyload) {
|
251 |
+
|
252 |
+
var inProgress = false;
|
253 |
+
for (var i = 0, len = slider.settings.compat.lazyload.classes.length; i < len; i++) {
|
254 |
+
|
255 |
+
var startClass = slider.settings.compat.lazyload.classes[i].start;
|
256 |
+
var finishClass = slider.settings.compat.lazyload.classes[i].finish;
|
257 |
+
|
258 |
+
if (startClass && finishClass) {
|
259 |
+
if (viewEl.find('img.' + startClass).length && !viewEl.find('img.' + finishClass).length) {
|
260 |
+
inProgress = true;
|
261 |
+
}
|
262 |
+
} else if (startClass) {
|
263 |
+
if (viewEl.find('img.' + startClass).length) {
|
264 |
+
inProgress = true;
|
265 |
+
}
|
266 |
+
} else if (finishClass) {
|
267 |
+
if (!viewEl.find('img.' + finishClass).length) {
|
268 |
+
inProgress = true;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
if (inProgress) {
|
275 |
+
if (slider.debug) console.log(slider.logAs, 'lazy loading...');
|
276 |
+
return false;
|
277 |
+
}
|
278 |
+
|
279 |
+
}
|
280 |
+
|
281 |
+
if (slider.debug) console.log(slider.logAs, 'compat check complete');
|
282 |
+
return true;
|
283 |
+
};
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Check visibility and lazy load status.
|
287 |
+
*/
|
288 |
+
var initVisibilityCheck = function () {
|
289 |
+
if (reallyVisible() && compatCheck()) {
|
290 |
+
|
291 |
+
clearInterval(slider.visibilityInterval);
|
292 |
+
|
293 |
+
// perform all DOM / CSS modifications
|
294 |
+
setup();
|
295 |
+
|
296 |
+
} else {
|
297 |
+
|
298 |
+
if (slider.visibilityInterval === 0) {
|
299 |
+
slider.visibilityInterval = setInterval(initVisibilityCheck, 1000 * 4);
|
300 |
+
}
|
301 |
+
|
302 |
+
}
|
303 |
+
};
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Performs all DOM and CSS modifications
|
307 |
+
*/
|
308 |
+
var setup = function () {
|
309 |
+
var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)
|
310 |
+
|
311 |
+
// wrap el in a wrapper
|
312 |
+
el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="wpmslider-viewport"></div></div>');
|
313 |
+
|
314 |
+
// store a namespace reference to .wpmslider-viewport
|
315 |
+
slider.viewport = el.parent();
|
316 |
+
|
317 |
+
// add aria-live if the setting is enabled
|
318 |
+
if (slider.settings.ariaLive) {
|
319 |
+
slider.viewport.attr('aria-live', 'polite');
|
320 |
+
}
|
321 |
+
|
322 |
+
// add a loading div to display while images are loading
|
323 |
+
slider.loader = $('<div class="wpmslider-loading" />');
|
324 |
+
slider.viewport.prepend(slider.loader);
|
325 |
+
|
326 |
+
// set el to a massive width, to hold any needed slides
|
327 |
+
// also strip any margin and padding from el
|
328 |
+
el.css({
|
329 |
+
width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',
|
330 |
+
position: 'relative'
|
331 |
+
});
|
332 |
+
|
333 |
+
// if using CSS, add the easing property
|
334 |
+
if (slider.usingCSS && slider.settings.easing) {
|
335 |
+
el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
|
336 |
+
// if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
|
337 |
+
} else if (!slider.settings.easing) {
|
338 |
+
slider.settings.easing = 'swing';
|
339 |
+
}
|
340 |
+
// make modifications to the viewport (.wpmslider-viewport)
|
341 |
+
slider.viewport.css({
|
342 |
+
width: '100%',
|
343 |
+
overflow: 'hidden',
|
344 |
+
position: 'relative'
|
345 |
+
});
|
346 |
+
|
347 |
+
slider.viewport.parent().css({
|
348 |
+
maxWidth: getViewportMaxWidth2()
|
349 |
+
});
|
350 |
+
|
351 |
+
// make modification to the wrapper (.wpmslider-wrapper)
|
352 |
+
if (!slider.settings.pager && !slider.settings.controls) {
|
353 |
+
slider.viewport.parent().css({ margin: '0 auto' });
|
354 |
+
}
|
355 |
+
|
356 |
+
// apply css to all slider children
|
357 |
+
slider.children.css({
|
358 |
+
// the float attribute is a reserved word in compressors like YUI compressor and need to be quoted #48
|
359 |
+
'float': slider.settings.mode === 'horizontal' ? 'left' : 'none',
|
360 |
+
listStyle: 'none',
|
361 |
+
position: 'relative'
|
362 |
+
});
|
363 |
+
|
364 |
+
// apply the calculated width after the float is applied to prevent scrollbar interference
|
365 |
+
updateWidth();
|
366 |
+
|
367 |
+
// if slideMargin is supplied, add the css
|
368 |
+
if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) {
|
369 |
+
slider.children.css('marginRight', slider.settings.slideMargin);
|
370 |
+
}
|
371 |
+
if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) {
|
372 |
+
slider.children.css('marginBottom', slider.settings.slideMargin);
|
373 |
+
}
|
374 |
+
|
375 |
+
// if "fade" mode, add positioning and z-index CSS
|
376 |
+
if (slider.settings.mode === 'fade') {
|
377 |
+
slider.children.css({
|
378 |
+
position: 'absolute',
|
379 |
+
zIndex: 0,
|
380 |
+
display: 'none'
|
381 |
+
});
|
382 |
+
// prepare the z-index on the showing element
|
383 |
+
slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
|
384 |
+
} else {
|
385 |
+
slider.children.css({
|
386 |
+
display: 'block'
|
387 |
+
});
|
388 |
+
}
|
389 |
+
|
390 |
+
// create an element to contain all slider controls (pager, start / stop, etc)
|
391 |
+
slider.controls.el = $('<div class="wpmslider-controls" />');
|
392 |
+
// if captions are requested, add them
|
393 |
+
if (slider.settings.captions) {
|
394 |
+
appendCaptions();
|
395 |
+
}
|
396 |
+
// check if startSlide is last slide
|
397 |
+
slider.active.last = slider.settings.startSlide === getPagerQty() - 1;
|
398 |
+
// if video is true, set up the fitVids plugin
|
399 |
+
if (slider.settings.video) { el.fitVids(); }
|
400 |
+
|
401 |
+
//preloadImages
|
402 |
+
if (slider.settings.preloadImages === 'none') {
|
403 |
+
preloadSelector = null;
|
404 |
+
} else if (slider.settings.preloadImages === 'all') {
|
405 |
+
preloadSelector = slider.children;
|
406 |
+
}
|
407 |
+
|
408 |
+
// add separate control divs
|
409 |
+
// [ LEFT ]
|
410 |
+
// if controls are requested, add them
|
411 |
+
if (slider.settings.controls) { appendControlPrev(); }
|
412 |
+
// [ MIDDLE ]
|
413 |
+
// if auto is true, and auto controls are requested, add them
|
414 |
+
if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }
|
415 |
+
// if pager is requested, add it
|
416 |
+
if (slider.settings.pager) { appendPager(); }
|
417 |
+
// [ RIGHT ]
|
418 |
+
if (slider.settings.controls) { appendControlNext(); }
|
419 |
+
|
420 |
+
// if any control option is requested, add the controls wrapper
|
421 |
+
if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }
|
422 |
+
|
423 |
+
if (preloadSelector === null) {
|
424 |
+
start();
|
425 |
+
} else {
|
426 |
+
loadElements(preloadSelector, start);
|
427 |
+
}
|
428 |
+
};
|
429 |
+
|
430 |
+
/**
|
431 |
+
*
|
432 |
+
*/
|
433 |
+
var setBreakpoint = function () {
|
434 |
+
if (slider.debug) console.log(slider.logAs, 'setBreakpoint');
|
435 |
+
|
436 |
+
// fallback
|
437 |
+
var currentBreakpoint = slider.settings.breakpoints.single;
|
438 |
+
var breakpoints = slider.settings.breakpoints.multiple;
|
439 |
+
|
440 |
+
if (slider.settings.type === 'show_multiple') {
|
441 |
+
|
442 |
+
for (var key in breakpoints) {
|
443 |
+
if (breakpoints.hasOwnProperty(key)) {
|
444 |
+
if (verge.viewportW() >= breakpoints[key].width) {
|
445 |
+
currentBreakpoint = breakpoints[key];
|
446 |
+
break;
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
}
|
452 |
+
|
453 |
+
if (slider.debug) console.log('current breakpoint', currentBreakpoint);
|
454 |
+
|
455 |
+
slider.settings.maxSlides = currentBreakpoint.maxSlides;
|
456 |
+
slider.settings.moveSlides = currentBreakpoint.moveSlides;
|
457 |
+
slider.settings.slideMargin = currentBreakpoint.slideMargin;
|
458 |
+
|
459 |
+
slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
|
460 |
+
};
|
461 |
+
|
462 |
+
/**
|
463 |
+
*
|
464 |
+
*/
|
465 |
+
var updateWidth = function () {
|
466 |
+
setBreakpoint();
|
467 |
+
slider.children.css('width', getSlideWidth2());
|
468 |
+
};
|
469 |
+
|
470 |
+
/**
|
471 |
+
*
|
472 |
+
* @param selector
|
473 |
+
* @param callback
|
474 |
+
*/
|
475 |
+
var loadElements = function(selector, callback) {
|
476 |
+
var total = selector.find('img:not([src=""]), iframe').length,
|
477 |
+
count = 0;
|
478 |
+
if (total === 0) {
|
479 |
+
callback();
|
480 |
+
return;
|
481 |
+
}
|
482 |
+
selector.find('img:not([src=""]), iframe').each(function() {
|
483 |
+
$(this).one('load error', function() {
|
484 |
+
if (++count === total) { callback(); }
|
485 |
+
}).each(function() {
|
486 |
+
if (this.complete || this.src === '') { $(this).trigger('load'); }
|
487 |
+
});
|
488 |
+
});
|
489 |
+
};
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Start the slider
|
493 |
+
*/
|
494 |
+
var start = function () {
|
495 |
+
|
496 |
+
// if infinite loop, prepare additional slides
|
497 |
+
if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade') {
|
498 |
+
var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,
|
499 |
+
sliceAppend = slider.children.slice(0, slice).clone(true).addClass('wpmslider-clone'),
|
500 |
+
slicePrepend = slider.children.slice(-slice).clone(true).addClass('wpmslider-clone');
|
501 |
+
if (slider.settings.ariaHidden) {
|
502 |
+
sliceAppend.attr('aria-hidden', true);
|
503 |
+
slicePrepend.attr('aria-hidden', true);
|
504 |
+
}
|
505 |
+
|
506 |
+
el.append(sliceAppend).prepend(slicePrepend);
|
507 |
+
}
|
508 |
+
|
509 |
+
// remove the loading DOM element
|
510 |
+
slider.loader.remove();
|
511 |
+
|
512 |
+
// set the left / top position of "el"
|
513 |
+
// setSlidePosition();
|
514 |
+
|
515 |
+
// if "vertical" mode, always use adaptiveHeight to prevent odd behavior
|
516 |
+
if (slider.settings.mode === 'vertical') {
|
517 |
+
slider.settings.adaptiveHeight = true;
|
518 |
+
}
|
519 |
+
|
520 |
+
// set the viewport height
|
521 |
+
// setViewportHeight();
|
522 |
+
|
523 |
+
// if stretch, set t-slide height to 100%
|
524 |
+
// if (slider.settings.stretch) {
|
525 |
+
// setSlideHeight();
|
526 |
+
// }
|
527 |
+
|
528 |
+
// make sure everything is positioned just right (same as a window resize)
|
529 |
+
el.redrawSlider();
|
530 |
+
|
531 |
+
// onSliderLoad callback
|
532 |
+
slider.settings.onSliderLoad.call(el, slider.active.index);
|
533 |
+
|
534 |
+
// slider has been fully initialized
|
535 |
+
slider.initialized = true;
|
536 |
+
slider.visibilityInterval = setInterval(visibilityCheck, 500);
|
537 |
+
|
538 |
+
if (slider.settings.responsive) { attachListeners(); }
|
539 |
+
|
540 |
+
// if auto is true and has more than 1 page, start the show
|
541 |
+
if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }
|
542 |
+
|
543 |
+
// if pager is requested, make the appropriate pager link active
|
544 |
+
if (slider.settings.pager) {
|
545 |
+
updatePagerActive(slider.settings.startSlide);
|
546 |
+
}
|
547 |
+
|
548 |
+
// check for any updates to the controls (like hideControlOnEnd updates)
|
549 |
+
if (slider.settings.controls) {
|
550 |
+
updateDirectionControls();
|
551 |
+
}
|
552 |
+
|
553 |
+
// if touchEnabled is true, setup the touch events
|
554 |
+
if (slider.settings.touchEnabled) { initTouch(); }
|
555 |
+
|
556 |
+
// if keyboardEnabled is true, setup the keyboard events
|
557 |
+
if (slider.settings.keyboardEnabled) {
|
558 |
+
$(document).keydown(keyPress);
|
559 |
+
}
|
560 |
+
};
|
561 |
+
|
562 |
+
/**
|
563 |
+
* ==============================================================
|
564 |
+
* EVENTS
|
565 |
+
*
|
566 |
+
* Pause/play actions are coupled by method. The slider can only
|
567 |
+
* be restarted by the partner of the mechanism that paused it.
|
568 |
+
* For example, a slider paused by switching windows (blur) will
|
569 |
+
* only restart upon switching back (focus).
|
570 |
+
*
|
571 |
+
* Event : Action : Function
|
572 |
+
* ------------------------------:------------:-------------------
|
573 |
+
* hide/show (ex: tabbed pages) : pause/play : visibilityCheck
|
574 |
+
* scroll out/in of viewport : pause/play : visibilityCheck
|
575 |
+
* hover in/out : pause/play : initAuto
|
576 |
+
* blur/focus : pause/play : attachListeners
|
577 |
+
* resize and orientation change : redraw : attachListeners
|
578 |
+
* ==============================================================
|
579 |
+
*/
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Window event listeners.
|
583 |
+
*
|
584 |
+
* Not checking inViewport on scroll event because we also check that
|
585 |
+
* in the general visibility check.
|
586 |
+
*/
|
587 |
+
var attachListeners = function () {
|
588 |
+
|
589 |
+
window.addEventListener('resize', updateLayout, false);
|
590 |
+
window.addEventListener('orientationchange', updateLayout, false);
|
591 |
+
window.addEventListener('toggleFullContent', updateLayout, false);
|
592 |
+
|
593 |
+
// Test this with dev console closed
|
594 |
+
// (or click in the document once to establish focus).
|
595 |
+
window.addEventListener('blur', function () {
|
596 |
+
pauseEvent('blur');
|
597 |
+
});
|
598 |
+
|
599 |
+
window.addEventListener('focus', function () {
|
600 |
+
playEvent('blur');
|
601 |
+
});
|
602 |
+
|
603 |
+
};
|
604 |
+
|
605 |
+
// Debounced resize event.
|
606 |
+
var updateLayout = _.debounce(function () {
|
607 |
+
if (slider.debug) console.log(slider.logAs, 'updateLayout');
|
608 |
+
resizeWindow();
|
609 |
+
}, 250);
|
610 |
+
|
611 |
+
// General visibility check.
|
612 |
+
var visibilityCheck = function () {
|
613 |
+
if (!slider.settings.auto) {
|
614 |
+
return;
|
615 |
+
}
|
616 |
+
|
617 |
+
if (!reallyVisible()) {
|
618 |
+
pauseEvent('hide');
|
619 |
+
} else {
|
620 |
+
playEvent('hide');
|
621 |
+
}
|
622 |
+
|
623 |
+
if (!verge.inViewport(el)) {
|
624 |
+
pauseEvent('scroll');
|
625 |
+
} else {
|
626 |
+
playEvent('scroll');
|
627 |
+
}
|
628 |
+
};
|
629 |
+
|
630 |
+
var pauseEvent = function (action) {
|
631 |
+
// if the auto show is currently playing (has an active interval)
|
632 |
+
if (slider.interval) {
|
633 |
+
// stop the auto show and pass true argument which will prevent control update
|
634 |
+
el.stopAuto(true);
|
635 |
+
// create a new autoPaused value which will be used by the corresponding event
|
636 |
+
slider.autoPaused = action;
|
637 |
+
if (slider.debug) console.log(slider.logAs, 'pause', action);
|
638 |
+
}
|
639 |
+
};
|
640 |
+
|
641 |
+
var playEvent = function (action) {
|
642 |
+
// if the autoPaused value was created by the prior event
|
643 |
+
if (slider.autoPaused === action) {
|
644 |
+
// start the auto show and pass true argument which will prevent control update
|
645 |
+
el.startAuto(true);
|
646 |
+
// reset the autoPaused value
|
647 |
+
slider.autoPaused = null;
|
648 |
+
if (slider.debug) console.log(slider.logAs, 'play', action);
|
649 |
+
}
|
650 |
+
};
|
651 |
+
|
652 |
+
/**
|
653 |
+
*
|
654 |
+
*/
|
655 |
+
var setSlideHeight = function () {
|
656 |
+
var heights = slider.children.map(function () {
|
657 |
+
return jQuery(this).actual('outerHeight');
|
658 |
+
}).get();
|
659 |
+
|
660 |
+
var maxHeight = arrayMax(heights);
|
661 |
+
slider.children.height(maxHeight);
|
662 |
+
};
|
663 |
+
|
664 |
+
/**
|
665 |
+
*
|
666 |
+
*/
|
667 |
+
var unsetSlideHeight = function () {
|
668 |
+
slider.children.height('auto');
|
669 |
+
};
|
670 |
+
|
671 |
+
// Function to get the max value in array
|
672 |
+
var arrayMax = function (array) {
|
673 |
+
return Math.max.apply(Math, array);
|
674 |
+
};
|
675 |
+
|
676 |
+
/**
|
677 |
+
* Returns the calculated height of the SLIDER viewport (not browser viewport),
|
678 |
+
* used to determine either adaptiveHeight or the maxHeight value
|
679 |
+
*/
|
680 |
+
var getViewportHeight = function () {
|
681 |
+
|
682 |
+
var height = 0;
|
683 |
+
|
684 |
+
// first determine which children (slides) should be used in our height calculation
|
685 |
+
var children = $();
|
686 |
+
|
687 |
+
// if mode is not "vertical" and adaptiveHeight is false, include all children
|
688 |
+
if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {
|
689 |
+
|
690 |
+
children = slider.children;
|
691 |
+
|
692 |
+
} else {
|
693 |
+
|
694 |
+
// if not carousel, return the single active child
|
695 |
+
if (!slider.carousel) {
|
696 |
+
|
697 |
+
children = slider.children.eq(slider.active.index);
|
698 |
+
|
699 |
+
} else {
|
700 |
+
|
701 |
+
// if carousel, return a slice of children
|
702 |
+
|
703 |
+
// get the individual slide index
|
704 |
+
var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
|
705 |
+
|
706 |
+
// add the current slide to the children
|
707 |
+
children = slider.children.eq(currentIndex);
|
708 |
+
|
709 |
+
// cycle through the remaining "showing" slides
|
710 |
+
for (var i = 1; i <= slider.settings.maxSlides - 1; i++) {
|
711 |
+
|
712 |
+
// if looped back to the start
|
713 |
+
if (currentIndex + i >= slider.children.length) {
|
714 |
+
children = children.add(slider.children.eq(i - 1));
|
715 |
+
} else {
|
716 |
+
children = children.add(slider.children.eq(currentIndex + i));
|
717 |
+
}
|
718 |
+
|
719 |
+
}
|
720 |
+
|
721 |
+
}
|
722 |
+
|
723 |
+
}
|
724 |
+
|
725 |
+
// if "vertical" mode, calculate the sum of the heights of the children
|
726 |
+
if (slider.settings.mode === 'vertical') {
|
727 |
+
children.each(function (index) {
|
728 |
+
height += $(this).outerHeight();
|
729 |
+
});
|
730 |
+
// add user-supplied margins
|
731 |
+
if (slider.settings.slideMargin > 0) {
|
732 |
+
height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
|
733 |
+
}
|
734 |
+
// if not "vertical" mode, calculate the max height of the children
|
735 |
+
} else {
|
736 |
+
height = Math.max.apply(Math, children.map(function () {
|
737 |
+
return $(this).outerHeight(false);
|
738 |
+
}).get());
|
739 |
+
}
|
740 |
+
|
741 |
+
if (slider.viewport.css('box-sizing') === 'border-box') {
|
742 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
|
743 |
+
parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
|
744 |
+
} else if (slider.viewport.css('box-sizing') === 'padding-box') {
|
745 |
+
height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
|
746 |
+
}
|
747 |
+
|
748 |
+
return height;
|
749 |
+
};
|
750 |
+
|
751 |
+
/**
|
752 |
+
*
|
753 |
+
*/
|
754 |
+
var setViewportHeight = function () {
|
755 |
+
slider.viewport.height(getViewportHeight() + 2);
|
756 |
+
};
|
757 |
+
|
758 |
+
/**
|
759 |
+
* Returns the calculated width to be used for the outer wrapper / viewport
|
760 |
+
*/
|
761 |
+
var getViewportMaxWidth2 = function () {
|
762 |
+
return '100%';
|
763 |
+
};
|
764 |
+
|
765 |
+
/**
|
766 |
+
* Returns the calculated width to be applied to each slide
|
767 |
+
*/
|
768 |
+
var getSlideWidth2 = function () {
|
769 |
+
var wrapWidth = slider.viewport.width();
|
770 |
+
var margins = slider.settings.slideMargin * (slider.settings.maxSlides - 1);
|
771 |
+
return Math.floor( (wrapWidth - margins) / slider.settings.maxSlides );
|
772 |
+
};
|
773 |
+
|
774 |
+
/**
|
775 |
+
* Returns the number of slides currently visible in the viewport (includes partially visible slides)
|
776 |
+
*/
|
777 |
+
var getNumberSlidesShowing2 = function () {
|
778 |
+
return slider.settings.maxSlides;
|
779 |
+
};
|
780 |
+
|
781 |
+
/**
|
782 |
+
* Returns the number of pages (one full viewport of slides is one "page")
|
783 |
+
*/
|
784 |
+
var getPagerQty = function () {
|
785 |
+
var pagerQty = 0,
|
786 |
+
breakPoint = 0,
|
787 |
+
counter = 0;
|
788 |
+
// if moveSlides is specified by the user
|
789 |
+
if (slider.settings.moveSlides > 0) {
|
790 |
+
if (slider.settings.infiniteLoop) {
|
791 |
+
pagerQty = Math.ceil(slider.children.length / getMoveBy());
|
792 |
+
} else {
|
793 |
+
// when breakpoint goes above children length, counter is the number of pages
|
794 |
+
while (breakPoint < slider.children.length) {
|
795 |
+
++pagerQty;
|
796 |
+
breakPoint = counter + getNumberSlidesShowing2();
|
797 |
+
counter += slider.settings.moveSlides <= getNumberSlidesShowing2() ? slider.settings.moveSlides : getNumberSlidesShowing2();
|
798 |
+
}
|
799 |
+
return counter;
|
800 |
+
}
|
801 |
+
// if moveSlides is 0 (auto) divide children length by sides showing, then round up
|
802 |
+
} else {
|
803 |
+
pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing2());
|
804 |
+
}
|
805 |
+
return pagerQty;
|
806 |
+
};
|
807 |
+
|
808 |
+
/**
|
809 |
+
* Returns the number of individual slides by which to shift the slider
|
810 |
+
*/
|
811 |
+
var getMoveBy = function () {
|
812 |
+
// if moveSlides was set by the user and moveSlides is less than number of slides showing
|
813 |
+
if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing2()) {
|
814 |
+
return slider.settings.moveSlides;
|
815 |
+
}
|
816 |
+
// if moveSlides is 0 (auto)
|
817 |
+
return getNumberSlidesShowing2();
|
818 |
+
};
|
819 |
+
|
820 |
+
/**
|
821 |
+
* Sets the slider's (el) left or top position
|
822 |
+
*/
|
823 |
+
var setSlidePosition = function () {
|
824 |
+
var position, lastChild, lastShowingIndex;
|
825 |
+
|
826 |
+
// if last slide, not infinite loop, and number of children is larger than specified maxSlides
|
827 |
+
if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
|
828 |
+
|
829 |
+
if (slider.settings.mode === 'horizontal') {
|
830 |
+
// get the last child's position
|
831 |
+
lastChild = slider.children.last();
|
832 |
+
position = lastChild.position();
|
833 |
+
// set the left position
|
834 |
+
setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
|
835 |
+
} else if (slider.settings.mode === 'vertical') {
|
836 |
+
// get the last showing index's position
|
837 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
838 |
+
position = slider.children.eq(lastShowingIndex).position();
|
839 |
+
// set the top position
|
840 |
+
setPositionProperty(-position.top, 'reset', 0);
|
841 |
+
}
|
842 |
+
|
843 |
+
// if not last slide
|
844 |
+
} else {
|
845 |
+
|
846 |
+
// get the position of the first showing slide
|
847 |
+
position = slider.children.eq(slider.active.index * getMoveBy()).position();
|
848 |
+
|
849 |
+
// check for last slide
|
850 |
+
if (slider.active.index === getPagerQty() - 1) {
|
851 |
+
slider.active.last = true;
|
852 |
+
}
|
853 |
+
|
854 |
+
// set the respective position
|
855 |
+
if (position !== undefined) {
|
856 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
857 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
858 |
+
else if (slider.settings.mode === 'none') { setPositionProperty(-position.top, 'reset', 0); }
|
859 |
+
}
|
860 |
+
|
861 |
+
}
|
862 |
+
};
|
863 |
+
|
864 |
+
/**
|
865 |
+
* Sets the el's animating property position (which in turn will sometimes animate el).
|
866 |
+
* If using CSS, sets the transform property. If not using CSS, sets the top / left property.
|
867 |
+
*
|
868 |
+
* @param value (int)
|
869 |
+
* - the animating property's value
|
870 |
+
*
|
871 |
+
* @param type (string) 'slide', 'reset'
|
872 |
+
* - the type of instance for which the function is being
|
873 |
+
*
|
874 |
+
* @param duration (int)
|
875 |
+
* - the amount of time (in ms) the transition should occupy
|
876 |
+
*
|
877 |
+
* @param params (array) optional
|
878 |
+
* - an optional parameter containing any variables that need to be passed in
|
879 |
+
*/
|
880 |
+
var setPositionProperty = function (value, type, duration, params) {
|
881 |
+
var animateObj, propValue;
|
882 |
+
// use CSS transform
|
883 |
+
if (slider.usingCSS) {
|
884 |
+
// determine the translate3d value
|
885 |
+
if (slider.settings.mode === 'vertical') {
|
886 |
+
propValue = 'translateY(' + value + 'px)';
|
887 |
+
} else if (slider.settings.mode === 'horizontal') {
|
888 |
+
propValue = 'translateX(' + value + 'px';
|
889 |
+
} else if (slider.settings.mode === 'none') {
|
890 |
+
propValue = 'translateY(' + value + 'px)';
|
891 |
+
duration = 0;
|
892 |
+
}
|
893 |
+
|
894 |
+
// add the CSS transition-duration
|
895 |
+
el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
|
896 |
+
|
897 |
+
if (type === 'slide') {
|
898 |
+
|
899 |
+
// set the property value
|
900 |
+
el.css(slider.animProp, propValue);
|
901 |
+
if (duration !== 0) {
|
902 |
+
// add a callback method - executes when CSS transition completes
|
903 |
+
el.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function (e) {
|
904 |
+
//make sure it's the correct one
|
905 |
+
if (!$(e.target).is(el)) { return; }
|
906 |
+
// remove the callback
|
907 |
+
el.off('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
|
908 |
+
updateAfterSlideTransition();
|
909 |
+
});
|
910 |
+
} else { //duration = 0
|
911 |
+
updateAfterSlideTransition();
|
912 |
+
}
|
913 |
+
|
914 |
+
} else if (type === 'reset') {
|
915 |
+
el.css(slider.animProp, propValue);
|
916 |
+
}
|
917 |
+
// use JS animate
|
918 |
+
} else {
|
919 |
+
animateObj = {};
|
920 |
+
animateObj[slider.animProp] = value;
|
921 |
+
if (type === 'slide') {
|
922 |
+
el.animate(animateObj, duration, slider.settings.easing, function () {
|
923 |
+
updateAfterSlideTransition();
|
924 |
+
});
|
925 |
+
} else if (type === 'reset') {
|
926 |
+
el.css(slider.animProp, value);
|
927 |
+
}
|
928 |
+
}
|
929 |
+
};
|
930 |
+
|
931 |
+
/**
|
932 |
+
* Populates the pager with proper amount of pages
|
933 |
+
*/
|
934 |
+
var populatePager = function () {
|
935 |
+
var pagerHtml = '',
|
936 |
+
linkContent = '',
|
937 |
+
pagerQty = getPagerQty();
|
938 |
+
|
939 |
+
// loop through each pager item
|
940 |
+
for (var i = 0; i < pagerQty; i++) {
|
941 |
+
linkContent = '';
|
942 |
+
|
943 |
+
if (slider.settings.buildPager) {
|
944 |
+
// if using icons, use no link text
|
945 |
+
if (slider.settings.buildPager === 'icons') {
|
946 |
+
linkContent = '';
|
947 |
+
}
|
948 |
+
// if a buildPager function is supplied, use it to get pager link value, else use index + 1
|
949 |
+
if ($.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {
|
950 |
+
linkContent = slider.settings.buildPager(i);
|
951 |
+
}
|
952 |
+
slider.pagerEl.addClass('wpmslider-custom-pager');
|
953 |
+
} else {
|
954 |
+
linkContent = i + 1;
|
955 |
+
slider.pagerEl.addClass('wpmslider-default-pager');
|
956 |
+
}
|
957 |
+
|
958 |
+
// add the markup to the string
|
959 |
+
pagerHtml += '<div class="wpmslider-pager-item"><a href="" data-slide-index="' + i + '" class="wpmslider-pager-link">' + linkContent + '</a></div>';
|
960 |
+
}
|
961 |
+
|
962 |
+
// populate the pager element with pager links
|
963 |
+
slider.pagerEl.html(pagerHtml);
|
964 |
+
};
|
965 |
+
|
966 |
+
/**
|
967 |
+
* Appends the pager to the controls element
|
968 |
+
*/
|
969 |
+
var appendPager = function () {
|
970 |
+
if (!slider.settings.pagerCustom) {
|
971 |
+
// create the pager DOM element
|
972 |
+
slider.pagerEl = $('<div class="wpmslider-pager" />');
|
973 |
+
// if a pager selector was supplied, populate it with the pager
|
974 |
+
if (slider.settings.pagerSelector) {
|
975 |
+
$(slider.settings.pagerSelector).html(slider.pagerEl);
|
976 |
+
// if no pager selector was supplied, add it after the wrapper
|
977 |
+
} else {
|
978 |
+
slider.controls.el.addClass('wpmslider-has-pager').append(slider.pagerEl);
|
979 |
+
}
|
980 |
+
// populate the pager
|
981 |
+
populatePager();
|
982 |
+
} else {
|
983 |
+
slider.pagerEl = $(slider.settings.pagerCustom);
|
984 |
+
}
|
985 |
+
// assign the pager click binding
|
986 |
+
slider.pagerEl.on('click touchend', 'a', clickPagerBind);
|
987 |
+
};
|
988 |
+
|
989 |
+
/**
|
990 |
+
* Appends prev control to the controls element
|
991 |
+
*/
|
992 |
+
var appendControlPrev = function () {
|
993 |
+
slider.controls.prev = $('<a class="wpmslider-prev" href="">' + slider.settings.prevText + '</a>');
|
994 |
+
|
995 |
+
// bind click actions to the controls
|
996 |
+
slider.controls.prev.on('click touchend', clickPrevBind);
|
997 |
+
|
998 |
+
// if prevSelector was supplied, populate it
|
999 |
+
if (slider.settings.prevSelector) {
|
1000 |
+
$(slider.settings.prevSelector).append(slider.controls.prev);
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
// if no custom selectors were supplied
|
1004 |
+
if (!slider.settings.prevSelector) {
|
1005 |
+
// add the controls to the DOM
|
1006 |
+
slider.controls.directionEl = $('<div class="wpmslider-controls-direction" />');
|
1007 |
+
// add the control elements to the directionEl
|
1008 |
+
slider.controls.directionEl.append(slider.controls.prev);
|
1009 |
+
slider.controls.el.addClass('wpmslider-has-controls-direction').append(slider.controls.directionEl);
|
1010 |
+
}
|
1011 |
+
};
|
1012 |
+
|
1013 |
+
/**
|
1014 |
+
* Appends next controls to the controls element
|
1015 |
+
*/
|
1016 |
+
var appendControlNext = function () {
|
1017 |
+
slider.controls.next = $('<a class="wpmslider-next" href="">' + slider.settings.nextText + '</a>');
|
1018 |
+
|
1019 |
+
// bind click actions to the controls
|
1020 |
+
slider.controls.next.on('click touchend', clickNextBind);
|
1021 |
+
|
1022 |
+
// if nextSelector was supplied, populate it
|
1023 |
+
if (slider.settings.nextSelector) {
|
1024 |
+
$(slider.settings.nextSelector).append(slider.controls.next);
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
// if no custom selectors were supplied
|
1028 |
+
if (!slider.settings.nextSelector) {
|
1029 |
+
// add the controls to the DOM
|
1030 |
+
slider.controls.directionEl = $('<div class="wpmslider-controls-direction" />');
|
1031 |
+
// add the control elements to the directionEl
|
1032 |
+
slider.controls.directionEl.append(slider.controls.next);
|
1033 |
+
slider.controls.el.addClass('wpmslider-has-controls-direction').append(slider.controls.directionEl);
|
1034 |
+
}
|
1035 |
+
};
|
1036 |
+
|
1037 |
+
/**
|
1038 |
+
* Appends start / stop auto controls to the controls element
|
1039 |
+
*/
|
1040 |
+
var appendControlsAuto = function () {
|
1041 |
+
slider.controls.start = $('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">' + slider.settings.startText + '</a></div>');
|
1042 |
+
slider.controls.stop = $('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">' + slider.settings.stopText + '</a></div>');
|
1043 |
+
|
1044 |
+
// add the controls to the DOM
|
1045 |
+
slider.controls.autoEl = $('<div class="wpmslider-controls-auto" />');
|
1046 |
+
|
1047 |
+
// on click actions to the controls
|
1048 |
+
slider.controls.autoEl.on('click', '.wpmslider-start', clickStartBind);
|
1049 |
+
slider.controls.autoEl.on('click', '.wpmslider-stop', clickStopBind);
|
1050 |
+
|
1051 |
+
// if autoControlsCombine, insert only the "start" control
|
1052 |
+
if (slider.settings.autoControlsCombine) {
|
1053 |
+
slider.controls.autoEl.append(slider.controls.start);
|
1054 |
+
// if autoControlsCombine is false, insert both controls
|
1055 |
+
}
|
1056 |
+
else {
|
1057 |
+
slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
// if auto controls selector was supplied, populate it with the controls
|
1061 |
+
if (slider.settings.autoControlsSelector) {
|
1062 |
+
$(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
|
1063 |
+
// if auto controls selector was not supplied, add it after the wrapper
|
1064 |
+
} else {
|
1065 |
+
slider.controls.el.addClass('wpmslider-has-controls-auto').append(slider.controls.autoEl);
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
// update the auto controls
|
1069 |
+
updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
|
1070 |
+
};
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Appends image captions to the DOM
|
1074 |
+
*/
|
1075 |
+
var appendCaptions = function () {
|
1076 |
+
// cycle through each child
|
1077 |
+
slider.children.each(function (index) {
|
1078 |
+
// get the image title attribute
|
1079 |
+
var title = $(this).find('img:first').attr('title');
|
1080 |
+
// append the caption
|
1081 |
+
if (title !== undefined && ('' + title).length) {
|
1082 |
+
$(this).append('<div class="wpmslider-caption"><span>' + title + '</span></div>');
|
1083 |
+
}
|
1084 |
+
});
|
1085 |
+
};
|
1086 |
+
|
1087 |
+
/**
|
1088 |
+
* Click next binding
|
1089 |
+
*
|
1090 |
+
* @param e (event)
|
1091 |
+
* - DOM event object
|
1092 |
+
*/
|
1093 |
+
var clickNextBind = function (e) {
|
1094 |
+
e.preventDefault();
|
1095 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1096 |
+
if (slider.controls.el.hasClass('disabled')) {
|
1097 |
+
return;
|
1098 |
+
}
|
1099 |
+
// if auto show is running, stop it
|
1100 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) {
|
1101 |
+
if (slider.debug) console.log(slider.logAs, 'stop on navigation');
|
1102 |
+
el.stopAuto();
|
1103 |
+
}
|
1104 |
+
el.goToNextSlide();
|
1105 |
+
};
|
1106 |
+
|
1107 |
+
/**
|
1108 |
+
* Click prev binding
|
1109 |
+
*
|
1110 |
+
* @param e (event)
|
1111 |
+
* - DOM event object
|
1112 |
+
*/
|
1113 |
+
var clickPrevBind = function (e) {
|
1114 |
+
e.preventDefault();
|
1115 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1116 |
+
if (slider.controls.el.hasClass('disabled')) {
|
1117 |
+
return;
|
1118 |
+
}
|
1119 |
+
// if auto show is running, stop it
|
1120 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) {
|
1121 |
+
if (slider.debug) console.log(slider.logAs, 'stop on navigation');
|
1122 |
+
el.stopAuto();
|
1123 |
+
}
|
1124 |
+
el.goToPrevSlide();
|
1125 |
+
};
|
1126 |
+
|
1127 |
+
/**
|
1128 |
+
* Click start binding
|
1129 |
+
*
|
1130 |
+
* @param e (event)
|
1131 |
+
* - DOM event object
|
1132 |
+
*/
|
1133 |
+
var clickStartBind = function (e) {
|
1134 |
+
el.startAuto();
|
1135 |
+
e.preventDefault();
|
1136 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1137 |
+
};
|
1138 |
+
|
1139 |
+
/**
|
1140 |
+
* Click stop binding
|
1141 |
+
*
|
1142 |
+
* @param e (event)
|
1143 |
+
* - DOM event object
|
1144 |
+
*/
|
1145 |
+
var clickStopBind = function (e) {
|
1146 |
+
el.stopAuto();
|
1147 |
+
e.preventDefault();
|
1148 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1149 |
+
};
|
1150 |
+
|
1151 |
+
/**
|
1152 |
+
* Click pager binding
|
1153 |
+
*
|
1154 |
+
* @param e (event)
|
1155 |
+
* - DOM event object
|
1156 |
+
*/
|
1157 |
+
var clickPagerBind = function (e) {
|
1158 |
+
var pagerLink, pagerIndex;
|
1159 |
+
e.preventDefault();
|
1160 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1161 |
+
if (slider.controls.el.hasClass('disabled')) {
|
1162 |
+
return;
|
1163 |
+
}
|
1164 |
+
// if auto show is running, stop it
|
1165 |
+
if (slider.settings.auto && slider.settings.stopAutoOnClick) {
|
1166 |
+
if (slider.debug) console.log(slider.logAs, 'stop on navigation');
|
1167 |
+
el.stopAuto();
|
1168 |
+
}
|
1169 |
+
pagerLink = $(e.currentTarget);
|
1170 |
+
if (pagerLink.attr('data-slide-index') !== undefined) {
|
1171 |
+
pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
|
1172 |
+
// if clicked pager link is not active, continue with the goToSlide call
|
1173 |
+
if (pagerIndex !== slider.active.index) {
|
1174 |
+
el.goToSlide(pagerIndex);
|
1175 |
+
}
|
1176 |
+
}
|
1177 |
+
};
|
1178 |
+
|
1179 |
+
/**
|
1180 |
+
* Updates the pager links with an active class
|
1181 |
+
*
|
1182 |
+
* @param slideIndex (int)
|
1183 |
+
* - index of slide to make active
|
1184 |
+
*/
|
1185 |
+
var updatePagerActive = function (slideIndex) {
|
1186 |
+
// if "short" pager type
|
1187 |
+
var len = slider.children.length; // nb of children
|
1188 |
+
if (slider.settings.pagerType === 'short') {
|
1189 |
+
if (slider.settings.maxSlides > 1) {
|
1190 |
+
len = Math.ceil(slider.children.length / slider.settings.maxSlides);
|
1191 |
+
}
|
1192 |
+
slider.pagerEl.html((slideIndex + 1) + slider.settings.pagerShortSeparator + len);
|
1193 |
+
return;
|
1194 |
+
}
|
1195 |
+
// remove all pager active classes
|
1196 |
+
slider.pagerEl.find('a').removeClass('active');
|
1197 |
+
// apply the active class for all pagers
|
1198 |
+
slider.pagerEl.each(function (i, el) {
|
1199 |
+
$(el).find('a').eq(slideIndex).addClass('active');
|
1200 |
+
});
|
1201 |
+
};
|
1202 |
+
|
1203 |
+
/**
|
1204 |
+
* Performs needed actions after a slide transition
|
1205 |
+
*/
|
1206 |
+
var updateAfterSlideTransition = function () {
|
1207 |
+
// if infinite loop is true
|
1208 |
+
if (slider.settings.infiniteLoop) {
|
1209 |
+
var position = '';
|
1210 |
+
// first slide
|
1211 |
+
if (slider.active.index === 0) {
|
1212 |
+
// set the new position
|
1213 |
+
position = slider.children.eq(0).position();
|
1214 |
+
// carousel, last slide
|
1215 |
+
} else if (slider.active.index === getPagerQty() - 1 && slider.carousel) {
|
1216 |
+
position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
|
1217 |
+
// last slide
|
1218 |
+
} else if (slider.active.index === slider.children.length - 1) {
|
1219 |
+
position = slider.children.eq(slider.children.length - 1).position();
|
1220 |
+
}
|
1221 |
+
if (position) {
|
1222 |
+
if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
|
1223 |
+
else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
|
1224 |
+
}
|
1225 |
+
}
|
1226 |
+
// declare that the transition is complete
|
1227 |
+
slider.working = false;
|
1228 |
+
// onSlideAfter callback
|
1229 |
+
slider.settings.onSlideAfter.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
1230 |
+
};
|
1231 |
+
|
1232 |
+
/**
|
1233 |
+
* Updates the auto controls state (either active, or combined switch)
|
1234 |
+
*
|
1235 |
+
* @param state (string) "start", "stop"
|
1236 |
+
* - the new state of the auto show
|
1237 |
+
*/
|
1238 |
+
var updateAutoControls = function (state) {
|
1239 |
+
// if autoControlsCombine is true, replace the current control with the new state
|
1240 |
+
if (slider.settings.autoControlsCombine) {
|
1241 |
+
slider.controls.autoEl.html(slider.controls[state]);
|
1242 |
+
// if autoControlsCombine is false, apply the "active" class to the appropriate control
|
1243 |
+
} else {
|
1244 |
+
slider.controls.autoEl.find('a').removeClass('active');
|
1245 |
+
slider.controls.autoEl.find('a:not(.wpmslider-' + state + ')').addClass('active');
|
1246 |
+
}
|
1247 |
+
};
|
1248 |
+
|
1249 |
+
/**
|
1250 |
+
* Updates the direction controls (checks if either should be hidden)
|
1251 |
+
*/
|
1252 |
+
var updateDirectionControls = function () {
|
1253 |
+
if (getPagerQty() === 1) {
|
1254 |
+
slider.controls.prev.addClass('disabled');
|
1255 |
+
slider.controls.next.addClass('disabled');
|
1256 |
+
}
|
1257 |
+
else if (!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd) {
|
1258 |
+
// if first slide
|
1259 |
+
if (slider.active.index === 0) {
|
1260 |
+
slider.controls.prev.addClass('disabled');
|
1261 |
+
slider.controls.next.removeClass('disabled');
|
1262 |
+
// if last slide
|
1263 |
+
} else if (slider.active.index === getPagerQty() - 1) {
|
1264 |
+
slider.controls.next.addClass('disabled');
|
1265 |
+
slider.controls.prev.removeClass('disabled');
|
1266 |
+
// if any slide in the middle
|
1267 |
+
} else {
|
1268 |
+
slider.controls.prev.removeClass('disabled');
|
1269 |
+
slider.controls.next.removeClass('disabled');
|
1270 |
+
}
|
1271 |
+
}
|
1272 |
+
};
|
1273 |
+
|
1274 |
+
/**
|
1275 |
+
* Initializes the auto process
|
1276 |
+
*/
|
1277 |
+
var initAuto = function () {
|
1278 |
+
// if autoDelay was supplied, launch the auto show using a setTimeout() call
|
1279 |
+
if (slider.settings.autoDelay > 0) {
|
1280 |
+
setTimeout(el.startAuto, slider.settings.autoDelay);
|
1281 |
+
// if autoDelay was not supplied, start the auto show normally
|
1282 |
+
} else {
|
1283 |
+
el.startAuto();
|
1284 |
+
}
|
1285 |
+
|
1286 |
+
// if autoHover is requested
|
1287 |
+
if (slider.settings.autoHover) {
|
1288 |
+
// on el hover
|
1289 |
+
el.hover(function () {
|
1290 |
+
pauseEvent('hover');
|
1291 |
+
}, function () {
|
1292 |
+
playEvent('hover');
|
1293 |
+
});
|
1294 |
+
}
|
1295 |
+
};
|
1296 |
+
|
1297 |
+
/**
|
1298 |
+
* Initializes keyboard events
|
1299 |
+
*/
|
1300 |
+
var keyPress = function (e) {
|
1301 |
+
var activeElementTag = document.activeElement.tagName.toLowerCase(),
|
1302 |
+
tagFilters = 'input|textarea',
|
1303 |
+
p = new RegExp(activeElementTag, ['i']),
|
1304 |
+
result = p.exec(tagFilters);
|
1305 |
+
|
1306 |
+
if (result === null && verge.inViewport(el)) {
|
1307 |
+
if (e.keyCode === 39) {
|
1308 |
+
clickNextBind(e);
|
1309 |
+
return false;
|
1310 |
+
} else if (e.keyCode === 37) {
|
1311 |
+
clickPrevBind(e);
|
1312 |
+
return false;
|
1313 |
+
}
|
1314 |
+
}
|
1315 |
+
};
|
1316 |
+
|
1317 |
+
/**
|
1318 |
+
* Initializes touch events
|
1319 |
+
*/
|
1320 |
+
var initTouch = function () {
|
1321 |
+
// initialize object to contain all touch values
|
1322 |
+
slider.touch = {
|
1323 |
+
start: {x: 0, y: 0},
|
1324 |
+
end: {x: 0, y: 0}
|
1325 |
+
};
|
1326 |
+
slider.viewport.on('touchstart MSPointerDown pointerdown', onTouchStart);
|
1327 |
+
|
1328 |
+
//for browsers that have implemented pointer events and fire a click after
|
1329 |
+
//every pointerup regardless of whether pointerup is on same screen location as pointerdown or not
|
1330 |
+
slider.viewport.on('click', '.wpmslider a', function (e) {
|
1331 |
+
if (slider.viewport.hasClass('click-disabled')) {
|
1332 |
+
e.preventDefault();
|
1333 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1334 |
+
slider.viewport.removeClass('click-disabled');
|
1335 |
+
}
|
1336 |
+
});
|
1337 |
+
};
|
1338 |
+
|
1339 |
+
/**
|
1340 |
+
* Event handler for "touchstart"
|
1341 |
+
*
|
1342 |
+
* @param e (event)
|
1343 |
+
* - DOM event object
|
1344 |
+
*/
|
1345 |
+
var onTouchStart = function (e) {
|
1346 |
+
// watch only for left mouse, touch contact and pen contact
|
1347 |
+
// touchstart event object doesn`t have button property
|
1348 |
+
if (e.type !== 'touchstart' && e.button !== 0) {
|
1349 |
+
return;
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
if( e.originalEvent.target.classList.contains('readmore-text') ) {
|
1353 |
+
return;
|
1354 |
+
}
|
1355 |
+
// e.preventDefault();
|
1356 |
+
//disable slider controls while user is interacting with slides to avoid slider freeze that happens on touch devices when a slide swipe happens immediately after interacting with slider controls
|
1357 |
+
slider.controls.el.addClass('disabled');
|
1358 |
+
|
1359 |
+
if (slider.working) {
|
1360 |
+
e.preventDefault();
|
1361 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1362 |
+
slider.controls.el.removeClass('disabled');
|
1363 |
+
} else {
|
1364 |
+
// record the original position when touch starts
|
1365 |
+
slider.touch.originalPos = el.position();
|
1366 |
+
var orig = e.originalEvent,
|
1367 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];
|
1368 |
+
var chromePointerEvents = typeof PointerEvent === 'function';
|
1369 |
+
if (chromePointerEvents) { if (orig.pointerId === undefined) { return; } }
|
1370 |
+
// record the starting touch x, y coordinates
|
1371 |
+
slider.touch.start.x = touchPoints[0].pageX;
|
1372 |
+
slider.touch.start.y = touchPoints[0].pageY;
|
1373 |
+
|
1374 |
+
if (slider.viewport.get(0).setPointerCapture) {
|
1375 |
+
slider.pointerId = orig.pointerId;
|
1376 |
+
slider.viewport.get(0).setPointerCapture(slider.pointerId);
|
1377 |
+
}
|
1378 |
+
// store original event data for click fixation
|
1379 |
+
slider.originalClickTarget = orig.originalTarget || orig.target;
|
1380 |
+
slider.originalClickButton = orig.button;
|
1381 |
+
slider.originalClickButtons = orig.buttons;
|
1382 |
+
slider.originalEventType = orig.type;
|
1383 |
+
// at this moment we don`t know what it is click or swipe
|
1384 |
+
slider.hasMove = false;
|
1385 |
+
// on a "touchmove" event to the viewport
|
1386 |
+
slider.viewport.on('touchmove MSPointerMove pointermove', onTouchMove);
|
1387 |
+
// on a "touchend" event to the viewport
|
1388 |
+
slider.viewport.on('touchend MSPointerUp pointerup', onTouchEnd);
|
1389 |
+
slider.viewport.on('MSPointerCancel pointercancel', onPointerCancel);
|
1390 |
+
}
|
1391 |
+
};
|
1392 |
+
|
1393 |
+
/**
|
1394 |
+
* Cancel Pointer for Windows Phone
|
1395 |
+
*
|
1396 |
+
* @param e (event)
|
1397 |
+
* - DOM event object
|
1398 |
+
*/
|
1399 |
+
var onPointerCancel = function (e) {
|
1400 |
+
e.preventDefault();
|
1401 |
+
/* onPointerCancel handler is needed to deal with situations when a touchend
|
1402 |
+
doesn't fire after a touchstart (this happens on windows phones only) */
|
1403 |
+
setPositionProperty(slider.touch.originalPos.left, 'reset', 0);
|
1404 |
+
|
1405 |
+
//remove handlers
|
1406 |
+
slider.controls.el.removeClass('disabled');
|
1407 |
+
slider.viewport.off('MSPointerCancel pointercancel', onPointerCancel);
|
1408 |
+
slider.viewport.off('touchmove MSPointerMove pointermove', onTouchMove);
|
1409 |
+
slider.viewport.off('touchend MSPointerUp pointerup', onTouchEnd);
|
1410 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1411 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1412 |
+
}
|
1413 |
+
};
|
1414 |
+
|
1415 |
+
/**
|
1416 |
+
* Event handler for "touchmove"
|
1417 |
+
*
|
1418 |
+
* @param e (event)
|
1419 |
+
* - DOM event object
|
1420 |
+
*/
|
1421 |
+
var onTouchMove = function (e) {
|
1422 |
+
var orig = e.originalEvent,
|
1423 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1424 |
+
// if scrolling on y axis, do not prevent default
|
1425 |
+
xMovement = Math.abs(touchPoints[0].pageX - slider.touch.start.x),
|
1426 |
+
yMovement = Math.abs(touchPoints[0].pageY - slider.touch.start.y),
|
1427 |
+
value = 0,
|
1428 |
+
change = 0;
|
1429 |
+
// this is swipe
|
1430 |
+
slider.hasMove = true;
|
1431 |
+
|
1432 |
+
// x axis swipe
|
1433 |
+
if ((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX) {
|
1434 |
+
e.preventDefault();
|
1435 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1436 |
+
// y axis swipe
|
1437 |
+
} else if ((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY) {
|
1438 |
+
e.preventDefault();
|
1439 |
+
e.stopPropagation(); // for compatibility with WordPress themes
|
1440 |
+
}
|
1441 |
+
if (e.type !== 'touchmove') {
|
1442 |
+
e.preventDefault();
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
if (slider.settings.mode !== 'fade' && slider.settings.oneToOneTouch) {
|
1446 |
+
// if horizontal, drag along x axis
|
1447 |
+
if (slider.settings.mode === 'horizontal') {
|
1448 |
+
change = touchPoints[0].pageX - slider.touch.start.x;
|
1449 |
+
value = slider.touch.originalPos.left + change;
|
1450 |
+
// if vertical, drag along y axis
|
1451 |
+
}
|
1452 |
+
else {
|
1453 |
+
change = touchPoints[0].pageY - slider.touch.start.y;
|
1454 |
+
value = slider.touch.originalPos.top + change;
|
1455 |
+
}
|
1456 |
+
setPositionProperty(value, 'reset', 0);
|
1457 |
+
}
|
1458 |
+
};
|
1459 |
+
|
1460 |
+
/**
|
1461 |
+
* Event handler for "touchend"
|
1462 |
+
*
|
1463 |
+
* @param e (event)
|
1464 |
+
* - DOM event object
|
1465 |
+
*/
|
1466 |
+
var onTouchEnd = function (e) {
|
1467 |
+
e.preventDefault();
|
1468 |
+
slider.viewport.off('touchmove MSPointerMove pointermove', onTouchMove);
|
1469 |
+
//enable slider controls as soon as user stops interacing with slides
|
1470 |
+
slider.controls.el.removeClass('disabled');
|
1471 |
+
var orig = e.originalEvent,
|
1472 |
+
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig],
|
1473 |
+
value = 0,
|
1474 |
+
distance = 0;
|
1475 |
+
// record end x, y positions
|
1476 |
+
slider.touch.end.x = touchPoints[0].pageX;
|
1477 |
+
slider.touch.end.y = touchPoints[0].pageY;
|
1478 |
+
// if fade mode, check if absolute x distance clears the threshold
|
1479 |
+
if (slider.settings.mode === 'fade') {
|
1480 |
+
distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
|
1481 |
+
if (distance >= slider.settings.swipeThreshold) {
|
1482 |
+
if (slider.touch.start.x > slider.touch.end.x) {
|
1483 |
+
el.goToNextSlide();
|
1484 |
+
} else {
|
1485 |
+
el.goToPrevSlide();
|
1486 |
+
}
|
1487 |
+
el.stopAuto();
|
1488 |
+
}
|
1489 |
+
// not fade mode
|
1490 |
+
} else {
|
1491 |
+
// calculate distance and el's animate property
|
1492 |
+
if (slider.settings.mode === 'horizontal') {
|
1493 |
+
distance = slider.touch.end.x - slider.touch.start.x;
|
1494 |
+
value = slider.touch.originalPos.left;
|
1495 |
+
} else {
|
1496 |
+
distance = slider.touch.end.y - slider.touch.start.y;
|
1497 |
+
value = slider.touch.originalPos.top;
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
// if not infinite loop and first / last slide, do not attempt a slide transition
|
1501 |
+
if (!slider.settings.infiniteLoop && ((slider.active.index === 0 && distance > 0) || (slider.active.last && distance < 0))) {
|
1502 |
+
setPositionProperty(value, 'reset', 200);
|
1503 |
+
} else {
|
1504 |
+
// check if distance clears threshold
|
1505 |
+
if (Math.abs(distance) >= slider.settings.swipeThreshold) {
|
1506 |
+
if (distance < 0) {
|
1507 |
+
el.goToNextSlide();
|
1508 |
+
} else {
|
1509 |
+
el.goToPrevSlide();
|
1510 |
+
}
|
1511 |
+
el.stopAuto();
|
1512 |
+
} else {
|
1513 |
+
// el.animate(property, 200);
|
1514 |
+
setPositionProperty(value, 'reset', 200);
|
1515 |
+
}
|
1516 |
+
}
|
1517 |
+
}
|
1518 |
+
slider.viewport.off('touchend MSPointerUp pointerup', onTouchEnd);
|
1519 |
+
if (slider.viewport.get(0).releasePointerCapture) {
|
1520 |
+
slider.viewport.get(0).releasePointerCapture(slider.pointerId);
|
1521 |
+
}
|
1522 |
+
// if slider had swipe with left mouse, touch contact and pen contact
|
1523 |
+
if (slider.hasMove === false && (slider.originalClickButton === 0 || slider.originalEventType === 'touchstart')) {
|
1524 |
+
// trigger click event (fix for Firefox59 and PointerEvent standard compatibility)
|
1525 |
+
$(slider.originalClickTarget).trigger({
|
1526 |
+
type: 'click',
|
1527 |
+
button: slider.originalClickButton,
|
1528 |
+
buttons: slider.originalClickButtons
|
1529 |
+
});
|
1530 |
+
}
|
1531 |
+
};
|
1532 |
+
|
1533 |
+
/**
|
1534 |
+
* Window resize event callback
|
1535 |
+
*/
|
1536 |
+
var resizeWindow = function (e) {
|
1537 |
+
// don't do anything if slider isn't initialized.
|
1538 |
+
if (!slider.initialized) {
|
1539 |
+
if (slider.debug) console.log(slider.logAs, 'slider not initialized');
|
1540 |
+
return;
|
1541 |
+
}
|
1542 |
+
// Delay if slider working.
|
1543 |
+
if (slider.working) {
|
1544 |
+
if (slider.debug) console.log(slider.logAs, 'slider working');
|
1545 |
+
window.setTimeout(resizeWindow, 10);
|
1546 |
+
} else {
|
1547 |
+
// update all dynamic elements
|
1548 |
+
el.redrawSlider();
|
1549 |
+
// Call user resize handler
|
1550 |
+
slider.settings.onSliderResize.call(el, slider.active.index);
|
1551 |
+
}
|
1552 |
+
};
|
1553 |
+
|
1554 |
+
/**
|
1555 |
+
* Adds an aria-hidden=true attribute to each element
|
1556 |
+
*
|
1557 |
+
* @param startVisibleIndex (int)
|
1558 |
+
* - the first visible element's index
|
1559 |
+
*/
|
1560 |
+
var applyAriaHiddenAttributes = function (startVisibleIndex) {
|
1561 |
+
var numberOfSlidesShowing = getNumberSlidesShowing2();
|
1562 |
+
// only apply attributes if the setting is enabled
|
1563 |
+
if (slider.settings.ariaHidden) {
|
1564 |
+
// add aria-hidden=true to all elements
|
1565 |
+
slider.children.attr('aria-hidden', 'true');
|
1566 |
+
// get the visible elements and change to aria-hidden=false
|
1567 |
+
slider.children.slice(startVisibleIndex, startVisibleIndex + numberOfSlidesShowing).attr('aria-hidden', 'false');
|
1568 |
+
}
|
1569 |
+
};
|
1570 |
+
|
1571 |
+
/**
|
1572 |
+
* Returns index according to present page range
|
1573 |
+
*
|
1574 |
+
* @param slideIndex (int)
|
1575 |
+
* - the desired slide index
|
1576 |
+
*/
|
1577 |
+
var setSlideIndex = function (slideIndex) {
|
1578 |
+
if (slideIndex < 0) {
|
1579 |
+
if (slider.settings.infiniteLoop) {
|
1580 |
+
return getPagerQty() - 1;
|
1581 |
+
}
|
1582 |
+
else {
|
1583 |
+
//we don't go to undefined slides
|
1584 |
+
return slider.active.index;
|
1585 |
+
}
|
1586 |
+
// if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
|
1587 |
+
} else if (slideIndex >= getPagerQty()) {
|
1588 |
+
if (slider.settings.infiniteLoop) {
|
1589 |
+
return 0;
|
1590 |
+
} else {
|
1591 |
+
//we don't move to undefined pages
|
1592 |
+
return slider.active.index;
|
1593 |
+
}
|
1594 |
+
// set active index to requested slide
|
1595 |
+
} else {
|
1596 |
+
return slideIndex;
|
1597 |
+
}
|
1598 |
+
};
|
1599 |
+
|
1600 |
+
/**
|
1601 |
+
* ===================================================================================
|
1602 |
+
* = PUBLIC FUNCTIONS
|
1603 |
+
* ===================================================================================
|
1604 |
+
*/
|
1605 |
+
|
1606 |
+
/**
|
1607 |
+
* Performs slide transition to the specified slide
|
1608 |
+
*
|
1609 |
+
* @param slideIndex (int)
|
1610 |
+
* - the destination slide's index (zero-based)
|
1611 |
+
*
|
1612 |
+
* @param direction (string)
|
1613 |
+
* - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
|
1614 |
+
*/
|
1615 |
+
el.goToSlide = function (slideIndex, direction) {
|
1616 |
+
// onSlideBefore, onSlideNext, onSlidePrev callbacks
|
1617 |
+
// Allow transition canceling based on returned value
|
1618 |
+
var performTransition = true,
|
1619 |
+
moveBy = 0,
|
1620 |
+
position = {left: 0, top: 0},
|
1621 |
+
lastChild = null,
|
1622 |
+
lastShowingIndex, eq, value, requestEl;
|
1623 |
+
// store the old index
|
1624 |
+
slider.oldIndex = slider.active.index;
|
1625 |
+
//set new index
|
1626 |
+
slider.active.index = setSlideIndex(slideIndex);
|
1627 |
+
|
1628 |
+
// if plugin is currently in motion, ignore request
|
1629 |
+
if (slider.working || slider.active.index === slider.oldIndex) {
|
1630 |
+
return;
|
1631 |
+
}
|
1632 |
+
// declare that plugin is in motion
|
1633 |
+
slider.working = true;
|
1634 |
+
|
1635 |
+
performTransition = slider.settings.onSlideBefore.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
|
1636 |
+
|
1637 |
+
// If transitions canceled, reset and return
|
1638 |
+
if (typeof (performTransition) !== 'undefined' && !performTransition) {
|
1639 |
+
slider.active.index = slider.oldIndex; // restore old index
|
1640 |
+
slider.working = false; // is not in motion
|
1641 |
+
return;
|
1642 |
+
}
|
1643 |
+
|
1644 |
+
if (direction === 'next') {
|
1645 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1646 |
+
if (!slider.settings.onSlideNext.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1647 |
+
performTransition = false;
|
1648 |
+
}
|
1649 |
+
}
|
1650 |
+
else if (direction === 'prev') {
|
1651 |
+
// Prevent canceling in future functions or lack there-of from negating previous commands to cancel
|
1652 |
+
if (!slider.settings.onSlidePrev.call(el, slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index)) {
|
1653 |
+
performTransition = false;
|
1654 |
+
}
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
// check if last slide
|
1658 |
+
slider.active.last = slider.active.index >= getPagerQty() - 1;
|
1659 |
+
|
1660 |
+
// update the pager with active class
|
1661 |
+
if (slider.settings.pager || slider.settings.pagerCustom) {
|
1662 |
+
updatePagerActive(slider.active.index);
|
1663 |
+
}
|
1664 |
+
|
1665 |
+
// // check for direction control update
|
1666 |
+
if (slider.settings.controls) { updateDirectionControls(); }
|
1667 |
+
// if slider is set to mode: "fade"
|
1668 |
+
if (slider.settings.mode === 'fade') {
|
1669 |
+
|
1670 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1671 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1672 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1673 |
+
}
|
1674 |
+
|
1675 |
+
// fade out the visible child and reset its z-index value
|
1676 |
+
slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
|
1677 |
+
|
1678 |
+
// fade in the newly requested slide
|
1679 |
+
slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex + 1).fadeIn(slider.settings.speed, function () {
|
1680 |
+
$(this).css('zIndex', slider.settings.slideZIndex);
|
1681 |
+
updateAfterSlideTransition();
|
1682 |
+
});
|
1683 |
+
|
1684 |
+
// slider mode is not "fade"
|
1685 |
+
} else {
|
1686 |
+
|
1687 |
+
// if adaptiveHeight is true and next height is different from current height, animate to the new height
|
1688 |
+
if (slider.settings.adaptiveHeight && slider.viewport.height() !== getViewportHeight()) {
|
1689 |
+
slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
// if carousel and not infinite loop
|
1693 |
+
if (!slider.settings.infiniteLoop && slider.carousel && slider.active.last) {
|
1694 |
+
|
1695 |
+
if (slider.settings.mode === 'horizontal') {
|
1696 |
+
// get the last child position
|
1697 |
+
lastChild = slider.children.eq(slider.children.length - 1);
|
1698 |
+
position = lastChild.position();
|
1699 |
+
// calculate the position of the last slide
|
1700 |
+
moveBy = slider.viewport.width() - lastChild.outerWidth();
|
1701 |
+
}
|
1702 |
+
else {
|
1703 |
+
// get last showing index position
|
1704 |
+
lastShowingIndex = slider.children.length - slider.settings.minSlides;
|
1705 |
+
position = slider.children.eq(lastShowingIndex).position();
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
// horizontal carousel, going previous while on first slide (infiniteLoop mode)
|
1709 |
+
} else if (slider.carousel && slider.active.last && direction === 'prev') {
|
1710 |
+
|
1711 |
+
// get the last child position
|
1712 |
+
eq = slider.settings.moveSlides === 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
|
1713 |
+
lastChild = el.children('.wpmslider-clone').eq(eq);
|
1714 |
+
position = lastChild.position();
|
1715 |
+
|
1716 |
+
// if infinite loop and "Next" is clicked on the last slide
|
1717 |
+
} else if (direction === 'next' && slider.active.index === 0) {
|
1718 |
+
|
1719 |
+
// get the last clone position
|
1720 |
+
position = el.find('> .wpmslider-clone').eq(slider.settings.maxSlides).position();
|
1721 |
+
slider.active.last = false;
|
1722 |
+
|
1723 |
+
// normal non-zero requests
|
1724 |
+
} else if (slideIndex >= 0) {
|
1725 |
+
|
1726 |
+
//parseInt is applied to allow floats for slides/page
|
1727 |
+
requestEl = slideIndex * parseInt(getMoveBy());
|
1728 |
+
position = slider.children.eq(requestEl).position();
|
1729 |
+
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
/* If the position doesn't exist
|
1733 |
+
* (e.g. if you destroy the slider on a next click),
|
1734 |
+
* it doesn't throw an error.
|
1735 |
+
*/
|
1736 |
+
if (typeof (position) !== 'undefined') {
|
1737 |
+
value = slider.settings.mode === 'horizontal' ? -(position.left - moveBy) : -position.top;
|
1738 |
+
// plugin values to be animated
|
1739 |
+
setPositionProperty(value, 'slide', slider.settings.speed);
|
1740 |
+
|
1741 |
+
}
|
1742 |
+
|
1743 |
+
}
|
1744 |
+
|
1745 |
+
if (slider.settings.ariaHidden) { applyAriaHiddenAttributes(slider.active.index * getMoveBy()); }
|
1746 |
+
};
|
1747 |
+
|
1748 |
+
/**
|
1749 |
+
* Transitions to the next slide in the show
|
1750 |
+
*/
|
1751 |
+
el.goToNextSlide = function () {
|
1752 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1753 |
+
if (!slider.settings.infiniteLoop && slider.active.last) { return; }
|
1754 |
+
if (slider.working === true){ return ; }
|
1755 |
+
var pagerIndex = parseInt(slider.active.index) + 1;
|
1756 |
+
el.goToSlide(pagerIndex, 'next');
|
1757 |
+
};
|
1758 |
+
|
1759 |
+
/**
|
1760 |
+
* Transitions to the prev slide in the show
|
1761 |
+
*/
|
1762 |
+
el.goToPrevSlide = function () {
|
1763 |
+
// if infiniteLoop is false and last page is showing, disregard call
|
1764 |
+
if (!slider.settings.infiniteLoop && slider.active.index === 0) { return; }
|
1765 |
+
if (slider.working === true){ return ;}
|
1766 |
+
var pagerIndex = parseInt(slider.active.index) - 1;
|
1767 |
+
el.goToSlide(pagerIndex, 'prev');
|
1768 |
+
};
|
1769 |
+
|
1770 |
+
/**
|
1771 |
+
* Starts the auto show
|
1772 |
+
*
|
1773 |
+
* @param preventControlUpdate (boolean)
|
1774 |
+
* - if true, auto controls state will not be updated
|
1775 |
+
*/
|
1776 |
+
el.startAuto = function (preventControlUpdate) {
|
1777 |
+
// if an interval already exists, disregard call
|
1778 |
+
if (slider.interval) {
|
1779 |
+
return;
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
// create an interval
|
1783 |
+
slider.interval = setInterval(function () {
|
1784 |
+
if (slider.settings.autoDirection === 'next') {
|
1785 |
+
el.goToNextSlide();
|
1786 |
+
}
|
1787 |
+
else {
|
1788 |
+
el.goToPrevSlide();
|
1789 |
+
}
|
1790 |
+
}, slider.settings.pause);
|
1791 |
+
// callback for when the auto rotate status changes
|
1792 |
+
slider.settings.onAutoChange.call(el, true);
|
1793 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1794 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) {
|
1795 |
+
updateAutoControls('stop');
|
1796 |
+
}
|
1797 |
+
};
|
1798 |
+
|
1799 |
+
/**
|
1800 |
+
* Stops the auto show
|
1801 |
+
*
|
1802 |
+
* @param preventControlUpdate (boolean)
|
1803 |
+
* - if true, auto controls state will not be updated
|
1804 |
+
*/
|
1805 |
+
el.stopAuto = function (preventControlUpdate) {
|
1806 |
+
// if slider is auto paused, just clear that state
|
1807 |
+
if (slider.autoPaused) slider.autoPaused = false;
|
1808 |
+
// if no interval exists, disregard call
|
1809 |
+
if (!slider.interval) { return; }
|
1810 |
+
// clear the interval
|
1811 |
+
clearInterval(slider.interval);
|
1812 |
+
slider.interval = null;
|
1813 |
+
// callback for when the auto rotate status changes
|
1814 |
+
slider.settings.onAutoChange.call(el, false);
|
1815 |
+
// if auto controls are displayed and preventControlUpdate is not true
|
1816 |
+
if (slider.settings.autoControls && preventControlUpdate !== true) { updateAutoControls('start'); }
|
1817 |
+
//clearInterval(el.visibilityInterval);
|
1818 |
+
};
|
1819 |
+
|
1820 |
+
/**
|
1821 |
+
* Returns current slide index (zero-based)
|
1822 |
+
*/
|
1823 |
+
el.getCurrentSlide = function () {
|
1824 |
+
return slider.active.index;
|
1825 |
+
};
|
1826 |
+
|
1827 |
+
/**
|
1828 |
+
* Returns current slide element
|
1829 |
+
*/
|
1830 |
+
el.getCurrentSlideElement = function () {
|
1831 |
+
return slider.children.eq(slider.active.index);
|
1832 |
+
};
|
1833 |
+
|
1834 |
+
/**
|
1835 |
+
* Returns a slide element
|
1836 |
+
* @param index (int)
|
1837 |
+
* - The index (zero-based) of the element you want returned.
|
1838 |
+
*/
|
1839 |
+
el.getSlideElement = function (index) {
|
1840 |
+
return slider.children.eq(index);
|
1841 |
+
};
|
1842 |
+
|
1843 |
+
/**
|
1844 |
+
* Returns number of slides in show
|
1845 |
+
*/
|
1846 |
+
el.getSlideCount = function () {
|
1847 |
+
return slider.children.length;
|
1848 |
+
};
|
1849 |
+
|
1850 |
+
/**
|
1851 |
+
* Return slider.working variable
|
1852 |
+
*/
|
1853 |
+
el.isWorking = function () {
|
1854 |
+
return slider.working;
|
1855 |
+
};
|
1856 |
+
|
1857 |
+
/**
|
1858 |
+
* Update all dynamic slider elements
|
1859 |
+
*/
|
1860 |
+
el.redrawSlider = function () {
|
1861 |
+
if (slider.debug) console.log(slider.logAs, 'redrawSlider');
|
1862 |
+
|
1863 |
+
// maybe set/revert carousel
|
1864 |
+
updateWidth();
|
1865 |
+
|
1866 |
+
// adjust the height
|
1867 |
+
unsetSlideHeight();
|
1868 |
+
setViewportHeight();
|
1869 |
+
|
1870 |
+
// if stretch, set t-slide height to 100%
|
1871 |
+
if (slider.settings.stretch) {
|
1872 |
+
setSlideHeight();
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
// resize all children in ratio to new screen size
|
1876 |
+
slider.children.add(el.find('.wpmslider-clone')).outerWidth(getSlideWidth2());
|
1877 |
+
|
1878 |
+
// update the slide position
|
1879 |
+
setSlidePosition();
|
1880 |
+
|
1881 |
+
// if active.last was true before the screen resize, we want
|
1882 |
+
// to keep it last no matter what screen size we end on
|
1883 |
+
if (slider.active.last) {
|
1884 |
+
slider.active.index = getPagerQty() - 1;
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
// if the active index (page) no longer exists due to the resize, simply set the index as last
|
1888 |
+
if (slider.active.index >= getPagerQty()) {
|
1889 |
+
slider.active.last = true;
|
1890 |
+
}
|
1891 |
+
|
1892 |
+
// if a pager is being displayed and a custom pager is not being used, update it
|
1893 |
+
if (slider.settings.pager && !slider.settings.pagerCustom) {
|
1894 |
+
populatePager();
|
1895 |
+
updatePagerActive(slider.active.index);
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
if (slider.settings.ariaHidden) {
|
1899 |
+
applyAriaHiddenAttributes(slider.active.index * getMoveBy());
|
1900 |
+
}
|
1901 |
+
};
|
1902 |
+
|
1903 |
+
/**
|
1904 |
+
* Destroy the current instance of the slider (revert everything back to original state)
|
1905 |
+
*/
|
1906 |
+
el.destroySlider = function () {
|
1907 |
+
// don't do anything if slider has already been destroyed
|
1908 |
+
if (!slider.initialized) {
|
1909 |
+
return;
|
1910 |
+
}
|
1911 |
+
slider.initialized = false;
|
1912 |
+
$('.wpmslider-clone', this).remove();
|
1913 |
+
|
1914 |
+
slider.children.each(function () {
|
1915 |
+
if ($(this).data('origStyle') !== undefined) {
|
1916 |
+
$(this).attr('style', $(this).data('origStyle'));
|
1917 |
+
} else {
|
1918 |
+
$(this).removeAttr('style');
|
1919 |
+
}
|
1920 |
+
});
|
1921 |
+
|
1922 |
+
if ($(this).data('origStyle') !== undefined) {
|
1923 |
+
this.attr('style', $(this).data('origStyle'));
|
1924 |
+
} else {
|
1925 |
+
$(this).removeAttr('style');
|
1926 |
+
}
|
1927 |
+
|
1928 |
+
$(this).unwrap().unwrap();
|
1929 |
+
|
1930 |
+
if (slider.controls.el) {
|
1931 |
+
slider.controls.el.remove();
|
1932 |
+
}
|
1933 |
+
if (slider.controls.next) {
|
1934 |
+
slider.controls.next.remove();
|
1935 |
+
}
|
1936 |
+
if (slider.controls.prev) {
|
1937 |
+
slider.controls.prev.remove();
|
1938 |
+
}
|
1939 |
+
if (slider.pagerEl && slider.settings.controls && !slider.settings.pagerCustom) { slider.pagerEl.remove(); }
|
1940 |
+
|
1941 |
+
$('.wpmslider-caption', this).remove();
|
1942 |
+
|
1943 |
+
if (slider.controls.autoEl) {
|
1944 |
+
slider.controls.autoEl.remove();
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
clearInterval(slider.interval);
|
1948 |
+
clearInterval(slider.visibilityInterval);
|
1949 |
+
|
1950 |
+
if (slider.settings.responsive) {
|
1951 |
+
$(window).off('resize', resizeWindow);
|
1952 |
+
}
|
1953 |
+
|
1954 |
+
if (slider.settings.keyboardEnabled) {
|
1955 |
+
$(document).off('keydown', keyPress);
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
//remove self reference in data
|
1959 |
+
$(this).removeData('strongSlider');
|
1960 |
+
};
|
1961 |
+
|
1962 |
+
/**
|
1963 |
+
* Reload the slider (revert all DOM changes, and re-initialize)
|
1964 |
+
*/
|
1965 |
+
el.reloadSlider = function (settings) {
|
1966 |
+
if (settings !== undefined) {
|
1967 |
+
options = settings;
|
1968 |
+
}
|
1969 |
+
el.destroySlider();
|
1970 |
+
init();
|
1971 |
+
// store reference to self in order to access public functions later
|
1972 |
+
$(el).data('strongSlider', this);
|
1973 |
+
};
|
1974 |
+
|
1975 |
+
// Fire it up!
|
1976 |
+
init();
|
1977 |
+
|
1978 |
+
// Store reference to self in order to access public functions later
|
1979 |
+
$(el).data('strongSlider', this);
|
1980 |
+
|
1981 |
+
// Set initialized flag on container
|
1982 |
+
viewEl.attr('data-state', 'init');
|
1983 |
+
|
1984 |
+
if (slider.debug) console.log(slider.logAs, 'viewport', verge.viewportW(), 'x', verge.viewportH());
|
1985 |
+
|
1986 |
+
// returns the current jQuery object
|
1987 |
+
return this;
|
1988 |
+
};
|
1989 |
+
|
1990 |
+
})(jQuery);
|
public/js/lib/strongslider/jquery.strongslider.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function($){var defaults={debug:false,logAs:"strongSlider",compat:{lazyload:{active:false,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:true,hideControlOnEnd:false,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:false,captions:false,adaptiveHeight:false,adaptiveHeightSpeed:500,video:false,useCSS:true,preloadImages:"visible",responsive:true,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:false,imagesLoaded:true,touchEnabled:true,swipeThreshold:50,oneToOneTouch:true,preventDefaultSwipeX:true,preventDefaultSwipeY:false,ariaLive:true,ariaHidden:true,keyboardEnabled:false,pager:true,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:true,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:false,startText:"Start",stopText:"Stop",autoControlsCombine:false,autoControlsSelector:null,auto:true,pause:4e3,autoStart:true,autoDirection:"next",stopAutoOnClick:false,autoHover:false,autoDelay:0,autoSlideForOnePage:false,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return true},onSlideBefore:function(){return true},onSlideAfter:function(){return true},onSlideNext:function(){return true},onSlidePrev:function(){return true},onSliderResize:function(){return true},onAutoChange:function(){return true}};$.fn.strongSlider=function(options){if(this.length===0){return this}var slider={},viewEl=this,el=this.find(".wpmslider-content");if($(el).data("strongSlider")){return}var init=function(){if($(el).data("strongSlider")){return}slider.visibilityInterval=0;slider.hidden=false;var sliderVar=viewEl.data("slider-var");var config={};if(typeof window[sliderVar]!=="undefined"){config=window[sliderVar].config}slider.settings=$.extend({},defaults,config,options);slider.debug=slider.settings.debug;slider.logAs=slider.settings.logAs;if(slider.debug)console.log(slider.logAs,"slider.settings",slider.settings);slider.children=el.children(slider.settings.slideSelector);if(slider.children.length<slider.settings.minSlides){slider.settings.minSlides=slider.children.length}if(slider.children.length<slider.settings.maxSlides){slider.settings.maxSlides=slider.children.length}if(slider.settings.randomStart){slider.settings.startSlide=Math.floor(Math.random()*slider.children.length)}slider.active={index:slider.settings.startSlide};setBreakpoint();if(slider.carousel){slider.settings.preloadImages="all"}slider.working=false;slider.controls={};slider.interval=null;slider.animProp=slider.settings.mode==="vertical"?"top":"left";slider.usingCSS=slider.settings.useCSS&&slider.settings.mode!=="fade"&&function(){var div=document.createElement("div"),props=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i=0;i<props.length;i++){if(div.style[props[i]]!==undefined){slider.cssPrefix=props[i].replace("Perspective","").toLowerCase();slider.animProp="-"+slider.cssPrefix+"-transform";return true}}return false}();if(slider.settings.mode==="vertical"){slider.settings.maxSlides=slider.settings.minSlides}el.data("origStyle",el.attr("style"));el.children(slider.settings.slideSelector).each(function(){$(this).data("origStyle",$(this).attr("style"))});if(!el.getSlideCount()){return}if(slider.settings.imagesLoaded){viewEl.imagesLoaded(function(){initVisibilityCheck()})}else{initVisibilityCheck()}};var reallyVisible=function(){return viewEl.is(":visible")&&viewEl.css("visibility")!=="hidden"};var compatCheck=function(){if(slider.settings.compat.lazyload){var inProgress=false;for(var i=0,len=slider.settings.compat.lazyload.classes.length;i<len;i++){var startClass=slider.settings.compat.lazyload.classes[i].start;var finishClass=slider.settings.compat.lazyload.classes[i].finish;if(startClass&&finishClass){if(viewEl.find("img."+startClass).length&&!viewEl.find("img."+finishClass).length){inProgress=true}}else if(startClass){if(viewEl.find("img."+startClass).length){inProgress=true}}else if(finishClass){if(!viewEl.find("img."+finishClass).length){inProgress=true}}}if(inProgress){if(slider.debug)console.log(slider.logAs,"lazy loading...");return false}}if(slider.debug)console.log(slider.logAs,"compat check complete");return true};var initVisibilityCheck=function(){if(reallyVisible()&&compatCheck()){clearInterval(slider.visibilityInterval);setup()}else{if(slider.visibilityInterval===0){slider.visibilityInterval=setInterval(initVisibilityCheck,1e3*4)}}};var setup=function(){var preloadSelector=slider.children.eq(slider.settings.startSlide);el.wrap('<div class="'+slider.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>');slider.viewport=el.parent();if(slider.settings.ariaLive){slider.viewport.attr("aria-live","polite")}slider.loader=$('<div class="wpmslider-loading" />');slider.viewport.prepend(slider.loader);el.css({width:slider.settings.mode==="horizontal"?slider.children.length*1e3+215+"%":"auto",position:"relative"});if(slider.usingCSS&&slider.settings.easing){el.css("-"+slider.cssPrefix+"-transition-timing-function",slider.settings.easing)}else if(!slider.settings.easing){slider.settings.easing="swing"}slider.viewport.css({width:"100%",overflow:"hidden",position:"relative"});slider.viewport.parent().css({maxWidth:getViewportMaxWidth2()});if(!slider.settings.pager&&!slider.settings.controls){slider.viewport.parent().css({margin:"0 auto"})}slider.children.css({float:slider.settings.mode==="horizontal"?"left":"none",listStyle:"none",position:"relative"});updateWidth();if(slider.settings.mode==="horizontal"&&slider.settings.slideMargin>0){slider.children.css("marginRight",slider.settings.slideMargin)}if(slider.settings.mode==="vertical"&&slider.settings.slideMargin>0){slider.children.css("marginBottom",slider.settings.slideMargin)}if(slider.settings.mode==="fade"){slider.children.css({position:"absolute",zIndex:0,display:"none"});slider.children.eq(slider.settings.startSlide).css({zIndex:slider.settings.slideZIndex,display:"block"})}else{slider.children.css({display:"block"})}slider.controls.el=$('<div class="wpmslider-controls" />');if(slider.settings.captions){appendCaptions()}slider.active.last=slider.settings.startSlide===getPagerQty()-1;if(slider.settings.video){el.fitVids()}if(slider.settings.preloadImages==="none"){preloadSelector=null}else if(slider.settings.preloadImages==="all"){preloadSelector=slider.children}if(slider.settings.controls){appendControlPrev()}if(slider.settings.auto&&slider.settings.autoControls){appendControlsAuto()}if(slider.settings.pager){appendPager()}if(slider.settings.controls){appendControlNext()}if(slider.settings.controls||slider.settings.autoControls||slider.settings.pager){slider.viewport.after(slider.controls.el)}if(preloadSelector===null){start()}else{loadElements(preloadSelector,start)}};var setBreakpoint=function(){if(slider.debug)console.log(slider.logAs,"setBreakpoint");var currentBreakpoint=slider.settings.breakpoints.single;var breakpoints=slider.settings.breakpoints.multiple;if(slider.settings.type==="show_multiple"){for(var key in breakpoints){if(breakpoints.hasOwnProperty(key)){if(verge.viewportW()>=breakpoints[key].width){currentBreakpoint=breakpoints[key];break}}}}if(slider.debug)console.log("current breakpoint",currentBreakpoint);slider.settings.maxSlides=currentBreakpoint.maxSlides;slider.settings.moveSlides=currentBreakpoint.moveSlides;slider.settings.slideMargin=currentBreakpoint.slideMargin;slider.carousel=slider.settings.minSlides>1||slider.settings.maxSlides>1};var updateWidth=function(){setBreakpoint();slider.children.css("width",getSlideWidth2())};var loadElements=function(selector,callback){var total=selector.find('img:not([src=""]), iframe').length,count=0;if(total===0){callback();return}selector.find('img:not([src=""]), iframe').each(function(){$(this).one("load error",function(){if(++count===total){callback()}}).each(function(){if(this.complete||this.src===""){$(this).trigger("load")}})})};var start=function(){if(slider.settings.infiniteLoop&&slider.settings.mode!=="fade"){var slice=slider.settings.mode==="vertical"?slider.settings.minSlides:slider.settings.maxSlides,sliceAppend=slider.children.slice(0,slice).clone(true).addClass("wpmslider-clone"),slicePrepend=slider.children.slice(-slice).clone(true).addClass("wpmslider-clone");if(slider.settings.ariaHidden){sliceAppend.attr("aria-hidden",true);slicePrepend.attr("aria-hidden",true)}el.append(sliceAppend).prepend(slicePrepend)}slider.loader.remove();if(slider.settings.mode==="vertical"){slider.settings.adaptiveHeight=true}el.redrawSlider();slider.settings.onSliderLoad.call(el,slider.active.index);slider.initialized=true;slider.visibilityInterval=setInterval(visibilityCheck,500);if(slider.settings.responsive){attachListeners()}if(slider.settings.auto&&slider.settings.autoStart&&(getPagerQty()>1||slider.settings.autoSlideForOnePage)){initAuto()}if(slider.settings.pager){updatePagerActive(slider.settings.startSlide)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.touchEnabled){initTouch()}if(slider.settings.keyboardEnabled){$(document).keydown(keyPress)}};var attachListeners=function(){window.addEventListener("resize",updateLayout,false);window.addEventListener("orientationchange",updateLayout,false);window.addEventListener("toggleFullContent",updateLayout,false);window.addEventListener("blur",function(){pauseEvent("blur")});window.addEventListener("focus",function(){playEvent("blur")})};var updateLayout=_.debounce(function(){if(slider.debug)console.log(slider.logAs,"updateLayout");resizeWindow()},250);var visibilityCheck=function(){if(!slider.settings.auto){return}if(!reallyVisible()){pauseEvent("hide")}else{playEvent("hide")}if(!verge.inViewport(el)){pauseEvent("scroll")}else{playEvent("scroll")}};var pauseEvent=function(action){if(slider.interval){el.stopAuto(true);slider.autoPaused=action;if(slider.debug)console.log(slider.logAs,"pause",action)}};var playEvent=function(action){if(slider.autoPaused===action){el.startAuto(true);slider.autoPaused=null;if(slider.debug)console.log(slider.logAs,"play",action)}};var setSlideHeight=function(){var heights=slider.children.map(function(){return jQuery(this).actual("outerHeight")}).get();var maxHeight=arrayMax(heights);slider.children.height(maxHeight)};var unsetSlideHeight=function(){slider.children.height("auto")};var arrayMax=function(array){return Math.max.apply(Math,array)};var getViewportHeight=function(){var height=0;var children=$();if(slider.settings.mode!=="vertical"&&!slider.settings.adaptiveHeight){children=slider.children}else{if(!slider.carousel){children=slider.children.eq(slider.active.index)}else{var currentIndex=slider.settings.moveSlides===1?slider.active.index:slider.active.index*getMoveBy();children=slider.children.eq(currentIndex);for(var i=1;i<=slider.settings.maxSlides-1;i++){if(currentIndex+i>=slider.children.length){children=children.add(slider.children.eq(i-1))}else{children=children.add(slider.children.eq(currentIndex+i))}}}}if(slider.settings.mode==="vertical"){children.each(function(index){height+=$(this).outerHeight()});if(slider.settings.slideMargin>0){height+=slider.settings.slideMargin*(slider.settings.minSlides-1)}}else{height=Math.max.apply(Math,children.map(function(){return $(this).outerHeight(false)}).get())}if(slider.viewport.css("box-sizing")==="border-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))+parseFloat(slider.viewport.css("border-top-width"))+parseFloat(slider.viewport.css("border-bottom-width"))}else if(slider.viewport.css("box-sizing")==="padding-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))}return height};var setViewportHeight=function(){slider.viewport.height(getViewportHeight()+2)};var getViewportMaxWidth2=function(){return"100%"};var getSlideWidth2=function(){var wrapWidth=slider.viewport.width();var margins=slider.settings.slideMargin*(slider.settings.maxSlides-1);return Math.floor((wrapWidth-margins)/slider.settings.maxSlides)};var getNumberSlidesShowing2=function(){return slider.settings.maxSlides};var getPagerQty=function(){var pagerQty=0,breakPoint=0,counter=0;if(slider.settings.moveSlides>0){if(slider.settings.infiniteLoop){pagerQty=Math.ceil(slider.children.length/getMoveBy())}else{while(breakPoint<slider.children.length){++pagerQty;breakPoint=counter+getNumberSlidesShowing2();counter+=slider.settings.moveSlides<=getNumberSlidesShowing2()?slider.settings.moveSlides:getNumberSlidesShowing2()}return counter}}else{pagerQty=Math.ceil(slider.children.length/getNumberSlidesShowing2())}return pagerQty};var getMoveBy=function(){if(slider.settings.moveSlides>0&&slider.settings.moveSlides<=getNumberSlidesShowing2()){return slider.settings.moveSlides}return getNumberSlidesShowing2()};var setSlidePosition=function(){var position,lastChild,lastShowingIndex;if(slider.children.length>slider.settings.maxSlides&&slider.active.last&&!slider.settings.infiniteLoop){if(slider.settings.mode==="horizontal"){lastChild=slider.children.last();position=lastChild.position();setPositionProperty(-(position.left-(slider.viewport.width()-lastChild.outerWidth())),"reset",0)}else if(slider.settings.mode==="vertical"){lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position();setPositionProperty(-position.top,"reset",0)}}else{position=slider.children.eq(slider.active.index*getMoveBy()).position();if(slider.active.index===getPagerQty()-1){slider.active.last=true}if(position!==undefined){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}else if(slider.settings.mode==="none"){setPositionProperty(-position.top,"reset",0)}}}};var setPositionProperty=function(value,type,duration,params){var animateObj,propValue;if(slider.usingCSS){if(slider.settings.mode==="vertical"){propValue="translateY("+value+"px)"}else if(slider.settings.mode==="horizontal"){propValue="translateX("+value+"px"}else if(slider.settings.mode==="none"){propValue="translateY("+value+"px)";duration=0}el.css("-"+slider.cssPrefix+"-transition-duration",duration/1e3+"s");if(type==="slide"){el.css(slider.animProp,propValue);if(duration!==0){el.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){if(!$(e.target).is(el)){return}el.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");updateAfterSlideTransition()})}else{updateAfterSlideTransition()}}else if(type==="reset"){el.css(slider.animProp,propValue)}}else{animateObj={};animateObj[slider.animProp]=value;if(type==="slide"){el.animate(animateObj,duration,slider.settings.easing,function(){updateAfterSlideTransition()})}else if(type==="reset"){el.css(slider.animProp,value)}}};var populatePager=function(){var pagerHtml="",linkContent="",pagerQty=getPagerQty();for(var i=0;i<pagerQty;i++){linkContent="";if(slider.settings.buildPager){if(slider.settings.buildPager==="icons"){linkContent=""}if($.isFunction(slider.settings.buildPager)||slider.settings.pagerCustom){linkContent=slider.settings.buildPager(i)}slider.pagerEl.addClass("wpmslider-custom-pager")}else{linkContent=i+1;slider.pagerEl.addClass("wpmslider-default-pager")}pagerHtml+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+i+'" class="wpmslider-pager-link">'+linkContent+"</a></div>"}slider.pagerEl.html(pagerHtml)};var appendPager=function(){if(!slider.settings.pagerCustom){slider.pagerEl=$('<div class="wpmslider-pager" />');if(slider.settings.pagerSelector){$(slider.settings.pagerSelector).html(slider.pagerEl)}else{slider.controls.el.addClass("wpmslider-has-pager").append(slider.pagerEl)}populatePager()}else{slider.pagerEl=$(slider.settings.pagerCustom)}slider.pagerEl.on("click touchend","a",clickPagerBind)};var appendControlPrev=function(){slider.controls.prev=$('<a class="wpmslider-prev" href="">'+slider.settings.prevText+"</a>");slider.controls.prev.on("click touchend",clickPrevBind);if(slider.settings.prevSelector){$(slider.settings.prevSelector).append(slider.controls.prev)}if(!slider.settings.prevSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.prev);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlNext=function(){slider.controls.next=$('<a class="wpmslider-next" href="">'+slider.settings.nextText+"</a>");slider.controls.next.on("click touchend",clickNextBind);if(slider.settings.nextSelector){$(slider.settings.nextSelector).append(slider.controls.next)}if(!slider.settings.nextSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.next);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlsAuto=function(){slider.controls.start=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+slider.settings.startText+"</a></div>");slider.controls.stop=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+slider.settings.stopText+"</a></div>");slider.controls.autoEl=$('<div class="wpmslider-controls-auto" />');slider.controls.autoEl.on("click",".wpmslider-start",clickStartBind);slider.controls.autoEl.on("click",".wpmslider-stop",clickStopBind);if(slider.settings.autoControlsCombine){slider.controls.autoEl.append(slider.controls.start)}else{slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop)}if(slider.settings.autoControlsSelector){$(slider.settings.autoControlsSelector).html(slider.controls.autoEl)}else{slider.controls.el.addClass("wpmslider-has-controls-auto").append(slider.controls.autoEl)}updateAutoControls(slider.settings.autoStart?"stop":"start")};var appendCaptions=function(){slider.children.each(function(index){var title=$(this).find("img:first").attr("title");if(title!==undefined&&(""+title).length){$(this).append('<div class="wpmslider-caption"><span>'+title+"</span></div>")}})};var clickNextBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToNextSlide()};var clickPrevBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToPrevSlide()};var clickStartBind=function(e){el.startAuto();e.preventDefault();e.stopPropagation()};var clickStopBind=function(e){el.stopAuto();e.preventDefault();e.stopPropagation()};var clickPagerBind=function(e){var pagerLink,pagerIndex;e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}pagerLink=$(e.currentTarget);if(pagerLink.attr("data-slide-index")!==undefined){pagerIndex=parseInt(pagerLink.attr("data-slide-index"));if(pagerIndex!==slider.active.index){el.goToSlide(pagerIndex)}}};var updatePagerActive=function(slideIndex){var len=slider.children.length;if(slider.settings.pagerType==="short"){if(slider.settings.maxSlides>1){len=Math.ceil(slider.children.length/slider.settings.maxSlides)}slider.pagerEl.html(slideIndex+1+slider.settings.pagerShortSeparator+len);return}slider.pagerEl.find("a").removeClass("active");slider.pagerEl.each(function(i,el){$(el).find("a").eq(slideIndex).addClass("active")})};var updateAfterSlideTransition=function(){if(slider.settings.infiniteLoop){var position="";if(slider.active.index===0){position=slider.children.eq(0).position()}else if(slider.active.index===getPagerQty()-1&&slider.carousel){position=slider.children.eq((getPagerQty()-1)*getMoveBy()).position()}else if(slider.active.index===slider.children.length-1){position=slider.children.eq(slider.children.length-1).position()}if(position){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}}}slider.working=false;slider.settings.onSlideAfter.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)};var updateAutoControls=function(state){if(slider.settings.autoControlsCombine){slider.controls.autoEl.html(slider.controls[state])}else{slider.controls.autoEl.find("a").removeClass("active");slider.controls.autoEl.find("a:not(.wpmslider-"+state+")").addClass("active")}};var updateDirectionControls=function(){if(getPagerQty()===1){slider.controls.prev.addClass("disabled");slider.controls.next.addClass("disabled")}else if(!slider.settings.infiniteLoop&&slider.settings.hideControlOnEnd){if(slider.active.index===0){slider.controls.prev.addClass("disabled");slider.controls.next.removeClass("disabled")}else if(slider.active.index===getPagerQty()-1){slider.controls.next.addClass("disabled");slider.controls.prev.removeClass("disabled")}else{slider.controls.prev.removeClass("disabled");slider.controls.next.removeClass("disabled")}}};var initAuto=function(){if(slider.settings.autoDelay>0){setTimeout(el.startAuto,slider.settings.autoDelay)}else{el.startAuto()}if(slider.settings.autoHover){el.hover(function(){pauseEvent("hover")},function(){playEvent("hover")})}};var keyPress=function(e){var activeElementTag=document.activeElement.tagName.toLowerCase(),tagFilters="input|textarea",p=new RegExp(activeElementTag,["i"]),result=p.exec(tagFilters);if(result===null&&verge.inViewport(el)){if(e.keyCode===39){clickNextBind(e);return false}else if(e.keyCode===37){clickPrevBind(e);return false}}};var initTouch=function(){slider.touch={start:{x:0,y:0},end:{x:0,y:0}};slider.viewport.on("touchstart MSPointerDown pointerdown",onTouchStart);slider.viewport.on("click",".wpmslider a",function(e){if(slider.viewport.hasClass("click-disabled")){e.preventDefault();e.stopPropagation();slider.viewport.removeClass("click-disabled")}})};var onTouchStart=function(e){if(e.type!=="touchstart"&&e.button!==0){return}slider.controls.el.addClass("disabled");if(slider.working){e.preventDefault();e.stopPropagation();slider.controls.el.removeClass("disabled")}else{slider.touch.originalPos=el.position();var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig];var chromePointerEvents=typeof PointerEvent==="function";if(chromePointerEvents){if(orig.pointerId===undefined){return}}slider.touch.start.x=touchPoints[0].pageX;slider.touch.start.y=touchPoints[0].pageY;if(slider.viewport.get(0).setPointerCapture){slider.pointerId=orig.pointerId;slider.viewport.get(0).setPointerCapture(slider.pointerId)}slider.originalClickTarget=orig.originalTarget||orig.target;slider.originalClickButton=orig.button;slider.originalClickButtons=orig.buttons;slider.originalEventType=orig.type;slider.hasMove=false;slider.viewport.on("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.on("touchend MSPointerUp pointerup",onTouchEnd);slider.viewport.on("MSPointerCancel pointercancel",onPointerCancel)}};var onPointerCancel=function(e){e.preventDefault();setPositionProperty(slider.touch.originalPos.left,"reset",0);slider.controls.el.removeClass("disabled");slider.viewport.off("MSPointerCancel pointercancel",onPointerCancel);slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}};var onTouchMove=function(e){var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],xMovement=Math.abs(touchPoints[0].pageX-slider.touch.start.x),yMovement=Math.abs(touchPoints[0].pageY-slider.touch.start.y),value=0,change=0;slider.hasMove=true;if(xMovement*3>yMovement&&slider.settings.preventDefaultSwipeX){e.preventDefault();e.stopPropagation()}else if(yMovement*3>xMovement&&slider.settings.preventDefaultSwipeY){e.preventDefault();e.stopPropagation()}if(e.type!=="touchmove"){e.preventDefault()}if(slider.settings.mode!=="fade"&&slider.settings.oneToOneTouch){if(slider.settings.mode==="horizontal"){change=touchPoints[0].pageX-slider.touch.start.x;value=slider.touch.originalPos.left+change}else{change=touchPoints[0].pageY-slider.touch.start.y;value=slider.touch.originalPos.top+change}setPositionProperty(value,"reset",0)}};var onTouchEnd=function(e){e.preventDefault();slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.controls.el.removeClass("disabled");var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],value=0,distance=0;slider.touch.end.x=touchPoints[0].pageX;slider.touch.end.y=touchPoints[0].pageY;if(slider.settings.mode==="fade"){distance=Math.abs(slider.touch.start.x-slider.touch.end.x);if(distance>=slider.settings.swipeThreshold){if(slider.touch.start.x>slider.touch.end.x){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}}else{if(slider.settings.mode==="horizontal"){distance=slider.touch.end.x-slider.touch.start.x;value=slider.touch.originalPos.left}else{distance=slider.touch.end.y-slider.touch.start.y;value=slider.touch.originalPos.top}if(!slider.settings.infiniteLoop&&(slider.active.index===0&&distance>0||slider.active.last&&distance<0)){setPositionProperty(value,"reset",200)}else{if(Math.abs(distance)>=slider.settings.swipeThreshold){if(distance<0){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}else{setPositionProperty(value,"reset",200)}}}slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}if(slider.hasMove===false&&(slider.originalClickButton===0||slider.originalEventType==="touchstart")){$(slider.originalClickTarget).trigger({type:"click",button:slider.originalClickButton,buttons:slider.originalClickButtons})}};var resizeWindow=function(e){if(!slider.initialized){if(slider.debug)console.log(slider.logAs,"slider not initialized");return}if(slider.working){if(slider.debug)console.log(slider.logAs,"slider working");window.setTimeout(resizeWindow,10)}else{el.redrawSlider();slider.settings.onSliderResize.call(el,slider.active.index)}};var applyAriaHiddenAttributes=function(startVisibleIndex){var numberOfSlidesShowing=getNumberSlidesShowing2();if(slider.settings.ariaHidden){slider.children.attr("aria-hidden","true");slider.children.slice(startVisibleIndex,startVisibleIndex+numberOfSlidesShowing).attr("aria-hidden","false")}};var setSlideIndex=function(slideIndex){if(slideIndex<0){if(slider.settings.infiniteLoop){return getPagerQty()-1}else{return slider.active.index}}else if(slideIndex>=getPagerQty()){if(slider.settings.infiniteLoop){return 0}else{return slider.active.index}}else{return slideIndex}};el.goToSlide=function(slideIndex,direction){var performTransition=true,moveBy=0,position={left:0,top:0},lastChild=null,lastShowingIndex,eq,value,requestEl;slider.oldIndex=slider.active.index;slider.active.index=setSlideIndex(slideIndex);if(slider.working||slider.active.index===slider.oldIndex){return}slider.working=true;performTransition=slider.settings.onSlideBefore.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index);if(typeof performTransition!=="undefined"&&!performTransition){slider.active.index=slider.oldIndex;slider.working=false;return}if(direction==="next"){if(!slider.settings.onSlideNext.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}else if(direction==="prev"){if(!slider.settings.onSlidePrev.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}slider.active.last=slider.active.index>=getPagerQty()-1;if(slider.settings.pager||slider.settings.pagerCustom){updatePagerActive(slider.active.index)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.mode==="fade"){if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}slider.children.filter(":visible").fadeOut(slider.settings.speed).css({zIndex:0});slider.children.eq(slider.active.index).css("zIndex",slider.settings.slideZIndex+1).fadeIn(slider.settings.speed,function(){$(this).css("zIndex",slider.settings.slideZIndex);updateAfterSlideTransition()})}else{if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}if(!slider.settings.infiniteLoop&&slider.carousel&&slider.active.last){if(slider.settings.mode==="horizontal"){lastChild=slider.children.eq(slider.children.length-1);position=lastChild.position();moveBy=slider.viewport.width()-lastChild.outerWidth()}else{lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position()}}else if(slider.carousel&&slider.active.last&&direction==="prev"){eq=slider.settings.moveSlides===1?slider.settings.maxSlides-getMoveBy():(getPagerQty()-1)*getMoveBy()-(slider.children.length-slider.settings.maxSlides);lastChild=el.children(".wpmslider-clone").eq(eq);position=lastChild.position()}else if(direction==="next"&&slider.active.index===0){position=el.find("> .wpmslider-clone").eq(slider.settings.maxSlides).position();slider.active.last=false}else if(slideIndex>=0){requestEl=slideIndex*parseInt(getMoveBy());position=slider.children.eq(requestEl).position()}if(typeof position!=="undefined"){value=slider.settings.mode==="horizontal"?-(position.left-moveBy):-position.top;setPositionProperty(value,"slide",slider.settings.speed)}slider.working=false}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.goToNextSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.last){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)+1;el.goToSlide(pagerIndex,"next")};el.goToPrevSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.index===0){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)-1;el.goToSlide(pagerIndex,"prev")};el.startAuto=function(preventControlUpdate){if(slider.interval){return}slider.interval=setInterval(function(){if(slider.settings.autoDirection==="next"){el.goToNextSlide()}else{el.goToPrevSlide()}},slider.settings.pause);slider.settings.onAutoChange.call(el,true);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("stop")}};el.stopAuto=function(preventControlUpdate){if(slider.autoPaused)slider.autoPaused=false;if(!slider.interval){return}clearInterval(slider.interval);slider.interval=null;slider.settings.onAutoChange.call(el,false);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("start")}};el.getCurrentSlide=function(){return slider.active.index};el.getCurrentSlideElement=function(){return slider.children.eq(slider.active.index)};el.getSlideElement=function(index){return slider.children.eq(index)};el.getSlideCount=function(){return slider.children.length};el.isWorking=function(){return slider.working};el.redrawSlider=function(){if(slider.debug)console.log(slider.logAs,"redrawSlider");updateWidth();unsetSlideHeight();setViewportHeight();if(slider.settings.stretch){setSlideHeight()}slider.children.add(el.find(".wpmslider-clone")).outerWidth(getSlideWidth2());setSlidePosition();if(slider.active.last){slider.active.index=getPagerQty()-1}if(slider.active.index>=getPagerQty()){slider.active.last=true}if(slider.settings.pager&&!slider.settings.pagerCustom){populatePager();updatePagerActive(slider.active.index)}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.destroySlider=function(){if(!slider.initialized){return}slider.initialized=false;$(".wpmslider-clone",this).remove();slider.children.each(function(){if($(this).data("origStyle")!==undefined){$(this).attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}});if($(this).data("origStyle")!==undefined){this.attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}$(this).unwrap().unwrap();if(slider.controls.el){slider.controls.el.remove()}if(slider.controls.next){slider.controls.next.remove()}if(slider.controls.prev){slider.controls.prev.remove()}if(slider.pagerEl&&slider.settings.controls&&!slider.settings.pagerCustom){slider.pagerEl.remove()}$(".wpmslider-caption",this).remove();if(slider.controls.autoEl){slider.controls.autoEl.remove()}clearInterval(slider.interval);clearInterval(slider.visibilityInterval);if(slider.settings.responsive){$(window).off("resize",resizeWindow)}if(slider.settings.keyboardEnabled){$(document).off("keydown",keyPress)}$(this).removeData("strongSlider")};el.reloadSlider=function(settings){if(settings!==undefined){options=settings}el.destroySlider();init();$(el).data("strongSlider",this)};init();$(el).data("strongSlider",this);viewEl.attr("data-state","init");if(slider.debug)console.log(slider.logAs,"viewport",verge.viewportW(),"x",verge.viewportH());return this}})(jQuery);
|
1 |
+
!function(G){var J={debug:!1,logAs:"strongSlider",compat:{lazyload:{active:!1,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:!1,captions:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:!1,imagesLoaded:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!0,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0},onAutoChange:function(){return!0}};G.fn.strongSlider=function(i){if(0===this.length)return this;var g={},o=this,p=this.find(".wpmslider-content");if(!G(p).data("strongSlider")){var t=function(){if(!G(p).data("strongSlider")){g.visibilityInterval=0,g.hidden=!1;var e=o.data("slider-var"),t={};void 0!==window[e]&&(t=window[e].config),g.settings=G.extend({},J,t,i),g.debug=g.settings.debug,g.logAs=g.settings.logAs,g.debug&&console.log(g.logAs,"slider.settings",g.settings),g.children=p.children(g.settings.slideSelector),g.children.length<g.settings.minSlides&&(g.settings.minSlides=g.children.length),g.children.length<g.settings.maxSlides&&(g.settings.maxSlides=g.children.length),g.settings.randomStart&&(g.settings.startSlide=Math.floor(Math.random()*g.children.length)),g.active={index:g.settings.startSlide},r(),g.carousel&&(g.settings.preloadImages="all"),g.working=!1,g.controls={},g.interval=null,g.animProp="vertical"===g.settings.mode?"top":"left",g.usingCSS=g.settings.useCSS&&"fade"!==g.settings.mode&&function(){for(var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<t.length;i++)if(void 0!==e.style[t[i]])return g.cssPrefix=t[i].replace("Perspective","").toLowerCase(),g.animProp="-"+g.cssPrefix+"-transform",!0;return!1}(),"vertical"===g.settings.mode&&(g.settings.maxSlides=g.settings.minSlides),p.data("origStyle",p.attr("style")),p.children(g.settings.slideSelector).each(function(){G(this).data("origStyle",G(this).attr("style"))}),p.getSlideCount()&&(g.settings.imagesLoaded?o.imagesLoaded(function(){n()}):n())}},e=function(){return o.is(":visible")&&"hidden"!==o.css("visibility")},n=function(){e()&&function(){if(g.settings.compat.lazyload){for(var e=!1,t=0,i=g.settings.compat.lazyload.classes.length;t<i;t++){var n=g.settings.compat.lazyload.classes[t].start,s=g.settings.compat.lazyload.classes[t].finish;n&&s?o.find("img."+n).length&&!o.find("img."+s).length&&(e=!0):n?o.find("img."+n).length&&(e=!0):s&&(o.find("img."+s).length||(e=!0))}if(e)return g.debug&&console.log(g.logAs,"lazy loading..."),!1}return g.debug&&console.log(g.logAs,"compat check complete"),!0}()?(clearInterval(g.visibilityInterval),s()):0===g.visibilityInterval&&(g.visibilityInterval=setInterval(n,4e3))},s=function(){var e=g.children.eq(g.settings.startSlide);p.wrap('<div class="'+g.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>'),g.viewport=p.parent(),g.settings.ariaLive&&g.viewport.attr("aria-live","polite"),g.loader=G('<div class="wpmslider-loading" />'),g.viewport.prepend(g.loader),p.css({width:"horizontal"===g.settings.mode?1e3*g.children.length+215+"%":"auto",position:"relative"}),g.usingCSS&&g.settings.easing?p.css("-"+g.cssPrefix+"-transition-timing-function",g.settings.easing):g.settings.easing||(g.settings.easing="swing"),g.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),g.viewport.parent().css({maxWidth:w()}),g.settings.pager||g.settings.controls||g.viewport.parent().css({margin:"0 auto"}),g.children.css({float:"horizontal"===g.settings.mode?"left":"none",listStyle:"none",position:"relative"}),a(),"horizontal"===g.settings.mode&&0<g.settings.slideMargin&&g.children.css("marginRight",g.settings.slideMargin),"vertical"===g.settings.mode&&0<g.settings.slideMargin&&g.children.css("marginBottom",g.settings.slideMargin),"fade"===g.settings.mode?(g.children.css({position:"absolute",zIndex:0,display:"none"}),g.children.eq(g.settings.startSlide).css({zIndex:g.settings.slideZIndex,display:"block"})):g.children.css({display:"block"}),g.controls.el=G('<div class="wpmslider-controls" />'),g.settings.captions&&A(),g.active.last=g.settings.startSlide===C()-1,g.settings.video&&p.fitVids(),"none"===g.settings.preloadImages?e=null:"all"===g.settings.preloadImages&&(e=g.children),g.settings.controls&&T(),g.settings.auto&&g.settings.autoControls&&M(),g.settings.pager&&k(),g.settings.controls&&I(),(g.settings.controls||g.settings.autoControls||g.settings.pager)&&g.viewport.after(g.controls.el),null===e?d():l(e,d)},r=function(){g.debug&&console.log(g.logAs,"setBreakpoint");var e=g.settings.breakpoints.single,t=g.settings.breakpoints.multiple;if("show_multiple"===g.settings.type)for(var i in t)if(t.hasOwnProperty(i)&&verge.viewportW()>=t[i].width){e=t[i];break}g.debug&&console.log("current breakpoint",e),g.settings.maxSlides=e.maxSlides,g.settings.moveSlides=e.moveSlides,g.settings.slideMargin=e.slideMargin,g.carousel=1<g.settings.minSlides||1<g.settings.maxSlides},a=function(){r(),g.children.css("width",x())},l=function(e,t){var i=e.find('img:not([src=""]), iframe').length,n=0;0!==i?e.find('img:not([src=""]), iframe').each(function(){G(this).one("load error",function(){++n===i&&t()}).each(function(){(this.complete||""===this.src)&&G(this).trigger("load")})}):t()},d=function(){if(g.settings.infiniteLoop&&"fade"!==g.settings.mode){var e="vertical"===g.settings.mode?g.settings.minSlides:g.settings.maxSlides,t=g.children.slice(0,e).clone(!0).addClass("wpmslider-clone"),i=g.children.slice(-e).clone(!0).addClass("wpmslider-clone");g.settings.ariaHidden&&(t.attr("aria-hidden",!0),i.attr("aria-hidden",!0)),p.append(t).prepend(i)}g.loader.remove(),"vertical"===g.settings.mode&&(g.settings.adaptiveHeight=!0),p.redrawSlider(),g.settings.onSliderLoad.call(p,g.active.index),g.initialized=!0,g.visibilityInterval=setInterval(v,500),g.settings.responsive&&c(),g.settings.auto&&g.settings.autoStart&&(1<C()||g.settings.autoSlideForOnePage)&&W(),g.settings.pager&&O(g.settings.startSlide),g.settings.controls&&N(),g.settings.touchEnabled&&X(),g.settings.keyboardEnabled&&G(document).keydown(Y)},c=function(){window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1),window.addEventListener("toggleFullContent",u,!1),window.addEventListener("blur",function(){h("blur")}),window.addEventListener("focus",function(){f("blur")})},u=_.debounce(function(){g.debug&&console.log(g.logAs,"updateLayout"),j()},250),v=function(){g.settings.auto&&(e()?f("hide"):h("hide"),verge.inViewport(p)?f("scroll"):h("scroll"))},h=function(e){g.interval&&(p.stopAuto(!0),g.autoPaused=e,g.debug&&console.log(g.logAs,"pause",e))},f=function(e){g.autoPaused===e&&(p.startAuto(!0),g.autoPaused=null,g.debug&&console.log(g.logAs,"play",e))},m=function(e){return Math.max.apply(Math,e)},S=function(){var t=0,e=G();if("vertical"===g.settings.mode||g.settings.adaptiveHeight)if(g.carousel){var i=1===g.settings.moveSlides?g.active.index:g.active.index*y();e=g.children.eq(i);for(var n=1;n<=g.settings.maxSlides-1;n++)e=i+n>=g.children.length?e.add(g.children.eq(n-1)):e.add(g.children.eq(i+n))}else e=g.children.eq(g.active.index);else e=g.children;return"vertical"===g.settings.mode?(e.each(function(e){t+=G(this).outerHeight()}),0<g.settings.slideMargin&&(t+=g.settings.slideMargin*(g.settings.minSlides-1))):t=Math.max.apply(Math,e.map(function(){return G(this).outerHeight(!1)}).get()),"border-box"===g.viewport.css("box-sizing")?t+=parseFloat(g.viewport.css("padding-top"))+parseFloat(g.viewport.css("padding-bottom"))+parseFloat(g.viewport.css("border-top-width"))+parseFloat(g.viewport.css("border-bottom-width")):"padding-box"===g.viewport.css("box-sizing")&&(t+=parseFloat(g.viewport.css("padding-top"))+parseFloat(g.viewport.css("padding-bottom"))),t},w=function(){return"100%"},x=function(){var e=g.viewport.width(),t=g.settings.slideMargin*(g.settings.maxSlides-1);return Math.floor((e-t)/g.settings.maxSlides)},b=function(){return g.settings.maxSlides},C=function(){var e=0,t=0,i=0;if(0<g.settings.moveSlides){if(!g.settings.infiniteLoop){for(;t<g.children.length;)++e,t=i+b(),i+=g.settings.moveSlides<=b()?g.settings.moveSlides:b();return i}e=Math.ceil(g.children.length/y())}else e=Math.ceil(g.children.length/b());return e},y=function(){return 0<g.settings.moveSlides&&g.settings.moveSlides<=b()?g.settings.moveSlides:b()},P=function(e,t,i,n){var s,o;g.usingCSS?("vertical"===g.settings.mode?o="translateY("+e+"px)":"horizontal"===g.settings.mode?o="translateX("+e+"px":"none"===g.settings.mode&&(o="translateY("+e+"px)",i=0),p.css("-"+g.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"===t?(p.css(g.animProp,o),0!==i?p.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){G(e.target).is(p)&&(p.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),F())}):F()):"reset"===t&&p.css(g.animProp,o)):((s={})[g.animProp]=e,"slide"===t?p.animate(s,i,g.settings.easing,function(){F()}):"reset"===t&&p.css(g.animProp,e))},E=function(){for(var e="",t="",i=C(),n=0;n<i;n++)t="",g.settings.buildPager?("icons"===g.settings.buildPager&&(t=""),(G.isFunction(g.settings.buildPager)||g.settings.pagerCustom)&&(t=g.settings.buildPager(n)),g.pagerEl.addClass("wpmslider-custom-pager")):(t=n+1,g.pagerEl.addClass("wpmslider-default-pager")),e+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+n+'" class="wpmslider-pager-link">'+t+"</a></div>";g.pagerEl.html(e)},k=function(){g.settings.pagerCustom?g.pagerEl=G(g.settings.pagerCustom):(g.pagerEl=G('<div class="wpmslider-pager" />'),g.settings.pagerSelector?G(g.settings.pagerSelector).html(g.pagerEl):g.controls.el.addClass("wpmslider-has-pager").append(g.pagerEl),E()),g.pagerEl.on("click touchend","a",H)},T=function(){g.controls.prev=G('<a class="wpmslider-prev" href="">'+g.settings.prevText+"</a>"),g.controls.prev.on("click touchend",L),g.settings.prevSelector&&G(g.settings.prevSelector).append(g.controls.prev),g.settings.prevSelector||(g.controls.directionEl=G('<div class="wpmslider-controls-direction" />'),g.controls.directionEl.append(g.controls.prev),g.controls.el.addClass("wpmslider-has-controls-direction").append(g.controls.directionEl))},I=function(){g.controls.next=G('<a class="wpmslider-next" href="">'+g.settings.nextText+"</a>"),g.controls.next.on("click touchend",z),g.settings.nextSelector&&G(g.settings.nextSelector).append(g.controls.next),g.settings.nextSelector||(g.controls.directionEl=G('<div class="wpmslider-controls-direction" />'),g.controls.directionEl.append(g.controls.next),g.controls.el.addClass("wpmslider-has-controls-direction").append(g.controls.directionEl))},M=function(){g.controls.start=G('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+g.settings.startText+"</a></div>"),g.controls.stop=G('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+g.settings.stopText+"</a></div>"),g.controls.autoEl=G('<div class="wpmslider-controls-auto" />'),g.controls.autoEl.on("click",".wpmslider-start",q),g.controls.autoEl.on("click",".wpmslider-stop",D),g.settings.autoControlsCombine?g.controls.autoEl.append(g.controls.start):g.controls.autoEl.append(g.controls.start).append(g.controls.stop),g.settings.autoControlsSelector?G(g.settings.autoControlsSelector).html(g.controls.autoEl):g.controls.el.addClass("wpmslider-has-controls-auto").append(g.controls.autoEl),B(g.settings.autoStart?"stop":"start")},A=function(){g.children.each(function(e){var t=G(this).find("img:first").attr("title");void 0!==t&&(""+t).length&&G(this).append('<div class="wpmslider-caption"><span>'+t+"</span></div>")})},z=function(e){e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),p.goToNextSlide())},L=function(e){e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),p.goToPrevSlide())},q=function(e){p.startAuto(),e.preventDefault(),e.stopPropagation()},D=function(e){p.stopAuto(),e.preventDefault(),e.stopPropagation()},H=function(e){var t,i;e.preventDefault(),e.stopPropagation(),g.controls.el.hasClass("disabled")||(g.settings.auto&&g.settings.stopAutoOnClick&&(g.debug&&console.log(g.logAs,"stop on navigation"),p.stopAuto()),void 0!==(t=G(e.currentTarget)).attr("data-slide-index")&&(i=parseInt(t.attr("data-slide-index")))!==g.active.index&&p.goToSlide(i))},O=function(i){var e=g.children.length;if("short"===g.settings.pagerType)return 1<g.settings.maxSlides&&(e=Math.ceil(g.children.length/g.settings.maxSlides)),void g.pagerEl.html(i+1+g.settings.pagerShortSeparator+e);g.pagerEl.find("a").removeClass("active"),g.pagerEl.each(function(e,t){G(t).find("a").eq(i).addClass("active")})},F=function(){if(g.settings.infiniteLoop){var e="";0===g.active.index?e=g.children.eq(0).position():g.active.index===C()-1&&g.carousel?e=g.children.eq((C()-1)*y()).position():g.active.index===g.children.length-1&&(e=g.children.eq(g.children.length-1).position()),e&&("horizontal"===g.settings.mode?P(-e.left,"reset",0):"vertical"===g.settings.mode&&P(-e.top,"reset",0))}g.working=!1,g.settings.onSlideAfter.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)},B=function(e){g.settings.autoControlsCombine?g.controls.autoEl.html(g.controls[e]):(g.controls.autoEl.find("a").removeClass("active"),g.controls.autoEl.find("a:not(.wpmslider-"+e+")").addClass("active"))},N=function(){1===C()?(g.controls.prev.addClass("disabled"),g.controls.next.addClass("disabled")):!g.settings.infiniteLoop&&g.settings.hideControlOnEnd&&(0===g.active.index?(g.controls.prev.addClass("disabled"),g.controls.next.removeClass("disabled")):g.active.index===C()-1?(g.controls.next.addClass("disabled"),g.controls.prev.removeClass("disabled")):(g.controls.prev.removeClass("disabled"),g.controls.next.removeClass("disabled")))},W=function(){0<g.settings.autoDelay?setTimeout(p.startAuto,g.settings.autoDelay):p.startAuto(),g.settings.autoHover&&p.hover(function(){h("hover")},function(){f("hover")})},Y=function(e){var t=document.activeElement.tagName.toLowerCase();if(null===new RegExp(t,["i"]).exec("input|textarea")&&verge.inViewport(p)){if(39===e.keyCode)return z(e),!1;if(37===e.keyCode)return L(e),!1}},X=function(){g.touch={start:{x:0,y:0},end:{x:0,y:0}},g.viewport.on("touchstart MSPointerDown pointerdown",R),g.viewport.on("click",".wpmslider a",function(e){g.viewport.hasClass("click-disabled")&&(e.preventDefault(),e.stopPropagation(),g.viewport.removeClass("click-disabled"))})},R=function(e){if(("touchstart"===e.type||0===e.button)&&!e.originalEvent.target.classList.contains("readmore-text"))if(g.controls.el.addClass("disabled"),g.working)e.preventDefault(),e.stopPropagation(),g.controls.el.removeClass("disabled");else{g.touch.originalPos=p.position();var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t];if("function"==typeof PointerEvent&&void 0===t.pointerId)return;g.touch.start.x=i[0].pageX,g.touch.start.y=i[0].pageY,g.viewport.get(0).setPointerCapture&&(g.pointerId=t.pointerId,g.viewport.get(0).setPointerCapture(g.pointerId)),g.originalClickTarget=t.originalTarget||t.target,g.originalClickButton=t.button,g.originalClickButtons=t.buttons,g.originalEventType=t.type,g.hasMove=!1,g.viewport.on("touchmove MSPointerMove pointermove",U),g.viewport.on("touchend MSPointerUp pointerup",V),g.viewport.on("MSPointerCancel pointercancel",Z)}},Z=function(e){e.preventDefault(),P(g.touch.originalPos.left,"reset",0),g.controls.el.removeClass("disabled"),g.viewport.off("MSPointerCancel pointercancel",Z),g.viewport.off("touchmove MSPointerMove pointermove",U),g.viewport.off("touchend MSPointerUp pointerup",V),g.viewport.get(0).releasePointerCapture&&g.viewport.get(0).releasePointerCapture(g.pointerId)},U=function(e){var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],n=Math.abs(i[0].pageX-g.touch.start.x),s=Math.abs(i[0].pageY-g.touch.start.y),o=0,r=0;g.hasMove=!0,s<3*n&&g.settings.preventDefaultSwipeX?(e.preventDefault(),e.stopPropagation()):n<3*s&&g.settings.preventDefaultSwipeY&&(e.preventDefault(),e.stopPropagation()),"touchmove"!==e.type&&e.preventDefault(),"fade"!==g.settings.mode&&g.settings.oneToOneTouch&&(o="horizontal"===g.settings.mode?(r=i[0].pageX-g.touch.start.x,g.touch.originalPos.left+r):(r=i[0].pageY-g.touch.start.y,g.touch.originalPos.top+r),P(o,"reset",0))},V=function(e){e.preventDefault(),g.viewport.off("touchmove MSPointerMove pointermove",U),g.controls.el.removeClass("disabled");var t=e.originalEvent,i=void 0!==t.changedTouches?t.changedTouches:[t],n=0,s=0;g.touch.end.x=i[0].pageX,g.touch.end.y=i[0].pageY,"fade"===g.settings.mode?(s=Math.abs(g.touch.start.x-g.touch.end.x))>=g.settings.swipeThreshold&&(g.touch.start.x>g.touch.end.x?p.goToNextSlide():p.goToPrevSlide(),p.stopAuto()):(n="horizontal"===g.settings.mode?(s=g.touch.end.x-g.touch.start.x,g.touch.originalPos.left):(s=g.touch.end.y-g.touch.start.y,g.touch.originalPos.top),!g.settings.infiniteLoop&&(0===g.active.index&&0<s||g.active.last&&s<0)?P(n,"reset",200):Math.abs(s)>=g.settings.swipeThreshold?(s<0?p.goToNextSlide():p.goToPrevSlide(),p.stopAuto()):P(n,"reset",200)),g.viewport.off("touchend MSPointerUp pointerup",V),g.viewport.get(0).releasePointerCapture&&g.viewport.get(0).releasePointerCapture(g.pointerId),!1!==g.hasMove||0!==g.originalClickButton&&"touchstart"!==g.originalEventType||G(g.originalClickTarget).trigger({type:"click",button:g.originalClickButton,buttons:g.originalClickButtons})},j=function(e){g.initialized?g.working?(g.debug&&console.log(g.logAs,"slider working"),window.setTimeout(j,10)):(p.redrawSlider(),g.settings.onSliderResize.call(p,g.active.index)):g.debug&&console.log(g.logAs,"slider not initialized")},Q=function(e){var t=b();g.settings.ariaHidden&&(g.children.attr("aria-hidden","true"),g.children.slice(e,e+t).attr("aria-hidden","false"))};return p.goToSlide=function(e,t){var i,n,s,o,r,a=!0,l=0,d={left:0,top:0},c=null;if(g.oldIndex=g.active.index,g.active.index=(r=e)<0?g.settings.infiniteLoop?C()-1:g.active.index:r>=C()?g.settings.infiniteLoop?0:g.active.index:r,!g.working&&g.active.index!==g.oldIndex){if(g.working=!0,void 0!==(a=g.settings.onSlideBefore.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index))&&!a)return g.active.index=g.oldIndex,void(g.working=!1);"next"===t?g.settings.onSlideNext.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)||(a=!1):"prev"===t&&(g.settings.onSlidePrev.call(p,g.children.eq(g.active.index),g.oldIndex,g.active.index)||(a=!1)),g.active.last=g.active.index>=C()-1,(g.settings.pager||g.settings.pagerCustom)&&O(g.active.index),g.settings.controls&&N(),"fade"===g.settings.mode?(g.settings.adaptiveHeight&&g.viewport.height()!==S()&&g.viewport.animate({height:S()},g.settings.adaptiveHeightSpeed),g.children.filter(":visible").fadeOut(g.settings.speed).css({zIndex:0}),g.children.eq(g.active.index).css("zIndex",g.settings.slideZIndex+1).fadeIn(g.settings.speed,function(){G(this).css("zIndex",g.settings.slideZIndex),F()})):(g.settings.adaptiveHeight&&g.viewport.height()!==S()&&g.viewport.animate({height:S()},g.settings.adaptiveHeightSpeed),!g.settings.infiniteLoop&&g.carousel&&g.active.last?"horizontal"===g.settings.mode?(d=(c=g.children.eq(g.children.length-1)).position(),l=g.viewport.width()-c.outerWidth()):(i=g.children.length-g.settings.minSlides,d=g.children.eq(i).position()):g.carousel&&g.active.last&&"prev"===t?(n=1===g.settings.moveSlides?g.settings.maxSlides-y():(C()-1)*y()-(g.children.length-g.settings.maxSlides),d=(c=p.children(".wpmslider-clone").eq(n)).position()):"next"===t&&0===g.active.index?(d=p.find("> .wpmslider-clone").eq(g.settings.maxSlides).position(),g.active.last=!1):0<=e&&(o=e*parseInt(y()),d=g.children.eq(o).position()),void 0!==d&&(s="horizontal"===g.settings.mode?-(d.left-l):-d.top,P(s,"slide",g.settings.speed))),g.settings.ariaHidden&&Q(g.active.index*y())}},p.goToNextSlide=function(){if((g.settings.infiniteLoop||!g.active.last)&&!0!==g.working){var e=parseInt(g.active.index)+1;p.goToSlide(e,"next")}},p.goToPrevSlide=function(){if((g.settings.infiniteLoop||0!==g.active.index)&&!0!==g.working){var e=parseInt(g.active.index)-1;p.goToSlide(e,"prev")}},p.startAuto=function(e){g.interval||(g.interval=setInterval(function(){"next"===g.settings.autoDirection?p.goToNextSlide():p.goToPrevSlide()},g.settings.pause),g.settings.onAutoChange.call(p,!0),g.settings.autoControls&&!0!==e&&B("stop"))},p.stopAuto=function(e){g.autoPaused&&(g.autoPaused=!1),g.interval&&(clearInterval(g.interval),g.interval=null,g.settings.onAutoChange.call(p,!1),g.settings.autoControls&&!0!==e&&B("start"))},p.getCurrentSlide=function(){return g.active.index},p.getCurrentSlideElement=function(){return g.children.eq(g.active.index)},p.getSlideElement=function(e){return g.children.eq(e)},p.getSlideCount=function(){return g.children.length},p.isWorking=function(){return g.working},p.redrawSlider=function(){var e,t,i,n,s;g.debug&&console.log(g.logAs,"redrawSlider"),a(),g.children.height("auto"),g.viewport.height(S()+2),g.settings.stretch&&(e=g.children.map(function(){return jQuery(this).actual("outerHeight")}).get(),t=m(e),g.children.height(t)),g.children.add(p.find(".wpmslider-clone")).outerWidth(x()),g.children.length>g.settings.maxSlides&&g.active.last&&!g.settings.infiniteLoop?"horizontal"===g.settings.mode?(i=(n=g.children.last()).position(),P(-(i.left-(g.viewport.width()-n.outerWidth())),"reset",0)):"vertical"===g.settings.mode&&(s=g.children.length-g.settings.minSlides,i=g.children.eq(s).position(),P(-i.top,"reset",0)):(i=g.children.eq(g.active.index*y()).position(),g.active.index===C()-1&&(g.active.last=!0),void 0!==i&&("horizontal"===g.settings.mode?P(-i.left,"reset",0):"vertical"===g.settings.mode?P(-i.top,"reset",0):"none"===g.settings.mode&&P(-i.top,"reset",0))),g.active.last&&(g.active.index=C()-1),g.active.index>=C()&&(g.active.last=!0),g.settings.pager&&!g.settings.pagerCustom&&(E(),O(g.active.index)),g.settings.ariaHidden&&Q(g.active.index*y())},p.destroySlider=function(){g.initialized&&(g.initialized=!1,G(".wpmslider-clone",this).remove(),g.children.each(function(){void 0!==G(this).data("origStyle")?G(this).attr("style",G(this).data("origStyle")):G(this).removeAttr("style")}),void 0!==G(this).data("origStyle")?this.attr("style",G(this).data("origStyle")):G(this).removeAttr("style"),G(this).unwrap().unwrap(),g.controls.el&&g.controls.el.remove(),g.controls.next&&g.controls.next.remove(),g.controls.prev&&g.controls.prev.remove(),g.pagerEl&&g.settings.controls&&!g.settings.pagerCustom&&g.pagerEl.remove(),G(".wpmslider-caption",this).remove(),g.controls.autoEl&&g.controls.autoEl.remove(),clearInterval(g.interval),clearInterval(g.visibilityInterval),g.settings.responsive&&G(window).off("resize",j),g.settings.keyboardEnabled&&G(document).off("keydown",Y),G(this).removeData("strongSlider"))},p.reloadSlider=function(e){void 0!==e&&(i=e),p.destroySlider(),t(),G(p).data("strongSlider",this)},t(),G(p).data("strongSlider",this),o.attr("data-state","init"),g.debug&&console.log(g.logAs,"viewport",verge.viewportW(),"x",verge.viewportH()),this}}}(jQuery);
|
public/js/lib/validate/additional-methods.js
CHANGED
File without changes
|
public/js/lib/validate/additional-methods.min.js
CHANGED
File without changes
|
public/js/lib/validate/jquery.validate.js
CHANGED
File without changes
|
public/js/lib/validate/jquery.validate.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ar.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ar.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_az.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_az.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_bg.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_bg.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_bn_BD.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_bn_BD.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ca.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ca.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_cs.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_cs.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_da.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_da.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_de.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_de.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_el.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_el.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es_AR.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es_AR.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es_PE.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_es_PE.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_et.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_et.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_eu.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_eu.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fa.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fa.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fi.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fi.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fr.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_fr.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ge.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ge.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_gl.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_gl.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_he.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_he.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hr.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hr.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hu.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hu.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hy_AM.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_hy_AM.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_id.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_id.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_is.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_is.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_it.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_it.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ja.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ja.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ka.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ka.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_kk.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_kk.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ko.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ko.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_lt.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_lt.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_lv.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_lv.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_mk.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_mk.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_my.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_my.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_nl.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_nl.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_no.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_no.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pl.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pl.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pt_BR.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pt_BR.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pt_PT.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_pt_PT.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ro.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ro.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ru.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ru.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_si.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_si.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sk.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sk.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sl.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sl.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sr.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sr.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sr_lat.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sr_lat.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sv.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_sv.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_th.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_th.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_tj.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_tj.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_tr.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_tr.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_uk.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_uk.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ur.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_ur.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_vi.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_vi.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_zh.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_zh.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_zh_TW.js
CHANGED
File without changes
|
public/js/lib/validate/localization/messages_zh_TW.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_de.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_de.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_es_CL.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_es_CL.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_fi.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_fi.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_nl.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_nl.min.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_pt.js
CHANGED
File without changes
|
public/js/lib/validate/localization/methods_pt.min.js
CHANGED
File without changes
|
public/js/lib/verge/verge.js
CHANGED
File without changes
|
public/js/lib/verge/verge.min.js
CHANGED
File without changes
|
public/scss/_partials/_base.scss
CHANGED
File without changes
|
public/scss/_partials/_buttons.scss
CHANGED
File without changes
|
public/scss/_partials/_buttons2.scss
CHANGED
File without changes
|
public/scss/_partials/_buttons3.scss
CHANGED
File without changes
|
public/scss/_partials/_inside.scss
CHANGED
File without changes
|
public/scss/_partials/_outside.scss
CHANGED
File without changes
|
public/scss/_partials/_pager_buttons.scss
CHANGED
File without changes
|
public/scss/_partials/_pager_inside.scss
CHANGED
File without changes
|
public/scss/_partials/_pager_text.scss
CHANGED
File without changes
|
public/scss/_partials/_sides.scss
CHANGED
File without changes
|
public/scss/_partials/_sides_outside.scss
CHANGED
File without changes
|
public/scss/_partials/_sides_pager.scss
CHANGED
File without changes
|
public/scss/_partials/_text.scss
CHANGED
File without changes
|
public/scss/slider-controls-full-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-full-buttons2.scss
CHANGED
File without changes
|
public/scss/slider-controls-full-buttons3.scss
CHANGED
File without changes
|
public/scss/slider-controls-full-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons2-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons2-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons2.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons3-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons3-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-buttons3.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons2-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons2-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons2.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons3-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons3-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-sides-outside-buttons3.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons2-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons2-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons2.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons3-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons3-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-buttons3.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-text-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-text-pager-text.scss
CHANGED
File without changes
|
public/scss/slider-controls-simple-text.scss
CHANGED
File without changes
|
public/scss/slider-pager-buttons.scss
CHANGED
File without changes
|
public/scss/slider-pager-text.scss
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: testimonials, testimonial slider, testimonial form, star ratings
|
|
4 |
Â
Requires at least: 4.6
|
5 |
Â
Requires PHP: 5.6
|
6 |
Â
Tested up to: 5.1
|
7 |
-
Stable tag: 2.
|
8 |
Â
License: GPLv3 or later
|
9 |
Â
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
Â
|
@@ -173,7 +173,7 @@ No. If you already have testimonials in another plugin or theme, you will have t
|
|
173 |
Â
|
174 |
Â
== Changelog ==
|
175 |
Â
|
176 |
-
* See changelog.txt for previous versions.
|
177 |
Â
|
178 |
Â
== Upgrade Notice ==
|
179 |
Â
|
4 |
Â
Requires at least: 4.6
|
5 |
Â
Requires PHP: 5.6
|
6 |
Â
Tested up to: 5.1
|
7 |
+
Stable tag: 2.37
|
8 |
Â
License: GPLv3 or later
|
9 |
Â
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
Â
|
173 |
Â
|
174 |
Â
== Changelog ==
|
175 |
Â
|
176 |
+
* See [changelog.txt](https://github.com/MachoThemes/strong-testimonials/blob/master/changelog.txt) for previous versions.
|
177 |
Â
|
178 |
Â
== Upgrade Notice ==
|
179 |
Â
|
strong-testimonials.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Â
* Description: Collect and display your testimonials or reviews.
|
6 |
Â
* Author: MachoThemes
|
7 |
Â
* Author URI: https://www.machothemes.com/
|
8 |
-
* Version: 2.
|
9 |
Â
* Text Domain: strong-testimonials
|
10 |
Â
* Domain Path: /languages
|
11 |
Â
* Requires: 4.6 or higher
|
@@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
44 |
Â
exit;
|
45 |
Â
}
|
46 |
Â
|
47 |
-
define( 'WPMTST_VERSION', '2.
|
48 |
Â
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
49 |
Â
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
50 |
Â
define( 'STRONGPLUGINS_STORE_URL', '#' );
|
@@ -194,6 +194,10 @@ final class Strong_Testimonials {
|
|
194 |
Â
|
195 |
Â
defined( 'WPMTST_TPL' ) || define( 'WPMTST_TPL', WPMTST_DIR . 'templates' );
|
196 |
Â
defined( 'WPMTST_TPL_URI' ) || define( 'WPMTST_TPL_URI', WPMTST_URL . 'templates' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
197 |
Â
}
|
198 |
Â
|
199 |
Â
/**
|
@@ -279,6 +283,7 @@ final class Strong_Testimonials {
|
|
279 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-list.php';
|
280 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-category-list.php';
|
281 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-post-editor.php';
|
Â
|
|
282 |
Â
|
283 |
Â
require_once WPMTST_ADMIN . 'admin.php';
|
284 |
Â
require_once WPMTST_ADMIN . 'admin-notices.php';
|
5 |
Â
* Description: Collect and display your testimonials or reviews.
|
6 |
Â
* Author: MachoThemes
|
7 |
Â
* Author URI: https://www.machothemes.com/
|
8 |
+
* Version: 2.37
|
9 |
Â
* Text Domain: strong-testimonials
|
10 |
Â
* Domain Path: /languages
|
11 |
Â
* Requires: 4.6 or higher
|
44 |
Â
exit;
|
45 |
Â
}
|
46 |
Â
|
47 |
+
define( 'WPMTST_VERSION', '2.37' );
|
48 |
Â
define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
|
49 |
Â
define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
|
50 |
Â
define( 'STRONGPLUGINS_STORE_URL', '#' );
|
194 |
Â
|
195 |
Â
defined( 'WPMTST_TPL' ) || define( 'WPMTST_TPL', WPMTST_DIR . 'templates' );
|
196 |
Â
defined( 'WPMTST_TPL_URI' ) || define( 'WPMTST_TPL_URI', WPMTST_URL . 'templates' );
|
197 |
+
|
198 |
+
defined( 'WPMTST_ASSETS_CSS' ) || define( 'WPMTST_ASSETS_CSS', WPMTST_URL . 'assets/css/' );
|
199 |
+
defined( 'WPMTST_ASSETS_JS' ) || define( 'WPMTST_ASSETS_JS', WPMTST_URL . 'assets/js/' );
|
200 |
+
defined( 'WPMTST_ASSETS_SRC' ) || define( 'WPMTST_ASSETS_SRC', WPMTST_URL . 'assets/src/' );
|
201 |
Â
}
|
202 |
Â
|
203 |
Â
/**
|
283 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-list.php';
|
284 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-admin-category-list.php';
|
285 |
Â
require_once WPMTST_ADMIN . 'class-strong-testimonials-post-editor.php';
|
286 |
+
require_once WPMTST_ADMIN . 'class-strong-testimonials-exporter.php';
|
287 |
Â
|
288 |
Â
require_once WPMTST_ADMIN . 'admin.php';
|
289 |
Â
require_once WPMTST_ADMIN . 'admin-notices.php';
|
templates-scss/_mixins/_testimonial.scss
CHANGED
File without changes
|
templates-scss/_partials/_base.scss
CHANGED
File without changes
|
templates-scss/_partials/_clear.scss
CHANGED
File without changes
|
templates-scss/_partials/_form-wait.scss
CHANGED
File without changes
|
templates-scss/_partials/_pagination-modern.scss
CHANGED
File without changes
|
templates-scss/_partials/_pagination-simple.scss
CHANGED
File without changes
|
templates-scss/_partials/_pagination-standard.scss
CHANGED
File without changes
|
templates-scss/_partials/_responsive-no-heading-background.scss
CHANGED
File without changes
|
templates-scss/_partials/_responsive.scss
CHANGED
File without changes
|
templates-scss/_partials/_rtl.scss
CHANGED
File without changes
|
templates-scss/_partials/_structure-form.scss
CHANGED
File without changes
|
templates-scss/bold/content.scss
CHANGED
File without changes
|
templates-scss/default-form/form.scss
CHANGED
File without changes
|
templates-scss/default/content.scss
CHANGED
File without changes
|
templates-scss/modern/content.scss
CHANGED
File without changes
|
templates-scss/simple-form/form.scss
CHANGED
File without changes
|
templates-scss/simple/content.scss
CHANGED
File without changes
|
templates-scss/small-widget/content.scss
CHANGED
File without changes
|
templates-scss/unstyled-form/form.scss
CHANGED
File without changes
|
templates/bold/config.json
CHANGED
File without changes
|
templates/bold/content.css
CHANGED
File without changes
|
templates/bold/content.php
CHANGED
File without changes
|
templates/default-form/config.json
CHANGED
File without changes
|
templates/default-form/form.css
CHANGED
File without changes
|
templates/default-form/form.php
CHANGED
File without changes
|
templates/default/config.json
CHANGED
File without changes
|
templates/default/content.css
CHANGED
File without changes
|
templates/default/content.php
CHANGED
File without changes
|
templates/default/img/quotes.png
CHANGED
File without changes
|
templates/index.php
CHANGED
File without changes
|
templates/modern/config.json
CHANGED
File without changes
|
templates/modern/content.css
CHANGED
File without changes
|
templates/modern/content.php
CHANGED
File without changes
|
templates/simple-form/config.json
CHANGED
File without changes
|
templates/simple-form/form.css
CHANGED
File without changes
|
templates/simple-form/form.php
CHANGED
File without changes
|
templates/simple/config.json
CHANGED
File without changes
|
templates/simple/content.css
CHANGED
File without changes
|
templates/simple/content.php
CHANGED
File without changes
|
templates/small-widget/config.json
CHANGED
File without changes
|
templates/small-widget/content.css
CHANGED
File without changes
|
templates/small-widget/content.php
CHANGED
File without changes
|
templates/unstyled-form/config.json
CHANGED
File without changes
|
templates/unstyled-form/form.css
CHANGED
File without changes
|
templates/unstyled-form/form.php
CHANGED
File without changes
|
templates/unstyled/config.json
CHANGED
File without changes
|
templates/unstyled/content.php
CHANGED
File without changes
|
uninstall.php
CHANGED
File without changes
|
wpml-config.xml
CHANGED
File without changes
|