Download Monitor - Version 4.5.3

Version Description

Download this release

Release Info

Developer raldea89
Plugin Icon 128x128 Download Monitor
Version 4.5.3
Comparing to
See all releases

Code changes from version 4.5.2 to 4.5.3

Files changed (41) hide show
  1. assets/css/admin.css +1 -1
  2. assets/css/admin.less +2102 -1668
  3. assets/js/settings.js +62 -62
  4. assets/views/meta-box/product-information.php +32 -32
  5. assets/views/meta-box/version.php +126 -123
  6. assets/views/order/page-order-details.php +1 -1
  7. changelog.txt +526 -518
  8. download-monitor.php +72 -72
  9. includes/admin/class-dlm-review.php +170 -170
  10. includes/admin/class-dlm-upsells.php +866 -784
  11. includes/admin/lite-vs-pro-page.php +140 -0
  12. includes/admin/uninstall/class-dlm-uninstall.php +271 -271
  13. includes/tracking/class-download-monitor-usage-tracker.php +1301 -1302
  14. readme.txt +124 -124
  15. src/Admin/Admin.php +337 -337
  16. src/Admin/AdminScripts.php +224 -224
  17. src/Admin/Dashboard.php +2 -2
  18. src/Admin/Extensions.php +13 -11
  19. src/Admin/Settings/Fields/Checkbox.php +2 -2
  20. src/Admin/Settings/Fields/Field.php +1 -1
  21. src/Admin/Settings/Fields/FieldFactory.php +62 -62
  22. src/Admin/Settings/Fields/LazySelect.php +2 -2
  23. src/Admin/Settings/Fields/Password.php +3 -3
  24. src/Admin/Settings/Fields/Select.php +2 -2
  25. src/Admin/Settings/Fields/Text.php +3 -3
  26. src/Admin/Settings/Fields/Textarea.php +2 -2
  27. src/Admin/Settings/Page.php +391 -390
  28. src/Admin/Settings/Settings.php +731 -685
  29. src/CookieManager.php +58 -58
  30. src/Download/Download.php +882 -882
  31. src/Logs/LoggingListTable.php +451 -445
  32. src/Product/Product.php +306 -306
  33. src/Product/ProductManager.php +296 -296
  34. src/Shop/Admin/WritePanels.php +152 -152
  35. src/Shop/Session/Factory.php +49 -49
  36. src/Util/Onboarding.php +264 -264
  37. templates/shop/button/add-to-cart-box.php +30 -30
  38. templates/shop/button/add-to-cart.php +16 -16
  39. templates/shop/cart/item.php +4 -4
  40. vendor/composer/autoload_classmap.php +372 -372
  41. vendor/composer/autoload_static.php +398 -398
assets/css/admin.css CHANGED
@@ -1 +1 @@
1
- .post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7c0900}.post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}#dlm_logs td{padding:7px 7px;vertical-align:middle}#dlm_logs .check-column{width:1%;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2%}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url(../images/log-status-icons.png) top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.admin-color-blue .dlm-settings-sub-nav .active-section a{border-bottom-color:#096484}.admin-color-coffee .dlm-settings-sub-nav .active-section a{border-bottom-color:#c7a589}.admin-color-ectoplasm .dlm-settings-sub-nav .active-section a{border-bottom-color:#a3b745}.admin-color-midnight .dlm-settings-sub-nav .active-section a{border-bottom-color:#e14d43}.admin-color-ocean .dlm-settings-sub-nav .active-section a{border-bottom-color:#627c83}.admin-color-sunrise .dlm-settings-sub-nav .active-section a{border-bottom-color:#be3631}.admin-color-light .dlm-settings-sub-nav .active-section a{border-bottom-color:#888}.admin-color-evergreen .dlm-settings-sub-nav .active-section a{border-bottom-color:#36533f}.admin-color-mint .dlm-settings-sub-nav .active-section a{border-bottom-color:#4f6d59}.admin-color-modern .dlm-settings-sub-nav .active-section a{border-bottom-color:#3858e9}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-members_only span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-members_only .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-members_only{width:3.5em}table.wp-list-table th.column-members_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f338";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-members_only,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-members_only span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-members_only span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-members_only span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-members_only span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:first-child h3{background-color:#fafafa;border-bottom:1px solid #dcdcde}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.dlm-reports-block-summary{background:#333!important;color:#fff}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:680px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap h1 a.dlm-reload-button{float:right}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;border:0;padding:15px;margin-top:30px}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsells-wrapper{width:100%}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:0 0;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:100%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 15px;padding:10px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0 auto}.upsells-columns .upsells-column h3{line-height:1.3em}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}
1
+ .post-type-dlm_download h1 a.dlm-delete-logs{color:#a00}.post-type-dlm_download h1 a.dlm-delete-logs:hover{color:#fff;background:#a00;border-color:#7c0900}.post-type-dlm_download .dlm-page-header{border-bottom:1px solid #ccc;padding:15px 20px;display:flex;justify-content:space-between;background:#fff;width:calc(100% + 20px);box-sizing:border-box;margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links{margin-left:-20px}.post-type-dlm_download .dlm-page-header .dlm-header-links a span{vertical-align:middle;position:relative;top:-2px;padding-right:10px}.post-type-dlm_download .dlm-page-header .dlm-header-logo img{max-height:35px}#dlm_logs td{padding:7px 7px;vertical-align:middle}#dlm_logs .check-column{width:1%;padding:0;vertical-align:middle}#dlm_logs .column-status{width:2%}#dlm_logs td.column-status{font-size:10px;vertical-align:middle;text-align:center}#dlm_logs td.column-status span{color:#fff;font-weight:400;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;height:18px;line-height:18px;width:18px;display:inline-block;background:url(../images/log-status-icons.png) top left no-repeat}#dlm_logs td.column-status .completed{background-color:#6cc644}#dlm_logs td.column-status .failed{background-color:#bd2c00;background-position-y:-18px}#dlm_logs td.column-status .redirected{background-color:#1c769b;background-position-y:-36px}#dlm_logs td.column-user_agent,#dlm_logs td.column-user_ip{font-family:monospace;font-weight:400}#dlm_logs span.dlm-description{font-weight:400}#dlm_logs .column-download,#dlm_logs .column-file,#dlm_logs .column-user,#dlm_logs .column-user_ua{width:16%!important}#dlm_logs .column-date,#dlm_logs .column-user_ip{width:6%!important}.post-type-dlm_download .inline-edit-row .inline-edit-col-dlm .inline-edit-col-dlm-inner{margin-top:10px}.dlm-settings-sub-nav{margin:0 0 10px 0;width:100%;border-bottom:1px solid #ccc;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-settings-sub-nav li{margin-right:10px;margin-bottom:-2px}.dlm-settings-sub-nav a{padding:13px;display:block}.dlm-settings-sub-nav .active-section{margin-bottom:-2px}.dlm-settings-sub-nav .active-section a{border-bottom:4px solid #000;padding-bottom:9px;margin-bottom:-2px;font-weight:600}.admin-color-blue .dlm-settings-sub-nav .active-section a{border-bottom-color:#096484}.admin-color-coffee .dlm-settings-sub-nav .active-section a{border-bottom-color:#c7a589}.admin-color-ectoplasm .dlm-settings-sub-nav .active-section a{border-bottom-color:#a3b745}.admin-color-midnight .dlm-settings-sub-nav .active-section a{border-bottom-color:#e14d43}.admin-color-ocean .dlm-settings-sub-nav .active-section a{border-bottom-color:#627c83}.admin-color-sunrise .dlm-settings-sub-nav .active-section a{border-bottom-color:#be3631}.admin-color-light .dlm-settings-sub-nav .active-section a{border-bottom-color:#888}.admin-color-evergreen .dlm-settings-sub-nav .active-section a{border-bottom-color:#36533f}.admin-color-mint .dlm-settings-sub-nav .active-section a{border-bottom-color:#4f6d59}.admin-color-modern .dlm-settings-sub-nav .active-section a{border-bottom-color:#3858e9}.dlm-admin-settings #setting-dlm_decimal_separator,.dlm-admin-settings #setting-dlm_thousand_separator{width:50px}.dlm-admin-settings table td{padding:15px 0}.dlm-admin-settings h3{margin:2em 0 0}ul.download_monitor_file_browser{list-style:none outside;margin:0;border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#f9f9f9;padding:5px 5px;-moz-box-shadow:inset 0 0 0 1px #fff;-webkit-box-shadow:inset 0 0 0 1px #fff;box-shadow:inset 0 0 0 1px #fff}ul.download_monitor_file_browser li{padding:0;margin:0}ul.download_monitor_file_browser li a{color:#21759b;display:block;padding:4px 0 4px 4px;text-decoration:none}ul.download_monitor_file_browser li a:hover{background-color:#eaf2fa}ul.download_monitor_file_browser li a:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f123";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.folder:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f318";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-3g2:before,ul.download_monitor_file_browser li a.filetype-3gp:before,ul.download_monitor_file_browser li a.filetype-asf:before,ul.download_monitor_file_browser li a.filetype-asx:before,ul.download_monitor_file_browser li a.filetype-avi:before,ul.download_monitor_file_browser li a.filetype-mov:before,ul.download_monitor_file_browser li a.filetype-mp4:before,ul.download_monitor_file_browser li a.filetype-mpg:before,ul.download_monitor_file_browser li a.filetype-rm:before,ul.download_monitor_file_browser li a.filetype-srt:before,ul.download_monitor_file_browser li a.filetype-vob:before,ul.download_monitor_file_browser li a.filetype-wmv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f126";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-aif:before,ul.download_monitor_file_browser li a.filetype-iff:before,ul.download_monitor_file_browser li a.filetype-m3u:before,ul.download_monitor_file_browser li a.filetype-m4a:before,ul.download_monitor_file_browser li a.filetype-mid:before,ul.download_monitor_file_browser li a.filetype-midi:before,ul.download_monitor_file_browser li a.filetype-mp3:before,ul.download_monitor_file_browser li a.filetype-mpa:before,ul.download_monitor_file_browser li a.filetype-ra:before,ul.download_monitor_file_browser li a.filetype-wav:before,ul.download_monitor_file_browser li a.filetype-wma:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f127";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li a.filetype-ai:before,ul.download_monitor_file_browser li a.filetype-bmp:before,ul.download_monitor_file_browser li a.filetype-dds:before,ul.download_monitor_file_browser li a.filetype-eps:before,ul.download_monitor_file_browser li a.filetype-gif:before,ul.download_monitor_file_browser li a.filetype-ico:before,ul.download_monitor_file_browser li a.filetype-jpeg:before,ul.download_monitor_file_browser li a.filetype-jpg:before,ul.download_monitor_file_browser li a.filetype-png:before,ul.download_monitor_file_browser li a.filetype-ps:before,ul.download_monitor_file_browser li a.filetype-psd:before,ul.download_monitor_file_browser li a.filetype-pspimage:before,ul.download_monitor_file_browser li a.filetype-svg:before,ul.download_monitor_file_browser li a.filetype-tga:before,ul.download_monitor_file_browser li a.filetype-thm:before,ul.download_monitor_file_browser li a.filetype-tif:before,ul.download_monitor_file_browser li a.filetype-yuv:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}ul.download_monitor_file_browser li.nofiles{color:#999;font-style:italic;padding:4px 0}ul.download_monitor_file_browser li ul{list-style:none outside;margin:0;padding:0 0 0 28px}ul.download_monitor_file_browser li ul.loading{background:url(../images/ajax-loader.gif) no-repeat 24px 0;height:32px}table.wp-list-table .column-thumb{width:44px;text-align:center;white-space:nowrap}table.wp-list-table .column-dlm_download_cat,table.wp-list-table .column-dlm_download_tag,table.wp-list-table .column-file{width:11%!important}table.wp-list-table .column-file,table.wp-list-table .column-title{width:17%!important}table.wp-list-table .column-download_id,table.wp-list-table .column-version{width:5em}table.wp-list-table th.column-download_count span:first-child,table.wp-list-table th.column-featured span:first-child,table.wp-list-table th.column-members_only span:first-child,table.wp-list-table th.column-redirect_only span:first-child,table.wp-list-table th.column-thumb span:first-child{float:none;display:inline-block;width:1em;height:1em;line-height:1em;padding:2px 0 0 0;overflow:hidden}table.wp-list-table th.column-download_count .sorting-indicator,table.wp-list-table th.column-featured .sorting-indicator,table.wp-list-table th.column-members_only .sorting-indicator,table.wp-list-table th.column-redirect_only .sorting-indicator,table.wp-list-table th.column-thumb .sorting-indicator{float:right}table.wp-list-table th.column-thumb{width:52px;text-align:center}table.wp-list-table th.column-thumb span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f128";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-download_count{width:5em}table.wp-list-table th.column-download_count span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f346";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-members_only{width:3.5em}table.wp-list-table th.column-members_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f338";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-redirect_only{width:3.5em}table.wp-list-table th.column-redirect_only span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f103";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table th.column-featured{width:3.5em}table.wp-list-table th.column-featured span:first-child:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f155";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count,table.wp-list-table td.column-featured,table.wp-list-table td.column-members_only,table.wp-list-table td.column-redirect_only{text-align:left;padding-left:11px}table.wp-list-table td.column-download_count span.na,table.wp-list-table td.column-featured span.na,table.wp-list-table td.column-members_only span.na,table.wp-list-table td.column-redirect_only span.na{color:#999;width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.na:before,table.wp-list-table td.column-featured span.na:before,table.wp-list-table td.column-members_only span.na:before,table.wp-list-table td.column-redirect_only span.na:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table td.column-download_count span.yes,table.wp-list-table td.column-featured span.yes,table.wp-list-table td.column-members_only span.yes,table.wp-list-table td.column-redirect_only span.yes{width:1em;height:1em;line-height:1em;display:inline-block;overflow:hidden;vertical-align:middle}table.wp-list-table td.column-download_count span.yes:before,table.wp-list-table td.column-featured span.yes:before,table.wp-list-table td.column-members_only span.yes:before,table.wp-list-table td.column-redirect_only span.yes:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f147";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}table.wp-list-table .column-thumb img{padding:2px;margin:0;border:1px solid #dfdfdf;vertical-align:middle;width:32px;height:32px}#download-monitor-file .inside{padding:0;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .close_all,#download-monitor-file .dlm-metaboxes-wrapper .expand_all{float:right;margin-left:1em;line-height:22px;text-decoration:none}#download-monitor-file .dlm-metaboxes-wrapper .expand_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f168";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .close_all:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-file .dlm-metaboxes-wrapper p.toolbar a.button{float:left;margin:0}#download-monitor-file .dlm-metaboxes-wrapper .fr,#download-monitor-file .dlm-metaboxes-wrapper button.add_attribute,#download-monitor-file .dlm-metaboxes-wrapper button.add_variable_attribute,#download-monitor-file .dlm-metaboxes-wrapper select.attribute_taxonomy{float:right;margin:0 0 0 6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metaboxes{padding:0 12px 0}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox-sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;margin:9px 0;border-width:1px;border-style:dashed}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox{background:#ececec;border:1px solid #ececec;margin:9px 0!important}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3{margin:0!important;padding:6px!important;font-size:1em!important;overflow:hidden;zoom:1;cursor:move}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 button{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 strong{line-height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 select{font-family:sans-serif}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox h3 .handlediv{background-position:6px 5px!important;display:none!important;height:24px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:hover h3 .handlediv{display:block}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table{width:100%;position:relative;background:#fff;padding:3px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td{text-align:left;padding:6px 6px;vertical-align:top;border:0;line-height:26px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td label{text-align:left;display:block;line-height:21px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input{float:left;min-width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{width:100%;margin:0;display:block;font-size:14px;padding:4px;color:#555}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td textarea{height:7.5em}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td select{width:100%}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.short{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.checkbox{width:auto;min-width:inherit;vertical-align:middle;display:inline;float:none}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.date-picker-field{width:50%;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.hour,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td input.minute{width:2em;min-width:inherit;float:none;display:inline}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table td.attribute_name{width:200px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .minus,#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .plus{margin-top:6px}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fl{float:left}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox table .fr{float:right}#download-monitor-file .dlm-metaboxes-wrapper .dlm-metabox:first-child h3{background-color:#fafafa;border-bottom:1px solid #dcdcde}#download-monitor-file .dlm-metaboxes-wrapper .plus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f132";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .minus:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f460";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_upload_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f317";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-file .dlm-metaboxes-wrapper .dlm_browse_for_file:before{font-family:dashicons!important;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0 4px 0 0;content:"\f322";top:1px;left:-1px;font-size:1em;line-height:inherit;position:relative;vertical-align:top}#download-monitor-information .dlm_information_panel div p{overflow:hidden;width:100%;font-weight:700;box-sizing:border-box;line-height:28px;margin-bottom:5px}#download-monitor-information .dlm_information_panel input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 45px)}#download-monitor-options .inside{padding:0;margin:0}#download-monitor-options .form-field-checkbox label{display:inline;padding:0 0 4px}#download-monitor-options .form-field-checkbox input{display:inline-block;width:auto;vertical-align:middle}#download-monitor-options .form-field-checkbox .dlm-description{padding:4px 0 0 0;display:block}#download-monitor-options .access_permissions{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options .access_permissions h4{margin-bottom:.5em;margin:0 0 .5em}#download-monitor-options .access_permissions ul{background:#fff;border:1px solid #dfdfdf;height:110px;overflow:auto;padding:.5em .9em;margin:0}#download-monitor-options p{margin:0!important;border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;padding:7px 12px!important;overflow:hidden;zoom:1}#download-monitor-options p.not-active{opacity:.7}#download-monitor-options .options_upsell_link{color:unset;text-decoration:none}#download-monitor-options .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:5px;border-radius:10px}#insert-download{padding:20px 20px}#insert-download #drag-drop-area,#insert-download #insert-shortcode{margin:1em 0}#insert-download .error,#insert-download .updated{margin-left:0;margin-right:0}#insert-download h2{margin-top:0}#insert-download label{margin:0 0 .25em 0;display:block;font-size:1.1em}#insert-download span.description{display:block}#insert-download input.input{margin:0 0 .25em 0;display:block;width:100%;font-size:1.1em}#insert-download .add_link{float:right}#insert-download ul.page-numbers{overflow:hidden;zoom:1;margin:0 auto;padding:0;text-align:center}#insert-download ul.page-numbers li{display:inline-block;margin:0;list-style:none outside;line-height:1em}#insert-download ul.page-numbers li a,#insert-download ul.page-numbers li span{text-decoration:none;border:1px solid #ddd;-webkit-border-radius:4px;border-radius:4px;padding:8px;display:block}#insert-download ul.page-numbers li span{border-color:#eee}#insert-download legend{font-weight:700;display:block;margin:0 0 1em}#insert-download fieldset label{display:block;margin:0 0 .5em}.dlm-code-nginx-rules{display:block}.settings_panel .form-table td{padding-left:0}.settings_panel .dlm-lazy-select-loader{display:inline-block;vertical-align:middle;padding:0 0 0 3px}.settings_panel .dlm-lazy-select-loader img{display:inline-block;height:25px;width:25px;margin-top:1px}.dlm-reports h1 .dlm-reports-actions{float:right}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period,.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{margin:0 5px;float:left}.dlm-reports h1 .dlm-reports-actions>:last-child{margin-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector{position:relative;font-size:14px;padding:0 .5em 0 1em;background:#fff;border:1px solid #ccc;border-radius:3px;user-select:none;cursor:pointer}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm-arrow:before{font-family:dashicons!important;content:"\f140";font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.6em;vertical-align:middle;margin-top:-2px}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay{display:block;width:466px;padding:10px;background:#fff;border:1px solid #ccc;position:absolute;top:30px;right:0;z-index:10;overflow:hidden}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date{font-size:70%;margin-right:5px;float:left;z-index:11}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline{border:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-highlight{background:#e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;color:#555;border:1px solid #d3d3d3}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline .ui-state-active{border:1px solid #aaa;background:#fff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th{padding:0;margin:0;line-height:2em}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline td a,.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_date .ui-datepicker-inline th a{text-align:center!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-date-selector .dlm_rdrs_overlay .dlm_rdrs_actions{width:70px;padding-left:10px;text-align:center;float:left}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher{display:block;margin-top:1px;padding-top:4px;color:#23282d;text-decoration:none}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher:before{font-family:dashicons!important;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:1.4em}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-line:before{content:"\f238"}.dlm-reports h1 .dlm-reports-actions a.dlm-reports-header-chart-switcher.dlm-bar:before{content:"\f185"}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a{border-color:#ccc!important}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:first-child{border-bottom-right-radius:0;border-top-right-radius:0;border-right:0}.dlm-reports h1 .dlm-reports-actions .dlm-reports-header-period a:last-child{border-bottom-left-radius:0;border-top-left-radius:0;border-left:0}.dlm-reports .dlm_reports_loader{position:absolute;width:32px;height:32px;top:50%;left:50%;margin:-16px 0 0 -16px}.dlm-reports .dlm-reports-block-chart{width:100%;height:300px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden}.dlm-reports .dlm-reports-block-chart .chart-container h6{display:none}.dlm-reports .dlm-reports-block-summary #popular span{line-height:1em}.dlm-reports .dlm-reports-block{position:relative;box-sizing:border-box;width:100%;padding:20px 10px;margin-top:20px;background:#fff;border:1px solid #e5e5e5;overflow:hidden;float:left}.dlm-reports .dlm-reports-block.dlm-reports-block-half{width:49%;margin-right:1%}.dlm-reports .dlm-reports-block.dlm-reports-block-half-right{width:49%;margin-left:1%}.dlm-reports .dlm-reports-block .dlm-reports-placeholder-no-data{display:inline-block;width:100%;font-size:1.5em;color:#b4b9be;font-style:italic;text-align:center}.dlm-reports .dlm-reports-block ul{box-sizing:border-box;width:100%;padding:0;margin:0}.dlm-reports .dlm-reports-block ul li{display:inline-block;width:33%;padding:5px 0}.dlm-reports .dlm-reports-block ul li label,.dlm-reports .dlm-reports-block ul li span{display:block;width:100%;text-align:center}.dlm-reports .dlm-reports-block ul li span{font-size:2.5em;font-weight:700;padding:.5em 0 0}.dlm-reports .dlm-reports-block table{width:100%}.dlm-reports .dlm-reports-block table td,.dlm-reports .dlm-reports-block table th{text-align:center;padding:10px 0;border-bottom:1px solid #e5e5e5}.dlm-reports .dlm-reports-block table td:first-child,.dlm-reports .dlm-reports-block table th:first-child{text-align:left}.dlm-reports .dlm-reports-block table th{padding-bottom:20px}.dlm-reports-block-summary{background:#333!important;color:#fff}.post-type-dlm_product table.wp-list-table .column-title{width:65%!important}.dlm_mb_shop_product_information .dlm_shop_field_row{width:100%;overflow:hidden}.dlm_mb_shop_product_information .dlm_shop_field_row label.dlm_shop_field_label{display:inline-block;width:20%;height:100%;line-height:2.2em;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input{display:inline-block;width:50%;float:left}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .dlm_shop_input{width:100%;padding:5px 7px}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection--multiple{border:1px solid #ddd}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search,.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-selection__choice{margin-bottom:0}.dlm_mb_shop_product_information .dlm_shop_field_row span.dlm_shop_field_input .select2-search__field{padding-top:3px}.dlm-order-overview #dlm_empty_trash{margin-left:3px}.dlm-order-overview .wp-list-table td .column-id{width:25%}.dlm-order-details{max-width:1250px;margin-left:auto;margin-right:auto;padding-right:20px}.dlm-order-details h1{padding-bottom:25px}.dlm-order-details .dlm-order-details-main,.dlm-order-details .dlm-order-details-side{width:100%;float:left}.dlm-order-details .dlm-order-details-block{padding:0;margin-bottom:20px;line-height:1;border:1px solid #e5e5e5;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,.04)}.dlm-order-details .dlm-order-details-block h2.dlm-order-details-block-title{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #eee}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside{margin:6px 0 0 0;padding:6px 12px 12px;line-height:1.4em;font-size:13px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside label{display:block;font-weight:700;padding-bottom:6px}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside p{padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul,.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{list-style:none;padding:0;margin:0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside ul li{padding:6px 0}.dlm-order-details .dlm-order-details-block .dlm-order-details-block-inside .dlm-order-details-current-state{width:70%;height:30px}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer .dlm-order-details-customer-image{float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li{margin-bottom:4px;padding:0}.dlm-order-details .dlm-order-details-block.dlm-order-details-customer ul li:first-child{font-weight:700}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items{overflow:hidden}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview{width:25%;float:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td,.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{padding-top:1.5em;padding-bottom:1.5em;text-align:right}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview th{width:50%;font-weight:400}.dlm-order-details .dlm-order-details-block.dlm-order-details-order-items .dlm-order-details-overview td{padding-right:1em;font-weight:700}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table{width:100%}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{text-align:center}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td:first-child,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th:first-child{text-align:left;padding-left:.5em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th{padding-top:.5em;padding-bottom:.5em;border-bottom:2px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td{padding-top:1.5em;padding-bottom:1.5em;border-bottom:1px solid #c3c1bc}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-details-order-items-item-total,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-details-order-items-item-total{text-align:right;padding-right:1em}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:none}.dlm-order-details .dlm-order-details-block .dlm-order-details-update-successful{font-size:2em;padding:.2em .3em;color:#46b450}@media (min-width:768px){.dlm-order-details .dlm-order-details-main{width:62%;float:left}.dlm-order-details .dlm-order-details-side{width:35%;float:right}.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table td.dlm-order-transaction-processor-id,.dlm-order-details .dlm-order-details-block table.dlm-order-details-data-table th.dlm-order-transaction-processor-id{display:table-cell}}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-one-col{margin:0 auto;max-width:680px}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-cta{margin-top:40px;text-align:center}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col{max-width:680px;margin:40px auto 0;overflow:hidden;display:flex;justify-content:space-between;flex-wrap:wrap}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:2.5em;flex:1;align-self:flex-start;min-width:100%;max-width:100%}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col img{width:100%}.dlm-onboarding .dlm-onboarding-section h2{margin:60px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.dlm-onboarding .dlm-onboarding-section p{max-width:55em;margin:.6em auto 0 auto}.dlm-onboarding .dlm-onboarding-section a.button-hero{height:46px;font-size:14px;line-height:44px;padding:0 36px;font-weight:700;text-align:center}.dlm-onboarding .dlm-onboarding-pages{max-width:55em;margin:0 auto;padding:2em 0 0}.dlm-onboarding .dlm-onboarding-pages a.button-hero{width:170px}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists{background:#46b450;border-color:#46b450 #4a8442 #467a3f;box-shadow:0 2px 0 #467a3f;text-shadow:0 -1px 1px #4a8442,1px 0 1px #4a8442,0 1px 1px #4a8442,-1px 0 1px #4a8442}.dlm-onboarding .dlm-onboarding-pages a.button-hero.dlm-page-exists:active{box-shadow:0 2px 0 #467a3f}.dlm-onboarding .dlm-onboarding-pages td,.dlm-onboarding .dlm-onboarding-pages th{padding:1em 0;border-bottom:1px solid #ccc}.dlm-onboarding .dlm-onboarding-pages th{width:13%;min-width:6em;text-align:left}.dlm-onboarding .dlm-onboarding-pages td{padding-right:.5em;padding-left:.5em}.dlm-onboarding .dlm-onboarding-pages td.dlm-onboarding-pages-page-title{font-weight:700}@media (min-width:768px){.dlm-onboarding .dlm-onboarding-section .dlm-onboarding-pages{width:55em}.dlm-onboarding .dlm-onboarding-section.dlm-onboarding-section-three-col .dlm-onboarding-col{padding-top:0;min-width:31%;max-width:31%}}.dlm_extensions_wrap a.dlm-reload-button{float:right;position:relative;top:-40px}.dlm_extensions_wrap #available-extensions{clear:both}.dlm_extensions_wrap .dlm_extensions{padding:15px 0;overflow:hidden}.dlm_extensions_wrap .dlm_extensions .dlm_extension{background-color:#fff;width:calc(20% - 15px);margin:0 15px 15px 0;display:inline-block;vertical-align:top}.dlm_extensions_wrap .dlm_extensions .dlm_extension p{margin:0}.dlm_extensions_wrap .dlm_extensions .dlm_extension a{color:#444;text-decoration:none}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper{width:100%;background:#419ccb;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .dlm_extension_img_wrapper img{max-width:100%;margin:0 auto}.dlm_extensions_wrap .dlm_extensions .dlm_extension h3{padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension div.extension-desc{min-height:120px;padding:0 20px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer{padding:15px 15px 15px 0;text-align:right;background-color:#fafafa;border-top:1px solid #dcdcde}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price{font-weight:700}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale{color:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .loop_price.sale strike{color:#444}.dlm_extensions_wrap .dlm_extensions .dlm_extension .product_footer .button .dashicons{vertical-align:middle;font-size:16px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license{padding:0 20px 20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error{padding:.5em;margin-bottom:15px;background:#ffffe0}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license div.dlm_license_error a{color:#00f;text-decoration:underline}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status{padding:5px 0;margin:5px 0;background:red;font-weight:700;font-size:1.2em;color:#fff;text-align:center}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license p.license-status.active{background:green}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license input{width:100%;margin:7px 0;padding:7px}.dlm_extensions_wrap .dlm_extensions .dlm_extension .extension_license a.button-primary{width:100%;margin:5px auto 0;color:#fff;text-align:center}#ui-datepicker-div{display:none}.wpchill-upsell{background:#fff;border:0;padding:15px;margin-top:30px}.wpchill-upsell .wpchill-upsell-features{text-align:left;display:flex;flex-wrap:wrap;padding:20px 0}.wpchill-upsell .wpchill-upsell-features li{width:33%}.wpchill-upsells-wrapper{width:100%}.wrap.dlm-admin-settings .form-table{width:65%;float:left}.wrap.dlm-admin-settings .form-table+.wpchill-upsells-wrapper{width:30%;float:right}.wrap.dlm-admin-settings .dlm-upsell-badge{font-size:10px;background:#f4daa4;padding:2px 5px;display:inline-block;margin-left:10px;border-radius:10px}#total_downloads_browser_table a.nav-tab{text-transform:capitalize}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{display:flex;flex-wrap:wrap;background:#f1f1f1}#dlm-amazon-s3-upsell .inside .wpchill-upsell,#dlm-buttons-upsell .inside .wpchill-upsell,#dlm-download-page-upsell .inside .wpchill-upsell,#dlm-google-drive-upsell .inside .wpchill-upsell{background:0 0;text-align:center;width:100%;margin-top:0}#dlm-amazon-s3-upsell .inside,#dlm-buttons-upsell .inside,#dlm-download-page-upsell .inside,#dlm-google-drive-upsell .inside{margin:0;padding:0}.upsells-columns{display:flex;flex-wrap:wrap;align-items:center;align-content:center}.upsells-columns .upsells-columns-2{width:50%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column{width:100%;text-align:center;display:flex;align-items:center;align-content:center}.upsells-columns .upsells-column>*{display:inline-block;align-content:center;vertical-align:middle;margin:0 15px;padding:10px 0}.upsells-columns .upsells-column>.wpchill-upsell{position:relative;float:none;flex-grow:1;display:flex;align-items:center}.upsells-columns .upsells-column>.wpchill-upsell .wpchill-upsell-description{margin:0 auto}.upsells-columns .upsells-column h3{line-height:1.3em}.upsells-columns .upsells-column:last-child{border-top:1px solid #c3c4c7;border-bottom:1px solid #c3c4c7}.upsells-columns .wpchill-upsell{margin-top:0}.dlm_download_page_dlm-extensions .theme.dlm_extension{background-color:#fff}#menu-posts-dlm_download ul.wp-submenu a[href$=dlm-lite-vs-pro]{color:gold}body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap{margin-left:0;max-width:85%}.rsvp-lite-vs-premium,.rsvp-lite-vs-premium p{font-size:14px;margin:0}.rsvp-lite-vs-premium>.wpchill-plans-table.wpchill-highlight>.wpchill-pricing-package{background:#fefff0;box-shadow:0 0 15px rgb(208 219 219)}.rsvp-lite-vs-premium .wp-badge{display:inline-block;vertical-align:middle;position:relative;margin-right:2.5%}.rsvp-lite-vs-premium h3{display:block;position:relative;font-size:16px;margin:0}.rsvp-lite-vs-premium .wpchill-plans-table{display:flex}.rsvp-lite-vs-premium .wpchill-plans-table.table-header{margin-top:50px;border-top:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package{border:0}.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package.wpchill-title.wpchill-highlight::before,.rsvp-lite-vs-premium .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:'';width:auto;display:inline-block;opacity:1;position:absolute;top:-1px;background:#41495b;text-align:center;left:0;right:0;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 5px;transform:translateY(-100%)}.rsvp-lite-vs-premium.table-footer .wpchill-pricing-package:last-child{border:0}.rsvp-lite-vs-premium .wpchill-pricing-package{text-align:center;line-height:1.5;padding:10px 15px;display:flex;align-content:center;align-items:center;justify-content:center;background:#fff;border-top:1px solid #ccc;width:32%}.rsvp-lite-vs-premium .wpchill-pricing-package:not(:first-child){max-width:300px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title{font-weight:400;color:#666;font-size:1.25rem;height:auto;-ms-flex-direction:column;flex-direction:column;padding-top:30px;padding-bottom:30px;justify-content:space-between;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-name{margin:0;font-size:36px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title.wpchill-modula-lite{justify-content:center}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title p.description{font-style:italic;font-size:13px;margin-bottom:40px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child{font-size:30px;margin:0 0 40px 0}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price{margin:0;position:relative}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after{content:"";height:2px;width:60px;background:red;display:block;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%)}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-title .wpchill-price sup{top:2px;position:relative;font-size:15px}.rsvp-lite-vs-premium .wpchill-pricing-package.wpchill-empty{background:0 0;border-color:transparent}.rsvp-lite-vs-premium .wpchill-pricing-package.feature-name{justify-content:space-between;font-weight:400;text-align:left;font-size:13px;display:block;background:0 0}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-saved{color:green}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons{width:30px;height:30px;font-size:30px}.rsvp-lite-vs-premium .wpchill-pricing-package .dashicons-no-alt{color:#ff3439}.rsvp-lite-vs-premium .wpchill-pricing-package:last-child{background:#fefff0}.rsvp-lite-vs-premium .button .dashicons{font-size:16px;vertical-align:middle;line-height:26px}
assets/css/admin.less CHANGED
@@ -1,1668 +1,2102 @@
1
- .iconbefore( @glyph: "\f333" ) {
2
- font-family: dashicons !important;
3
- speak: none;
4
- font-weight: normal;
5
- font-variant: normal;
6
- text-transform: none;
7
- -webkit-font-smoothing: antialiased;
8
- -moz-osx-font-smoothing: grayscale;
9
- margin: 0 4px 0 0;
10
- content: @glyph;
11
- top: 1px;
12
- left: -1px;
13
- font-size: 1em;
14
- line-height: inherit;
15
- position: relative;
16
- vertical-align: top;
17
- }
18
-
19
- /* Logs */
20
- .post-type-dlm_download {
21
- h1 {
22
- a.dlm-delete-logs {
23
- color: #a00;
24
- &:hover {
25
- color: #fff;
26
- background: #a00;
27
- border-color: #7C0900;
28
- }
29
- }
30
- }
31
-
32
- .dlm-page-header {
33
- border-bottom: 1px solid #ccc;
34
- padding: 15px 20px;
35
- display: flex;
36
- justify-content: space-between;
37
- background: #fff;
38
- width: calc( 100% + 20px );
39
- box-sizing: border-box;
40
- margin-left: -20px;
41
-
42
- .dlm-header-links {
43
- margin-left: -20px;
44
- a {
45
- span {
46
- vertical-align: middle;
47
- }
48
- }
49
- }
50
- .dlm-header-logo img {
51
- max-height : 35px;
52
- }
53
- }
54
- }
55
-
56
- #dlm_logs {
57
- td {
58
- padding: 7px 7px;
59
- vertical-align: middle;
60
- }
61
- .check-column {
62
- width: 1%;
63
- padding: 0;
64
- vertical-align: middle;
65
- }
66
-
67
- .column-status {
68
- width: 2%;
69
- }
70
- td.column-status {
71
- font-size: 10px;
72
- vertical-align: middle;
73
- text-align: center;
74
- span {
75
- color: #fff;
76
- font-weight: normal;
77
- -moz-border-radius: 50%;
78
- -webkit-border-radius: 50%;
79
- border-radius: 50%;
80
- height: 18px;
81
- line-height: 18px;
82
- width: 18px;
83
- display: inline-block;
84
- background: url('../images/log-status-icons.png') top left no-repeat;
85
- }
86
- .completed {
87
- background-color: #6cc644;
88
- }
89
- .failed {
90
- background-color: #bd2c00;
91
- background-position-y: -18px;
92
- }
93
- .redirected {
94
- background-color: #1c769b;
95
- background-position-y: -36px;
96
- }
97
- }
98
- td.column-user_ip, td.column-user_agent {
99
- font-family: monospace;
100
- font-weight: normal;
101
- }
102
- span.dlm-description {
103
- font-weight: normal;
104
- }
105
- .column-download, .column-file, .column-user, .column-user_ua {
106
- width: 16% !important;
107
- }
108
- .column-user_ip, .column-date {
109
- width: 6% !important;
110
- }
111
- }
112
-
113
- .post-type-dlm_download {
114
- .inline-edit-row {
115
- .inline-edit-col-dlm {
116
- .inline-edit-col-dlm-inner {
117
- margin-top: 10px;
118
- }
119
- }
120
- }
121
- }
122
-
123
- /** Settings */
124
- .dlm-settings-sub-nav {
125
- margin: 0 0 10px 0;
126
- width: 100%;
127
- border-bottom: 1px solid #ccc;
128
- box-shadow: 0 1px 1px rgba(0,0,0,.04);
129
- li {
130
- margin-right: 10px;
131
- margin-bottom: -2px;
132
- }
133
- a {
134
- padding: 13px;
135
- display: block;
136
- }
137
- .active-section {
138
- margin-bottom: -2px;
139
- a {
140
- border-bottom: 4px solid #000;
141
- padding-bottom: 9px;
142
- margin-bottom: -2px;
143
- font-weight: 600;
144
- }
145
- }
146
- }
147
-
148
- .admin-color-blue {
149
- .dlm-settings-sub-nav {
150
- .active-section {
151
- a {
152
- border-bottom-color: #096484;
153
- }
154
- }
155
- }
156
- }
157
- .admin-color-coffee {
158
- .dlm-settings-sub-nav {
159
- .active-section {
160
- a {
161
- border-bottom-color: #c7a589;
162
- }
163
- }
164
- }
165
- }
166
- .admin-color-ectoplasm {
167
- .dlm-settings-sub-nav {
168
- .active-section {
169
- a {
170
- border-bottom-color: #a3b745;
171
- }
172
- }
173
- }
174
- }
175
- .admin-color-midnight {
176
- .dlm-settings-sub-nav {
177
- .active-section {
178
- a {
179
- border-bottom-color: #e14d43;
180
- }
181
- }
182
- }
183
- }
184
- .admin-color-ocean {
185
- .dlm-settings-sub-nav {
186
- .active-section {
187
- a {
188
- border-bottom-color: #627c83;
189
- }
190
- }
191
- }
192
- }
193
- .admin-color-sunrise {
194
- .dlm-settings-sub-nav {
195
- .active-section {
196
- a {
197
- border-bottom-color: #be3631;
198
- }
199
- }
200
- }
201
- }
202
- .admin-color-light {
203
- .dlm-settings-sub-nav {
204
- .active-section {
205
- a {
206
- border-bottom-color: #888;
207
- }
208
- }
209
- }
210
- }
211
- .admin-color-evergreen {
212
- .dlm-settings-sub-nav {
213
- .active-section {
214
- a {
215
- border-bottom-color: #36533f;
216
- }
217
- }
218
- }
219
- }
220
- .admin-color-mint {
221
- .dlm-settings-sub-nav {
222
- .active-section {
223
- a {
224
- border-bottom-color: #4f6d59;
225
- }
226
- }
227
- }
228
- }
229
- .admin-color-modern {
230
- .dlm-settings-sub-nav {
231
- .active-section {
232
- a {
233
- border-bottom-color: #3858e9;
234
- }
235
- }
236
- }
237
- }
238
-
239
- .dlm-admin-settings {
240
-
241
- #setting-dlm_decimal_separator, #setting-dlm_thousand_separator {
242
- width: 50px;
243
- }
244
-
245
- table {
246
- td {
247
- padding: 15px 0;
248
- }
249
- }
250
-
251
- h3 {
252
- margin: 2em 0 0;
253
- }
254
- }
255
-
256
- /* File lists */
257
- ul.download_monitor_file_browser {
258
- list-style: none outside;
259
- margin: 0;
260
- border: 1px solid #ddd;
261
- -moz-border-radius: 3px;
262
- -webkit-border-radius: 3px;
263
- border-radius: 3px;
264
- background: #f9f9f9;
265
- padding: 5px 5px;
266
- -moz-box-shadow: inset 0 0 0 1px #fff;
267
- -webkit-box-shadow: inset 0 0 0 1px #fff;
268
- box-shadow: inset 0 0 0 1px #fff;
269
-
270
- li {
271
- padding: 0;
272
- margin: 0;
273
- a {
274
- color: #21759B;
275
- display: block;
276
- padding: 4px 0 4px 4px;
277
- text-decoration: none;
278
-
279
- &:hover {
280
- background-color: #eaf2fa;
281
- }
282
- &:before {
283
- .iconbefore("\f123");
284
- }
285
- &.folder:before {
286
- .iconbefore("\f318");
287
- }
288
-
289
- // Videos
290
- &.filetype-mov, &.filetype-avi, &.filetype-3g2, &.filetype-3gp, &.filetype-asf, &.filetype-asx, &.filetype-mp4, &.filetype-mpg, &.filetype-rm, &.filetype-srt, &.filetype-vob, &.filetype-wmv {
291
- &:before {
292
- .iconbefore("\f126");
293
- }
294
- }
295
-
296
- // Audio
297
- &.filetype-mp3, &.filetype-aif, &.filetype-iff, &.filetype-m3u, &.filetype-m4a, &.filetype-mid, &.filetype-midi, &.filetype-mpa, &.filetype-ra, &.filetype-wav, &.filetype-wma {
298
- &:before {
299
- .iconbefore("\f127");
300
- }
301
- }
302
-
303
- // Images
304
- &.filetype-psd, &.filetype-ai, &.filetype-eps, &.filetype-ps, &.filetype-svg, &.filetype-bmp, &.filetype-dds, &.filetype-gif, &.filetype-jpg, &.filetype-jpeg, &.filetype-png, &.filetype-pspimage, &.filetype-tga, &.filetype-thm, &.filetype-tif, &.filetype-yuv, &.filetype-ico {
305
- &:before {
306
- .iconbefore("\f128");
307
- }
308
- }
309
- }
310
-
311
- &.nofiles {
312
- color: #999;
313
- font-style: italic;
314
- padding: 4px 0;
315
- }
316
-
317
- ul {
318
- list-style: none outside;
319
- margin: 0;
320
- padding: 0 0 0 28px;
321
-
322
- &.loading {
323
- background: url(../images/ajax-loader.gif) no-repeat 24px 0;
324
- height: 32px;
325
- }
326
- }
327
- }
328
- }
329
-
330
- /* Download list */
331
- table.wp-list-table {
332
- .column-thumb {
333
- width: 44px;
334
- text-align: center;
335
- white-space: nowrap
336
- }
337
- .column-dlm_download_cat, .column-dlm_download_tag, .column-file {
338
- width: 11% !important;
339
- }
340
- .column-title, .column-file {
341
- width: 17% !important;
342
- }
343
- .column-download_id, .column-version {
344
- width: 5em;
345
- }
346
- th.column-thumb, th.column-download_count, th.column-members_only, th.column-redirect_only, th.column-featured {
347
- span:first-child {
348
- float: none;
349
- display: inline-block;
350
- width: 1em;
351
- height: 1em;
352
- line-height: 1em;
353
- padding: 2px 0 0 0;
354
- overflow: hidden;
355
- }
356
- .sorting-indicator {
357
- float: right;
358
- }
359
- }
360
- th.column-thumb {
361
- width: 52px;
362
- text-align: center;
363
- span:first-child {
364
- &:before {
365
- .iconbefore("\f128");
366
- }
367
- }
368
- }
369
- th.column-download_count {
370
- width: 5em;
371
- span:first-child {
372
- &:before {
373
- .iconbefore("\f346");
374
- }
375
- }
376
- }
377
- th.column-members_only {
378
- width: 3.5em;
379
- span:first-child {
380
- &:before {
381
- .iconbefore("\f338");
382
- }
383
- }
384
- }
385
- th.column-redirect_only {
386
- width: 3.5em;
387
- span:first-child {
388
- &:before {
389
- .iconbefore("\f103");
390
- }
391
- }
392
- }
393
- th.column-featured {
394
- width: 3.5em;
395
- span:first-child {
396
- &:before {
397
- .iconbefore("\f155");
398
- }
399
- }
400
- }
401
- td.column-download_count, td.column-members_only, td.column-redirect_only, td.column-featured {
402
- text-align: left;
403
- padding-left: 11px;
404
- span.na {
405
- color: #999;
406
- width: 1em;
407
- height: 1em;
408
- line-height: 1em;
409
- display: inline-block;
410
- overflow: hidden;
411
- vertical-align: middle;
412
- &:before {
413
- .iconbefore("\f460");
414
- }
415
- }
416
- span.yes {
417
- width: 1em;
418
- height: 1em;
419
- line-height: 1em;
420
- display: inline-block;
421
- overflow: hidden;
422
- vertical-align: middle;
423
- &:before {
424
- .iconbefore("\f147");
425
- }
426
- }
427
- }
428
- .column-thumb img {
429
- padding: 2px;
430
- margin: 0;
431
- border: 1px solid #dfdfdf;
432
- vertical-align: middle;
433
- width: 32px;
434
- height: 32px;
435
- }
436
- }
437
-
438
- /* Meta boxes */
439
- #download-monitor-file {
440
- .inside {
441
- padding: 0;
442
- margin: 0;
443
- }
444
- .dlm-metaboxes-wrapper {
445
- .expand_all, .close_all {
446
- float: right;
447
- margin-left: 1em;
448
- line-height: 22px;
449
- text-decoration: none;
450
- }
451
- .expand_all {
452
- &:before {
453
- .iconbefore("\f168");
454
- }
455
- }
456
- .close_all {
457
- &:before {
458
- .iconbefore("\f460");
459
- }
460
- }
461
- p.toolbar {
462
- margin: 0 !important;
463
- border-top: 1px solid white;
464
- border-bottom: 1px solid #DFDFDF;
465
- padding: 7px 12px !important;
466
- overflow: hidden;
467
- zoom: 1;
468
-
469
- a.button {
470
- float: left;
471
- margin: 0;
472
- }
473
- }
474
- select.attribute_taxonomy, button.add_attribute, button.add_variable_attribute, .fr {
475
- float: right;
476
- margin: 0 0 0 6px;
477
- }
478
- .dlm-metaboxes {
479
- padding: 0 12px 0;
480
- }
481
- .dlm-metabox-sortable-placeholder {
482
- border-color: #bbb;
483
- background-color: #f5f5f5;
484
- margin: 9px 0;
485
- border-width: 1px;
486
- border-style: dashed;
487
- }
488
- .dlm-metabox {
489
- background: #ececec;
490
- border: 1px solid #ececec;
491
- margin: 9px 0 !important;
492
- h3 {
493
- margin: 0 !important;
494
- padding: 6px !important;
495
- font-size: 1em !important;
496
- overflow: hidden;
497
- zoom: 1;
498
- cursor: move;
499
- button {
500
- float: right;
501
- }
502
- strong {
503
- line-height: 24px;
504
- }
505
- select {
506
- font-family: sans-serif;
507
- }
508
- .handlediv {
509
- background-position: 6px 5px !important;
510
- display: none !important;
511
- height: 24px;
512
- }
513
- }
514
- &:hover h3 .handlediv {
515
- display: block;
516
- }
517
- table {
518
- width: 100%;
519
- position: relative;
520
- background: #fff;
521
- padding: 3px;
522
- td {
523
- text-align: left;
524
- padding: 6px 6px;
525
- vertical-align: top;
526
- border: 0;
527
- line-height: 26px;
528
- label {
529
- text-align: left;
530
- display: block;
531
- line-height: 21px;
532
- }
533
- input {
534
- float: left;
535
- min-width: 200px;
536
- }
537
- input, textarea {
538
- width: 100%;
539
- margin: 0;
540
- display: block;
541
- font-size: 14px;
542
- padding: 4px;
543
- color: #555;
544
- }
545
- textarea {
546
- height: 7.5em;
547
- }
548
- select {
549
- width: 100%;
550
- }
551
- input.short {
552
- width: 200px;
553
- }
554
- input.checkbox {
555
- width: auto;
556
- min-width: inherit;
557
- vertical-align: middle;
558
- display: inline;
559
- float: none;
560
- }
561
- input.date-picker-field {
562
- width: 50%;
563
- min-width: inherit;
564
- float: none;
565
- display: inline;
566
- }
567
- input.minute, input.hour {
568
- width: 2em;
569
- min-width: inherit;
570
- float: none;
571
- display: inline;
572
- }
573
- }
574
- td.attribute_name {
575
- width: 200px;
576
- }
577
- .plus, .minus {
578
- margin-top: 6px;
579
- }
580
- .fl {
581
- float: left;
582
- }
583
- .fr {
584
- float: right;
585
- }
586
- }
587
- &:first-child {
588
- /* main file */
589
- h3 {
590
- background-color: #FAFAFA;
591
- border-bottom: 1px solid #dcdcde;
592
- }
593
- }
594
- }
595
- .plus:before {
596
- .iconbefore("\f132");
597
- }
598
- .minus:before {
599
- .iconbefore("\f460");
600
- }
601
- .dlm_upload_file:before {
602
- .iconbefore("\f317");
603
- }
604
- .dlm_browse_for_file:before {
605
- .iconbefore("\f322");
606
- }
607
- }
608
- }
609
-
610
- /* Writepanel forms */
611
- #download-monitor-information {
612
- .dlm_information_panel {
613
- div {
614
- p {
615
- overflow: hidden;
616
- width: 100%;
617
- font-weight: bold;
618
- box-sizing: border-box;
619
- line-height: 28px;
620
- margin-bottom: 5px;
621
- }
622
- }
623
- input {
624
- margin: 0;
625
- border-top-right-radius: 0;
626
- border-bottom-right-radius: 0;
627
- flex-grow: 1;
628
- width: calc(100% - 45px);
629
- }
630
- }
631
- }
632
-
633
- #download-monitor-options {
634
- .inside {
635
- padding: 0;
636
- margin: 0;
637
- }
638
- .form-field-checkbox {
639
- label {
640
- display: inline;
641
- padding: 0 0 4px;
642
- }
643
- input {
644
- display: inline-block;
645
- width: auto;
646
- vertical-align: middle;
647
- }
648
- .dlm-description {
649
- padding: 4px 0 0 0;
650
- display: block;
651
- }
652
- }
653
- .access_permissions {
654
- margin: 0 !important;
655
- border-top: 1px solid white;
656
- border-bottom: 1px solid #DFDFDF;
657
- padding: 7px 12px !important;
658
- overflow: hidden;
659
- zoom: 1;
660
-
661
- h4 {
662
- margin-bottom: .5em;
663
- margin: 0 0 .5em;
664
- }
665
- ul {
666
- background: #fff;
667
- border: 1px solid #dfdfdf;
668
- height: 110px;
669
- overflow: auto;
670
- padding: .5em .9em;
671
- margin: 0;
672
- }
673
- }
674
- p {
675
- margin: 0 !important;
676
- border-top: 1px solid white;
677
- border-bottom: 1px solid #DFDFDF;
678
- padding: 7px 12px !important;
679
- overflow: hidden;
680
- zoom: 1;
681
-
682
- &.not-active {
683
- opacity: 0.7;
684
- }
685
- }
686
- .options_upsell_link {
687
- color: unset;
688
- text-decoration: none;
689
- }
690
-
691
- .dlm-upsell-badge {
692
- font-size: 10px;
693
- background: #f4daa4;
694
- padding: 2px 5px;
695
- display: inline-block;
696
- margin-left: 5px;
697
- border-radius: 10px;
698
- }
699
- }
700
-
701
- #insert-download {
702
- padding: 20px 20px;
703
-
704
- #insert-shortcode, #drag-drop-area {
705
- margin: 1em 0;
706
- }
707
-
708
- .updated, .error {
709
- margin-left: 0;
710
- margin-right: 0;
711
- }
712
- h2 {
713
- margin-top: 0;
714
- }
715
- label {
716
- margin: 0 0 .25em 0;
717
- display: block;
718
- font-size: 1.1em;
719
- }
720
- span.description {
721
- display: block;
722
- }
723
- input.input {
724
- margin: 0 0 .25em 0;
725
- display: block;
726
- width: 100%;
727
- font-size: 1.1em;
728
- }
729
- .add_link {
730
- float: right;
731
- }
732
- ul.page-numbers {
733
- overflow: hidden;
734
- zoom: 1;
735
- margin: 0 auto;
736
- padding: 0;
737
- text-align: center;
738
- li {
739
- display: inline-block;
740
- margin: 0;
741
- list-style: none outside;
742
- line-height: 1em;
743
- a, span {
744
- text-decoration: none;
745
- border: 1px solid #ddd;
746
- -webkit-border-radius: 4px;
747
- border-radius: 4px;
748
- padding: 8px;
749
- display: block;
750
- }
751
- span {
752
- border-color: #eee;
753
- }
754
- }
755
- }
756
- legend {
757
- font-weight: bold;
758
- display: block;
759
- margin: 0 0 1em;
760
- }
761
- fieldset {
762
- label {
763
- display: block;
764
- margin: 0 0 .5em;
765
- }
766
- }
767
- }
768
-
769
- /* Settings */
770
- .dlm-code-nginx-rules {
771
- display: block;
772
- }
773
-
774
- .settings_panel {
775
- .form-table {
776
- td {
777
- padding-left: 0;
778
- }
779
- }
780
- .dlm-lazy-select-loader {
781
- display: inline-block;
782
- vertical-align: middle;
783
- padding: 0 0 0 3px;
784
- img {
785
- display: inline-block;
786
- height: 25px;
787
- width: 25px;
788
- margin-top: 1px;
789
- }
790
- }
791
- }
792
-
793
- /* Reports */
794
- .dlm-reports {
795
-
796
- h1 {
797
- .dlm-reports-actions {
798
- float: right;
799
-
800
- a.dlm-reports-header-chart-switcher,
801
- .dlm-reports-header-date-selector,
802
- .dlm-reports-header-period {
803
- margin: 0 5px;
804
- float: left;
805
- }
806
-
807
- & > :last-child {
808
- margin-right: 0;
809
- }
810
-
811
- .dlm-reports-header-date-selector {
812
-
813
- position: relative;
814
- font-size: 14px;
815
- padding: 0 .5em 0 1em;
816
- background: #fff;
817
- border: 1px solid #cccccc;
818
- border-radius: 3px;
819
-
820
- user-select: none;
821
-
822
- cursor: pointer;
823
-
824
- .dlm-arrow {
825
- &:before {
826
- font-family: "dashicons" !important;
827
- content: "\f140";
828
- font-style: normal;
829
- font-weight: normal;
830
- speak: none;
831
- display: inline-block;
832
- text-decoration: inherit;
833
- width: 1em;
834
- text-align: center;
835
- font-variant: normal;
836
- text-transform: none;
837
- line-height: 1em;
838
- font-size: 1.6em;
839
- vertical-align: middle;
840
- margin-top: -2px;
841
- }
842
- }
843
-
844
- .dlm_rdrs_overlay {
845
- display: block;
846
- width: 466px;
847
- //height: 198px;
848
- padding: 10px;
849
- background: #fff;
850
- border: 1px solid #cccccc;
851
- position: absolute;
852
- top: 30px;
853
- right: 0;
854
- z-index: 10;
855
- overflow: hidden;
856
-
857
- .dlm_rdrs_date {
858
- font-size: 70%;
859
- margin-right: 5px;
860
- float: left;
861
- z-index: 11;
862
-
863
- .ui-datepicker-inline {
864
- border: 0;
865
-
866
- .ui-state-highlight {
867
- background: #e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
868
- color: #555555;
869
- border: 1px solid #D3D3D3;
870
- }
871
-
872
- .ui-state-active {
873
- border: 1px solid #aaaaaa;
874
- background: #ffffff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
875
- }
876
-
877
- td, th {
878
- padding: 0;
879
- margin: 0;
880
- line-height: 2em;
881
- a {
882
- text-align: center !important;
883
- }
884
-
885
- }
886
- }
887
- }
888
- .dlm_rdrs_actions {
889
- width: 70px;
890
- padding-left: 10px;
891
- text-align: center;
892
- float: left;
893
- }
894
- }
895
-
896
- }
897
-
898
- a.dlm-reports-header-chart-switcher {
899
- display: block;
900
- margin-top: 1px;
901
- padding-top: 4px;
902
- color: #23282d;
903
- //border: 1px solid #23282d;
904
- text-decoration: none;
905
- &:before {
906
- font-family: "dashicons" !important;
907
- font-style: normal;
908
- font-weight: normal;
909
- speak: none;
910
- display: inline-block;
911
- text-decoration: inherit;
912
- width: 1em;
913
- text-align: center;
914
- font-variant: normal;
915
- text-transform: none;
916
- line-height: 1em;
917
- font-size: 1.4em;
918
- }
919
- &.dlm-line:before {
920
- content: "\f238";
921
- }
922
- &.dlm-bar:before {
923
- content: "\f185";
924
- }
925
- }
926
-
927
- .dlm-reports-header-period {
928
- a {
929
- border-color: #cccccc !important;
930
- }
931
- a:first-child {
932
- border-bottom-right-radius: 0;
933
- border-top-right-radius: 0;
934
- border-right: 0;
935
- }
936
- a:last-child {
937
- border-bottom-left-radius: 0;
938
- border-top-left-radius: 0;
939
- border-left: 0;
940
- }
941
- }
942
-
943
- }
944
- }
945
-
946
- .dlm_reports_loader {
947
- position: absolute;
948
- width: 32px;
949
- height: 32px;
950
- top: 50%;
951
- left: 50%;
952
- margin: -16px 0 0 -16px;
953
- }
954
-
955
- .dlm-reports-block-chart {
956
- width: 100%;
957
- height: 300px;
958
- margin-top: 20px;
959
- background: #fff;
960
- border: 1px solid #e5e5e5;
961
- overflow: hidden;
962
-
963
- .chart-container {
964
- h6 {
965
- display: none;
966
- }
967
- }
968
- }
969
-
970
- .dlm-reports-block-summary {
971
- #popular {
972
- span {
973
- line-height: 1em;
974
- }
975
- }
976
- }
977
-
978
- .dlm-reports-block {
979
- position: relative;
980
- box-sizing: border-box;
981
- width: 100%;
982
- //height: 300px;
983
- padding: 20px 10px;
984
- margin-top: 20px;
985
- background: #fff;
986
- border: 1px solid #e5e5e5;
987
- overflow: hidden;
988
- float: left;
989
-
990
- &.dlm-reports-block-half {
991
- width: 49%;
992
- margin-right: 1%;
993
- }
994
-
995
- &.dlm-reports-block-half-right {
996
- width: 49%;
997
- margin-left: 1%;
998
- }
999
-
1000
- .dlm-reports-placeholder-no-data {
1001
- display: inline-block;
1002
- width: 100%;
1003
- font-size: 1.5em;
1004
- color: #b4b9be;
1005
- font-style: italic;
1006
- text-align: center;
1007
- }
1008
-
1009
- ul {
1010
- box-sizing: border-box;
1011
- width: 100%;
1012
- padding: 0;
1013
- margin: 0;
1014
- li {
1015
- display: inline-block;
1016
- width: 33%;
1017
- padding: 5px 0;
1018
-
1019
- label, span {
1020
- display: block;
1021
- width: 100%;
1022
- text-align: center;
1023
- }
1024
- span {
1025
- font-size: 2.5em;
1026
- font-weight: bold;
1027
- padding: .5em 0 0;
1028
- }
1029
- }
1030
- }
1031
-
1032
- table {
1033
- width: 100%;
1034
-
1035
- th, td {
1036
- text-align: center;
1037
- padding: 10px 0;
1038
- border-bottom: 1px solid #e5e5e5;
1039
- &:first-child {
1040
- text-align: left;
1041
- }
1042
- }
1043
-
1044
- th {
1045
- padding-bottom: 20px;
1046
- }
1047
- }
1048
- }
1049
-
1050
- }
1051
-
1052
- .dlm-reports-block-summary {
1053
- background: #333!important;
1054
- color: white;
1055
- }
1056
-
1057
- /** Products overview page */
1058
- .post-type-dlm_product {
1059
- table.wp-list-table {
1060
- .column-title {
1061
- width: 65% !important;
1062
- }
1063
- }
1064
- }
1065
-
1066
- /** Products detail page */
1067
- .dlm_mb_shop_product_information {
1068
- .dlm_shop_field_row {
1069
- width: 100%;
1070
- overflow: hidden;
1071
- label.dlm_shop_field_label {
1072
- display: inline-block;
1073
- width: 20%;
1074
- height: 100%;
1075
- line-height: 2.2em;
1076
- float: left;
1077
- }
1078
- span.dlm_shop_field_input {
1079
- display: inline-block;
1080
- width: 50%;
1081
- float: left;
1082
-
1083
- .dlm_shop_input {
1084
- width: 100%;
1085
- padding: 5px 7px;
1086
- }
1087
-
1088
- .select2-selection--multiple {
1089
- border: 1px solid #dddddd;
1090
- }
1091
- .select2-search, .select2-selection__choice {
1092
- margin-bottom: 0;
1093
- }
1094
- .select2-search__field {
1095
- padding-top: 3px;
1096
- }
1097
- }
1098
- }
1099
- }
1100
-
1101
- /** Orders Overview */
1102
- .dlm-order-overview {
1103
-
1104
- #dlm_empty_trash {
1105
- margin-left: 3px;
1106
- }
1107
-
1108
- .wp-list-table {
1109
- td {
1110
- .column-id {
1111
- width: 25%;
1112
- }
1113
- }
1114
- }
1115
-
1116
- }
1117
-
1118
- /** Order details */
1119
- .dlm-order-details {
1120
-
1121
- max-width: 1250px;
1122
- margin-left: auto;
1123
- margin-right: auto;
1124
- padding-right: 20px;
1125
-
1126
- h1 {
1127
- padding-bottom: 25px;
1128
- }
1129
-
1130
- .dlm-order-details-main, .dlm-order-details-side {
1131
- width: 100%;
1132
- float: left;
1133
- }
1134
-
1135
- .dlm-order-details-block {
1136
- padding: 0;
1137
- margin-bottom: 20px;
1138
- line-height: 1;
1139
- border: 1px solid #e5e5e5;
1140
- background: #fff;
1141
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
1142
-
1143
- h2.dlm-order-details-block-title {
1144
- font-size: 14px;
1145
- padding: 8px 12px;
1146
- margin: 0;
1147
- line-height: 1.4;
1148
- border-bottom: 1px solid #eee;
1149
- }
1150
-
1151
- .dlm-order-details-block-inside {
1152
- margin: 6px 0 0 0;
1153
- padding: 6px 12px 12px;
1154
- line-height: 1.4em;
1155
- font-size: 13px;
1156
-
1157
- label {
1158
- display: block;
1159
- font-weight: bold;
1160
- padding-bottom: 6px;
1161
- }
1162
- p {
1163
- padding: 0;
1164
- margin: 0;
1165
- }
1166
-
1167
- ul {
1168
- &, li {
1169
- list-style: none;
1170
- padding: 0;
1171
- margin: 0;
1172
- }
1173
-
1174
- li {
1175
- padding: 6px 0;
1176
- }
1177
- }
1178
-
1179
- .dlm-order-details-current-state {
1180
- width: 70%;
1181
- height: 30px;
1182
- }
1183
-
1184
- }
1185
-
1186
- &.dlm-order-details-customer {
1187
- .dlm-order-details-customer-image {
1188
- float: right;
1189
- }
1190
- ul {
1191
- li {
1192
- margin-bottom: 4px;
1193
- padding: 0;
1194
-
1195
- &:first-child {
1196
- font-weight: bold;
1197
- }
1198
- }
1199
- }
1200
- }
1201
-
1202
- &.dlm-order-details-order-items {
1203
-
1204
- overflow: hidden;
1205
-
1206
- .dlm-order-details-overview {
1207
- width: 25%;
1208
- float: right;
1209
- th, td {
1210
- padding-top: 1.5em;
1211
- padding-bottom: 1.5em;
1212
- text-align: right;
1213
- }
1214
- th {
1215
- width: 50%;
1216
- font-weight: normal;
1217
- }
1218
- td {
1219
- padding-right: 1em;
1220
- font-weight: bold;
1221
- }
1222
- }
1223
- }
1224
-
1225
- table.dlm-order-details-data-table {
1226
- width: 100%;
1227
-
1228
- th, td {
1229
- text-align: center;
1230
- &:first-child {
1231
- text-align: left;
1232
- padding-left: .5em;
1233
- }
1234
- }
1235
-
1236
- th {
1237
- padding-top: .5em;
1238
- padding-bottom: .5em;
1239
- border-bottom: 2px solid #c3c1bc;
1240
- }
1241
-
1242
- td {
1243
- padding-top: 1.5em;
1244
- padding-bottom: 1.5em;
1245
- border-bottom: 1px solid #c3c1bc;
1246
- }
1247
-
1248
- th, td {
1249
- &.dlm-order-details-order-items-item-total {
1250
- text-align: right;
1251
- padding-right: 1em;
1252
- }
1253
-
1254
- &.dlm-order-transaction-processor-id {
1255
- display: none;
1256
- }
1257
- }
1258
-
1259
- }
1260
-
1261
- .dlm-order-details-update-successful {
1262
- font-size: 2em;
1263
- padding: 0.2em .3em;
1264
- color: #46b450;
1265
- }
1266
-
1267
- }
1268
-
1269
- }
1270
-
1271
- @media (min-width: 768px) {
1272
- .dlm-order-details {
1273
-
1274
- .dlm-order-details-main {
1275
- width: 62%;
1276
- float: left;
1277
- }
1278
-
1279
- .dlm-order-details-side {
1280
- width: 35%;
1281
- float: right;
1282
- }
1283
-
1284
- .dlm-order-details-block {
1285
- table.dlm-order-details-data-table {
1286
- th, td {
1287
-
1288
- &.dlm-order-transaction-processor-id {
1289
- display: table-cell;
1290
- }
1291
- }
1292
- }
1293
- }
1294
-
1295
- }
1296
- }
1297
-
1298
- /** Onboarding */
1299
- .dlm-onboarding {
1300
-
1301
- .dlm-onboarding-section {
1302
-
1303
- &.dlm-onboarding-section-one-col {
1304
- margin: 0 auto;
1305
- max-width: 680px;
1306
- }
1307
-
1308
- &.dlm-onboarding-section-cta {
1309
- margin-top: 40px;
1310
- text-align: center;
1311
- }
1312
-
1313
- &.dlm-onboarding-section-three-col {
1314
- //margin-top: 40px;
1315
- max-width: 680px;
1316
- margin: 40px auto 0;
1317
- //max-width: 1020px;
1318
- overflow: hidden;
1319
- display: flex;
1320
- justify-content: space-between;
1321
- flex-wrap: wrap;
1322
-
1323
- .dlm-onboarding-col {
1324
- padding-top: 2.5em;
1325
- flex: 1;
1326
- align-self: flex-start;
1327
- min-width: 100%;
1328
- max-width: 100%;
1329
-
1330
- img {
1331
- width: 100%;
1332
- }
1333
- }
1334
- }
1335
-
1336
- h2 {
1337
- margin: 60px 0 .6em;
1338
- font-size: 2.7em;
1339
- line-height: 1.3;
1340
- font-weight: 300;
1341
- text-align: center;
1342
- }
1343
-
1344
- p {
1345
- max-width: 55em;
1346
- margin: 0.6em auto 0 auto;
1347
- }
1348
-
1349
- a.button-hero {
1350
- height: 46px;
1351
- font-size: 14px;
1352
- line-height: 44px;
1353
- padding: 0 36px;
1354
- font-weight: bold;
1355
- text-align: center;
1356
- }
1357
-
1358
- }
1359
-
1360
- .dlm-onboarding-pages {
1361
- max-width: 55em;
1362
- margin: 0 auto;
1363
- padding: 2em 0 0;
1364
-
1365
- a.button-hero {
1366
- width: 170px;
1367
-
1368
- &.dlm-page-exists {
1369
- background: #46b450;
1370
- border-color: #46b450 #4a8442 #467a3f;
1371
- box-shadow: 0 2px 0 #467a3f;
1372
- text-shadow: 0 -1px 1px #4a8442, 1px 0 1px #4a8442, 0 1px 1px #4a8442, -1px 0 1px #4a8442;
1373
-
1374
- &:active {
1375
- box-shadow: 0 2px 0 #467a3f;
1376
- }
1377
- }
1378
- }
1379
-
1380
- th, td {
1381
- padding: 1em 0;
1382
- border-bottom: 1px solid #ccc;
1383
- }
1384
- th {
1385
- width: 13%;
1386
- min-width: 6em;
1387
- text-align: left;
1388
- }
1389
- td {
1390
- padding-right: .5em;
1391
- padding-left: .5em;
1392
- }
1393
- td.dlm-onboarding-pages-page-title {
1394
- font-weight: bold;
1395
- }
1396
- }
1397
-
1398
- }
1399
-
1400
- @media (min-width: 768px) {
1401
- .dlm-onboarding {
1402
-
1403
- .dlm-onboarding-section {
1404
- .dlm-onboarding-pages {
1405
- width: 55em;
1406
- }
1407
- &.dlm-onboarding-section-three-col {
1408
- .dlm-onboarding-col {
1409
- padding-top: 0;
1410
- min-width: 31%;
1411
- max-width: 31%;
1412
- }
1413
- }
1414
- }
1415
- }
1416
- }
1417
-
1418
- /* Extensions */
1419
- .dlm_extensions_wrap {
1420
- h1 {
1421
- a.dlm-reload-button {
1422
- float: right;
1423
- }
1424
- }
1425
- .dlm_extensions {
1426
- padding: 15px 0;
1427
- overflow: hidden;
1428
-
1429
- .dlm_extension {
1430
- background-color: #FFF;
1431
- width: calc( 20% - 15px);
1432
- margin: 0 15px 15px 0;
1433
- display: inline-block;
1434
- vertical-align: top;
1435
-
1436
- p {
1437
- margin: 0;
1438
- }
1439
-
1440
- a {
1441
- color: #444;
1442
- text-decoration: none;
1443
- }
1444
- .dlm_extension_img_wrapper {
1445
- width: 100%;
1446
- background: #419CCB;
1447
- text-align: center;
1448
- img {
1449
- max-width: 100%;
1450
- margin: 0 auto;
1451
- }
1452
- }
1453
- h3 {
1454
- padding: 0 20px;
1455
-
1456
- }
1457
- div.extension-desc {
1458
- min-height: 120px;
1459
- padding: 0 20px;
1460
- }
1461
- .product_footer {
1462
- padding: 15px 15px 15px 0;
1463
- text-align: right;
1464
- background-color: #FAFAFA;
1465
- border-top: 1px solid #dcdcde;
1466
- .loop_price {
1467
- font-weight: bold;
1468
- &.sale {
1469
- color: #008000;
1470
- strike {
1471
- color: #444;
1472
- }
1473
- }
1474
- }
1475
- .button {
1476
- .dashicons {
1477
- vertical-align: middle;
1478
- font-size: 16px;
1479
- }
1480
- }
1481
- }
1482
- .extension_license {
1483
- // padding: 0 10% 10%;
1484
- padding: 0 20px 20px;
1485
- -webkit-box-sizing: border-box;
1486
- -moz-box-sizing: border-box;
1487
- box-sizing: border-box;
1488
-
1489
- div.dlm_license_error {
1490
- padding: .5em;
1491
- margin-bottom: 15px;
1492
- background: lightYellow;
1493
-
1494
- a {
1495
- color: blue;
1496
- text-decoration: underline;
1497
- }
1498
- }
1499
-
1500
- p.license-status {
1501
- padding: 5px 0;
1502
- margin: 5px 0;
1503
- background: red;
1504
- font-weight: bold;
1505
- font-size: 1.2em;
1506
- color: #fff;
1507
- text-align: center;
1508
- }
1509
- p.license-status.active {
1510
- background: #008000;
1511
- }
1512
- input {
1513
- width: 100%;
1514
- margin: 7px 0;
1515
- padding: 7px;
1516
- }
1517
- a.button-primary {
1518
- width: 100%;
1519
- margin: 5px auto 0;
1520
- color: #fff;
1521
- text-align: center;
1522
- }
1523
- }
1524
- }
1525
- }
1526
-
1527
- }
1528
-
1529
- /* Fix Datepicker's UI bug */
1530
- #ui-datepicker-div {
1531
- display: none;
1532
- }
1533
-
1534
- /* Upsells */
1535
- .wpchill-upsell {
1536
- background: #fff;
1537
- border: 0;
1538
- padding: 15px;
1539
- margin-top: 30px;
1540
-
1541
- .wpchill-upsell-features {
1542
- text-align: left;
1543
- display: flex;
1544
- flex-wrap: wrap;
1545
- padding: 20px 0;
1546
-
1547
- li {
1548
- width: 33%;
1549
- }
1550
- }
1551
- }
1552
-
1553
- .wpchill-upsells-wrapper {
1554
- width: 100%;
1555
- }
1556
-
1557
- .wrap.dlm-admin-settings {
1558
- .form-table {
1559
- width: 65%;
1560
- float: left;
1561
-
1562
- & + .wpchill-upsells-wrapper {
1563
- width: 30%;
1564
- float: right;
1565
- }
1566
- }
1567
-
1568
- .dlm-upsell-badge {
1569
- font-size: 10px;
1570
- background: #f4daa4;
1571
- padding: 2px 5px;
1572
- display: inline-block;
1573
- margin-left: 10px;
1574
- border-radius: 10px;
1575
- }
1576
- }
1577
-
1578
- #total_downloads_browser_table {
1579
- a.nav-tab {
1580
- text-transform:capitalize;
1581
- }
1582
- }
1583
-
1584
- #dlm-download-page-upsell,
1585
- #dlm-amazon-s3-upsell ,
1586
- #dlm-google-drive-upsell,
1587
- #dlm-buttons-upsell {
1588
- .inside {
1589
- display: flex;
1590
- flex-wrap: wrap;
1591
- background: #f1f1f1;
1592
-
1593
- .wpchill-upsell {
1594
- background: transparent;
1595
- text-align:center;
1596
- width:100%;
1597
- margin-top:0;
1598
- }
1599
- }
1600
-
1601
- .inside {
1602
- margin: 0;
1603
- padding: 0;
1604
- }
1605
-
1606
- }
1607
-
1608
- .upsells-columns {
1609
- display: flex;
1610
- flex-wrap: wrap;
1611
- align-items: center;
1612
- align-content: center;
1613
-
1614
- .upsells-columns-2 {
1615
- width: 50%;
1616
- text-align: center;
1617
- display:flex;
1618
- align-items:center;
1619
- align-content:center;
1620
- }
1621
-
1622
- .upsells-column {
1623
- width: 100%;
1624
- text-align: center;
1625
- display: flex;
1626
- align-items: center;
1627
- align-content: center;
1628
-
1629
- > * {
1630
- display: inline-block;
1631
- align-content: center;
1632
- vertical-align: middle;
1633
- margin: 0 15px;
1634
- padding: 10px 0;
1635
-
1636
- &.wpchill-upsell {
1637
- position: relative;
1638
- float: none;
1639
- flex-grow: 1;
1640
- display: flex;
1641
- align-items: center;
1642
-
1643
- .wpchill-upsell-description {
1644
- margin:0 auto;
1645
- }
1646
- }
1647
- }
1648
-
1649
- h3 {
1650
- line-height:1.3em;
1651
- }
1652
-
1653
- &:last-child {
1654
- border-top: 1px solid #c3c4c7;
1655
- border-bottom: 1px solid #c3c4c7;
1656
- }
1657
-
1658
- }
1659
-
1660
- .wpchill-upsell {
1661
- margin-top: 0;
1662
- }
1663
- }
1664
- .dlm_download_page_dlm-extensions{
1665
- .theme.dlm_extension {
1666
- background-color: #FFF;
1667
- }
1668
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .iconbefore(@glyph: "\f333") {
2
+ font-family: dashicons !important;
3
+ speak: none;
4
+ font-weight: normal;
5
+ font-variant: normal;
6
+ text-transform: none;
7
+ -webkit-font-smoothing: antialiased;
8
+ -moz-osx-font-smoothing: grayscale;
9
+ margin: 0 4px 0 0;
10
+ content: @glyph;
11
+ top: 1px;
12
+ left: -1px;
13
+ font-size: 1em;
14
+ line-height: inherit;
15
+ position: relative;
16
+ vertical-align: top;
17
+ }
18
+
19
+ /* Logs */
20
+ .post-type-dlm_download {
21
+ h1 {
22
+ a.dlm-delete-logs {
23
+ color: #a00;
24
+
25
+ &:hover {
26
+ color: #fff;
27
+ background: #a00;
28
+ border-color: #7C0900;
29
+ }
30
+ }
31
+ }
32
+
33
+ .dlm-page-header {
34
+ border-bottom: 1px solid #ccc;
35
+ padding: 15px 20px;
36
+ display: flex;
37
+ justify-content: space-between;
38
+ background: #fff;
39
+ width: calc(100% + 20px);
40
+ box-sizing: border-box;
41
+ margin-left: -20px;
42
+
43
+ .dlm-header-links {
44
+ margin-left: -20px;
45
+
46
+ a {
47
+ span {
48
+ vertical-align: middle;
49
+ position: relative;
50
+ top: -2px;
51
+ padding-right: 10px;
52
+ }
53
+ }
54
+ }
55
+
56
+ .dlm-header-logo img {
57
+ max-height: 35px;
58
+ }
59
+ }
60
+ }
61
+
62
+ #dlm_logs {
63
+ td {
64
+ padding: 7px 7px;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ .check-column {
69
+ width: 1%;
70
+ padding: 0;
71
+ vertical-align: middle;
72
+ }
73
+
74
+ .column-status {
75
+ width: 2%;
76
+ }
77
+
78
+ td.column-status {
79
+ font-size: 10px;
80
+ vertical-align: middle;
81
+ text-align: center;
82
+
83
+ span {
84
+ color: #fff;
85
+ font-weight: normal;
86
+ -moz-border-radius: 50%;
87
+ -webkit-border-radius: 50%;
88
+ border-radius: 50%;
89
+ height: 18px;
90
+ line-height: 18px;
91
+ width: 18px;
92
+ display: inline-block;
93
+ background: url('../images/log-status-icons.png') top left no-repeat;
94
+ }
95
+
96
+ .completed {
97
+ background-color: #6cc644;
98
+ }
99
+
100
+ .failed {
101
+ background-color: #bd2c00;
102
+ background-position-y: -18px;
103
+ }
104
+
105
+ .redirected {
106
+ background-color: #1c769b;
107
+ background-position-y: -36px;
108
+ }
109
+ }
110
+
111
+ td.column-user_ip,
112
+ td.column-user_agent {
113
+ font-family: monospace;
114
+ font-weight: normal;
115
+ }
116
+
117
+ span.dlm-description {
118
+ font-weight: normal;
119
+ }
120
+
121
+ .column-download,
122
+ .column-file,
123
+ .column-user,
124
+ .column-user_ua {
125
+ width: 16% !important;
126
+ }
127
+
128
+ .column-user_ip,
129
+ .column-date {
130
+ width: 6% !important;
131
+ }
132
+ }
133
+
134
+ .post-type-dlm_download {
135
+ .inline-edit-row {
136
+ .inline-edit-col-dlm {
137
+ .inline-edit-col-dlm-inner {
138
+ margin-top: 10px;
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ /** Settings */
145
+ .dlm-settings-sub-nav {
146
+ margin: 0 0 10px 0;
147
+ width: 100%;
148
+ border-bottom: 1px solid #ccc;
149
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
150
+
151
+ li {
152
+ margin-right: 10px;
153
+ margin-bottom: -2px;
154
+ }
155
+
156
+ a {
157
+ padding: 13px;
158
+ display: block;
159
+ }
160
+
161
+ .active-section {
162
+ margin-bottom: -2px;
163
+
164
+ a {
165
+ border-bottom: 4px solid #000;
166
+ padding-bottom: 9px;
167
+ margin-bottom: -2px;
168
+ font-weight: 600;
169
+ }
170
+ }
171
+ }
172
+
173
+ .admin-color-blue {
174
+ .dlm-settings-sub-nav {
175
+ .active-section {
176
+ a {
177
+ border-bottom-color: #096484;
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ .admin-color-coffee {
184
+ .dlm-settings-sub-nav {
185
+ .active-section {
186
+ a {
187
+ border-bottom-color: #c7a589;
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ .admin-color-ectoplasm {
194
+ .dlm-settings-sub-nav {
195
+ .active-section {
196
+ a {
197
+ border-bottom-color: #a3b745;
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ .admin-color-midnight {
204
+ .dlm-settings-sub-nav {
205
+ .active-section {
206
+ a {
207
+ border-bottom-color: #e14d43;
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ .admin-color-ocean {
214
+ .dlm-settings-sub-nav {
215
+ .active-section {
216
+ a {
217
+ border-bottom-color: #627c83;
218
+ }
219
+ }
220
+ }
221
+ }
222
+
223
+ .admin-color-sunrise {
224
+ .dlm-settings-sub-nav {
225
+ .active-section {
226
+ a {
227
+ border-bottom-color: #be3631;
228
+ }
229
+ }
230
+ }
231
+ }
232
+
233
+ .admin-color-light {
234
+ .dlm-settings-sub-nav {
235
+ .active-section {
236
+ a {
237
+ border-bottom-color: #888;
238
+ }
239
+ }
240
+ }
241
+ }
242
+
243
+ .admin-color-evergreen {
244
+ .dlm-settings-sub-nav {
245
+ .active-section {
246
+ a {
247
+ border-bottom-color: #36533f;
248
+ }
249
+ }
250
+ }
251
+ }
252
+
253
+ .admin-color-mint {
254
+ .dlm-settings-sub-nav {
255
+ .active-section {
256
+ a {
257
+ border-bottom-color: #4f6d59;
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ .admin-color-modern {
264
+ .dlm-settings-sub-nav {
265
+ .active-section {
266
+ a {
267
+ border-bottom-color: #3858e9;
268
+ }
269
+ }
270
+ }
271
+ }
272
+
273
+ .dlm-admin-settings {
274
+
275
+ #setting-dlm_decimal_separator,
276
+ #setting-dlm_thousand_separator {
277
+ width: 50px;
278
+ }
279
+
280
+ table {
281
+ td {
282
+ padding: 15px 0;
283
+ }
284
+ }
285
+
286
+ h3 {
287
+ margin: 2em 0 0;
288
+ }
289
+ }
290
+
291
+ /* File lists */
292
+ ul.download_monitor_file_browser {
293
+ list-style: none outside;
294
+ margin: 0;
295
+ border: 1px solid #ddd;
296
+ -moz-border-radius: 3px;
297
+ -webkit-border-radius: 3px;
298
+ border-radius: 3px;
299
+ background: #f9f9f9;
300
+ padding: 5px 5px;
301
+ -moz-box-shadow: inset 0 0 0 1px #fff;
302
+ -webkit-box-shadow: inset 0 0 0 1px #fff;
303
+ box-shadow: inset 0 0 0 1px #fff;
304
+
305
+ li {
306
+ padding: 0;
307
+ margin: 0;
308
+
309
+ a {
310
+ color: #21759B;
311
+ display: block;
312
+ padding: 4px 0 4px 4px;
313
+ text-decoration: none;
314
+
315
+ &:hover {
316
+ background-color: #eaf2fa;
317
+ }
318
+
319
+ &:before {
320
+ .iconbefore("\f123");
321
+ }
322
+
323
+ &.folder:before {
324
+ .iconbefore("\f318");
325
+ }
326
+
327
+ // Videos
328
+ &.filetype-mov,
329
+ &.filetype-avi,
330
+ &.filetype-3g2,
331
+ &.filetype-3gp,
332
+ &.filetype-asf,
333
+ &.filetype-asx,
334
+ &.filetype-mp4,
335
+ &.filetype-mpg,
336
+ &.filetype-rm,
337
+ &.filetype-srt,
338
+ &.filetype-vob,
339
+ &.filetype-wmv {
340
+ &:before {
341
+ .iconbefore("\f126");
342
+ }
343
+ }
344
+
345
+ // Audio
346
+ &.filetype-mp3,
347
+ &.filetype-aif,
348
+ &.filetype-iff,
349
+ &.filetype-m3u,
350
+ &.filetype-m4a,
351
+ &.filetype-mid,
352
+ &.filetype-midi,
353
+ &.filetype-mpa,
354
+ &.filetype-ra,
355
+ &.filetype-wav,
356
+ &.filetype-wma {
357
+ &:before {
358
+ .iconbefore("\f127");
359
+ }
360
+ }
361
+
362
+ // Images
363
+ &.filetype-psd,
364
+ &.filetype-ai,
365
+ &.filetype-eps,
366
+ &.filetype-ps,
367
+ &.filetype-svg,
368
+ &.filetype-bmp,
369
+ &.filetype-dds,
370
+ &.filetype-gif,
371
+ &.filetype-jpg,
372
+ &.filetype-jpeg,
373
+ &.filetype-png,
374
+ &.filetype-pspimage,
375
+ &.filetype-tga,
376
+ &.filetype-thm,
377
+ &.filetype-tif,
378
+ &.filetype-yuv,
379
+ &.filetype-ico {
380
+ &:before {
381
+ .iconbefore("\f128");
382
+ }
383
+ }
384
+ }
385
+
386
+ &.nofiles {
387
+ color: #999;
388
+ font-style: italic;
389
+ padding: 4px 0;
390
+ }
391
+
392
+ ul {
393
+ list-style: none outside;
394
+ margin: 0;
395
+ padding: 0 0 0 28px;
396
+
397
+ &.loading {
398
+ background: url(../images/ajax-loader.gif) no-repeat 24px 0;
399
+ height: 32px;
400
+ }
401
+ }
402
+ }
403
+ }
404
+
405
+ /* Download list */
406
+ table.wp-list-table {
407
+ .column-thumb {
408
+ width: 44px;
409
+ text-align: center;
410
+ white-space: nowrap
411
+ }
412
+
413
+ .column-dlm_download_cat,
414
+ .column-dlm_download_tag,
415
+ .column-file {
416
+ width: 11% !important;
417
+ }
418
+
419
+ .column-title,
420
+ .column-file {
421
+ width: 17% !important;
422
+ }
423
+
424
+ .column-download_id,
425
+ .column-version {
426
+ width: 5em;
427
+ }
428
+
429
+ th.column-thumb,
430
+ th.column-download_count,
431
+ th.column-members_only,
432
+ th.column-redirect_only,
433
+ th.column-featured {
434
+ span:first-child {
435
+ float: none;
436
+ display: inline-block;
437
+ width: 1em;
438
+ height: 1em;
439
+ line-height: 1em;
440
+ padding: 2px 0 0 0;
441
+ overflow: hidden;
442
+ }
443
+
444
+ .sorting-indicator {
445
+ float: right;
446
+ }
447
+ }
448
+
449
+ th.column-thumb {
450
+ width: 52px;
451
+ text-align: center;
452
+
453
+ span:first-child {
454
+ &:before {
455
+ .iconbefore("\f128");
456
+ }
457
+ }
458
+ }
459
+
460
+ th.column-download_count {
461
+ width: 5em;
462
+
463
+ span:first-child {
464
+ &:before {
465
+ .iconbefore("\f346");
466
+ }
467
+ }
468
+ }
469
+
470
+ th.column-members_only {
471
+ width: 3.5em;
472
+
473
+ span:first-child {
474
+ &:before {
475
+ .iconbefore("\f338");
476
+ }
477
+ }
478
+ }
479
+
480
+ th.column-redirect_only {
481
+ width: 3.5em;
482
+
483
+ span:first-child {
484
+ &:before {
485
+ .iconbefore("\f103");
486
+ }
487
+ }
488
+ }
489
+
490
+ th.column-featured {
491
+ width: 3.5em;
492
+
493
+ span:first-child {
494
+ &:before {
495
+ .iconbefore("\f155");
496
+ }
497
+ }
498
+ }
499
+
500
+ td.column-download_count,
501
+ td.column-members_only,
502
+ td.column-redirect_only,
503
+ td.column-featured {
504
+ text-align: left;
505
+ padding-left: 11px;
506
+
507
+ span.na {
508
+ color: #999;
509
+ width: 1em;
510
+ height: 1em;
511
+ line-height: 1em;
512
+ display: inline-block;
513
+ overflow: hidden;
514
+ vertical-align: middle;
515
+
516
+ &:before {
517
+ .iconbefore("\f460");
518
+ }
519
+ }
520
+
521
+ span.yes {
522
+ width: 1em;
523
+ height: 1em;
524
+ line-height: 1em;
525
+ display: inline-block;
526
+ overflow: hidden;
527
+ vertical-align: middle;
528
+
529
+ &:before {
530
+ .iconbefore("\f147");
531
+ }
532
+ }
533
+ }
534
+
535
+ .column-thumb img {
536
+ padding: 2px;
537
+ margin: 0;
538
+ border: 1px solid #dfdfdf;
539
+ vertical-align: middle;
540
+ width: 32px;
541
+ height: 32px;
542
+ }
543
+ }
544
+
545
+ /* Meta boxes */
546
+ #download-monitor-file {
547
+ .inside {
548
+ padding: 0;
549
+ margin: 0;
550
+ }
551
+
552
+ .dlm-metaboxes-wrapper {
553
+
554
+ .expand_all,
555
+ .close_all {
556
+ float: right;
557
+ margin-left: 1em;
558
+ line-height: 22px;
559
+ text-decoration: none;
560
+ }
561
+
562
+ .expand_all {
563
+ &:before {
564
+ .iconbefore("\f168");
565
+ }
566
+ }
567
+
568
+ .close_all {
569
+ &:before {
570
+ .iconbefore("\f460");
571
+ }
572
+ }
573
+
574
+ p.toolbar {
575
+ margin: 0 !important;
576
+ border-top: 1px solid white;
577
+ border-bottom: 1px solid #DFDFDF;
578
+ padding: 7px 12px !important;
579
+ overflow: hidden;
580
+ zoom: 1;
581
+
582
+ a.button {
583
+ float: left;
584
+ margin: 0;
585
+ }
586
+ }
587
+
588
+ select.attribute_taxonomy,
589
+ button.add_attribute,
590
+ button.add_variable_attribute,
591
+ .fr {
592
+ float: right;
593
+ margin: 0 0 0 6px;
594
+ }
595
+
596
+ .dlm-metaboxes {
597
+ padding: 0 12px 0;
598
+ }
599
+
600
+ .dlm-metabox-sortable-placeholder {
601
+ border-color: #bbb;
602
+ background-color: #f5f5f5;
603
+ margin: 9px 0;
604
+ border-width: 1px;
605
+ border-style: dashed;
606
+ }
607
+
608
+ .dlm-metabox {
609
+ background: #ececec;
610
+ border: 1px solid #ececec;
611
+ margin: 9px 0 !important;
612
+
613
+ h3 {
614
+ margin: 0 !important;
615
+ padding: 6px !important;
616
+ font-size: 1em !important;
617
+ overflow: hidden;
618
+ zoom: 1;
619
+ cursor: move;
620
+
621
+ button {
622
+ float: right;
623
+ }
624
+
625
+ strong {
626
+ line-height: 24px;
627
+ }
628
+
629
+ select {
630
+ font-family: sans-serif;
631
+ }
632
+
633
+ .handlediv {
634
+ background-position: 6px 5px !important;
635
+ display: none !important;
636
+ height: 24px;
637
+ }
638
+ }
639
+
640
+ &:hover h3 .handlediv {
641
+ display: block;
642
+ }
643
+
644
+ table {
645
+ width: 100%;
646
+ position: relative;
647
+ background: #fff;
648
+ padding: 3px;
649
+
650
+ td {
651
+ text-align: left;
652
+ padding: 6px 6px;
653
+ vertical-align: top;
654
+ border: 0;
655
+ line-height: 26px;
656
+
657
+ label {
658
+ text-align: left;
659
+ display: block;
660
+ line-height: 21px;
661
+ }
662
+
663
+ input {
664
+ float: left;
665
+ min-width: 200px;
666
+ }
667
+
668
+ input,
669
+ textarea {
670
+ width: 100%;
671
+ margin: 0;
672
+ display: block;
673
+ font-size: 14px;
674
+ padding: 4px;
675
+ color: #555;
676
+ }
677
+
678
+ textarea {
679
+ height: 7.5em;
680
+ }
681
+
682
+ select {
683
+ width: 100%;
684
+ }
685
+
686
+ input.short {
687
+ width: 200px;
688
+ }
689
+
690
+ input.checkbox {
691
+ width: auto;
692
+ min-width: inherit;
693
+ vertical-align: middle;
694
+ display: inline;
695
+ float: none;
696
+ }
697
+
698
+ input.date-picker-field {
699
+ width: 50%;
700
+ min-width: inherit;
701
+ float: none;
702
+ display: inline;
703
+ }
704
+
705
+ input.minute,
706
+ input.hour {
707
+ width: 2em;
708
+ min-width: inherit;
709
+ float: none;
710
+ display: inline;
711
+ }
712
+ }
713
+
714
+ td.attribute_name {
715
+ width: 200px;
716
+ }
717
+
718
+ .plus,
719
+ .minus {
720
+ margin-top: 6px;
721
+ }
722
+
723
+ .fl {
724
+ float: left;
725
+ }
726
+
727
+ .fr {
728
+ float: right;
729
+ }
730
+ }
731
+
732
+ &:first-child {
733
+
734
+ /* main file */
735
+ h3 {
736
+ background-color: #FAFAFA;
737
+ border-bottom: 1px solid #dcdcde;
738
+ }
739
+ }
740
+ }
741
+
742
+ .plus:before {
743
+ .iconbefore("\f132");
744
+ }
745
+
746
+ .minus:before {
747
+ .iconbefore("\f460");
748
+ }
749
+
750
+ .dlm_upload_file:before {
751
+ .iconbefore("\f317");
752
+ }
753
+
754
+ .dlm_browse_for_file:before {
755
+ .iconbefore("\f322");
756
+ }
757
+ }
758
+ }
759
+
760
+ /* Writepanel forms */
761
+ #download-monitor-information {
762
+ .dlm_information_panel {
763
+ div {
764
+ p {
765
+ overflow: hidden;
766
+ width: 100%;
767
+ font-weight: bold;
768
+ box-sizing: border-box;
769
+ line-height: 28px;
770
+ margin-bottom: 5px;
771
+ }
772
+ }
773
+
774
+ input {
775
+ margin: 0;
776
+ border-top-right-radius: 0;
777
+ border-bottom-right-radius: 0;
778
+ flex-grow: 1;
779
+ width: calc(100% - 45px);
780
+ }
781
+ }
782
+ }
783
+
784
+ #download-monitor-options {
785
+ .inside {
786
+ padding: 0;
787
+ margin: 0;
788
+ }
789
+
790
+ .form-field-checkbox {
791
+ label {
792
+ display: inline;
793
+ padding: 0 0 4px;
794
+ }
795
+
796
+ input {
797
+ display: inline-block;
798
+ width: auto;
799
+ vertical-align: middle;
800
+ }
801
+
802
+ .dlm-description {
803
+ padding: 4px 0 0 0;
804
+ display: block;
805
+ }
806
+ }
807
+
808
+ .access_permissions {
809
+ margin: 0 !important;
810
+ border-top: 1px solid white;
811
+ border-bottom: 1px solid #DFDFDF;
812
+ padding: 7px 12px !important;
813
+ overflow: hidden;
814
+ zoom: 1;
815
+
816
+ h4 {
817
+ margin-bottom: .5em;
818
+ margin: 0 0 .5em;
819
+ }
820
+
821
+ ul {
822
+ background: #fff;
823
+ border: 1px solid #dfdfdf;
824
+ height: 110px;
825
+ overflow: auto;
826
+ padding: .5em .9em;
827
+ margin: 0;
828
+ }
829
+ }
830
+
831
+ p {
832
+ margin: 0 !important;
833
+ border-top: 1px solid white;
834
+ border-bottom: 1px solid #DFDFDF;
835
+ padding: 7px 12px !important;
836
+ overflow: hidden;
837
+ zoom: 1;
838
+
839
+ &.not-active {
840
+ opacity: 0.7;
841
+ }
842
+ }
843
+
844
+ .options_upsell_link {
845
+ color: unset;
846
+ text-decoration: none;
847
+ }
848
+
849
+ .dlm-upsell-badge {
850
+ font-size: 10px;
851
+ background: #f4daa4;
852
+ padding: 2px 5px;
853
+ display: inline-block;
854
+ margin-left: 5px;
855
+ border-radius: 10px;
856
+ }
857
+ }
858
+
859
+ #insert-download {
860
+ padding: 20px 20px;
861
+
862
+ #insert-shortcode,
863
+ #drag-drop-area {
864
+ margin: 1em 0;
865
+ }
866
+
867
+ .updated,
868
+ .error {
869
+ margin-left: 0;
870
+ margin-right: 0;
871
+ }
872
+
873
+ h2 {
874
+ margin-top: 0;
875
+ }
876
+
877
+ label {
878
+ margin: 0 0 .25em 0;
879
+ display: block;
880
+ font-size: 1.1em;
881
+ }
882
+
883
+ span.description {
884
+ display: block;
885
+ }
886
+
887
+ input.input {
888
+ margin: 0 0 .25em 0;
889
+ display: block;
890
+ width: 100%;
891
+ font-size: 1.1em;
892
+ }
893
+
894
+ .add_link {
895
+ float: right;
896
+ }
897
+
898
+ ul.page-numbers {
899
+ overflow: hidden;
900
+ zoom: 1;
901
+ margin: 0 auto;
902
+ padding: 0;
903
+ text-align: center;
904
+
905
+ li {
906
+ display: inline-block;
907
+ margin: 0;
908
+ list-style: none outside;
909
+ line-height: 1em;
910
+
911
+ a,
912
+ span {
913
+ text-decoration: none;
914
+ border: 1px solid #ddd;
915
+ -webkit-border-radius: 4px;
916
+ border-radius: 4px;
917
+ padding: 8px;
918
+ display: block;
919
+ }
920
+
921
+ span {
922
+ border-color: #eee;
923
+ }
924
+ }
925
+ }
926
+
927
+ legend {
928
+ font-weight: bold;
929
+ display: block;
930
+ margin: 0 0 1em;
931
+ }
932
+
933
+ fieldset {
934
+ label {
935
+ display: block;
936
+ margin: 0 0 .5em;
937
+ }
938
+ }
939
+ }
940
+
941
+ /* Settings */
942
+ .dlm-code-nginx-rules {
943
+ display: block;
944
+ }
945
+
946
+ .settings_panel {
947
+ .form-table {
948
+ td {
949
+ padding-left: 0;
950
+ }
951
+ }
952
+
953
+ .dlm-lazy-select-loader {
954
+ display: inline-block;
955
+ vertical-align: middle;
956
+ padding: 0 0 0 3px;
957
+
958
+ img {
959
+ display: inline-block;
960
+ height: 25px;
961
+ width: 25px;
962
+ margin-top: 1px;
963
+ }
964
+ }
965
+ }
966
+
967
+ /* Reports */
968
+ .dlm-reports {
969
+
970
+ h1 {
971
+ .dlm-reports-actions {
972
+ float: right;
973
+
974
+ a.dlm-reports-header-chart-switcher,
975
+ .dlm-reports-header-date-selector,
976
+ .dlm-reports-header-period {
977
+ margin: 0 5px;
978
+ float: left;
979
+ }
980
+
981
+ &> :last-child {
982
+ margin-right: 0;
983
+ }
984
+
985
+ .dlm-reports-header-date-selector {
986
+
987
+ position: relative;
988
+ font-size: 14px;
989
+ padding: 0 .5em 0 1em;
990
+ background: #fff;
991
+ border: 1px solid #cccccc;
992
+ border-radius: 3px;
993
+
994
+ user-select: none;
995
+
996
+ cursor: pointer;
997
+
998
+ .dlm-arrow {
999
+ &:before {
1000
+ font-family: "dashicons" !important;
1001
+ content: "\f140";
1002
+ font-style: normal;
1003
+ font-weight: normal;
1004
+ speak: none;
1005
+ display: inline-block;
1006
+ text-decoration: inherit;
1007
+ width: 1em;
1008
+ text-align: center;
1009
+ font-variant: normal;
1010
+ text-transform: none;
1011
+ line-height: 1em;
1012
+ font-size: 1.6em;
1013
+ vertical-align: middle;
1014
+ margin-top: -2px;
1015
+ }
1016
+ }
1017
+
1018
+ .dlm_rdrs_overlay {
1019
+ display: block;
1020
+ width: 466px;
1021
+ //height: 198px;
1022
+ padding: 10px;
1023
+ background: #fff;
1024
+ border: 1px solid #cccccc;
1025
+ position: absolute;
1026
+ top: 30px;
1027
+ right: 0;
1028
+ z-index: 10;
1029
+ overflow: hidden;
1030
+
1031
+ .dlm_rdrs_date {
1032
+ font-size: 70%;
1033
+ margin-right: 5px;
1034
+ float: left;
1035
+ z-index: 11;
1036
+
1037
+ .ui-datepicker-inline {
1038
+ border: 0;
1039
+
1040
+ .ui-state-highlight {
1041
+ background: #e6e6e6 url(../images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
1042
+ color: #555555;
1043
+ border: 1px solid #D3D3D3;
1044
+ }
1045
+
1046
+ .ui-state-active {
1047
+ border: 1px solid #aaaaaa;
1048
+ background: #ffffff url(../images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
1049
+ }
1050
+
1051
+ td,
1052
+ th {
1053
+ padding: 0;
1054
+ margin: 0;
1055
+ line-height: 2em;
1056
+
1057
+ a {
1058
+ text-align: center !important;
1059
+ }
1060
+
1061
+ }
1062
+ }
1063
+ }
1064
+
1065
+ .dlm_rdrs_actions {
1066
+ width: 70px;
1067
+ padding-left: 10px;
1068
+ text-align: center;
1069
+ float: left;
1070
+ }
1071
+ }
1072
+
1073
+ }
1074
+
1075
+ a.dlm-reports-header-chart-switcher {
1076
+ display: block;
1077
+ margin-top: 1px;
1078
+ padding-top: 4px;
1079
+ color: #23282d;
1080
+ //border: 1px solid #23282d;
1081
+ text-decoration: none;
1082
+
1083
+ &:before {
1084
+ font-family: "dashicons" !important;
1085
+ font-style: normal;
1086
+ font-weight: normal;
1087
+ speak: none;
1088
+ display: inline-block;
1089
+ text-decoration: inherit;
1090
+ width: 1em;
1091
+ text-align: center;
1092
+ font-variant: normal;
1093
+ text-transform: none;
1094
+ line-height: 1em;
1095
+ font-size: 1.4em;
1096
+ }
1097
+
1098
+ &.dlm-line:before {
1099
+ content: "\f238";
1100
+ }
1101
+
1102
+ &.dlm-bar:before {
1103
+ content: "\f185";
1104
+ }
1105
+ }
1106
+
1107
+ .dlm-reports-header-period {
1108
+ a {
1109
+ border-color: #cccccc !important;
1110
+ }
1111
+
1112
+ a:first-child {
1113
+ border-bottom-right-radius: 0;
1114
+ border-top-right-radius: 0;
1115
+ border-right: 0;
1116
+ }
1117
+
1118
+ a:last-child {
1119
+ border-bottom-left-radius: 0;
1120
+ border-top-left-radius: 0;
1121
+ border-left: 0;
1122
+ }
1123
+ }
1124
+
1125
+ }
1126
+ }
1127
+
1128
+ .dlm_reports_loader {
1129
+ position: absolute;
1130
+ width: 32px;
1131
+ height: 32px;
1132
+ top: 50%;
1133
+ left: 50%;
1134
+ margin: -16px 0 0 -16px;
1135
+ }
1136
+
1137
+ .dlm-reports-block-chart {
1138
+ width: 100%;
1139
+ height: 300px;
1140
+ margin-top: 20px;
1141
+ background: #fff;
1142
+ border: 1px solid #e5e5e5;
1143
+ overflow: hidden;
1144
+
1145
+ .chart-container {
1146
+ h6 {
1147
+ display: none;
1148
+ }
1149
+ }
1150
+ }
1151
+
1152
+ .dlm-reports-block-summary {
1153
+ #popular {
1154
+ span {
1155
+ line-height: 1em;
1156
+ }
1157
+ }
1158
+ }
1159
+
1160
+ .dlm-reports-block {
1161
+ position: relative;
1162
+ box-sizing: border-box;
1163
+ width: 100%;
1164
+ //height: 300px;
1165
+ padding: 20px 10px;
1166
+ margin-top: 20px;
1167
+ background: #fff;
1168
+ border: 1px solid #e5e5e5;
1169
+ overflow: hidden;
1170
+ float: left;
1171
+
1172
+ &.dlm-reports-block-half {
1173
+ width: 49%;
1174
+ margin-right: 1%;
1175
+ }
1176
+
1177
+ &.dlm-reports-block-half-right {
1178
+ width: 49%;
1179
+ margin-left: 1%;
1180
+ }
1181
+
1182
+ .dlm-reports-placeholder-no-data {
1183
+ display: inline-block;
1184
+ width: 100%;
1185
+ font-size: 1.5em;
1186
+ color: #b4b9be;
1187
+ font-style: italic;
1188
+ text-align: center;
1189
+ }
1190
+
1191
+ ul {
1192
+ box-sizing: border-box;
1193
+ width: 100%;
1194
+ padding: 0;
1195
+ margin: 0;
1196
+
1197
+ li {
1198
+ display: inline-block;
1199
+ width: 33%;
1200
+ padding: 5px 0;
1201
+
1202
+ label,
1203
+ span {
1204
+ display: block;
1205
+ width: 100%;
1206
+ text-align: center;
1207
+ }
1208
+
1209
+ span {
1210
+ font-size: 2.5em;
1211
+ font-weight: bold;
1212
+ padding: .5em 0 0;
1213
+ }
1214
+ }
1215
+ }
1216
+
1217
+ table {
1218
+ width: 100%;
1219
+
1220
+ th,
1221
+ td {
1222
+ text-align: center;
1223
+ padding: 10px 0;
1224
+ border-bottom: 1px solid #e5e5e5;
1225
+
1226
+ &:first-child {
1227
+ text-align: left;
1228
+ }
1229
+ }
1230
+
1231
+ th {
1232
+ padding-bottom: 20px;
1233
+ }
1234
+ }
1235
+ }
1236
+
1237
+ }
1238
+
1239
+ .dlm-reports-block-summary {
1240
+ background: #333 !important;
1241
+ color: white;
1242
+ }
1243
+
1244
+ /** Products overview page */
1245
+ .post-type-dlm_product {
1246
+ table.wp-list-table {
1247
+ .column-title {
1248
+ width: 65% !important;
1249
+ }
1250
+ }
1251
+ }
1252
+
1253
+ /** Products detail page */
1254
+ .dlm_mb_shop_product_information {
1255
+ .dlm_shop_field_row {
1256
+ width: 100%;
1257
+ overflow: hidden;
1258
+
1259
+ label.dlm_shop_field_label {
1260
+ display: inline-block;
1261
+ width: 20%;
1262
+ height: 100%;
1263
+ line-height: 2.2em;
1264
+ float: left;
1265
+ }
1266
+
1267
+ span.dlm_shop_field_input {
1268
+ display: inline-block;
1269
+ width: 50%;
1270
+ float: left;
1271
+
1272
+ .dlm_shop_input {
1273
+ width: 100%;
1274
+ padding: 5px 7px;
1275
+ }
1276
+
1277
+ .select2-selection--multiple {
1278
+ border: 1px solid #dddddd;
1279
+ }
1280
+
1281
+ .select2-search,
1282
+ .select2-selection__choice {
1283
+ margin-bottom: 0;
1284
+ }
1285
+
1286
+ .select2-search__field {
1287
+ padding-top: 3px;
1288
+ }
1289
+ }
1290
+ }
1291
+ }
1292
+
1293
+ /** Orders Overview */
1294
+ .dlm-order-overview {
1295
+
1296
+ #dlm_empty_trash {
1297
+ margin-left: 3px;
1298
+ }
1299
+
1300
+ .wp-list-table {
1301
+ td {
1302
+ .column-id {
1303
+ width: 25%;
1304
+ }
1305
+ }
1306
+ }
1307
+
1308
+ }
1309
+
1310
+ /** Order details */
1311
+ .dlm-order-details {
1312
+
1313
+ max-width: 1250px;
1314
+ margin-left: auto;
1315
+ margin-right: auto;
1316
+ padding-right: 20px;
1317
+
1318
+ h1 {
1319
+ padding-bottom: 25px;
1320
+ }
1321
+
1322
+ .dlm-order-details-main,
1323
+ .dlm-order-details-side {
1324
+ width: 100%;
1325
+ float: left;
1326
+ }
1327
+
1328
+ .dlm-order-details-block {
1329
+ padding: 0;
1330
+ margin-bottom: 20px;
1331
+ line-height: 1;
1332
+ border: 1px solid #e5e5e5;
1333
+ background: #fff;
1334
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
1335
+
1336
+ h2.dlm-order-details-block-title {
1337
+ font-size: 14px;
1338
+ padding: 8px 12px;
1339
+ margin: 0;
1340
+ line-height: 1.4;
1341
+ border-bottom: 1px solid #eee;
1342
+ }
1343
+
1344
+ .dlm-order-details-block-inside {
1345
+ margin: 6px 0 0 0;
1346
+ padding: 6px 12px 12px;
1347
+ line-height: 1.4em;
1348
+ font-size: 13px;
1349
+
1350
+ label {
1351
+ display: block;
1352
+ font-weight: bold;
1353
+ padding-bottom: 6px;
1354
+ }
1355
+
1356
+ p {
1357
+ padding: 0;
1358
+ margin: 0;
1359
+ }
1360
+
1361
+ ul {
1362
+
1363
+ &,
1364
+ li {
1365
+ list-style: none;
1366
+ padding: 0;
1367
+ margin: 0;
1368
+ }
1369
+
1370
+ li {
1371
+ padding: 6px 0;
1372
+ }
1373
+ }
1374
+
1375
+ .dlm-order-details-current-state {
1376
+ width: 70%;
1377
+ height: 30px;
1378
+ }
1379
+
1380
+ }
1381
+
1382
+ &.dlm-order-details-customer {
1383
+ .dlm-order-details-customer-image {
1384
+ float: right;
1385
+ }
1386
+
1387
+ ul {
1388
+ li {
1389
+ margin-bottom: 4px;
1390
+ padding: 0;
1391
+
1392
+ &:first-child {
1393
+ font-weight: bold;
1394
+ }
1395
+ }
1396
+ }
1397
+ }
1398
+
1399
+ &.dlm-order-details-order-items {
1400
+
1401
+ overflow: hidden;
1402
+
1403
+ .dlm-order-details-overview {
1404
+ width: 25%;
1405
+ float: right;
1406
+
1407
+ th,
1408
+ td {
1409
+ padding-top: 1.5em;
1410
+ padding-bottom: 1.5em;
1411
+ text-align: right;
1412
+ }
1413
+
1414
+ th {
1415
+ width: 50%;
1416
+ font-weight: normal;
1417
+ }
1418
+
1419
+ td {
1420
+ padding-right: 1em;
1421
+ font-weight: bold;
1422
+ }
1423
+ }
1424
+ }
1425
+
1426
+ table.dlm-order-details-data-table {
1427
+ width: 100%;
1428
+
1429
+ th,
1430
+ td {
1431
+ text-align: center;
1432
+
1433
+ &:first-child {
1434
+ text-align: left;
1435
+ padding-left: .5em;
1436
+ }
1437
+ }
1438
+
1439
+ th {
1440
+ padding-top: .5em;
1441
+ padding-bottom: .5em;
1442
+ border-bottom: 2px solid #c3c1bc;
1443
+ }
1444
+
1445
+ td {
1446
+ padding-top: 1.5em;
1447
+ padding-bottom: 1.5em;
1448
+ border-bottom: 1px solid #c3c1bc;
1449
+ }
1450
+
1451
+ th,
1452
+ td {
1453
+ &.dlm-order-details-order-items-item-total {
1454
+ text-align: right;
1455
+ padding-right: 1em;
1456
+ }
1457
+
1458
+ &.dlm-order-transaction-processor-id {
1459
+ display: none;
1460
+ }
1461
+ }
1462
+
1463
+ }
1464
+
1465
+ .dlm-order-details-update-successful {
1466
+ font-size: 2em;
1467
+ padding: 0.2em .3em;
1468
+ color: #46b450;
1469
+ }
1470
+
1471
+ }
1472
+
1473
+ }
1474
+
1475
+ @media (min-width: 768px) {
1476
+ .dlm-order-details {
1477
+
1478
+ .dlm-order-details-main {
1479
+ width: 62%;
1480
+ float: left;
1481
+ }
1482
+
1483
+ .dlm-order-details-side {
1484
+ width: 35%;
1485
+ float: right;
1486
+ }
1487
+
1488
+ .dlm-order-details-block {
1489
+ table.dlm-order-details-data-table {
1490
+
1491
+ th,
1492
+ td {
1493
+
1494
+ &.dlm-order-transaction-processor-id {
1495
+ display: table-cell;
1496
+ }
1497
+ }
1498
+ }
1499
+ }
1500
+
1501
+ }
1502
+ }
1503
+
1504
+ /** Onboarding */
1505
+ .dlm-onboarding {
1506
+
1507
+ .dlm-onboarding-section {
1508
+
1509
+ &.dlm-onboarding-section-one-col {
1510
+ margin: 0 auto;
1511
+ max-width: 680px;
1512
+ }
1513
+
1514
+ &.dlm-onboarding-section-cta {
1515
+ margin-top: 40px;
1516
+ text-align: center;
1517
+ }
1518
+
1519
+ &.dlm-onboarding-section-three-col {
1520
+ //margin-top: 40px;
1521
+ max-width: 680px;
1522
+ margin: 40px auto 0;
1523
+ //max-width: 1020px;
1524
+ overflow: hidden;
1525
+ display: flex;
1526
+ justify-content: space-between;
1527
+ flex-wrap: wrap;
1528
+
1529
+ .dlm-onboarding-col {
1530
+ padding-top: 2.5em;
1531
+ flex: 1;
1532
+ align-self: flex-start;
1533
+ min-width: 100%;
1534
+ max-width: 100%;
1535
+
1536
+ img {
1537
+ width: 100%;
1538
+ }
1539
+ }
1540
+ }
1541
+
1542
+ h2 {
1543
+ margin: 60px 0 .6em;
1544
+ font-size: 2.7em;
1545
+ line-height: 1.3;
1546
+ font-weight: 300;
1547
+ text-align: center;
1548
+ }
1549
+
1550
+ p {
1551
+ max-width: 55em;
1552
+ margin: 0.6em auto 0 auto;
1553
+ }
1554
+
1555
+ a.button-hero {
1556
+ height: 46px;
1557
+ font-size: 14px;
1558
+ line-height: 44px;
1559
+ padding: 0 36px;
1560
+ font-weight: bold;
1561
+ text-align: center;
1562
+ }
1563
+
1564
+ }
1565
+
1566
+ .dlm-onboarding-pages {
1567
+ max-width: 55em;
1568
+ margin: 0 auto;
1569
+ padding: 2em 0 0;
1570
+
1571
+ a.button-hero {
1572
+ width: 170px;
1573
+
1574
+ &.dlm-page-exists {
1575
+ background: #46b450;
1576
+ border-color: #46b450 #4a8442 #467a3f;
1577
+ box-shadow: 0 2px 0 #467a3f;
1578
+ text-shadow: 0 -1px 1px #4a8442, 1px 0 1px #4a8442, 0 1px 1px #4a8442, -1px 0 1px #4a8442;
1579
+
1580
+ &:active {
1581
+ box-shadow: 0 2px 0 #467a3f;
1582
+ }
1583
+ }
1584
+ }
1585
+
1586
+ th,
1587
+ td {
1588
+ padding: 1em 0;
1589
+ border-bottom: 1px solid #ccc;
1590
+ }
1591
+
1592
+ th {
1593
+ width: 13%;
1594
+ min-width: 6em;
1595
+ text-align: left;
1596
+ }
1597
+
1598
+ td {
1599
+ padding-right: .5em;
1600
+ padding-left: .5em;
1601
+ }
1602
+
1603
+ td.dlm-onboarding-pages-page-title {
1604
+ font-weight: bold;
1605
+ }
1606
+ }
1607
+
1608
+ }
1609
+
1610
+ @media (min-width: 768px) {
1611
+ .dlm-onboarding {
1612
+
1613
+ .dlm-onboarding-section {
1614
+ .dlm-onboarding-pages {
1615
+ width: 55em;
1616
+ }
1617
+
1618
+ &.dlm-onboarding-section-three-col {
1619
+ .dlm-onboarding-col {
1620
+ padding-top: 0;
1621
+ min-width: 31%;
1622
+ max-width: 31%;
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+
1629
+ /* Extensions */
1630
+ .dlm_extensions_wrap {
1631
+
1632
+ a.dlm-reload-button {
1633
+ float: right;
1634
+ position: relative;
1635
+ top: -40px;
1636
+ }
1637
+ #available-extensions{
1638
+ clear:both;
1639
+ }
1640
+
1641
+ .dlm_extensions {
1642
+ padding: 15px 0;
1643
+ overflow: hidden;
1644
+
1645
+ .dlm_extension {
1646
+
1647
+ background-color: #FFF;
1648
+ width: calc( 20% - 15px);
1649
+ margin: 0 15px 15px 0;
1650
+ display: inline-block;
1651
+ vertical-align: top;
1652
+
1653
+ p {
1654
+ margin: 0;
1655
+ }
1656
+
1657
+ a {
1658
+ color: #444;
1659
+ text-decoration: none;
1660
+ }
1661
+
1662
+ .dlm_extension_img_wrapper {
1663
+ width: 100%;
1664
+ background: #419CCB;
1665
+ text-align: center;
1666
+
1667
+ img {
1668
+ max-width: 100%;
1669
+ margin: 0 auto;
1670
+ }
1671
+ }
1672
+
1673
+ h3 {
1674
+ padding: 0 20px;
1675
+
1676
+ }
1677
+
1678
+ div.extension-desc {
1679
+ min-height: 120px;
1680
+ padding: 0 20px;
1681
+ }
1682
+
1683
+ .product_footer {
1684
+ padding: 15px 15px 15px 0;
1685
+ text-align: right;
1686
+ background-color: #FAFAFA;
1687
+ border-top: 1px solid #dcdcde;
1688
+
1689
+ .loop_price {
1690
+ font-weight: bold;
1691
+
1692
+ &.sale {
1693
+ color: #008000;
1694
+
1695
+ strike {
1696
+ color: #444;
1697
+ }
1698
+ }
1699
+ }
1700
+
1701
+ .button {
1702
+ .dashicons {
1703
+ vertical-align: middle;
1704
+ font-size: 16px;
1705
+ }
1706
+ }
1707
+ }
1708
+
1709
+ .extension_license {
1710
+ // padding: 0 10% 10%;
1711
+ padding: 0 20px 20px;
1712
+ -webkit-box-sizing: border-box;
1713
+ -moz-box-sizing: border-box;
1714
+ box-sizing: border-box;
1715
+
1716
+ div.dlm_license_error {
1717
+ padding: .5em;
1718
+ margin-bottom: 15px;
1719
+ background: lightYellow;
1720
+
1721
+ a {
1722
+ color: blue;
1723
+ text-decoration: underline;
1724
+ }
1725
+ }
1726
+
1727
+ p.license-status {
1728
+ padding: 5px 0;
1729
+ margin: 5px 0;
1730
+ background: red;
1731
+ font-weight: bold;
1732
+ font-size: 1.2em;
1733
+ color: #fff;
1734
+ text-align: center;
1735
+ }
1736
+
1737
+ p.license-status.active {
1738
+ background: #008000;
1739
+ }
1740
+
1741
+ input {
1742
+ width: 100%;
1743
+ margin: 7px 0;
1744
+ padding: 7px;
1745
+ }
1746
+
1747
+ a.button-primary {
1748
+ width: 100%;
1749
+ margin: 5px auto 0;
1750
+ color: #fff;
1751
+ text-align: center;
1752
+ }
1753
+ }
1754
+ }
1755
+ }
1756
+
1757
+ }
1758
+
1759
+ /* Fix Datepicker's UI bug */
1760
+ #ui-datepicker-div {
1761
+ display: none;
1762
+ }
1763
+
1764
+ /* Upsells */
1765
+ .wpchill-upsell {
1766
+ background: #fff;
1767
+ border: 0;
1768
+ padding: 15px;
1769
+ margin-top: 30px;
1770
+
1771
+ .wpchill-upsell-features {
1772
+ text-align: left;
1773
+ display: flex;
1774
+ flex-wrap: wrap;
1775
+ padding: 20px 0;
1776
+
1777
+ li {
1778
+ width: 33%;
1779
+ }
1780
+ }
1781
+ }
1782
+
1783
+ .wpchill-upsells-wrapper {
1784
+ width: 100%;
1785
+ }
1786
+
1787
+ .wrap.dlm-admin-settings {
1788
+ .form-table {
1789
+ width: 65%;
1790
+ float: left;
1791
+
1792
+ &+.wpchill-upsells-wrapper {
1793
+ width: 30%;
1794
+ float: right;
1795
+ }
1796
+ }
1797
+
1798
+ .dlm-upsell-badge {
1799
+ font-size: 10px;
1800
+ background: #f4daa4;
1801
+ padding: 2px 5px;
1802
+ display: inline-block;
1803
+ margin-left: 10px;
1804
+ border-radius: 10px;
1805
+ }
1806
+ }
1807
+
1808
+ #total_downloads_browser_table {
1809
+ a.nav-tab {
1810
+ text-transform: capitalize;
1811
+ }
1812
+ }
1813
+
1814
+ #dlm-download-page-upsell,
1815
+ #dlm-amazon-s3-upsell,
1816
+ #dlm-google-drive-upsell,
1817
+ #dlm-buttons-upsell {
1818
+ .inside {
1819
+ display: flex;
1820
+ flex-wrap: wrap;
1821
+ background: #f1f1f1;
1822
+
1823
+ .wpchill-upsell {
1824
+ background: transparent;
1825
+ text-align: center;
1826
+ width: 100%;
1827
+ margin-top: 0;
1828
+ }
1829
+ }
1830
+
1831
+ .inside {
1832
+ margin: 0;
1833
+ padding: 0;
1834
+ }
1835
+
1836
+ }
1837
+
1838
+ .upsells-columns {
1839
+ display: flex;
1840
+ flex-wrap: wrap;
1841
+ align-items: center;
1842
+ align-content: center;
1843
+
1844
+ .upsells-columns-2 {
1845
+ width: 50%;
1846
+ text-align: center;
1847
+ display: flex;
1848
+ align-items: center;
1849
+ align-content: center;
1850
+ }
1851
+
1852
+ .upsells-column {
1853
+ width: 100%;
1854
+ text-align: center;
1855
+ display: flex;
1856
+ align-items: center;
1857
+ align-content: center;
1858
+
1859
+ >* {
1860
+ display: inline-block;
1861
+ align-content: center;
1862
+ vertical-align: middle;
1863
+ margin: 0 15px;
1864
+ padding: 10px 0;
1865
+
1866
+ &.wpchill-upsell {
1867
+ position: relative;
1868
+ float: none;
1869
+ flex-grow: 1;
1870
+ display: flex;
1871
+ align-items: center;
1872
+
1873
+ .wpchill-upsell-description {
1874
+ margin: 0 auto;
1875
+ }
1876
+ }
1877
+ }
1878
+
1879
+ h3 {
1880
+ line-height: 1.3em;
1881
+ }
1882
+
1883
+ &:last-child {
1884
+ border-top: 1px solid #c3c4c7;
1885
+ border-bottom: 1px solid #c3c4c7;
1886
+ }
1887
+
1888
+ }
1889
+
1890
+ .wpchill-upsell {
1891
+ margin-top: 0;
1892
+ }
1893
+ }
1894
+
1895
+ .dlm_download_page_dlm-extensions {
1896
+ .theme.dlm_extension {
1897
+ background-color: #FFF;
1898
+ }
1899
+ }
1900
+
1901
+ #menu-posts-dlm_download {
1902
+ ul.wp-submenu {
1903
+
1904
+ // Lite vs PRO menu link
1905
+ a[href$="dlm-lite-vs-pro"] {
1906
+ color: gold;
1907
+ }
1908
+ }
1909
+ }
1910
+
1911
+ /* Lite vs PRO Section */
1912
+
1913
+ body.rsvp_page_rsvp-upgrade-to-pro #wpcontent .wrap {
1914
+ margin-left: 0;
1915
+ max-width: 85%;
1916
+ }
1917
+
1918
+ .rsvp-lite-vs-premium {
1919
+
1920
+ &,
1921
+ p {
1922
+ font-size: 14px;
1923
+ margin: 0;
1924
+ }
1925
+
1926
+ &>.wpchill-plans-table.wpchill-highlight {
1927
+ &>.wpchill-pricing-package {
1928
+ background: #fefff0;
1929
+ box-shadow: 0 0 15px rgb(208 219 219);
1930
+ }
1931
+ }
1932
+
1933
+ .wp-badge {
1934
+ display: inline-block;
1935
+ vertical-align: middle;
1936
+ position: relative;
1937
+ margin-right: 2.5%;
1938
+ }
1939
+
1940
+ h3 {
1941
+ display: block;
1942
+ position: relative;
1943
+ font-size: 16px;
1944
+ margin: 0;
1945
+ }
1946
+
1947
+ .wpchill-plans-table {
1948
+ display: flex;
1949
+
1950
+ &.table-header {
1951
+ margin-top: 50px;
1952
+ border-top: 0;
1953
+
1954
+ .wpchill-pricing-package {
1955
+ border: 0;
1956
+
1957
+ &:not(.wpchill-modula-lite):last-child:before,
1958
+ &.wpchill-title.wpchill-highlight::before {
1959
+ content: '';
1960
+ width: auto;
1961
+ display: inline-block;
1962
+ opacity: 1;
1963
+ position: absolute;
1964
+ top: -1px;
1965
+ background: #41495b;
1966
+ text-align: center;
1967
+ left: 0;
1968
+ right: 0;
1969
+ color: #fff;
1970
+ font-size: 15px;
1971
+ text-transform: uppercase;
1972
+ padding: 10px 5px;
1973
+ transform: translateY(-100%);
1974
+ }
1975
+ }
1976
+ }
1977
+ }
1978
+
1979
+ &.table-footer {
1980
+ .wpchill-pricing-package:last-child {
1981
+ border: 0;
1982
+ }
1983
+ }
1984
+
1985
+ .wpchill-pricing-package {
1986
+ text-align: center;
1987
+ line-height: 1.5;
1988
+ padding: 10px 15px;
1989
+ display: flex;
1990
+ align-content: center;
1991
+ align-items: center;
1992
+ justify-content: center;
1993
+ background: #fff;
1994
+ border-top: 1px solid #ccc;
1995
+ width: 32%;
1996
+
1997
+ &:not(:first-child) {
1998
+ max-width: 300px;
1999
+ }
2000
+
2001
+ &.wpchill-title {
2002
+ font-weight: 400;
2003
+ color: #666;
2004
+ font-size: 1.25rem;
2005
+ height: auto;
2006
+ -ms-flex-direction: column;
2007
+ flex-direction: column;
2008
+ padding-top: 30px;
2009
+ padding-bottom: 30px;
2010
+ justify-content: space-between;
2011
+ position: relative;
2012
+
2013
+ .wpchill-name {
2014
+ margin: 0;
2015
+ font-size: 36px;
2016
+ }
2017
+
2018
+ &.wpchill-modula-lite {
2019
+ justify-content: center;
2020
+ }
2021
+
2022
+ p.description {
2023
+ font-style: italic;
2024
+ font-size: 13px;
2025
+ margin-bottom: 40px;
2026
+ }
2027
+
2028
+ .wpchill-price {
2029
+
2030
+ p {
2031
+ &:last-child {
2032
+ font-size: 30px;
2033
+ margin: 0 0 40px 0;
2034
+ }
2035
+
2036
+ &.old-price {
2037
+ margin: 0;
2038
+ position: relative;
2039
+
2040
+ &:after {
2041
+ content: "";
2042
+ height: 2px;
2043
+ width: 60px;
2044
+ background: red;
2045
+ display: block;
2046
+ position: absolute;
2047
+ left: 50%;
2048
+ top: 52%;
2049
+ transform: translate(-50%, -50%);
2050
+ }
2051
+ }
2052
+ }
2053
+
2054
+ sup {
2055
+ top: 2px;
2056
+ position: relative;
2057
+ font-size: 15px;
2058
+ }
2059
+ }
2060
+ }
2061
+
2062
+ &.wpchill-empty {
2063
+ background: transparent;
2064
+ border-color: transparent;
2065
+ }
2066
+
2067
+ &.feature-name {
2068
+ justify-content: space-between;
2069
+ font-weight: 400;
2070
+ text-align: left;
2071
+ font-size: 13px;
2072
+ display: block;
2073
+ background: transparent;
2074
+ }
2075
+
2076
+ .dashicons-saved {
2077
+ color: green;
2078
+ }
2079
+
2080
+ .dashicons {
2081
+ width: 30px;
2082
+ height: 30px;
2083
+ font-size: 30px;
2084
+ }
2085
+
2086
+ .dashicons-no-alt {
2087
+ color: #ff3439;
2088
+ }
2089
+
2090
+ &:last-child {
2091
+ background: #fefff0;
2092
+ }
2093
+ }
2094
+
2095
+ .button {
2096
+ .dashicons {
2097
+ font-size: 16px;
2098
+ vertical-align: middle;
2099
+ line-height: 26px;
2100
+ }
2101
+ }
2102
+ }
assets/js/settings.js CHANGED
@@ -1,63 +1,63 @@
1
- jQuery( function ( $ ) {
2
-
3
- $( '#setting-dlm_default_template' ).change( function () {
4
- if ( $( this ).val() === 'custom' ) {
5
- $( '#setting-dlm_custom_template' ).closest( 'tr' ).show();
6
- } else {
7
- $( '#setting-dlm_custom_template' ).closest( 'tr' ).hide();
8
- }
9
- } ).change();
10
-
11
- $( '#setting-dlm_enable_logging' ).change( function () {
12
- if ( $( this ).is( ":checked" ) === true ) {
13
- $( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).show();
14
- } else {
15
- $( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).hide();
16
- }
17
- } ).change();
18
-
19
- $( document ).ready( function () {
20
-
21
- // load lazy-select elements
22
- $.each( $( '.dlm-lazy-select' ), function () {
23
-
24
- var lazy_select_el = $( this );
25
-
26
- // add AJAX loader
27
- $( '<span>' ).addClass( 'dlm-lazy-select-loader' ).append(
28
- $( '<img>' ).attr( 'src', dlm_settings_vars.img_path + 'ajax-loader.gif' )
29
- ).insertAfter( lazy_select_el );
30
-
31
- // load data
32
- $.post( ajaxurl, {
33
- action: 'dlm_settings_lazy_select',
34
- nonce: dlm_settings_vars.lazy_select_nonce,
35
- option: lazy_select_el.attr( 'name' )
36
- }, function ( response ) {
37
-
38
- // remove current option(s)
39
- lazy_select_el.find( 'option' ).remove();
40
-
41
- // set new options
42
- if ( response ) {
43
- var selected = lazy_select_el.data( 'selected' );
44
- for ( var i = 0; i < response.length; i ++ ) {
45
- var opt = $( '<option>' ).attr( 'value', response[i].key ).html( response[i].lbl );
46
- if ( selected === response[i].key ) {
47
- opt.attr( 'selected', 'selected' );
48
- }
49
- lazy_select_el.append( opt );
50
- }
51
- }
52
-
53
- // remove ajax loader
54
- lazy_select_el.parent().find( '.dlm-lazy-select-loader' ).remove();
55
-
56
- } );
57
-
58
-
59
- } );
60
-
61
- } );
62
-
63
  } );
1
+ jQuery( function ( $ ) {
2
+
3
+ $( '#setting-dlm_default_template' ).change( function () {
4
+ if ( $( this ).val() === 'custom' ) {
5
+ $( '#setting-dlm_custom_template' ).closest( 'tr' ).show();
6
+ } else {
7
+ $( '#setting-dlm_custom_template' ).closest( 'tr' ).hide();
8
+ }
9
+ } ).change();
10
+
11
+ $( '#setting-dlm_enable_logging' ).change( function () {
12
+ if ( $( this ).is( ":checked" ) === true ) {
13
+ $( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).show();
14
+ } else {
15
+ $( '#setting-dlm_count_unique_ips' ).closest( 'tr' ).hide();
16
+ }
17
+ } ).change();
18
+
19
+ $( document ).ready( function () {
20
+
21
+ // load lazy-select elements
22
+ $.each( $( '.dlm-lazy-select' ), function () {
23
+
24
+ var lazy_select_el = $( this );
25
+
26
+ // add AJAX loader
27
+ $( '<span>' ).addClass( 'dlm-lazy-select-loader' ).append(
28
+ $( '<img>' ).attr( 'src', dlm_settings_vars.img_path + 'ajax-loader.gif' )
29
+ ).insertAfter( lazy_select_el );
30
+
31
+ // load data
32
+ $.post( ajaxurl, {
33
+ action: 'dlm_settings_lazy_select',
34
+ nonce: dlm_settings_vars.lazy_select_nonce,
35
+ option: lazy_select_el.attr( 'name' )
36
+ }, function ( response ) {
37
+
38
+ // remove current option(s)
39
+ lazy_select_el.find( 'option' ).remove();
40
+
41
+ // set new options
42
+ if ( response ) {
43
+ var selected = lazy_select_el.data( 'selected' );
44
+ for ( var i = 0; i < response.length; i ++ ) {
45
+ var opt = $( '<option>' ).attr( 'value', response[i].key ).html( response[i].lbl );
46
+ if ( selected === response[i].key ) {
47
+ opt.attr( 'selected', 'selected' );
48
+ }
49
+ lazy_select_el.append( opt );
50
+ }
51
+ }
52
+
53
+ // remove ajax loader
54
+ lazy_select_el.parent().find( '.dlm-lazy-select-loader' ).remove();
55
+
56
+ } );
57
+
58
+
59
+ } );
60
+
61
+ } );
62
+
63
  } );
assets/views/meta-box/product-information.php CHANGED
@@ -1,32 +1,32 @@
1
- <div class="dlm_mb_shop_product_information">
2
-
3
- <?php do_action( 'dlm_mb_product_information_start', $product->get_id(), $product ); ?>
4
-
5
- <p class="dlm_shop_field_row">
6
- <label class="dlm_shop_field_label"><?php printf( esc_html__( 'Price (%s)', 'download-monitor' ), \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ); ?></label>
7
- <span class="dlm_shop_field_input">
8
- <input type="text" name="_dlm_price" value="<?php echo esc_attr( $price ); ?>" class="dlm_shop_input" >
9
- </span>
10
- </p>
11
-
12
- <p class="dlm_shop_field_row">
13
- <label class="dlm_shop_field_label"><?php printf( esc_html__( 'Downloads', 'download-monitor' ), \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ); ?></label>
14
- <span class="dlm_shop_field_input">
15
-
16
- <select id="dlm_downloads" name="_dlm_downloads[]"
17
- multiple="true"
18
- data-placeholder="<?php echo esc_attr__( 'Select Downloads&hellip;', 'download-monitor' ); ?>"
19
- class="dlm-select-ext dlm_shop_input">
20
- <?php if ( ! empty( $downloads ) ) : ?>
21
- <?php foreach ( $downloads as $download ) : ?>
22
- <option value="<?php echo esc_attr( $download->get_id() ); ?>" <?php selected( in_array( $download->get_id(), $current_download_ids ), true ); ?>><?php echo esc_html( $download->get_title() ); ?></option>
23
- <?php endforeach; ?>
24
- <?php endif; ?>
25
- </select>
26
-
27
- </span>
28
- </p>
29
-
30
- <?php do_action( 'dlm_mb_product_information_end', $product->get_id(), $product ); ?>
31
-
32
- </div>
1
+ <div class="dlm_mb_shop_product_information">
2
+
3
+ <?php do_action( 'dlm_mb_product_information_start', $product->get_id(), $product ); ?>
4
+
5
+ <p class="dlm_shop_field_row">
6
+ <label class="dlm_shop_field_label"><?php printf( esc_html__( 'Price (%s)', 'download-monitor' ), esc_html( \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ) ); ?></label>
7
+ <span class="dlm_shop_field_input">
8
+ <input type="text" name="_dlm_price" value="<?php echo esc_attr( $price ); ?>" class="dlm_shop_input" >
9
+ </span>
10
+ </p>
11
+
12
+ <p class="dlm_shop_field_row">
13
+ <label class="dlm_shop_field_label"><?php printf( esc_html__( 'Downloads', 'download-monitor' ), esc_html( \Never5\DownloadMonitor\Shop\Services\Services::get()->service( 'currency' )->get_currency_symbol() ) ); ?></label>
14
+ <span class="dlm_shop_field_input">
15
+
16
+ <select id="dlm_downloads" name="_dlm_downloads[]"
17
+ multiple="true"
18
+ data-placeholder="<?php echo esc_attr__( 'Select Downloads&hellip;', 'download-monitor' ); ?>"
19
+ class="dlm-select-ext dlm_shop_input">
20
+ <?php if ( ! empty( $downloads ) ) : ?>
21
+ <?php foreach ( $downloads as $download ) : ?>
22
+ <option value="<?php echo esc_attr( $download->get_id() ); ?>" <?php selected( in_array( $download->get_id(), $current_download_ids ), true ); ?>><?php echo esc_html( $download->get_title() ); ?></option>
23
+ <?php endforeach; ?>
24
+ <?php endif; ?>
25
+ </select>
26
+
27
+ </span>
28
+ </p>
29
+
30
+ <?php do_action( 'dlm_mb_product_information_end', $product->get_id(), $product ); ?>
31
+
32
+ </div>
assets/views/meta-box/version.php CHANGED
@@ -1,123 +1,126 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- } // Exit if accessed directly
5
- ?>
6
- <div class="dlm-metabox closed downloadable_file" data-file="<?php echo esc_html( $file_id ); ?>">
7
- <h3>
8
- <button type="button" class="remove_file button"><?php echo esc_html__( 'Remove', 'download-monitor' ); ?></button>
9
- <div class="handlediv" title="<?php echo esc_attr__( 'Click to toggle', 'download-monitor' ); ?>"></div>
10
- <strong>#<?php echo esc_html( $file_id ); ?> &mdash; <?php echo sprintf( wp_kses_post( __( 'Version <span class="version">%s</span> (%s)', 'download-monitor' ) ), ( $file_version ) ? esc_html( $file_version ) : esc_html__( 'n/a', 'download-monitor' ), esc_html( date_i18n( get_option( 'date_format' ) ), $file_post_date->format( 'U' ) ) ); ?> &mdash; <?php echo sprintf( _n( 'Downloaded %s time', 'Downloaded %s times', $file_download_count, 'download-monitor' ), esc_html( $file_download_count ) ); ?></strong>
11
- <input type="hidden" name="downloadable_file_id[<?php echo esc_attr( $version_increment ); ?>]" value="<?php echo esc_attr( $file_id ); ?>"/>
12
- <input type="hidden" class="file_menu_order" name="downloadable_file_menu_order[<?php echo esc_attr( $version_increment ); ?>]"
13
- value="<?php echo esc_attr( $version_increment ); ?>"/>
14
- </h3>
15
- <table cellpadding="0" cellspacing="0" class="dlm-metabox-content">
16
- <tbody>
17
-
18
- <?php do_action( 'dlm_downloadable_file_version_table_start', $file_id, $version_increment ); ?>
19
-
20
- <tr>
21
- <td width="1%">
22
- <label><?php echo esc_html__( 'Version', 'download-monitor' ); ?>:</label>
23
- <input type="text" class="short" name="downloadable_file_version[<?php echo esc_attr( $version_increment ); ?>]"
24
- placeholder="<?php echo esc_attr__( 'n/a', 'download-monitor' ); ?>" value="<?php echo esc_attr( $file_version ); ?>"/>
25
- </td>
26
- <td rowspan="3">
27
-
28
- <label><?php echo esc_html__( 'File URL(s); note: only enter multiple URLs in here if you want to use file mirrors', 'download-monitor' ); ?></label>
29
-
30
- <textarea name="downloadable_file_urls[<?php echo esc_attr( $version_increment ); ?>]" wrap="off" class="downloadable_file_urls"
31
- cols="5" rows="5"
32
- placeholder="<?php echo esc_attr__( 'Enter one file path/URL per line - multiple files will be used as mirrors (chosen at random).', 'download-monitor' ); ?>"><?php echo esc_textarea( implode( "\n", $file_urls ) ); ?></textarea>
33
-
34
- <p>
35
- <?php
36
- $buttons = apply_filters( 'dlm_downloadable_file_version_buttons', array(
37
- 'upload_file' => array(
38
- 'text' => __( 'Upload file', 'download-monitor' ),
39
- 'data' => array(
40
- 'choose' => __( 'Choose a file', 'download-monitor' ),
41
- 'update' => __( 'Insert file URL', 'download-monitor' ),
42
- )
43
- ),
44
- 'browse_for_file' => array(
45
- 'text' => __( 'Browse for file', 'download-monitor' )
46
- )
47
- ) );
48
-
49
- foreach ( $buttons as $key => $button ) {
50
- echo '<a href="#" class="button dlm_' . esc_attr( $key ) . '" ';
51
- if ( ! empty( $button['data'] ) ) {
52
- foreach ( $button['data'] as $data_key => $data_value ) {
53
- echo 'data-' . esc_attr( $data_key ) . '="' . esc_attr( $data_value ) . '" ';
54
- }
55
- }
56
- echo '>' . esc_html( $button['text'] ) . '</a> ';
57
- }
58
- ?>
59
- </p>
60
-
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>
65
- <label><?php echo esc_html__( 'Download count', 'download-monitor' ); ?>:</label>
66
- <input type="text" class="short" name="downloadable_file_download_count[<?php echo esc_attr( $version_increment ); ?>]"
67
- placeholder="<?php echo esc_attr( $file_download_count ); ?>"/>
68
- </td>
69
- </tr>
70
- <tr>
71
- <td>
72
- <label><?php echo esc_html__( 'File Date', 'download-monitor' ); ?>:</label>
73
- <input type="text" class="date-picker-field" name="downloadable_file_date[<?php echo esc_attr( $version_increment ); ?>]"
74
- maxlength="10" value="<?php echo esc_attr( $file_post_date->format('Y-m-d') ); ?>"/> @ <input
75
- type="text" class="hour" placeholder="<?php echo esc_html__( 'h', 'download-monitor' ) ?>"
76
- name="downloadable_file_date_hour[<?php echo esc_attr( $version_increment ); ?>]" maxlength="2" size="2"
77
- value="<?php echo esc_attr( $file_post_date->format( 'H' ) ); ?>"/>:<input type="text" class="minute"
78
- placeholder="<?php echo esc_attr__( 'm', 'download-monitor' ) ?>"
79
- name="downloadable_file_date_minute[<?php echo esc_attr( $version_increment ); ?>]"
80
- maxlength="2" size="2"
81
- value="<?php echo esc_attr( $file_post_date->format('i') ); ?>"/>
82
- </td>
83
- </tr>
84
-
85
- <?php
86
-
87
- // get available hashes
88
- $hashes = download_monitor()->service( 'hasher' )->get_available_hashes();
89
-
90
- if ( ! empty( $hashes ) ) {
91
- ?>
92
- <tr>
93
- <?php
94
- $hi = 0;
95
- foreach ( $hashes as $hash ) {
96
- if ( $hi > 0 && ( $hi % 2 ) == 0 ) {
97
- ?></tr><tr><?php
98
- }
99
- $hi ++;
100
- $value = "";
101
- $method = 'get_' . $hash;
102
- if ( method_exists( $version, $method ) ) {
103
- $value = $version->$method();
104
- }
105
- ?>
106
- <td>
107
- <label><?php echo esc_html( strtoupper( $hash ) ); ?> Hash</label>
108
- <input type="text" readonly="readonly" value="<?php echo esc_attr( $value ); ?>"/>
109
- </td>
110
- <?php } ?>
111
- </tr>
112
- <?php
113
- }
114
-
115
- ?>
116
-
117
-
118
-
119
- <?php do_action( 'dlm_downloadable_file_version_table_end', $file_id, $version_increment ); ?>
120
-
121
- </tbody>
122
- </table>
123
- </div>
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
+ ?>
6
+ <div class="dlm-metabox closed downloadable_file" data-file="<?php echo esc_html( $file_id ); ?>">
7
+ <h3>
8
+ <button type="button" class="remove_file button"><?php echo esc_html__( 'Remove', 'download-monitor' ); ?></button>
9
+ <div class="handlediv" title="<?php echo esc_attr__( 'Click to toggle', 'download-monitor' ); ?>"></div>
10
+ <strong>#<?php echo esc_html( $file_id ); ?> &mdash; <?php echo sprintf( wp_kses_post( __( 'Version <span class="version">%s</span> (%s)', 'download-monitor' ) ), ( $file_version ) ? esc_html( $file_version ) : esc_html__( 'n/a', 'download-monitor' ), esc_html( date_i18n( get_option( 'date_format' ), $file_post_date->format( 'U' ) ) ) ); ?> &mdash; <?php echo sprintf( esc_html( _n( 'Downloaded %s time', 'Downloaded %s times', $file_download_count, 'download-monitor' ) ), esc_html( $file_download_count ) ); ?></strong>
11
+ <input type="hidden" name="downloadable_file_id[<?php echo esc_attr( $version_increment ); ?>]" value="<?php echo esc_attr( $file_id ); ?>"/>
12
+ <input type="hidden" class="file_menu_order" name="downloadable_file_menu_order[<?php echo esc_attr( $version_increment ); ?>]"
13
+ value="<?php echo esc_attr( $version_increment ); ?>"/>
14
+ </h3>
15
+ <table cellpadding="0" cellspacing="0" class="dlm-metabox-content">
16
+ <tbody>
17
+
18
+ <?php do_action( 'dlm_downloadable_file_version_table_start', $file_id, $version_increment ); ?>
19
+
20
+ <tr>
21
+ <td width="1%">
22
+ <label><?php echo esc_html__( 'Version', 'download-monitor' ); ?>:</label>
23
+ <input type="text" class="short" name="downloadable_file_version[<?php echo esc_attr( $version_increment ); ?>]"
24
+ placeholder="<?php echo esc_attr__( 'n/a', 'download-monitor' ); ?>" value="<?php echo esc_attr( $file_version ); ?>"/>
25
+ </td>
26
+ <td rowspan="3">
27
+
28
+ <label><?php echo esc_html__( 'File URL(s); note: only enter multiple URLs in here if you want to use file mirrors', 'download-monitor' ); ?></label>
29
+
30
+ <textarea name="downloadable_file_urls[<?php echo esc_attr( $version_increment ); ?>]" wrap="off" class="downloadable_file_urls"
31
+ cols="5" rows="5"
32
+ placeholder="<?php echo esc_attr__( 'Enter one file path/URL per line - multiple files will be used as mirrors (chosen at random).', 'download-monitor' ); ?>"><?php echo esc_textarea( implode( "\n", $file_urls ) ); ?></textarea>
33
+
34
+ <p>
35
+ <?php
36
+ $buttons = array(
37
+ 'upload_file' => array(
38
+ 'text' => __( 'Upload file', 'download-monitor' ),
39
+ 'data' => array(
40
+ 'choose' => __( 'Choose a file', 'download-monitor' ),
41
+ 'update' => __( 'Insert file URL', 'download-monitor' ),
42
+ )
43
+ )
44
+ );
45
+
46
+ if( !get_option( 'dlm_turn_off_file_browser', true ) ){
47
+ $buttons['browse_for_file'] = array( 'text' => __( 'Browse for file', 'download-monitor' ) );
48
+ }
49
+
50
+ $buttons = apply_filters( 'dlm_downloadable_file_version_buttons', $buttons );
51
+
52
+ foreach ( $buttons as $key => $button ) {
53
+ echo '<a href="#" class="button dlm_' . esc_attr( $key ) . '" ';
54
+ if ( ! empty( $button['data'] ) ) {
55
+ foreach ( $button['data'] as $data_key => $data_value ) {
56
+ echo 'data-' . esc_attr( $data_key ) . '="' . esc_attr( $data_value ) . '" ';
57
+ }
58
+ }
59
+ echo '>' . esc_html( $button['text'] ) . '</a> ';
60
+ }
61
+ ?>
62
+ </p>
63
+
64
+ </td>
65
+ </tr>
66
+ <tr>
67
+ <td>
68
+ <label><?php echo esc_html__( 'Download count', 'download-monitor' ); ?>:</label>
69
+ <input type="text" class="short" name="downloadable_file_download_count[<?php echo esc_attr( $version_increment ); ?>]"
70
+ placeholder="<?php echo esc_attr( $file_download_count ); ?>"/>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td>
75
+ <label><?php echo esc_html__( 'File Date', 'download-monitor' ); ?>:</label>
76
+ <input type="text" class="date-picker-field" name="downloadable_file_date[<?php echo esc_attr( $version_increment ); ?>]"
77
+ maxlength="10" value="<?php echo esc_attr( $file_post_date->format('Y-m-d') ); ?>"/> @ <input
78
+ type="text" class="hour" placeholder="<?php echo esc_html__( 'h', 'download-monitor' ) ?>"
79
+ name="downloadable_file_date_hour[<?php echo esc_attr( $version_increment ); ?>]" maxlength="2" size="2"
80
+ value="<?php echo esc_attr( $file_post_date->format( 'H' ) ); ?>"/>:<input type="text" class="minute"
81
+ placeholder="<?php echo esc_attr__( 'm', 'download-monitor' ) ?>"
82
+ name="downloadable_file_date_minute[<?php echo esc_attr( $version_increment ); ?>]"
83
+ maxlength="2" size="2"
84
+ value="<?php echo esc_attr( $file_post_date->format('i') ); ?>"/>
85
+ </td>
86
+ </tr>
87
+
88
+ <?php
89
+
90
+ // get available hashes
91
+ $hashes = download_monitor()->service( 'hasher' )->get_available_hashes();
92
+
93
+ if ( ! empty( $hashes ) ) {
94
+ ?>
95
+ <tr>
96
+ <?php
97
+ $hi = 0;
98
+ foreach ( $hashes as $hash ) {
99
+ if ( $hi > 0 && ( $hi % 2 ) == 0 ) {
100
+ ?></tr><tr><?php
101
+ }
102
+ $hi ++;
103
+ $value = "";
104
+ $method = 'get_' . $hash;
105
+ if ( method_exists( $version, $method ) ) {
106
+ $value = $version->$method();
107
+ }
108
+ ?>
109
+ <td>
110
+ <label><?php echo esc_html( strtoupper( $hash ) ); ?> Hash</label>
111
+ <input type="text" readonly="readonly" value="<?php echo esc_attr( $value ); ?>"/>
112
+ </td>
113
+ <?php } ?>
114
+ </tr>
115
+ <?php
116
+ }
117
+
118
+ ?>
119
+
120
+
121
+
122
+ <?php do_action( 'dlm_downloadable_file_version_table_end', $file_id, $version_increment ); ?>
123
+
124
+ </tbody>
125
+ </table>
126
+ </div>
assets/views/order/page-order-details.php CHANGED
@@ -155,7 +155,7 @@ $items = $order->get_items();
155
  ?>
156
  </select>
157
  <button class="button button-primary button-large"
158
- id="dlm-order-details-button-change-state"><?php echo esc_html__( "Change", 'download-montior' ); ?></button>
159
  </li>
160
  <li>
161
  <label><?php echo esc_html__( "Date created", 'download-monitor' ); ?>:</label>
155
  ?>
156
  </select>
157
  <button class="button button-primary button-large"
158
+ id="dlm-order-details-button-change-state"><?php echo esc_html__( "Change", 'download-monitor' ); ?></button>
159
  </li>
160
  <li>
161
  <label><?php echo esc_html__( "Date created", 'download-monitor' ); ?>:</label>
changelog.txt CHANGED
@@ -1,519 +1,527 @@
1
- = 4.5.2 - 16.02.2022 =
2
- Fixed: Reports date selection bug - ( https://github.com/WPChill/download-monitor/issues/823 )
3
- Fixed: Extensions page view on Safari
4
-
5
- = 4.5.1 - 31.01.2022 =
6
- Removed: Removed plugin updater from lite.
7
-
8
- = 4.5.0 - 26.01.2022 =
9
- Fixed: Style missing in `[downloads]` shortcode - ( https://wordpress.org/support/topic/box-template-styling-stopped-displaying/ )
10
- Fixed: Downloads not being filtered by categories - https://github.com/WPChill/download-monitor/issues/815
11
- Fixed: Missing admin.css file for Download Monitor admin header in category edit page - https://github.com/WPChill/download-monitor/issues/817
12
- Changed: Category link in Downloads view table will now work similar to Posts and keep already set filters - https://github.com/WPChill/download-monitor/issues/818
13
- Changed: Minor sanitization and escaping fix
14
- Changed: Redo public taxonomies ( https://github.com/WPChill/download-monitor/issues/775 )
15
-
16
- = 4.4.14 - 12.01.2022 =
17
- Added: Filter 'dlm_filemanager_get_file_name' to filter the displayed file name.
18
- Fixed: Check if there are pages/posts/cpt with the same slug as the endpoint ( https://github.com/WPChill/download-monitor/issues/774 )
19
- Added: Filter 'dlm_completed_order_download' to filter download button in checkout page.
20
- Added: DLM Rest Routes for dlm_download, dlm_download_category & dlm_download_tag
21
- Fixed: Changed the escaping method to allow some html tags to be inserted in the title ( https://github.com/WPChill/download-monitor/issues/783 )
22
- Changed: The "View" category button in Downloads > Categories should not exist ( https://github.com/WPChill/download-monitor/issues/775 )
23
- Added: Upsells in admin download page options metabox ( https://github.com/WPChill/download-monitor/issues/780 )
24
- Fixed: Fixed a typo in settings. ( https://github.com/WPChill/download-monitor/issues/663 )
25
- Added: Quick copy button in download page. ( https://github.com/WPChill/download-monitor/issues/717 )
26
- Fixed: Wrong post_type in url. Coud not see order details. ( https://github.com/WPChill/download-monitor/issues/788 )
27
- Changed: The plugin's css will only load when the shortcode is present. ( https://github.com/WPChill/download-monitor/issues/782 )
28
-
29
- = 4.4.13 - 16.11.2021 =
30
- Fixed: Fatal error because an extra semicolon
31
-
32
- = 4.4.12 - 16.11.2021 =
33
- Fixed: Dependencies in widgets screen cc @HardeepAsrani
34
- Removed: Custom webpack build and replaced with @wordpress/scripts cc @HardeepAsrani
35
- Fixed: Optimized block with React Hooks for readibility purposes cc @HardeepAsrani
36
- Fixed: Product not saving in downloads select ( https://github.com/WPChill/download-monitor/issues/770 )
37
- Fixed: Typo in file URLs
38
- Fixed: Widget options update - https://github.com/WPChill/download-monitor/issues/768
39
- Fixed: Downloads not working with shop enabled - https://github.com/WPChill/download-monitor/issues/769
40
-
41
- = 4.4.11 - 03.11.2021 =
42
- Fixed: Reports date changing ( https://github.com/WPChill/download-monitor/issues/755 )
43
- Fixed: Log page - Status Column width ( https://github.com/WPChill/download-monitor/issues/756 )
44
- Fixed: Password protection form, password field not being displayed ( https://github.com/WPChill/download-monitor/issues/757 )
45
- Fixed: Escaping problem in the No-Access page ( https://github.com/WPChill/download-monitor/issues/758 )
46
-
47
- = 4.4.10 - 02.11.2021 =
48
- Fixed: Escaping in admin "All Downloads" page. ( https://github.com/WPChill/download-monitor/issues/753 )
49
- Added: Review request in dashboard.
50
-
51
- = 4.4.9 - 01.11.2021 =
52
- Fixed: Escaping in admin column, displaying HTLM instead of correct form
53
- Added: Clear transients button.
54
-
55
- = 4.4.8 - 29.10.2021 =
56
- Fixed: Insert Download/Quick Download Button
57
-
58
- = 4.4.7 - 29.10.2021 =
59
- Fixed: Sanitization & Escaping
60
-
61
- = 4.4.6 - 20.10.2021 =
62
- Fixed: Checking for modifications to the upload folder
63
-
64
- = 4.4.5 - 20.10.2021 =
65
- Fixed: PHP 8 bug - slow query ( https://github.com/WPChill/download-monitor/issues/685 )
66
- Fixed: Deprecated PHP 8 notice (https://github.com/WPChill/download-monitor/issues/682 thanks to @ashleyfae )
67
- Fixed: PHP templates errors ( https://github.com/WPChill/download-monitor/issues/691 )
68
- Fixed: Single shop download error ( https://github.com/WPChill/download-monitor/issues/690 )
69
- Fixed: Permalink errors - retrieved permalinks on archives didn't show the correct URL ( https://github.com/WPChill/download-monitor/issues/689 )
70
- Fixed : [downloads] shortcode now displays both featured and not featured downloads when left as is ( thanks to @kadimi https://github.com/WPChill/download-monitor/pull/526 )
71
- Added : Size filter in the placeholder image ( thanks to @jamesgol https://github.com/WPChill/download-monitor/pull/507 )
72
- Fixed : Sha256 support added when new files are added ( thanks to @jamesgol https://github.com/WPChill/download-monitor/pull/633 )
73
- Added: Upsells
74
- Fixed: Fix download from CDN where uploads folder is replaced ( https://github.com/WPChill/download-monitor/issues/698 )
75
- Fixed: Fatal error on URL with version param ( https://github.com/WPChill/download-monitor/issues/709 )
76
- Changed: Notice display
77
- Changed: Tab reconstruction and settings structure
78
- Changed: TinyMCE interface for short description ( https://github.com/WPChill/download-monitor/issues/708 )
79
- Fixed : Added layer of security against certain SQL Injections
80
-
81
- = 4.4.4: October 19, 2020 =
82
- * Tweak: Fixed PHP 7.4 notices.
83
- * Tweak: Check if download variable is set in content-download template. This prevents a fatal error in odd case no download is given.
84
- * Tweak: Now passing variables to actions to version.php admin view file.
85
- * Tweak: Bump websocket-extensions from 0.1.3 to 0.1.4
86
-
87
- = 4.4.3: June 8, 2020 =
88
- * Tweak: Small minor fixes and tweaks.
89
-
90
- = 4.4.2: April 3, 2019 =
91
- * Tweak: Fixed an relative inclusion bug that sometimes caused bootstrap not to properly load. (Undefined function dlm_is_shop_enabled()).
92
-
93
- = 4.4.1: March 27, 2019 =
94
- * Tweak: Added proper html escaping to order overview page, props Nam.Dinh.
95
-
96
- = 4.4.0: March 8, 2019 =
97
- * Feature: Added a new product post type to create a clear separation between downloads and the products you can sell. Read more about this here: https://www.download-monitor.com/kb/products/
98
- * Feature: Shop products now have a basic detail (single) page. This will be improved in future updates.
99
- * Feature: Added "Paid Only" option to downloads. This allows you to require users to have a purchase linked to the download before file can be downloaded.
100
- * Feature: Versions are now passed through the no-access page.
101
- * Tweak: dlm_buy shortcode now takes a product id, instead of a download ID. These need to be updated manually.
102
- * Tweak: Shop feature has been more isolated from non-shop. To enable shop, go to general Download Monitor settings and check "Enable Shop".
103
- * Tweak: PayPal gateway is now enabled by default.
104
-
105
- = 4.3.0: February 27, 2019 =
106
- * Feature: Added Shop (Beta) feature. You can now sell your downloads via Download Monitor! More addition to shop (like taxes and discounts) coming soon.
107
- * Feature: Added PayPal integration for shop feature.
108
- * Feature: Added an onboarding screen, helping the user set up the plugin.
109
- * Tweak: Fixed an error when changing dates in reports on Safari.
110
- * Tweak: Added download ID to Reports overview table.
111
- * Tweak: Increased spacing of download title on reports summary block.
112
- * Tweak: We're no longer automatically creating the No Access page. This is now done via the onboarding screen.
113
- * Tweak: We're no longer supporting PHP 5.2. If you upgrade and are still running PHP 5.2, the plugin will not load but display an upgrade notice instead. More info: https://www.download-monitor.com/kb/minimum-required-php-version/
114
- * Tweak: Updated translations.
115
-
116
- = 4.2.1: January 31, 2019 =
117
- * Tweak: Correctly set default template of Gutenberg block on frontend of website when no specific template is set.
118
-
119
- = 4.2.0: January 24, 2019 =
120
- * Feature: Added Gutenberg download block. Type /download in your post screen to see it in action!
121
-
122
- = 4.1.1: September 12, 2018 =
123
- * Tweak: Fixed a bug that incorrectly included featured downloads by default in [downloads].
124
- * Tweak: Added 'dlm_get_template_part_args' filter that allows argument filtering on Download Monitor templates.
125
-
126
- = 4.1.0: May 21, 2018 =
127
- * Feature: Added a new option that allows site-owners if and how they wish to track IP addresses of users.
128
- * Feature: Added a new option that allows site-owners to decide if they wish to track user agent of users.
129
- * Tweak: Fixed an issue where title of log dates had incorrect date.
130
- * Tweak: Added compatibility for 'Post Types Order' plugin. The dashboard widget no longer is affected by their custom order.
131
- * Tweak: Added dlm_frontend_scripts filter, allows user to not include DLM frontend assets.
132
- * Tweak: No longer load jQuery UI CSS from Google CDN, file is now included in plugin.
133
- * Tweak: No longer loading jQuery images from Google CDN, images are now included in plugin.
134
-
135
- = 4.0.8: May 3, 2018 =
136
- * Tweak: Fixed a bug in the legacy upgrader that caused versions with empty dates not to added.
137
- * Tweak: Fixed the use of getTimeStamp() because PHP 5.2 doesn't support this.
138
-
139
- = 4.0.7: April 13, 2018 =
140
- * Tweak: Fixed a bug that caused certain months in the reports filter to crash for non English languages.
141
- * Tweak: Fixed a bug that caused the 10 download limit on the Dashboard Widget to be ignored.
142
- * Tweak: Added "dlm_remove_dashboard_popular_downloads" filter that allows for not loading of dashboard widget.
143
- * Tweak: Moved 'dlm_log_item' filter to within the WordPressLogItemRepository::persist() method. This way the filter will always be called upon a log persist.
144
- * Tweak: Filter 'dlm_log_item' 2nd and 3rd argument changed from DLM_Download & DLM_Download_Version type to int (ID's of both download and version).
145
- * Tweak: Moved 'dlm_downloading_log_item_added' filter to within the WordPressLogItemRepository::persist() method. This way the filter will always be called upon a log persist.
146
- * Tweak: Filter 'dlm_downloading_log_item_added' 2nd and 3rd argument changed from DLM_Download & DLM_Download_Version type to int (ID's of both download and version).
147
- * Tweak: Added filter 'dlm_reports_page_start' to add content on top of admin reports page.
148
- * Tweak: Added filter 'dlm_reports_page_end' to add content on bottom of admin reports page.
149
- * Tweak: Added download id and download object to 'dlm_placeholder_image_src' filter, props [James Golovich](https://github.com/jamesgol).
150
- * Tweak: Added filter 'dlm_download_get_versions' on return of DLM_Download::get_versions(), props [James Golovich](https://github.com/jamesgol).
151
- * Tweak: Added $atts to various shortcode filters, props [James Golovich](https://github.com/jamesgol).
152
-
153
- = 4.0.6: March 8, 2018 =
154
- * Tweak: Fixed a bug in the version-list template, correct version links are now displayed.
155
-
156
- = 4.0.5: February 21, 2018 =
157
- * Tweak: Fixed a bug that caused the "Add file" button to not appear on the Add New Download screen.
158
- * Tweak: Fixed a bug that caused the crc32b hash not to be saved when adding a download via the 'Quick-add Download' option.
159
- * Tweak: WordPressVersionRepository no longer explicitly sets 'post_content' and 'post_excerpt' database fields of dlm_download_version to empty strings. Props [Erin Morelli](https://github.com/ErinMorelli).
160
-
161
- = 4.0.4: February 19, 2018 =
162
- * Tweak: Fixed a bug where versions of draft and pending review downloads were not displayed in the backend.
163
-
164
- = 4.0.3: February 9, 2018 =
165
- * Tweak: We now cache if we need to upgrade legacy downloads. This prevents us from checking if we need to upgrade on every pageload, improving performance and preventing constant sql warning when legacy table doesn't exist.
166
- * Tweak: Fixed SQL error in has_ip_downloaded_version() call ('type' does not exist).
167
-
168
- = 4.0.2: February 2, 2018 =
169
- * Tweak: Moved no cache headers up in download process, improving cache prevention.
170
- * Tweak: Added new log item meta data methods, making it easier to add meta data.
171
- * Tweak: Added new action 'dlm_downloading_log_item_added'. Is triggered after log item is added on download request.
172
- * Tweak: Added $download and $version arguments to 'dlm_log_item' filter.
173
-
174
- = 4.0.1: January 25, 2018 =
175
- * Tweak: Fixed an issue that caused widget limit to not work.
176
- * Tweak: Fixed an count() warning in PHP7.2 on extension page.
177
- * Tweak: Fixed a passed by reference notice in lower PHP versions in get_visitor_ip() call.
178
- * Tweak: Added 'dlm_download_count' filter to fitler get_download_count() return value.
179
- * Tweak: Downloads now return an empty version if no version is added. This prevents mulitple possible fatal errors when external scripts don't check if get_version() returns null.
180
- * Tweak: Added an extra check to if website needs upgrading. If there are new downloads in the database, no upgrade is recommended.
181
- * Tweak: Added an extra warning on the upgrade page to users that navigate to the page while we think no upgrade is needed.
182
- * Tweak: Requesting a non existing download no longer triggers a fatal error (exception is now properly handled).
183
- * Tweak: Correct exception handling when trying to save meta boxes of non existing download.
184
-
185
- = 4.0.0: January 22, 2018 =
186
- * Feature: Added reports page for download statistics.
187
- * Feature: Added hash values to version blocks.
188
- * Feature: Added option to include downloads in WordPress default search results, props [Kurt Zenisek](https://github.com/KZeni).
189
- * Feature: Added SHA256 hash.
190
- * Feature: Added support for regex patterns in user agent blacklist, props [Matt Mower](https://github.com/mdmower).
191
- * Feature: Added user filter to logs, props [neptuneweb](https://github.com/neptuneweb).
192
- * Feature: Log columns in log table are now sortable.
193
- * Feature: Added an option for the user to remove all transients.
194
- * Feature: Added the ability to exclude tags from the [downloads] shortcode.
195
- * Feature: Added search option in "Insert Download" overlay.
196
- * Feature: Added builtin legacy upgrade tool to help users move their downloads from legacy to current version.
197
- * Tweak: Added 'dlm_file_path' filter to filter file_path in download request.
198
- * Tweak: We're now only serving downloads when requested over the GET or POST HTTP method. This can be filtered via filter dlm_accepted_request_methods.
199
- * Tweak: Added Download Title to download log CSV export file.
200
- * Tweak: Added 'dlm_shortcode_total_downloads' filter to output of [total_downloads] shortcode, props [Joel James](https://github.com/Joel-James).
201
- * Tweak: Added support for Apache 2.4 and up in generated .htaccess file.
202
- * Tweak: Added 'dlm_download_use_version_transient' filter to allow website to not use cache transients.
203
- * Tweak: Downloads need to be published in order to exist, draft downloads can no longer be downloaded.
204
- * Tweak: Fixed plugin links on plugin overview page.
205
- * Tweak: Optimization rewrite of DLM_Download class.
206
- * Tweak: Optimization rewrite of DLM_Download_Version class.
207
- * Tweak: Introduction of Factory and Repository design patterns for Downloads and Versions.
208
- * Tweak: Complete rewrite of setting fields.
209
- * Tweak: Updated template files to use new download methods.
210
- * Tweak: Introduced new filter "dlm_setting_field_TYPE", allowing third party programs to add custom field types to settings.
211
- * Tweak: Implemented Composer autoloader.
212
- * Tweak: Download Categories and Download Tags label name now contains 'Download'.
213
- * Tweak: Download Widget now uses default template output set in settings when no output template is set.
214
- * Tweak: Download Widget CSS tweaks.
215
- * Tweak: Download category and download tags are now excluded from Yoast SEO sitemap.
216
- * Tweak: 'Delete Logs' button now requires a confirmation.
217
- * Tweak: Placeholders for download thumbnails in media library list view are now also properly replaced.
218
- * Tweak: Minor UX improvement on Download Information fields making it easier to copy these, props [Danny van Kooten](https://github.com/dannyvankooten).
219
- * Tweak: Replaced double underscore prefixed functions with single underscore prefix to comply with PHP reserved method naming rules.
220
-
221
- = 1.9.9: October 18, 2017 =
222
- * Tweak: Fixed an issue with 'No Access' page not saving correctly.
223
-
224
- = 1.9.8: October 6, 2017 =
225
- * Tweak: Add option to allow HTTP header X_FORWARD_FOR. Allowing Download Monitor to use the X_FORWARDED_FOR HTTP header set by proxies as the IP address.
226
- * Tweak: Download files that are added via 'Quick-add download' are now properly added to WP media library.
227
- * Tweak: Introduced 'lazy select' option for Download Monitor settings. Options of these select elements are only loaded on setting pages, increasing overall plugin performance.
228
- * Tweak: We're now filtering attachment thumbnails in media library for files in dlm_uploads. This solves 403 errors on thumbnails in the protected folder.
229
-
230
- = 1.9.7: May 5, 2017 =
231
- * Tweak: Added capability checks to log export and delete functionality. Props [Pritect](http://www.pritect.net/).
232
- * Tweak: We're now redirecting users to home on empty download request. Behavior can be changed via filters. See https://www.download-monitor.com/kb/empty-download-request-redirection/
233
-
234
- = 1.9.6: February 28, 2017 =
235
- * Tweak: Fix display for unknown user in exported log, props [Matt Mower](https://github.com/mdmower).
236
- * Tweak: Settings screen hash tweaks.
237
- * Tweak: Display correct tab on settings save, props [Matt Mower](https://github.com/mdmower).
238
- * Tweak: Fixed issue with some dismissible notices.
239
- * Tweak: Add Portuguese (pt_PT) translation, props [Pedro Mendonça](https://github.com/pedro-mendonca).
240
- * Tweak: Included various language tweaks via Transifex. Help out over at [Transifex](https://www.transifex.com/barrykooijplugins/download-monitor/).
241
-
242
- = 1.9.5: August 23, 2016 =
243
- * Tweak: Fixed a bug where Download Options couldn't be checked off in quick edit.
244
- * Tweak: Updated settings screen description for custom templates.
245
- * Tweak: Download Information input fields are now readonly since these fields are informational only. Props [kraftner](https://github.com/kraftner).
246
- * Tweak: Removed code that triggered PHP7 incompatibility false positives in PHP7 compatibility scans.
247
- * Tweak: Removed old JSON library since default JSON functions are available from PHP 5.2 and up.
248
-
249
- = 1.9.4: May 2, 2016 =
250
- * Tweak: Various cookie tweaks to prevent incorrect double logging entries.
251
- * Tweak: Added a Cookie Manager class to centralize cookie related tasks.
252
-
253
- = 1.9.3: April 11, 2016 =
254
- * Tweak: Small rework of [downloads] loop. Downloads now filterable per download via dlm_shortcode_downloads_loop_download.
255
- * Tweak: We now report missing versions for removed downloads in logs, props [Matt Mower](https://github.com/mdmower).
256
- * Tweak: Updated Danish translation, props [Georg Adamsen](https://github.com/GSAdev).
257
-
258
- = 1.9.2: March 27, 2016 =
259
- * Tweak: Fixed bug where 'version' and 'version_id' were ignored in [download].
260
- * Tweak: Fixed a bug that caused the file upload overlay to append file URL to wrong version, props [kraftner](https://github.com/kraftner).
261
- * Tweak: Optimized [download] shortcode code.
262
- * Tweak: Flush rewrites in admin settings on shutdown instead of during page load, props [sybrew](https://github.com/sybrew).
263
- * Tweak: Added extra checks to blacklist checks to prevent stristr empty needle notices, props [Matt Mower](https://github.com/mdmower).
264
- * Tweak: Removed DS_Store backups, props [Matt Mower](https://github.com/mdmower).
265
- * Tweak: Added Ukrainian translation, props [Fremler](https://www.transifex.com/user/profile/Fremler/).
266
- * Tweak: Added Croatian translation, props [molekula](https://www.transifex.com/user/profile/molekula/).
267
- * Tweak: Updated Dutch translation.
268
- * Tweak: Updated Portuguese (Brazil) translation.
269
-
270
- = 1.9.1: December 1, 2015 =
271
- * Tweak: Check if $visitor_ua isn't empty to prevent stristr warnings.
272
- * Tweak: Added wmv filetype icon support
273
- * Tweak: Correctly populate data on quick edit of download.
274
- * Tweak: Settings tab now loads tab of set URL hash.
275
-
276
- = 1.9.0: September 15, 2015 =
277
- * Feature: We added a separate 'No Access' page that includes the following features:
278
- * No Access Page : Added [dlm_no_access] shortcode that displays the no access content.
279
- * No Access Page : Added new option in Access settings tab to set No Access Page.
280
- * No Access Page : Added new template file for no access page.
281
- * No Access Page : We now redirect to set No Access page (if set) when user has no access to download.
282
- * Feature: Added ability to remove log entries.
283
- * Feature: Added browser detection for IE 11 and up.
284
- * Feature: Added OS detection for Windows 8.1
285
- * Feature: Added OS detection for Windows 10
286
- * Feature: Added Featured download, Members only and Redirect to file to bulk edit options.
287
- * Feature: Added Featured download, Members only and Redirect to file to quick edit options.
288
-
289
- = 1.8.1: August 21, 2015 =
290
- * Tweak: Small tweak to make download count fit better in box template.
291
- * Tweak: Fixed a zero file size bug.
292
- * Tweak: Fixed featured image disappears bug, props [Ricardo](https://wordpress.org/support/profile/ricardopires).
293
- * Tweak: Search template file in custom path before in plugin path.
294
-
295
- = 1.8.0: July 10, 2015 =
296
- * Feature: Added option to only count downloads and add logs from unique ip addresses, props [Matt Mower](https://github.com/mdmower).
297
- * Feature: It's now possible to display downloads with the downloads shortcode that are in all given categories (AND instead of OR) by using + (plus_ instead of , (comma).
298
- * Feature: Display nginx rules if server is running nginx.
299
- * Feature: Added Multisite / Network compatibility.
300
- * Feature: Redone blacklist IP feature, now available in the 'Access' tab.
301
- * Feature: Redone blacklist user agent feature, now available in the 'Access' tab.
302
- * Tweak: Added icon support for Office X Excel & PPT extensions.
303
- * Tweak: Run thumbnail compatibility method later to allowed themes to register first.
304
- * Tweak: Prefixed admin CSS classes to prevent plugin conflicts.
305
- * Tweak: Fix checking shortcodes for empty version strings, props [Matt Mower](https://github.com/mdmower).
306
- * Tweak: Fixed a call of trigger() in DLM_Download_Handler, props [Matt Mower](https://github.com/mdmower).
307
- * Tweak: Remove trailing space from downloads count, props [Matt Mower](https://github.com/mdmower).
308
- * Tweak: Directory browser items are now always in alphabetical order, props [Matt Mower](https://github.com/mdmower).
309
- * Tweak: The 60 seconds download counter increment cool down is now set to version ID instead of download ID, props [Matt Mower](https://github.com/mdmower).
310
- * Tweak: Created and implemented local independent basename fixing issues with Cyrillic alphabets.
311
- * Tweak: Made user agents regexes filterable: dlm_ua_parser_regexes.
312
- * Tweak: Optimized log status icons, also fixes WP emoji conflict.
313
- * Tweak: Members Only check now only does check if requester can still download.
314
- * Tweak: Replaced PHP4 constructors in widget.
315
- * Tweak: Added Danish translation.
316
- * Tweak: Updated Dutch translation.
317
- * Tweak: Updated German translation.
318
-
319
- = 1.7.2: April 29, 2015 =
320
- * Tweak: Fixed a bug that caused logs not to be displayed in WP 4.2.
321
-
322
- = 1.7.1: April 17, 2015 =
323
- * Tweak: Pass third arg to add_query_arg to prevent XSS.
324
-
325
- = 1.7.0: March 22, 2015 =
326
- * Feature: Added 'Download Information' meta box to edit download screen that displays useful download information.
327
- * Feature: Error message shown when visitor has no access to download is now an option.
328
- * Tweak: Fixing a bug where versions with spaces did not work, versions now are checked on a sanitized title.
329
- * Tweak: Viewing logs now needs custom capability: dlm_manage_logs (automatically added to administrators).
330
- * Tweak: Improved hotlink prevention check.
331
- * Tweak: Extension page tweaks.
332
- * Tweak: Added $download_id argument to dlm_hotlink_redirect filter.
333
- * Tweak: Moved hash settings to their own tab.
334
- * Tweak: Moved 'X-Accel-Redirect / X-Sendfile' and 'Prevent hotlinking' settings to General tab.
335
- * Tweak: Optimized the Insert Download button.
336
- * Tweak: Introduced a multi-byte-safe pathinfo so we can handle 'special' filenames.
337
- * Tweak: Also set the post_date_gmt value for version dates.
338
- * Tweak: Updated French translation. Props Li-An.
339
- * Tweak: Updated German translation. Props maphy-psd.
340
- * Tweak: Updated Swedish translation. Props EyesX.
341
- * Tweak: Update Slovakian translation. Props attitude.
342
- * Tweak: Added Dutch translation.
343
-
344
- = 1.6.4: March 8, 2015 =
345
- * Removed unused library jqueryFileTree.
346
- * dlm_shortcode_download_content filter now also includes $atts.
347
- * Fixed small parse file parse error because of whitespace.
348
- * Changed some admin menu hook priorities.
349
-
350
- = 1.6.3: January 18, 2015 =
351
- * Fixed an undefined method call 'get_filesize'.
352
- * Allow third party extensions to hijack [downloads] shortcode with filter dlm_shortcode_download_content.
353
- * Made 'wp_dlm_downloading' cookie only accessible through the HTTP protocol, props [Matt Mower](https://github.com/mdmower).
354
-
355
- = 1.6.2: January 11, 2015 =
356
- * Fixed a bug that caused translations not to load.
357
- * Fixed a bug that prevented download versions from being removed.
358
- * Fixed a pagination in 'insert download' shortcode bug.
359
- * Fixed a bug in the template loader when used with a custom directory, a slug and no custom template.
360
- * Removed assigning by reference, fixed strict notice when deleting downloads.
361
- * Tweaked template loader to accept arguments.
362
- * Allow downloads shortcode WP_Query arguments to be filtered with 'dlm_shortcode_downloads_args'.
363
-
364
- = 1.6.1: January 9, 2015 =
365
- * Fixed an extension activation error.
366
- * Fixed a bug that caused the featured image to disappear in some themes.
367
- * Tweak: In multisite only users that are a member of the blog can download 'member only' downloads.
368
-
369
- = 1.6.0: January 8, 2015 =
370
- * Plugin is now initiated at plugins_loaded.
371
- * Implemented auto loader.
372
- * Classes are no longer initiated at bottom of class file but whenever an object is needed.
373
- * Code standards corrections.
374
- * Introduced Template_Handler. Loading of template parts should be done through this class.
375
- * Removed $GLOBALS['dlm_logging'] global.
376
- * Removed $GLOBALS['DLM_Download_Handler'] global.
377
- * Removed internal use of $download_monitor global.
378
- * Moved all inline JavaScript to separate JavaScript files.
379
- * Moved all install related code to installer class.
380
- * Moved main plugin class to it's own file.
381
- * Deprecated 'dlm_create_log' function.
382
- * Redone extensions page.
383
- * Fixed a bug in shortcode download where orderby=download_count wasn't working.
384
- * Fixed a bug where downloads didn't work with default WP permalink structure.
385
- * Delete dlm_file_version_ids_ transient on save.
386
- * Added dlm_download_headers filter.
387
- * Added dlm_get_template_part filter.
388
-
389
- = 1.5.1 =
390
- * Fallback for JSON_UNESCAPED_UNICODE to fix accented characters on < PHP 5.4.
391
- * Changed default orderby for downloads shortcode to date, desc.
392
-
393
- = 1.5.0 =
394
- * JSON_UNESCAPED_UNICODE for files to fix unicode chars when json encoded. Fix needs PHP 5.4+ to work, but won't break lower versions.
395
- * Style filetype-docx
396
- * Update get_version_id to work with non-numeric versions.
397
- * Fix shortcode arg booleans.
398
- * Add transient cache for get_file_version_ids.
399
- * Moved all translations to Transifex - https://www.transifex.com/projects/p/download-monitor/
400
- * Changed text domain from download_monitor to download-monitor.
401
- * Added Grunt.
402
- * Added options to generate file hashes DISABLED BY DEFAULT as they can cause performance issues with large files.
403
-
404
- = 1.4.4 =
405
- * Use home_dir instead of site_dir - fixes hot-linking protections against own site (when not in root dir)
406
- * Replace hardcoded WP_CONTENT_DIR and WP_CONTENT_URL with wp_upload_dir to work when UPLOADS and UPLOADS_URL constants are set.
407
- * Added some filters for hotlink protection customisation.
408
-
409
- = 1.4.3 =
410
- * Add password form to download page when required
411
- * Run shortcodes in excerpt/short desc
412
- * Various hook additions
413
- * pr_br and zh_cn translation
414
- * Sort download count by meta_value_num
415
- * Store URLs in JSON format to allow easier search/replace
416
- * Fix dashboard sorting
417
- * Option for basic referer checking to prevent hotlinking.
418
- * Only get file hashes on save as they are resource heavy.
419
- * Disable remote file hash generation, but can be enabled with filter dlm_allow_remote_hash_file
420
- * Radio buttons instead of select (with pagination) in popup to improve performance.
421
-
422
- = 1.4.2 =
423
- * Fix for site_url -> abspath
424
- * Check if hash functions are supported before use.
425
-
426
- = 1.4.1 =
427
- * Fix file_exists error in download handlers
428
-
429
- = 1.4.0 =
430
- * MP6/3.8 admin styling. Requires 3.8.
431
- * Polish translation.
432
- * Turkish translation.
433
- * Change capability required to view dashboard widget.
434
- * Don't show "insert download" when editing a download.
435
- * Allow pagination for the [downloads] shortcode. Simply add paginate=true to the shortcode.
436
- * Reverted flush change in download handler to reduce memory usage on some hosting envrionments
437
- * changed download handlers and fixed corruption when resuming files
438
- * Calculate md5/sha1/crc32 hashes for files. Obtainable via methods or download_data, e.g. [download_data id="86" data="md5"]
439
- * Added file_date data
440
-
441
- = 1.3.2 =
442
- * Cleaned up log table queries
443
- * Tweaked download handler headers
444
- * Tweaked logging
445
- * Limit UA to 200
446
- * Setcookie to prevent double logging
447
- * Addons page (disable using add_filter( 'dlm_show_addons_page', '__return_false' ); )
448
-
449
- = 1.3.1 =
450
- * Added some new hooks
451
- * FR and SR_RS updates
452
-
453
- = 1.3.0 =
454
- * Fix 0kb downloads in some hosting enviroments
455
- * Added button to delete logs
456
- * Fixed log page when no logs are present
457
- * FR and HU updates
458
- * Added dropdown for the default template option to make available templates more obvious
459
- * Added version-list and title templates
460
-
461
- = 1.2.0 =
462
- * Option to redirect to files only (do not force)
463
- * Fixed textdomains
464
- * HU translation by Győző Farkas
465
- * Fix dlm_upload folder when not using month/day upload folders.
466
- * Fix IP lookup
467
- * Resumable download support
468
- * Tweaked download handler
469
-
470
- = 1.1.2 =
471
- * HTTPS headers for IE fix
472
- * Italian locale
473
-
474
- = 1.1.1 =
475
- * Specify error statuses on wp_die messages e.g. 404 for missing files.
476
- * Moved DONOTCACHEPAGE
477
-
478
- = 1.1.0 =
479
- * Fixed admin notices
480
- * Added download link to admin 'file' column for copying and pasting
481
- * Farsi localisation
482
- * Wrapping content in a [download] shortcode will wrap it in a simple link.
483
-
484
- = 1.0.6 =
485
- * Hide taxonomies from nav menus
486
- * Fix categories in download_data method.
487
-
488
- = 1.0.5 =
489
- * When do_not_force is enabled, still replace abspath with home_url
490
- * Exclude dlm_download from search and disable query var
491
- * Added category_include_children option for downloads shortcode
492
- * Fixed logs time offset.
493
-
494
- = 1.0.4 =
495
- * Tweak admin page detection to work when no downloads exist.
496
- * Fix dashboard widget warning.
497
- * Add filters to logs and export csv function.
498
- * Added extra columns to CSV.
499
-
500
- = 1.0.3 =
501
- * Fix config page to work with multibyte tab names.
502
- * Japanese locale by hide92795
503
- * Admin CSS/script conditonally loaded
504
- * Versions are now strtolower to be compatible with version_compare and to standardise numbers.
505
-
506
- = 1.0.2 =
507
- * Only use wp_remote_head to get fielsize on remote files. Prevents timeouts when a file doesn't exist.
508
- * If a filesize cannot be found, set to -1 to prevent re-tries.
509
- * Insert button added to all CPT except downloads.
510
- * French locale by Jean-Michel MEYER.
511
-
512
- = 1.0.1 =
513
- * Update blockui
514
- * Workaround root relative URLS
515
-
516
- = 1.0.0 =
517
- * Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
518
-
 
 
 
 
 
 
 
 
519
  == Upgrade Notice ==
1
+ = 4.5.3 - 21.02.2022 =
2
+ Added: LITE vs PRO page - https://github.com/WPChill/download-monitor/issues/851
3
+ Changed: Extensions UI/texts update ( -https://github.com/WPChill/download-monitor/issues/846, https://github.com/WPChill/download-monitor/issues/849, https://github.com/WPChill/download-monitor/issues/838 )
4
+ Fixed: Escaping the excerpt - https://github.com/WPChill/download-monitor/issues/790
5
+ Fixed: Error in logs `select user` filter if user was deleted - https://github.com/WPChill/download-monitor/issues/828
6
+ Added: Setting to disable file browser - https://github.com/WPChill/download-monitor/issues/469
7
+ Fixed: Translation & escaping fixes
8
+
9
+ = 4.5.2 - 16.02.2022 =
10
+ Fixed: Reports date selection bug - ( https://github.com/WPChill/download-monitor/issues/823 )
11
+ Fixed: Extensions page view on Safari
12
+
13
+ = 4.5.1 - 31.01.2022 =
14
+ Removed: Removed plugin updater from lite.
15
+
16
+ = 4.5.0 - 26.01.2022 =
17
+ Fixed: Style missing in `[downloads]` shortcode - ( https://wordpress.org/support/topic/box-template-styling-stopped-displaying/ )
18
+ Fixed: Downloads not being filtered by categories - https://github.com/WPChill/download-monitor/issues/815
19
+ Fixed: Missing admin.css file for Download Monitor admin header in category edit page - https://github.com/WPChill/download-monitor/issues/817
20
+ Changed: Category link in Downloads view table will now work similar to Posts and keep already set filters - https://github.com/WPChill/download-monitor/issues/818
21
+ Changed: Minor sanitization and escaping fix
22
+ Changed: Redo public taxonomies ( https://github.com/WPChill/download-monitor/issues/775 )
23
+
24
+ = 4.4.14 - 12.01.2022 =
25
+ Added: Filter 'dlm_filemanager_get_file_name' to filter the displayed file name.
26
+ Fixed: Check if there are pages/posts/cpt with the same slug as the endpoint ( https://github.com/WPChill/download-monitor/issues/774 )
27
+ Added: Filter 'dlm_completed_order_download' to filter download button in checkout page.
28
+ Added: DLM Rest Routes for dlm_download, dlm_download_category & dlm_download_tag
29
+ Fixed: Changed the escaping method to allow some html tags to be inserted in the title ( https://github.com/WPChill/download-monitor/issues/783 )
30
+ Changed: The "View" category button in Downloads > Categories should not exist ( https://github.com/WPChill/download-monitor/issues/775 )
31
+ Added: Upsells in admin download page options metabox ( https://github.com/WPChill/download-monitor/issues/780 )
32
+ Fixed: Fixed a typo in settings. ( https://github.com/WPChill/download-monitor/issues/663 )
33
+ Added: Quick copy button in download page. ( https://github.com/WPChill/download-monitor/issues/717 )
34
+ Fixed: Wrong post_type in url. Coud not see order details. ( https://github.com/WPChill/download-monitor/issues/788 )
35
+ Changed: The plugin's css will only load when the shortcode is present. ( https://github.com/WPChill/download-monitor/issues/782 )
36
+
37
+ = 4.4.13 - 16.11.2021 =
38
+ Fixed: Fatal error because an extra semicolon
39
+
40
+ = 4.4.12 - 16.11.2021 =
41
+ Fixed: Dependencies in widgets screen cc @HardeepAsrani
42
+ Removed: Custom webpack build and replaced with @wordpress/scripts cc @HardeepAsrani
43
+ Fixed: Optimized block with React Hooks for readibility purposes cc @HardeepAsrani
44
+ Fixed: Product not saving in downloads select ( https://github.com/WPChill/download-monitor/issues/770 )
45
+ Fixed: Typo in file URLs
46
+ Fixed: Widget options update - https://github.com/WPChill/download-monitor/issues/768
47
+ Fixed: Downloads not working with shop enabled - https://github.com/WPChill/download-monitor/issues/769
48
+
49
+ = 4.4.11 - 03.11.2021 =
50
+ Fixed: Reports date changing ( https://github.com/WPChill/download-monitor/issues/755 )
51
+ Fixed: Log page - Status Column width ( https://github.com/WPChill/download-monitor/issues/756 )
52
+ Fixed: Password protection form, password field not being displayed ( https://github.com/WPChill/download-monitor/issues/757 )
53
+ Fixed: Escaping problem in the No-Access page ( https://github.com/WPChill/download-monitor/issues/758 )
54
+
55
+ = 4.4.10 - 02.11.2021 =
56
+ Fixed: Escaping in admin "All Downloads" page. ( https://github.com/WPChill/download-monitor/issues/753 )
57
+ Added: Review request in dashboard.
58
+
59
+ = 4.4.9 - 01.11.2021 =
60
+ Fixed: Escaping in admin column, displaying HTLM instead of correct form
61
+ Added: Clear transients button.
62
+
63
+ = 4.4.8 - 29.10.2021 =
64
+ Fixed: Insert Download/Quick Download Button
65
+
66
+ = 4.4.7 - 29.10.2021 =
67
+ Fixed: Sanitization & Escaping
68
+
69
+ = 4.4.6 - 20.10.2021 =
70
+ Fixed: Checking for modifications to the upload folder
71
+
72
+ = 4.4.5 - 20.10.2021 =
73
+ Fixed: PHP 8 bug - slow query ( https://github.com/WPChill/download-monitor/issues/685 )
74
+ Fixed: Deprecated PHP 8 notice (https://github.com/WPChill/download-monitor/issues/682 thanks to @ashleyfae )
75
+ Fixed: PHP templates errors ( https://github.com/WPChill/download-monitor/issues/691 )
76
+ Fixed: Single shop download error ( https://github.com/WPChill/download-monitor/issues/690 )
77
+ Fixed: Permalink errors - retrieved permalinks on archives didn't show the correct URL ( https://github.com/WPChill/download-monitor/issues/689 )
78
+ Fixed : [downloads] shortcode now displays both featured and not featured downloads when left as is ( thanks to @kadimi https://github.com/WPChill/download-monitor/pull/526 )
79
+ Added : Size filter in the placeholder image ( thanks to @jamesgol https://github.com/WPChill/download-monitor/pull/507 )
80
+ Fixed : Sha256 support added when new files are added ( thanks to @jamesgol https://github.com/WPChill/download-monitor/pull/633 )
81
+ Added: Upsells
82
+ Fixed: Fix download from CDN where uploads folder is replaced ( https://github.com/WPChill/download-monitor/issues/698 )
83
+ Fixed: Fatal error on URL with version param ( https://github.com/WPChill/download-monitor/issues/709 )
84
+ Changed: Notice display
85
+ Changed: Tab reconstruction and settings structure
86
+ Changed: TinyMCE interface for short description ( https://github.com/WPChill/download-monitor/issues/708 )
87
+ Fixed : Added layer of security against certain SQL Injections
88
+
89
+ = 4.4.4: October 19, 2020 =
90
+ * Tweak: Fixed PHP 7.4 notices.
91
+ * Tweak: Check if download variable is set in content-download template. This prevents a fatal error in odd case no download is given.
92
+ * Tweak: Now passing variables to actions to version.php admin view file.
93
+ * Tweak: Bump websocket-extensions from 0.1.3 to 0.1.4
94
+
95
+ = 4.4.3: June 8, 2020 =
96
+ * Tweak: Small minor fixes and tweaks.
97
+
98
+ = 4.4.2: April 3, 2019 =
99
+ * Tweak: Fixed an relative inclusion bug that sometimes caused bootstrap not to properly load. (Undefined function dlm_is_shop_enabled()).
100
+
101
+ = 4.4.1: March 27, 2019 =
102
+ * Tweak: Added proper html escaping to order overview page, props Nam.Dinh.
103
+
104
+ = 4.4.0: March 8, 2019 =
105
+ * Feature: Added a new product post type to create a clear separation between downloads and the products you can sell. Read more about this here: https://www.download-monitor.com/kb/products/
106
+ * Feature: Shop products now have a basic detail (single) page. This will be improved in future updates.
107
+ * Feature: Added "Paid Only" option to downloads. This allows you to require users to have a purchase linked to the download before file can be downloaded.
108
+ * Feature: Versions are now passed through the no-access page.
109
+ * Tweak: dlm_buy shortcode now takes a product id, instead of a download ID. These need to be updated manually.
110
+ * Tweak: Shop feature has been more isolated from non-shop. To enable shop, go to general Download Monitor settings and check "Enable Shop".
111
+ * Tweak: PayPal gateway is now enabled by default.
112
+
113
+ = 4.3.0: February 27, 2019 =
114
+ * Feature: Added Shop (Beta) feature. You can now sell your downloads via Download Monitor! More addition to shop (like taxes and discounts) coming soon.
115
+ * Feature: Added PayPal integration for shop feature.
116
+ * Feature: Added an onboarding screen, helping the user set up the plugin.
117
+ * Tweak: Fixed an error when changing dates in reports on Safari.
118
+ * Tweak: Added download ID to Reports overview table.
119
+ * Tweak: Increased spacing of download title on reports summary block.
120
+ * Tweak: We're no longer automatically creating the No Access page. This is now done via the onboarding screen.
121
+ * Tweak: We're no longer supporting PHP 5.2. If you upgrade and are still running PHP 5.2, the plugin will not load but display an upgrade notice instead. More info: https://www.download-monitor.com/kb/minimum-required-php-version/
122
+ * Tweak: Updated translations.
123
+
124
+ = 4.2.1: January 31, 2019 =
125
+ * Tweak: Correctly set default template of Gutenberg block on frontend of website when no specific template is set.
126
+
127
+ = 4.2.0: January 24, 2019 =
128
+ * Feature: Added Gutenberg download block. Type /download in your post screen to see it in action!
129
+
130
+ = 4.1.1: September 12, 2018 =
131
+ * Tweak: Fixed a bug that incorrectly included featured downloads by default in [downloads].
132
+ * Tweak: Added 'dlm_get_template_part_args' filter that allows argument filtering on Download Monitor templates.
133
+
134
+ = 4.1.0: May 21, 2018 =
135
+ * Feature: Added a new option that allows site-owners if and how they wish to track IP addresses of users.
136
+ * Feature: Added a new option that allows site-owners to decide if they wish to track user agent of users.
137
+ * Tweak: Fixed an issue where title of log dates had incorrect date.
138
+ * Tweak: Added compatibility for 'Post Types Order' plugin. The dashboard widget no longer is affected by their custom order.
139
+ * Tweak: Added dlm_frontend_scripts filter, allows user to not include DLM frontend assets.
140
+ * Tweak: No longer load jQuery UI CSS from Google CDN, file is now included in plugin.
141
+ * Tweak: No longer loading jQuery images from Google CDN, images are now included in plugin.
142
+
143
+ = 4.0.8: May 3, 2018 =
144
+ * Tweak: Fixed a bug in the legacy upgrader that caused versions with empty dates not to added.
145
+ * Tweak: Fixed the use of getTimeStamp() because PHP 5.2 doesn't support this.
146
+
147
+ = 4.0.7: April 13, 2018 =
148
+ * Tweak: Fixed a bug that caused certain months in the reports filter to crash for non English languages.
149
+ * Tweak: Fixed a bug that caused the 10 download limit on the Dashboard Widget to be ignored.
150
+ * Tweak: Added "dlm_remove_dashboard_popular_downloads" filter that allows for not loading of dashboard widget.
151
+ * Tweak: Moved 'dlm_log_item' filter to within the WordPressLogItemRepository::persist() method. This way the filter will always be called upon a log persist.
152
+ * Tweak: Filter 'dlm_log_item' 2nd and 3rd argument changed from DLM_Download & DLM_Download_Version type to int (ID's of both download and version).
153
+ * Tweak: Moved 'dlm_downloading_log_item_added' filter to within the WordPressLogItemRepository::persist() method. This way the filter will always be called upon a log persist.
154
+ * Tweak: Filter 'dlm_downloading_log_item_added' 2nd and 3rd argument changed from DLM_Download & DLM_Download_Version type to int (ID's of both download and version).
155
+ * Tweak: Added filter 'dlm_reports_page_start' to add content on top of admin reports page.
156
+ * Tweak: Added filter 'dlm_reports_page_end' to add content on bottom of admin reports page.
157
+ * Tweak: Added download id and download object to 'dlm_placeholder_image_src' filter, props [James Golovich](https://github.com/jamesgol).
158
+ * Tweak: Added filter 'dlm_download_get_versions' on return of DLM_Download::get_versions(), props [James Golovich](https://github.com/jamesgol).
159
+ * Tweak: Added $atts to various shortcode filters, props [James Golovich](https://github.com/jamesgol).
160
+
161
+ = 4.0.6: March 8, 2018 =
162
+ * Tweak: Fixed a bug in the version-list template, correct version links are now displayed.
163
+
164
+ = 4.0.5: February 21, 2018 =
165
+ * Tweak: Fixed a bug that caused the "Add file" button to not appear on the Add New Download screen.
166
+ * Tweak: Fixed a bug that caused the crc32b hash not to be saved when adding a download via the 'Quick-add Download' option.
167
+ * Tweak: WordPressVersionRepository no longer explicitly sets 'post_content' and 'post_excerpt' database fields of dlm_download_version to empty strings. Props [Erin Morelli](https://github.com/ErinMorelli).
168
+
169
+ = 4.0.4: February 19, 2018 =
170
+ * Tweak: Fixed a bug where versions of draft and pending review downloads were not displayed in the backend.
171
+
172
+ = 4.0.3: February 9, 2018 =
173
+ * Tweak: We now cache if we need to upgrade legacy downloads. This prevents us from checking if we need to upgrade on every pageload, improving performance and preventing constant sql warning when legacy table doesn't exist.
174
+ * Tweak: Fixed SQL error in has_ip_downloaded_version() call ('type' does not exist).
175
+
176
+ = 4.0.2: February 2, 2018 =
177
+ * Tweak: Moved no cache headers up in download process, improving cache prevention.
178
+ * Tweak: Added new log item meta data methods, making it easier to add meta data.
179
+ * Tweak: Added new action 'dlm_downloading_log_item_added'. Is triggered after log item is added on download request.
180
+ * Tweak: Added $download and $version arguments to 'dlm_log_item' filter.
181
+
182
+ = 4.0.1: January 25, 2018 =
183
+ * Tweak: Fixed an issue that caused widget limit to not work.
184
+ * Tweak: Fixed an count() warning in PHP7.2 on extension page.
185
+ * Tweak: Fixed a passed by reference notice in lower PHP versions in get_visitor_ip() call.
186
+ * Tweak: Added 'dlm_download_count' filter to fitler get_download_count() return value.
187
+ * Tweak: Downloads now return an empty version if no version is added. This prevents mulitple possible fatal errors when external scripts don't check if get_version() returns null.
188
+ * Tweak: Added an extra check to if website needs upgrading. If there are new downloads in the database, no upgrade is recommended.
189
+ * Tweak: Added an extra warning on the upgrade page to users that navigate to the page while we think no upgrade is needed.
190
+ * Tweak: Requesting a non existing download no longer triggers a fatal error (exception is now properly handled).
191
+ * Tweak: Correct exception handling when trying to save meta boxes of non existing download.
192
+
193
+ = 4.0.0: January 22, 2018 =
194
+ * Feature: Added reports page for download statistics.
195
+ * Feature: Added hash values to version blocks.
196
+ * Feature: Added option to include downloads in WordPress default search results, props [Kurt Zenisek](https://github.com/KZeni).
197
+ * Feature: Added SHA256 hash.
198
+ * Feature: Added support for regex patterns in user agent blacklist, props [Matt Mower](https://github.com/mdmower).
199
+ * Feature: Added user filter to logs, props [neptuneweb](https://github.com/neptuneweb).
200
+ * Feature: Log columns in log table are now sortable.
201
+ * Feature: Added an option for the user to remove all transients.
202
+ * Feature: Added the ability to exclude tags from the [downloads] shortcode.
203
+ * Feature: Added search option in "Insert Download" overlay.
204
+ * Feature: Added builtin legacy upgrade tool to help users move their downloads from legacy to current version.
205
+ * Tweak: Added 'dlm_file_path' filter to filter file_path in download request.
206
+ * Tweak: We're now only serving downloads when requested over the GET or POST HTTP method. This can be filtered via filter dlm_accepted_request_methods.
207
+ * Tweak: Added Download Title to download log CSV export file.
208
+ * Tweak: Added 'dlm_shortcode_total_downloads' filter to output of [total_downloads] shortcode, props [Joel James](https://github.com/Joel-James).
209
+ * Tweak: Added support for Apache 2.4 and up in generated .htaccess file.
210
+ * Tweak: Added 'dlm_download_use_version_transient' filter to allow website to not use cache transients.
211
+ * Tweak: Downloads need to be published in order to exist, draft downloads can no longer be downloaded.
212
+ * Tweak: Fixed plugin links on plugin overview page.
213
+ * Tweak: Optimization rewrite of DLM_Download class.
214
+ * Tweak: Optimization rewrite of DLM_Download_Version class.
215
+ * Tweak: Introduction of Factory and Repository design patterns for Downloads and Versions.
216
+ * Tweak: Complete rewrite of setting fields.
217
+ * Tweak: Updated template files to use new download methods.
218
+ * Tweak: Introduced new filter "dlm_setting_field_TYPE", allowing third party programs to add custom field types to settings.
219
+ * Tweak: Implemented Composer autoloader.
220
+ * Tweak: Download Categories and Download Tags label name now contains 'Download'.
221
+ * Tweak: Download Widget now uses default template output set in settings when no output template is set.
222
+ * Tweak: Download Widget CSS tweaks.
223
+ * Tweak: Download category and download tags are now excluded from Yoast SEO sitemap.
224
+ * Tweak: 'Delete Logs' button now requires a confirmation.
225
+ * Tweak: Placeholders for download thumbnails in media library list view are now also properly replaced.
226
+ * Tweak: Minor UX improvement on Download Information fields making it easier to copy these, props [Danny van Kooten](https://github.com/dannyvankooten).
227
+ * Tweak: Replaced double underscore prefixed functions with single underscore prefix to comply with PHP reserved method naming rules.
228
+
229
+ = 1.9.9: October 18, 2017 =
230
+ * Tweak: Fixed an issue with 'No Access' page not saving correctly.
231
+
232
+ = 1.9.8: October 6, 2017 =
233
+ * Tweak: Add option to allow HTTP header X_FORWARD_FOR. Allowing Download Monitor to use the X_FORWARDED_FOR HTTP header set by proxies as the IP address.
234
+ * Tweak: Download files that are added via 'Quick-add download' are now properly added to WP media library.
235
+ * Tweak: Introduced 'lazy select' option for Download Monitor settings. Options of these select elements are only loaded on setting pages, increasing overall plugin performance.
236
+ * Tweak: We're now filtering attachment thumbnails in media library for files in dlm_uploads. This solves 403 errors on thumbnails in the protected folder.
237
+
238
+ = 1.9.7: May 5, 2017 =
239
+ * Tweak: Added capability checks to log export and delete functionality. Props [Pritect](http://www.pritect.net/).
240
+ * Tweak: We're now redirecting users to home on empty download request. Behavior can be changed via filters. See https://www.download-monitor.com/kb/empty-download-request-redirection/
241
+
242
+ = 1.9.6: February 28, 2017 =
243
+ * Tweak: Fix display for unknown user in exported log, props [Matt Mower](https://github.com/mdmower).
244
+ * Tweak: Settings screen hash tweaks.
245
+ * Tweak: Display correct tab on settings save, props [Matt Mower](https://github.com/mdmower).
246
+ * Tweak: Fixed issue with some dismissible notices.
247
+ * Tweak: Add Portuguese (pt_PT) translation, props [Pedro Mendonça](https://github.com/pedro-mendonca).
248
+ * Tweak: Included various language tweaks via Transifex. Help out over at [Transifex](https://www.transifex.com/barrykooijplugins/download-monitor/).
249
+
250
+ = 1.9.5: August 23, 2016 =
251
+ * Tweak: Fixed a bug where Download Options couldn't be checked off in quick edit.
252
+ * Tweak: Updated settings screen description for custom templates.
253
+ * Tweak: Download Information input fields are now readonly since these fields are informational only. Props [kraftner](https://github.com/kraftner).
254
+ * Tweak: Removed code that triggered PHP7 incompatibility false positives in PHP7 compatibility scans.
255
+ * Tweak: Removed old JSON library since default JSON functions are available from PHP 5.2 and up.
256
+
257
+ = 1.9.4: May 2, 2016 =
258
+ * Tweak: Various cookie tweaks to prevent incorrect double logging entries.
259
+ * Tweak: Added a Cookie Manager class to centralize cookie related tasks.
260
+
261
+ = 1.9.3: April 11, 2016 =
262
+ * Tweak: Small rework of [downloads] loop. Downloads now filterable per download via dlm_shortcode_downloads_loop_download.
263
+ * Tweak: We now report missing versions for removed downloads in logs, props [Matt Mower](https://github.com/mdmower).
264
+ * Tweak: Updated Danish translation, props [Georg Adamsen](https://github.com/GSAdev).
265
+
266
+ = 1.9.2: March 27, 2016 =
267
+ * Tweak: Fixed bug where 'version' and 'version_id' were ignored in [download].
268
+ * Tweak: Fixed a bug that caused the file upload overlay to append file URL to wrong version, props [kraftner](https://github.com/kraftner).
269
+ * Tweak: Optimized [download] shortcode code.
270
+ * Tweak: Flush rewrites in admin settings on shutdown instead of during page load, props [sybrew](https://github.com/sybrew).
271
+ * Tweak: Added extra checks to blacklist checks to prevent stristr empty needle notices, props [Matt Mower](https://github.com/mdmower).
272
+ * Tweak: Removed DS_Store backups, props [Matt Mower](https://github.com/mdmower).
273
+ * Tweak: Added Ukrainian translation, props [Fremler](https://www.transifex.com/user/profile/Fremler/).
274
+ * Tweak: Added Croatian translation, props [molekula](https://www.transifex.com/user/profile/molekula/).
275
+ * Tweak: Updated Dutch translation.
276
+ * Tweak: Updated Portuguese (Brazil) translation.
277
+
278
+ = 1.9.1: December 1, 2015 =
279
+ * Tweak: Check if $visitor_ua isn't empty to prevent stristr warnings.
280
+ * Tweak: Added wmv filetype icon support
281
+ * Tweak: Correctly populate data on quick edit of download.
282
+ * Tweak: Settings tab now loads tab of set URL hash.
283
+
284
+ = 1.9.0: September 15, 2015 =
285
+ * Feature: We added a separate 'No Access' page that includes the following features:
286
+ * No Access Page : Added [dlm_no_access] shortcode that displays the no access content.
287
+ * No Access Page : Added new option in Access settings tab to set No Access Page.
288
+ * No Access Page : Added new template file for no access page.
289
+ * No Access Page : We now redirect to set No Access page (if set) when user has no access to download.
290
+ * Feature: Added ability to remove log entries.
291
+ * Feature: Added browser detection for IE 11 and up.
292
+ * Feature: Added OS detection for Windows 8.1
293
+ * Feature: Added OS detection for Windows 10
294
+ * Feature: Added Featured download, Members only and Redirect to file to bulk edit options.
295
+ * Feature: Added Featured download, Members only and Redirect to file to quick edit options.
296
+
297
+ = 1.8.1: August 21, 2015 =
298
+ * Tweak: Small tweak to make download count fit better in box template.
299
+ * Tweak: Fixed a zero file size bug.
300
+ * Tweak: Fixed featured image disappears bug, props [Ricardo](https://wordpress.org/support/profile/ricardopires).
301
+ * Tweak: Search template file in custom path before in plugin path.
302
+
303
+ = 1.8.0: July 10, 2015 =
304
+ * Feature: Added option to only count downloads and add logs from unique ip addresses, props [Matt Mower](https://github.com/mdmower).
305
+ * Feature: It's now possible to display downloads with the downloads shortcode that are in all given categories (AND instead of OR) by using + (plus_ instead of , (comma).
306
+ * Feature: Display nginx rules if server is running nginx.
307
+ * Feature: Added Multisite / Network compatibility.
308
+ * Feature: Redone blacklist IP feature, now available in the 'Access' tab.
309
+ * Feature: Redone blacklist user agent feature, now available in the 'Access' tab.
310
+ * Tweak: Added icon support for Office X Excel & PPT extensions.
311
+ * Tweak: Run thumbnail compatibility method later to allowed themes to register first.
312
+ * Tweak: Prefixed admin CSS classes to prevent plugin conflicts.
313
+ * Tweak: Fix checking shortcodes for empty version strings, props [Matt Mower](https://github.com/mdmower).
314
+ * Tweak: Fixed a call of trigger() in DLM_Download_Handler, props [Matt Mower](https://github.com/mdmower).
315
+ * Tweak: Remove trailing space from downloads count, props [Matt Mower](https://github.com/mdmower).
316
+ * Tweak: Directory browser items are now always in alphabetical order, props [Matt Mower](https://github.com/mdmower).
317
+ * Tweak: The 60 seconds download counter increment cool down is now set to version ID instead of download ID, props [Matt Mower](https://github.com/mdmower).
318
+ * Tweak: Created and implemented local independent basename fixing issues with Cyrillic alphabets.
319
+ * Tweak: Made user agents regexes filterable: dlm_ua_parser_regexes.
320
+ * Tweak: Optimized log status icons, also fixes WP emoji conflict.
321
+ * Tweak: Members Only check now only does check if requester can still download.
322
+ * Tweak: Replaced PHP4 constructors in widget.
323
+ * Tweak: Added Danish translation.
324
+ * Tweak: Updated Dutch translation.
325
+ * Tweak: Updated German translation.
326
+
327
+ = 1.7.2: April 29, 2015 =
328
+ * Tweak: Fixed a bug that caused logs not to be displayed in WP 4.2.
329
+
330
+ = 1.7.1: April 17, 2015 =
331
+ * Tweak: Pass third arg to add_query_arg to prevent XSS.
332
+
333
+ = 1.7.0: March 22, 2015 =
334
+ * Feature: Added 'Download Information' meta box to edit download screen that displays useful download information.
335
+ * Feature: Error message shown when visitor has no access to download is now an option.
336
+ * Tweak: Fixing a bug where versions with spaces did not work, versions now are checked on a sanitized title.
337
+ * Tweak: Viewing logs now needs custom capability: dlm_manage_logs (automatically added to administrators).
338
+ * Tweak: Improved hotlink prevention check.
339
+ * Tweak: Extension page tweaks.
340
+ * Tweak: Added $download_id argument to dlm_hotlink_redirect filter.
341
+ * Tweak: Moved hash settings to their own tab.
342
+ * Tweak: Moved 'X-Accel-Redirect / X-Sendfile' and 'Prevent hotlinking' settings to General tab.
343
+ * Tweak: Optimized the Insert Download button.
344
+ * Tweak: Introduced a multi-byte-safe pathinfo so we can handle 'special' filenames.
345
+ * Tweak: Also set the post_date_gmt value for version dates.
346
+ * Tweak: Updated French translation. Props Li-An.
347
+ * Tweak: Updated German translation. Props maphy-psd.
348
+ * Tweak: Updated Swedish translation. Props EyesX.
349
+ * Tweak: Update Slovakian translation. Props attitude.
350
+ * Tweak: Added Dutch translation.
351
+
352
+ = 1.6.4: March 8, 2015 =
353
+ * Removed unused library jqueryFileTree.
354
+ * dlm_shortcode_download_content filter now also includes $atts.
355
+ * Fixed small parse file parse error because of whitespace.
356
+ * Changed some admin menu hook priorities.
357
+
358
+ = 1.6.3: January 18, 2015 =
359
+ * Fixed an undefined method call 'get_filesize'.
360
+ * Allow third party extensions to hijack [downloads] shortcode with filter dlm_shortcode_download_content.
361
+ * Made 'wp_dlm_downloading' cookie only accessible through the HTTP protocol, props [Matt Mower](https://github.com/mdmower).
362
+
363
+ = 1.6.2: January 11, 2015 =
364
+ * Fixed a bug that caused translations not to load.
365
+ * Fixed a bug that prevented download versions from being removed.
366
+ * Fixed a pagination in 'insert download' shortcode bug.
367
+ * Fixed a bug in the template loader when used with a custom directory, a slug and no custom template.
368
+ * Removed assigning by reference, fixed strict notice when deleting downloads.
369
+ * Tweaked template loader to accept arguments.
370
+ * Allow downloads shortcode WP_Query arguments to be filtered with 'dlm_shortcode_downloads_args'.
371
+
372
+ = 1.6.1: January 9, 2015 =
373
+ * Fixed an extension activation error.
374
+ * Fixed a bug that caused the featured image to disappear in some themes.
375
+ * Tweak: In multisite only users that are a member of the blog can download 'member only' downloads.
376
+
377
+ = 1.6.0: January 8, 2015 =
378
+ * Plugin is now initiated at plugins_loaded.
379
+ * Implemented auto loader.
380
+ * Classes are no longer initiated at bottom of class file but whenever an object is needed.
381
+ * Code standards corrections.
382
+ * Introduced Template_Handler. Loading of template parts should be done through this class.
383
+ * Removed $GLOBALS['dlm_logging'] global.
384
+ * Removed $GLOBALS['DLM_Download_Handler'] global.
385
+ * Removed internal use of $download_monitor global.
386
+ * Moved all inline JavaScript to separate JavaScript files.
387
+ * Moved all install related code to installer class.
388
+ * Moved main plugin class to it's own file.
389
+ * Deprecated 'dlm_create_log' function.
390
+ * Redone extensions page.
391
+ * Fixed a bug in shortcode download where orderby=download_count wasn't working.
392
+ * Fixed a bug where downloads didn't work with default WP permalink structure.
393
+ * Delete dlm_file_version_ids_ transient on save.
394
+ * Added dlm_download_headers filter.
395
+ * Added dlm_get_template_part filter.
396
+
397
+ = 1.5.1 =
398
+ * Fallback for JSON_UNESCAPED_UNICODE to fix accented characters on < PHP 5.4.
399
+ * Changed default orderby for downloads shortcode to date, desc.
400
+
401
+ = 1.5.0 =
402
+ * JSON_UNESCAPED_UNICODE for files to fix unicode chars when json encoded. Fix needs PHP 5.4+ to work, but won't break lower versions.
403
+ * Style filetype-docx
404
+ * Update get_version_id to work with non-numeric versions.
405
+ * Fix shortcode arg booleans.
406
+ * Add transient cache for get_file_version_ids.
407
+ * Moved all translations to Transifex - https://www.transifex.com/projects/p/download-monitor/
408
+ * Changed text domain from download_monitor to download-monitor.
409
+ * Added Grunt.
410
+ * Added options to generate file hashes DISABLED BY DEFAULT as they can cause performance issues with large files.
411
+
412
+ = 1.4.4 =
413
+ * Use home_dir instead of site_dir - fixes hot-linking protections against own site (when not in root dir)
414
+ * Replace hardcoded WP_CONTENT_DIR and WP_CONTENT_URL with wp_upload_dir to work when UPLOADS and UPLOADS_URL constants are set.
415
+ * Added some filters for hotlink protection customisation.
416
+
417
+ = 1.4.3 =
418
+ * Add password form to download page when required
419
+ * Run shortcodes in excerpt/short desc
420
+ * Various hook additions
421
+ * pr_br and zh_cn translation
422
+ * Sort download count by meta_value_num
423
+ * Store URLs in JSON format to allow easier search/replace
424
+ * Fix dashboard sorting
425
+ * Option for basic referer checking to prevent hotlinking.
426
+ * Only get file hashes on save as they are resource heavy.
427
+ * Disable remote file hash generation, but can be enabled with filter dlm_allow_remote_hash_file
428
+ * Radio buttons instead of select (with pagination) in popup to improve performance.
429
+
430
+ = 1.4.2 =
431
+ * Fix for site_url -> abspath
432
+ * Check if hash functions are supported before use.
433
+
434
+ = 1.4.1 =
435
+ * Fix file_exists error in download handlers
436
+
437
+ = 1.4.0 =
438
+ * MP6/3.8 admin styling. Requires 3.8.
439
+ * Polish translation.
440
+ * Turkish translation.
441
+ * Change capability required to view dashboard widget.
442
+ * Don't show "insert download" when editing a download.
443
+ * Allow pagination for the [downloads] shortcode. Simply add paginate=true to the shortcode.
444
+ * Reverted flush change in download handler to reduce memory usage on some hosting envrionments
445
+ * changed download handlers and fixed corruption when resuming files
446
+ * Calculate md5/sha1/crc32 hashes for files. Obtainable via methods or download_data, e.g. [download_data id="86" data="md5"]
447
+ * Added file_date data
448
+
449
+ = 1.3.2 =
450
+ * Cleaned up log table queries
451
+ * Tweaked download handler headers
452
+ * Tweaked logging
453
+ * Limit UA to 200
454
+ * Setcookie to prevent double logging
455
+ * Addons page (disable using add_filter( 'dlm_show_addons_page', '__return_false' ); )
456
+
457
+ = 1.3.1 =
458
+ * Added some new hooks
459
+ * FR and SR_RS updates
460
+
461
+ = 1.3.0 =
462
+ * Fix 0kb downloads in some hosting enviroments
463
+ * Added button to delete logs
464
+ * Fixed log page when no logs are present
465
+ * FR and HU updates
466
+ * Added dropdown for the default template option to make available templates more obvious
467
+ * Added version-list and title templates
468
+
469
+ = 1.2.0 =
470
+ * Option to redirect to files only (do not force)
471
+ * Fixed textdomains
472
+ * HU translation by Győző Farkas
473
+ * Fix dlm_upload folder when not using month/day upload folders.
474
+ * Fix IP lookup
475
+ * Resumable download support
476
+ * Tweaked download handler
477
+
478
+ = 1.1.2 =
479
+ * HTTPS headers for IE fix
480
+ * Italian locale
481
+
482
+ = 1.1.1 =
483
+ * Specify error statuses on wp_die messages e.g. 404 for missing files.
484
+ * Moved DONOTCACHEPAGE
485
+
486
+ = 1.1.0 =
487
+ * Fixed admin notices
488
+ * Added download link to admin 'file' column for copying and pasting
489
+ * Farsi localisation
490
+ * Wrapping content in a [download] shortcode will wrap it in a simple link.
491
+
492
+ = 1.0.6 =
493
+ * Hide taxonomies from nav menus
494
+ * Fix categories in download_data method.
495
+
496
+ = 1.0.5 =
497
+ * When do_not_force is enabled, still replace abspath with home_url
498
+ * Exclude dlm_download from search and disable query var
499
+ * Added category_include_children option for downloads shortcode
500
+ * Fixed logs time offset.
501
+
502
+ = 1.0.4 =
503
+ * Tweak admin page detection to work when no downloads exist.
504
+ * Fix dashboard widget warning.
505
+ * Add filters to logs and export csv function.
506
+ * Added extra columns to CSV.
507
+
508
+ = 1.0.3 =
509
+ * Fix config page to work with multibyte tab names.
510
+ * Japanese locale by hide92795
511
+ * Admin CSS/script conditonally loaded
512
+ * Versions are now strtolower to be compatible with version_compare and to standardise numbers.
513
+
514
+ = 1.0.2 =
515
+ * Only use wp_remote_head to get fielsize on remote files. Prevents timeouts when a file doesn't exist.
516
+ * If a filesize cannot be found, set to -1 to prevent re-tries.
517
+ * Insert button added to all CPT except downloads.
518
+ * French locale by Jean-Michel MEYER.
519
+
520
+ = 1.0.1 =
521
+ * Update blockui
522
+ * Workaround root relative URLS
523
+
524
+ = 1.0.0 =
525
+ * Complete rewrite of the plugin making use of custom post types and other best practices. Fresh start version '1' to prevent auto-updates (legacy importer needs to be used to migrate from old versions).
526
+
527
  == Upgrade Notice ==
download-monitor.php CHANGED
@@ -1,72 +1,72 @@
1
- <?php
2
- /*
3
- Plugin Name: Download Monitor
4
- Plugin URI: https://www.download-monitor.com
5
- Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.5.2
7
- Author: WPChill
8
- Author URI: https://wpchill.com
9
- Requires at least: 5.4
10
- Tested up to: 5.9
11
- Text Domain: download-monitor
12
-
13
- License: GPL v3
14
-
15
- This program is free software: you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation, either version 3 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
-
28
- Original project created by Mike Jolley.
29
- */
30
-
31
- if ( ! defined( 'ABSPATH' ) ) {
32
- exit;
33
- } // Exit if accessed directly
34
-
35
- // Define DLM Version
36
- define( 'DLM_VERSION', '4.5.2' );
37
-
38
- // Define DLM FILE
39
- define( 'DLM_PLUGIN_FILE', __FILE__ );
40
- define( 'DLM_URL' , plugin_dir_url( __FILE__ ) );
41
-
42
- if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) {
43
- require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/bootstrap.php';
44
- }else {
45
- require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/php-too-low.php';
46
- }
47
-
48
- /**
49
- * This function allows you to track usage of your plugin
50
- * Place in your main plugin file
51
- */
52
- if( ! class_exists( 'Download_Monitor_Usage_Tracker') ) {
53
- require_once dirname( __FILE__ ) . '/includes/tracking/class-download-monitor-usage-tracker.php';
54
- }
55
-
56
- if( ! class_exists( 'DLM_Review') && is_admin() ) {
57
- require_once dirname( __FILE__ ) . '/includes/admin/class-dlm-review.php';
58
- }
59
-
60
- if( ! function_exists( 'download_monitor_start_plugin_tracking' ) ) {
61
- function download_monitor_start_plugin_tracking() {
62
- $wisdom = new Download_Monitor_Usage_Tracker(
63
- __FILE__,
64
- 'https://tracking.download-monitor.com/',
65
- array(),
66
- true,
67
- true,
68
- 0
69
- );
70
- }
71
- download_monitor_start_plugin_tracking();
72
- }
1
+ <?php
2
+ /*
3
+ Plugin Name: Download Monitor
4
+ Plugin URI: https://www.download-monitor.com
5
+ Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 4.5.3
7
+ Author: WPChill
8
+ Author URI: https://wpchill.com
9
+ Requires at least: 5.4
10
+ Tested up to: 5.9
11
+ Text Domain: download-monitor
12
+
13
+ License: GPL v3
14
+
15
+ This program is free software: you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation, either version 3 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
27
+
28
+ Original project created by Mike Jolley.
29
+ */
30
+
31
+ if ( ! defined( 'ABSPATH' ) ) {
32
+ exit;
33
+ } // Exit if accessed directly
34
+
35
+ // Define DLM Version
36
+ define( 'DLM_VERSION', '4.5.3' );
37
+
38
+ // Define DLM FILE
39
+ define( 'DLM_PLUGIN_FILE', __FILE__ );
40
+ define( 'DLM_URL' , plugin_dir_url( __FILE__ ) );
41
+
42
+ if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) {
43
+ require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/bootstrap.php';
44
+ }else {
45
+ require_once plugin_dir_path( DLM_PLUGIN_FILE ) . 'includes/php-too-low.php';
46
+ }
47
+
48
+ /**
49
+ * This function allows you to track usage of your plugin
50
+ * Place in your main plugin file
51
+ */
52
+ if( ! class_exists( 'Download_Monitor_Usage_Tracker') ) {
53
+ require_once dirname( __FILE__ ) . '/includes/tracking/class-download-monitor-usage-tracker.php';
54
+ }
55
+
56
+ if( ! class_exists( 'DLM_Review') && is_admin() ) {
57
+ require_once dirname( __FILE__ ) . '/includes/admin/class-dlm-review.php';
58
+ }
59
+
60
+ if( ! function_exists( 'download_monitor_start_plugin_tracking' ) ) {
61
+ function download_monitor_start_plugin_tracking() {
62
+ $wisdom = new Download_Monitor_Usage_Tracker(
63
+ __FILE__,
64
+ 'https://tracking.download-monitor.com/',
65
+ array(),
66
+ true,
67
+ true,
68
+ 0
69
+ );
70
+ }
71
+ download_monitor_start_plugin_tracking();
72
+ }
includes/admin/class-dlm-review.php CHANGED
@@ -1,170 +1,170 @@
1
- <?php
2
-
3
- class DLM_Review {
4
-
5
- private $value;
6
- private $messages;
7
- private $link = 'https://wordpress.org/support/plugin/%s/reviews/#new-post';
8
- private $slug = 'download-monitor';
9
-
10
- function __construct() {
11
-
12
- $this->messages = array(
13
- 'notice' => esc_html__( "Hi there! Stoked to see you're using Download Monitor for a few days now - hope you like it! And if you do, please consider rating it. It would mean the world to us. Keep on rocking!", 'download-monitor' ),
14
- 'rate' => esc_html__( 'Rate the plugin', 'download-monitor' ),
15
- 'rated' => esc_html__( 'Remind me later', 'download-monitor' ),
16
- 'no_rate' => __( 'Don\'t show again', 'download-monitor' ),
17
- );
18
-
19
- if ( isset( $args['messages'] ) ) {
20
- $this->messages = wp_parse_args( $args['messages'], $this->messages );
21
- }
22
-
23
- add_action( 'init', array( $this, 'init' ) );
24
-
25
- }
26
-
27
- public function init() {
28
- if ( ! is_admin() ) {
29
- return;
30
- }
31
-
32
- $this->value = $this->value();
33
-
34
- if ( $this->check() ) {
35
- add_action( 'admin_notices', array( $this, 'five_star_wp_rate_notice' ) );
36
- add_action( 'wp_ajax_download-monitor_review', array( $this, 'ajax' ) );
37
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
38
- add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
39
- }
40
-
41
- add_filter('st_uninstall_db_options',array($this,'uninstall_options'));
42
-
43
- }
44
-
45
- private function check() {
46
-
47
- if ( ! current_user_can('manage_options') ) {
48
- return false;
49
- }
50
-
51
- return( time() > $this->value );
52
-
53
- }
54
-
55
- private function value() {
56
-
57
- $value = get_option( 'download-monitor-rate-time', false );
58
- if ( $value ) {
59
- return $value;
60
- }
61
-
62
- $value = time() + DAY_IN_SECONDS;
63
- update_option( 'download-monitor-rate-time', $value );
64
-
65
- return $value;
66
-
67
- }
68
-
69
- public function five_star_wp_rate_notice() {
70
-
71
- $url = sprintf( $this->link, $this->slug );
72
-
73
- ?>
74
- <div id="<?php echo esc_attr( $this->slug ) ?>-download-monitor-review-notice" class="notice notice-success is-dismissible" style="margin-top:30px;">
75
- <p><?php echo sprintf( esc_html( $this->messages['notice'] ), esc_attr( $this->value ) ) ; ?></p>
76
- <p class="actions">
77
- <a id="download-monitor-rate" href="<?php echo esc_url( $url ) ?>" target="_blank" class="button button-primary download-monitor-review-button">
78
- <?php echo esc_html( $this->messages['rate'] ); ?>
79
- </a>
80
- <a id="download-monitor-later" href="#" style="margin-left:10px" class="download-monitor-review-button"><?php echo esc_html( $this->messages['rated'] ); ?></a>
81
- <a id="download-monitor-no-rate" href="#" style="margin-left:10px" class="download-monitor-review-button"><?php echo esc_html( $this->messages['no_rate'] ); ?></a>
82
- </p>
83
- </div>
84
- <?php
85
- }
86
-
87
- public function ajax() {
88
-
89
- check_ajax_referer( 'download-monitor-review', 'security' );
90
-
91
- if ( ! isset( $_POST['check'] ) ) {
92
- wp_die( 'ok' );
93
- }
94
-
95
- $time = get_option( 'download-monitor-rate-time' );
96
-
97
- if ( 'download-monitor-rate' == $_POST['check'] ) {
98
- $time = time() + YEAR_IN_SECONDS * 1;
99
- }elseif ( 'download-monitor-later' == ['check'] ) {
100
- $time = time() + WEEK_IN_SECONDS;
101
- }elseif ( 'download-monitor-no-rate' == $_POST['check'] ) {
102
- $time = time() + YEAR_IN_SECONDS * 1;
103
- }
104
-
105
- update_option( 'download-monitor-rate-time', $time );
106
- wp_die( 'ok' );
107
-
108
- }
109
-
110
- public function enqueue() {
111
- wp_enqueue_script( 'jquery' );
112
- }
113
-
114
- public function ajax_script() {
115
-
116
- $ajax_nonce = wp_create_nonce( "download-monitor-review" );
117
-
118
- ?>
119
-
120
- <script type="text/javascript">
121
- jQuery( document ).ready( function( $ ){
122
-
123
- $( '.download-monitor-review-button' ).on('click', function( evt ){
124
- var href = $(this).attr('href'),
125
- id = $(this).attr('id');
126
-
127
- if ( 'download-monitor-rate' != id ) {
128
- evt.preventDefault();
129
- }
130
-
131
- var data = {
132
- action: 'download-monitor_review',
133
- security: '<?php echo $ajax_nonce; ?>',
134
- check: id
135
- };
136
-
137
- if ( 'download-monitor-rated' === id ) {
138
- data['download-monitor-review'] = 1;
139
- }
140
-
141
- $.post( '<?php echo admin_url( 'admin-ajax.php' ) ?>', data, function( response ) {
142
- $( '#<?php echo esc_attr( $this->slug ) ?>-download-monitor-review-notice' ).slideUp( 'fast', function() {
143
- $( this ).remove();
144
- } );
145
- });
146
-
147
- } );
148
-
149
- });
150
- </script>
151
-
152
- <?php
153
- }
154
-
155
- /**
156
- * @param $options
157
- *
158
- * @return mixed
159
- *
160
- * @since 2.51.6
161
- */
162
- public function uninstall_options( $options ) {
163
-
164
- $options[] = 'download-monitor-rate-time';
165
-
166
- return $options;
167
- }
168
- }
169
-
170
- new DLM_Review();
1
+ <?php
2
+
3
+ class DLM_Review {
4
+
5
+ private $value;
6
+ private $messages;
7
+ private $link = 'https://wordpress.org/support/plugin/%s/reviews/#new-post';
8
+ private $slug = 'download-monitor';
9
+
10
+ function __construct() {
11
+
12
+ $this->messages = array(
13
+ 'notice' => esc_html__( "Hi there! Stoked to see you're using Download Monitor for a few days now - hope you like it! And if you do, please consider rating it. It would mean the world to us. Keep on rocking!", 'download-monitor' ),
14
+ 'rate' => esc_html__( 'Rate the plugin', 'download-monitor' ),
15
+ 'rated' => esc_html__( 'Remind me later', 'download-monitor' ),
16
+ 'no_rate' => __( 'Don\'t show again', 'download-monitor' ),
17
+ );
18
+
19
+ if ( isset( $args['messages'] ) ) {
20
+ $this->messages = wp_parse_args( $args['messages'], $this->messages );
21
+ }
22
+
23
+ add_action( 'init', array( $this, 'init' ) );
24
+
25
+ }
26
+
27
+ public function init() {
28
+ if ( ! is_admin() ) {
29
+ return;
30
+ }
31
+
32
+ $this->value = $this->value();
33
+
34
+ if ( $this->check() ) {
35
+ add_action( 'admin_notices', array( $this, 'five_star_wp_rate_notice' ) );
36
+ add_action( 'wp_ajax_download-monitor_review', array( $this, 'ajax' ) );
37
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
38
+ add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
39
+ }
40
+
41
+ add_filter('st_uninstall_db_options',array($this,'uninstall_options'));
42
+
43
+ }
44
+
45
+ private function check() {
46
+
47
+ if ( ! current_user_can('manage_options') ) {
48
+ return false;
49
+ }
50
+
51
+ return( time() > $this->value );
52
+
53
+ }
54
+
55
+ private function value() {
56
+
57
+ $value = get_option( 'download-monitor-rate-time', false );
58
+ if ( $value ) {
59
+ return $value;
60
+ }
61
+
62
+ $value = time() + DAY_IN_SECONDS;
63
+ update_option( 'download-monitor-rate-time', $value );
64
+
65
+ return $value;
66
+
67
+ }
68
+
69
+ public function five_star_wp_rate_notice() {
70
+
71
+ $url = sprintf( $this->link, $this->slug );
72
+
73
+ ?>
74
+ <div id="<?php echo esc_attr( $this->slug ) ?>-download-monitor-review-notice" class="notice notice-success is-dismissible" style="margin-top:30px;">
75
+ <p><?php echo sprintf( esc_html( $this->messages['notice'] ), esc_attr( $this->value ) ) ; ?></p>
76
+ <p class="actions">
77
+ <a id="download-monitor-rate" href="<?php echo esc_url( $url ) ?>" target="_blank" class="button button-primary download-monitor-review-button">
78
+ <?php echo esc_html( $this->messages['rate'] ); ?>
79
+ </a>
80
+ <a id="download-monitor-later" href="#" style="margin-left:10px" class="download-monitor-review-button"><?php echo esc_html( $this->messages['rated'] ); ?></a>
81
+ <a id="download-monitor-no-rate" href="#" style="margin-left:10px" class="download-monitor-review-button"><?php echo esc_html( $this->messages['no_rate'] ); ?></a>
82
+ </p>
83
+ </div>
84
+ <?php
85
+ }
86
+
87
+ public function ajax() {
88
+
89
+ check_ajax_referer( 'download-monitor-review', 'security' );
90
+
91
+ if ( ! isset( $_POST['check'] ) ) {
92
+ wp_die( 'ok' );
93
+ }
94
+
95
+ $time = get_option( 'download-monitor-rate-time' );
96
+
97
+ if ( 'download-monitor-rate' == $_POST['check'] ) {
98
+ $time = time() + YEAR_IN_SECONDS * 1;
99
+ }elseif ( 'download-monitor-later' == ['check'] ) {
100
+ $time = time() + WEEK_IN_SECONDS;
101
+ }elseif ( 'download-monitor-no-rate' == $_POST['check'] ) {
102
+ $time = time() + YEAR_IN_SECONDS * 1;
103
+ }
104
+
105
+ update_option( 'download-monitor-rate-time', $time );
106
+ wp_die( 'ok' );
107
+
108
+ }
109
+
110
+ public function enqueue() {
111
+ wp_enqueue_script( 'jquery' );
112
+ }
113
+
114
+ public function ajax_script() {
115
+
116
+ $ajax_nonce = wp_create_nonce( "download-monitor-review" );
117
+
118
+ ?>
119
+
120
+ <script type="text/javascript">
121
+ jQuery( document ).ready( function( $ ){
122
+
123
+ $( '.download-monitor-review-button' ).on('click', function( evt ){
124
+ var href = $(this).attr('href'),
125
+ id = $(this).attr('id');
126
+
127
+ if ( 'download-monitor-rate' != id ) {
128
+ evt.preventDefault();
129
+ }
130
+
131
+ var data = {
132
+ action: 'download-monitor_review',
133
+ security: '<?php echo $ajax_nonce; ?>',
134
+ check: id
135
+ };
136
+
137
+ if ( 'download-monitor-rated' === id ) {
138
+ data['download-monitor-review'] = 1;
139
+ }
140
+
141
+ $.post( '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>', data, function( response ) {
142
+ $( '#<?php echo esc_attr( $this->slug ); ?>-download-monitor-review-notice' ).slideUp( 'fast', function() {
143
+ $( this ).remove();
144
+ } );
145
+ });
146
+
147
+ } );
148
+
149
+ });
150
+ </script>
151
+
152
+ <?php
153
+ }
154
+
155
+ /**
156
+ * @param $options
157
+ *
158
+ * @return mixed
159
+ *
160
+ * @since 2.51.6
161
+ */
162
+ public function uninstall_options( $options ) {
163
+
164
+ $options[] = 'download-monitor-rate-time';
165
+
166
+ return $options;
167
+ }
168
+ }
169
+
170
+ new DLM_Review();
includes/admin/class-dlm-upsells.php CHANGED
@@ -1,785 +1,867 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- /**
8
- * Class DLM_Upsells
9
- *
10
- * @since 4.4.5
11
- */
12
- class DLM_Upsells {
13
-
14
- /**
15
- * Holds the class object.
16
- *
17
- * @since 4.4.5
18
- *
19
- * @var object
20
- */
21
- public static $instance;
22
-
23
- public $extensions = array();
24
-
25
- private $upsell_tabs = array();
26
-
27
- /**
28
- * DLM_Upsells constructor.
29
- *
30
- * @since 4.4.5
31
- */
32
- public function __construct() {
33
-
34
- $this->set_hooks();
35
-
36
- $this->set_tabs();
37
-
38
- $this->set_upsell_actions();
39
-
40
- }
41
-
42
- /**
43
- * Returns the singleton instance of the class.
44
- *
45
- * @return object The DLM_Upsells object.
46
- *
47
- * @since 4.4.5
48
- */
49
- public static function get_instance() {
50
-
51
- if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DLM_Upsells ) ) {
52
- self::$instance = new DLM_Upsells();
53
- }
54
-
55
- return self::$instance;
56
-
57
- }
58
-
59
- /**
60
- * Set our hooks
61
- *
62
- * @since 4.4.5
63
- */
64
- public function set_hooks(){
65
-
66
- add_action( 'dlm_tab_content_general', array( $this, 'general_tab_upsell' ), 15 );
67
-
68
- add_action( 'dlm_tab_content_access', array( $this, 'access_tab_upsell' ), 15 );
69
-
70
- add_action( 'dlm_tab_content_logging', array( $this, 'logging_tab_upsell' ), 15 );
71
-
72
- add_action( 'dlm_tab_content_terns_and_conditions', array( $this, 'terms_and_conditions_tab_upsell' ), 15 );
73
-
74
- add_action( 'dlm_tab_content_email_notification', array( $this, 'emails_tab_upsell' ), 15 );
75
-
76
- add_action( 'dlm_tab_content_pages', array( $this, 'pages_tab_upsell' ), 15 );
77
-
78
- add_action( 'dlm_tab_content_misc', array( $this, 'misc_tab_upsell' ), 15 );
79
-
80
- add_action( 'dlm_tab_content_endpoints', array( $this, 'endpoint_tab_upsell' ), 15 );
81
-
82
- add_filter( 'dlm_download_metaboxes', array( $this, 'add_meta_boxes' ), 30 );
83
-
84
- add_action( 'dlm_download_monitor_files_writepanel_start', array( $this, 'files_metabox_upsells' ), 30, 1 );
85
-
86
- add_filter( 'dlm_settings', array( $this, 'pro_tab_upsells' ), 99, 1 );
87
-
88
- add_action( 'admin_init', array( $this, 'set_extensions' ), 99 );
89
-
90
- }
91
-
92
-
93
- /**
94
- * Generate the all-purpose upsell box
95
- *
96
- * @param $title
97
- * @param $description
98
- * @param $tab
99
- * @param $extension
100
- * @param null $utm_source
101
- * @param array $features
102
- *
103
- * @return string
104
- *
105
- * @since 4.4.5
106
- */
107
- public function generate_upsell_box( $title, $description, $tab, $extension, $features = array(), $utm_source = null ) {
108
-
109
- echo '<div class="wpchill-upsell">';
110
-
111
- if ( ! empty( $title ) ) {
112
- echo '<h2>' . esc_html( $title ) . '</h2>';
113
- }
114
-
115
- if ( ! empty( $features ) ) {
116
-
117
- echo '<ul class="wpchill-upsell-features">';
118
-
119
- foreach ( $features as $feature ) {
120
-
121
- echo '<li>';
122
- if ( isset( $feature['tooltip'] ) && '' != $feature['tooltip'] ) {
123
- echo '<div class="wpchill-tooltip"><span>[?]</span>';
124
- echo '<div class="wpchill-tooltip-content">' . esc_html( $feature['tooltip'] ) . '</div>';
125
- echo '</div>';
126
- echo "<p>" . esc_html( $feature['feature'] ) . "</p>";
127
- } else {
128
- echo '<span class="wpchill-check dashicons dashicons-yes"></span>' . esc_html( $feature['feature'] );
129
- }
130
-
131
- echo '</li>';
132
-
133
- }
134
- echo '</ul>';
135
- }
136
-
137
- if ( ! $utm_source ) {
138
- $utm_source = 'settings_panel';
139
- }
140
-
141
- echo '<p class="wpchill-upsell-description">' . esc_html( $description ) . '</p>';
142
- echo '<p>';
143
-
144
- $buttons = '<a target="_blank" href="https://www.download-monitor.com/pricing/?utm_source=' . esc_attr( $utm_source ) . '&utm_medium=upsell&utm_campaign=w.org&utm_content=' . esc_attr( $tab ) . '" class="button-primary button">' . esc_html__( 'Get Extension!', 'download-monitor' ) . '</a>';
145
-
146
- echo wp_kses_post( apply_filters( 'dlm_upsell_buttons', $buttons, $tab ) );
147
-
148
- echo '</p>';
149
- echo '</div>';
150
-
151
- }
152
-
153
- /**
154
- * Add upsell metaboxes
155
- *
156
- * @since 4.4.5
157
- */
158
- public function add_meta_boxes( $meta_boxes ) {
159
-
160
- if ( ! $this->check_extension( 'dlm-download-page' ) ) {
161
-
162
- $meta_boxes[] = array(
163
- 'id' => 'dlm-download-page-upsell',
164
- 'title' => esc_html__( 'Downloading page', 'download-monitor' ),
165
- 'callback' => array( $this, 'output_download_page_upsell' ),
166
- 'screen' => 'dlm_download',
167
- 'context' => 'side',
168
- 'priority' => 30
169
- );
170
- }
171
-
172
- if ( ! $this->check_extension( 'dlm-buttons' ) ) {
173
-
174
- $meta_boxes[] = array(
175
- 'id' => 'dlm-buttons-upsell',
176
- 'title' => esc_html__( 'Buttons', 'download-monitor' ),
177
- 'callback' => array( $this, 'output_buttons_upsell' ),
178
- 'screen' => 'dlm_download',
179
- 'context' => 'side',
180
- 'priority' => 40
181
- );
182
- }
183
-
184
- return $meta_boxes;
185
- }
186
-
187
- /**
188
- * Set the existing extensions
189
- *
190
- * @since 4.4.5
191
- */
192
- public function set_extensions() {
193
-
194
- $dlm_Extensions = DLM_Admin_Extensions::get_instance();
195
-
196
- $extensions = $dlm_Extensions->get_extensions();
197
-
198
- foreach ( $extensions as $extension ) {
199
- $this->extensions[] = $extension->product_id;
200
- }
201
-
202
- }
203
-
204
- /**
205
- * Check if extension exists
206
- *
207
- * @param $extension
208
- *
209
- * @return bool
210
- *
211
- * @since 4.4.5
212
- */
213
- public function check_extension( $extension ) {
214
-
215
- if ( empty( $this->extensions ) || ! in_array( $extension, $this->extensions ) ) {
216
- return false;
217
- }
218
-
219
- return true;
220
- }
221
-
222
- /**
223
- * Set DLM's upsell tabs
224
- *
225
- * @since 4.4.5
226
- */
227
- public function set_tabs() {
228
- // Define our upsell tabs
229
- // First is the tab and then are the sections
230
- $this->upsell_tabs = apply_filters( 'dlm_upsell_tabs', array(
231
- 'lead_generation' => array(
232
- 'title' => esc_html__( 'Content Locking', 'download-monitor' ),
233
- 'upsell' => true,
234
- 'sections' => array(
235
- 'ninja_forms' => array(
236
- 'title' => __( 'Ninja Forms', 'download-monitor' ),
237
- 'sections' => array(), // Need to put sections here for backwards compatibility
238
- ),
239
- 'gravity_forms' => array(
240
- 'title' => __( 'Gravity Forms', 'download-monitor' ),
241
- 'sections' => array(), // Need to put sections here for backwards compatibility
242
- 'upsell' => true,
243
- 'badge' => true,
244
- ),
245
- 'email_lock' => array(
246
- 'title' => __( 'Email lock', 'download-monitor' ),
247
- 'sections' => array(), // Need to put sections here for backwards compatibility
248
- ),
249
- ),
250
- ),
251
- 'external_hosting' => array(
252
- 'title' => esc_html__( 'External hosting', 'download-monitor' ),
253
- 'sections' => array(
254
- 'amazon_s3' => array(
255
- 'title' => __( 'Amazon S3', 'download-monitor' ),
256
- 'sections' => array(), // Need to put sections here for backwards compatibility
257
- ),
258
- 'google_drive' => array(
259
- 'title' => __( 'Google Drive', 'download-monitor' ),
260
- 'sections' => array(), // Need to put sections here for backwards compatibility
261
- ),
262
- ),
263
- ),
264
- 'advanced' => array(
265
- 'title' => esc_html__( 'Advanced', 'download-monitor' ),
266
- 'sections' => array(
267
- 'page_addon' => array(
268
- 'title' => __( 'Page Addon', 'download-monitor' ),
269
- 'sections' => array(), // Need to put sections here for backwards compatibility
270
- ),
271
- 'downloading_page' => array(
272
- 'title' => __( 'Downloading Page', 'download-monitor' ),
273
- 'sections' => array(), // Need to put sections here for backwards compatibility
274
- ),
275
- 'captcha' => array(
276
- 'title' => __( 'Captcha', 'download-monitor' ),
277
- 'sections' => array(), // Need to put sections here for backwards compatibility
278
- )
279
- ),
280
- ),
281
- 'integration' => array(
282
- 'title' => esc_html__( 'Integration', 'download-monitor' ),
283
- 'sections' => array(
284
- 'captcha' => array(
285
- 'title' => __( 'Captcha', 'download-monitor' ),
286
- 'sections' => array(), // Need to put sections here for backwards compatibility
287
- )
288
- ),
289
- ),
290
- )
291
- );
292
- }
293
-
294
- /**
295
- * Add PRO Tabs upsells
296
- *
297
- * @param $settings
298
- *
299
- * @return mixed
300
- *
301
- * @since 4.4.5
302
- */
303
- public function pro_tab_upsells( $settings ) {
304
-
305
- foreach ( $this->upsell_tabs as $key => $tab ) {
306
-
307
- if ( ! isset( $settings[ $key ] ) ) {
308
-
309
- if ( ! isset( $settings[ $key ]['title'] ) ) {
310
-
311
- $settings[ $key ]['title'] = $tab['title'];
312
- }
313
-
314
- foreach ( $tab['sections'] as $section_key => $section ) {
315
-
316
- if ( ! isset( $settings[ $key ]['sections'][ $section_key ] ) ) {
317
-
318
- $settings[ $key ]['sections'][ $section_key ] = $section;
319
- $settings[ $key ]['sections'][ $section_key ]['upsell'] = true;
320
- }
321
- }
322
- }
323
- }
324
-
325
- return $settings;
326
-
327
- }
328
-
329
- /**
330
- * Add Upsell tabs content
331
- *
332
- * @since 4.4.5
333
- */
334
- public function set_upsell_actions() {
335
-
336
- foreach ( $this->upsell_tabs as $key => $tab ) {
337
-
338
- if ( method_exists( 'DLM_Upsells', 'upsell_tab_content_' . $key ) ) {
339
- add_action( 'dlm_tab_content_' . $key, array( $this, 'upsell_tab_content_' . $key ), 30, 1 );
340
- }
341
-
342
- }
343
- }
344
-
345
- /**
346
- * Settings General tab upsell
347
- *
348
- *
349
- * @since 4.4.5
350
- */
351
- public function general_tab_upsell() {
352
-
353
- if ( ! $this->check_extension( 'dlm-download-duplicator' ) ) {
354
-
355
- $this->generate_upsell_box(
356
- __( 'Duplicate your downloads', 'download-monitor' ),
357
- __( 'You’re one click away from duplicating downloads, including their data, versions, and files.', 'download-monitor' ),
358
- 'general',
359
- 'download-duplicator'
360
- );
361
- }
362
-
363
- if ( ! $this->check_extension( 'dlm-email-notification' ) ) {
364
-
365
- $this->generate_upsell_box(
366
- __( 'Email notifications', 'download-monitor' ),
367
- __( 'Create an email alert to be notified each time one of your files has been downloaded.', 'download-monitor' ),
368
- 'general',
369
- 'email-notification'
370
- );
371
- }
372
-
373
- }
374
-
375
- /**
376
- * Settings Access tab upsell
377
- *
378
- *
379
- * @since 4.4.5
380
- */
381
- public function access_tab_upsell() {
382
-
383
- if ( ! $this->check_extension( 'dlm-advanced-access-manager' ) ) {
384
-
385
- $this->generate_upsell_box(
386
- __( 'Advanced access manager', 'download-monitor' ),
387
- __( 'Limit access to your downloads by setting advanced access rules and restrictions with this extension.', 'download-monitor' ),
388
- 'access',
389
- 'advanced-access-manager'
390
- );
391
- }
392
-
393
- if ( ! $this->check_extension( 'dlm-twitter-lock' ) ) {
394
-
395
- $this->generate_upsell_box(
396
- __( 'Twitter lock', 'download-monitor' ),
397
- __( 'Allow your users to tweet a pre-defined text before accessing a download.', 'download-monitor' ),
398
- 'access',
399
- 'twitter-lock'
400
- );
401
- }
402
-
403
- if ( ! $this->check_extension( 'dlm-email-lock' ) ) {
404
-
405
- $this->generate_upsell_box(
406
- __( 'Email Lock', 'download-monitor' ),
407
- __( 'Require your users’ email addresses to send newsletters and create a list of your customers.', 'download-monitor' ),
408
- 'access',
409
- 'email-lock'
410
- );
411
- }
412
-
413
- if ( ! $this->check_extension( 'dlm-gravity-forms' ) ) {
414
-
415
- $this->generate_upsell_box(
416
- __( 'Gravity Forms Lock', 'download-monitor' ),
417
- __( 'Ask users to fill in a form created on Gravity Forms before they start downloading your files.', 'download-monitor' ),
418
- 'access',
419
- 'gravity-forms'
420
- );
421
- }
422
-
423
- if ( ! $this->check_extension( 'dlm-ninja-forms' ) ) {
424
-
425
- $this->generate_upsell_box(
426
- __( 'Ninja Forms Lock', 'download-monitor' ),
427
- __( 'Use the Ninja Forms - content locking extension to add forms easily to your download files.', 'download-monitor' ),
428
- 'access',
429
- 'ninja-forms'
430
- );
431
- }
432
-
433
- if ( ! $this->check_extension( 'dlm-mailchimp-lock' ) ) {
434
-
435
- $this->generate_upsell_box(
436
- __( 'Mailchimp extension', 'download-monitor' ),
437
- __( 'Create a MailChimp list and ask users to subscribe to it before accessing a downloadable file.', 'download-monitor' ),
438
- 'access',
439
- 'mailchimp-lock'
440
- );
441
- }
442
-
443
- }
444
-
445
- /**
446
- * Settings Logging tab upsell
447
- *
448
- *
449
- * @since 4.4.5
450
- */
451
- public function logging_tab_upsell() {
452
-
453
- if ( ! $this->check_extension( 'dlm-captcha' ) ) {
454
-
455
- $this->generate_upsell_box(
456
- __( 'Captcha', 'download-monitor' ),
457
- __( 'Stop bots from spamming your downloads and ask users to complete Google reCAPTCHA.', 'download-monitor' ),
458
- 'logging',
459
- 'captcha'
460
- );
461
- }
462
-
463
- }
464
-
465
- /**
466
- * Settings Terms and conditions tab upsell
467
- *
468
- *
469
- * @since 4.4.5
470
- */
471
- public function terms_and_conditions_tab_upsell() {
472
-
473
- if ( ! $this->check_extension( 'dlm-terms-and-conditions' ) ) {
474
-
475
- $this->generate_upsell_box(
476
- __( 'Terms and conditions', 'download-monitor' ),
477
- __( 'Require your users to accept your terms and conditions before they can download your files.', 'download-monitor' ),
478
- 'terns_and_conditions',
479
- 'terms-and-conditions'
480
- );
481
- }
482
-
483
- }
484
-
485
- /**
486
- * Settings Emails tab upsell
487
- *
488
- *
489
- * @since 4.4.5
490
- */
491
- public function emails_tab_upsell() {
492
-
493
- if ( ! $this->check_extension( 'dlm-email-notification' ) ) {
494
-
495
- $this->generate_upsell_box(
496
- __( 'Email notifications', 'download-monitor' ),
497
- __( 'The Email Notification extension for Download Monitor sends you an email whenever one of your files is downloaded', 'download-monitor' ),
498
- 'email_notifications',
499
- 'email-notifications'
500
- );
501
- }
502
-
503
- }
504
-
505
- /**
506
- * Settings Logging tab upsell
507
- *
508
- *
509
- * @since 4.4.5
510
- */
511
- public function pages_tab_upsell() {
512
-
513
- if ( ! $this->check_extension( 'dlm-terms-conditions' ) ) {
514
-
515
- $this->generate_upsell_box(
516
- __( 'Terms & Conditions', 'download-monitor' ),
517
- __( 'Easily require your visitors to agree to your terms and conditions before downloading files.', 'download-monitor' ),
518
- 'pages',
519
- 'terms-conditions'
520
- );
521
- }
522
-
523
- if ( ! $this->check_extension( 'dlm-page-addon' ) ) {
524
-
525
- $this->generate_upsell_box(
526
- __( 'Page Addon', 'download-monitor' ),
527
- __( 'List all downloads, categories, tags, and showcase info pages of each resource with a self-contained [download_page] shortcode!', 'download-monitor' ),
528
- 'pages',
529
- 'page-addon'
530
- );
531
- }
532
-
533
- }
534
-
535
- /**
536
- * Settings Misc tab upsell
537
- *
538
- *
539
- * @since 4.4.5
540
- */
541
- public function output_buttons_upsell() {
542
-
543
- if ( ! $this->check_extension( 'dlm-buttons' ) ) {
544
-
545
- $this->generate_upsell_box(
546
- __( 'Buttons', 'download-monitor' ),
547
- __( 'The Buttons extension allows you to customize your download buttons as you please in order to improve the user experience. Create stunning buttons without needing any coding skills!', 'download-monitor' ),
548
- 'cpt',
549
- 'buttons'
550
- );
551
- }
552
-
553
- }
554
-
555
- /**
556
- * Settings Misc tab upsell
557
- *
558
- *
559
- * @since 4.4.5
560
- */
561
- public function endpoint_tab_upsell() {
562
-
563
- if ( ! $this->check_extension( 'dlm-csv-impoter' ) ) {
564
-
565
- $this->generate_upsell_box(
566
- __( 'Importer', 'download-monitor' ),
567
- __( 'Easily import your downloads, including their categories, tags, and files.', 'download-monitor' ),
568
- 'endpoint',
569
- 'csv-impoter'
570
- );
571
- }
572
-
573
- if ( ! $this->check_extension( 'dlm-csv-exporter' ) ) {
574
-
575
- $this->generate_upsell_box(
576
- __( 'Exporter', 'download-monitor' ),
577
- __( 'With a single click, you can quickly export your downloads and their tags, categories, and file versions to a CSV file.', 'download-monitor' ),
578
- 'endpoint',
579
- 'csv-exporter'
580
- );
581
- }
582
-
583
- }
584
-
585
- /**
586
- * Output the DLM Downloading Page extension upsell
587
- *
588
- * @since 4.4.5
589
- */
590
- public function output_download_page_upsell() {
591
-
592
- if ( ! $this->check_extension( 'dlm-downloading-page' ) ) {
593
-
594
- $this->generate_upsell_box(
595
- '',
596
- __( 'Customize the downloading page by adding banners, ads, and anything you like.', 'download-monitor' ),
597
- 'downloading_page',
598
- 'downloading-page'
599
- );
600
- }
601
-
602
- }
603
-
604
- /**
605
- * Upsell for Locking tab
606
- *
607
- * @since 4.4.5
608
- */
609
- public function upsell_tab_content_lead_generation() {
610
-
611
- if ( ! $this->check_extension( 'dlm-ninja-forms' ) ) {
612
-
613
- $this->generate_upsell_box(
614
- __( 'Ninja Forms Lock', 'download-monitor' ),
615
- __( 'The Ninja Forms - content locking extension for Download Monitor allows you to require users to fill in a Ninja Forms form before they gain access to a download.','download-monitor' ),
616
- 'ninja_forms',
617
- 'ninja-forms'
618
- );
619
- }
620
-
621
- if ( ! $this->check_extension( 'dlm-email-lock' ) ) {
622
-
623
- $this->generate_upsell_box(
624
- __( 'Email Lock', 'download-monitor' ),
625
- __( 'The Email Lock extension for Download Monitor allows you to require users to fill in their email address before they gain access to a download.', 'download-monitor' ),
626
- 'email_lock',
627
- 'email-lock'
628
- );
629
- }
630
-
631
- if ( ! $this->check_extension( 'dlm-gravity-forms' ) ) {
632
-
633
- $this->generate_upsell_box(
634
- __( 'Gravity Forms Lock', 'download-monitor' ),
635
- __( 'The Gravity Forms - content locking extension for Download Monitor allows you to require users to fill out a Gravity Forms form before they gain access to a download.', 'download-monitor' ),
636
- 'gravity_forms',
637
- 'gravity-forms'
638
- );
639
- }
640
-
641
- }
642
-
643
- /**
644
- * Upsell for Amazon S3 setting tab
645
- *
646
- * @since 4.4.5
647
- */
648
- public function upsell_tab_content_external_hosting() {
649
-
650
- if ( ! $this->check_extension( 'dlm-amazon-s3' ) ) {
651
-
652
- $this->generate_upsell_box(
653
- __( 'Amazon S3', 'download-monitor' ),
654
- __( 'Link to files hosted on Amazon s3 so that you can serve secure, expiring download links.', 'download-monitor' ),
655
- 'amazon_s3',
656
- 'amazon-s3'
657
- );
658
- }
659
-
660
- if ( ! $this->check_extension( 'dlm-google-drive' ) ) {
661
-
662
- $this->generate_upsell_box(
663
- __( 'Google Drive', 'download-monitor' ),
664
- __( 'With this extension, you can integrate your files from Google Drive into Download Monitor.', 'download-monitor' ),
665
- 'google_drive',
666
- 'google-drive'
667
- );
668
- }
669
-
670
- }
671
-
672
-
673
- /**
674
- * Upsell for Page Addon setting tab
675
- *
676
- * @since 4.4.5
677
- */
678
- public function upsell_tab_content_advanced() {
679
-
680
- if ( ! $this->check_extension( 'dlm-page-addon' ) ) {
681
-
682
- $this->generate_upsell_box(
683
- __( 'Page addon extension', 'download-monitor' ),
684
- __( 'Add a self contained [download_page] shortcode to your site to list downloads, categories, tags, and show info pages about each of your resources.', 'download-monitor' ),
685
- 'page_addon',
686
- 'page-addon'
687
- );
688
- }
689
-
690
- if ( ! $this->check_extension( 'dlm-downloading-page' ) ) {
691
-
692
- $this->generate_upsell_box(
693
- __( 'Downloading page extension', 'download-monitor' ),
694
- __( 'The Downloading Page extension for Download Monitor forces your downloads to be served from a separate page.', 'download-monitor' ),
695
- 'downloading_page',
696
- 'downloading-page'
697
- );
698
- }
699
-
700
-
701
- }
702
-
703
- /**
704
- * Upsell for Captcha setting tab
705
- *
706
- * @since 4.4.5
707
- */
708
- public function upsell_tab_content_captcha() {
709
-
710
- if ( ! $this->check_extension( 'dlm=captcha' ) ) {
711
-
712
- $this->generate_upsell_box(
713
- __( 'Captcha extension', 'download-monitor' ),
714
- __( 'The Captcha extension for Download Monitor allows you to require users to complete a Google reCAPTCHA before they gain access to a download.', 'download-monitor' ),
715
- 'captcha',
716
- 'captcha'
717
- );
718
- }
719
-
720
-
721
- }
722
-
723
-
724
- /**
725
- * Output the Downloadable Files locations in the Downloadable files metabox
726
- *
727
- * @param $download
728
- *
729
- * @since 4.4.5
730
- */
731
- public function files_metabox_upsells( $download ) {
732
-
733
- echo '<div class="upsells-columns">';
734
-
735
- if ( ! $this->check_extension( 'dlm-amazon-s3' ) ) {
736
-
737
- echo '<div class="upsells-column"><span class="dashicons dashicons-amazon"></span>';
738
- echo '<h3>' . esc_html__( 'Amazon S3', 'download-monitor' ) . '</h3>';
739
- $this->generate_upsell_box(
740
- '',
741
- __( 'Use Amazon S3 links for Download Monitor files to run secure, expiring download links.', 'download-monitor' ),
742
- 'amazon_s3',
743
- 'amazon-s3'
744
- );
745
- echo '</div>';
746
- }
747
-
748
- if ( ! $this->check_extension( 'dlm-google-drive' ) ) {
749
-
750
- echo '<div class="upsells-column"><span class="dashicons dashicons-google"></span>';
751
- echo '<h3>' . esc_html__( 'Google Drive', 'download-monitor' ) . '</h3>';
752
- $this->generate_upsell_box(
753
- '',
754
- __( 'With this extension, you can integrate your files from Google Drive into Download Monitor.', 'download-monitor' ),
755
- 'google_drive',
756
- 'google-drive'
757
- );
758
- echo '</div>';
759
- }
760
-
761
- echo '</div>';
762
-
763
- }
764
-
765
- /**
766
- * Upsell for Integration tab
767
- *
768
- * @since 4.4.5
769
- */
770
- public function upsell_tab_content_integration() {
771
-
772
- if ( ! $this->check_extension( 'dlm-captcha' ) ) {
773
-
774
- $this->generate_upsell_box(
775
- __( 'Captcha', 'download-monitor' ),
776
- __( 'Stop bots from spamming your downloads and ask users to complete Google reCAPTCHA.', 'download-monitor' ),
777
- 'logging',
778
- 'captcha'
779
- );
780
- }
781
-
782
- }
783
- }
784
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
785
  DLM_Upsells::get_instance();
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ /**
8
+ * Class DLM_Upsells
9
+ *
10
+ * @since 4.4.5
11
+ */
12
+ class DLM_Upsells {
13
+
14
+ /**
15
+ * Holds the class object.
16
+ *
17
+ * @since 4.4.5
18
+ *
19
+ * @var object
20
+ */
21
+ public static $instance;
22
+
23
+ public $extensions = array();
24
+
25
+ private $upsell_tabs = array();
26
+
27
+ /**
28
+ * DLM_Upsells constructor.
29
+ *
30
+ * @since 4.4.5
31
+ */
32
+ public function __construct() {
33
+
34
+ $this->set_hooks();
35
+
36
+ $this->set_tabs();
37
+
38
+ $this->set_upsell_actions();
39
+
40
+ // Add Lite VS Pro page
41
+ add_filter( 'dlm_admin_menu_links', array( $this, 'add_lite_vs_pro_page' ), 120 );
42
+
43
+ }
44
+
45
+ /**
46
+ * Returns the singleton instance of the class.
47
+ *
48
+ * @return object The DLM_Upsells object.
49
+ *
50
+ * @since 4.4.5
51
+ */
52
+ public static function get_instance() {
53
+
54
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DLM_Upsells ) ) {
55
+ self::$instance = new DLM_Upsells();
56
+ }
57
+
58
+ return self::$instance;
59
+
60
+ }
61
+
62
+ /**
63
+ * Set our hooks
64
+ *
65
+ * @since 4.4.5
66
+ */
67
+ public function set_hooks(){
68
+
69
+ add_action( 'dlm_tab_content_general', array( $this, 'general_tab_upsell' ), 15 );
70
+
71
+ add_action( 'dlm_tab_content_access', array( $this, 'access_tab_upsell' ), 15 );
72
+
73
+ add_action( 'dlm_tab_content_logging', array( $this, 'logging_tab_upsell' ), 15 );
74
+
75
+ add_action( 'dlm_tab_content_terns_and_conditions', array( $this, 'terms_and_conditions_tab_upsell' ), 15 );
76
+
77
+ add_action( 'dlm_tab_content_email_notification', array( $this, 'emails_tab_upsell' ), 15 );
78
+
79
+ add_action( 'dlm_tab_content_pages', array( $this, 'pages_tab_upsell' ), 15 );
80
+
81
+ add_action( 'dlm_tab_content_misc', array( $this, 'misc_tab_upsell' ), 15 );
82
+
83
+ add_action( 'dlm_tab_content_endpoints', array( $this, 'endpoint_tab_upsell' ), 15 );
84
+
85
+ add_filter( 'dlm_download_metaboxes', array( $this, 'add_meta_boxes' ), 30 );
86
+
87
+ add_action( 'dlm_download_monitor_files_writepanel_start', array( $this, 'files_metabox_upsells' ), 30, 1 );
88
+
89
+ add_filter( 'dlm_settings', array( $this, 'pro_tab_upsells' ), 99, 1 );
90
+
91
+ add_action( 'admin_init', array( $this, 'set_extensions' ), 99 );
92
+
93
+ }
94
+
95
+
96
+ /**
97
+ * Generate the all-purpose upsell box
98
+ *
99
+ * @param $title
100
+ * @param $description
101
+ * @param $tab
102
+ * @param $extension
103
+ * @param null $utm_source
104
+ * @param array $features
105
+ *
106
+ * @return string
107
+ *
108
+ * @since 4.4.5
109
+ */
110
+ public function generate_upsell_box( $title, $description, $tab, $extension, $features = array(), $utm_source = null ) {
111
+
112
+ echo '<div class="wpchill-upsell">';
113
+
114
+ if ( ! empty( $title ) ) {
115
+ echo '<h2>' . esc_html( $title ) . '</h2>';
116
+ }
117
+
118
+ if ( ! empty( $features ) ) {
119
+
120
+ echo '<ul class="wpchill-upsell-features">';
121
+
122
+ foreach ( $features as $feature ) {
123
+
124
+ echo '<li>';
125
+ if ( isset( $feature['tooltip'] ) && '' != $feature['tooltip'] ) {
126
+ echo '<div class="wpchill-tooltip"><span>[?]</span>';
127
+ echo '<div class="wpchill-tooltip-content">' . esc_html( $feature['tooltip'] ) . '</div>';
128
+ echo '</div>';
129
+ echo '<p>' . esc_html( $feature['feature'] ) . '</p>';
130
+ } else {
131
+ echo '<span class="wpchill-check dashicons dashicons-yes"></span>' . esc_html( $feature['feature'] );
132
+ }
133
+
134
+ echo '</li>';
135
+
136
+ }
137
+ echo '</ul>';
138
+ }
139
+
140
+ echo '<p class="wpchill-upsell-description">' . esc_html( $description ) . '</p>';
141
+ echo '<p>';
142
+
143
+ $buttons = '<a target="_blank" href="' . admin_url( 'edit.php?post_type=dlm_download&page=dlm-lite-vs-pro' ) . '" class="button-primary button">' . esc_html__( 'Get PRO!', 'download-monitor' ) . '</a>';
144
+
145
+ echo wp_kses_post( apply_filters( 'dlm_upsell_buttons', $buttons, $tab ) );
146
+
147
+ echo '</p>';
148
+ echo '</div>';
149
+
150
+ }
151
+
152
+ /**
153
+ * Add upsell metaboxes
154
+ *
155
+ * @since 4.4.5
156
+ */
157
+ public function add_meta_boxes( $meta_boxes ) {
158
+
159
+ if ( ! $this->check_extension( 'dlm-download-page' ) ) {
160
+
161
+ $meta_boxes[] = array(
162
+ 'id' => 'dlm-download-page-upsell',
163
+ 'title' => esc_html__( 'Downloading page', 'download-monitor' ),
164
+ 'callback' => array( $this, 'output_download_page_upsell' ),
165
+ 'screen' => 'dlm_download',
166
+ 'context' => 'side',
167
+ 'priority' => 30
168
+ );
169
+ }
170
+
171
+ if ( ! $this->check_extension( 'dlm-buttons' ) ) {
172
+
173
+ $meta_boxes[] = array(
174
+ 'id' => 'dlm-buttons-upsell',
175
+ 'title' => esc_html__( 'Buttons', 'download-monitor' ),
176
+ 'callback' => array( $this, 'output_buttons_upsell' ),
177
+ 'screen' => 'dlm_download',
178
+ 'context' => 'side',
179
+ 'priority' => 40
180
+ );
181
+ }
182
+
183
+ return $meta_boxes;
184
+ }
185
+
186
+ /**
187
+ * Set the existing extensions
188
+ *
189
+ * @since 4.4.5
190
+ */
191
+ public function set_extensions() {
192
+
193
+ $dlm_Extensions = DLM_Admin_Extensions::get_instance();
194
+
195
+ $extensions = $dlm_Extensions->get_extensions();
196
+
197
+ foreach ( $extensions as $extension ) {
198
+ $this->extensions[] = $extension->product_id;
199
+ }
200
+
201
+ }
202
+
203
+ /**
204
+ * Check if extension exists
205
+ *
206
+ * @param $extension
207
+ *
208
+ * @return bool
209
+ *
210
+ * @since 4.4.5
211
+ */
212
+ public function check_extension( $extension ) {
213
+
214
+ if ( empty( $this->extensions ) || ! in_array( $extension, $this->extensions ) ) {
215
+ return false;
216
+ }
217
+
218
+ return true;
219
+ }
220
+
221
+ /**
222
+ * Set DLM's upsell tabs
223
+ *
224
+ * @since 4.4.5
225
+ */
226
+ public function set_tabs() {
227
+ // Define our upsell tabs
228
+ // First is the tab and then are the sections
229
+ $this->upsell_tabs = apply_filters( 'dlm_upsell_tabs', array(
230
+ 'lead_generation' => array(
231
+ 'title' => esc_html__( 'Content Locking', 'download-monitor' ),
232
+ 'upsell' => true,
233
+ 'sections' => array(
234
+ 'ninja_forms' => array(
235
+ 'title' => __( 'Ninja Forms', 'download-monitor' ),
236
+ 'sections' => array(), // Need to put sections here for backwards compatibility
237
+ ),
238
+ 'gravity_forms' => array(
239
+ 'title' => __( 'Gravity Forms', 'download-monitor' ),
240
+ 'sections' => array(), // Need to put sections here for backwards compatibility
241
+ 'upsell' => true,
242
+ 'badge' => true,
243
+ ),
244
+ 'email_lock' => array(
245
+ 'title' => __( 'Email lock', 'download-monitor' ),
246
+ 'sections' => array(), // Need to put sections here for backwards compatibility
247
+ ),
248
+ 'twitter_lock' => array(
249
+ 'title' => __( 'Twitter lock', 'download-monitor' ),
250
+ 'sections' => array(), // Need to put sections here for backwards compatibility
251
+ ),
252
+ ),
253
+ ),
254
+ 'external_hosting' => array(
255
+ 'title' => esc_html__( 'External hosting', 'download-monitor' ),
256
+ 'sections' => array(
257
+ 'amazon_s3' => array(
258
+ 'title' => __( 'Amazon S3', 'download-monitor' ),
259
+ 'sections' => array(), // Need to put sections here for backwards compatibility
260
+ ),
261
+ 'google_drive' => array(
262
+ 'title' => __( 'Google Drive', 'download-monitor' ),
263
+ 'sections' => array(), // Need to put sections here for backwards compatibility
264
+ ),
265
+ ),
266
+ ),
267
+ 'advanced' => array(
268
+ 'title' => esc_html__( 'Advanced', 'download-monitor' ),
269
+ 'sections' => array(
270
+ 'page_addon' => array(
271
+ 'title' => __( 'Page Addon', 'download-monitor' ),
272
+ 'sections' => array(), // Need to put sections here for backwards compatibility
273
+ ),
274
+ 'downloading_page' => array(
275
+ 'title' => __( 'Downloading Page', 'download-monitor' ),
276
+ 'sections' => array(), // Need to put sections here for backwards compatibility
277
+ ),
278
+ 'captcha' => array(
279
+ 'title' => __( 'Captcha', 'download-monitor' ),
280
+ 'sections' => array(), // Need to put sections here for backwards compatibility
281
+ )
282
+ ),
283
+ ),
284
+ 'integration' => array(
285
+ 'title' => esc_html__( 'Integration', 'download-monitor' ),
286
+ 'sections' => array(
287
+ 'captcha' => array(
288
+ 'title' => __( 'Captcha', 'download-monitor' ),
289
+ 'sections' => array(), // Need to put sections here for backwards compatibility
290
+ )
291
+ ),
292
+ ),
293
+ )
294
+ );
295
+ }
296
+
297
+ /**
298
+ * Add PRO Tabs upsells
299
+ *
300
+ * @param $settings
301
+ *
302
+ * @return mixed
303
+ *
304
+ * @since 4.4.5
305
+ */
306
+ public function pro_tab_upsells( $settings ) {
307
+
308
+ foreach ( $this->upsell_tabs as $key => $tab ) {
309
+
310
+ if ( ! isset( $settings[ $key ] ) ) {
311
+
312
+ if ( ! isset( $settings[ $key ]['title'] ) ) {
313
+
314
+ $settings[ $key ]['title'] = $tab['title'];
315
+ }
316
+
317
+ foreach ( $tab['sections'] as $section_key => $section ) {
318
+
319
+ if ( ! isset( $settings[ $key ]['sections'][ $section_key ] ) ) {
320
+
321
+ $settings[ $key ]['sections'][ $section_key ] = $section;
322
+ $settings[ $key ]['sections'][ $section_key ]['upsell'] = true;
323
+ }
324
+ }
325
+ }
326
+ }
327
+
328
+ return $settings;
329
+
330
+ }
331
+
332
+ /**
333
+ * Add Upsell tabs content
334
+ *
335
+ * @since 4.4.5
336
+ */
337
+ public function set_upsell_actions() {
338
+
339
+ foreach ( $this->upsell_tabs as $key => $tab ) {
340
+
341
+ if ( method_exists( 'DLM_Upsells', 'upsell_tab_content_' . $key ) ) {
342
+ add_action( 'dlm_tab_content_' . $key, array( $this, 'upsell_tab_content_' . $key ), 30, 1 );
343
+ }
344
+
345
+ foreach ( $tab['sections'] as $sub_key => $section ) {
346
+ if ( method_exists( 'DLM_Upsells', 'upsell_tab_section_content_' . $sub_key ) ) {
347
+ add_action( 'dlm_tab_section_content_' . $sub_key, array( $this, 'upsell_tab_section_content_' . $sub_key ), 30, 1 );
348
+ }
349
+ }
350
+
351
+ }
352
+ }
353
+
354
+ /**
355
+ * Settings General tab upsell
356
+ *
357
+ *
358
+ * @since 4.4.5
359
+ */
360
+ public function general_tab_upsell() {
361
+
362
+ if ( ! $this->check_extension( 'dlm-download-duplicator' ) ) {
363
+
364
+ $this->generate_upsell_box(
365
+ __( 'Duplicate your downloads', 'download-monitor' ),
366
+ __( 'You’re one click away from duplicating downloads, including their data, versions, and files.', 'download-monitor' ),
367
+ 'general',
368
+ 'download-duplicator'
369
+ );
370
+ }
371
+
372
+ if ( ! $this->check_extension( 'dlm-email-notification' ) ) {
373
+
374
+ $this->generate_upsell_box(
375
+ __( 'Email notifications', 'download-monitor' ),
376
+ __( 'Create an email alert to be notified each time one of your files has been downloaded.', 'download-monitor' ),
377
+ 'general',
378
+ 'email-notification'
379
+ );
380
+ }
381
+
382
+ }
383
+
384
+ /**
385
+ * Settings Access tab upsell
386
+ *
387
+ *
388
+ * @since 4.4.5
389
+ */
390
+ public function access_tab_upsell() {
391
+
392
+ if ( ! $this->check_extension( 'dlm-advanced-access-manager' ) ) {
393
+
394
+ $this->generate_upsell_box(
395
+ __( 'Advanced access manager', 'download-monitor' ),
396
+ __( 'Limit access to your downloads by setting advanced access rules and restrictions with this extension.', 'download-monitor' ),
397
+ 'access',
398
+ 'advanced-access-manager'
399
+ );
400
+ }
401
+
402
+ if ( ! $this->check_extension( 'dlm-twitter-lock' ) ) {
403
+
404
+ $this->generate_upsell_box(
405
+ __( 'Twitter lock', 'download-monitor' ),
406
+ __( 'Allow your users to tweet a pre-defined text before accessing a download.', 'download-monitor' ),
407
+ 'access',
408
+ 'twitter-lock'
409
+ );
410
+ }
411
+
412
+ if ( ! $this->check_extension( 'dlm-email-lock' ) ) {
413
+
414
+ $this->generate_upsell_box(
415
+ __( 'Email Lock', 'download-monitor' ),
416
+ __( 'Require your users’ email addresses to send newsletters and create a list of your customers.', 'download-monitor' ),
417
+ 'access',
418
+ 'email-lock'
419
+ );
420
+ }
421
+
422
+ if ( ! $this->check_extension( 'dlm-gravity-forms' ) ) {
423
+
424
+ $this->generate_upsell_box(
425
+ __( 'Gravity Forms Lock', 'download-monitor' ),
426
+ __( 'Ask users to fill in a form created on Gravity Forms before they start downloading your files.', 'download-monitor' ),
427
+ 'access',
428
+ 'gravity-forms'
429
+ );
430
+ }
431
+
432
+ if ( ! $this->check_extension( 'dlm-ninja-forms' ) ) {
433
+
434
+ $this->generate_upsell_box(
435
+ __( 'Ninja Forms Lock', 'download-monitor' ),
436
+ __( 'Use the Ninja Forms - content locking extension to add forms easily to your download files.', 'download-monitor' ),
437
+ 'access',
438
+ 'ninja-forms'
439
+ );
440
+ }
441
+
442
+ if ( ! $this->check_extension( 'dlm-mailchimp-lock' ) ) {
443
+
444
+ $this->generate_upsell_box(
445
+ __( 'Mailchimp extension', 'download-monitor' ),
446
+ __( 'Create a MailChimp list and ask users to subscribe to it before accessing a downloadable file.', 'download-monitor' ),
447
+ 'access',
448
+ 'mailchimp-lock'
449
+ );
450
+ }
451
+
452
+ }
453
+
454
+ /**
455
+ * Settings Logging tab upsell
456
+ *
457
+ *
458
+ * @since 4.4.5
459
+ */
460
+ public function logging_tab_upsell() {
461
+
462
+ if ( ! $this->check_extension( 'dlm-captcha' ) ) {
463
+
464
+ $this->generate_upsell_box(
465
+ __( 'Captcha', 'download-monitor' ),
466
+ __( 'Stop bots from spamming your downloads and ask users to complete Google reCAPTCHA.', 'download-monitor' ),
467
+ 'logging',
468
+ 'captcha'
469
+ );
470
+ }
471
+
472
+ }
473
+
474
+ /**
475
+ * Settings Terms and conditions tab upsell
476
+ *
477
+ *
478
+ * @since 4.4.5
479
+ */
480
+ public function terms_and_conditions_tab_upsell() {
481
+
482
+ if ( ! $this->check_extension( 'dlm-terms-and-conditions' ) ) {
483
+
484
+ $this->generate_upsell_box(
485
+ __( 'Terms and conditions', 'download-monitor' ),
486
+ __( 'Require your users to accept your terms and conditions before they can download your files.', 'download-monitor' ),
487
+ 'terns_and_conditions',
488
+ 'terms-and-conditions'
489
+ );
490
+ }
491
+
492
+ }
493
+
494
+ /**
495
+ * Settings Emails tab upsell
496
+ *
497
+ *
498
+ * @since 4.4.5
499
+ */
500
+ public function emails_tab_upsell() {
501
+
502
+ if ( ! $this->check_extension( 'dlm-email-notification' ) ) {
503
+
504
+ $this->generate_upsell_box(
505
+ __( 'Email notifications', 'download-monitor' ),
506
+ __( 'The Email Notification extension for Download Monitor sends you an email whenever one of your files is downloaded', 'download-monitor' ),
507
+ 'email_notifications',
508
+ 'email-notifications'
509
+ );
510
+ }
511
+
512
+ }
513
+
514
+ /**
515
+ * Settings Logging tab upsell
516
+ *
517
+ *
518
+ * @since 4.4.5
519
+ */
520
+ public function pages_tab_upsell() {
521
+
522
+ if ( ! $this->check_extension( 'dlm-terms-conditions' ) ) {
523
+
524
+ $this->generate_upsell_box(
525
+ __( 'Terms & Conditions', 'download-monitor' ),
526
+ __( 'Easily require your visitors to agree to your terms and conditions before downloading files.', 'download-monitor' ),
527
+ 'pages',
528
+ 'terms-conditions'
529
+ );
530
+ }
531
+
532
+ if ( ! $this->check_extension( 'dlm-page-addon' ) ) {
533
+
534
+ $this->generate_upsell_box(
535
+ __( 'Page Addon', 'download-monitor' ),
536
+ __( 'List all downloads, categories, tags, and showcase info pages of each resource with a self-contained [download_page] shortcode!', 'download-monitor' ),
537
+ 'pages',
538
+ 'page-addon'
539
+ );
540
+ }
541
+
542
+ }
543
+
544
+ /**
545
+ * Settings Misc tab upsell
546
+ *
547
+ *
548
+ * @since 4.4.5
549
+ */
550
+ public function output_buttons_upsell() {
551
+
552
+ if ( ! $this->check_extension( 'dlm-buttons' ) ) {
553
+
554
+ $this->generate_upsell_box(
555
+ __( 'Buttons', 'download-monitor' ),
556
+ __( 'The Buttons extension allows you to customize your download buttons as you please in order to improve the user experience. Create stunning buttons without needing any coding skills!', 'download-monitor' ),
557
+ 'cpt',
558
+ 'buttons'
559
+ );
560
+ }
561
+
562
+ }
563
+
564
+ /**
565
+ * Settings Misc tab upsell
566
+ *
567
+ *
568
+ * @since 4.4.5
569
+ */
570
+ public function endpoint_tab_upsell() {
571
+
572
+ if ( ! $this->check_extension( 'dlm-csv-impoter' ) ) {
573
+
574
+ $this->generate_upsell_box(
575
+ __( 'Importer', 'download-monitor' ),
576
+ __( 'Easily import your downloads, including their categories, tags, and files.', 'download-monitor' ),
577
+ 'endpoint',
578
+ 'csv-impoter'
579
+ );
580
+ }
581
+
582
+ if ( ! $this->check_extension( 'dlm-csv-exporter' ) ) {
583
+
584
+ $this->generate_upsell_box(
585
+ __( 'Exporter', 'download-monitor' ),
586
+ __( 'With a single click, you can quickly export your downloads and their tags, categories, and file versions to a CSV file.', 'download-monitor' ),
587
+ 'endpoint',
588
+ 'csv-exporter'
589
+ );
590
+ }
591
+
592
+ }
593
+
594
+ /**
595
+ * Output the DLM Downloading Page extension upsell
596
+ *
597
+ * @since 4.4.5
598
+ */
599
+ public function output_download_page_upsell() {
600
+
601
+ if ( ! $this->check_extension( 'dlm-downloading-page' ) ) {
602
+
603
+ $this->generate_upsell_box(
604
+ '',
605
+ __( 'Customize the downloading page by adding banners, ads, and anything you like.', 'download-monitor' ),
606
+ 'downloading_page',
607
+ 'downloading-page'
608
+ );
609
+ }
610
+
611
+ }
612
+
613
+ /**
614
+ * Upsell for Gravity Forms sub-tab
615
+ *
616
+ * @since 4.5.3
617
+ */
618
+ public function upsell_tab_section_content_gravity_forms() {
619
+
620
+ if ( ! $this->check_extension( 'dlm-gravity-forms' ) ) {
621
+
622
+ $this->generate_upsell_box(
623
+ __( 'Gravity Forms Lock', 'download-monitor' ),
624
+ __( 'The Gravity Forms - content locking extension for Download Monitor allows you to require users to fill out a Gravity Forms form before they gain access to a download.', 'download-monitor' ),
625
+ 'gravity_forms',
626
+ 'gravity-forms'
627
+ );
628
+ }
629
+ }
630
+
631
+ /**
632
+ * Upsell for Ninja Forms sub-tab
633
+ *
634
+ * @since 4.5.3
635
+ */
636
+ public function upsell_tab_section_content_ninja_forms() {
637
+
638
+ if ( ! $this->check_extension( 'dlm-ninja-forms' ) ) {
639
+
640
+ $this->generate_upsell_box(
641
+ __( 'Ninja Forms Lock', 'download-monitor' ),
642
+ __( 'The Ninja Forms - content locking extension for Download Monitor allows you to require users to fill in a Ninja Forms form before they gain access to a download.','download-monitor' ),
643
+ 'ninja_forms',
644
+ 'ninja-forms'
645
+ );
646
+ }
647
+ }
648
+
649
+ /**
650
+ * Upsell for Twitter Lock sub-tab
651
+ *
652
+ * @since 4.5.3
653
+ */
654
+ public function upsell_tab_section_content_twitter_lock() {
655
+
656
+ if ( ! $this->check_extension( 'dlm-twitter-lock' ) ) {
657
+
658
+ $this->generate_upsell_box(
659
+ __( 'Twitter Lock', 'download-monitor' ),
660
+ __( 'The Twitter Lock extension for Download Monitor allows you to require users to tweet your pre-defined text before they gain access to a download.', 'download-monitor' ),
661
+ 'gravity_forms',
662
+ 'gravity-forms'
663
+ );
664
+ }
665
+ }
666
+
667
+ /**
668
+ * Upsell for Email Lock sub-tab
669
+ *
670
+ * @since 4.5.3
671
+ */
672
+ public function upsell_tab_section_content_email_lock() {
673
+
674
+ if ( ! $this->check_extension( 'dlm-email-lock' ) ) {
675
+
676
+ $this->generate_upsell_box(
677
+ __( 'Email Lock', 'download-monitor' ),
678
+ __( 'The Email Lock extension for Download Monitor allows you to require users to fill in their email address before they gain access to a download.', 'download-monitor' ),
679
+ 'email_lock',
680
+ 'email-lock'
681
+ );
682
+ }
683
+ }
684
+
685
+ /**
686
+ * Upsell for Amazon S3 setting sub-tab
687
+ *
688
+ * @since 4.5.3
689
+ */
690
+ public function upsell_tab_section_content_amazon_s3() {
691
+
692
+ if ( ! $this->check_extension( 'dlm-amazon-s3' ) ) {
693
+
694
+ $this->generate_upsell_box(
695
+ __( 'Amazon S3', 'download-monitor' ),
696
+ __( 'Link to files hosted on Amazon s3 so that you can serve secure, expiring download links.', 'download-monitor' ),
697
+ 'amazon_s3',
698
+ 'amazon-s3'
699
+ );
700
+ }
701
+
702
+ }
703
+
704
+ /**
705
+ * Upsell for Google Drive setting sub-tab
706
+ *
707
+ * @since 4.5.3
708
+ */
709
+ public function upsell_tab_section_content_google_drive() {
710
+
711
+ if ( ! $this->check_extension( 'dlm-google-drive' ) ) {
712
+
713
+ $this->generate_upsell_box(
714
+ __( 'Google Drive', 'download-monitor' ),
715
+ __( 'With this extension, you can integrate your files from Google Drive into Download Monitor.', 'download-monitor' ),
716
+ 'google_drive',
717
+ 'google-drive'
718
+ );
719
+ }
720
+
721
+ }
722
+
723
+
724
+ /**
725
+ * Upsell for Page Addon setting tab
726
+ *
727
+ * @since 4.4.5
728
+ */
729
+ public function upsell_tab_content_advanced() {
730
+
731
+ if ( ! $this->check_extension( 'dlm-page-addon' ) ) {
732
+
733
+ $this->generate_upsell_box(
734
+ __( 'Page addon extension', 'download-monitor' ),
735
+ __( 'Add a self contained [download_page] shortcode to your site to list downloads, categories, tags, and show info pages about each of your resources.', 'download-monitor' ),
736
+ 'page_addon',
737
+ 'page-addon'
738
+ );
739
+ }
740
+
741
+ if ( ! $this->check_extension( 'dlm-downloading-page' ) ) {
742
+
743
+ $this->generate_upsell_box(
744
+ __( 'Downloading page extension', 'download-monitor' ),
745
+ __( 'The Downloading Page extension for Download Monitor forces your downloads to be served from a separate page.', 'download-monitor' ),
746
+ 'downloading_page',
747
+ 'downloading-page'
748
+ );
749
+ }
750
+
751
+
752
+ }
753
+
754
+ /**
755
+ * Upsell for Captcha setting tab
756
+ *
757
+ * @since 4.4.5
758
+ */
759
+ public function upsell_tab_content_captcha() {
760
+
761
+ if ( ! $this->check_extension( 'dlm=captcha' ) ) {
762
+
763
+ $this->generate_upsell_box(
764
+ __( 'Captcha extension', 'download-monitor' ),
765
+ __( 'The Captcha extension for Download Monitor allows you to require users to complete a Google reCAPTCHA before they gain access to a download.', 'download-monitor' ),
766
+ 'captcha',
767
+ 'captcha'
768
+ );
769
+ }
770
+
771
+
772
+ }
773
+
774
+
775
+ /**
776
+ * Output the Downloadable Files locations in the Downloadable files metabox
777
+ *
778
+ * @param $download
779
+ *
780
+ * @since 4.4.5
781
+ */
782
+ public function files_metabox_upsells( $download ) {
783
+
784
+ echo '<div class="upsells-columns">';
785
+
786
+ if ( ! $this->check_extension( 'dlm-amazon-s3' ) ) {
787
+
788
+ echo '<div class="upsells-column"><span class="dashicons dashicons-amazon"></span>';
789
+ echo '<h3>' . esc_html__( 'Amazon S3', 'download-monitor' ) . '</h3>';
790
+ $this->generate_upsell_box(
791
+ '',
792
+ __( 'Use Amazon S3 links for Download Monitor files to run secure, expiring download links.', 'download-monitor' ),
793
+ 'amazon_s3',
794
+ 'amazon-s3'
795
+ );
796
+ echo '</div>';
797
+ }
798
+
799
+ if ( ! $this->check_extension( 'dlm-google-drive' ) ) {
800
+
801
+ echo '<div class="upsells-column"><span class="dashicons dashicons-google"></span>';
802
+ echo '<h3>' . esc_html__( 'Google Drive', 'download-monitor' ) . '</h3>';
803
+ $this->generate_upsell_box(
804
+ '',
805
+ __( 'With this extension, you can integrate your files from Google Drive into Download Monitor.', 'download-monitor' ),
806
+ 'google_drive',
807
+ 'google-drive'
808
+ );
809
+ echo '</div>';
810
+ }
811
+
812
+ echo '</div>';
813
+
814
+ }
815
+
816
+ /**
817
+ * Upsell for Integration tab
818
+ *
819
+ * @since 4.4.5
820
+ */
821
+ public function upsell_tab_content_integration() {
822
+
823
+ if ( ! $this->check_extension( 'dlm-captcha' ) ) {
824
+
825
+ $this->generate_upsell_box(
826
+ __( 'Captcha', 'download-monitor' ),
827
+ __( 'Stop bots from spamming your downloads and ask users to complete Google reCAPTCHA.', 'download-monitor' ),
828
+ 'logging',
829
+ 'captcha'
830
+ );
831
+ }
832
+
833
+ }
834
+
835
+ /**
836
+ * Add lite vs pro page in menu
837
+ *
838
+ * @param [type] $links
839
+ * @return void
840
+ */
841
+ public function add_lite_vs_pro_page( $links ) {
842
+
843
+ // Settings page
844
+ $links[] = array(
845
+ 'page_title' => __( 'LITE vs PRO', 'download-monitor' ),
846
+ 'menu_title' => __( 'LITE vs PRO', 'download-monitor' ),
847
+ 'capability' => 'manage_options',
848
+ 'menu_slug' => 'dlm-lite-vs-pro',
849
+ 'function' => array( $this, 'lits_vs_pro_page' ),
850
+ 'priority' => 160,
851
+ );
852
+
853
+ return $links;
854
+ }
855
+
856
+ /**
857
+ * The LITE vs PRO page
858
+ *
859
+ * @return void
860
+ */
861
+ public function lits_vs_pro_page() {
862
+
863
+ require_once __DIR__.'/lite-vs-pro-page.php';
864
+ }
865
+ }
866
+
867
  DLM_Upsells::get_instance();
includes/admin/lite-vs-pro-page.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Set the PROs
3
+ $pro_arguments = array(
4
+ 'twitter_lock' => array(
5
+ 'title' => esc_html__( 'Twitter lock', 'download-monitor' ),
6
+ 'description' => esc_html__( 'The Twitter Lock extension for Download Monitor allows you to require users to tweet your pre-defined text before they gain access to a download.', 'download-monitor' ),
7
+ ),
8
+ 'captcha' => array(
9
+ 'title' => esc_html__( 'Captcha', 'download-monitor' ),
10
+ 'description' => esc_html__( 'The Captcha extension for Download Monitor allows you to require users to complete a Google reCAPTCHA before they gain access to a download.', 'download-monitor' ),
11
+ ),
12
+ 'buttons' => array(
13
+ 'title' => esc_html__( 'Buttons', 'download-monitor' ),
14
+ 'description' => esc_html__( 'Create beautiful, fully customizable download buttons with our Buttons extension. No coding or file editing required!', 'download-monitor' ),
15
+ ),
16
+ 'terms_and_conditions' => array(
17
+ 'title' => esc_html__( 'Terms and conditions', 'download-monitor' ),
18
+ 'description' => esc_html__( 'Require your users to accept your terms and conditions before they can download your files.', 'download-monitor' ),
19
+ ),
20
+ 'download_duplicator' => array(
21
+ 'title' => esc_html__( 'Download Duplicator', 'download-monitor' ),
22
+ 'description' => esc_html__( 'Easily duplicate downloads including their data, versions and files with a single click.', 'download-monitor' ),
23
+ ),
24
+ 'email_ notification' => array(
25
+ 'title' => esc_html__( 'Email Notification', 'download-monitor' ),
26
+ 'description' => esc_html__( 'The Email Notification extension for Download Monitor sends you an email whenever one of your files is downloaded.', 'download-monitor' ),
27
+ ),
28
+ 'csv_importer' => array(
29
+ 'title' => esc_html__( 'CSV Importer', 'download-monitor' ),
30
+ 'description' => esc_html__( 'Mass import up to thousands of Downloads into Download Monitor with the CSV Importer.', 'download-monitor' ),
31
+ ),
32
+ 'csv_exporter' => array(
33
+ 'title' => esc_html__( 'CSV Exporter', 'download-monitor' ),
34
+ 'description' => esc_html__( 'Export all your downloads including categories, tags and file versions to a CSV file with a single click!', 'download-monitor' ),
35
+ ),
36
+ 'page_addon' => array(
37
+ 'title' => esc_html__( 'Page Addon', 'download-monitor' ),
38
+ 'description' => esc_html__( 'Add a self contained [download_page] shortcode to your site to list downloads, categories, tags, and show info pages about each of your resources.', 'download-monitor' ),
39
+ ),
40
+ 'downloading_page' => array(
41
+ 'title' => esc_html__( 'Downloading Page', 'download-monitor' ),
42
+ 'description' => esc_html__( 'The Downloading Page extension for Download Monitor forces your downloads to be served from a separate page.', 'download-monitor' ),
43
+ ),
44
+ 'amazon_s3' => array(
45
+ 'title' => esc_html__( 'Amazon S3', 'download-monitor' ),
46
+ 'description' => esc_html__( 'Link to files hosted on Amazon s3 so that you can serve secure, expiring download links.', 'download-monitor' ),
47
+ ),
48
+ 'google_drive' => array(
49
+ 'title' => esc_html__( 'Google Drive', 'download-monitor' ),
50
+ 'description' => esc_html__( 'Lets you use the files hosted on your Google Drive as Download Monitor files.', 'download-monitor' ),
51
+ ),
52
+ 'advanced_access_manager' => array(
53
+ 'title' => esc_html__( 'Advanced Access Manager', 'download-monitor' ),
54
+ 'description' => esc_html__( 'The Advanced Access Manager extension allows you to create advanced download limitations per download and on a global level.', 'download-monitor' ),
55
+ ),
56
+ 'nina_forms_lock' => array(
57
+ 'title' => esc_html__( 'Ninja Forms Lock', 'download-monitor' ),
58
+ 'description' => esc_html__( 'The Ninja Forms extension for Download Monitor allows you to require users to fill in a Ninja Forms form before they gain access to a download.', 'download-monitor' ),
59
+ ),
60
+ 'mailchimp_lock' => array(
61
+ 'title' => esc_html__( 'MailChimp Lock', 'download-monitor' ),
62
+ 'description' => esc_html__( 'The MailChimp Lock for Download Monitor allows you to require users to be subscribed to your MailChimp list before they gain access to a download.', 'download-monitor' ),
63
+ ),
64
+ 'gravity_forms_lock' => array(
65
+ 'title' => esc_html__( 'GravityForms Lock', 'download-monitor' ),
66
+ 'description' => esc_html__( 'The Gravity Forms extension for Download Monitor allows you to require users to fill out a Gravity Forms form before they gain access to a download.', 'download-monitor' ),
67
+ ),
68
+ 'email_lock' => array(
69
+ 'title' => esc_html__( 'Email Lock', 'download-monitor' ),
70
+ 'description' => esc_html__( 'The Email Lock extension for Download Monitor allows you to require users to fill in their email address before they gain access to a download.', 'download-monitor' ),
71
+ ),
72
+ );
73
+ ?>
74
+ <div class="wrap rsvp-lite-vs-premium">
75
+ <hr class="wp-header-end" />
76
+ <h1><?php echo esc_html__( 'LITE vs PRO', 'download-monitor' ); ?> </h1>
77
+ <div class="free-vs-premium">
78
+ <!-- Table header -->
79
+ <div class="wpchill-plans-table table-header">
80
+ <div class="wpchill-pricing-package wpchill-empty">
81
+ <!--This is an empty div so that we can have an empty corner-->
82
+ </div>
83
+ <div class="wpchill-pricing-package wpchill-title wpchill-modula-grid-gallery-business">
84
+ <p class="wpchill-name"><strong>PRO</strong></p>
85
+ </div>
86
+ <div class="wpchill-pricing-package wpchill-title wpchill-modula-lite">
87
+ <p class="wpchill-name"><strong>LITE</strong></p>
88
+ </div>
89
+ </div>
90
+ <!-- Table content -->
91
+
92
+ <?php
93
+ foreach( $pro_arguments as $pro ) {
94
+ ?>
95
+ <div class="wpchill-plans-table">
96
+ <div class="wpchill-pricing-package feature-name">
97
+ <h3><?php echo esc_html( $pro['title']); ?></h3>
98
+ <p class="tab-header-description modula-tooltip-content">
99
+ <?php echo esc_html( $pro['description'] ); ?>
100
+ </p>
101
+ </div>
102
+ <div class="wpchill-pricing-package">
103
+ <span class="dashicons dashicons-saved"></span>
104
+ </div>
105
+ <div class="wpchill-pricing-package">
106
+ <span class="dashicons dashicons-no-alt"></span>
107
+ </div>
108
+ </div>
109
+ <?php
110
+ }
111
+ ?>
112
+ <!-- Support -->
113
+ <div class="wpchill-plans-table">
114
+ <div class="wpchill-pricing-package feature-name">
115
+ <h3><?php esc_html_e( 'Support', 'download-monitor' ); ?></h3>
116
+ </div>
117
+ <div class="wpchill-pricing-package">Priority</div>
118
+ <div class="wpchill-pricing-package"><a href="https://wordpress.org/support/plugin/download-monitor/"
119
+ target="_blank">wp.org</a>
120
+ </div>
121
+ </div>
122
+ <!-- Table footer -->
123
+ <div class="wpchill-plans-table tabled-footer">
124
+ <div class="wpchill-pricing-package wpchill-empty">
125
+ <!--This is an empty div so that we can have an empty corner-->
126
+ </div>
127
+ <div class="wpchill-pricing-package wpchill-title wpchill-modula-grid-gallery-business">
128
+
129
+ <a href="https://www.download-monitor.com/pricing/?utm_source=download-monitor&utm_medium=lite-vs-pro&utm_campaign=upsell" target="_blank"
130
+ class="button button-primary button-hero "><span class="dashicons dashicons-cart"></span>
131
+ <?php esc_html_e( 'Upgrade now!', 'download-monitor' ); ?> </a>
132
+
133
+ </div>
134
+ <div class="wpchill-pricing-package wpchill-title wpchill-modula-lite">
135
+
136
+
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>
includes/admin/uninstall/class-dlm-uninstall.php CHANGED
@@ -1,272 +1,272 @@
1
- <?php
2
-
3
- class DLM_Uninstall {
4
-
5
- /**
6
- * Holds the class object.
7
- *
8
- * @since 4.4.5
9
- *
10
- * @var object
11
- */
12
- public static $instance;
13
-
14
- /**
15
- * @since 4.4.5
16
- * DLM_Uninstall constructor.
17
- *
18
- */
19
- function __construct() {
20
-
21
- // Deactivation
22
- add_filter( 'plugin_action_links_' . plugin_basename( DLM_PLUGIN_FILE ), array(
23
- $this,
24
- 'filter_action_links'
25
- ) );
26
-
27
- add_action( 'admin_footer-plugins.php', array( $this, 'add_uninstall_form' ), 16 );
28
- add_action( 'wp_ajax_dlm_uninstall_plugin', array( $this, 'dlm_uninstall_plugin' ) );
29
- add_action( 'admin_enqueue_scripts', array( $this, 'uninstall_scripts' ) );
30
- }
31
-
32
- /**
33
- * Enqueue uninstall scripts
34
- *
35
- * @since 4.4.5
36
- */
37
- public function uninstall_scripts() {
38
-
39
- $plugin_url = download_monitor()->get_plugin_url();
40
-
41
- $current_screen = get_current_screen();
42
- if ( in_array( $current_screen->base, array( 'plugins', 'plugins-network' ) ) ) {
43
- wp_enqueue_style( 'dlm-uninstall', $plugin_url . '/assets/css/dlm-uninstall.css' );
44
- wp_enqueue_script( 'dlm-uninstall', $plugin_url . '/assets/js/dlm-uninstall.js', array( 'jquery' ), DLM_VERSION, true );
45
- wp_localize_script( 'dlm-uninstall', 'wpDLMUninstall', array(
46
- 'redirect_url' => admin_url( '/plugins.php' ),
47
- 'nonce' => wp_create_nonce( 'dlm_uninstall_plugin' )
48
- ) );
49
- }
50
- }
51
-
52
- /**
53
- * Set uninstall link
54
- *
55
- * @param $links
56
- *
57
- * @return array
58
- *
59
- * @since 4.4.5
60
- */
61
- public function filter_action_links( $links ) {
62
-
63
- $links = array_merge( $links, array(
64
- '<a onclick="javascript:event.preventDefault();" id="dlm-uninstall-link" class="uninstall-dlm dlm-red-text" href="#">' . esc_html__( 'Uninstall', 'download-monitor' ) . '</a>',
65
- ) );
66
-
67
- return $links;
68
- }
69
-
70
- /**
71
- * Form text strings
72
- * These can be filtered
73
- *
74
- * @since 4.4.5
75
- */
76
- public function add_uninstall_form() {
77
-
78
- // Get our strings for the form
79
- $form = $this->get_form_info();
80
-
81
- ?>
82
- <div class="dlm-uninstall-form-bg">
83
- </div>
84
- <div class="dlm-uninstall-form-wrapper">
85
- <span class="dlm-uninstall-form" id="dlm-uninstall-form">
86
- <div class="dlm-uninstall-form-head">
87
- <h3><strong><?php echo esc_html( $form['heading'] ); ?></strong></h3>
88
- <i class="close-uninstall-form">X</i>
89
- </div>
90
- <div class="dlm-uninstall-form-body"><p><?php echo wp_kses_post( $form['body'] ); ?></p>
91
-
92
- <?php
93
- if ( is_array( $form['options'] ) ) {
94
- ?>
95
- <div class="dlm-uninstall-options">
96
- <?php
97
- foreach ( $form['options'] as $key => $option ) {
98
-
99
- $before_input = '';
100
- $after_input = '';
101
- if ( 'delete_all' == $key ) {
102
- $before_input = '<strong class="dlm-red-text">';
103
- $after_input = '</strong>';
104
- }
105
-
106
- echo ' <p><input type="checkbox" name="' . esc_attr( $key ) . ' " id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . wp_kses_post( $before_input ) . esc_attr( $option['label'] ) . wp_kses_post( $after_input ) . '</label><p class="description">' . esc_html( $option['description'] ) . '</p><br>';
107
- }
108
- ?>
109
- </div><!-- .dlm-uninstall-options -->
110
- <?php } ?>
111
-
112
- </div><!-- .dlm-uninstall-form-body -->
113
- <p class="deactivating-spinner"><span
114
- class="spinner"></span><?php echo esc_html__( 'Cleaning...', 'download-monitor' ); ?></p>
115
- <div class="uninstall">
116
- <p>
117
- <a id="dlm-uninstall-submit-form" class="button button-primary"
118
- href="#"><?php echo esc_html__( 'Uninstall', 'download-monitor' ); ?></a>
119
- </p>
120
- </div>
121
- </span>
122
- </div>
123
- <?php
124
- }
125
-
126
- /**
127
- * Form text strings
128
- *
129
- * These are non-filterable and used as fallback in case filtered strings aren't set correctly
130
- *
131
- * @since 4.4.5
132
- */
133
- public function get_form_info() {
134
- $form = array();
135
- $form['heading'] = esc_html__( 'Sorry to see you go', 'download-monitor' );
136
- $form['body'] = '<strong class="dlm-red-text">' . esc_html__( ' Caution!! This action CANNOT be undone', 'download-monitor' ) . '</strong>';
137
- $form['options'] = apply_filters( 'dlm_uninstall_options', array(
138
- 'delete_all' => array(
139
- 'label' => esc_html__( 'Delete all data', 'download-monitor' ),
140
- 'description' => esc_html__( 'Select this to delete all data Download Monitor plugin and it\'s add-ons have set in your database.', 'download-monitor' )
141
- ),
142
- 'delete_options' => array(
143
- 'label' => esc_html__( 'Delete Download Monitor\'s options', 'download-monitor' ),
144
- 'description' => esc_html__( 'Delete options set by Download Monitor plugin and it\'s add-ons to options table in the database.', 'download-monitor' )
145
- ),
146
- 'delete_transients' => array(
147
- 'label' => esc_html__( 'Delete Download Monitor set transients', 'download-monitor' ),
148
- 'description' => esc_html__( 'Delete transients set by Download Monitor plugin and it\'s add-ons to options table in the database.', 'download-monitor' )
149
- ),
150
- 'delete_cpt' => array(
151
- 'label' => esc_html__( 'Delete dlm_download custom post type', 'download-monitor' ),
152
- 'description' => esc_html__( 'Delete custom post types set by Download Monitor plugin and it\'s add-ons in the database.', 'download-monitor' )
153
- ),
154
- 'delete_set_tables' => array(
155
- 'label' => esc_html__( 'Delete set tables ', 'download-monitor' ),
156
- 'description' => esc_html__( 'Delete tables set by plugin ( Ex.: Logs table )', 'download-monitor' )
157
- )
158
- ) );
159
-
160
- return $form;
161
- }
162
-
163
- /**
164
- * @since 2.2.4
165
- * DLM Uninstall procedure
166
- */
167
- public function dlm_uninstall_plugin() {
168
-
169
- global $wpdb;
170
- check_ajax_referer( 'dlm_uninstall_plugin', 'security' );
171
-
172
- // we can't unslash an array
173
- $uninstall_option = isset( $_POST['options'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['options'] ) ) : false;
174
-
175
- // Delete options
176
- if ( '1' == $uninstall_option['delete_options'] ) {
177
-
178
- /**
179
- * Remove all options that have our dlm_ prefix
180
- */
181
- $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE 'dlm_%';" );
182
-
183
- // filter for options to be added by Download Monitor's add-ons
184
- $options_array = apply_filters( 'dlm_uninstall_db_options', array() );
185
-
186
- foreach ( $options_array as $db_option ) {
187
- delete_option( $db_option );
188
- }
189
-
190
- }
191
-
192
- // Delete transients
193
- if ( '1' == $uninstall_option['delete_transients'] ) {
194
-
195
- /**
196
- * Remove all DLM transients that have our dlm_ prefix
197
- */
198
- $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE '_transient_timeout_dlm_%';" );
199
- $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE '_transient_dlm_%';" );
200
-
201
- // filter for transients to be added by Download Monitor's add-ons
202
- $transients_array = apply_filters( 'dlm_uninstall_transients', array() );
203
-
204
- foreach ( $transients_array as $db_transient ) {
205
- delete_transient( $db_transient );
206
- }
207
-
208
- }
209
-
210
- // Delete custom post type
211
- if ( '1' == $uninstall_option['delete_cpt'] ) {
212
-
213
- $post_types = apply_filters( 'dlm_uninstall_post_types', array( 'dlm_download' ) );
214
-
215
- $dlm_cpts = get_posts( array( 'post_type' => $post_types, 'posts_per_page' => - 1, 'fields' => 'ids' ) );
216
-
217
-
218
- if ( is_array( $dlm_cpts ) && ! empty( $dlm_cpts ) ) {
219
-
220
- $id_in = implode( ',', $dlm_cpts );
221
-
222
- $sql = $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID IN ( $id_in )" );
223
- $sql_meta = $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id IN ( $id_in )" );
224
- $wpdb->query( $sql );
225
- $wpdb->query( $sql_meta );
226
- }
227
- }
228
-
229
- // Delete tables set by the plugin
230
- if ( '1' == $uninstall_option['delete_set_tables'] ) {
231
-
232
- $dlm_tables = apply_filters( 'dlm_uninstall_db_tables', array( $wpdb->prefix . "download_log" ) );
233
-
234
- if ( ! empty( $dlm_tables ) ) {
235
-
236
- foreach ( $dlm_tables as $table ) {
237
-
238
- $sql_dlm_table = $wpdb->prepare( "DROP TABLE IF EXISTS $table" );
239
-
240
- $wpdb->query( $sql_dlm_table );
241
- }
242
- }
243
-
244
-
245
- }
246
-
247
- do_action( 'dlm_uninstall' );
248
-
249
- deactivate_plugins( DLM_PLUGIN_FILE );
250
- wp_die();
251
- }
252
-
253
- /**
254
- * Returns the singleton instance of the class.
255
- *
256
- * @return object The DLM_Uninstall object.
257
- *
258
- * @since 4.4.5
259
- */
260
- public static function get_instance() {
261
-
262
- if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DLM_Uninstall ) ) {
263
- self::$instance = new DLM_Uninstall();
264
- }
265
-
266
- return self::$instance;
267
-
268
- }
269
-
270
- }
271
-
272
  DLM_Uninstall::get_instance();
1
+ <?php
2
+
3
+ class DLM_Uninstall {
4
+
5
+ /**
6
+ * Holds the class object.
7
+ *
8
+ * @since 4.4.5
9
+ *
10
+ * @var object
11
+ */
12
+ public static $instance;
13
+
14
+ /**
15
+ * @since 4.4.5
16
+ * DLM_Uninstall constructor.
17
+ *
18
+ */
19
+ function __construct() {
20
+
21
+ // Deactivation
22
+ add_filter( 'plugin_action_links_' . plugin_basename( DLM_PLUGIN_FILE ), array(
23
+ $this,
24
+ 'filter_action_links'
25
+ ) );
26
+
27
+ add_action( 'admin_footer-plugins.php', array( $this, 'add_uninstall_form' ), 16 );
28
+ add_action( 'wp_ajax_dlm_uninstall_plugin', array( $this, 'dlm_uninstall_plugin' ) );
29
+ add_action( 'admin_enqueue_scripts', array( $this, 'uninstall_scripts' ) );
30
+ }
31
+
32
+ /**
33
+ * Enqueue uninstall scripts
34
+ *
35
+ * @since 4.4.5
36
+ */
37
+ public function uninstall_scripts() {
38
+
39
+ $plugin_url = download_monitor()->get_plugin_url();
40
+
41
+ $current_screen = get_current_screen();
42
+ if ( in_array( $current_screen->base, array( 'plugins', 'plugins-network' ) ) ) {
43
+ wp_enqueue_style( 'dlm-uninstall', $plugin_url . '/assets/css/dlm-uninstall.css' );
44
+ wp_enqueue_script( 'dlm-uninstall', $plugin_url . '/assets/js/dlm-uninstall.js', array( 'jquery' ), DLM_VERSION, true );
45
+ wp_localize_script( 'dlm-uninstall', 'wpDLMUninstall', array(
46
+ 'redirect_url' => admin_url( '/plugins.php' ),
47
+ 'nonce' => wp_create_nonce( 'dlm_uninstall_plugin' )
48
+ ) );
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Set uninstall link
54
+ *
55
+ * @param $links
56
+ *
57
+ * @return array
58
+ *
59
+ * @since 4.4.5
60
+ */
61
+ public function filter_action_links( $links ) {
62
+
63
+ $links = array_merge( $links, array(
64
+ '<a onclick="javascript:event.preventDefault();" id="dlm-uninstall-link" class="uninstall-dlm dlm-red-text" href="#">' . esc_html__( 'Uninstall', 'download-monitor' ) . '</a>',
65
+ ) );
66
+
67
+ return $links;
68
+ }
69
+
70
+ /**
71
+ * Form text strings
72
+ * These can be filtered
73
+ *
74
+ * @since 4.4.5
75
+ */
76
+ public function add_uninstall_form() {
77
+
78
+ // Get our strings for the form
79
+ $form = $this->get_form_info();
80
+
81
+ ?>
82
+ <div class="dlm-uninstall-form-bg">
83
+ </div>
84
+ <div class="dlm-uninstall-form-wrapper">
85
+ <span class="dlm-uninstall-form" id="dlm-uninstall-form">
86
+ <div class="dlm-uninstall-form-head">
87
+ <h3><strong><?php echo esc_html( $form['heading'] ); ?></strong></h3>
88
+ <i class="close-uninstall-form">X</i>
89
+ </div>
90
+ <div class="dlm-uninstall-form-body"><p><?php echo wp_kses_post( $form['body'] ); ?></p>
91
+
92
+ <?php
93
+ if ( is_array( $form['options'] ) ) {
94
+ ?>
95
+ <div class="dlm-uninstall-options">
96
+ <?php
97
+ foreach ( $form['options'] as $key => $option ) {
98
+
99
+ $before_input = '';
100
+ $after_input = '';
101
+ if ( 'delete_all' == $key ) {
102
+ $before_input = '<strong class="dlm-red-text">';
103
+ $after_input = '</strong>';
104
+ }
105
+
106
+ echo ' <p><input type="checkbox" name="' . esc_attr( $key ) . ' " id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . wp_kses_post( $before_input ) . esc_attr( $option['label'] ) . wp_kses_post( $after_input ) . '</label><p class="description">' . esc_html( $option['description'] ) . '</p><br>';
107
+ }
108
+ ?>
109
+ </div><!-- .dlm-uninstall-options -->
110
+ <?php } ?>
111
+
112
+ </div><!-- .dlm-uninstall-form-body -->
113
+ <p class="deactivating-spinner"><span
114
+ class="spinner"></span><?php echo esc_html__( 'Cleaning...', 'download-monitor' ); ?></p>
115
+ <div class="uninstall">
116
+ <p>
117
+ <a id="dlm-uninstall-submit-form" class="button button-primary"
118
+ href="#"><?php echo esc_html__( 'Uninstall', 'download-monitor' ); ?></a>
119
+ </p>
120
+ </div>
121
+ </span>
122
+ </div>
123
+ <?php
124
+ }
125
+
126
+ /**
127
+ * Form text strings
128
+ *
129
+ * These are non-filterable and used as fallback in case filtered strings aren't set correctly
130
+ *
131
+ * @since 4.4.5
132
+ */
133
+ public function get_form_info() {
134
+ $form = array();
135
+ $form['heading'] = esc_html__( 'Sorry to see you go', 'download-monitor' );
136
+ $form['body'] = '<strong class="dlm-red-text">' . esc_html__( ' Caution!! This action CANNOT be undone', 'download-monitor' ) . '</strong>';
137
+ $form['options'] = apply_filters( 'dlm_uninstall_options', array(
138
+ 'delete_all' => array(
139
+ 'label' => esc_html__( 'Delete all data', 'download-monitor' ),
140
+ 'description' => esc_html__( 'Select this to delete all data Download Monitor plugin and it\'s add-ons have set in your database.', 'download-monitor' )
141
+ ),
142
+ 'delete_options' => array(
143
+ 'label' => esc_html__( 'Delete Download Monitor\'s options', 'download-monitor' ),
144
+ 'description' => esc_html__( 'Delete options set by Download Monitor plugin and it\'s add-ons to options table in the database.', 'download-monitor' )
145
+ ),
146
+ 'delete_transients' => array(
147
+ 'label' => esc_html__( 'Delete Download Monitor set transients', 'download-monitor' ),
148
+ 'description' => esc_html__( 'Delete transients set by Download Monitor plugin and it\'s add-ons to options table in the database.', 'download-monitor' )
149
+ ),
150
+ 'delete_cpt' => array(
151
+ 'label' => esc_html__( 'Delete dlm_download custom post type', 'download-monitor' ),
152
+ 'description' => esc_html__( 'Delete custom post types set by Download Monitor plugin and it\'s add-ons in the database.', 'download-monitor' )
153
+ ),
154
+ 'delete_set_tables' => array(
155
+ 'label' => esc_html__( 'Delete set tables ', 'download-monitor' ),
156
+ 'description' => esc_html__( 'Delete tables set by plugin ( Ex.: Logs table )', 'download-monitor' )
157
+ )
158
+ ) );
159
+
160
+ return $form;
161
+ }
162
+
163
+ /**
164
+ * @since 2.2.4
165
+ * DLM Uninstall procedure
166
+ */
167
+ public function dlm_uninstall_plugin() {
168
+
169
+ global $wpdb;
170
+ check_ajax_referer( 'dlm_uninstall_plugin', 'security' );
171
+
172
+ // we can't unslash an array
173
+ $uninstall_option = isset( $_POST['options'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['options'] ) ) : false;
174
+
175
+ // Delete options
176
+ if ( '1' == $uninstall_option['delete_options'] ) {
177
+
178
+ /**
179
+ * Remove all options that have our dlm_ prefix
180
+ */
181
+ $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE 'dlm_%';" );
182
+
183
+ // filter for options to be added by Download Monitor's add-ons
184
+ $options_array = apply_filters( 'dlm_uninstall_db_options', array() );
185
+
186
+ foreach ( $options_array as $db_option ) {
187
+ delete_option( $db_option );
188
+ }
189
+
190
+ }
191
+
192
+ // Delete transients
193
+ if ( '1' == $uninstall_option['delete_transients'] ) {
194
+
195
+ /**
196
+ * Remove all DLM transients that have our dlm_ prefix
197
+ */
198
+ $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE '_transient_timeout_dlm_%';" );
199
+ $wpdb->query( "DELETE FROM {$wpdb->options} WHERE `option_name` LIKE '_transient_dlm_%';" );
200
+
201
+ // filter for transients to be added by Download Monitor's add-ons
202
+ $transients_array = apply_filters( 'dlm_uninstall_transients', array() );
203
+
204
+ foreach ( $transients_array as $db_transient ) {
205
+ delete_transient( $db_transient );
206
+ }
207
+
208
+ }
209
+
210
+ // Delete custom post type
211
+ if ( '1' == $uninstall_option['delete_cpt'] ) {
212
+
213
+ $post_types = apply_filters( 'dlm_uninstall_post_types', array( 'dlm_download' ) );
214
+
215
+ $dlm_cpts = get_posts( array( 'post_type' => $post_types, 'posts_per_page' => - 1, 'fields' => 'ids' ) );
216
+
217
+
218
+ if ( is_array( $dlm_cpts ) && ! empty( $dlm_cpts ) ) {
219
+
220
+ $id_in = implode( ',', $dlm_cpts );
221
+
222
+ $sql = $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID IN ( $id_in )" );
223
+ $sql_meta = $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id IN ( $id_in )" );
224
+ $wpdb->query( $sql );
225
+ $wpdb->query( $sql_meta );
226
+ }
227
+ }
228
+
229
+ // Delete tables set by the plugin
230
+ if ( '1' == $uninstall_option['delete_set_tables'] ) {
231
+
232
+ $dlm_tables = apply_filters( 'dlm_uninstall_db_tables', array( $wpdb->prefix . "download_log" ) );
233
+
234
+ if ( ! empty( $dlm_tables ) ) {
235
+
236
+ foreach ( $dlm_tables as $table ) {
237
+
238
+ $sql_dlm_table = $wpdb->prepare( "DROP TABLE IF EXISTS $table" );
239
+
240
+ $wpdb->query( $sql_dlm_table );
241
+ }
242
+ }
243
+
244
+
245
+ }
246
+
247
+ do_action( 'dlm_uninstall' );
248
+
249
+ deactivate_plugins( DLM_PLUGIN_FILE );
250
+ wp_die();
251
+ }
252
+
253
+ /**
254
+ * Returns the singleton instance of the class.
255
+ *
256
+ * @return object The DLM_Uninstall object.
257
+ *
258
+ * @since 4.4.5
259
+ */
260
+ public static function get_instance() {
261
+
262
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof DLM_Uninstall ) ) {
263
+ self::$instance = new DLM_Uninstall();
264
+ }
265
+
266
+ return self::$instance;
267
+
268
+ }
269
+
270
+ }
271
+
272
  DLM_Uninstall::get_instance();
includes/tracking/class-download-monitor-usage-tracker.php CHANGED
@@ -1,1302 +1,1301 @@
1
- <?php
2
- /**
3
- * This is the class that sends all the data back to the home site
4
- * It also handles opting in and deactivation
5
- *
6
- * @version 1.2.5
7
- *
8
- * @package dlm
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- if ( ! class_exists( 'Download_Monitor_Usage_Tracker' ) ) {
17
-
18
- /**
19
- * Main class for our usage tracker
20
- */
21
- class Download_Monitor_Usage_Tracker {
22
-
23
- /**
24
- * Current wisdom plugin version.
25
- *
26
- * @var string
27
- */
28
-
29
- private $wisdom_version = '1.2.4';
30
-
31
- /**
32
- * Receiver url
33
- *
34
- * @var string
35
- */
36
- private $home_url = '';
37
-
38
- /**
39
- * File path for plugin
40
- *
41
- * @var string
42
- */
43
- private $plugin_file = '';
44
-
45
- /**
46
- * Plugin name
47
- *
48
- * @var string
49
- */
50
- private $plugin_name = '';
51
-
52
- /**
53
- * Plugin options to track
54
- *
55
- * @var array
56
- */
57
- private $options = array();
58
-
59
- /**
60
- * Where user opt-in is requireed
61
- *
62
- * @var bool
63
- */
64
- private $require_optin = true;
65
-
66
- /**
67
- * Whether to include a for when the user deactivates
68
- *
69
- * @var bool
70
- */
71
- private $include_goodbye_form = true;
72
-
73
- /**
74
- * Marketing method:
75
- * 0: Don't collect email addresses
76
- * 1: Request permission same time as tracking opt-in
77
- * 2: Request permission after opt-in
78
- *
79
- * @var bool
80
- */
81
- private $marketing = false;
82
-
83
- /**
84
- * Collect email
85
- *
86
- * @var bool
87
- */
88
- private $collect_email = false;
89
-
90
- /**
91
- * Tracking object
92
- *
93
- * @var string
94
- */
95
- private $what_am_i = 'plugin';
96
-
97
- /**
98
- * If theme and tracking
99
- *
100
- * @var bool
101
- */
102
- private $theme_allows_tracking = 0;
103
-
104
- /**
105
- * Tracking object
106
- *
107
- * @var string
108
- */
109
- private $active_plugins = array();
110
-
111
- /**
112
- * Main construct function for our class
113
- *
114
- * @param string $_plugin_file plugin file.
115
- * @param string $_home_url homepage url.
116
- * @param array $_options array.
117
- * @param bool $_require_optin defaults to true.
118
- * @param bool $_include_goodbye_form defaults to true.
119
- * @param bool $_marketing defauts to false.
120
- */
121
- public function __construct(
122
- $_plugin_file,
123
- $_home_url,
124
- $_options,
125
- $_require_optin = true,
126
- $_include_goodbye_form = true,
127
- $_marketing = false ) {
128
-
129
- $this->plugin_file = $_plugin_file;
130
- $this->home_url = trailingslashit( $_home_url );
131
-
132
- // If the filename is 'functions' then we're tracking a theme.
133
- if ( basename( $this->plugin_file, '.php' ) != 'functions' ) {
134
- $this->plugin_name = 'download-monitor';
135
- }
136
-
137
- $this->options = $_options;
138
- $this->require_optin = $_require_optin;
139
- $this->include_goodbye_form = $_include_goodbye_form;
140
- $this->marketing = $_marketing;
141
-
142
- $this->active_plugins = get_option( 'active_plugins', array() );
143
-
144
-
145
- register_activation_hook( $this->plugin_file, array( $this, 'schedule_tracking' ) );
146
- register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate_this_plugin' ) );
147
-
148
- // Get it going.
149
- $this->init();
150
-
151
- }
152
-
153
- /**
154
- * Init function hooked to construct.
155
- */
156
- public function init() {
157
-
158
- // Check marketing.
159
- if ( 3 === $this->marketing ) {
160
- $this->set_can_collect_email( true, $this->plugin_name );
161
- }
162
-
163
- // Check whether opt-in is required.
164
- // If not, then tracking is allowed.
165
- if ( ! $this->require_optin ) {
166
- $this->set_can_collect_email( true, $this->plugin_name );
167
- $this->set_is_tracking_allowed( true );
168
- $this->update_block_notice();
169
- $this->do_tracking();
170
- }
171
-
172
- // Hook our do_tracking function to the weekly action.
173
- add_filter( 'cron_schedules', array( $this, 'schedule_weekly_event' ) );
174
- // It's called weekly, but in fact it could be daily, weekly or monthly.
175
- add_action( 'wpchill_do_weekly_action', array( $this, 'do_tracking' ) );
176
-
177
- // Use this action for local testing.
178
- //add_action( 'admin_init', array( $this, 'do_tracking' ) );
179
-
180
- // Display the admin notice on activation.
181
- add_action( 'admin_init', array( $this, 'set_notification_time' ) );
182
- add_action( 'admin_notices', array( $this, 'optin_notice' ) );
183
- add_action( 'admin_notices', array( $this, 'marketing_notice' ) );
184
-
185
- // Deactivation.
186
- add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
187
- add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
188
- add_action( 'wp_ajax_'.$this->plugin_name.'_goodbye_form', array( $this, 'goodbye_form_callback' ) );
189
-
190
- add_filter( 'dlm_uninstall_db_options', array( $this, 'uninstall_options' ) );
191
-
192
- add_filter( 'dlm_settings', array( $this, 'optin_tracking' ), 30, 1 );
193
-
194
- add_filter( 'dlm_settings_defaults', array( $this, 'default_tracking' ) );
195
-
196
- }
197
-
198
- /**
199
- * When the plugin is activated
200
- * Create scheduled event
201
- * And check if tracking is enabled - perhaps the plugin has been reactivated
202
- *
203
- * @since 1.0.0
204
- */
205
- public function schedule_tracking() {
206
- if ( ! wp_next_scheduled( 'wpchill_do_weekly_action' ) ) {
207
- $schedule = $this->get_schedule();
208
- wp_schedule_event( time(), $schedule, 'wpchill_do_weekly_action' );
209
- }
210
- $this->do_tracking();
211
- }
212
-
213
- /**
214
- * Create weekly schedule.
215
- *
216
- * @param array $schedules schedules intervals.
217
- *
218
- * @since 1.2.3
219
- */
220
- public function schedule_weekly_event( $schedules ) {
221
- $schedules['weekly'] = array(
222
- 'interval' => 604800,
223
- 'display' => __( 'Once Weekly' ),
224
- );
225
- $schedules['monthly'] = array(
226
- 'interval' => 2635200,
227
- 'display' => __( 'Once Monthly' ),
228
- );
229
- return $schedules;
230
- }
231
-
232
- /**
233
- * Get how frequently data is tracked back
234
- *
235
- * @since 1.2.3
236
- */
237
- public function get_schedule() {
238
- // Could be daily, weekly or monthly.
239
- $schedule = apply_filters( 'wisdom_filter_schedule_' . $this->plugin_name, 'monthly' );
240
- return $schedule;
241
- }
242
-
243
- /**
244
- * This is our function to get everything going
245
- * Check that user has opted in
246
- * Collect data
247
- * Then send it back
248
- *
249
- * // FOR TESTING PURPOSES FORCE IS SET TO TRUE. BY DEFAULT IT IS FALSE .
250
- *
251
- * @since 1.0.0
252
- */
253
- public function do_tracking() {
254
-
255
- // If the home site hasn't been defined, we just drop out. Nothing much we can do.
256
- if ( ! $this->home_url ) {
257
- return;
258
- }
259
-
260
- // Check to see if the user has opted in to tracking.
261
- if ( ! $this->get_is_tracking_allowed() ) {
262
- return;
263
- }
264
-
265
- $this->set_admin_email();
266
-
267
- // Get our data.
268
- $body = $this->get_data();
269
-
270
- // Send the data.
271
- $this->send_data( $body );
272
-
273
- }
274
-
275
-
276
- /**
277
- * Send the data to the home site
278
- *
279
- * @since 1.0.0
280
- *
281
- * @param array $body body of the post.
282
- */
283
- public function send_data( $body ) {
284
-
285
- $request = wp_remote_post(
286
- esc_url( $this->home_url . '?usage_tracker=hello' ),
287
- array(
288
- 'method' => 'POST',
289
- 'timeout' => 20,
290
- 'redirection' => 5,
291
- 'httpversion' => '1.1',
292
- 'blocking' => true,
293
- 'body' => $body,
294
- 'user-agent' => 'PUT/1.0.0; ' . home_url(),
295
- )
296
- );
297
-
298
- $this->set_track_time();
299
-
300
- if ( is_wp_error( $request ) ) {
301
- return $request;
302
- }
303
-
304
- }
305
-
306
- /**
307
- * Here we collect most of the data
308
- *
309
- * @since 1.0.0
310
- */
311
- public function get_data() {
312
-
313
- // Use this to pass error messages back if necessary.
314
- $body['message'] = '';
315
-
316
- // Use this array to send data back.
317
- $body = array(
318
- 'plugin_slug' => sanitize_text_field( $this->plugin_name ),
319
- 'url' => home_url(),
320
- 'site_name' => get_bloginfo( 'name' ),
321
- 'site_version' => get_bloginfo( 'version' ),
322
- 'site_language' => get_bloginfo( 'language' ),
323
- 'charset' => get_bloginfo( 'charset' ),
324
- 'wisdom_version' => $this->wisdom_version,
325
- 'php_version' => ( defined( 'PHP_VERSION' ) ) ? PHP_VERSION : phpversion(),
326
- 'multisite' => is_multisite(),
327
- 'file_location' => __FILE__,
328
- 'product_type' => esc_html( $this->what_am_i ),
329
- );
330
-
331
- // Collect the email if the correct option has been set.
332
- if ( $this->get_can_collect_email() ) {
333
- $body['email'] = $this->get_admin_email();
334
- }
335
- $body['marketing_method'] = $this->marketing;
336
-
337
- $body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash($_SERVER['SERVER_SOFTWARE']) ) : '';
338
-
339
- // Extra PHP fields.
340
- $body['memory_limit'] = ini_get( 'memory_limit' );
341
- $body['upload_max_size'] = ini_get( 'upload_max_size' );
342
- $body['post_max_size'] = ini_get( 'post_max_size' );
343
- $body['upload_max_filesize'] = ini_get( 'upload_max_filesize' );
344
- $body['max_execution_time'] = ini_get( 'max_execution_time' );
345
- $body['max_input_time'] = ini_get( 'max_input_time' );
346
-
347
- // Retrieve current plugin information.
348
- if ( ! function_exists( 'get_plugins' ) ) {
349
- include ABSPATH . '/wp-admin/includes/plugin.php';
350
- }
351
-
352
- $plugins = array_keys( get_plugins() );
353
-
354
- foreach ( $plugins as $key => $plugin ) {
355
- if ( in_array( $plugin, $this->active_plugins ) ) {
356
- // Remove active plugins from list so we can show active and inactive separately.
357
- unset( $plugins[ $key ] );
358
- }
359
- }
360
-
361
- $body['active_plugins'] = $this->active_plugins;
362
- $body['inactive_plugins'] = $plugins;
363
-
364
- // Check text direction.
365
- $body['text_direction'] = 'LTR';
366
- if ( function_exists( 'is_rtl' ) ) {
367
- if ( is_rtl() ) {
368
- $body['text_direction'] = 'RTL';
369
- }
370
- } else {
371
- $body['text_direction'] = 'not set';
372
- }
373
-
374
- /**
375
- * Get our plugin data
376
- * Currently we grab plugin name and version
377
- * Or, return a message if the plugin data is not available
378
- *
379
- * @since 1.0.0
380
- */
381
- $plugin = $this->plugin_data();
382
- $body['status'] = 'Active'; // Never translated.
383
- if ( empty( $plugin ) ) {
384
- // We can't find the plugin data.
385
- // Send a message back to our home site.
386
- $body['message'] .= esc_html( 'We can\'t detect any product information. This is most probably because you have not included the code snippet.');
387
- $body['status'] = 'Data not found'; // Never translated.
388
- } else {
389
- if ( isset( $plugin['Name'] ) ) {
390
- $body['plugin'] = sanitize_text_field( $plugin['Name'] );
391
- }
392
- if ( isset( $plugin['Version'] ) ) {
393
- $body['version'] = sanitize_text_field( $plugin['Version'] );
394
- }
395
- }
396
-
397
- /**
398
- * Get our plugin options
399
- *
400
- * @since 1.0.0
401
- */
402
- $options = $this->options;
403
- $plugin_options = array();
404
- if ( ! empty( $options ) && is_array( $options ) ) {
405
- foreach ( $options as $option ) {
406
- $fields = get_option( $option );
407
- // Check for permission to send this option.
408
- if ( isset( $fields['wisdom_registered_setting'] ) ) {
409
- foreach ( $fields as $key => $value ) {
410
- $plugin_options[ $key ] = $value;
411
- }
412
- }
413
- }
414
- }
415
- $body['plugin_options'] = $this->options; // Returns array.
416
- $body['plugin_options_fields'] = $plugin_options; // Returns object.
417
-
418
- /**
419
- * Get our theme data
420
- * Currently we grab theme name and version
421
- *
422
- * @since 1.0.0
423
- */
424
- $theme = wp_get_theme();
425
- if ( $theme->Name ) {
426
- $body['theme'] = sanitize_text_field( $theme->Name );
427
- }
428
- if ( $theme->Version ) {
429
- $body['theme_version'] = sanitize_text_field( $theme->Version );
430
- }
431
- if ( $theme->Template ) {
432
- $body['theme_parent'] = sanitize_text_field( $theme->Template );
433
- }
434
-
435
- $body['download_monitor'] = $this->get_downloads();
436
- // Return the data.
437
- return $body;
438
-
439
- }
440
-
441
- /**
442
- * Return plugin data
443
- *
444
- * @since 1.0.0
445
- */
446
- public function plugin_data() {
447
- // Being cautious here.
448
- if ( ! function_exists( 'get_plugin_data' ) ) {
449
- include ABSPATH . '/wp-admin/includes/plugin.php';
450
- }
451
- // Retrieve current plugin information.
452
- $plugin = get_plugin_data( $this->plugin_file );
453
- return $plugin;
454
- }
455
-
456
- /**
457
- * Deactivating plugin
458
- *
459
- * @since 1.0.0
460
- */
461
- public function deactivate_this_plugin() {
462
- // Check to see if the user has opted in to tracking.
463
- if ( $this->what_am_i == 'theme' ) {
464
- $allow_tracking = $this->theme_allows_tracking;
465
- } else {
466
- $allow_tracking = $this->get_is_tracking_allowed();
467
- }
468
-
469
- if ( ! $allow_tracking ) {
470
- return;
471
- }
472
-
473
- $body = $this->get_data();
474
- $body['status'] = 'Deactivated'; // Never translated.
475
- $body['deactivated_date'] = time();
476
-
477
- // Add deactivation form data.
478
- if ( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
479
- $body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
480
- }
481
- if ( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
482
- $body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
483
- }
484
-
485
- $this->send_data( $body );
486
-
487
- remove_action( 'wpchill_do_weekly_action', array( $this, 'do_tracking' ) );
488
- // Clear scheduled update.
489
- if ( ! has_action( 'wpchill_do_weekly_action' ) ) {
490
- wp_clear_scheduled_hook( 'wpchill_do_weekly_action' );
491
- }
492
-
493
- // Clear the wisdom_last_track_time value for this plugin.
494
- // @since 1.2.2
495
- $track_time = get_option( 'download_monitor_wisdom_last_track_time' );
496
- if ( isset( $track_time[ $this->plugin_name ] ) ) {
497
- unset( $track_time[ $this->plugin_name ] );
498
- }
499
- update_option( 'download_monitor_wisdom_last_track_time', $track_time );
500
-
501
- }
502
-
503
- /**
504
- * Is tracking allowed?
505
- *
506
- * @since 1.0.0
507
- */
508
- public function get_is_tracking_allowed() {
509
-
510
- // First, check if the user has changed their mind and opted out of tracking.
511
- if ( $this->has_user_opted_out() ) {
512
- $this->set_is_tracking_allowed( false, $this->plugin_name );
513
- return false;
514
- }
515
-
516
- if ( $this->what_am_i == 'theme' ) {
517
-
518
- $mod = get_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
519
- if ( $mod ) {
520
- return true;
521
- }
522
- } else {
523
-
524
- // The wisdom_allow_tracking option is an array of plugins that are being tracked
525
- $allow_tracking = get_option( $this->plugin_name . '_wisdom_tracking' );
526
- if ( isset( $allow_tracking ) && '1' === $allow_tracking ) {
527
- return true;
528
- }
529
- }
530
-
531
- return false;
532
- }
533
-
534
- /**
535
- * Set if tracking is allowed
536
- * Option is an array of all plugins with tracking permitted
537
- * More than one plugin may be using the tracker
538
- *
539
- * @since 1.0.0
540
- * @param $is_allowed Boolean true if tracking is allowed, false if not
541
- */
542
- public function set_is_tracking_allowed( $is_allowed, $plugin = null ) {
543
-
544
- if ( empty( $plugin ) ) {
545
- $plugin = $this->plugin_name;
546
- }
547
-
548
- $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
549
- if ( isset( $block_notice[ $plugin ] ) ) {
550
- return;
551
- }
552
-
553
- // The wisdom_allow_tracking option is an array of plugins that are being tracked.
554
- $allow_tracking = get_option( $this->plugin_name . '_wisdom_tracking' );
555
- $track = false;
556
- // If the user has decided to opt out.
557
- if ( $this->has_user_opted_out() ) {
558
- if ( $this->what_am_i == 'theme' ) {
559
- set_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
560
- } else {
561
- if ( isset( $allow_tracking ) && '1' == $allow_tracking ) {
562
- $track = false;
563
- }
564
- }
565
-
566
- } else if ( $is_allowed || ! $this->require_optin ) {
567
- // If the user has agreed to allow tracking or if opt-in is not required
568
-
569
- if ( $this->what_am_i == 'theme' ) {
570
- set_theme_mod( 'download_monitor-wisdom-allow-tracking', 1 );
571
- } else {
572
- if ( ! isset( $allow_tracking ) || '1' != $allow_tracking ) {
573
- $track = true;
574
- }
575
- }
576
-
577
- } else {
578
- if ( $this->what_am_i == 'theme' ) {
579
- set_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
580
- } else {
581
- if ( isset( $allow_tracking ) && '1' === $allow_tracking ) {
582
- $track = false;
583
- }
584
- }
585
-
586
- }
587
-
588
- if ( $track ) {
589
- update_option( $this->plugin_name . '_wisdom_tracking', '1' );
590
- } else {
591
- delete_option( $this->plugin_name . '_wisdom_tracking' );
592
- }
593
-
594
- //update_option( 'download_monitor_troubleshooting_option', $allow_tracking );
595
- }
596
-
597
- /**
598
- * Has the user opted out of allowing tracking?
599
- * Note that themes are opt in / plugins are opt out
600
- *
601
- * @since 1.1.0
602
- * @return Boolean
603
- */
604
- public function has_user_opted_out() {
605
- // Different opt-out methods for plugins and themes
606
- if( $this->what_am_i == 'theme' ) {
607
- // Look for the theme mod
608
- $mod = get_theme_mod( 'modula-wisdom-allow-tracking', 0 );
609
- if( false === $mod ) {
610
- // If the theme mod is not set, then return true - the user has opted out
611
- return true;
612
- }
613
- } else {
614
- // Iterate through the options that are being tracked looking for wisdom_opt_out setting
615
- if( ! empty( $this->options ) ) {
616
- foreach( $this->options as $option_name ) {
617
- // Check each option
618
- $options = get_option( $option_name );
619
- // If we find the setting, return true
620
- if( ! empty( $options['wisdom_opt_out'] ) ) {
621
- return true;
622
- }
623
- }
624
- }
625
- }
626
- return false;
627
- }
628
-
629
- /**
630
- * Record the time we send tracking data
631
- *
632
- * @since 1.1.1
633
- */
634
- public function set_track_time() {
635
- // We've tracked, so record the time.
636
- $track_times = get_option( 'download_monitor_wisdom_last_track_time', array() );
637
- // Set different times according to plugin, in case we are tracking multiple plugins.
638
- $track_times[ $this->plugin_name ] = time();
639
- update_option( 'download_monitor_wisdom_last_track_time', $track_times );
640
- }
641
-
642
- /**
643
- * Set the time when we can display the opt-in notification
644
- * Will display now unless filtered
645
- *
646
- * @since 1.2.4
647
- */
648
- public function set_notification_time() {
649
- $notification_times = get_option( 'download_monitor_wisdom_notification_times', array() );
650
- // Set different times according to plugin, in case we are tracking multiple plugins.
651
- if ( ! isset( $notification_times[ $this->plugin_name ] ) ) {
652
- $delay_notification = apply_filters( 'wisdom_delay_notification_' . $this->plugin_name, 0 );
653
- // We can delay the notification time.
654
- $notification_time = time() + absint( $delay_notification );
655
- $notification_times[ $this->plugin_name ] = $notification_time;
656
- update_option( 'download_monitor_wisdom_notification_times', $notification_times );
657
- }
658
- }
659
-
660
- /**
661
- * Get whether it's time to display the notification
662
- *
663
- * @since 1.2.4
664
- * @return Boolean
665
- */
666
- public function get_is_notification_time() {
667
- $notification_times = get_option( 'download_monitor_wisdom_notification_times', array() );
668
- $time = time();
669
- // Set different times according to plugin, in case we are tracking multiple plugins.
670
- if ( isset( $notification_times[ $this->plugin_name ] ) ) {
671
- $notification_time = $notification_times[ $this->plugin_name ];
672
- if ( $time >= $notification_time ) {
673
- return true;
674
- }
675
- }
676
- return false;
677
- }
678
-
679
- /**
680
- * Set if we should block the opt-in notice for this plugin
681
- * Option is an array of all plugins that have received a response from the user
682
- *
683
- * @since 1.0.0
684
- */
685
- public function update_block_notice( $plugin = null ) {
686
- if ( empty( $plugin ) ) {
687
- $plugin = $this->plugin_name;
688
- }
689
- $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
690
- if ( empty( $block_notice ) || ! is_array( $block_notice ) ) {
691
- // If nothing exists in the option yet, start a new array with the plugin name.
692
- $block_notice = array( $plugin => $plugin );
693
- } else {
694
- // Else add the plugin name to the array.
695
- $block_notice[ $plugin ] = $plugin;
696
- }
697
- update_option( 'download_monitor_wisdom_block_notice', $block_notice );
698
- }
699
-
700
- /**
701
- * Can we collect the email address?
702
- *
703
- * @since 1.0.0
704
- */
705
- public function get_can_collect_email() {
706
- // The wisdom_collect_email option is an array of plugins that are being tracked.
707
- $collect_email = get_option( 'download_monitor_wisdom_collect_email' );
708
- // If this plugin is in the array, then we can collect the email address.
709
- if ( isset( $collect_email[ $this->plugin_name ] ) ) {
710
- return true;
711
- }
712
- return false;
713
- }
714
-
715
- /**
716
- * Set if user has allowed us to collect their email address
717
- * Option is an array of all plugins with email collection permitted
718
- * More than one plugin may be using the tracker
719
- *
720
- * @since 1.0.0
721
- * @param $can_collect Boolean true if collection is allowed, false if not
722
- */
723
- public function set_can_collect_email( $can_collect, $plugin = null ) {
724
- if ( empty( $plugin ) ) {
725
- $plugin = $this->plugin_name;
726
- }
727
- // The wisdom_collect_email option is an array of plugins that are being tracked.
728
- $collect_email = get_option( 'download_monitor_wisdom_collect_email' );
729
- // If the user has agreed to allow tracking or if opt-in is not required.
730
- if ( $can_collect ) {
731
- if ( empty( $collect_email ) || ! is_array( $collect_email ) ) {
732
- // If nothing exists in the option yet, start a new array with the plugin name.
733
- $collect_email = array( $plugin => $plugin );
734
- } else {
735
- // Else add the plugin name to the array.
736
- $collect_email[ $plugin ] = $plugin;
737
- }
738
- } else {
739
- if ( isset( $collect_email[ $plugin ] ) ) {
740
- unset( $collect_email[ $plugin ] );
741
- }
742
- }
743
- update_option( 'download_monitor_wisdom_collect_email', $collect_email );
744
- }
745
-
746
- /**
747
- * Get the correct email address to use
748
- *
749
- * @since 1.1.2
750
- * @return Email address
751
- */
752
- public function get_admin_email() {
753
- // The wisdom_collect_email option is an array of plugins that are being tracked.
754
- $email = get_option( 'download_monitor_wisdom_admin_emails' );
755
- // If this plugin is in the array, then we can collect the email address.
756
- if ( isset( $email[ $this->plugin_name ] ) ) {
757
- return $email[ $this->plugin_name ];
758
- }
759
- return false;
760
- }
761
-
762
- /**
763
- * Set the correct email address to use
764
- * There might be more than one admin on the site
765
- * So we only use the first admin's email address
766
- *
767
- * @param $email Email address to set
768
- * @param $plugin Plugin name to set email address for
769
- * @since 1.1.2
770
- */
771
- public function set_admin_email( $email = null, $plugin = null ) {
772
- if ( empty( $plugin ) ) {
773
- $plugin = $this->plugin_name;
774
- }
775
- // If no email address passed, try to get the current user's email.
776
- if ( empty( $email ) ) {
777
- // Have to check that current user object is available.
778
- if ( function_exists( 'wp_get_current_user' ) ) {
779
- $current_user = wp_get_current_user();
780
- $email = $current_user->user_email;
781
- }
782
- }
783
- // The wisdom_admin_emails option is an array of admin email addresses.
784
- $admin_emails = get_option( 'wisdom_admin_emails' );
785
- if ( empty( $admin_emails ) || ! is_array( $admin_emails ) ) {
786
- // If nothing exists in the option yet, start a new array with the plugin name.
787
- $admin_emails = array( $plugin => sanitize_email( $email ) );
788
- } elseif ( empty( $admin_emails[ $plugin ] ) ) {
789
- // Else add the email address to the array, if not already set.
790
- $admin_emails[ $plugin ] = sanitize_email( $email );
791
- }
792
- update_option( 'download_monitor_wisdom_admin_emails', $admin_emails );
793
- }
794
-
795
- /**
796
- * Display the admin notice to users to allow them to opt in
797
- *
798
- * @since 1.0.0
799
- */
800
- public function optin_notice() {
801
-
802
- // Check for plugin args.
803
- if ( isset( $_GET['plugin'] ) && $this->plugin_name === $_GET['plugin'] && isset( $_GET['plugin_action'] ) ) {
804
-
805
- $action = sanitize_text_field( wp_unslash($_GET['plugin_action']) );
806
- if ( $action === 'yes' ) {
807
- $this->set_is_tracking_allowed( true, $this->plugin_name );
808
- // Run this straightaway.
809
- add_action( 'admin_init', array( $this, 'do_tracking' ) );
810
- } else {
811
- $this->set_is_tracking_allowed( false, $this->plugin_name );
812
- }
813
- $this->update_block_notice( $this->plugin_name );
814
- }
815
-
816
- // Is it time to display the notification?.
817
- $is_time = $this->get_is_notification_time();
818
-
819
- if ( ! $is_time ) {
820
- return false;
821
- }
822
-
823
- // Check whether to block the notice, e.g. because we're in a local environment.
824
- // wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names.
825
- $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
826
-
827
- if ( isset( $block_notice[ $this->plugin_name ] ) ) {
828
- return;
829
- }
830
-
831
- if ( ! current_user_can( 'manage_options' ) ) {
832
- return;
833
- }
834
-
835
- // @credit EDD.
836
- // Don't bother asking user to opt in if they're in local dev.
837
- $is_local = false;
838
- if ( stristr( network_site_url( '/' ), '.dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
839
- $is_local = true;
840
- }
841
- $is_local = apply_filters( 'wisdom_is_local_' . $this->plugin_name, $is_local );
842
- if ( $is_local ) {
843
- $this->update_block_notice();
844
- } else {
845
-
846
- // Display the notice requesting permission to track.
847
- // Retrieve current plugin information.
848
- $plugin = $this->plugin_data();
849
- $plugin_name = $plugin['Name'];
850
-
851
- // Args to add to query if user opts in to tracking.
852
- $yes_args = array(
853
- 'plugin' => $this->plugin_name,
854
- 'plugin_action' => 'yes',
855
- );
856
-
857
- // Decide how to request permission to collect email addresses.
858
- if ( $this->marketing == 1 ) {
859
- // Option 1 combines permissions to track and collect email.
860
- $yes_args['marketing_optin'] = 'no';
861
- } elseif ( $this->marketing == 2 ) {
862
- // Option 2 enables a second notice that fires after the user opts in to tracking.
863
- $yes_args['marketing'] = 'no';
864
- }
865
- $url_yes = add_query_arg( $yes_args );
866
- $url_no = add_query_arg(
867
- array(
868
- 'plugin' => $this->plugin_name,
869
- 'plugin_action' => 'no',
870
- )
871
- );
872
-
873
- // Decide on notice text.
874
- if ( $this->marketing != 1 ) {
875
- // Standard notice text.
876
- $notice_text = sprintf(
877
- __( 'Thank you for installing our %1$s. We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional. You can always opt out by going to Settings-> Advanced-> Tracking and uncheck the track data field.', 'download-monitor' ),
878
- $this->what_am_i
879
- );
880
- } else {
881
- // If we have option 1 for marketing, we include reference to sending product information here.
882
- $notice_text = sprintf(
883
- __( 'Thank you for installing our %1$s. We\'d like your permission to track its usage on your site and subscribe you to our newsletter. We won\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional.You can always opt out by going to Settings-> Advanced-> Tracking and uncheck the track data field.', 'download-monitor' ),
884
- $this->what_am_i
885
- );
886
- }
887
- // And we allow you to filter the text anyway.
888
- $notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
889
-
890
- <div class="notice notice-info updated put-dismiss-notice">
891
- <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
892
- <p><?php echo esc_html( $notice_text ); ?></p>
893
- <p>
894
- <a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php echo esc_html__( 'Allow', 'download-monitor' ); ?></a>
895
- <a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php echo esc_html__( 'Do Not Allow', 'download-monitor' ); ?></a>
896
- </p>
897
- </div>
898
- <?php
899
- }
900
-
901
- }
902
-
903
- /**
904
- * Display the marketing notice to users if enabled
905
- * Only displays after the user has opted in to tracking
906
- *
907
- * @since 1.0.0
908
- */
909
- public function marketing_notice() {
910
- // Check if user has opted in to marketing.
911
- if ( isset( $_GET['marketing_optin'] ) ) {
912
- // Set marketing optin.
913
- $this->set_can_collect_email( sanitize_text_field( wp_unslash($_GET['marketing_optin']) ), $this->plugin_name );
914
- // Do tracking.
915
- $this->do_tracking();
916
- } elseif ( isset( $_GET['marketing'] ) && $_GET['marketing'] == 'yes' ) {
917
- // Display the notice requesting permission to collect email address.
918
- // Retrieve current plugin information.
919
- $plugin = $this->plugin_data();
920
- $plugin_name = $plugin['Name'];
921
-
922
- $url_yes = add_query_arg(
923
- array(
924
- 'plugin' => $this->plugin_name,
925
- 'marketing_optin' => 'yes',
926
- )
927
- );
928
- $url_no = add_query_arg(
929
- array(
930
- 'plugin' => $this->plugin_name,
931
- 'marketing_optin' => 'no',
932
- )
933
- );
934
-
935
- $marketing_text = sprintf(
936
- __( 'Thank you for opting in to tracking. Would you like to receive occasional news about this %s, including details of new features and special offers?', 'download-monitor' ),
937
- $this->what_am_i
938
- );
939
- $marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text );
940
- ?>
941
-
942
- <div class="notice notice-info updated put-dismiss-notice">
943
- <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
944
- <p><?php echo esc_html( $marketing_text ); ?></p>
945
- <p>
946
- <a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php echo esc_html__( 'Yes Please', 'download-monitor' ); ?></a>
947
- <a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php echo esc_html__( 'No Thank You', 'download-monitor' ); ?></a>
948
- </p>
949
- </div>
950
- <?php
951
- }
952
- }
953
-
954
- /**
955
- * Filter the deactivation link to allow us to present a form when the user deactivates the plugin
956
- *
957
- * @since 1.0.0
958
- */
959
- public function filter_action_links( $links ) {
960
-
961
- // Check to see if the user has opted in to tracking.
962
- if ( ! $this->get_is_tracking_allowed() ) {
963
- return $links;
964
- }
965
-
966
- if ( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
967
- $deactivation_link = $links['deactivate'];
968
- // Insert an onClick action to allow form before deactivating.
969
- $deactivation_link = str_replace( '<a ', '<div class="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form-wrapper"><span class="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form" id="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form"></span></div><a onclick="javascript:event.preventDefault();" id="' . esc_attr( $this->plugin_name ) . '-put-goodbye-link" ', $deactivation_link );
970
- $links['deactivate'] = $deactivation_link;
971
- }
972
-
973
- return $links;
974
- }
975
-
976
- /*
977
- * Form text strings
978
- * These are non-filterable and used as fallback in case filtered strings aren't set correctly
979
- * @since 1.0.0
980
- */
981
- public function form_default_text() {
982
- $form = array();
983
- $form['heading'] = __( 'Sorry to see you go', 'download-monitor' );
984
- $form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'download-monitor' );
985
- $form['options'] = array(
986
- __( 'Set up is too difficult', 'download-monitor' ),
987
- __( 'Lack of documentation', 'download-monitor' ),
988
- __( 'Not the features I wanted', 'download-monitor' ),
989
- __( 'Found a better plugin', 'download-monitor' ),
990
- __( 'Installed by mistake', 'download-monitor' ),
991
- __( 'Only required temporarily', 'download-monitor' ),
992
- __( 'Didn\'t work', 'download-monitor' ),
993
- );
994
- $form['details'] = __( 'Details (optional)', 'download-monitor' );
995
- return $form;
996
- }
997
-
998
- /**
999
- * Form text strings
1000
- * These can be filtered
1001
- * The filter hook must be unique to the plugin
1002
- *
1003
- * @since 1.0.0
1004
- */
1005
- public function form_filterable_text() {
1006
- $form = $this->form_default_text();
1007
- return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
1008
- }
1009
-
1010
- /**
1011
- * Form text strings
1012
- * These can be filtered
1013
- *
1014
- * @since 1.0.0
1015
- */
1016
- public function goodbye_ajax() {
1017
- // Get our strings for the form
1018
- $form = $this->form_filterable_text();
1019
-
1020
- if ( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
1021
- // If the form hasn't been filtered correctly, we revert to the default form.
1022
- $form = $this->form_default_text();
1023
- }
1024
- // Build the HTML to go in the form.
1025
- $html = '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
1026
- $html .= '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
1027
-
1028
- if ( is_array( $form['options'] ) ) {
1029
-
1030
- $html .= '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-options"><p>';
1031
- foreach ( $form['options'] as $option ) {
1032
- $html .= '<input type="checkbox" name="'.esc_attr($this->plugin_name).'-put-goodbye-options[]" id="' . str_replace( ' ', '', esc_attr( $option ) ) . '" value="' . esc_attr( $option ) . '"> <label for="' . str_replace( ' ', '', esc_attr( $option ) ) . '">' . esc_html( $option ) . '</label><br>';
1033
- }
1034
- $html .= '</p><label for="'.esc_attr($this->plugin_name).'-put-goodbye-reasons">' . esc_html( $form['details'] ) . '</label><textarea name="'.esc_attr($this->plugin_name).'-put-goodbye-reasons" id="'.esc_attr($this->plugin_name).'-put-goodbye-reasons" rows="2" style="width:100%"></textarea>';
1035
- $html .= '</div><!-- .put-goodbye-options -->';
1036
- }
1037
-
1038
- $html .= '</div><!-- .put-goodbye-form-body -->';
1039
- $html .= '<p class="'.esc_attr($this->plugin_name).'-deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'download-monitor' ) . '</p>';
1040
- ?>
1041
- <div class="<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-bg"></div>
1042
- <style type="text/css">
1043
- .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-bg {
1044
- background: rgba( 0, 0, 0, .5 );
1045
- position: fixed;
1046
- top: 0;
1047
- left: 0;
1048
- width: 100%;
1049
- height: 100%;
1050
- }
1051
- .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper {
1052
- position: fixed;
1053
- z-index: 999;
1054
- display: none;
1055
- top:0;
1056
- bottom:0;
1057
- left:0;
1058
- right:0;
1059
- width:100vw;
1060
- height:100vh;
1061
- }
1062
- .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper {
1063
- display: block;
1064
- }
1065
- .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form {
1066
- display: none;
1067
- }
1068
- .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form {
1069
- position: absolute;
1070
- left:0;
1071
- right:0;
1072
- margin:0 auto;
1073
- max-width: 400px;
1074
- background: #fff;
1075
- white-space: normal;
1076
- top:50%;
1077
- transform: translateY(-50%);
1078
- }
1079
- .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-head {
1080
- background: #0073aa;
1081
- color: #fff;
1082
- padding: 8px 18px;
1083
- }
1084
- .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-body {
1085
- padding: 8px 18px;
1086
- color: #444;
1087
- }
1088
- .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner {
1089
- display: none;
1090
- }
1091
- .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner .spinner {
1092
- float: none;
1093
- margin: 4px 4px 0 18px;
1094
- vertical-align: bottom;
1095
- visibility: visible;
1096
- }
1097
- .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer {
1098
- padding: 8px 18px;
1099
- }
1100
- </style>
1101
- <script>
1102
- jQuery( document ).ready( function ( $ ) {
1103
-
1104
- var url = document.getElementById( "<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-link" );
1105
-
1106
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-link" ).on( "click", function () {
1107
- // We'll send the user to this deactivation link when they've completed or dismissed the form.
1108
- $( 'body' ).toggleClass( '<?php echo esc_attr($this->plugin_name); ?>-put-form-active' );
1109
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).fadeIn();
1110
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).html( '<?php echo wp_kses_post( $html ); ?>' + '<div class="<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer"><p><a id="<?php echo esc_attr($this->plugin_name); ?>-put-submit-form" class="button primary" href="#"><?php echo esc_html__( 'Submit and Deactivate', 'download-monitor' ); ?></a>&nbsp;<a class="secondary button" href="' + url + '"><?php echo esc_html__( 'Just Deactivate', 'download-monitor' ); ?></a></p></div>' );
1111
- } );
1112
-
1113
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).on( "click", "#<?php echo esc_attr( $this->plugin_name ); ?>-put-submit-form", function ( e ) {
1114
- // As soon as we click, the body of the form should disappear.
1115
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-body" ).fadeOut();
1116
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer" ).fadeOut();
1117
- // Fade in spinner.
1118
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner" ).fadeIn();
1119
- e.preventDefault();
1120
-
1121
- var values = new Array();
1122
- $.each( $( "input[name='<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-options[]']:checked" ), function () {
1123
- values.push( $( this ).val() );
1124
- } );
1125
-
1126
- var details = $( '#<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-reasons' ).val();
1127
-
1128
- var data = {
1129
- 'action' : '<?php echo esc_attr($this->plugin_name); ?>_goodbye_form',
1130
- 'values' : values,
1131
- 'details' : details,
1132
- 'security': "<?php echo esc_js(wp_create_nonce( 'wisdom_goodbye_form' )); ?>",
1133
- 'dataType': "json"
1134
- }
1135
-
1136
- $.post(
1137
- ajaxurl,
1138
- data,
1139
- function ( response ) {
1140
- // Redirect to original deactivation URL.
1141
- window.location.href = url;
1142
- }
1143
- );
1144
- } );
1145
-
1146
- // If we click outside the form, the form will close.
1147
- $( '.<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form' ).on( 'click', function (e) {
1148
- e.stopPropagation();
1149
- });
1150
-
1151
- $( '.<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper' ).on( 'click', function () {
1152
- $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).fadeOut();
1153
- $( 'body' ).removeClass( '<?php echo esc_attr($this->plugin_name); ?>-put-form-active' );
1154
- } );
1155
- } );
1156
- </script>
1157
- <?php
1158
- }
1159
-
1160
- /**
1161
- * AJAX callback when the form is submitted
1162
- *
1163
- * @since 1.0.0
1164
- */
1165
- public function goodbye_form_callback() {
1166
-
1167
- check_ajax_referer( 'wisdom_goodbye_form', 'security' );
1168
-
1169
- if ( isset( $_POST['values'] ) ) {
1170
- $values = wp_unslash( $_POST['values'] );
1171
- $values = array_map( 'sanitize_text_field', $values );
1172
- $values = json_encode( $values );
1173
- update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
1174
- }
1175
-
1176
- if ( isset( $_POST['details'] ) ) {
1177
- $details = sanitize_text_field( wp_unslash($_POST['details']) );
1178
- update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
1179
- }
1180
-
1181
- $this->do_tracking(); // Run this straightaway.
1182
- echo 'success';
1183
- wp_die();
1184
- }
1185
-
1186
- public function get_downloads() {
1187
- $settings_class = new DLM_Admin_Settings();
1188
- $args = array(
1189
- 'numberposts' => -1,
1190
- 'post_type' => 'dlm_download',
1191
- );
1192
- $downloads = get_posts( $args );
1193
- $total_downloads = count( $downloads );
1194
- $settings = $settings_class->get_settings();
1195
- $formatted_settings = array();
1196
- $licenses = array();
1197
- $return_array = array();
1198
-
1199
- if ( ! empty( $this->active_plugins ) ) {
1200
- foreach ( $this->active_plugins as $plugin => $value ) {
1201
- if ( 0 === strpos( $value, 'dlm' ) ) {
1202
- $new_val = explode( '/', $value );
1203
- $licenses[ $new_val[0] ] = get_option( $new_val[0] . '-license' );
1204
- unset( $licenses[ $new_val[0] ][1] );
1205
- }
1206
- }
1207
- }
1208
-
1209
- $site_url = base64_encode( site_url() );
1210
-
1211
- foreach ( $settings as $tab_key => $tab ) {
1212
- foreach ( $tab['sections'] as $section_key => $section ) {
1213
- if ( isset( $section['fields'] ) ) {
1214
- foreach ( $section['fields'] as $field ) {
1215
- if ( isset( $field['name'] ) ) {
1216
- $formatted_settings[ $field['name'] ] = get_option( $field['name'] );
1217
- }
1218
- }
1219
- }
1220
- }
1221
- }
1222
-
1223
- $return_array['settings'] = $formatted_settings;
1224
- $return_array['licenses'] = $licenses;
1225
- $return_array['site_url'] = $site_url;
1226
- $return_array['total_downloads'] = $total_downloads;
1227
-
1228
- return $return_array;
1229
-
1230
- }
1231
-
1232
- /**
1233
- * Add tracking options to uninstall process
1234
- *
1235
- * @param $options
1236
- *
1237
- * @return mixed
1238
- */
1239
- public function uninstall_options( $options ) {
1240
-
1241
- $options[] = 'download_monitor_wisdom_last_track_time';
1242
- //$options[] = 'download_monitor_troubleshooting_option';
1243
- $options[] = 'download_monitor_wisdom_notification_times';
1244
- $options[] = 'download_monitor_wisdom_block_notice';
1245
- $options[] = 'download_monitor_wisdom_collect_email';
1246
- $options[] = 'download_monitor_wisdom_admin_emails';
1247
- $options[] = 'wisdom_deactivation_reason_' . $this->plugin_name;
1248
- $options[] = 'wisdom_deactivation_details_' . $this->plugin_name;
1249
- $options[] = $this->plugin_name . '_wisdom_tracking';
1250
-
1251
- return $options;
1252
-
1253
- }
1254
-
1255
- /**
1256
- * Add the optin setting
1257
- *
1258
- * @param $settings
1259
- *
1260
- * @return array
1261
- */
1262
- public function optin_tracking( $settings ) {
1263
-
1264
- if ( isset( $settings['advanced'] ) ) {
1265
-
1266
- $settings['advanced']['sections']['tracking'] = array(
1267
- 'title' => __( 'Tracking', 'download-monitor' ),
1268
- 'fields' => array(
1269
- array(
1270
- 'name' => $this->plugin_name.'_wisdom_tracking',
1271
- 'std' => '0',
1272
- 'label' => __( 'Track data', 'download-monitor' ),
1273
- 'cb_label' => __( 'We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and Download Monitor settings, which we will use to help us make improvements.', 'download-monitor' ),
1274
- 'desc' => '',
1275
- 'type' => 'checkbox'
1276
- ),
1277
- )
1278
- );
1279
- }
1280
-
1281
- return $settings;
1282
-
1283
- }
1284
-
1285
- /**
1286
- * Default tracking
1287
- *
1288
- * @param $defaults
1289
- *
1290
- * @return mixed
1291
- */
1292
- public function default_tracking( $defaults ) {
1293
-
1294
- $defaults[ $this->plugin_name . '_wisdom_tracking' ] = '1';
1295
-
1296
- return $defaults;
1297
-
1298
- }
1299
-
1300
- }
1301
-
1302
- }
1
+ <?php
2
+ /**
3
+ * This is the class that sends all the data back to the home site
4
+ * It also handles opting in and deactivation
5
+ *
6
+ * @version 1.2.5
7
+ *
8
+ * @package dlm
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ if ( ! class_exists( 'Download_Monitor_Usage_Tracker' ) ) {
17
+
18
+ /**
19
+ * Main class for our usage tracker
20
+ */
21
+ class Download_Monitor_Usage_Tracker {
22
+
23
+ /**
24
+ * Current wisdom plugin version.
25
+ *
26
+ * @var string
27
+ */
28
+
29
+ private $wisdom_version = '1.2.4';
30
+
31
+ /**
32
+ * Receiver url
33
+ *
34
+ * @var string
35
+ */
36
+ private $home_url = '';
37
+
38
+ /**
39
+ * File path for plugin
40
+ *
41
+ * @var string
42
+ */
43
+ private $plugin_file = '';
44
+
45
+ /**
46
+ * Plugin name
47
+ *
48
+ * @var string
49
+ */
50
+ private $plugin_name = '';
51
+
52
+ /**
53
+ * Plugin options to track
54
+ *
55
+ * @var array
56
+ */
57
+ private $options = array();
58
+
59
+ /**
60
+ * Where user opt-in is requireed
61
+ *
62
+ * @var bool
63
+ */
64
+ private $require_optin = true;
65
+
66
+ /**
67
+ * Whether to include a for when the user deactivates
68
+ *
69
+ * @var bool
70
+ */
71
+ private $include_goodbye_form = true;
72
+
73
+ /**
74
+ * Marketing method:
75
+ * 0: Don't collect email addresses
76
+ * 1: Request permission same time as tracking opt-in
77
+ * 2: Request permission after opt-in
78
+ *
79
+ * @var bool
80
+ */
81
+ private $marketing = false;
82
+
83
+ /**
84
+ * Collect email
85
+ *
86
+ * @var bool
87
+ */
88
+ private $collect_email = false;
89
+
90
+ /**
91
+ * Tracking object
92
+ *
93
+ * @var string
94
+ */
95
+ private $what_am_i = 'plugin';
96
+
97
+ /**
98
+ * If theme and tracking
99
+ *
100
+ * @var bool
101
+ */
102
+ private $theme_allows_tracking = 0;
103
+
104
+ /**
105
+ * Tracking object
106
+ *
107
+ * @var string
108
+ */
109
+ private $active_plugins = array();
110
+
111
+ /**
112
+ * Main construct function for our class
113
+ *
114
+ * @param string $_plugin_file plugin file.
115
+ * @param string $_home_url homepage url.
116
+ * @param array $_options array.
117
+ * @param bool $_require_optin defaults to true.
118
+ * @param bool $_include_goodbye_form defaults to true.
119
+ * @param bool $_marketing defauts to false.
120
+ */
121
+ public function __construct(
122
+ $_plugin_file,
123
+ $_home_url,
124
+ $_options,
125
+ $_require_optin = true,
126
+ $_include_goodbye_form = true,
127
+ $_marketing = false ) {
128
+
129
+ $this->plugin_file = $_plugin_file;
130
+ $this->home_url = trailingslashit( $_home_url );
131
+
132
+ // If the filename is 'functions' then we're tracking a theme.
133
+ if ( basename( $this->plugin_file, '.php' ) != 'functions' ) {
134
+ $this->plugin_name = 'download-monitor';
135
+ }
136
+
137
+ $this->options = $_options;
138
+ $this->require_optin = $_require_optin;
139
+ $this->include_goodbye_form = $_include_goodbye_form;
140
+ $this->marketing = $_marketing;
141
+
142
+ $this->active_plugins = get_option( 'active_plugins', array() );
143
+
144
+
145
+ register_activation_hook( $this->plugin_file, array( $this, 'schedule_tracking' ) );
146
+ register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate_this_plugin' ) );
147
+
148
+ // Get it going.
149
+ $this->init();
150
+
151
+ }
152
+
153
+ /**
154
+ * Init function hooked to construct.
155
+ */
156
+ public function init() {
157
+
158
+ // Check marketing.
159
+ if ( 3 === $this->marketing ) {
160
+ $this->set_can_collect_email( true, $this->plugin_name );
161
+ }
162
+
163
+ // Check whether opt-in is required.
164
+ // If not, then tracking is allowed.
165
+ if ( ! $this->require_optin ) {
166
+ $this->set_can_collect_email( true, $this->plugin_name );
167
+ $this->set_is_tracking_allowed( true );
168
+ $this->update_block_notice();
169
+ $this->do_tracking();
170
+ }
171
+
172
+ // Hook our do_tracking function to the weekly action.
173
+ add_filter( 'cron_schedules', array( $this, 'schedule_weekly_event' ) );
174
+ // It's called weekly, but in fact it could be daily, weekly or monthly.
175
+ add_action( 'wpchill_do_weekly_action', array( $this, 'do_tracking' ) );
176
+
177
+ // Use this action for local testing.
178
+ //add_action( 'admin_init', array( $this, 'do_tracking' ) );
179
+
180
+ // Display the admin notice on activation.
181
+ add_action( 'admin_init', array( $this, 'set_notification_time' ) );
182
+ add_action( 'admin_notices', array( $this, 'optin_notice' ) );
183
+ add_action( 'admin_notices', array( $this, 'marketing_notice' ) );
184
+
185
+ // Deactivation.
186
+ add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
187
+ add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
188
+ add_action( 'wp_ajax_'.$this->plugin_name.'_goodbye_form', array( $this, 'goodbye_form_callback' ) );
189
+
190
+ add_filter( 'dlm_uninstall_db_options', array( $this, 'uninstall_options' ) );
191
+
192
+ add_filter( 'dlm_settings', array( $this, 'optin_tracking' ), 30, 1 );
193
+
194
+ add_filter( 'dlm_settings_defaults', array( $this, 'default_tracking' ) );
195
+
196
+ }
197
+
198
+ /**
199
+ * When the plugin is activated
200
+ * Create scheduled event
201
+ * And check if tracking is enabled - perhaps the plugin has been reactivated
202
+ *
203
+ * @since 1.0.0
204
+ */
205
+ public function schedule_tracking() {
206
+ if ( ! wp_next_scheduled( 'wpchill_do_weekly_action' ) ) {
207
+ $schedule = $this->get_schedule();
208
+ wp_schedule_event( time(), $schedule, 'wpchill_do_weekly_action' );
209
+ }
210
+ $this->do_tracking();
211
+ }
212
+
213
+ /**
214
+ * Create weekly schedule.
215
+ *
216
+ * @param array $schedules schedules intervals.
217
+ *
218
+ * @since 1.2.3
219
+ */
220
+ public function schedule_weekly_event( $schedules ) {
221
+ $schedules['weekly'] = array(
222
+ 'interval' => 604800,
223
+ 'display' => __( 'Once Weekly' ),
224
+ );
225
+ $schedules['monthly'] = array(
226
+ 'interval' => 2635200,
227
+ 'display' => __( 'Once Monthly' ),
228
+ );
229
+ return $schedules;
230
+ }
231
+
232
+ /**
233
+ * Get how frequently data is tracked back
234
+ *
235
+ * @since 1.2.3
236
+ */
237
+ public function get_schedule() {
238
+ // Could be daily, weekly or monthly.
239
+ $schedule = apply_filters( 'wisdom_filter_schedule_' . $this->plugin_name, 'monthly' );
240
+ return $schedule;
241
+ }
242
+
243
+ /**
244
+ * This is our function to get everything going
245
+ * Check that user has opted in
246
+ * Collect data
247
+ * Then send it back
248
+ *
249
+ * // FOR TESTING PURPOSES FORCE IS SET TO TRUE. BY DEFAULT IT IS FALSE .
250
+ *
251
+ * @since 1.0.0
252
+ */
253
+ public function do_tracking() {
254
+
255
+ // If the home site hasn't been defined, we just drop out. Nothing much we can do.
256
+ if ( ! $this->home_url ) {
257
+ return;
258
+ }
259
+
260
+ // Check to see if the user has opted in to tracking.
261
+ if ( ! $this->get_is_tracking_allowed() ) {
262
+ return;
263
+ }
264
+
265
+ $this->set_admin_email();
266
+
267
+ // Get our data.
268
+ $body = $this->get_data();
269
+
270
+ // Send the data.
271
+ $this->send_data( $body );
272
+
273
+ }
274
+
275
+
276
+ /**
277
+ * Send the data to the home site
278
+ *
279
+ * @since 1.0.0
280
+ *
281
+ * @param array $body body of the post.
282
+ */
283
+ public function send_data( $body ) {
284
+
285
+ $request = wp_remote_post(
286
+ esc_url( $this->home_url . '?usage_tracker=hello' ),
287
+ array(
288
+ 'method' => 'POST',
289
+ 'timeout' => 20,
290
+ 'redirection' => 5,
291
+ 'httpversion' => '1.1',
292
+ 'blocking' => true,
293
+ 'body' => $body,
294
+ 'user-agent' => 'PUT/1.0.0; ' . home_url(),
295
+ )
296
+ );
297
+
298
+ $this->set_track_time();
299
+
300
+ if ( is_wp_error( $request ) ) {
301
+ return $request;
302
+ }
303
+
304
+ }
305
+
306
+ /**
307
+ * Here we collect most of the data
308
+ *
309
+ * @since 1.0.0
310
+ */
311
+ public function get_data() {
312
+
313
+ // Use this to pass error messages back if necessary.
314
+ $body['message'] = '';
315
+
316
+ // Use this array to send data back.
317
+ $body = array(
318
+ 'plugin_slug' => sanitize_text_field( $this->plugin_name ),
319
+ 'url' => home_url(),
320
+ 'site_name' => get_bloginfo( 'name' ),
321
+ 'site_version' => get_bloginfo( 'version' ),
322
+ 'site_language' => get_bloginfo( 'language' ),
323
+ 'charset' => get_bloginfo( 'charset' ),
324
+ 'wisdom_version' => $this->wisdom_version,
325
+ 'php_version' => ( defined( 'PHP_VERSION' ) ) ? PHP_VERSION : phpversion(),
326
+ 'multisite' => is_multisite(),
327
+ 'file_location' => __FILE__,
328
+ 'product_type' => esc_html( $this->what_am_i ),
329
+ );
330
+
331
+ // Collect the email if the correct option has been set.
332
+ if ( $this->get_can_collect_email() ) {
333
+ $body['email'] = $this->get_admin_email();
334
+ }
335
+ $body['marketing_method'] = $this->marketing;
336
+
337
+ $body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash($_SERVER['SERVER_SOFTWARE']) ) : '';
338
+
339
+ // Extra PHP fields.
340
+ $body['memory_limit'] = ini_get( 'memory_limit' );
341
+ $body['upload_max_size'] = ini_get( 'upload_max_size' );
342
+ $body['post_max_size'] = ini_get( 'post_max_size' );
343
+ $body['upload_max_filesize'] = ini_get( 'upload_max_filesize' );
344
+ $body['max_execution_time'] = ini_get( 'max_execution_time' );
345
+ $body['max_input_time'] = ini_get( 'max_input_time' );
346
+
347
+ // Retrieve current plugin information.
348
+ if ( ! function_exists( 'get_plugins' ) ) {
349
+ include ABSPATH . '/wp-admin/includes/plugin.php';
350
+ }
351
+
352
+ $plugins = array_keys( get_plugins() );
353
+
354
+ foreach ( $plugins as $key => $plugin ) {
355
+ if ( in_array( $plugin, $this->active_plugins ) ) {
356
+ // Remove active plugins from list so we can show active and inactive separately.
357
+ unset( $plugins[ $key ] );
358
+ }
359
+ }
360
+
361
+ $body['active_plugins'] = $this->active_plugins;
362
+ $body['inactive_plugins'] = $plugins;
363
+
364
+ // Check text direction.
365
+ $body['text_direction'] = 'LTR';
366
+ if ( function_exists( 'is_rtl' ) ) {
367
+ if ( is_rtl() ) {
368
+ $body['text_direction'] = 'RTL';
369
+ }
370
+ } else {
371
+ $body['text_direction'] = 'not set';
372
+ }
373
+
374
+ /**
375
+ * Get our plugin data
376
+ * Currently we grab plugin name and version
377
+ * Or, return a message if the plugin data is not available
378
+ *
379
+ * @since 1.0.0
380
+ */
381
+ $plugin = $this->plugin_data();
382
+ $body['status'] = 'Active'; // Never translated.
383
+ if ( empty( $plugin ) ) {
384
+ // We can't find the plugin data.
385
+ // Send a message back to our home site.
386
+ $body['message'] .= esc_html( 'We can\'t detect any product information. This is most probably because you have not included the code snippet.');
387
+ $body['status'] = 'Data not found'; // Never translated.
388
+ } else {
389
+ if ( isset( $plugin['Name'] ) ) {
390
+ $body['plugin'] = sanitize_text_field( $plugin['Name'] );
391
+ }
392
+ if ( isset( $plugin['Version'] ) ) {
393
+ $body['version'] = sanitize_text_field( $plugin['Version'] );
394
+ }
395
+ }
396
+
397
+ /**
398
+ * Get our plugin options
399
+ *
400
+ * @since 1.0.0
401
+ */
402
+ $options = $this->options;
403
+ $plugin_options = array();
404
+ if ( ! empty( $options ) && is_array( $options ) ) {
405
+ foreach ( $options as $option ) {
406
+ $fields = get_option( $option );
407
+ // Check for permission to send this option.
408
+ if ( isset( $fields['wisdom_registered_setting'] ) ) {
409
+ foreach ( $fields as $key => $value ) {
410
+ $plugin_options[ $key ] = $value;
411
+ }
412
+ }
413
+ }
414
+ }
415
+ $body['plugin_options'] = $this->options; // Returns array.
416
+ $body['plugin_options_fields'] = $plugin_options; // Returns object.
417
+
418
+ /**
419
+ * Get our theme data
420
+ * Currently we grab theme name and version
421
+ *
422
+ * @since 1.0.0
423
+ */
424
+ $theme = wp_get_theme();
425
+ if ( $theme->Name ) {
426
+ $body['theme'] = sanitize_text_field( $theme->Name );
427
+ }
428
+ if ( $theme->Version ) {
429
+ $body['theme_version'] = sanitize_text_field( $theme->Version );
430
+ }
431
+ if ( $theme->Template ) {
432
+ $body['theme_parent'] = sanitize_text_field( $theme->Template );
433
+ }
434
+
435
+ $body['download_monitor'] = $this->get_downloads();
436
+ // Return the data.
437
+ return $body;
438
+
439
+ }
440
+
441
+ /**
442
+ * Return plugin data
443
+ *
444
+ * @since 1.0.0
445
+ */
446
+ public function plugin_data() {
447
+ // Being cautious here.
448
+ if ( ! function_exists( 'get_plugin_data' ) ) {
449
+ include ABSPATH . '/wp-admin/includes/plugin.php';
450
+ }
451
+ // Retrieve current plugin information.
452
+ $plugin = get_plugin_data( $this->plugin_file );
453
+ return $plugin;
454
+ }
455
+
456
+ /**
457
+ * Deactivating plugin
458
+ *
459
+ * @since 1.0.0
460
+ */
461
+ public function deactivate_this_plugin() {
462
+ // Check to see if the user has opted in to tracking.
463
+ if ( $this->what_am_i == 'theme' ) {
464
+ $allow_tracking = $this->theme_allows_tracking;
465
+ } else {
466
+ $allow_tracking = $this->get_is_tracking_allowed();
467
+ }
468
+
469
+ if ( ! $allow_tracking ) {
470
+ return;
471
+ }
472
+
473
+ $body = $this->get_data();
474
+ $body['status'] = 'Deactivated'; // Never translated.
475
+ $body['deactivated_date'] = time();
476
+
477
+ // Add deactivation form data.
478
+ if ( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
479
+ $body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
480
+ }
481
+ if ( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
482
+ $body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
483
+ }
484
+
485
+ $this->send_data( $body );
486
+
487
+ remove_action( 'wpchill_do_weekly_action', array( $this, 'do_tracking' ) );
488
+ // Clear scheduled update.
489
+ if ( ! has_action( 'wpchill_do_weekly_action' ) ) {
490
+ wp_clear_scheduled_hook( 'wpchill_do_weekly_action' );
491
+ }
492
+
493
+ // Clear the wisdom_last_track_time value for this plugin.
494
+ // @since 1.2.2
495
+ $track_time = get_option( 'download_monitor_wisdom_last_track_time' );
496
+ if ( isset( $track_time[ $this->plugin_name ] ) ) {
497
+ unset( $track_time[ $this->plugin_name ] );
498
+ }
499
+ update_option( 'download_monitor_wisdom_last_track_time', $track_time );
500
+
501
+ }
502
+
503
+ /**
504
+ * Is tracking allowed?
505
+ *
506
+ * @since 1.0.0
507
+ */
508
+ public function get_is_tracking_allowed() {
509
+
510
+ // First, check if the user has changed their mind and opted out of tracking.
511
+ if ( $this->has_user_opted_out() ) {
512
+ $this->set_is_tracking_allowed( false, $this->plugin_name );
513
+ return false;
514
+ }
515
+
516
+ if ( $this->what_am_i == 'theme' ) {
517
+
518
+ $mod = get_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
519
+ if ( $mod ) {
520
+ return true;
521
+ }
522
+ } else {
523
+
524
+ // The wisdom_allow_tracking option is an array of plugins that are being tracked
525
+ $allow_tracking = get_option( $this->plugin_name . '_wisdom_tracking' );
526
+ if ( isset( $allow_tracking ) && '1' === $allow_tracking ) {
527
+ return true;
528
+ }
529
+ }
530
+
531
+ return false;
532
+ }
533
+
534
+ /**
535
+ * Set if tracking is allowed
536
+ * Option is an array of all plugins with tracking permitted
537
+ * More than one plugin may be using the tracker
538
+ *
539
+ * @since 1.0.0
540
+ * @param $is_allowed Boolean true if tracking is allowed, false if not
541
+ */
542
+ public function set_is_tracking_allowed( $is_allowed, $plugin = null ) {
543
+
544
+ if ( empty( $plugin ) ) {
545
+ $plugin = $this->plugin_name;
546
+ }
547
+
548
+ $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
549
+ if ( isset( $block_notice[ $plugin ] ) ) {
550
+ return;
551
+ }
552
+
553
+ // The wisdom_allow_tracking option is an array of plugins that are being tracked.
554
+ $allow_tracking = get_option( $this->plugin_name . '_wisdom_tracking' );
555
+ $track = false;
556
+ // If the user has decided to opt out.
557
+ if ( $this->has_user_opted_out() ) {
558
+ if ( $this->what_am_i == 'theme' ) {
559
+ set_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
560
+ } else {
561
+ if ( isset( $allow_tracking ) && '1' == $allow_tracking ) {
562
+ $track = false;
563
+ }
564
+ }
565
+
566
+ } else if ( $is_allowed || ! $this->require_optin ) {
567
+ // If the user has agreed to allow tracking or if opt-in is not required
568
+
569
+ if ( $this->what_am_i == 'theme' ) {
570
+ set_theme_mod( 'download_monitor-wisdom-allow-tracking', 1 );
571
+ } else {
572
+ if ( ! isset( $allow_tracking ) || '1' != $allow_tracking ) {
573
+ $track = true;
574
+ }
575
+ }
576
+
577
+ } else {
578
+ if ( $this->what_am_i == 'theme' ) {
579
+ set_theme_mod( 'download_monitor-wisdom-allow-tracking', 0 );
580
+ } else {
581
+ if ( isset( $allow_tracking ) && '1' === $allow_tracking ) {
582
+ $track = false;
583
+ }
584
+ }
585
+
586
+ }
587
+
588
+ if ( $track ) {
589
+ update_option( $this->plugin_name . '_wisdom_tracking', '1' );
590
+ } else {
591
+ delete_option( $this->plugin_name . '_wisdom_tracking' );
592
+ }
593
+
594
+ //update_option( 'download_monitor_troubleshooting_option', $allow_tracking );
595
+ }
596
+
597
+ /**
598
+ * Has the user opted out of allowing tracking?
599
+ * Note that themes are opt in / plugins are opt out
600
+ *
601
+ * @since 1.1.0
602
+ * @return Boolean
603
+ */
604
+ public function has_user_opted_out() {
605
+ // Different opt-out methods for plugins and themes
606
+ if( $this->what_am_i == 'theme' ) {
607
+ // Look for the theme mod
608
+ $mod = get_theme_mod( 'modula-wisdom-allow-tracking', 0 );
609
+ if( false === $mod ) {
610
+ // If the theme mod is not set, then return true - the user has opted out
611
+ return true;
612
+ }
613
+ } else {
614
+ // Iterate through the options that are being tracked looking for wisdom_opt_out setting
615
+ if( ! empty( $this->options ) ) {
616
+ foreach( $this->options as $option_name ) {
617
+ // Check each option
618
+ $options = get_option( $option_name );
619
+ // If we find the setting, return true
620
+ if( ! empty( $options['wisdom_opt_out'] ) ) {
621
+ return true;
622
+ }
623
+ }
624
+ }
625
+ }
626
+ return false;
627
+ }
628
+
629
+ /**
630
+ * Record the time we send tracking data
631
+ *
632
+ * @since 1.1.1
633
+ */
634
+ public function set_track_time() {
635
+ // We've tracked, so record the time.
636
+ $track_times = get_option( 'download_monitor_wisdom_last_track_time', array() );
637
+ // Set different times according to plugin, in case we are tracking multiple plugins.
638
+ $track_times[ $this->plugin_name ] = time();
639
+ update_option( 'download_monitor_wisdom_last_track_time', $track_times );
640
+ }
641
+
642
+ /**
643
+ * Set the time when we can display the opt-in notification
644
+ * Will display now unless filtered
645
+ *
646
+ * @since 1.2.4
647
+ */
648
+ public function set_notification_time() {
649
+ $notification_times = get_option( 'download_monitor_wisdom_notification_times', array() );
650
+ // Set different times according to plugin, in case we are tracking multiple plugins.
651
+ if ( ! isset( $notification_times[ $this->plugin_name ] ) ) {
652
+ $delay_notification = apply_filters( 'wisdom_delay_notification_' . $this->plugin_name, 0 );
653
+ // We can delay the notification time.
654
+ $notification_time = time() + absint( $delay_notification );
655
+ $notification_times[ $this->plugin_name ] = $notification_time;
656
+ update_option( 'download_monitor_wisdom_notification_times', $notification_times );
657
+ }
658
+ }
659
+
660
+ /**
661
+ * Get whether it's time to display the notification
662
+ *
663
+ * @since 1.2.4
664
+ * @return Boolean
665
+ */
666
+ public function get_is_notification_time() {
667
+ $notification_times = get_option( 'download_monitor_wisdom_notification_times', array() );
668
+ $time = time();
669
+ // Set different times according to plugin, in case we are tracking multiple plugins.
670
+ if ( isset( $notification_times[ $this->plugin_name ] ) ) {
671
+ $notification_time = $notification_times[ $this->plugin_name ];
672
+ if ( $time >= $notification_time ) {
673
+ return true;
674
+ }
675
+ }
676
+ return false;
677
+ }
678
+
679
+ /**
680
+ * Set if we should block the opt-in notice for this plugin
681
+ * Option is an array of all plugins that have received a response from the user
682
+ *
683
+ * @since 1.0.0
684
+ */
685
+ public function update_block_notice( $plugin = null ) {
686
+ if ( empty( $plugin ) ) {
687
+ $plugin = $this->plugin_name;
688
+ }
689
+ $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
690
+ if ( empty( $block_notice ) || ! is_array( $block_notice ) ) {
691
+ // If nothing exists in the option yet, start a new array with the plugin name.
692
+ $block_notice = array( $plugin => $plugin );
693
+ } else {
694
+ // Else add the plugin name to the array.
695
+ $block_notice[ $plugin ] = $plugin;
696
+ }
697
+ update_option( 'download_monitor_wisdom_block_notice', $block_notice );
698
+ }
699
+
700
+ /**
701
+ * Can we collect the email address?
702
+ *
703
+ * @since 1.0.0
704
+ */
705
+ public function get_can_collect_email() {
706
+ // The wisdom_collect_email option is an array of plugins that are being tracked.
707
+ $collect_email = get_option( 'download_monitor_wisdom_collect_email' );
708
+ // If this plugin is in the array, then we can collect the email address.
709
+ if ( isset( $collect_email[ $this->plugin_name ] ) ) {
710
+ return true;
711
+ }
712
+ return false;
713
+ }
714
+
715
+ /**
716
+ * Set if user has allowed us to collect their email address
717
+ * Option is an array of all plugins with email collection permitted
718
+ * More than one plugin may be using the tracker
719
+ *
720
+ * @since 1.0.0
721
+ * @param $can_collect Boolean true if collection is allowed, false if not
722
+ */
723
+ public function set_can_collect_email( $can_collect, $plugin = null ) {
724
+ if ( empty( $plugin ) ) {
725
+ $plugin = $this->plugin_name;
726
+ }
727
+ // The wisdom_collect_email option is an array of plugins that are being tracked.
728
+ $collect_email = get_option( 'download_monitor_wisdom_collect_email' );
729
+ // If the user has agreed to allow tracking or if opt-in is not required.
730
+ if ( $can_collect ) {
731
+ if ( empty( $collect_email ) || ! is_array( $collect_email ) ) {
732
+ // If nothing exists in the option yet, start a new array with the plugin name.
733
+ $collect_email = array( $plugin => $plugin );
734
+ } else {
735
+ // Else add the plugin name to the array.
736
+ $collect_email[ $plugin ] = $plugin;
737
+ }
738
+ } else {
739
+ if ( isset( $collect_email[ $plugin ] ) ) {
740
+ unset( $collect_email[ $plugin ] );
741
+ }
742
+ }
743
+ update_option( 'download_monitor_wisdom_collect_email', $collect_email );
744
+ }
745
+
746
+ /**
747
+ * Get the correct email address to use
748
+ *
749
+ * @since 1.1.2
750
+ * @return Email address
751
+ */
752
+ public function get_admin_email() {
753
+ // The wisdom_collect_email option is an array of plugins that are being tracked.
754
+ $email = get_option( 'download_monitor_wisdom_admin_emails' );
755
+ // If this plugin is in the array, then we can collect the email address.
756
+ if ( isset( $email[ $this->plugin_name ] ) ) {
757
+ return $email[ $this->plugin_name ];
758
+ }
759
+ return false;
760
+ }
761
+
762
+ /**
763
+ * Set the correct email address to use
764
+ * There might be more than one admin on the site
765
+ * So we only use the first admin's email address
766
+ *
767
+ * @param $email Email address to set
768
+ * @param $plugin Plugin name to set email address for
769
+ * @since 1.1.2
770
+ */
771
+ public function set_admin_email( $email = null, $plugin = null ) {
772
+ if ( empty( $plugin ) ) {
773
+ $plugin = $this->plugin_name;
774
+ }
775
+ // If no email address passed, try to get the current user's email.
776
+ if ( empty( $email ) ) {
777
+ // Have to check that current user object is available.
778
+ if ( function_exists( 'wp_get_current_user' ) ) {
779
+ $current_user = wp_get_current_user();
780
+ $email = $current_user->user_email;
781
+ }
782
+ }
783
+ // The wisdom_admin_emails option is an array of admin email addresses.
784
+ $admin_emails = get_option( 'wisdom_admin_emails' );
785
+ if ( empty( $admin_emails ) || ! is_array( $admin_emails ) ) {
786
+ // If nothing exists in the option yet, start a new array with the plugin name.
787
+ $admin_emails = array( $plugin => sanitize_email( $email ) );
788
+ } elseif ( empty( $admin_emails[ $plugin ] ) ) {
789
+ // Else add the email address to the array, if not already set.
790
+ $admin_emails[ $plugin ] = sanitize_email( $email );
791
+ }
792
+ update_option( 'download_monitor_wisdom_admin_emails', $admin_emails );
793
+ }
794
+
795
+ /**
796
+ * Display the admin notice to users to allow them to opt in
797
+ *
798
+ * @since 1.0.0
799
+ */
800
+ public function optin_notice() {
801
+
802
+ // Check for plugin args.
803
+ if ( isset( $_GET['plugin'] ) && $this->plugin_name === $_GET['plugin'] && isset( $_GET['plugin_action'] ) ) {
804
+
805
+ $action = sanitize_text_field( wp_unslash($_GET['plugin_action']) );
806
+ if ( $action === 'yes' ) {
807
+ $this->set_is_tracking_allowed( true, $this->plugin_name );
808
+ // Run this straightaway.
809
+ add_action( 'admin_init', array( $this, 'do_tracking' ) );
810
+ } else {
811
+ $this->set_is_tracking_allowed( false, $this->plugin_name );
812
+ }
813
+ $this->update_block_notice( $this->plugin_name );
814
+ }
815
+
816
+ // Is it time to display the notification?.
817
+ $is_time = $this->get_is_notification_time();
818
+
819
+ if ( ! $is_time ) {
820
+ return false;
821
+ }
822
+
823
+ // Check whether to block the notice, e.g. because we're in a local environment.
824
+ // wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names.
825
+ $block_notice = get_option( 'download_monitor_wisdom_block_notice' );
826
+
827
+ if ( isset( $block_notice[ $this->plugin_name ] ) ) {
828
+ return;
829
+ }
830
+
831
+ if ( ! current_user_can( 'manage_options' ) ) {
832
+ return;
833
+ }
834
+
835
+ // @credit EDD.
836
+ // Don't bother asking user to opt in if they're in local dev.
837
+ $is_local = false;
838
+ if ( stristr( network_site_url( '/' ), '.dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
839
+ $is_local = true;
840
+ }
841
+ $is_local = apply_filters( 'wisdom_is_local_' . $this->plugin_name, $is_local );
842
+ if ( $is_local ) {
843
+ $this->update_block_notice();
844
+ } else {
845
+
846
+ // Display the notice requesting permission to track.
847
+ // Retrieve current plugin information.
848
+ $plugin = $this->plugin_data();
849
+ $plugin_name = $plugin['Name'];
850
+
851
+ // Args to add to query if user opts in to tracking.
852
+ $yes_args = array(
853
+ 'plugin' => $this->plugin_name,
854
+ 'plugin_action' => 'yes',
855
+ );
856
+
857
+ // Decide how to request permission to collect email addresses.
858
+ if ( $this->marketing == 1 ) {
859
+ // Option 1 combines permissions to track and collect email.
860
+ $yes_args['marketing_optin'] = 'no';
861
+ } elseif ( $this->marketing == 2 ) {
862
+ // Option 2 enables a second notice that fires after the user opts in to tracking.
863
+ $yes_args['marketing'] = 'no';
864
+ }
865
+ $url_yes = add_query_arg( $yes_args );
866
+ $url_no = add_query_arg(
867
+ array(
868
+ 'plugin' => $this->plugin_name,
869
+ 'plugin_action' => 'no',
870
+ )
871
+ );
872
+
873
+ // Decide on notice text.
874
+ if ( $this->marketing != 1 ) {
875
+ // Standard notice text.
876
+ $notice_text = sprintf(
877
+ __( 'Thank you for installing our %1$s. We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional. You can always opt out by going to Settings-> Advanced-> Tracking and uncheck the track data field.', 'download-monitor' ),
878
+ $this->what_am_i
879
+ );
880
+ } else {
881
+ // If we have option 1 for marketing, we include reference to sending product information here.
882
+ $notice_text = sprintf(
883
+ __( 'Thank you for installing our %1$s. We\'d like your permission to track its usage on your site and subscribe you to our newsletter. We won\'t record any sensitive data, only information regarding the WordPress environment and %1$s settings, which we will use to help us make improvements to the %1$s. Tracking is completely optional.You can always opt out by going to Settings-> Advanced-> Tracking and uncheck the track data field.', 'download-monitor' ),
884
+ $this->what_am_i
885
+ );
886
+ }
887
+ // And we allow you to filter the text anyway.
888
+ $notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
889
+
890
+ <div class="notice notice-info updated put-dismiss-notice">
891
+ <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
892
+ <p><?php echo esc_html( $notice_text ); ?></p>
893
+ <p>
894
+ <a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php echo esc_html__( 'Allow', 'download-monitor' ); ?></a>
895
+ <a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php echo esc_html__( 'Do Not Allow', 'download-monitor' ); ?></a>
896
+ </p>
897
+ </div>
898
+ <?php
899
+ }
900
+
901
+ }
902
+
903
+ /**
904
+ * Display the marketing notice to users if enabled
905
+ * Only displays after the user has opted in to tracking
906
+ *
907
+ * @since 1.0.0
908
+ */
909
+ public function marketing_notice() {
910
+ // Check if user has opted in to marketing.
911
+ if ( isset( $_GET['marketing_optin'] ) ) {
912
+ // Set marketing optin.
913
+ $this->set_can_collect_email( sanitize_text_field( wp_unslash($_GET['marketing_optin']) ), $this->plugin_name );
914
+ // Do tracking.
915
+ $this->do_tracking();
916
+ } elseif ( isset( $_GET['marketing'] ) && $_GET['marketing'] == 'yes' ) {
917
+ // Display the notice requesting permission to collect email address.
918
+ // Retrieve current plugin information.
919
+ $plugin = $this->plugin_data();
920
+ $plugin_name = $plugin['Name'];
921
+
922
+ $url_yes = add_query_arg(
923
+ array(
924
+ 'plugin' => $this->plugin_name,
925
+ 'marketing_optin' => 'yes',
926
+ )
927
+ );
928
+ $url_no = add_query_arg(
929
+ array(
930
+ 'plugin' => $this->plugin_name,
931
+ 'marketing_optin' => 'no',
932
+ )
933
+ );
934
+
935
+ $marketing_text = sprintf(
936
+ __( 'Thank you for opting in to tracking. Would you like to receive occasional news about this %s, including details of new features and special offers?', 'download-monitor' ),
937
+ $this->what_am_i
938
+ );
939
+ $marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text );
940
+ ?>
941
+
942
+ <div class="notice notice-info updated put-dismiss-notice">
943
+ <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
944
+ <p><?php echo esc_html( $marketing_text ); ?></p>
945
+ <p>
946
+ <a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php echo esc_html__( 'Yes Please', 'download-monitor' ); ?></a>
947
+ <a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php echo esc_html__( 'No Thank You', 'download-monitor' ); ?></a>
948
+ </p>
949
+ </div>
950
+ <?php
951
+ }
952
+ }
953
+
954
+ /**
955
+ * Filter the deactivation link to allow us to present a form when the user deactivates the plugin
956
+ *
957
+ * @since 1.0.0
958
+ */
959
+ public function filter_action_links( $links ) {
960
+
961
+ // Check to see if the user has opted in to tracking.
962
+ if ( ! $this->get_is_tracking_allowed() ) {
963
+ return $links;
964
+ }
965
+
966
+ if ( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
967
+ $deactivation_link = $links['deactivate'];
968
+ // Insert an onClick action to allow form before deactivating.
969
+ $deactivation_link = str_replace( '<a ', '<div class="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form-wrapper"><span class="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form" id="' . esc_attr( $this->plugin_name ) . '-put-goodbye-form"></span></div><a onclick="javascript:event.preventDefault();" id="' . esc_attr( $this->plugin_name ) . '-put-goodbye-link" ', $deactivation_link );
970
+ $links['deactivate'] = $deactivation_link;
971
+ }
972
+
973
+ return $links;
974
+ }
975
+
976
+ /*
977
+ * Form text strings
978
+ * These are non-filterable and used as fallback in case filtered strings aren't set correctly
979
+ * @since 1.0.0
980
+ */
981
+ public function form_default_text() {
982
+ $form = array();
983
+ $form['heading'] = __( 'Sorry to see you go', 'download-monitor' );
984
+ $form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'download-monitor' );
985
+ $form['options'] = array(
986
+ __( 'Set up is too difficult', 'download-monitor' ),
987
+ __( 'Lack of documentation', 'download-monitor' ),
988
+ __( 'Not the features I wanted', 'download-monitor' ),
989
+ __( 'Found a better plugin', 'download-monitor' ),
990
+ __( 'Installed by mistake', 'download-monitor' ),
991
+ __( 'Only required temporarily', 'download-monitor' ),
992
+ __( 'Didn\'t work', 'download-monitor' ),
993
+ );
994
+ $form['details'] = __( 'Details (optional)', 'download-monitor' );
995
+ return $form;
996
+ }
997
+
998
+ /**
999
+ * Form text strings
1000
+ * These can be filtered
1001
+ * The filter hook must be unique to the plugin
1002
+ *
1003
+ * @since 1.0.0
1004
+ */
1005
+ public function form_filterable_text() {
1006
+ $form = $this->form_default_text();
1007
+ return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
1008
+ }
1009
+
1010
+ /**
1011
+ * Form text strings
1012
+ * These can be filtered
1013
+ *
1014
+ * @since 1.0.0
1015
+ */
1016
+ public function goodbye_ajax() {
1017
+ // Get our strings for the form
1018
+ $form = $this->form_filterable_text();
1019
+
1020
+ if ( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
1021
+ // If the form hasn't been filtered correctly, we revert to the default form.
1022
+ $form = $this->form_default_text();
1023
+ }
1024
+ // Build the HTML to go in the form.
1025
+ $html = '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
1026
+ $html .= '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
1027
+
1028
+ if ( is_array( $form['options'] ) ) {
1029
+
1030
+ $html .= '<div class="'.esc_attr($this->plugin_name).'-put-goodbye-options"><p>';
1031
+ foreach ( $form['options'] as $option ) {
1032
+ $html .= '<input type="checkbox" name="'.esc_attr($this->plugin_name).'-put-goodbye-options[]" id="' . str_replace( ' ', '', esc_attr( $option ) ) . '" value="' . esc_attr( $option ) . '"> <label for="' . str_replace( ' ', '', esc_attr( $option ) ) . '">' . esc_html( $option ) . '</label><br>';
1033
+ }
1034
+ $html .= '</p><label for="'.esc_attr($this->plugin_name).'-put-goodbye-reasons">' . esc_html( $form['details'] ) . '</label><textarea name="'.esc_attr($this->plugin_name).'-put-goodbye-reasons" id="'.esc_attr($this->plugin_name).'-put-goodbye-reasons" rows="2" style="width:100%"></textarea>';
1035
+ $html .= '</div><!-- .put-goodbye-options -->';
1036
+ }
1037
+
1038
+ $html .= '</div><!-- .put-goodbye-form-body -->';
1039
+ $html .= '<p class="'.esc_attr($this->plugin_name).'-deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'download-monitor' ) . '</p>';
1040
+ ?>
1041
+ <div class="<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-bg"></div>
1042
+ <style type="text/css">
1043
+ .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-bg {
1044
+ background: rgba( 0, 0, 0, .5 );
1045
+ position: fixed;
1046
+ top: 0;
1047
+ left: 0;
1048
+ width: 100%;
1049
+ height: 100%;
1050
+ }
1051
+ .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper {
1052
+ position: fixed;
1053
+ z-index: 999;
1054
+ display: none;
1055
+ top:0;
1056
+ bottom:0;
1057
+ left:0;
1058
+ right:0;
1059
+ width:100vw;
1060
+ height:100vh;
1061
+ }
1062
+ .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper {
1063
+ display: block;
1064
+ }
1065
+ .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form {
1066
+ display: none;
1067
+ }
1068
+ .<?php echo esc_attr($this->plugin_name); ?>-put-form-active .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form {
1069
+ position: absolute;
1070
+ left:0;
1071
+ right:0;
1072
+ margin:0 auto;
1073
+ max-width: 400px;
1074
+ background: #fff;
1075
+ white-space: normal;
1076
+ top:50%;
1077
+ transform: translateY(-50%);
1078
+ }
1079
+ .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-head {
1080
+ background: #0073aa;
1081
+ color: #fff;
1082
+ padding: 8px 18px;
1083
+ }
1084
+ .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-body {
1085
+ padding: 8px 18px;
1086
+ color: #444;
1087
+ }
1088
+ .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner {
1089
+ display: none;
1090
+ }
1091
+ .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner .spinner {
1092
+ float: none;
1093
+ margin: 4px 4px 0 18px;
1094
+ vertical-align: bottom;
1095
+ visibility: visible;
1096
+ }
1097
+ .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer {
1098
+ padding: 8px 18px;
1099
+ }
1100
+ </style>
1101
+ <script>
1102
+ jQuery( document ).ready( function ( $ ) {
1103
+
1104
+ var url = document.getElementById( "<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-link" );
1105
+
1106
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-link" ).on( "click", function () {
1107
+ // We'll send the user to this deactivation link when they've completed or dismissed the form.
1108
+ $( 'body' ).toggleClass( '<?php echo esc_attr($this->plugin_name); ?>-put-form-active' );
1109
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).fadeIn();
1110
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).html( '<?php echo wp_kses_post( $html ); ?>' + '<div class="<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer"><p><a id="<?php echo esc_attr($this->plugin_name); ?>-put-submit-form" class="button primary" href="#"><?php echo esc_html__( 'Submit and Deactivate', 'download-monitor' ); ?></a>&nbsp;<a class="secondary button" href="' + url + '"><?php echo esc_html__( 'Just Deactivate', 'download-monitor' ); ?></a></p></div>' );
1111
+ } );
1112
+
1113
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).on( "click", "#<?php echo esc_attr( $this->plugin_name ); ?>-put-submit-form", function ( e ) {
1114
+ // As soon as we click, the body of the form should disappear.
1115
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-body" ).fadeOut();
1116
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-footer" ).fadeOut();
1117
+ // Fade in spinner.
1118
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form .<?php echo esc_attr($this->plugin_name); ?>-deactivating-spinner" ).fadeIn();
1119
+ e.preventDefault();
1120
+
1121
+ var values = new Array();
1122
+ $.each( $( "input[name='<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-options[]']:checked" ), function () {
1123
+ values.push( $( this ).val() );
1124
+ } );
1125
+
1126
+ var details = $( '#<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-reasons' ).val();
1127
+
1128
+ var data = {
1129
+ 'action' : '<?php echo esc_attr($this->plugin_name); ?>_goodbye_form',
1130
+ 'values' : values,
1131
+ 'details' : details,
1132
+ 'security': "<?php echo esc_js(wp_create_nonce( 'wisdom_goodbye_form' )); ?>",
1133
+ 'dataType': "json"
1134
+ }
1135
+
1136
+ $.post(
1137
+ ajaxurl,
1138
+ data,
1139
+ function ( response ) {
1140
+ // Redirect to original deactivation URL.
1141
+ window.location.href = url;
1142
+ }
1143
+ );
1144
+ } );
1145
+
1146
+ // If we click outside the form, the form will close.
1147
+ $( '.<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form' ).on( 'click', function (e) {
1148
+ e.stopPropagation();
1149
+ });
1150
+
1151
+ $( '.<?php echo esc_attr($this->plugin_name); ?>-put-goodbye-form-wrapper' ).on( 'click', function () {
1152
+ $( "#<?php echo esc_attr( $this->plugin_name ); ?>-put-goodbye-form" ).fadeOut();
1153
+ $( 'body' ).removeClass( '<?php echo esc_attr($this->plugin_name); ?>-put-form-active' );
1154
+ } );
1155
+ } );
1156
+ </script>
1157
+ <?php
1158
+ }
1159
+
1160
+ /**
1161
+ * AJAX callback when the form is submitted
1162
+ *
1163
+ * @since 1.0.0
1164
+ */
1165
+ public function goodbye_form_callback() {
1166
+
1167
+ check_ajax_referer( 'wisdom_goodbye_form', 'security' );
1168
+
1169
+ if ( isset( $_POST['values'] ) ) {
1170
+ $values = array_map( 'sanitize_text_field', wp_unslash( $_POST['values'] ) );
1171
+ $values = json_encode( $values );
1172
+ update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
1173
+ }
1174
+
1175
+ if ( isset( $_POST['details'] ) ) {
1176
+ $details = sanitize_text_field( wp_unslash($_POST['details']) );
1177
+ update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
1178
+ }
1179
+
1180
+ $this->do_tracking(); // Run this straightaway.
1181
+ echo 'success';
1182
+ wp_die();
1183
+ }
1184
+
1185
+ public function get_downloads() {
1186
+ $settings_class = new DLM_Admin_Settings();
1187
+ $args = array(
1188
+ 'numberposts' => -1,
1189
+ 'post_type' => 'dlm_download',
1190
+ );
1191
+ $downloads = get_posts( $args );
1192
+ $total_downloads = count( $downloads );
1193
+ $settings = $settings_class->get_settings();
1194
+ $formatted_settings = array();
1195
+ $licenses = array();
1196
+ $return_array = array();
1197
+
1198
+ if ( ! empty( $this->active_plugins ) ) {
1199
+ foreach ( $this->active_plugins as $plugin => $value ) {
1200
+ if ( 0 === strpos( $value, 'dlm' ) ) {
1201
+ $new_val = explode( '/', $value );
1202
+ $licenses[ $new_val[0] ] = get_option( $new_val[0] . '-license' );
1203
+ unset( $licenses[ $new_val[0] ][1] );
1204
+ }
1205
+ }
1206
+ }
1207
+
1208
+ $site_url = base64_encode( site_url() );
1209
+
1210
+ foreach ( $settings as $tab_key => $tab ) {
1211
+ foreach ( $tab['sections'] as $section_key => $section ) {
1212
+ if ( isset( $section['fields'] ) ) {
1213
+ foreach ( $section['fields'] as $field ) {
1214
+ if ( isset( $field['name'] ) ) {
1215
+ $formatted_settings[ $field['name'] ] = get_option( $field['name'] );
1216
+ }
1217
+ }
1218
+ }
1219
+ }
1220
+ }
1221
+
1222
+ $return_array['settings'] = $formatted_settings;
1223
+ $return_array['licenses'] = $licenses;
1224
+ $return_array['site_url'] = $site_url;
1225
+ $return_array['total_downloads'] = $total_downloads;
1226
+
1227
+ return $return_array;
1228
+
1229
+ }
1230
+
1231
+ /**
1232
+ * Add tracking options to uninstall process
1233
+ *
1234
+ * @param $options
1235
+ *
1236
+ * @return mixed
1237
+ */
1238
+ public function uninstall_options( $options ) {
1239
+
1240
+ $options[] = 'download_monitor_wisdom_last_track_time';
1241
+ //$options[] = 'download_monitor_troubleshooting_option';
1242
+ $options[] = 'download_monitor_wisdom_notification_times';
1243
+ $options[] = 'download_monitor_wisdom_block_notice';
1244
+ $options[] = 'download_monitor_wisdom_collect_email';
1245
+ $options[] = 'download_monitor_wisdom_admin_emails';
1246
+ $options[] = 'wisdom_deactivation_reason_' . $this->plugin_name;
1247
+ $options[] = 'wisdom_deactivation_details_' . $this->plugin_name;
1248
+ $options[] = $this->plugin_name . '_wisdom_tracking';
1249
+
1250
+ return $options;
1251
+
1252
+ }
1253
+
1254
+ /**
1255
+ * Add the optin setting
1256
+ *
1257
+ * @param $settings
1258
+ *
1259
+ * @return array
1260
+ */
1261
+ public function optin_tracking( $settings ) {
1262
+
1263
+ if ( isset( $settings['advanced'] ) ) {
1264
+
1265
+ $settings['advanced']['sections']['tracking'] = array(
1266
+ 'title' => __( 'Tracking', 'download-monitor' ),
1267
+ 'fields' => array(
1268
+ array(
1269
+ 'name' => $this->plugin_name.'_wisdom_tracking',
1270
+ 'std' => '0',
1271
+ 'label' => __( 'Track data', 'download-monitor' ),
1272
+ 'cb_label' => __( 'We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and Download Monitor settings, which we will use to help us make improvements.', 'download-monitor' ),
1273
+ 'desc' => '',
1274
+ 'type' => 'checkbox'
1275
+ ),
1276
+ )
1277
+ );
1278
+ }
1279
+
1280
+ return $settings;
1281
+
1282
+ }
1283
+
1284
+ /**
1285
+ * Default tracking
1286
+ *
1287
+ * @param $defaults
1288
+ *
1289
+ * @return mixed
1290
+ */
1291
+ public function default_tracking( $defaults ) {
1292
+
1293
+ $defaults[ $this->plugin_name . '_wisdom_tracking' ] = '1';
1294
+
1295
+ return $defaults;
1296
+
1297
+ }
1298
+
1299
+ }
1300
+
1301
+ }
 
readme.txt CHANGED
@@ -1,124 +1,124 @@
1
- === Download Monitor ===
2
- Contributors: wpchill, silkalns, barrykooij, mikejolley
3
- Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
- Requires at least: 5.4
5
- Tested up to: 5.9
6
- Stable tag: 4.5.2
7
- License: GPLv3
8
- Text Domain: -
9
- Requires PHP: 5.6
10
-
11
- Download Monitor is a plugin for selling, uploading and managing downloads, tracking downloads and displaying links.
12
-
13
- == Description ==
14
-
15
- Download Monitor provides an interface for uploading and managing downloadable files (including support for multiple versions), inserting download links into posts, logging downloads and selling downloads!
16
-
17
- = Features =
18
-
19
- * Add, edit and remove downloads from a familiar WP interface; Your downloads are just like posts.
20
- * Sell your downloads from within your WordPress website!
21
- * 100% Gutenberg compatible, including a new Download Monitor Download Block. Type /download to use it!
22
- * Quick-add panel for adding downloads / files whilst editing posts.
23
- * Add multiple file versions to your downloads each with their own data like download count and file links.
24
- * Define alternative links (mirrors) per download version.
25
- * Categorize, tag, or add other meta to your downloads.
26
- * Display download links on the frontend using shortcodes.
27
- * Change the way download links get displayed via template files.
28
- * Track downloads counts and log user download attempts.
29
- * Member only downloads, requires users to be logged in to download your files.
30
- * Customisable endpoints for showing pretty download links.
31
-
32
- Download Monitor has been featured on the websites of some of the most popular and leading businesses in the WordPress ecosystem, such as WPBeginner, Pagely, Jilt, WP Fusion & Kinsta.
33
-
34
- > #### Download Monitor Extensions
35
- > Extend the core Download Monitor plugin with it's powerful extensions.
36
- >
37
- > Some of our popular extensions include:
38
- - [Gravity Forms Gated Content](https://www.download-monitor.com/extensions/gravity-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-gravity-forms-lock) - easily create a download gate with Gravity Forms. Require users to fill-in a form before accessing a PDF any other type of download.
39
- - [Page Addon](https://www.download-monitor.com/extensions/page-addon/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-page-addon)
40
- - [MailChimp Download After Sign up](https://www.download-monitor.com/extensions/mailchimp-lock//?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-mailchimp-lock) - Allow access to file downloads only for people who already belong to a MailChimp mailing list. This extensions facilitates the download after sign up in a MailChimp list.
41
- - [Email Lock](https://www.download-monitor.com/extensions/email-lock/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-email-lock)
42
-
43
-
44
- >
45
- > Want to see more? [Browse All Extensions](https://www.download-monitor.com/extensions/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-browse-all)
46
-
47
- = Documentation =
48
- We have a large Knowledge Base on our [Download Monitor website](https://www.download-monitor.com/kb/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation) that contains documentation about how to how to setup and use Download Monitor.
49
-
50
- Are you a new Download Monitor user? Read these articles on how to get your files ready for download with Download Monitor:
51
-
52
- 1. [How to install Download Monitor](https://www.download-monitor.com/kb/install-and-activate-download-monitor//?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
53
- 2. [How to add your first download in Download Monitor](https://www.download-monitor.com/kb/adding-downloads-to-your-website/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
54
- 3. [How to list your first download on your website with the download shortcode](https://www.download-monitor.com/kb/shortcode-downloads/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
55
-
56
- More advanced topics that a lot of people find interesting:
57
-
58
- 1. [Learn more about the different ways you can style your download buttons](https://www.download-monitor.com/kb/content-templates/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
59
- 2. [Learn more about how to customize your download buttons](https://www.download-monitor.com/kb/overriding-content-templates/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
60
- 3. [Learn more about what actions and filters are available in Download Monitor](https://www.download-monitor.com/kb/action-and-filter-reference/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
61
-
62
- = Contributing and reporting bugs =
63
-
64
- You can contribute code to this plugin via GitHub: [https://github.com/WPChill/download-monitor](https://github.com/WPChill/download-monitor)
65
-
66
- You can contribute localizations via Transifex [https://www.transifex.com/projects/p/download-monitor/](https://www.transifex.com/projects/p/download-monitor/)
67
-
68
- = Support =
69
-
70
- Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/WPChill/download-monitor/issues/new/choose) instead where we can act upon it more efficiently.
71
-
72
- == Installation ==
73
-
74
- = Automatic installation =
75
-
76
- Automatic installation is the easiest option as WordPress handles the file transfers itself and you don't even need to leave your web browser. To do an automatic install, log in to your WordPress admin panel, navigate to the Plugins menu and click Add New.
77
-
78
- In the search field type "Download Monitor" and click Search Plugins. Once you've found the plugin you can view details about it such as the the point release, rating and description. Most importantly of course, you can install it by clicking _Install Now_.
79
-
80
- = Manual installation =
81
-
82
- The manual installation method involves downloading the plugin and uploading it to your webserver via your favourite FTP application.
83
-
84
- * Download the plugin file to your computer and unzip it
85
- * Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation's `wp-content/plugins/` directory.
86
- * Activate the plugin from the Plugins menu within the WordPress admin.
87
-
88
- == Frequently Asked Questions ==
89
-
90
- = Can I upload .xxx filetype using the uploader? =
91
-
92
- Download Monitor uses the WordPress uploader for uploading files. By default these formats are supported:
93
-
94
- * Images - .jpg, .jpeg, .png, .gif
95
- * Documents - .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx
96
- * Music - .mp3, .m4a, .ogg, .wav
97
- * Video - .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2
98
-
99
- To add more you can use a plugin, or filters. This post is a good resource for doing it with filters: [Change WordPress Upload Mime Types](http://www.paulund.co.uk/change-wordpress-upload-mime-types).
100
-
101
- = Can I link to external downloads? =
102
-
103
- Yes, you can use both local paths and external URLs.
104
-
105
- = My Download links 404 =
106
-
107
- Download links are powered by endpoints. If you find them 404'ing, go to Settings > Permalinks and save. This will flush the permalinks and allow our endpoints to be added.
108
-
109
- = Download counts are not increasing when I download something =
110
-
111
- Admin hits are not counted, log out and try!
112
-
113
- More documentation can be found in our [Knowledge Base](https://www.download-monitor.com/kb/).
114
-
115
- == Screenshots ==
116
-
117
- 1. Easily add downloads to your website with our Gutenberg block!
118
- 2. The main admin screen lists your downloads using familiar WordPress UI.
119
- 3. Easily add file information and multiple versions.
120
- 4. The quick add panel can be opened via a link about the post editor. This lets you quickly add a file and insert it into a post.
121
-
122
- == Changelog ==
123
-
124
- See <a href="https://github.com/WPChill/download-monitor/blob/master/changelog.txt" target="_blank">changelog</a>
1
+ === Download Monitor ===
2
+ Contributors: wpchill, silkalns, barrykooij, mikejolley
3
+ Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
+ Requires at least: 5.4
5
+ Tested up to: 5.9
6
+ Stable tag: 4.5.3
7
+ License: GPLv3
8
+ Text Domain: -
9
+ Requires PHP: 5.6
10
+
11
+ Download Monitor is a plugin for selling, uploading and managing downloads, tracking downloads and displaying links.
12
+
13
+ == Description ==
14
+
15
+ Download Monitor provides an interface for uploading and managing downloadable files (including support for multiple versions), inserting download links into posts, logging downloads and selling downloads!
16
+
17
+ = Features =
18
+
19
+ * Add, edit and remove downloads from a familiar WP interface; Your downloads are just like posts.
20
+ * Sell your downloads from within your WordPress website!
21
+ * 100% Gutenberg compatible, including a new Download Monitor Download Block. Type /download to use it!
22
+ * Quick-add panel for adding downloads / files whilst editing posts.
23
+ * Add multiple file versions to your downloads each with their own data like download count and file links.
24
+ * Define alternative links (mirrors) per download version.
25
+ * Categorize, tag, or add other meta to your downloads.
26
+ * Display download links on the frontend using shortcodes.
27
+ * Change the way download links get displayed via template files.
28
+ * Track downloads counts and log user download attempts.
29
+ * Member only downloads, requires users to be logged in to download your files.
30
+ * Customisable endpoints for showing pretty download links.
31
+
32
+ Download Monitor has been featured on the websites of some of the most popular and leading businesses in the WordPress ecosystem, such as WPBeginner, Pagely, Jilt, WP Fusion & Kinsta.
33
+
34
+ > #### Download Monitor Extensions
35
+ > Extend the core Download Monitor plugin with it's powerful extensions.
36
+ >
37
+ > Some of our popular extensions include:
38
+ - [Gravity Forms Gated Content](https://www.download-monitor.com/extensions/gravity-forms/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-gravity-forms-lock) - easily create a download gate with Gravity Forms. Require users to fill-in a form before accessing a PDF any other type of download.
39
+ - [Page Addon](https://www.download-monitor.com/extensions/page-addon/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-page-addon)
40
+ - [MailChimp Download After Sign up](https://www.download-monitor.com/extensions/mailchimp-lock//?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-mailchimp-lock) - Allow access to file downloads only for people who already belong to a MailChimp mailing list. This extensions facilitates the download after sign up in a MailChimp list.
41
+ - [Email Lock](https://www.download-monitor.com/extensions/email-lock/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-email-lock)
42
+
43
+
44
+ >
45
+ > Want to see more? [Browse All Extensions](https://www.download-monitor.com/extensions/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-block-browse-all)
46
+
47
+ = Documentation =
48
+ We have a large Knowledge Base on our [Download Monitor website](https://www.download-monitor.com/kb/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation) that contains documentation about how to how to setup and use Download Monitor.
49
+
50
+ Are you a new Download Monitor user? Read these articles on how to get your files ready for download with Download Monitor:
51
+
52
+ 1. [How to install Download Monitor](https://www.download-monitor.com/kb/install-and-activate-download-monitor//?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
53
+ 2. [How to add your first download in Download Monitor](https://www.download-monitor.com/kb/adding-downloads-to-your-website/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
54
+ 3. [How to list your first download on your website with the download shortcode](https://www.download-monitor.com/kb/shortcode-downloads/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
55
+
56
+ More advanced topics that a lot of people find interesting:
57
+
58
+ 1. [Learn more about the different ways you can style your download buttons](https://www.download-monitor.com/kb/content-templates/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
59
+ 2. [Learn more about how to customize your download buttons](https://www.download-monitor.com/kb/overriding-content-templates/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
60
+ 3. [Learn more about what actions and filters are available in Download Monitor](https://www.download-monitor.com/kb/action-and-filter-reference/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=description-documentation)
61
+
62
+ = Contributing and reporting bugs =
63
+
64
+ You can contribute code to this plugin via GitHub: [https://github.com/WPChill/download-monitor](https://github.com/WPChill/download-monitor)
65
+
66
+ You can contribute localizations via Transifex [https://www.transifex.com/projects/p/download-monitor/](https://www.transifex.com/projects/p/download-monitor/)
67
+
68
+ = Support =
69
+
70
+ Use the WordPress.org forums for community support. If you spot a bug, you can of course log it on [Github](https://github.com/WPChill/download-monitor/issues/new/choose) instead where we can act upon it more efficiently.
71
+
72
+ == Installation ==
73
+
74
+ = Automatic installation =
75
+
76
+ Automatic installation is the easiest option as WordPress handles the file transfers itself and you don't even need to leave your web browser. To do an automatic install, log in to your WordPress admin panel, navigate to the Plugins menu and click Add New.
77
+
78
+ In the search field type "Download Monitor" and click Search Plugins. Once you've found the plugin you can view details about it such as the the point release, rating and description. Most importantly of course, you can install it by clicking _Install Now_.
79
+
80
+ = Manual installation =
81
+
82
+ The manual installation method involves downloading the plugin and uploading it to your webserver via your favourite FTP application.
83
+
84
+ * Download the plugin file to your computer and unzip it
85
+ * Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation's `wp-content/plugins/` directory.
86
+ * Activate the plugin from the Plugins menu within the WordPress admin.
87
+
88
+ == Frequently Asked Questions ==
89
+
90
+ = Can I upload .xxx filetype using the uploader? =
91
+
92
+ Download Monitor uses the WordPress uploader for uploading files. By default these formats are supported:
93
+
94
+ * Images - .jpg, .jpeg, .png, .gif
95
+ * Documents - .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx
96
+ * Music - .mp3, .m4a, .ogg, .wav
97
+ * Video - .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2
98
+
99
+ To add more you can use a plugin, or filters. This post is a good resource for doing it with filters: [Change WordPress Upload Mime Types](http://www.paulund.co.uk/change-wordpress-upload-mime-types).
100
+
101
+ = Can I link to external downloads? =
102
+
103
+ Yes, you can use both local paths and external URLs.
104
+
105
+ = My Download links 404 =
106
+
107
+ Download links are powered by endpoints. If you find them 404'ing, go to Settings > Permalinks and save. This will flush the permalinks and allow our endpoints to be added.
108
+
109
+ = Download counts are not increasing when I download something =
110
+
111
+ Admin hits are not counted, log out and try!
112
+
113
+ More documentation can be found in our [Knowledge Base](https://www.download-monitor.com/kb/).
114
+
115
+ == Screenshots ==
116
+
117
+ 1. Easily add downloads to your website with our Gutenberg block!
118
+ 2. The main admin screen lists your downloads using familiar WordPress UI.
119
+ 3. Easily add file information and multiple versions.
120
+ 4. The quick add panel can be opened via a link about the post editor. This lets you quickly add a file and insert it into a post.
121
+
122
+ == Changelog ==
123
+
124
+ See <a href="https://github.com/WPChill/download-monitor/blob/master/changelog.txt" target="_blank">changelog</a>
src/Admin/Admin.php CHANGED
@@ -1,338 +1,338 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- /**
8
- * DLM_Admin class.
9
- *
10
- * TODO Future: Look into making this class smaller
11
- */
12
- class DLM_Admin {
13
-
14
- /**
15
- * Variable indicating if rewrites need a flush
16
- *
17
- * @var bool
18
- */
19
- private $need_rewrite_flush = false;
20
-
21
- /**
22
- * Setup actions etc.
23
- */
24
- public function setup() {
25
-
26
- // Directory protection
27
- add_filter( 'mod_rewrite_rules', array( $this, 'ms_files_protection' ) );
28
- add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
29
-
30
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
31
-
32
- add_action( 'init', array( $this, 'required_classes' ), 30 );
33
-
34
- // Admin menus
35
- add_action( 'admin_menu', array( $this, 'admin_menu' ), 20 );
36
-
37
- // setup settings
38
- $settings = new DLM_Admin_Settings();
39
- add_action( 'admin_init', array( $settings, 'register_settings' ) );
40
-
41
- $settings->register_lazy_load_callbacks();
42
-
43
- // setup settings page
44
- $settings_page = new DLM_Settings_Page();
45
- $settings_page->setup();
46
-
47
- // setup logs
48
- $log_page = new DLM_Log_Page();
49
- $log_page->setup();
50
-
51
- // setup report
52
- $reports_page = new DLM_Reports_Page();
53
- $reports_page->setup();
54
-
55
- // Dashboard
56
- add_action( 'wp_dashboard_setup', array( $this, 'admin_dashboard' ) );
57
-
58
- // Admin Footer Text
59
- add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
60
-
61
- // flush rewrite rules on shutdown
62
- add_action( 'shutdown', array( $this, 'maybe_flush_rewrites' ) );
63
-
64
- // filter attachment thumbnails in media library for files in dlm_uploads
65
- add_filter( 'wp_prepare_attachment_for_js', array( $this, 'filter_thumbnails_protected_files_grid' ), 10, 1 );
66
- add_filter( 'wp_get_attachment_image_src', array( $this, 'filter_thumbnails_protected_files_list' ), 10, 1 );
67
-
68
- // Legacy Upgrader
69
- $lu_check = new DLM_LU_Checker();
70
- if ( $lu_check->needs_upgrading() ) {
71
- $lu_message = new DLM_LU_Message();
72
- $lu_message->display();
73
- }
74
-
75
- }
76
-
77
- /**
78
- * ms_files_protection function.
79
- *
80
- * @access public
81
- *
82
- * @param mixed $rewrite
83
- *
84
- * @return string
85
- */
86
- public function ms_files_protection( $rewrite ) {
87
-
88
- if ( ! is_multisite() ) {
89
- return $rewrite;
90
- }
91
-
92
- $rule = "\n# DLM Rules - Protect Files from ms-files.php\n\n";
93
- $rule .= "<IfModule mod_rewrite.c>\n";
94
- $rule .= "RewriteEngine On\n";
95
- $rule .= "RewriteCond %{QUERY_STRING} file=dlm_uploads/ [NC]\n";
96
- $rule .= "RewriteRule /ms-files.php$ - [F]\n";
97
- $rule .= "</IfModule>\n\n";
98
-
99
- return $rule . $rewrite;
100
- }
101
-
102
- /**
103
- * upload_dir function.
104
- *
105
- * @access public
106
- *
107
- * @param mixed $pathdata
108
- *
109
- * @return array
110
- */
111
- public function upload_dir( $pathdata ) {
112
-
113
- // We don't process form we just modify the upload path for our custom post type.
114
- // phpcs:ignore
115
- if ( isset( $_POST['type'] ) && 'dlm_download' === $_POST['type'] ) {
116
- if ( empty( $pathdata['subdir'] ) ) {
117
- $pathdata['path'] = $pathdata['path'] . '/dlm_uploads';
118
- $pathdata['url'] = $pathdata['url'] . '/dlm_uploads';
119
- $pathdata['subdir'] = '/dlm_uploads';
120
- } else {
121
- $new_subdir = '/dlm_uploads' . $pathdata['subdir'];
122
-
123
- $pathdata['path'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['path'] );
124
- $pathdata['url'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['url'] );
125
- $pathdata['subdir'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['subdir'] );
126
- }
127
- }
128
-
129
- return $pathdata;
130
- }
131
-
132
- /**
133
- * filter attachment thumbnails in media library grid view for files in dlm_uploads
134
- *
135
- * @param array $response
136
- *
137
- * @return array
138
- */
139
- public function filter_thumbnails_protected_files_grid( $response ) {
140
-
141
- if ( apply_filters( 'dlm_filter_thumbnails_protected_files', true ) ) {
142
- $upload_dir = wp_upload_dir();
143
-
144
- if ( strpos( $response['url'], $upload_dir['baseurl'] . '/dlm_uploads' ) !== false ) {
145
- if ( ! empty( $response['sizes'] ) ) {
146
- $dlm_protected_thumb = download_monitor()->get_plugin_url() . '/assets/images/protected-file-thumbnail.png';
147
- foreach ( $response['sizes'] as $rs_key => $rs_val ) {
148
- $rs_val['url'] = $dlm_protected_thumb;
149
- $response['sizes'][ $rs_key ] = $rs_val;
150
- }
151
- }
152
- }
153
- }
154
-
155
- return $response;
156
- }
157
-
158
- /**
159
- * filter attachment thumbnails in media library list view for files in dlm_uploads
160
- *
161
- * @param bool|array $image
162
- *
163
- * @return bool|array
164
- */
165
- public function filter_thumbnails_protected_files_list( $image ) {
166
- if ( apply_filters( 'dlm_filter_thumbnails_protected_files', true ) ) {
167
- if ( $image ) {
168
-
169
- $upload_dir = wp_upload_dir();
170
-
171
- if ( strpos( $image[0], $upload_dir['baseurl'] . '/dlm_uploads' ) !== false ) {
172
- $image[0] = $dlm_protected_thumb = download_monitor()->get_plugin_url() . '/assets/images/protected-file-thumbnail.png';
173
- $image[1] = 60;
174
- $image[2] = 60;
175
- }
176
- }
177
-
178
- }
179
-
180
- return $image;
181
- }
182
-
183
- /**
184
- * admin_enqueue_scripts function.
185
- *
186
- * @access public
187
- * @return void
188
- */
189
- public function admin_enqueue_scripts( $hook ) {
190
- global $post;
191
-
192
- wp_enqueue_style( 'download_monitor_menu_css', download_monitor()->get_plugin_url() . '/assets/css/menu.css', array(), DLM_VERSION );
193
-
194
- if ( $hook == 'index.php' ) {
195
- wp_enqueue_style( 'download_monitor_dashboard_css', download_monitor()->get_plugin_url() . '/assets/css/dashboard.css', array(), DLM_VERSION );
196
- }
197
-
198
- $enqueue = false;
199
-
200
- if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' || 'term.php' == $hook ) {
201
- if (
202
- ( ! empty( $_GET['post_type'] ) && in_array( $_GET['post_type'], array(
203
- 'dlm_download',
204
- \Never5\DownloadMonitor\Shop\Util\PostType::KEY
205
- ) ) )
206
- ||
207
- ( ! empty( $post->post_type ) && in_array( $post->post_type, array(
208
- 'dlm_download',
209
- \Never5\DownloadMonitor\Shop\Util\PostType::KEY
210
- ) ) )
211
- ) {
212
- $enqueue = true;
213
- }
214
- }
215
-
216
- if ( strstr( $hook, 'dlm_download_page' ) ) {
217
- $enqueue = true;
218
- }
219
-
220
- if ( 'edit-tags.php' == $hook && isset( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], array( 'dlm_download_category', 'dlm_download_tag' ) ) ) {
221
- $enqueue = true;
222
- }
223
-
224
- if ( isset( $_GET['page'] ) && 'download-monitor-orders' === $_GET['page'] ) {
225
- $enqueue = true;
226
- }
227
-
228
- if ( ! $enqueue ) {
229
- return;
230
- }
231
-
232
- wp_enqueue_script( 'jquery-blockui', download_monitor()->get_plugin_url() . '/assets/js/blockui.min.js', array( 'jquery' ), '2.61' );
233
- wp_enqueue_script( 'jquery-ui-sortable' );
234
- wp_enqueue_script( 'jquery-ui-datepicker' );
235
- wp_enqueue_style( 'jquery-ui-style', download_monitor()->get_plugin_url() . '/assets/css/jquery-ui.css', array(), DLM_VERSION );
236
- wp_enqueue_style( 'download_monitor_admin_css', download_monitor()->get_plugin_url() . '/assets/css/admin.css', array( 'dashicons' ), DLM_VERSION );
237
- }
238
-
239
- /**
240
- * Add the admin menu on later hook so extensions can be add before this menu item
241
- */
242
- public function admin_menu() {
243
-
244
- /**
245
- * Hook for menu link
246
- *
247
- * @hooked DLM_Settings_Page add_settings_page() - 30
248
- * @hooked DLM_Admin_Extensions extensions_pages() - 30
249
- * @hooked DLM_Reports_Page add_admin_menu() - 30
250
- * @hooked DLM_Log_Page add_logs_menu() - 30
251
- * @hooked Orders orders_menu() - 30
252
- *
253
- */
254
- $links = apply_filters(
255
- 'dlm_admin_menu_links',
256
- array()
257
- );
258
-
259
- uasort( $links, array( 'DLM_Admin_Helper', 'sort_data_by_priority' ) );
260
- // Extensions page
261
-
262
- if ( ! empty( $links ) ) {
263
- foreach ( $links as $link ) {
264
- add_submenu_page( 'edit.php?post_type=dlm_download', $link['page_title'], $link['menu_title'], $link['capability'], $link['menu_slug'], $link['function'], $link['priority'] );
265
- }
266
- }
267
-
268
- }
269
-
270
- /**
271
- * Load our classes
272
- */
273
- public function required_classes() {
274
-
275
- // Loads the DLM Admin Extensions class
276
- // Add Extensions pages
277
- DLM_Admin_Extensions::get_instance();
278
-
279
- // Load the DLM Admin Helper class
280
- DLM_Admin_Helper::get_instance();
281
-
282
- // Load the DLM Uninstall class
283
- DLM_Uninstall::get_instance();
284
-
285
- }
286
-
287
-
288
- /**
289
- * admin_dashboard function.
290
- *
291
- * @access public
292
- * @return void
293
- */
294
- public function admin_dashboard() {
295
- new DLM_Admin_Dashboard();
296
- }
297
-
298
- /**
299
- * Change the admin footer text on Download Monitor admin pages
300
- *
301
- * @since 1.7
302
- *
303
- * @param string $footer_text
304
- *
305
- * @return string
306
- */
307
- public function admin_footer_text( $footer_text ) {
308
- $current_screen = get_current_screen();
309
-
310
- $dlm_page_ids = array(
311
- 'edit-dlm_download',
312
- 'dlm_download',
313
- 'edit-dlm_download_category',
314
- 'edit-dlm_download_tag',
315
- 'dlm_download_page_download-monitor-logs',
316
- 'dlm_download_page_download-monitor-settings',
317
- 'dlm_download_page_download-monitor-reports',
318
- 'dlm_download_page_dlm-extensions'
319
- );
320
-
321
- // Check to make sure we're on a Download Monitor admin page
322
- if ( isset( $current_screen->id ) && apply_filters( 'dlm_display_admin_footer_text', in_array( $current_screen->id, $dlm_page_ids ) ) ) {
323
- // Change the footer text
324
- $footer_text = sprintf( __( 'If you like %sDownload Monitor%s please leave us a %s★★★★★%s rating. A huge thank you from us in advance!', 'download-monitor' ), '<strong>', '</strong>', '<a href="https://wordpress.org/support/view/plugin-reviews/download-monitor?filter=5#postform" target="_blank">', '</a>' );
325
- }
326
-
327
- return $footer_text;
328
- }
329
-
330
- /**
331
- * Maybe flush rewrite rules
332
- */
333
- public function maybe_flush_rewrites() {
334
- if ( true == $this->need_rewrite_flush ) {
335
- flush_rewrite_rules();
336
- }
337
- }
338
  }
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ /**
8
+ * DLM_Admin class.
9
+ *
10
+ * TODO Future: Look into making this class smaller
11
+ */
12
+ class DLM_Admin {
13
+
14
+ /**
15
+ * Variable indicating if rewrites need a flush
16
+ *
17
+ * @var bool
18
+ */
19
+ private $need_rewrite_flush = false;
20
+
21
+ /**
22
+ * Setup actions etc.
23
+ */
24
+ public function setup() {
25
+
26
+ // Directory protection
27
+ add_filter( 'mod_rewrite_rules', array( $this, 'ms_files_protection' ) );
28
+ add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
29
+
30
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
31
+
32
+ add_action( 'init', array( $this, 'required_classes' ), 30 );
33
+
34
+ // Admin menus
35
+ add_action( 'admin_menu', array( $this, 'admin_menu' ), 20 );
36
+
37
+ // setup settings
38
+ $settings = new DLM_Admin_Settings();
39
+ add_action( 'admin_init', array( $settings, 'register_settings' ) );
40
+
41
+ $settings->register_lazy_load_callbacks();
42
+
43
+ // setup settings page
44
+ $settings_page = new DLM_Settings_Page();
45
+ $settings_page->setup();
46
+
47
+ // setup logs
48
+ $log_page = new DLM_Log_Page();
49
+ $log_page->setup();
50
+
51
+ // setup report
52
+ $reports_page = new DLM_Reports_Page();
53
+ $reports_page->setup();
54
+
55
+ // Dashboard
56
+ add_action( 'wp_dashboard_setup', array( $this, 'admin_dashboard' ) );
57
+
58
+ // Admin Footer Text
59
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
60
+
61
+ // flush rewrite rules on shutdown
62
+ add_action( 'shutdown', array( $this, 'maybe_flush_rewrites' ) );
63
+
64
+ // filter attachment thumbnails in media library for files in dlm_uploads
65
+ add_filter( 'wp_prepare_attachment_for_js', array( $this, 'filter_thumbnails_protected_files_grid' ), 10, 1 );
66
+ add_filter( 'wp_get_attachment_image_src', array( $this, 'filter_thumbnails_protected_files_list' ), 10, 1 );
67
+
68
+ // Legacy Upgrader
69
+ $lu_check = new DLM_LU_Checker();
70
+ if ( $lu_check->needs_upgrading() ) {
71
+ $lu_message = new DLM_LU_Message();
72
+ $lu_message->display();
73
+ }
74
+
75
+ }
76
+
77
+ /**
78
+ * ms_files_protection function.
79
+ *
80
+ * @access public
81
+ *
82
+ * @param mixed $rewrite
83
+ *
84
+ * @return string
85
+ */
86
+ public function ms_files_protection( $rewrite ) {
87
+
88
+ if ( ! is_multisite() ) {
89
+ return $rewrite;
90
+ }
91
+
92
+ $rule = "\n# DLM Rules - Protect Files from ms-files.php\n\n";
93
+ $rule .= "<IfModule mod_rewrite.c>\n";
94
+ $rule .= "RewriteEngine On\n";
95
+ $rule .= "RewriteCond %{QUERY_STRING} file=dlm_uploads/ [NC]\n";
96
+ $rule .= "RewriteRule /ms-files.php$ - [F]\n";
97
+ $rule .= "</IfModule>\n\n";
98
+
99
+ return $rule . $rewrite;
100
+ }
101
+
102
+ /**
103
+ * upload_dir function.
104
+ *
105
+ * @access public
106
+ *
107
+ * @param mixed $pathdata
108
+ *
109
+ * @return array
110
+ */
111
+ public function upload_dir( $pathdata ) {
112
+
113
+ // We don't process form we just modify the upload path for our custom post type.
114
+ // phpcs:ignore
115
+ if ( isset( $_POST['type'] ) && 'dlm_download' === $_POST['type'] ) {
116
+ if ( empty( $pathdata['subdir'] ) ) {
117
+ $pathdata['path'] = $pathdata['path'] . '/dlm_uploads';
118
+ $pathdata['url'] = $pathdata['url'] . '/dlm_uploads';
119
+ $pathdata['subdir'] = '/dlm_uploads';
120
+ } else {
121
+ $new_subdir = '/dlm_uploads' . $pathdata['subdir'];
122
+
123
+ $pathdata['path'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['path'] );
124
+ $pathdata['url'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['url'] );
125
+ $pathdata['subdir'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['subdir'] );
126
+ }
127
+ }
128
+
129
+ return $pathdata;
130
+ }
131
+
132
+ /**
133
+ * filter attachment thumbnails in media library grid view for files in dlm_uploads
134
+ *
135
+ * @param array $response
136
+ *
137
+ * @return array
138
+ */
139
+ public function filter_thumbnails_protected_files_grid( $response ) {
140
+
141
+ if ( apply_filters( 'dlm_filter_thumbnails_protected_files', true ) ) {
142
+ $upload_dir = wp_upload_dir();
143
+
144
+ if ( strpos( $response['url'], $upload_dir['baseurl'] . '/dlm_uploads' ) !== false ) {
145
+ if ( ! empty( $response['sizes'] ) ) {
146
+ $dlm_protected_thumb = download_monitor()->get_plugin_url() . '/assets/images/protected-file-thumbnail.png';
147
+ foreach ( $response['sizes'] as $rs_key => $rs_val ) {
148
+ $rs_val['url'] = $dlm_protected_thumb;
149
+ $response['sizes'][ $rs_key ] = $rs_val;
150
+ }
151
+ }
152
+ }
153
+ }
154
+
155
+ return $response;
156
+ }
157
+
158
+ /**
159
+ * filter attachment thumbnails in media library list view for files in dlm_uploads
160
+ *
161
+ * @param bool|array $image
162
+ *
163
+ * @return bool|array
164
+ */
165
+ public function filter_thumbnails_protected_files_list( $image ) {
166
+ if ( apply_filters( 'dlm_filter_thumbnails_protected_files', true ) ) {
167
+ if ( $image ) {
168
+
169
+ $upload_dir = wp_upload_dir();
170
+
171
+ if ( strpos( $image[0], $upload_dir['baseurl'] . '/dlm_uploads' ) !== false ) {
172
+ $image[0] = $dlm_protected_thumb = download_monitor()->get_plugin_url() . '/assets/images/protected-file-thumbnail.png';
173
+ $image[1] = 60;
174
+ $image[2] = 60;
175
+ }
176
+ }
177
+
178
+ }
179
+
180
+ return $image;
181
+ }
182
+
183
+ /**
184
+ * admin_enqueue_scripts function.
185
+ *
186
+ * @access public
187
+ * @return void
188
+ */
189
+ public function admin_enqueue_scripts( $hook ) {
190
+ global $post;
191
+
192
+ wp_enqueue_style( 'download_monitor_menu_css', download_monitor()->get_plugin_url() . '/assets/css/menu.css', array(), DLM_VERSION );
193
+
194
+ if ( $hook == 'index.php' ) {
195
+ wp_enqueue_style( 'download_monitor_dashboard_css', download_monitor()->get_plugin_url() . '/assets/css/dashboard.css', array(), DLM_VERSION );
196
+ }
197
+
198
+ $enqueue = false;
199
+
200
+ if ( $hook == 'post-new.php' || $hook == 'post.php' || $hook == 'edit.php' || 'term.php' == $hook ) {
201
+ if (
202
+ ( ! empty( $_GET['post_type'] ) && in_array( $_GET['post_type'], array(
203
+ 'dlm_download',
204
+ \Never5\DownloadMonitor\Shop\Util\PostType::KEY
205
+ ) ) )
206
+ ||
207
+ ( ! empty( $post->post_type ) && in_array( $post->post_type, array(
208
+ 'dlm_download',
209
+ \Never5\DownloadMonitor\Shop\Util\PostType::KEY
210
+ ) ) )
211
+ ) {
212
+ $enqueue = true;
213
+ }
214
+ }
215
+
216
+ if ( strstr( $hook, 'dlm_download_page' ) ) {
217
+ $enqueue = true;
218
+ }
219
+
220
+ if ( 'edit-tags.php' == $hook && isset( $_GET['taxonomy'] ) && in_array( $_GET['taxonomy'], array( 'dlm_download_category', 'dlm_download_tag' ) ) ) {
221
+ $enqueue = true;
222
+ }
223
+
224
+ if ( isset( $_GET['page'] ) && 'download-monitor-orders' === $_GET['page'] ) {
225
+ $enqueue = true;
226
+ }
227
+
228
+ if ( ! $enqueue ) {
229
+ return;
230
+ }
231
+
232
+ wp_enqueue_script( 'jquery-blockui', download_monitor()->get_plugin_url() . '/assets/js/blockui.min.js', array( 'jquery' ), '2.61' );
233
+ wp_enqueue_script( 'jquery-ui-sortable' );
234
+ wp_enqueue_script( 'jquery-ui-datepicker' );
235
+ wp_enqueue_style( 'jquery-ui-style', download_monitor()->get_plugin_url() . '/assets/css/jquery-ui.css', array(), DLM_VERSION );
236
+ wp_enqueue_style( 'download_monitor_admin_css', download_monitor()->get_plugin_url() . '/assets/css/admin.css', array( 'dashicons' ), DLM_VERSION );
237
+ }
238
+
239
+ /**
240
+ * Add the admin menu on later hook so extensions can be add before this menu item
241
+ */
242
+ public function admin_menu() {
243
+
244
+ /**
245
+ * Hook for menu link
246
+ *
247
+ * @hooked DLM_Settings_Page add_settings_page() - 30
248
+ * @hooked DLM_Admin_Extensions extensions_pages() - 30
249
+ * @hooked DLM_Reports_Page add_admin_menu() - 30
250
+ * @hooked DLM_Log_Page add_logs_menu() - 30
251
+ * @hooked Orders orders_menu() - 30
252
+ *
253
+ */
254
+ $links = apply_filters(
255
+ 'dlm_admin_menu_links',
256
+ array()
257
+ );
258
+
259
+ uasort( $links, array( 'DLM_Admin_Helper', 'sort_data_by_priority' ) );
260
+ // Extensions page
261
+
262
+ if ( ! empty( $links ) ) {
263
+ foreach ( $links as $link ) {
264
+ add_submenu_page( 'edit.php?post_type=dlm_download', $link['page_title'], $link['menu_title'], $link['capability'], $link['menu_slug'], $link['function'], $link['priority'] );
265
+ }
266
+ }
267
+
268
+ }
269
+
270
+ /**
271
+ * Load our classes
272
+ */
273
+ public function required_classes() {
274
+
275
+ // Loads the DLM Admin Extensions class
276
+ // Add Extensions pages
277
+ DLM_Admin_Extensions::get_instance();
278
+
279
+ // Load the DLM Admin Helper class
280
+ DLM_Admin_Helper::get_instance();
281
+
282
+ // Load the DLM Uninstall class
283
+ DLM_Uninstall::get_instance();
284
+
285
+ }
286
+
287
+
288
+ /**
289
+ * admin_dashboard function.
290
+ *
291
+ * @access public
292
+ * @return void
293
+ */
294
+ public function admin_dashboard() {
295
+ new DLM_Admin_Dashboard();
296
+ }
297
+
298
+ /**
299
+ * Change the admin footer text on Download Monitor admin pages
300
+ *
301
+ * @since 1.7
302
+ *
303
+ * @param string $footer_text
304
+ *
305
+ * @return string
306
+ */
307
+ public function admin_footer_text( $footer_text ) {
308
+ $current_screen = get_current_screen();
309
+
310
+ $dlm_page_ids = array(
311
+ 'edit-dlm_download',
312
+ 'dlm_download',
313
+ 'edit-dlm_download_category',
314
+ 'edit-dlm_download_tag',
315
+ 'dlm_download_page_download-monitor-logs',
316
+ 'dlm_download_page_download-monitor-settings',
317
+ 'dlm_download_page_download-monitor-reports',
318
+ 'dlm_download_page_dlm-extensions'
319
+ );
320
+
321
+ // Check to make sure we're on a Download Monitor admin page
322
+ if ( isset( $current_screen->id ) && apply_filters( 'dlm_display_admin_footer_text', in_array( $current_screen->id, $dlm_page_ids ) ) ) {
323
+ // Change the footer text
324
+ $footer_text = sprintf( __( 'If you like %sDownload Monitor%s please leave us a %s★★★★★%s rating. A huge thank you from us in advance!', 'download-monitor' ), '<strong>', '</strong>', '<a href="https://wordpress.org/support/view/plugin-reviews/download-monitor?filter=5#postform" target="_blank">', '</a>' );
325
+ }
326
+
327
+ return $footer_text;
328
+ }
329
+
330
+ /**
331
+ * Maybe flush rewrite rules
332
+ */
333
+ public function maybe_flush_rewrites() {
334
+ if ( true == $this->need_rewrite_flush ) {
335
+ flush_rewrite_rules();
336
+ }
337
+ }
338
  }
src/Admin/AdminScripts.php CHANGED
@@ -1,225 +1,225 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- class DLM_Admin_Scripts {
8
-
9
- /**
10
- * Setup hooks
11
- */
12
- public function setup() {
13
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
14
- }
15
-
16
- /**
17
- * Enqueue admin scripts
18
- */
19
- public function enqueue_scripts() {
20
- global $pagenow, $post;
21
-
22
- $dlm = download_monitor();
23
-
24
- // Enqueue Edit Post JS
25
- wp_enqueue_script(
26
- 'dlm_insert_download',
27
- plugins_url( '/assets/js/insert-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
28
- array( 'jquery' ),
29
- DLM_VERSION
30
- );
31
-
32
- // Notices JS
33
- wp_enqueue_script(
34
- 'dlm_notices',
35
- plugins_url( '/assets/js/notices' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
36
- array( 'jquery' ),
37
- DLM_VERSION
38
- );
39
-
40
- // Make JavaScript strings translatable
41
- wp_localize_script( 'dlm_insert_download', 'dlm_id_strings', $this->get_strings( 'edit-post' ) );
42
-
43
- if ( $pagenow == 'post.php' || $pagenow == 'post-new.php' ) {
44
-
45
- // Enqueue Downloadable Files Metabox JS
46
- if (
47
- ( $pagenow == 'post.php' && isset( $post ) && 'dlm_download' === $post->post_type )
48
- ||
49
- ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && 'dlm_download' == $_GET['post_type'] )
50
- ) {
51
-
52
- // Enqueue Edit Download JS
53
- wp_enqueue_script(
54
- 'dlm_edit_download',
55
- plugins_url( '/assets/js/edit-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
56
- array( 'jquery' ),
57
- DLM_VERSION
58
- );
59
-
60
- // Make JavaScript strings translatable
61
- wp_localize_script( 'dlm_edit_download', 'dlm_ed_strings', $this->get_strings( 'edit-download' ) );
62
- }
63
-
64
- // Enqueue Downloadable Files Metabox JS
65
- if (
66
- ( $pagenow == 'post.php' && isset( $post ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY === $post->post_type )
67
- ||
68
- ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY == $_GET['post_type'] )
69
- ) {
70
-
71
- // Enqueue Select2
72
- wp_enqueue_script(
73
- 'dlm_select2',
74
- plugins_url( '/assets/js/select2/select2.min.js', $dlm->get_plugin_file() ),
75
- array( 'jquery' ),
76
- DLM_VERSION
77
- );
78
-
79
- wp_enqueue_style( 'dlm_select2_css', download_monitor()->get_plugin_url() . '/assets/js/select2/select2.min.css' );
80
-
81
- // Enqueue Edit Product JS
82
- wp_enqueue_script(
83
- 'dlm_edit_product',
84
- plugins_url( '/assets/js/shop/edit-product' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
85
- array( 'jquery', 'dlm_select2' ),
86
- DLM_VERSION
87
- );
88
-
89
- // Make JavaScript strings translatable
90
- wp_localize_script( 'dlm_edit_product', 'dlm_ep_strings', $this->get_strings( 'edit-product' ) );
91
- }
92
-
93
- }
94
-
95
- if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'dlm_download' === $_GET['post_type'] && ! isset( $_GET['page'] ) ) {
96
-
97
- // Enqueue Settings JS
98
- wp_enqueue_script(
99
- 'dlm_download_overview',
100
- plugins_url( '/assets/js/overview-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
101
- array( 'jquery' ),
102
- DLM_VERSION,
103
- true
104
- );
105
-
106
- }
107
-
108
- if ( 'edit.php' == $pagenow && isset( $_GET['page'] ) && 'download-monitor-reports' === $_GET['page'] ) {
109
-
110
- // Enqueue Reports JS
111
- wp_enqueue_script(
112
- 'dlm_reports_chartjs',
113
- plugins_url( '/assets/js/reports/charts.min.js', $dlm->get_plugin_file() ),
114
- array( 'jquery' ),
115
- DLM_VERSION,
116
- true
117
- );
118
-
119
- wp_enqueue_script(
120
- 'dlm_reports',
121
- plugins_url( '/assets/js/reports/reports.js', $dlm->get_plugin_file() ),
122
- array( 'jquery' ),
123
- DLM_VERSION,
124
- true
125
- );
126
-
127
- // Make JavaScript strings translatable
128
- wp_localize_script( 'dlm_reports', 'dlm_rs', $this->get_strings( 'reports' ) );
129
-
130
- wp_enqueue_script(
131
- 'dlm_reports_date_range_selector',
132
- plugins_url( '/assets/js/reports/charts-date-range-selector' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
133
- array( 'jquery' ),
134
- DLM_VERSION,
135
- true
136
- );
137
-
138
- }
139
-
140
- if ( 'edit.php' == $pagenow && isset( $_GET['page'] ) && ( 'download-monitor-settings' === $_GET['page'] || 'dlm-extensions' === $_GET['page'] ) ) {
141
-
142
- // Enqueue Settings JS
143
- wp_enqueue_script(
144
- 'dlm_settings',
145
- plugins_url( '/assets/js/settings' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
146
- array( 'jquery' ),
147
- DLM_VERSION
148
- );
149
-
150
- wp_localize_script( 'dlm_settings', 'dlm_settings_vars', array(
151
- 'img_path' => download_monitor()->get_plugin_url() . '/assets/images/',
152
- 'lazy_select_nonce' => wp_create_nonce( 'dlm-settings-lazy-select-nonce' ),
153
- 'settings_url' => DLM_Admin_Settings::get_url()
154
- ) );
155
-
156
- }
157
-
158
- // This should handle all extensions activation and deactivation single-handed
159
- if ( isset($_GET['page']) && 'dlm-installed-extensions' === $_GET['page'] ) {
160
-
161
- // Enqueue Extesions JS
162
- wp_enqueue_script(
163
- 'dlm_extensions',
164
- plugins_url( '/assets/js/extensions' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
165
- array( 'jquery' ),
166
- DLM_VERSION
167
- );
168
- }
169
-
170
- if ( 'options.php' == $pagenow && isset( $_GET['page'] ) && 'dlm_legacy_upgrade' === $_GET['page'] ) {
171
-
172
- // Enqueue Settings JS
173
- wp_enqueue_script(
174
- 'dlm_legacy_upgrader',
175
- plugins_url( '/assets/js/legacy-upgrader/build/bundle.js', $dlm->get_plugin_file() ),
176
- array(),
177
- DLM_VERSION
178
- );
179
-
180
- wp_localize_script( 'dlm_legacy_upgrader', 'dlm_lu_vars', array(
181
- 'nonce' => wp_create_nonce( 'dlm_legacy_upgrade' ),
182
- 'assets_path' => plugins_url( '/assets/js/legacy-upgrader/build/assets/', $dlm->get_plugin_file() )
183
- ) );
184
-
185
- wp_enqueue_style( 'dlm_legacy_upgrader_css', download_monitor()->get_plugin_url() . '/assets/js/legacy-upgrader/build/style.css' );
186
- }
187
-
188
- do_action( 'dlm_admin_scripts_after' );
189
-
190
- }
191
-
192
- /**
193
- * Get JS strings
194
- *
195
- * @param $file
196
- *
197
- * @return array
198
- */
199
- private function get_strings( $file ) {
200
- switch ( $file ) {
201
- case 'edit-post':
202
- $strings = array(
203
- 'insert_download' => __( 'Insert Download', 'download-monitor' )
204
- );
205
- break;
206
- case 'edit-download':
207
- $strings = array(
208
- 'confirm_delete' => __( 'Are you sure you want to delete this file ? ', 'download - monitor' ),
209
- 'browse_file' => __( 'Browse for a file', 'download - monitor' ),
210
- );
211
- break;
212
- case 'reports':
213
- $strings = array(
214
- 'ajax_nonce' => wp_create_nonce( 'dlm_reports_data' ),
215
- 'img_path' => download_monitor()->get_plugin_url() . '/assets/images/',
216
- );
217
- break;
218
- default:
219
- $strings = array();
220
- }
221
-
222
- return $strings;
223
- }
224
-
225
  }
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ class DLM_Admin_Scripts {
8
+
9
+ /**
10
+ * Setup hooks
11
+ */
12
+ public function setup() {
13
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
14
+ }
15
+
16
+ /**
17
+ * Enqueue admin scripts
18
+ */
19
+ public function enqueue_scripts() {
20
+ global $pagenow, $post;
21
+
22
+ $dlm = download_monitor();
23
+
24
+ // Enqueue Edit Post JS
25
+ wp_enqueue_script(
26
+ 'dlm_insert_download',
27
+ plugins_url( '/assets/js/insert-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
28
+ array( 'jquery' ),
29
+ DLM_VERSION
30
+ );
31
+
32
+ // Notices JS
33
+ wp_enqueue_script(
34
+ 'dlm_notices',
35
+ plugins_url( '/assets/js/notices' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
36
+ array( 'jquery' ),
37
+ DLM_VERSION
38
+ );
39
+
40
+ // Make JavaScript strings translatable
41
+ wp_localize_script( 'dlm_insert_download', 'dlm_id_strings', $this->get_strings( 'edit-post' ) );
42
+
43
+ if ( $pagenow == 'post.php' || $pagenow == 'post-new.php' ) {
44
+
45
+ // Enqueue Downloadable Files Metabox JS
46
+ if (
47
+ ( $pagenow == 'post.php' && isset( $post ) && 'dlm_download' === $post->post_type )
48
+ ||
49
+ ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && 'dlm_download' == $_GET['post_type'] )
50
+ ) {
51
+
52
+ // Enqueue Edit Download JS
53
+ wp_enqueue_script(
54
+ 'dlm_edit_download',
55
+ plugins_url( '/assets/js/edit-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
56
+ array( 'jquery' ),
57
+ DLM_VERSION
58
+ );
59
+
60
+ // Make JavaScript strings translatable
61
+ wp_localize_script( 'dlm_edit_download', 'dlm_ed_strings', $this->get_strings( 'edit-download' ) );
62
+ }
63
+
64
+ // Enqueue Downloadable Files Metabox JS
65
+ if (
66
+ ( $pagenow == 'post.php' && isset( $post ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY === $post->post_type )
67
+ ||
68
+ ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && \Never5\DownloadMonitor\Shop\Util\PostType::KEY == $_GET['post_type'] )
69
+ ) {
70
+
71
+ // Enqueue Select2
72
+ wp_enqueue_script(
73
+ 'dlm_select2',
74
+ plugins_url( '/assets/js/select2/select2.min.js', $dlm->get_plugin_file() ),
75
+ array( 'jquery' ),
76
+ DLM_VERSION
77
+ );
78
+
79
+ wp_enqueue_style( 'dlm_select2_css', download_monitor()->get_plugin_url() . '/assets/js/select2/select2.min.css' );
80
+
81
+ // Enqueue Edit Product JS
82
+ wp_enqueue_script(
83
+ 'dlm_edit_product',
84
+ plugins_url( '/assets/js/shop/edit-product' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
85
+ array( 'jquery', 'dlm_select2' ),
86
+ DLM_VERSION
87
+ );
88
+
89
+ // Make JavaScript strings translatable
90
+ wp_localize_script( 'dlm_edit_product', 'dlm_ep_strings', $this->get_strings( 'edit-product' ) );
91
+ }
92
+
93
+ }
94
+
95
+ if ( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && 'dlm_download' === $_GET['post_type'] && ! isset( $_GET['page'] ) ) {
96
+
97
+ // Enqueue Settings JS
98
+ wp_enqueue_script(
99
+ 'dlm_download_overview',
100
+ plugins_url( '/assets/js/overview-download' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
101
+ array( 'jquery' ),
102
+ DLM_VERSION,
103
+ true
104
+ );
105
+
106
+ }
107
+
108
+ if ( 'edit.php' == $pagenow && isset( $_GET['page'] ) && 'download-monitor-reports' === $_GET['page'] ) {
109
+
110
+ // Enqueue Reports JS
111
+ wp_enqueue_script(
112
+ 'dlm_reports_chartjs',
113
+ plugins_url( '/assets/js/reports/charts.min.js', $dlm->get_plugin_file() ),
114
+ array( 'jquery' ),
115
+ DLM_VERSION,
116
+ true
117
+ );
118
+
119
+ wp_enqueue_script(
120
+ 'dlm_reports',
121
+ plugins_url( '/assets/js/reports/reports.js', $dlm->get_plugin_file() ),
122
+ array( 'jquery' ),
123
+ DLM_VERSION,
124
+ true
125
+ );
126
+
127
+ // Make JavaScript strings translatable
128
+ wp_localize_script( 'dlm_reports', 'dlm_rs', $this->get_strings( 'reports' ) );
129
+
130
+ wp_enqueue_script(
131
+ 'dlm_reports_date_range_selector',
132
+ plugins_url( '/assets/js/reports/charts-date-range-selector' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
133
+ array( 'jquery' ),
134
+ DLM_VERSION,
135
+ true
136
+ );
137
+
138
+ }
139
+
140
+ if ( 'edit.php' == $pagenow && isset( $_GET['page'] ) && ( 'download-monitor-settings' === $_GET['page'] || 'dlm-extensions' === $_GET['page'] ) ) {
141
+
142
+ // Enqueue Settings JS
143
+ wp_enqueue_script(
144
+ 'dlm_settings',
145
+ plugins_url( '/assets/js/settings' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
146
+ array( 'jquery' ),
147
+ DLM_VERSION
148
+ );
149
+
150
+ wp_localize_script( 'dlm_settings', 'dlm_settings_vars', array(
151
+ 'img_path' => download_monitor()->get_plugin_url() . '/assets/images/',
152
+ 'lazy_select_nonce' => wp_create_nonce( 'dlm-settings-lazy-select-nonce' ),
153
+ 'settings_url' => DLM_Admin_Settings::get_url()
154
+ ) );
155
+
156
+ }
157
+
158
+ // This should handle all extensions activation and deactivation single-handed
159
+ if ( isset($_GET['page']) && 'dlm-installed-extensions' === $_GET['page'] ) {
160
+
161
+ // Enqueue Extesions JS
162
+ wp_enqueue_script(
163
+ 'dlm_extensions',
164
+ plugins_url( '/assets/js/extensions' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', $dlm->get_plugin_file() ),
165
+ array( 'jquery' ),
166
+ DLM_VERSION
167
+ );
168
+ }
169
+
170
+ if ( 'options.php' == $pagenow && isset( $_GET['page'] ) && 'dlm_legacy_upgrade' === $_GET['page'] ) {
171
+
172
+ // Enqueue Settings JS
173
+ wp_enqueue_script(
174
+ 'dlm_legacy_upgrader',
175
+ plugins_url( '/assets/js/legacy-upgrader/build/bundle.js', $dlm->get_plugin_file() ),
176
+ array(),
177
+ DLM_VERSION
178
+ );
179
+
180
+ wp_localize_script( 'dlm_legacy_upgrader', 'dlm_lu_vars', array(
181
+ 'nonce' => wp_create_nonce( 'dlm_legacy_upgrade' ),
182
+ 'assets_path' => plugins_url( '/assets/js/legacy-upgrader/build/assets/', $dlm->get_plugin_file() )
183
+ ) );
184
+
185
+ wp_enqueue_style( 'dlm_legacy_upgrader_css', download_monitor()->get_plugin_url() . '/assets/js/legacy-upgrader/build/style.css' );
186
+ }
187
+
188
+ do_action( 'dlm_admin_scripts_after' );
189
+
190
+ }
191
+
192
+ /**
193
+ * Get JS strings
194
+ *
195
+ * @param $file
196
+ *
197
+ * @return array
198
+ */
199
+ private function get_strings( $file ) {
200
+ switch ( $file ) {
201
+ case 'edit-post':
202
+ $strings = array(
203
+ 'insert_download' => __( 'Insert Download', 'download-monitor' )
204
+ );
205
+ break;
206
+ case 'edit-download':
207
+ $strings = array(
208
+ 'confirm_delete' => __( 'Are you sure you want to delete this file ? ', 'download-monitor' ),
209
+ 'browse_file' => __( 'Browse for a file', 'download-monitor' ),
210
+ );
211
+ break;
212
+ case 'reports':
213
+ $strings = array(
214
+ 'ajax_nonce' => wp_create_nonce( 'dlm_reports_data' ),
215
+ 'img_path' => download_monitor()->get_plugin_url() . '/assets/images/',
216
+ );
217
+ break;
218
+ default:
219
+ $strings = array();
220
+ }
221
+
222
+ return $strings;
223
+ }
224
+
225
  }
src/Admin/Dashboard.php CHANGED
@@ -70,8 +70,8 @@ class DLM_Admin_Dashboard {
70
  <table class="download_chart" cellpadding="0" cellspacing="0">
71
  <thead>
72
  <tr>
73
- <th scope="col"><?php echo esc_html__( 'Download', "download_monitor" ); ?></th>
74
- <th scope="col"><?php echo esc_html__( 'Download count', "download_monitor" ); ?></th>
75
  </tr>
76
  </thead>
77
  <tbody>
70
  <table class="download_chart" cellpadding="0" cellspacing="0">
71
  <thead>
72
  <tr>
73
+ <th scope="col"><?php echo esc_html__( 'Download', "download-monitor" ); ?></th>
74
+ <th scope="col"><?php echo esc_html__( 'Download count', "download-monitor" ); ?></th>
75
  </tr>
76
  </thead>
77
  <tbody>
src/Admin/Extensions.php CHANGED
@@ -246,10 +246,6 @@ class DLM_Admin_Extensions {
246
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
247
  <h1>
248
  <?php echo esc_html__( 'Download Monitor Extensions', 'download-monitor' ); ?>
249
- <a href="<?php echo esc_url( add_query_arg( 'dlm-force-recheck', '1', admin_url( 'edit.php?post_type=dlm_download&page=dlm-extensions' ) ) ); ?>"
250
- class="button dlm-reload-button">
251
- <?php esc_html_e( 'Reload Extensions', 'download-monitor' ); ?>
252
- </a>
253
  </h1>
254
  <?php
255
 
@@ -274,6 +270,10 @@ class DLM_Admin_Extensions {
274
  <h2 class="nav-tab-wrapper">
275
  <?php DLM_Admin_Helper::dlm_tab_navigation( $this->tabs, $active_tab ); ?>
276
  </h2>
 
 
 
 
277
  <?php
278
 
279
  // Available Extensions
@@ -301,12 +301,12 @@ class DLM_Admin_Extensions {
301
  }
302
 
303
  echo '<div class="dlm_extension">';
304
- echo '<a href="' . esc_url( $extension->url ) . '?utm_source=plugin&utm_medium=extension-block&utm_campaign=' . esc_attr( $extension->name ) . '" target="_blank">';
305
  echo '<div class="dlm_extension_img_wrapper"><img src="' . esc_url( $extension->image ) . '" alt="' . esc_attr( $extension->name ) . '" /></div>';
306
  echo '<h3>' . esc_html( $extension->name ) . '</h3>';
307
  echo '<div class="extension-desc">' . wp_kses_post( $extension->desc ) . '</div>';
308
  echo '<div class="product_footer">';
309
- echo '<div class="button button-secondary loop_more">' . esc_html__( 'View Extension', 'download-monitor' ) . '<span class="dashicons dashicons-external"></span></div>';
310
  echo '</div>';
311
  echo '</a>';
312
  echo '</div>';
@@ -344,10 +344,7 @@ class DLM_Admin_Extensions {
344
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
345
  <h1>
346
  <?php esc_html_e( 'Download Monitor Installed Extensions', 'download-monitor' ); ?>
347
- <a href="<?php echo esc_url( add_query_arg( 'dlm-force-recheck', '1', admin_url( 'edit.php?post_type=dlm_download&page=dlm-extensions' ) ) ); ?>"
348
- class="button dlm-reload-button">
349
- <?php esc_html_e( 'Reload Extensions', 'download-monitor' ); ?>
350
- </a>
351
  </h1>
352
  <?php
353
 
@@ -362,7 +359,12 @@ class DLM_Admin_Extensions {
362
  DLM_Admin_Helper::dlm_tab_navigation( $this->tabs, $active_tab );
363
 
364
  echo '</h2>';
365
-
 
 
 
 
 
366
  // Installed Extensions
367
  if ( count( $this->installed_extensions ) > 0 ) {
368
 
246
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
247
  <h1>
248
  <?php echo esc_html__( 'Download Monitor Extensions', 'download-monitor' ); ?>
 
 
 
 
249
  </h1>
250
  <?php
251
 
270
  <h2 class="nav-tab-wrapper">
271
  <?php DLM_Admin_Helper::dlm_tab_navigation( $this->tabs, $active_tab ); ?>
272
  </h2>
273
+ <a href="<?php echo esc_url( add_query_arg( 'dlm-force-recheck', '1', admin_url( 'edit.php?post_type=dlm_download&page=dlm-extensions' ) ) ); ?>"
274
+ class="button dlm-reload-button">
275
+ <?php esc_html_e( 'Reload Extensions', 'download-monitor' ); ?>
276
+ </a>
277
  <?php
278
 
279
  // Available Extensions
301
  }
302
 
303
  echo '<div class="dlm_extension">';
304
+ echo '<a href="https://www.download-monitor.com/pricing/?utm_source=plugin&utm_medium=extension-block&utm_campaign=' . esc_attr( $extension->name ) . '" target="_blank">';
305
  echo '<div class="dlm_extension_img_wrapper"><img src="' . esc_url( $extension->image ) . '" alt="' . esc_attr( $extension->name ) . '" /></div>';
306
  echo '<h3>' . esc_html( $extension->name ) . '</h3>';
307
  echo '<div class="extension-desc">' . wp_kses_post( $extension->desc ) . '</div>';
308
  echo '<div class="product_footer">';
309
+ echo '<div class="button button-secondary loop_more">' . esc_html__( 'Upgrade to Unlock', 'download-monitor' ) . '<span class="dashicons dashicons-external"></span></div>';
310
  echo '</div>';
311
  echo '</a>';
312
  echo '</div>';
344
  <div class="icon32 icon32-posts-dlm_download" id="icon-edit"><br/></div>
345
  <h1>
346
  <?php esc_html_e( 'Download Monitor Installed Extensions', 'download-monitor' ); ?>
347
+
 
 
 
348
  </h1>
349
  <?php
350
 
359
  DLM_Admin_Helper::dlm_tab_navigation( $this->tabs, $active_tab );
360
 
361
  echo '</h2>';
362
+ ?>
363
+ <a href="<?php echo esc_url( add_query_arg( 'dlm-force-recheck', '1', admin_url( 'edit.php?post_type=dlm_download&page=dlm-extensions' ) ) ); ?>"
364
+ class="button dlm-reload-button">
365
+ <?php esc_html_e( 'Reload Extensions', 'download-monitor' ); ?>
366
+ </a>
367
+ <?php
368
  // Installed Extensions
369
  if ( count( $this->installed_extensions ) > 0 ) {
370
 
src/Admin/Settings/Fields/Checkbox.php CHANGED
@@ -38,8 +38,8 @@ class DLM_Admin_Fields_Field_Checkbox extends DLM_Admin_Fields_Field {
38
  */
39
  public function render() {
40
  ?>
41
- <label><input id="setting-<?php esc_attr_e( $this->get_name() ); ?>"
42
- name="<?php esc_attr_e( $this->get_name() ); ?>" type="checkbox"
43
  value="1" <?php checked( '1', $this->get_value() ); ?> /> <?php echo esc_html( $this->get_cb_label() ); ?>
44
  </label>
45
  <?php
38
  */
39
  public function render() {
40
  ?>
41
+ <label><input id="setting-<?php echo esc_attr( $this->get_name() ); ?>"
42
+ name="<?php echo esc_attr( $this->get_name() ); ?>" type="checkbox"
43
  value="1" <?php checked( '1', $this->get_value() ); ?> /> <?php echo esc_html( $this->get_cb_label() ); ?>
44
  </label>
45
  <?php
src/Admin/Settings/Fields/Field.php CHANGED
@@ -71,7 +71,7 @@ abstract class DLM_Admin_Fields_Field {
71
  */
72
  public function e_placeholder() {
73
  $placeholder = $this->get_placeholder();
74
- echo ( ! empty( $placeholder ) ) ? 'placeholder="' . esc_attr_e( $placeholder ) . '"' : '';
75
  }
76
 
77
  abstract public function render();
71
  */
72
  public function e_placeholder() {
73
  $placeholder = $this->get_placeholder();
74
+ echo ( ! empty( $placeholder ) ) ? 'placeholder="' . esc_attr( $placeholder ) . '"' : '';
75
  }
76
 
77
  abstract public function render();
src/Admin/Settings/Fields/FieldFactory.php CHANGED
@@ -1,63 +1,63 @@
1
- <?php
2
-
3
- class DLM_Admin_Fields_Field_Factory {
4
-
5
- /**
6
- * @param $option
7
- *
8
- * @return DLM_Admin_Fields_Field_Text
9
- */
10
- public static function make( $option ) {
11
-
12
- $field = null;
13
-
14
- // get value
15
- $value = get_option( $option['name'], '' );
16
-
17
- // placeholder
18
- $placeholder = ( ! empty( $option['placeholder'] ) ) ? $option['placeholder'] : '';
19
-
20
- switch ( $option['type'] ) {
21
- case 'text':
22
- $field = new DLM_Admin_Fields_Field_Text( $option['name'], $value, $placeholder );
23
- break;
24
- case 'password':
25
- $field = new DLM_Admin_Fields_Field_Password( $option['name'], $value, $placeholder );
26
- break;
27
- case 'textarea':
28
- $field = new DLM_Admin_Fields_Field_Textarea( $option['name'], $value, $placeholder );
29
- break;
30
- case 'checkbox':
31
- $field = new DLM_Admin_Fields_Field_Checkbox( $option['name'], $value, $option['cb_label'] );
32
- break;
33
- case 'select':
34
- $field = new DLM_Admin_Fields_Field_Select( $option['name'], $value, $option['options'] );
35
- break;
36
- case 'lazy_select':
37
- $field = new DLM_Admin_Fields_Field_Lazy_Select( $option['name'], $value, $option['options'] );
38
- break;
39
- case 'action_button':
40
- $field = new DLM_Admin_Fields_Field_ActionButton( $option['name'], $option['link'], $option['label'] );
41
- break;
42
- case 'desc':
43
- $field = new DLM_Admin_Fields_Field_Desc( $option['name'], $option['text'], $placeholder );
44
- break;
45
- case 'title':
46
- $field = new DLM_Admin_Fields_Field_Title( $option['title'] );
47
- break;
48
- case 'gateway_overview':
49
- $field = new \Never5\DownloadMonitor\Shop\Admin\Fields\GatewayOverview( $option['gateways'] );
50
- break;
51
- default:
52
- /**
53
- * do_filter: dlm_setting_field_$type: (null) $field, (array) $option, (String) $value, (String) $placeholder
54
- */
55
- $field = apply_filters( 'dlm_setting_field_' . $option['type'], $field, $option, $value, $placeholder );
56
-
57
- break;
58
- }
59
-
60
- return $field;
61
- }
62
-
63
  }
1
+ <?php
2
+
3
+ class DLM_Admin_Fields_Field_Factory {
4
+
5
+ /**
6
+ * @param $option
7
+ *
8
+ * @return DLM_Admin_Fields_Field_Text
9
+ */
10
+ public static function make( $option ) {
11
+
12
+ $field = null;
13
+
14
+ // get value
15
+ $value = get_option( $option['name'], '' );
16
+
17
+ // placeholder
18
+ $placeholder = ( ! empty( $option['placeholder'] ) ) ? $option['placeholder'] : '';
19
+
20
+ switch ( $option['type'] ) {
21
+ case 'text':
22
+ $field = new DLM_Admin_Fields_Field_Text( $option['name'], $value, $placeholder );
23
+ break;
24
+ case 'password':
25
+ $field = new DLM_Admin_Fields_Field_Password( $option['name'], $value, $placeholder );
26
+ break;
27
+ case 'textarea':
28
+ $field = new DLM_Admin_Fields_Field_Textarea( $option['name'], $value, $placeholder );
29
+ break;
30
+ case 'checkbox':
31
+ $field = new DLM_Admin_Fields_Field_Checkbox( $option['name'], $value, $option['cb_label'] );
32
+ break;
33
+ case 'select':
34
+ $field = new DLM_Admin_Fields_Field_Select( $option['name'], $value, $option['options'] );
35
+ break;
36
+ case 'lazy_select':
37
+ $field = new DLM_Admin_Fields_Field_Lazy_Select( $option['name'], $value, $option['options'] );
38
+ break;
39
+ case 'action_button':
40
+ $field = new DLM_Admin_Fields_Field_ActionButton( $option['name'], $option['link'], $option['label'] );
41
+ break;
42
+ case 'desc':
43
+ $field = new DLM_Admin_Fields_Field_Desc( $option['name'], $option['text'], $placeholder );
44
+ break;
45
+ case 'title':
46
+ $field = new DLM_Admin_Fields_Field_Title( $option['title'] );
47
+ break;
48
+ case 'gateway_overview':
49
+ $field = new \Never5\DownloadMonitor\Shop\Admin\Fields\GatewayOverview( $option['gateways'] );
50
+ break;
51
+ default:
52
+ /**
53
+ * do_filter: dlm_setting_field_$type: (null) $field, (array) $option, (String) $value, (String) $placeholder
54
+ */
55
+ $field = apply_filters( 'dlm_setting_field_' . $option['type'], $field, $option, $value, $placeholder );
56
+
57
+ break;
58
+ }
59
+
60
+ return $field;
61
+ }
62
+
63
  }
src/Admin/Settings/Fields/LazySelect.php CHANGED
@@ -36,8 +36,8 @@ class DLM_Admin_Fields_Field_Lazy_Select extends DLM_Admin_Fields_Field {
36
  */
37
  public function render() {
38
  ?>
39
- <select id="setting-<?php esc_attr_e( $this->get_name() ); ?>" class="regular-text dlm-lazy-select"
40
- name="<?php esc_attr_e( $this->get_name() ); ?>" data-selected="<?php esc_attr_e( $this->get_value() ); ?>">
41
  <option value="0"><?php echo esc_html__( 'Loading', 'download-monitor'); ?>...</option>
42
  </select>
43
  <?php
36
  */
37
  public function render() {
38
  ?>
39
+ <select id="setting-<?php echo esc_attr( $this->get_name() ); ?>" class="regular-text dlm-lazy-select"
40
+ name="<?php echo esc_attr( $this->get_name() ); ?>" data-selected="<?php echo esc_attr( $this->get_value() ); ?>">
41
  <option value="0"><?php echo esc_html__( 'Loading', 'download-monitor'); ?>...</option>
42
  </select>
43
  <?php
src/Admin/Settings/Fields/Password.php CHANGED
@@ -7,9 +7,9 @@ class DLM_Admin_Fields_Field_Password extends DLM_Admin_Fields_Field {
7
  */
8
  public function render() {
9
  ?>
10
- <input id="setting-<?php esc_attr_e( $this->get_name() ); ?>" class="regular-text" type="password"
11
- name="<?php esc_attr_e( $this->get_name() ); ?>"
12
- value="<?php esc_attr_e( $this->get_value() ); ?>" <?php $this->e_placeholder(); ?> />
13
  <?php
14
  }
15
 
7
  */
8
  public function render() {
9
  ?>
10
+ <input id="setting-<?php echo esc_attr( $this->get_name() ); ?>" class="regular-text" type="password"
11
+ name="<?php echo esc_attr( $this->get_name() ); ?>"
12
+ value="<?php echo esc_attr( $this->get_value() ); ?>" <?php $this->e_placeholder(); ?> />
13
  <?php
14
  }
15
 
src/Admin/Settings/Fields/Select.php CHANGED
@@ -36,8 +36,8 @@ class DLM_Admin_Fields_Field_Select extends DLM_Admin_Fields_Field {
36
  */
37
  public function render() {
38
  ?>
39
- <select id="setting-<?php esc_attr_e( $this->get_name() ); ?>" class="regular-text"
40
- name="<?php esc_attr_e( $this->get_name() ); ?>"><?php
41
  foreach ( $this->get_options() as $key => $name ) {
42
  echo '<option value="' . esc_attr( $key ) . '" ' . selected( $this->get_value(), $key, false ) . '>' . esc_html( $name ) . '</option>';
43
  }
36
  */
37
  public function render() {
38
  ?>
39
+ <select id="setting-<?php echo esc_attr( $this->get_name() ); ?>" class="regular-text"
40
+ name="<?php echo esc_attr( $this->get_name() ); ?>"><?php
41
  foreach ( $this->get_options() as $key => $name ) {
42
  echo '<option value="' . esc_attr( $key ) . '" ' . selected( $this->get_value(), $key, false ) . '>' . esc_html( $name ) . '</option>';
43
  }
src/Admin/Settings/Fields/Text.php CHANGED
@@ -7,9 +7,9 @@ class DLM_Admin_Fields_Field_Text extends DLM_Admin_Fields_Field {
7
  */
8
  public function render() {
9
  ?>
10
- <input id="setting-<?php esc_attr_e( $this->get_name() ); ?>" class="regular-text" type="text"
11
- name="<?php esc_attr_e( $this->get_name() ); ?>"
12
- value="<?php esc_attr_e( $this->get_value() ); ?>" <?php $this->e_placeholder(); ?> />
13
  <?php
14
  }
15
 
7
  */
8
  public function render() {
9
  ?>
10
+ <input id="setting-<?php echo esc_attr( $this->get_name() ); ?>" class="regular-text" type="text"
11
+ name="<?php echo esc_attr( $this->get_name() ); ?>"
12
+ value="<?php echo esc_attr( $this->get_value() ); ?>" <?php $this->e_placeholder(); ?> />
13
  <?php
14
  }
15
 
src/Admin/Settings/Fields/Textarea.php CHANGED
@@ -7,8 +7,8 @@ class DLM_Admin_Fields_Field_Textarea extends DLM_Admin_Fields_Field {
7
  */
8
  public function render() {
9
  ?>
10
- <textarea id="setting-<?php esc_attr_e( $this->get_name() ); ?>" class="large-text" cols="50" rows="3"
11
- name="<?php esc_attr_e( $this->get_name() ); ?>" <?php $this->e_placeholder(); ?>><?php echo esc_textarea( $this->get_value() ); ?></textarea>
12
  <?php
13
  }
14
 
7
  */
8
  public function render() {
9
  ?>
10
+ <textarea id="setting-<?php echo esc_attr( $this->get_name() ); ?>" class="large-text" cols="50" rows="3"
11
+ name="<?php echo esc_attr( $this->get_name() ); ?>" <?php $this->e_placeholder(); ?>><?php echo esc_textarea( $this->get_value() ); ?></textarea>
12
  <?php
13
  }
14
 
src/Admin/Settings/Page.php CHANGED
@@ -1,390 +1,391 @@
1
- <?php
2
-
3
- class DLM_Settings_Page {
4
-
5
- /**
6
- * Setup hooks
7
- */
8
- public function setup() {
9
-
10
- // menu item
11
- add_filter( 'dlm_admin_menu_links', array( $this, 'add_settings_page' ), 30 );
12
-
13
- // catch setting actions
14
- add_action( 'current_screen', array( $this, 'catch_admin_actions' ) );
15
-
16
- //$this->load_hooks();
17
-
18
- if ( is_admin() ) {
19
- $this->load_admin_hooks();
20
- }
21
- }
22
-
23
- /**
24
- * Add settings menu item
25
- */
26
- public function add_settings_page( $links ) {
27
- // Settings page
28
- $links[] = array(
29
- 'page_title' => __( 'Settings', 'download-monitor' ),
30
- 'menu_title' => __( 'Settings', 'download-monitor' ),
31
- 'capability' => 'manage_options',
32
- 'menu_slug' => 'download-monitor-settings',
33
- 'function' => array( $this, 'settings_page' ),
34
- 'priority' => 20,
35
- );
36
-
37
- return $links;
38
- }
39
-
40
- /**
41
- * Catch and trigger admin actions
42
- */
43
- public function catch_admin_actions() {
44
-
45
- if ( isset( $_GET['dlm_action'] ) && isset( $_GET['dlm_nonce'] ) ) {
46
- $action = sanitize_text_field( wp_unslash( $_GET['dlm_action'] ) );
47
-
48
- // check nonce
49
- // phpcs:ignore
50
- if ( ! wp_verify_nonce( $_GET['dlm_nonce'], $action ) ) {
51
- wp_die( esc_html__( "Download Monitor action nonce failed.", 'download-monitor' ) );
52
- }
53
-
54
- switch ( $action ) {
55
- case 'dlm_clear_transients':
56
- $result = download_monitor()->service( 'transient_manager' )->clear_all_version_transients();
57
- if ( $result ) {
58
- wp_redirect( add_query_arg( array( 'dlm_action_done' => $action ), DLM_Admin_Settings::get_url() ) );
59
- exit;
60
- }
61
- break;
62
- }
63
- }
64
-
65
- if ( isset( $_GET['dlm_action_done'] ) ) {
66
- add_action( 'admin_notices', array( $this, 'display_admin_action_message' ) );
67
- }
68
-
69
- $screen = get_current_screen();
70
-
71
- if( $screen->base == 'dlm_download_page_download-monitor-settings' ) {
72
- $ep_value = get_option( 'dlm_download_endpoint' );
73
- $page_check = get_page_by_path( $ep_value );
74
- $cpt_check = post_type_exists( $ep_value );
75
-
76
- if( $page_check || $cpt_check ) {
77
- add_action( 'admin_notices', array( $this, 'display_admin_invalid_ep' ) );
78
- }
79
- }
80
-
81
- }
82
-
83
- /**
84
- * Display the admin action success mesage
85
- */
86
- public function display_admin_action_message() {
87
-
88
- if ( ! isset( $_GET['dlm_action_done'] ) ) {
89
- return;
90
- }
91
-
92
- ?>
93
- <div class="notice notice-success">
94
- <?php
95
- switch ( $_GET['dlm_action_done'] ) {
96
- case 'dlm_clear_transients':
97
- echo "<p>" . esc_html__( 'Download Monitor Transients successfully cleared!', 'download-monitor' ) . "</p>";
98
- break;
99
- }
100
- ?>
101
- </div>
102
- <?php
103
- }
104
-
105
- public function display_admin_invalid_ep() {
106
- ?>
107
- <div class="notice notice-error">
108
- <p><?php echo esc_html__( 'The Download Monitor endpoint is already in use by a page or post. Please change the endpoint to something else.', 'download-monitor' ); ?></p>
109
- </div>
110
- <?php
111
- }
112
-
113
-
114
-
115
- /**
116
- * settings_page function.
117
- *
118
- * @access public
119
- * @return void
120
- */
121
- public function settings_page() {
122
-
123
- // initialize settings
124
- $admin_settings = new DLM_Admin_Settings();
125
- $settings = $admin_settings->get_settings();
126
- $tab = $this->get_active_tab();
127
-
128
- // print global notices
129
- $this->print_global_notices();
130
- ?>
131
- <div class="wrap dlm-admin-settings">
132
- <form method="post" action="options.php">
133
-
134
- <?php $this->generate_tabs( $settings ); ?>
135
-
136
- <?php
137
-
138
- if ( ! empty( $_GET['settings-updated'] ) ) {
139
- $this->need_rewrite_flush = true;
140
- echo '<div class="updated notice is-dismissible"><p>' . esc_html__( 'Settings successfully saved', 'download-monitor' ) . '</p></div>';
141
-
142
- $dlm_settings_tab_saved = get_option( 'dlm_settings_tab_saved', 'general' );
143
-
144
- echo '<script type="text/javascript">var dlm_settings_tab_saved = "' . esc_js( $dlm_settings_tab_saved ) . '";</script>';
145
- }
146
-
147
- // loop fields for this tab
148
- if ( isset( $settings[ $tab ] ) ) {
149
-
150
- $active_section = $this->get_active_section( $settings[ $tab ]['sections'] );
151
-
152
- if ( count( $settings[ $tab ]['sections'] ) > 1 ) {
153
-
154
- ?>
155
- <div class="wp-clearfix">
156
- <ul class="subsubsub dlm-settings-sub-nav">
157
- <?php foreach ( $settings[ $tab ]['sections'] as $section_key => $section ) : ?>
158
- <?php echo "<li" . ( ( $active_section == $section_key ) ? " class='active-section'" : "" ) . ">"; ?>
159
- <a href="<?php echo esc_url( add_query_arg( array(
160
- 'tab' => $tab,
161
- 'section' => $section_key
162
- ), DLM_Admin_Settings::get_url() ) ); ?>"><?php echo esc_html( $section['title'] ); ?></a></liM>
163
- <?php endforeach; ?>
164
- </ul>
165
- </div><!--.wp-clearfix-->
166
- <h2><?php echo esc_html( $settings[ $tab ]['sections'][ $active_section ]['title'] ); ?></h2>
167
- <?php
168
- }
169
-
170
- //echo '<div id="settings-' . sanitize_title( $key ) . '" class="settings_panel">';
171
-
172
- if ( isset( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) && ! empty( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) ) {
173
-
174
- // output correct settings_fields
175
- // We change the output location so that it won't interfere with our upsells
176
- $option_name = "dlm_" . $tab . "_" . $active_section;
177
- settings_fields( $option_name );
178
-
179
- echo '<table class="form-table">';
180
-
181
- foreach ( $settings[ $tab ]['sections'][ $active_section ]['fields'] as $option ) {
182
-
183
- $cs = 1;
184
-
185
- echo '<tr valign="top">';
186
- if ( isset( $option['label'] ) && '' !== $option['label'] ) {
187
- echo '<th scope="row"><label for="setting-' . esc_attr( $option['name'] ) . '">' . esc_attr( $option['label'] ) . '</a></th>';
188
- } else {
189
- $cs ++;
190
- }
191
-
192
-
193
- echo '<td colspan="' . esc_attr( $cs ) . '">';
194
-
195
- if ( ! isset( $option['type'] ) ) {
196
- $option['type'] = '';
197
- }
198
-
199
- // make new field object
200
- $field = DLM_Admin_Fields_Field_Factory::make( $option );
201
-
202
- // check if factory made a field
203
- if ( null !== $field ) {
204
- // render field
205
- $field->render();
206
-
207
- if ( isset( $option['desc'] ) && '' !== $option['desc'] ) {
208
- echo ' <p class="dlm-description description">' . wp_kses_post( $option['desc'] ) . '</p>';
209
- }
210
- }
211
-
212
- echo '</td></tr>';
213
-
214
- }
215
-
216
- echo '</table>';
217
- }
218
-
219
-
220
- echo '<div class="wpchill-upsells-wrapper">';
221
-
222
- do_action( 'dlm_tab_content_' . $tab, $settings );
223
-
224
- echo '</div>';
225
- }
226
-
227
- ?>
228
- <div class="wp-clearfix"></div>
229
- <?php
230
- if ( isset( $settings[ $tab ] ) && ( isset( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) && ! empty( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) ) ) {
231
-
232
- ?>
233
- <p class="submit">
234
- <input type="submit" class="button-primary"
235
- value="<?php echo esc_html__( 'Save Changes', 'download-monitor' ); ?>"/>
236
- </p>
237
- <?php } ?>
238
- </form>
239
- </div>
240
- <?php
241
- }
242
-
243
- /**
244
- * Print global notices
245
- */
246
- private
247
- function print_global_notices() {
248
-
249
- // check for nginx
250
- if ( isset( $_SERVER['SERVER_SOFTWARE'] ) &&
251
- stristr( sanitize_text_field( wp_unslash($_SERVER['SERVER_SOFTWARE']) ), 'nginx' ) !== false &&
252
- 1 != get_option( 'dlm_hide_notice-nginx_rules', 0 ) ) {
253
-
254
- // get upload dir
255
- $upload_dir = wp_upload_dir();
256
-
257
- // replace document root because nginx uses path from document root
258
- // phpcs:ignore
259
- $upload_path = str_replace( sanitize_text_field( wp_unslash($_SERVER['DOCUMENT_ROOT']) ), '', $upload_dir['basedir'] );
260
-
261
- // form nginx rules
262
- $nginx_rules = "location " . $upload_path . "/dlm_uploads {<br/>deny all;<br/>return 403;<br/>}";
263
- echo '<div class="error notice is-dismissible dlm-notice" id="nginx_rules" data-nonce="' . esc_attr( wp_create_nonce( 'dlm_hide_notice-nginx_rules' ) ) . '">';
264
- echo '<p>' . esc_html__( "Because your server is running on nginx, our .htaccess file can't protect your downloads.", 'download-monitor' );
265
- echo '<br/>' . sprintf( esc_html__( "Please add the following rules to your nginx config to disable direct file access: %s", 'download-monitor' ), '<br/><br/><code class="dlm-code-nginx-rules">' . wp_kses_post( $nginx_rules ) . '</code>' ) . '</p>';
266
- echo '</div>';
267
- }
268
-
269
- }
270
-
271
- /**
272
- * Load our admin hooks
273
- */
274
- public function load_admin_hooks() {
275
-
276
- add_action( 'in_admin_header', array( $this, 'dlm_page_header' ) );
277
-
278
- add_filter( 'dlm_page_header', array( $this, 'page_header_locations' ) );
279
- }
280
-
281
- /**
282
- * Display the Download Monitor Admin Page Header
283
- *
284
- * @param bool $extra_class
285
- */
286
- public static function dlm_page_header($extra_class = '') {
287
-
288
- // Only display the header on pages that belong to dlm
289
- if ( ! apply_filters( 'dlm_page_header', false ) ) {
290
- return;
291
- }
292
- ?>
293
- <div class="dlm-page-header <?php echo ( $extra_class ) ? esc_attr( $extra_class ) : ''; ?>">
294
- <div class="dlm-header-logo">
295
-
296
- <img src="<?php echo esc_url( DLM_URL . 'assets/images/logo.png' ); ?>" class="dlm-logo" />
297
- </div>
298
- <div class="dlm-header-links">
299
- <a href="https://www.download-monitor.com/kb/" target="_blank" rel="noreferrer nofollow" id="get-help"
300
- class="button button-secondary"><span
301
- class="dashicons dashicons-external"></span><?php esc_html_e( 'Documentation', 'download-monitor' ); ?>
302
- </a>
303
- <a class="button button-secondary"
304
- href="https://www.download-monitor.com/contact/" target="_blank" rel="noreferrer nofollow"><span
305
- class="dashicons dashicons-email-alt"></span><?php echo esc_html__( 'Contact us for support!', 'download-monitor' ); ?>
306
- </a>
307
- </div>
308
- </div>
309
- <?php
310
- }
311
-
312
- /**
313
- * Set the dlm header locations
314
- *
315
- * @param $return
316
- *
317
- * @return bool|mixed
318
- * @since 2.5.3
319
- */
320
- public function page_header_locations( $return ) {
321
-
322
- $current_screen = get_current_screen();
323
-
324
- if ( 'dlm_download' === $current_screen->post_type ) {
325
- return true;
326
- }
327
-
328
- return $return;
329
- }
330
-
331
- /**
332
- * @param array $settings
333
- */
334
- private
335
- function generate_tabs( $settings ) {
336
-
337
-
338
- ?>
339
- <h2 class="nav-tab-wrapper">
340
- <?php
341
- foreach ( $settings as $key => $section ) {
342
-
343
- // backwards compatibility for when $section did not have 'title' index yet (it simply had the title set at 0)
344
- $title = ( isset( $section['title'] ) ? $section['title'] : $section[0] );
345
-
346
- echo '<a href="' . esc_url( add_query_arg( 'tab', $key, DLM_Admin_Settings::get_url() ) ) . '" class="nav-tab' . ( ( $this->get_active_tab() === $key ) ? ' nav-tab-active' : '' ) . '">' . esc_html( $title ) . ( ( isset( $section['badge'] ) && true === $section['badge'] ) ? ' <span class="dlm-upsell-badge">PRO</span>' : '' ) . '</a>';
347
- }
348
- ?>
349
- </h2>
350
- <?php
351
- }
352
-
353
- /**
354
- * Returns first key of array
355
- *
356
- * @param $a
357
- *
358
- * @return string
359
- */
360
- private
361
- function array_first_key(
362
- $a
363
- ) {
364
- reset( $a );
365
-
366
- return key( $a );
367
- }
368
-
369
- /**
370
- * Return active tab
371
- *
372
- * @return string
373
- */
374
- private
375
- function get_active_tab() {
376
- return ( ! empty( $_GET['tab'] ) ? sanitize_title( wp_unslash($_GET['tab']) ) : 'general' );
377
- }
378
-
379
- /**
380
- * Return active section
381
- *
382
- * @param $sections
383
- *
384
- * @return string
385
- */
386
- private function get_active_section( $sections) {
387
- return ( ! empty( $_GET['section'] ) ? sanitize_title( wp_unslash($_GET['section']) ) : $this->array_first_key( $sections ) );
388
- }
389
-
390
- }
 
1
+ <?php
2
+
3
+ class DLM_Settings_Page {
4
+
5
+ /**
6
+ * Setup hooks
7
+ */
8
+ public function setup() {
9
+
10
+ // menu item
11
+ add_filter( 'dlm_admin_menu_links', array( $this, 'add_settings_page' ), 30 );
12
+
13
+ // catch setting actions
14
+ add_action( 'current_screen', array( $this, 'catch_admin_actions' ) );
15
+
16
+ //$this->load_hooks();
17
+
18
+ if ( is_admin() ) {
19
+ $this->load_admin_hooks();
20
+ }
21
+ }
22
+
23
+ /**
24
+ * Add settings menu item
25
+ */
26
+ public function add_settings_page( $links ) {
27
+ // Settings page
28
+ $links[] = array(
29
+ 'page_title' => __( 'Settings', 'download-monitor' ),
30
+ 'menu_title' => __( 'Settings', 'download-monitor' ),
31
+ 'capability' => 'manage_options',
32
+ 'menu_slug' => 'download-monitor-settings',
33
+ 'function' => array( $this, 'settings_page' ),
34
+ 'priority' => 20,
35
+ );
36
+
37
+ return $links;
38
+ }
39
+
40
+ /**
41
+ * Catch and trigger admin actions
42
+ */
43
+ public function catch_admin_actions() {
44
+
45
+ if ( isset( $_GET['dlm_action'] ) && isset( $_GET['dlm_nonce'] ) ) {
46
+ $action = sanitize_text_field( wp_unslash( $_GET['dlm_action'] ) );
47
+
48
+ // check nonce
49
+ // phpcs:ignore
50
+ if ( ! wp_verify_nonce( $_GET['dlm_nonce'], $action ) ) {
51
+ wp_die( esc_html__( "Download Monitor action nonce failed.", 'download-monitor' ) );
52
+ }
53
+
54
+ switch ( $action ) {
55
+ case 'dlm_clear_transients':
56
+ $result = download_monitor()->service( 'transient_manager' )->clear_all_version_transients();
57
+ if ( $result ) {
58
+ wp_redirect( add_query_arg( array( 'dlm_action_done' => $action ), DLM_Admin_Settings::get_url() ) );
59
+ exit;
60
+ }
61
+ break;
62
+ }
63
+ }
64
+
65
+ if ( isset( $_GET['dlm_action_done'] ) ) {
66
+ add_action( 'admin_notices', array( $this, 'display_admin_action_message' ) );
67
+ }
68
+
69
+ $screen = get_current_screen();
70
+
71
+ if( $screen->base == 'dlm_download_page_download-monitor-settings' ) {
72
+ $ep_value = get_option( 'dlm_download_endpoint' );
73
+ $page_check = get_page_by_path( $ep_value );
74
+ $cpt_check = post_type_exists( $ep_value );
75
+
76
+ if( $page_check || $cpt_check ) {
77
+ add_action( 'admin_notices', array( $this, 'display_admin_invalid_ep' ) );
78
+ }
79
+ }
80
+
81
+ }
82
+
83
+ /**
84
+ * Display the admin action success mesage
85
+ */
86
+ public function display_admin_action_message() {
87
+
88
+ if ( ! isset( $_GET['dlm_action_done'] ) ) {
89
+ return;
90
+ }
91
+
92
+ ?>
93
+ <div class="notice notice-success">
94
+ <?php
95
+ switch ( $_GET['dlm_action_done'] ) {
96
+ case 'dlm_clear_transients':
97
+ echo "<p>" . esc_html__( 'Download Monitor Transients successfully cleared!', 'download-monitor' ) . "</p>";
98
+ break;
99
+ }
100
+ ?>
101
+ </div>
102
+ <?php
103
+ }
104
+
105
+ public function display_admin_invalid_ep() {
106
+ ?>
107
+ <div class="notice notice-error">
108
+ <p><?php echo esc_html__( 'The Download Monitor endpoint is already in use by a page or post. Please change the endpoint to something else.', 'download-monitor' ); ?></p>
109
+ </div>
110
+ <?php
111
+ }
112
+
113
+
114
+
115
+ /**
116
+ * settings_page function.
117
+ *
118
+ * @access public
119
+ * @return void
120
+ */
121
+ public function settings_page() {
122
+
123
+ // initialize settings
124
+ $admin_settings = new DLM_Admin_Settings();
125
+ $settings = $admin_settings->get_settings();
126
+ $tab = $this->get_active_tab();
127
+
128
+ // print global notices
129
+ $this->print_global_notices();
130
+ ?>
131
+ <div class="wrap dlm-admin-settings">
132
+ <form method="post" action="options.php">
133
+
134
+ <?php $this->generate_tabs( $settings ); ?>
135
+
136
+ <?php
137
+
138
+ if ( ! empty( $_GET['settings-updated'] ) ) {
139
+ $this->need_rewrite_flush = true;
140
+ echo '<div class="updated notice is-dismissible"><p>' . esc_html__( 'Settings successfully saved', 'download-monitor' ) . '</p></div>';
141
+
142
+ $dlm_settings_tab_saved = get_option( 'dlm_settings_tab_saved', 'general' );
143
+
144
+ echo '<script type="text/javascript">var dlm_settings_tab_saved = "' . esc_js( $dlm_settings_tab_saved ) . '";</script>';
145
+ }
146
+
147
+ // loop fields for this tab
148
+ if ( isset( $settings[ $tab ] ) ) {
149
+
150
+ $active_section = $this->get_active_section( $settings[ $tab ]['sections'] );
151
+
152
+ if ( count( $settings[ $tab ]['sections'] ) >= 1 ) {
153
+
154
+ ?>
155
+ <div class="wp-clearfix">
156
+ <ul class="subsubsub dlm-settings-sub-nav">
157
+ <?php foreach ( $settings[ $tab ]['sections'] as $section_key => $section ) : ?>
158
+ <?php echo "<li" . ( ( $active_section == $section_key ) ? " class='active-section'" : "" ) . ">"; ?>
159
+ <a href="<?php echo esc_url( add_query_arg( array(
160
+ 'tab' => $tab,
161
+ 'section' => $section_key
162
+ ), DLM_Admin_Settings::get_url() ) ); ?>"><?php echo esc_html( $section['title'] ); ?><?php echo isset( $section['badge'] ) ? '<span class="dlm-upsell-badge">PRO</span>' : ''; ?></a></li>
163
+ <?php endforeach; ?>
164
+ </ul>
165
+ </div><!--.wp-clearfix-->
166
+ <h2><?php echo esc_html( $settings[ $tab ]['sections'][ $active_section ]['title'] ); ?></h2>
167
+ <?php
168
+ }
169
+
170
+ //echo '<div id="settings-' . sanitize_title( $key ) . '" class="settings_panel">';
171
+ do_action( 'dlm_tab_section_content_' . $active_section, $settings );
172
+
173
+ if ( isset( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) && ! empty( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) ) {
174
+
175
+ // output correct settings_fields
176
+ // We change the output location so that it won't interfere with our upsells
177
+ $option_name = "dlm_" . $tab . "_" . $active_section;
178
+ settings_fields( $option_name );
179
+
180
+ echo '<table class="form-table">';
181
+
182
+ foreach ( $settings[ $tab ]['sections'][ $active_section ]['fields'] as $option ) {
183
+
184
+ $cs = 1;
185
+
186
+ echo '<tr valign="top">';
187
+ if ( isset( $option['label'] ) && '' !== $option['label'] ) {
188
+ echo '<th scope="row"><label for="setting-' . esc_attr( $option['name'] ) . '">' . esc_attr( $option['label'] ) . '</a></th>';
189
+ } else {
190
+ $cs ++;
191
+ }
192
+
193
+
194
+ echo '<td colspan="' . esc_attr( $cs ) . '">';
195
+
196
+ if ( ! isset( $option['type'] ) ) {
197
+ $option['type'] = '';
198
+ }
199
+
200
+ // make new field object
201
+ $field = DLM_Admin_Fields_Field_Factory::make( $option );
202
+
203
+ // check if factory made a field
204
+ if ( null !== $field ) {
205
+ // render field
206
+ $field->render();
207
+
208
+ if ( isset( $option['desc'] ) && '' !== $option['desc'] ) {
209
+ echo ' <p class="dlm-description description">' . wp_kses_post( $option['desc'] ) . '</p>';
210
+ }
211
+ }
212
+
213
+ echo '</td></tr>';
214
+
215
+ }
216
+
217
+ echo '</table>';
218
+ }
219
+
220
+
221
+ echo '<div class="wpchill-upsells-wrapper">';
222
+
223
+ do_action( 'dlm_tab_content_' . $tab, $settings );
224
+
225
+ echo '</div>';
226
+ }
227
+
228
+ ?>
229
+ <div class="wp-clearfix"></div>
230
+ <?php
231
+ if ( isset( $settings[ $tab ] ) && ( isset( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) && ! empty( $settings[ $tab ]['sections'][ $active_section ]['fields'] ) ) ) {
232
+
233
+ ?>
234
+ <p class="submit">
235
+ <input type="submit" class="button-primary"
236
+ value="<?php echo esc_html__( 'Save Changes', 'download-monitor' ); ?>"/>
237
+ </p>
238
+ <?php } ?>
239
+ </form>
240
+ </div>
241
+ <?php
242
+ }
243
+
244
+ /**
245
+ * Print global notices
246
+ */
247
+ private
248
+ function print_global_notices() {
249
+
250
+ // check for nginx
251
+ if ( isset( $_SERVER['SERVER_SOFTWARE'] ) &&
252
+ stristr( sanitize_text_field( wp_unslash($_SERVER['SERVER_SOFTWARE']) ), 'nginx' ) !== false &&
253
+ 1 != get_option( 'dlm_hide_notice-nginx_rules', 0 ) ) {
254
+
255
+ // get upload dir
256
+ $upload_dir = wp_upload_dir();
257
+
258
+ // replace document root because nginx uses path from document root
259
+ // phpcs:ignore
260
+ $upload_path = str_replace( sanitize_text_field( wp_unslash($_SERVER['DOCUMENT_ROOT']) ), '', $upload_dir['basedir'] );
261
+
262
+ // form nginx rules
263
+ $nginx_rules = "location " . $upload_path . "/dlm_uploads {<br/>deny all;<br/>return 403;<br/>}";
264
+ echo '<div class="error notice is-dismissible dlm-notice" id="nginx_rules" data-nonce="' . esc_attr( wp_create_nonce( 'dlm_hide_notice-nginx_rules' ) ) . '">';
265
+ echo '<p>' . esc_html__( "Because your server is running on nginx, our .htaccess file can't protect your downloads.", 'download-monitor' );
266
+ echo '<br/>' . sprintf( esc_html__( "Please add the following rules to your nginx config to disable direct file access: %s", 'download-monitor' ), '<br/><br/><code class="dlm-code-nginx-rules">' . wp_kses_post( $nginx_rules ) . '</code>' ) . '</p>';
267
+ echo '</div>';
268
+ }
269
+
270
+ }
271
+
272
+ /**
273
+ * Load our admin hooks
274
+ */
275
+ public function load_admin_hooks() {
276
+
277
+ add_action( 'in_admin_header', array( $this, 'dlm_page_header' ) );
278
+
279
+ add_filter( 'dlm_page_header', array( $this, 'page_header_locations' ) );
280
+ }
281
+
282
+ /**
283
+ * Display the Download Monitor Admin Page Header
284
+ *
285
+ * @param bool $extra_class
286
+ */
287
+ public static function dlm_page_header($extra_class = '') {
288
+
289
+ // Only display the header on pages that belong to dlm
290
+ if ( ! apply_filters( 'dlm_page_header', false ) ) {
291
+ return;
292
+ }
293
+ ?>
294
+ <div class="dlm-page-header <?php echo ( $extra_class ) ? esc_attr( $extra_class ) : ''; ?>">
295
+ <div class="dlm-header-logo">
296
+
297
+ <img src="<?php echo esc_url( DLM_URL . 'assets/images/logo.png' ); ?>" class="dlm-logo" />
298
+ </div>
299
+ <div class="dlm-header-links">
300
+ <a href="https://www.download-monitor.com/kb/" target="_blank" rel="noreferrer nofollow" id="get-help"
301
+ class="button button-secondary"><span
302
+ class="dashicons dashicons-external"></span><?php esc_html_e( 'Documentation', 'download-monitor' ); ?>
303
+ </a>
304
+ <a class="button button-secondary"
305
+ href="https://www.download-monitor.com/contact/" target="_blank" rel="noreferrer nofollow"><span
306
+ class="dashicons dashicons-email-alt"></span><?php echo esc_html__( 'Contact us for support!', 'download-monitor' ); ?>
307
+ </a>
308
+ </div>
309
+ </div>
310
+ <?php
311
+ }
312
+
313
+ /**
314
+ * Set the dlm header locations
315
+ *
316
+ * @param $return
317
+ *
318
+ * @return bool|mixed
319
+ * @since 2.5.3
320
+ */
321
+ public function page_header_locations( $return ) {
322
+
323
+ $current_screen = get_current_screen();
324
+
325
+ if ( 'dlm_download' === $current_screen->post_type ) {
326
+ return true;
327
+ }
328
+
329
+ return $return;
330
+ }
331
+
332
+ /**
333
+ * @param array $settings
334
+ */
335
+ private
336
+ function generate_tabs( $settings ) {
337
+
338
+
339
+ ?>
340
+ <h2 class="nav-tab-wrapper">
341
+ <?php
342
+ foreach ( $settings as $key => $section ) {
343
+
344
+ // backwards compatibility for when $section did not have 'title' index yet (it simply had the title set at 0)
345
+ $title = ( isset( $section['title'] ) ? $section['title'] : $section[0] );
346
+
347
+ echo '<a href="' . esc_url( add_query_arg( 'tab', $key, DLM_Admin_Settings::get_url() ) ) . '" class="nav-tab' . ( ( $this->get_active_tab() === $key ) ? ' nav-tab-active' : '' ) . '">' . esc_html( $title ) . ( ( isset( $section['badge'] ) && true === $section['badge'] ) ? ' <span class="dlm-upsell-badge">PRO</span>' : '' ) . '</a>';
348
+ }
349
+ ?>
350
+ </h2>
351
+ <?php
352
+ }
353
+
354
+ /**
355
+ * Returns first key of array
356
+ *
357
+ * @param $a
358
+ *
359
+ * @return string
360
+ */
361
+ private
362
+ function array_first_key(
363
+ $a
364
+ ) {
365
+ reset( $a );
366
+
367
+ return key( $a );
368
+ }
369
+
370
+ /**
371
+ * Return active tab
372
+ *
373
+ * @return string
374
+ */
375
+ private
376
+ function get_active_tab() {
377
+ return ( ! empty( $_GET['tab'] ) ? sanitize_title( wp_unslash($_GET['tab']) ) : 'general' );
378
+ }
379
+
380
+ /**
381
+ * Return active section
382
+ *
383
+ * @param $sections
384
+ *
385
+ * @return string
386
+ */
387
+ private function get_active_section( $sections) {
388
+ return ( ! empty( $_GET['section'] ) ? sanitize_title( wp_unslash($_GET['section']) ) : $this->array_first_key( $sections ) );
389
+ }
390
+
391
+ }
src/Admin/Settings/Settings.php CHANGED
@@ -1,685 +1,731 @@
1
- <?php
2
-
3
- use Never5\DownloadMonitor\Shop\Services\Services;
4
-
5
- class DLM_Admin_Settings {
6
-
7
- /**
8
- * Get settings URL
9
- *
10
- * @return string
11
- */
12
- public static function get_url() {
13
- return admin_url( 'edit.php?post_type=dlm_download&page=download-monitor-settings' );
14
- }
15
-
16
- /**
17
- * register_settings function.
18
- *
19
- * @access public
20
- * @return void
21
- */
22
- public function register_settings() {
23
- $settings = $this->get_settings();
24
-
25
- // register our options and settings
26
- foreach ( $settings as $tab_key => $tab ) {
27
-
28
- foreach ( $tab['sections'] as $section_key => $section ) {
29
-
30
- $option_group = "dlm_" . $tab_key . "_" . $section_key;
31
-
32
- // Check to see if $section['fields'] is set, we could be using it for upsells
33
- if ( isset( $section['fields'] ) ) {
34
- foreach ( $section['fields'] as $field ) {
35
- if ( ! empty( $field['name'] ) && ! in_array( $field['type'], apply_filters( 'dlm_settings_display_only_fields', array( 'action_button' ) ) ) ) {
36
- if ( isset( $field['std'] ) ) {
37
- add_option( $field['name'], $field['std'] );
38
- }
39
- register_setting( $option_group, $field['name'] );
40
- }
41
- }
42
- }
43
-
44
- // on the overview page, we also register the enabled setting for every gateway. This makes the checkboxes to enable gateways work.
45
- if ( 'overview' == $section_key ) {
46
- $gateways = Services::get()->service( 'payment_gateway' )->get_all_gateways();
47
- if ( ! empty( $gateways ) ) {
48
- foreach ( $gateways as $gateway ) {
49
- register_setting( $option_group, 'dlm_gateway_' . esc_attr( $gateway->get_id() ) . '_enabled' );
50
- }
51
- }
52
- }
53
-
54
- }
55
- }
56
-
57
- }
58
-
59
- /**
60
- * Method that return all Download Monitor Settings
61
- *
62
- * @access public
63
- * @return array
64
- */
65
- public function get_settings() {
66
-
67
- $settings = array(
68
- 'general' => array(
69
- 'title' => __( 'General', 'download-monitor' ),
70
- 'sections' => array(
71
- 'general' => array(
72
- 'title' => __( 'Download', 'download-monitor' ),
73
- 'fields' => array(
74
- array(
75
- 'name' => 'dlm_default_template',
76
- 'std' => '',
77
- 'label' => __( 'Default Template', 'download-monitor' ),
78
- 'desc' => __( 'Choose which template is used for <code>[download]</code> shortcodes by default (this can be overridden by the <code>format</code> argument).', 'download-monitor' ),
79
- 'type' => 'select',
80
- 'options' => download_monitor()->service( 'template_handler' )->get_available_templates()
81
- ),
82
- array(
83
- 'name' => 'dlm_custom_template',
84
- 'type' => 'text',
85
- 'std' => '',
86
- 'label' => __( 'Custom Template', 'download-monitor' ),
87
- 'desc' => __( 'Leaving this blank will use the default <code>content-download.php</code> template file. If you enter, for example, <code>button</code>, the <code>content-download-button.php</code> template will be used instead. You can add custom templates inside your theme folder.', 'download-monitor' )
88
- ),
89
- array(
90
- 'name' => 'dlm_shop_enabled',
91
- 'std' => '',
92
- 'label' => __( 'Shop Enabled', 'download-monitor' ),
93
- 'cb_label' => __( 'Enable Shop', 'download-monitor' ),
94
- 'desc' => __( 'If enabled, allows you to sell your downloads via Download Monitor.', 'download-monitor' ),
95
- 'type' => 'checkbox'
96
- ),
97
- array(
98
- 'name' => 'dlm_xsendfile_enabled',
99
- 'std' => '',
100
- 'label' => __( 'X-Accel-Redirect / X-Sendfile', 'download-monitor' ),
101
- 'cb_label' => __( 'Enable', 'download-monitor' ),
102
- 'desc' => __( 'If supported, <code>X-Accel-Redirect</code> / <code>X-Sendfile</code> can be used to serve downloads instead of PHP (server requires <code>mod_xsendfile</code>).', 'download-monitor' ),
103
- 'type' => 'checkbox'
104
- ),
105
- array(
106
- 'name' => 'dlm_hotlink_protection_enabled',
107
- 'std' => '',
108
- 'label' => __( 'Prevent hotlinking', 'download-monitor' ),
109
- 'cb_label' => __( 'Enable', 'download-monitor' ),
110
- 'desc' => __( 'If enabled, the download handler will check the PHP referer to see if it originated from your site and if not, redirect them to the homepage.', 'download-monitor' ),
111
- 'type' => 'checkbox'
112
- ),
113
- array(
114
- 'name' => 'dlm_allow_x_forwarded_for',
115
- 'std' => '0',
116
- 'label' => __( 'Allow Proxy IP Override', 'download-monitor' ),
117
- 'cb_label' => __( 'Enable', 'download-monitor' ),
118
- 'desc' => __( 'If enabled, Download Monitor will use the X_FORWARDED_FOR HTTP header set by proxies as the IP address. Note that anyone can set this header, making it less secure.', 'download-monitor' ),
119
- 'type' => 'checkbox'
120
- ),
121
- array(
122
- 'name' => 'dlm_wp_search_enabled',
123
- 'std' => '',
124
- 'label' => __( 'Include in Search', 'download-monitor' ),
125
- 'cb_label' => __( 'Enable', 'download-monitor' ),
126
- 'desc' => __( "If enabled, downloads will be included in the site's internal search results.", 'download-monitor' ),
127
- 'type' => 'checkbox'
128
- ),
129
- )
130
- ),
131
- )
132
- ),
133
- 'advanced' => array(
134
- 'title' => __( 'Advanced', 'download-monitor' ),
135
- 'sections' => array(
136
- 'page_setup' => array(
137
- 'title' => __( 'Pages Setup', 'download-monitor' ),
138
- 'fields' => array(
139
- array(
140
- 'name' => 'dlm_download_endpoint',
141
- 'type' => 'text',
142
- 'std' => 'download',
143
- 'placeholder' => __( 'download', 'download-monitor' ),
144
- 'label' => __( 'Download Endpoint', 'download-monitor' ),
145
- 'desc' => sprintf( __( 'Define what endpoint should be used for download links. By default this will be <code>%s</code>.', 'download-monitor' ), home_url( '/download/' ) )
146
- ),
147
- array(
148
- 'name' => 'dlm_download_endpoint_value',
149
- 'std' => 'ID',
150
- 'label' => __( 'Endpoint Value', 'download-monitor' ),
151
- 'desc' => sprintf( __( 'Define what unique value should be used on the end of your endpoint to identify the downloadable file. e.g. ID would give a link like <code>%s</code>', 'download-monitor' ), home_url( '/download/10/' ) ),
152
- 'type' => 'select',
153
- 'options' => array(
154
- 'ID' => __( 'Download ID', 'download-monitor' ),
155
- 'slug' => __( 'Download slug', 'download-monitor' )
156
- )
157
- ),
158
- array(
159
- 'name' => 'dlm_no_access_page',
160
- 'std' => '',
161
- 'label' => __( 'No Access Page', 'download-monitor' ),
162
- 'desc' => __( "Choose what page is displayed when the user has no access to a file. Don't forget to add the <code>[dlm_no_access]</code> shortcode to the page.", 'download-monitor' ),
163
- 'type' => 'lazy_select',
164
- 'options' => array()
165
- ),
166
- ),
167
- ),
168
- 'access' => array(
169
- 'title' => __( 'Access', 'download-monitor' ),
170
- 'fields' => array(
171
- array(
172
- 'name' => 'dlm_no_access_error',
173
- 'std' => sprintf( __( 'You do not have permission to access this download. %sGo to homepage%s', 'download-monitor' ), '<a href="' . home_url() . '">', '</a>' ),
174
- 'placeholder' => '',
175
- 'label' => __( 'No access message', 'download-monitor' ),
176
- 'desc' => __( "The message that will be displayed to visitors when they don't have access to a file.", 'download-monitor' ),
177
- 'type' => 'textarea'
178
- ),
179
- array(
180
- 'name' => 'dlm_ip_blacklist',
181
- 'std' => '192.168.0.0/24',
182
- 'label' => __( 'Blacklist IPs', 'download-monitor' ),
183
- 'desc' => __( 'List IP Addresses to blacklist, 1 per line. Use IP/CIDR netmask format for ranges. IPv4 examples: <code>198.51.100.1</code> or <code>198.51.100.0/24</code>. IPv6 examples: <code>2001:db8::1</code> or <code>2001:db8::/32</code>.', 'download-monitor' ),
184
- 'placeholder' => '',
185
- 'type' => 'textarea'
186
- ),
187
- array(
188
- 'name' => 'dlm_user_agent_blacklist',
189
- 'std' => 'Googlebot',
190
- 'label' => __( 'Blacklist user agents', 'download-monitor' ),
191
- 'desc' => __( 'List browser user agents to blacklist, 1 per line. Partial matches are sufficient. Regex matching is allowed by surrounding the pattern with forward slashes, e.g. <code>/^Mozilla.+Googlebot/</code>', 'download-monitor' ),
192
- 'placeholder' => '',
193
- 'type' => 'textarea'
194
- ),
195
- )
196
- ),
197
- 'hash' => array(
198
- 'title' => __( 'Hashes', 'download-monitor' ),
199
- 'fields' => array(
200
- array(
201
- 'name' => 'dlm_hash_desc',
202
- 'text' => sprintf( __( 'Hashes can optionally be output via shortcodes, but may cause performance issues with large files. %1$sYou can read more about hashes here%2$s', 'download-monitor' ), '<a href="https://www.download-monitor.com/kb/download-hashes/" target="_blank">', '</a>' ),
203
- 'type' => 'desc'
204
- ),
205
- array(
206
- 'name' => 'dlm_generate_hash_md5',
207
- 'std' => '0',
208
- 'label' => __( 'MD5 hashes', 'download-monitor' ),
209
- 'cb_label' => __( 'Generate MD5 hash for uploaded files', 'download-monitor' ),
210
- 'desc' => '',
211
- 'type' => 'checkbox'
212
- ),
213
- array(
214
- 'name' => 'dlm_generate_hash_sha1',
215
- 'std' => '0',
216
- 'label' => __( 'SHA1 hashes', 'download-monitor' ),
217
- 'cb_label' => __( 'Generate SHA1 hash for uploaded files', 'download-monitor' ),
218
- 'desc' => '',
219
- 'type' => 'checkbox'
220
- ),
221
- array(
222
- 'name' => 'dlm_generate_hash_sha256',
223
- 'std' => '0',
224
- 'label' => __( 'SHA256 hashes', 'download-monitor' ),
225
- 'cb_label' => __( 'Generate SHA256 hash for uploaded files', 'download-monitor' ),
226
- 'type' => 'checkbox'
227
- ),
228
- array(
229
- 'name' => 'dlm_generate_hash_crc32b',
230
- 'std' => '0',
231
- 'label' => __( 'CRC32B hashes', 'download-monitor' ),
232
- 'cb_label' => __( 'Generate CRC32B hash for uploaded files', 'download-monitor' ),
233
- 'type' => 'checkbox'
234
- )
235
- )
236
- ),
237
- 'logging' => array(
238
- 'title' => __( 'Logging', 'download-monitor' ),
239
- 'fields' => array(
240
- array(
241
- 'name' => 'dlm_enable_logging',
242
- 'cb_label' => __( 'Enable', 'download-monitor' ),
243
- 'std' => '1',
244
- 'label' => __( 'Download Log', 'download-monitor' ),
245
- 'desc' => __( 'Log download attempts, IP addresses and more.', 'download-monitor' ),
246
- 'type' => 'checkbox'
247
- ),
248
- array(
249
- 'name' => 'dlm_logging_ip_type',
250
- 'std' => '',
251
- 'label' => __( 'IP Address Logging', 'download-monitor' ),
252
- 'desc' => __( 'Define if and how you like to store IP addresses of users that download your files in your logs.', 'download-monitor' ),
253
- 'type' => 'select',
254
- 'options' => array(
255
- 'full' => __( 'Store full IP address', 'download-monitor' ),
256
- 'anonymized' => __( 'Store anonymized IP address (remove last 3 digits)', 'download-monitor' ),
257
- 'none' => __( 'Store no IP address', 'download-monitor' )
258
- )
259
- ),
260
- array(
261
- 'name' => 'dlm_logging_ua',
262
- 'std' => '1',
263
- 'label' => __( 'User Agent Logging', 'download-monitor' ),
264
- 'cb_label' => __( 'Enable', 'download-monitor' ),
265
- 'desc' => __( 'If enabled, the user agent (browser) the user uses to download the file will be stored in your logs.', 'download-monitor' ),
266
- 'type' => 'checkbox'
267
- ),
268
- array(
269
- 'name' => 'dlm_count_unique_ips',
270
- 'std' => '',
271
- 'label' => __( 'Count unique IPs only', 'download-monitor' ),
272
- 'cb_label' => __( 'Enable', 'download-monitor' ),
273
- 'desc' => sprintf( __( 'If enabled, the counter for each download will only increment and create a log entry once per IP address. Note that this option only works if %s is set to %s.', 'download-monitor' ), '<strong>' . __( 'IP Address Logging', 'download-monitor' ) . '</strong>', '<strong>' . __( 'Store full IP address', 'download-monitor' ) . '</strong>' ),
274
- 'type' => 'checkbox'
275
- ),
276
- )
277
- ),
278
- 'misc' => array(
279
- 'title' => __( 'Miscellaneous', 'download-monitor' ),
280
- 'fields' => array(
281
- array(
282
- 'name' => 'dlm_clear_transients',
283
- 'std' => '0',
284
- 'label' => __( 'Clear all transients', 'download-monitor' ),
285
- 'desc' => __( 'Remove all Download Monitor transients, this can solve version caching issues.', 'download-monitor' ),
286
- 'type' => 'action_button',
287
- 'link' => self::get_url() . '&tab=advanced&section=misc'
288
- ),
289
- ),
290
- )
291
- )
292
- ),
293
- 'lead_generation' => array(
294
- 'title' => esc_html__( 'Content Locking', 'download-monitor' ),
295
- 'badge' => true,
296
- 'sections' => array()
297
- ),
298
- 'external_hosting' => array(
299
- 'title' => esc_html__( 'External Hosting', 'download-monitor' ),
300
- 'badge' => true,
301
- 'sections' => array()
302
- ),
303
- 'integration' => array(
304
- 'title' => esc_html__( 'Integration', 'download-monitor' ),
305
- 'badge' => true,
306
- 'sections' => array()
307
- ),
308
- 'email_notification' => array(
309
- 'title' => esc_html__( 'Emails', 'download-monitor' ),
310
- 'badge' => true,
311
- 'sections' => array()
312
- ),
313
- 'terns_and_conditions' => array(
314
- 'title' => esc_html__( 'Terms and Conditions', 'download-monitor' ),
315
- 'badge' => true,
316
- 'sections' => array()
317
- )
318
- );
319
-
320
- if ( dlm_is_shop_enabled() ) {
321
-
322
- $settings['general']['sections']['shop'] = array(
323
- 'title' => __( 'Shop', 'download-monitor' ),
324
- 'fields' => array(
325
- array(
326
- 'name' => 'dlm_base_country',
327
- 'std' => 'US',
328
- 'label' => __( 'Base Country', 'download-monitor' ),
329
- 'desc' => __( 'Where is your store located?', 'download-monitor' ),
330
- 'type' => 'select',
331
- 'options' => Services::get()->service( "country" )->get_countries()
332
- ),
333
- array(
334
- 'name' => 'dlm_currency',
335
- 'std' => 'USD',
336
- 'label' => __( 'Currency', 'download-monitor' ),
337
- 'desc' => __( 'In what currency are you selling?', 'download-monitor' ),
338
- 'type' => 'select',
339
- 'options' => $this->get_currency_list_with_symbols()
340
- ),
341
- array(
342
- 'name' => 'dlm_currency_pos',
343
- 'std' => 'left',
344
- 'label' => __( 'Currency Position', 'download-monitor' ),
345
- 'desc' => __( 'The position of the currency symbol.', 'download-monitor' ),
346
- 'type' => 'select',
347
- 'options' => array(
348
- 'left' => sprintf( __( 'Left (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'left' ) ) ),
349
- 'right' => sprintf( __( 'Right (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'right' ) ) ),
350
- 'left_space' => sprintf( __( 'Left with space (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'left_space' ) ) ),
351
- 'right_space' => sprintf( __( 'Right with space (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'right_space' ) ) )
352
- )
353
- ),
354
- array(
355
- 'name' => 'dlm_decimal_separator',
356
- 'type' => 'text',
357
- 'std' => '.',
358
- 'label' => __( 'Decimal Separator', 'download-monitor' ),
359
- 'desc' => __( 'The decimal separator of displayed prices.', 'download-monitor' )
360
- ),
361
- array(
362
- 'name' => 'dlm_thousand_separator',
363
- 'type' => 'text',
364
- 'std' => ',',
365
- 'label' => __( 'Thousand Separator', 'download-monitor' ),
366
- 'desc' => __( 'The thousand separator of displayed prices.', 'download-monitor' )
367
- ),
368
- array(
369
- 'name' => 'dlm_disable_cart',
370
- 'std' => '',
371
- 'label' => __( 'Disable Cart', 'download-monitor' ),
372
- 'cb_label' => __( 'Disable', 'download-monitor' ),
373
- 'desc' => __( 'If checked, your customers will be sent to your checkout page directly.', 'download-monitor' ),
374
- 'type' => 'checkbox'
375
- ),
376
- )
377
- );
378
-
379
- $settings['advanced']['sections']['page_setup']['fields'][] = array(
380
- 'name' => 'dlm_page_cart',
381
- 'std' => '',
382
- 'label' => __( 'Cart page', 'download-monitor' ),
383
- 'desc' => __( 'Your cart page, make sure it has the <code>[dlm_cart]</code> shortcode.', 'download-monitor' ),
384
- 'type' => 'lazy_select',
385
- 'options' => array()
386
- );
387
-
388
- $settings['advanced']['sections']['page_setup']['fields'][] = array(
389
- 'name' => 'dlm_page_checkout',
390
- 'std' => '',
391
- 'label' => __( 'Checkout page', 'download-monitor' ),
392
- 'desc' => __( 'Your checkout page, make sure it has the <code>[dlm_checkout]</code> shortcode.', 'download-monitor' ),
393
- 'type' => 'lazy_select',
394
- 'options' => array()
395
- );
396
-
397
- $settings['payments'] = array(
398
- 'title' => __( 'Payment Methods', 'download-monitor' ),
399
- 'sections' => $this->get_payment_methods_sections()
400
- );
401
- }
402
-
403
- // this is here to maintain backwards compatibility, use 'dlm_settings' instead
404
- $old_settings = apply_filters( 'download_monitor_settings', array() );
405
-
406
- // This is the correct filter
407
- $settings = apply_filters( 'dlm_settings', $settings );
408
-
409
- // Backwards compatibility for 4.3 and 4.4.4
410
- $settings = $this->backwards_compatibility_settings( $old_settings, $settings );
411
-
412
- return $settings;
413
- }
414
-
415
- /**
416
- * Register lazy load setting fields callbacks
417
- */
418
- public function register_lazy_load_callbacks() {
419
- add_filter( 'dlm_settings_lazy_select_dlm_page_cart', array( $this, 'lazy_select_dlm_no_access_page' ) );
420
- add_filter( 'dlm_settings_lazy_select_dlm_page_checkout', array( $this, 'lazy_select_dlm_no_access_page' ) );
421
- add_filter( 'dlm_settings_lazy_select_dlm_no_access_page', array( $this, 'lazy_select_dlm_no_access_page' ) );
422
- }
423
-
424
- /**
425
- * Fetch and returns pages on lazy select for dlm_no_access_page option
426
- *
427
- * @param array $options
428
- *
429
- * @return array
430
- */
431
- public function lazy_select_dlm_no_access_page( $options ) {
432
- return $this->get_pages();
433
- }
434
-
435
- /**
436
- * Backwards compatibility for settings
437
- *
438
- * @param $old_settings
439
- * @param $settings
440
- *
441
- * @return mixed
442
- * @since 4.4.5
443
- */
444
- public function backwards_compatibility_settings( $old_settings, $settings ) {
445
-
446
- // First we check if there is info in $old_settings
447
- if ( empty( $old_settings ) ) {
448
-
449
- return $settings;
450
- }
451
-
452
- $compatibility_tabs = array(
453
- 'access',
454
- 'amazon_s3',
455
- 'captcha',
456
- 'downloading_page',
457
- 'email_lock',
458
- 'email_notification',
459
- 'gravity_forms',
460
- 'ninja_forms',
461
- 'terns_and_conditions',
462
- 'twitter_lock',
463
- 'page_addon'
464
- );
465
-
466
- foreach ( $old_settings as $tab_key => $tab ) {
467
- // $tab[1] contains the fields inside the setting, not being set means it doesn't have any fields
468
- if ( ! empty( $tab[1] ) ) {
469
-
470
- if ( in_array( $tab_key, $compatibility_tabs ) ) {
471
-
472
- $tab_title = false;
473
- $tab_section = $tab_key;
474
-
475
- if ( 'access' == $tab_key ) {
476
- $tab_parent = 'advanced';
477
- }
478
-
479
- if ( 'amazon_s3' == $tab_key ) {
480
- $tab_parent = 'external_hosting';
481
- }
482
-
483
- if ( 'captcha' == $tab_key ) {
484
- $tab_parent = 'integration';
485
- }
486
-
487
- if ( 'downloading_page' == $tab_key || 'page_addon' == $tab_key ) {
488
- $tab_parent = 'advanced';
489
- $tab_section = 'page_setup';
490
- $tab_title = true;
491
- }
492
-
493
- if ( 'email_lock' == $tab_key || 'twitter_lock' == $tab_key || 'gravity_forms' == $tab_key || 'ninja_forms' == $tab_key ) {
494
- $tab_parent = 'lead_generation';
495
- }
496
-
497
- if ( 'email_notification' == $tab_key ) {
498
- $tab_parent = 'email_notification';
499
- $tab_title = true;
500
-
501
- // Reassign the title because the extension overwrittens it
502
- $settings['email_notification'] = array(
503
- 'title' => esc_html__( 'Emails', 'download-monitor' )
504
- );
505
-
506
- }
507
-
508
- if ( 'terns_and_conditions' == $tab_key ) {
509
- $tab_parent = 'terns_and_conditions';
510
- $tab_title = true;
511
- }
512
-
513
- if ( isset( $tab[0] ) && ! $tab_title ) {
514
-
515
- $settings[ $tab_parent ]['sections'][ $tab_section ] = array(
516
- 'title' => $tab[0],
517
- 'sections' => array()
518
- );
519
- }
520
-
521
- // Let's check if there are sections or fields so we can add other fields and not overwrite them
522
- if ( isset( $settings[ $tab_parent ]['sections'] ) && isset( $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] ) ) {
523
-
524
- $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] = array_merge( $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'], $tab[1] );
525
- } else {
526
- $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] = $tab[1];
527
- }
528
-
529
- // Unset the previous used tab - new tabs are already provided thanks to upsells
530
- if ( 'email_notification' != $tab_key && 'terns_and_conditions' != $tab_key ) {
531
- unset( $settings[ $tab_key ] );
532
- }
533
-
534
- } else {
535
-
536
- foreach ( $tab[1] as $other_tab_fields ) {
537
-
538
- $settings['other']['sections']['other']['fields'][] = $other_tab_fields;
539
- }
540
-
541
- }
542
- }
543
- }
544
-
545
- // Check to see if there is any info in Other tab
546
- if ( isset( $settings['other'] ) ) {
547
- $settings['other']['title'] = esc_html__( 'Other', 'download-monitor' );
548
- }
549
-
550
- return $settings;
551
- }
552
-
553
-
554
- /**
555
- * Return pages with ID => Page title format
556
- *
557
- * @return array
558
- */
559
- private function get_pages() {
560
-
561
- // pages
562
- $pages = array( array( 'key' => 0, 'lbl' => __( 'Select Page', 'download-monitor' ) ) );
563
-
564
- // get pages from db
565
- $db_pages = get_pages();
566
-
567
- // check and loop
568
- if ( count( $db_pages ) > 0 ) {
569
- foreach ( $db_pages as $db_page ) {
570
- $pages[] = array( 'key' => $db_page->ID, 'lbl' => $db_page->post_title );
571
- }
572
- }
573
-
574
- // return pages
575
- return $pages;
576
- }
577
-
578
- /**
579
- * Returns the list of all available currencies and add the symbol to the label
580
- *
581
- * @return array
582
- */
583
- private function get_currency_list_with_symbols() {
584
-
585
- /** @var \Never5\DownloadMonitor\Shop\Helper\Currency $currency_helper */
586
- $currency_helper = Services::get()->service( "currency" );
587
-
588
- $currencies = $currency_helper->get_available_currencies();
589
-
590
- //get_currency_symbol
591
-
592
- if ( ! empty( $currencies ) ) {
593
- foreach ( $currencies as $k => $v ) {
594
- $currencies[ $k ] = $v . " (" . $currency_helper->get_currency_symbol( $k ) . ")";
595
- }
596
- }
597
-
598
- return $currencies;
599
- }
600
-
601
- /**
602
- * Generate payment method sections for settings
603
- *
604
- * @return array
605
- */
606
- private function get_payment_methods_sections() {
607
-
608
- $gateways = Services::get()->service( 'payment_gateway' )->get_all_gateways();
609
-
610
- // formatted array of gateways with id=>title map (used in select fields)
611
- $gateways_formatted = array();
612
- if ( ! empty( $gateways ) ) {
613
- foreach ( $gateways as $gateway ) {
614
- $gateways_formatted[ $gateway->get_id() ] = $gateway->get_title();
615
- }
616
- }
617
-
618
- /** Generate the overview sections */
619
- $sections = array(
620
- 'overview' => array(
621
- 'title' => __( 'Overview', 'download-monitor' ),
622
- 'fields' => array(
623
- array(
624
- 'name' => '',
625
- 'std' => 'USD',
626
- 'label' => __( 'Enabled Gateways', 'download-monitor' ),
627
- 'desc' => __( 'Check all payment methods you want to enable on your webshop.', 'download-monitor' ),
628
- 'type' => 'gateway_overview',
629
- 'gateways' => $gateways
630
- ),
631
- array(
632
- 'name' => 'dlm_default_gateway',
633
- 'std' => 'paypal',
634
- 'label' => __( 'Default Gateway', 'download-monitor' ),
635
- 'desc' => __( 'This payment method will be pre-selected on your checkout page.', 'download-monitor' ),
636
- 'type' => 'select',
637
- 'options' => $gateways_formatted
638
- ),
639
- )
640
- )
641
- );
642
-
643
- /** Generate sections for all gateways */
644
- if ( ! empty( $gateways ) ) {
645
- /** @var \Never5\DownloadMonitor\Shop\Checkout\PaymentGateway\PaymentGateway $gateway */
646
- foreach ( $gateways as $gateway ) {
647
-
648
- // all gateways have an 'enabled' option by default
649
- $fields = array(
650
- array(
651
- 'name' => 'dlm_gateway_' . esc_attr( $gateway->get_id() ) . '_enabled',
652
- 'std' => '0',
653
- 'label' => __( 'Enabled', 'download-monitor' ),
654
- 'cb_label' => __( 'Enable Gateway', 'download-monitor' ),
655
- 'desc' => __( 'Check this to allow your customers to use this payment method to pay at your checkout page.', 'download-monitor' ),
656
- 'type' => 'checkbox'
657
- )
658
- );
659
-
660
- $gateway_settings = $gateway->get_settings();
661
- if ( ! empty( $gateway_settings ) ) {
662
- $escaped_id = esc_attr( $gateway->get_id() );
663
- foreach ( $gateway_settings as $gw ) {
664
- $prefixed_field = $gw;
665
-
666
- $prefixed_field['name'] = 'dlm_gateway_' . $escaped_id . '_' . $prefixed_field['name'];
667
-
668
- $fields[] = $prefixed_field;
669
- }
670
-
671
- }
672
-
673
- //dlm_gateway_paypal_
674
-
675
- $sections[ $gateway->get_id() ] = array(
676
- 'title' => $gateway->get_title(),
677
- 'fields' => $fields
678
- );
679
- }
680
- }
681
-
682
- return $sections;
683
- }
684
-
685
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Never5\DownloadMonitor\Shop\Services\Services;
4
+
5
+ class DLM_Admin_Settings {
6
+
7
+ /**
8
+ * Get settings URL
9
+ *
10
+ * @return string
11
+ */
12
+ public static function get_url() {
13
+ return admin_url( 'edit.php?post_type=dlm_download&page=download-monitor-settings' );
14
+ }
15
+
16
+ /**
17
+ * register_settings function.
18
+ *
19
+ * @access public
20
+ * @return void
21
+ */
22
+ public function register_settings() {
23
+ $settings = $this->get_settings();
24
+
25
+ // register our options and settings
26
+ foreach ( $settings as $tab_key => $tab ) {
27
+
28
+ foreach ( $tab['sections'] as $section_key => $section ) {
29
+
30
+ $option_group = "dlm_" . $tab_key . "_" . $section_key;
31
+
32
+ // Check to see if $section['fields'] is set, we could be using it for upsells
33
+ if ( isset( $section['fields'] ) ) {
34
+ foreach ( $section['fields'] as $field ) {
35
+ if ( ! empty( $field['name'] ) && ! in_array( $field['type'], apply_filters( 'dlm_settings_display_only_fields', array( 'action_button' ) ) ) ) {
36
+ if ( isset( $field['std'] ) ) {
37
+ add_option( $field['name'], $field['std'] );
38
+ }
39
+ register_setting( $option_group, $field['name'] );
40
+ }
41
+ }
42
+ }
43
+
44
+ // on the overview page, we also register the enabled setting for every gateway. This makes the checkboxes to enable gateways work.
45
+ if ( 'overview' == $section_key ) {
46
+ $gateways = Services::get()->service( 'payment_gateway' )->get_all_gateways();
47
+ if ( ! empty( $gateways ) ) {
48
+ foreach ( $gateways as $gateway ) {
49
+ register_setting( $option_group, 'dlm_gateway_' . esc_attr( $gateway->get_id() ) . '_enabled' );
50
+ }
51
+ }
52
+ }
53
+
54
+ }
55
+ }
56
+
57
+ }
58
+
59
+ /**
60
+ * Method that return all Download Monitor Settings
61
+ *
62
+ * @access public
63
+ * @return array
64
+ */
65
+ public function get_settings() {
66
+
67
+ $settings = array(
68
+ 'general' => array(
69
+ 'title' => __( 'General', 'download-monitor' ),
70
+ 'sections' => array(
71
+ 'general' => array(
72
+ 'title' => __( 'Download', 'download-monitor' ),
73
+ 'fields' => array(
74
+ array(
75
+ 'name' => 'dlm_default_template',
76
+ 'std' => '',
77
+ 'label' => __( 'Default Template', 'download-monitor' ),
78
+ 'desc' => __( 'Choose which template is used for <code>[download]</code> shortcodes by default (this can be overridden by the <code>format</code> argument).', 'download-monitor' ),
79
+ 'type' => 'select',
80
+ 'options' => download_monitor()->service( 'template_handler' )->get_available_templates()
81
+ ),
82
+ array(
83
+ 'name' => 'dlm_custom_template',
84
+ 'type' => 'text',
85
+ 'std' => '',
86
+ 'label' => __( 'Custom Template', 'download-monitor' ),
87
+ 'desc' => __( 'Leaving this blank will use the default <code>content-download.php</code> template file. If you enter, for example, <code>button</code>, the <code>content-download-button.php</code> template will be used instead. You can add custom templates inside your theme folder.', 'download-monitor' )
88
+ ),
89
+ array(
90
+ 'name' => 'dlm_shop_enabled',
91
+ 'std' => '',
92
+ 'label' => __( 'Shop Enabled', 'download-monitor' ),
93
+ 'cb_label' => __( 'Enable Shop', 'download-monitor' ),
94
+ 'desc' => __( 'If enabled, allows you to sell your downloads via Download Monitor.', 'download-monitor' ),
95
+ 'type' => 'checkbox'
96
+ ),
97
+ array(
98
+ 'name' => 'dlm_xsendfile_enabled',
99
+ 'std' => '',
100
+ 'label' => __( 'X-Accel-Redirect / X-Sendfile', 'download-monitor' ),
101
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
102
+ 'desc' => __( 'If supported, <code>X-Accel-Redirect</code> / <code>X-Sendfile</code> can be used to serve downloads instead of PHP (server requires <code>mod_xsendfile</code>).', 'download-monitor' ),
103
+ 'type' => 'checkbox'
104
+ ),
105
+ array(
106
+ 'name' => 'dlm_hotlink_protection_enabled',
107
+ 'std' => '',
108
+ 'label' => __( 'Prevent hotlinking', 'download-monitor' ),
109
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
110
+ 'desc' => __( 'If enabled, the download handler will check the PHP referer to see if it originated from your site and if not, redirect them to the homepage.', 'download-monitor' ),
111
+ 'type' => 'checkbox'
112
+ ),
113
+ array(
114
+ 'name' => 'dlm_allow_x_forwarded_for',
115
+ 'std' => '0',
116
+ 'label' => __( 'Allow Proxy IP Override', 'download-monitor' ),
117
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
118
+ 'desc' => __( 'If enabled, Download Monitor will use the X_FORWARDED_FOR HTTP header set by proxies as the IP address. Note that anyone can set this header, making it less secure.', 'download-monitor' ),
119
+ 'type' => 'checkbox'
120
+ ),
121
+ array(
122
+ 'name' => 'dlm_wp_search_enabled',
123
+ 'std' => '',
124
+ 'label' => __( 'Include in Search', 'download-monitor' ),
125
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
126
+ 'desc' => __( "If enabled, downloads will be included in the site's internal search results.", 'download-monitor' ),
127
+ 'type' => 'checkbox'
128
+ ),
129
+ array(
130
+ 'name' => 'dlm_turn_off_file_browser',
131
+ 'std' => '',
132
+ 'label' => __( 'File browser', 'download-monitor' ),
133
+ 'cb_label' => __( 'Turn Off', 'download-monitor' ),
134
+ 'desc' => __( "Disables the directory file browser.", 'download-monitor' ),
135
+ 'type' => 'checkbox'
136
+ ),
137
+ )
138
+ ),
139
+ )
140
+ ),
141
+ 'advanced' => array(
142
+ 'title' => __( 'Advanced', 'download-monitor' ),
143
+ 'sections' => array(
144
+ 'page_setup' => array(
145
+ 'title' => __( 'Pages Setup', 'download-monitor' ),
146
+ 'fields' => array(
147
+ array(
148
+ 'name' => 'dlm_download_endpoint',
149
+ 'type' => 'text',
150
+ 'std' => 'download',
151
+ 'placeholder' => __( 'download', 'download-monitor' ),
152
+ 'label' => __( 'Download Endpoint', 'download-monitor' ),
153
+ 'desc' => sprintf( __( 'Define what endpoint should be used for download links. By default this will be <code>%s</code>.', 'download-monitor' ), home_url( '/download/' ) )
154
+ ),
155
+ array(
156
+ 'name' => 'dlm_download_endpoint_value',
157
+ 'std' => 'ID',
158
+ 'label' => __( 'Endpoint Value', 'download-monitor' ),
159
+ 'desc' => sprintf( __( 'Define what unique value should be used on the end of your endpoint to identify the downloadable file. e.g. ID would give a link like <code>%s</code>', 'download-monitor' ), home_url( '/download/10/' ) ),
160
+ 'type' => 'select',
161
+ 'options' => array(
162
+ 'ID' => __( 'Download ID', 'download-monitor' ),
163
+ 'slug' => __( 'Download slug', 'download-monitor' )
164
+ )
165
+ ),
166
+ array(
167
+ 'name' => 'dlm_no_access_page',
168
+ 'std' => '',
169
+ 'label' => __( 'No Access Page', 'download-monitor' ),
170
+ 'desc' => __( "Choose what page is displayed when the user has no access to a file. Don't forget to add the <code>[dlm_no_access]</code> shortcode to the page.", 'download-monitor' ),
171
+ 'type' => 'lazy_select',
172
+ 'options' => array()
173
+ ),
174
+ ),
175
+ ),
176
+ 'access' => array(
177
+ 'title' => __( 'Access', 'download-monitor' ),
178
+ 'fields' => array(
179
+ array(
180
+ 'name' => 'dlm_no_access_error',
181
+ 'std' => sprintf( __( 'You do not have permission to access this download. %sGo to homepage%s', 'download-monitor' ), '<a href="' . home_url() . '">', '</a>' ),
182
+ 'placeholder' => '',
183
+ 'label' => __( 'No access message', 'download-monitor' ),
184
+ 'desc' => __( "The message that will be displayed to visitors when they don't have access to a file.", 'download-monitor' ),
185
+ 'type' => 'textarea'
186
+ ),
187
+ array(
188
+ 'name' => 'dlm_ip_blacklist',
189
+ 'std' => '192.168.0.0/24',
190
+ 'label' => __( 'Blacklist IPs', 'download-monitor' ),
191
+ 'desc' => __( 'List IP Addresses to blacklist, 1 per line. Use IP/CIDR netmask format for ranges. IPv4 examples: <code>198.51.100.1</code> or <code>198.51.100.0/24</code>. IPv6 examples: <code>2001:db8::1</code> or <code>2001:db8::/32</code>.', 'download-monitor' ),
192
+ 'placeholder' => '',
193
+ 'type' => 'textarea'
194
+ ),
195
+ array(
196
+ 'name' => 'dlm_user_agent_blacklist',
197
+ 'std' => 'Googlebot',
198
+ 'label' => __( 'Blacklist user agents', 'download-monitor' ),
199
+ 'desc' => __( 'List browser user agents to blacklist, 1 per line. Partial matches are sufficient. Regex matching is allowed by surrounding the pattern with forward slashes, e.g. <code>/^Mozilla.+Googlebot/</code>', 'download-monitor' ),
200
+ 'placeholder' => '',
201
+ 'type' => 'textarea'
202
+ ),
203
+ )
204
+ ),
205
+ 'hash' => array(
206
+ 'title' => __( 'Hashes', 'download-monitor' ),
207
+ 'fields' => array(
208
+ array(
209
+ 'name' => 'dlm_hash_desc',
210
+ 'text' => sprintf( __( 'Hashes can optionally be output via shortcodes, but may cause performance issues with large files. %1$sYou can read more about hashes here%2$s', 'download-monitor' ), '<a href="https://www.download-monitor.com/kb/download-hashes/" target="_blank">', '</a>' ),
211
+ 'type' => 'desc'
212
+ ),
213
+ array(
214
+ 'name' => 'dlm_generate_hash_md5',
215
+ 'std' => '0',
216
+ 'label' => __( 'MD5 hashes', 'download-monitor' ),
217
+ 'cb_label' => __( 'Generate MD5 hash for uploaded files', 'download-monitor' ),
218
+ 'desc' => '',
219
+ 'type' => 'checkbox'
220
+ ),
221
+ array(
222
+ 'name' => 'dlm_generate_hash_sha1',
223
+ 'std' => '0',
224
+ 'label' => __( 'SHA1 hashes', 'download-monitor' ),
225
+ 'cb_label' => __( 'Generate SHA1 hash for uploaded files', 'download-monitor' ),
226
+ 'desc' => '',
227
+ 'type' => 'checkbox'
228
+ ),
229
+ array(
230
+ 'name' => 'dlm_generate_hash_sha256',
231
+ 'std' => '0',
232
+ 'label' => __( 'SHA256 hashes', 'download-monitor' ),
233
+ 'cb_label' => __( 'Generate SHA256 hash for uploaded files', 'download-monitor' ),
234
+ 'type' => 'checkbox'
235
+ ),
236
+ array(
237
+ 'name' => 'dlm_generate_hash_crc32b',
238
+ 'std' => '0',
239
+ 'label' => __( 'CRC32B hashes', 'download-monitor' ),
240
+ 'cb_label' => __( 'Generate CRC32B hash for uploaded files', 'download-monitor' ),
241
+ 'type' => 'checkbox'
242
+ )
243
+ )
244
+ ),
245
+ 'logging' => array(
246
+ 'title' => __( 'Logging', 'download-monitor' ),
247
+ 'fields' => array(
248
+ array(
249
+ 'name' => 'dlm_enable_logging',
250
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
251
+ 'std' => '1',
252
+ 'label' => __( 'Download Log', 'download-monitor' ),
253
+ 'desc' => __( 'Log download attempts, IP addresses and more.', 'download-monitor' ),
254
+ 'type' => 'checkbox'
255
+ ),
256
+ array(
257
+ 'name' => 'dlm_logging_ip_type',
258
+ 'std' => '',
259
+ 'label' => __( 'IP Address Logging', 'download-monitor' ),
260
+ 'desc' => __( 'Define if and how you like to store IP addresses of users that download your files in your logs.', 'download-monitor' ),
261
+ 'type' => 'select',
262
+ 'options' => array(
263
+ 'full' => __( 'Store full IP address', 'download-monitor' ),
264
+ 'anonymized' => __( 'Store anonymized IP address (remove last 3 digits)', 'download-monitor' ),
265
+ 'none' => __( 'Store no IP address', 'download-monitor' )
266
+ )
267
+ ),
268
+ array(
269
+ 'name' => 'dlm_logging_ua',
270
+ 'std' => '1',
271
+ 'label' => __( 'User Agent Logging', 'download-monitor' ),
272
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
273
+ 'desc' => __( 'If enabled, the user agent (browser) the user uses to download the file will be stored in your logs.', 'download-monitor' ),
274
+ 'type' => 'checkbox'
275
+ ),
276
+ array(
277
+ 'name' => 'dlm_count_unique_ips',
278
+ 'std' => '',
279
+ 'label' => __( 'Count unique IPs only', 'download-monitor' ),
280
+ 'cb_label' => __( 'Enable', 'download-monitor' ),
281
+ 'desc' => sprintf( __( 'If enabled, the counter for each download will only increment and create a log entry once per IP address. Note that this option only works if %s is set to %s.', 'download-monitor' ), '<strong>' . __( 'IP Address Logging', 'download-monitor' ) . '</strong>', '<strong>' . __( 'Store full IP address', 'download-monitor' ) . '</strong>' ),
282
+ 'type' => 'checkbox'
283
+ ),
284
+ )
285
+ ),
286
+ 'misc' => array(
287
+ 'title' => __( 'Miscellaneous', 'download-monitor' ),
288
+ 'fields' => array(
289
+ array(
290
+ 'name' => 'dlm_clear_transients',
291
+ 'std' => '0',
292
+ 'label' => __( 'Clear all transients', 'download-monitor' ),
293
+ 'desc' => __( 'Remove all Download Monitor transients, this can solve version caching issues.', 'download-monitor' ),
294
+ 'type' => 'action_button',
295
+ 'link' => self::get_url() . '&tab=advanced&section=misc'
296
+ ),
297
+ ),
298
+ )
299
+ )
300
+ ),
301
+ 'lead_generation' => array(
302
+ 'title' => esc_html__( 'Content Locking', 'download-monitor' ),
303
+ 'badge' => true,
304
+ 'sections' => array(
305
+ 'email_lock' => array(
306
+ 'title' => esc_html__( 'Email Lock', 'download-monitor' ),
307
+ 'fields' => array(),
308
+ 'sections' => array(),
309
+ 'badge' => true,
310
+ ),
311
+ 'ninja_forms' => array(
312
+ 'title' => esc_html__( 'Ninja Forms', 'download-monitor' ),
313
+ 'fields' => array(),
314
+ 'sections' => array(),
315
+ 'badge' => true,
316
+ ),
317
+ 'gravity_forms' => array(
318
+ 'title' => esc_html__( 'Gravity Forms', 'download-monitor' ),
319
+ 'fields' => array(),
320
+ 'sections' => array(),
321
+ 'badge' => true,
322
+ ),
323
+ 'twitter_lock' => array(
324
+ 'title' => esc_html__( 'Twitter Lock', 'download-monitor' ),
325
+ 'fields' => array(),
326
+ 'sections' => array(),
327
+ 'badge' => true,
328
+ ),
329
+ )
330
+ ),
331
+ 'external_hosting' => array(
332
+ 'title' => esc_html__( 'External Hosting', 'download-monitor' ),
333
+ 'badge' => true,
334
+ 'sections' => array(
335
+ 'amazon_s3' => array(
336
+ 'title' => esc_html__( 'Amazon S3', 'download-monitor' ),
337
+ 'fields' => array(),
338
+ 'sections' => array(),
339
+ 'badge' => true,
340
+ ),
341
+ 'google_drive' => array(
342
+ 'title' => esc_html__( 'Google Drive', 'download-monitor' ),
343
+ 'fields' => array(),
344
+ 'sections' => array(),
345
+ 'badge' => true,
346
+ ),
347
+ )
348
+ ),
349
+ 'integration' => array(
350
+ 'title' => esc_html__( 'Integration', 'download-monitor' ),
351
+ 'badge' => true,
352
+ 'sections' => array()
353
+ ),
354
+ 'email_notification' => array(
355
+ 'title' => esc_html__( 'Emails', 'download-monitor' ),
356
+ 'badge' => true,
357
+ 'sections' => array()
358
+ ),
359
+ 'terns_and_conditions' => array(
360
+ 'title' => esc_html__( 'Terms and Conditions', 'download-monitor' ),
361
+ 'badge' => true,
362
+ 'sections' => array()
363
+ )
364
+ );
365
+
366
+ if ( dlm_is_shop_enabled() ) {
367
+
368
+ $settings['general']['sections']['shop'] = array(
369
+ 'title' => __( 'Shop', 'download-monitor' ),
370
+ 'fields' => array(
371
+ array(
372
+ 'name' => 'dlm_base_country',
373
+ 'std' => 'US',
374
+ 'label' => __( 'Base Country', 'download-monitor' ),
375
+ 'desc' => __( 'Where is your store located?', 'download-monitor' ),
376
+ 'type' => 'select',
377
+ 'options' => Services::get()->service( "country" )->get_countries()
378
+ ),
379
+ array(
380
+ 'name' => 'dlm_currency',
381
+ 'std' => 'USD',
382
+ 'label' => __( 'Currency', 'download-monitor' ),
383
+ 'desc' => __( 'In what currency are you selling?', 'download-monitor' ),
384
+ 'type' => 'select',
385
+ 'options' => $this->get_currency_list_with_symbols()
386
+ ),
387
+ array(
388
+ 'name' => 'dlm_currency_pos',
389
+ 'std' => 'left',
390
+ 'label' => __( 'Currency Position', 'download-monitor' ),
391
+ 'desc' => __( 'The position of the currency symbol.', 'download-monitor' ),
392
+ 'type' => 'select',
393
+ 'options' => array(
394
+ 'left' => sprintf( __( 'Left (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'left' ) ) ),
395
+ 'right' => sprintf( __( 'Right (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'right' ) ) ),
396
+ 'left_space' => sprintf( __( 'Left with space (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'left_space' ) ) ),
397
+ 'right_space' => sprintf( __( 'Right with space (%s)', 'download-monitor' ), Services::get()->service( 'format' )->money( 9.99, array( 'currency_position' => 'right_space' ) ) )
398
+ )
399
+ ),
400
+ array(
401
+ 'name' => 'dlm_decimal_separator',
402
+ 'type' => 'text',
403
+ 'std' => '.',
404
+ 'label' => __( 'Decimal Separator', 'download-monitor' ),
405
+ 'desc' => __( 'The decimal separator of displayed prices.', 'download-monitor' )
406
+ ),
407
+ array(
408
+ 'name' => 'dlm_thousand_separator',
409
+ 'type' => 'text',
410
+ 'std' => ',',
411
+ 'label' => __( 'Thousand Separator', 'download-monitor' ),
412
+ 'desc' => __( 'The thousand separator of displayed prices.', 'download-monitor' )
413
+ ),
414
+ array(
415
+ 'name' => 'dlm_disable_cart',
416
+ 'std' => '',
417
+ 'label' => __( 'Disable Cart', 'download-monitor' ),
418
+ 'cb_label' => __( 'Disable', 'download-monitor' ),
419
+ 'desc' => __( 'If checked, your customers will be sent to your checkout page directly.', 'download-monitor' ),
420
+ 'type' => 'checkbox'
421
+ ),
422
+ )
423
+ );
424
+
425
+ $settings['advanced']['sections']['page_setup']['fields'][] = array(
426
+ 'name' => 'dlm_page_cart',
427
+ 'std' => '',
428
+ 'label' => __( 'Cart page', 'download-monitor' ),
429
+ 'desc' => __( 'Your cart page, make sure it has the <code>[dlm_cart]</code> shortcode.', 'download-monitor' ),
430
+ 'type' => 'lazy_select',
431
+ 'options' => array()
432
+ );
433
+
434
+ $settings['advanced']['sections']['page_setup']['fields'][] = array(
435
+ 'name' => 'dlm_page_checkout',
436
+ 'std' => '',
437
+ 'label' => __( 'Checkout page', 'download-monitor' ),
438
+ 'desc' => __( 'Your checkout page, make sure it has the <code>[dlm_checkout]</code> shortcode.', 'download-monitor' ),
439
+ 'type' => 'lazy_select',
440
+ 'options' => array()
441
+ );
442
+
443
+ $settings['payments'] = array(
444
+ 'title' => __( 'Payment Methods', 'download-monitor' ),
445
+ 'sections' => $this->get_payment_methods_sections()
446
+ );
447
+ }
448
+
449
+ // this is here to maintain backwards compatibility, use 'dlm_settings' instead
450
+ $old_settings = apply_filters( 'download_monitor_settings', array() );
451
+
452
+ // This is the correct filter
453
+ $settings = apply_filters( 'dlm_settings', $settings );
454
+
455
+ // Backwards compatibility for 4.3 and 4.4.4
456
+ $settings = $this->backwards_compatibility_settings( $old_settings, $settings );
457
+
458
+ return $settings;
459
+ }
460
+
461
+ /**
462
+ * Register lazy load setting fields callbacks
463
+ */
464
+ public function register_lazy_load_callbacks() {
465
+ add_filter( 'dlm_settings_lazy_select_dlm_page_cart', array( $this, 'lazy_select_dlm_no_access_page' ) );
466
+ add_filter( 'dlm_settings_lazy_select_dlm_page_checkout', array( $this, 'lazy_select_dlm_no_access_page' ) );
467
+ add_filter( 'dlm_settings_lazy_select_dlm_no_access_page', array( $this, 'lazy_select_dlm_no_access_page' ) );
468
+ }
469
+
470
+ /**
471
+ * Fetch and returns pages on lazy select for dlm_no_access_page option
472
+ *
473
+ * @param array $options
474
+ *
475
+ * @return array
476
+ */
477
+ public function lazy_select_dlm_no_access_page( $options ) {
478
+ return $this->get_pages();
479
+ }
480
+
481
+ /**
482
+ * Backwards compatibility for settings
483
+ *
484
+ * @param $old_settings
485
+ * @param $settings
486
+ *
487
+ * @return mixed
488
+ * @since 4.4.5
489
+ */
490
+ public function backwards_compatibility_settings( $old_settings, $settings ) {
491
+
492
+ // First we check if there is info in $old_settings
493
+ if ( empty( $old_settings ) ) {
494
+
495
+ return $settings;
496
+ }
497
+
498
+ $compatibility_tabs = array(
499
+ 'access',
500
+ 'amazon_s3',
501
+ 'captcha',
502
+ 'downloading_page',
503
+ 'email_lock',
504
+ 'email_notification',
505
+ 'gravity_forms',
506
+ 'ninja_forms',
507
+ 'terns_and_conditions',
508
+ 'twitter_lock',
509
+ 'page_addon'
510
+ );
511
+
512
+ foreach ( $old_settings as $tab_key => $tab ) {
513
+ // $tab[1] contains the fields inside the setting, not being set means it doesn't have any fields
514
+ if ( ! empty( $tab[1] ) ) {
515
+
516
+ if ( in_array( $tab_key, $compatibility_tabs ) ) {
517
+
518
+ $tab_title = false;
519
+ $tab_section = $tab_key;
520
+
521
+ if ( 'access' == $tab_key ) {
522
+ $tab_parent = 'advanced';
523
+ }
524
+
525
+ if ( 'amazon_s3' == $tab_key ) {
526
+ $tab_parent = 'external_hosting';
527
+ }
528
+
529
+ if ( 'captcha' == $tab_key ) {
530
+ $tab_parent = 'integration';
531
+ }
532
+
533
+ if ( 'downloading_page' == $tab_key || 'page_addon' == $tab_key ) {
534
+ $tab_parent = 'advanced';
535
+ $tab_section = 'page_setup';
536
+ $tab_title = true;
537
+ }
538
+
539
+ if ( 'email_lock' == $tab_key || 'twitter_lock' == $tab_key || 'gravity_forms' == $tab_key || 'ninja_forms' == $tab_key ) {
540
+ $tab_parent = 'lead_generation';
541
+ }
542
+
543
+ if ( 'email_notification' == $tab_key ) {
544
+ $tab_parent = 'email_notification';
545
+ $tab_title = true;
546
+
547
+ // Reassign the title because the extension overwrittens it
548
+ $settings['email_notification'] = array(
549
+ 'title' => esc_html__( 'Emails', 'download-monitor' )
550
+ );
551
+
552
+ }
553
+
554
+ if ( 'terns_and_conditions' == $tab_key ) {
555
+ $tab_parent = 'terns_and_conditions';
556
+ $tab_title = true;
557
+ }
558
+
559
+ if ( isset( $tab[0] ) && ! $tab_title ) {
560
+
561
+ $settings[ $tab_parent ]['sections'][ $tab_section ] = array(
562
+ 'title' => $tab[0],
563
+ 'sections' => array()
564
+ );
565
+ }
566
+
567
+ // Let's check if there are sections or fields so we can add other fields and not overwrite them
568
+ if ( isset( $settings[ $tab_parent ]['sections'] ) && isset( $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] ) ) {
569
+
570
+ $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] = array_merge( $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'], $tab[1] );
571
+ } else {
572
+ $settings[ $tab_parent ]['sections'][ $tab_section ]['fields'] = $tab[1];
573
+ }
574
+
575
+ // Unset the previous used tab - new tabs are already provided thanks to upsells
576
+ if ( 'email_notification' != $tab_key && 'terns_and_conditions' != $tab_key ) {
577
+ unset( $settings[ $tab_key ] );
578
+ }
579
+
580
+ } else {
581
+
582
+ foreach ( $tab[1] as $other_tab_fields ) {
583
+
584
+ $settings['other']['sections']['other']['fields'][] = $other_tab_fields;
585
+ }
586
+
587
+ }
588
+ }
589
+ }
590
+
591
+ // Check to see if there is any info in Other tab
592
+ if ( isset( $settings['other'] ) ) {
593
+ $settings['other']['title'] = esc_html__( 'Other', 'download-monitor' );
594
+ }
595
+
596
+ return $settings;
597
+ }
598
+
599
+
600
+ /**
601
+ * Return pages with ID => Page title format
602
+ *
603
+ * @return array
604
+ */
605
+ private function get_pages() {
606
+
607
+ // pages
608
+ $pages = array( array( 'key' => 0, 'lbl' => __( 'Select Page', 'download-monitor' ) ) );
609
+
610
+ // get pages from db
611
+ $db_pages = get_pages();
612
+
613
+ // check and loop
614
+ if ( count( $db_pages ) > 0 ) {
615
+ foreach ( $db_pages as $db_page ) {
616
+ $pages[] = array( 'key' => $db_page->ID, 'lbl' => $db_page->post_title );
617
+ }
618
+ }
619
+
620
+ // return pages
621
+ return $pages;
622
+ }
623
+
624
+ /**
625
+ * Returns the list of all available currencies and add the symbol to the label
626
+ *
627
+ * @return array
628
+ */
629
+ private function get_currency_list_with_symbols() {
630
+
631
+ /** @var \Never5\DownloadMonitor\Shop\Helper\Currency $currency_helper */
632
+ $currency_helper = Services::get()->service( "currency" );
633
+
634
+ $currencies = $currency_helper->get_available_currencies();
635
+
636
+ //get_currency_symbol
637
+
638
+ if ( ! empty( $currencies ) ) {
639
+ foreach ( $currencies as $k => $v ) {
640
+ $currencies[ $k ] = $v . " (" . $currency_helper->get_currency_symbol( $k ) . ")";
641
+ }
642
+ }
643
+
644
+ return $currencies;
645
+ }
646
+
647
+ /**
648
+ * Generate payment method sections for settings
649
+ *
650
+ * @return array
651
+ */
652
+ private function get_payment_methods_sections() {
653
+
654
+ $gateways = Services::get()->service( 'payment_gateway' )->get_all_gateways();
655
+
656
+ // formatted array of gateways with id=>title map (used in select fields)
657
+ $gateways_formatted = array();
658
+ if ( ! empty( $gateways ) ) {
659
+ foreach ( $gateways as $gateway ) {
660
+ $gateways_formatted[ $gateway->get_id() ] = $gateway->get_title();
661
+ }
662
+ }
663
+
664
+ /** Generate the overview sections */
665
+ $sections = array(
666
+ 'overview' => array(
667
+ 'title' => __( 'Overview', 'download-monitor' ),
668
+ 'fields' => array(
669
+ array(
670
+ 'name' => '',
671
+ 'std' => 'USD',
672
+ 'label' => __( 'Enabled Gateways', 'download-monitor' ),
673
+ 'desc' => __( 'Check all payment methods you want to enable on your webshop.', 'download-monitor' ),
674
+ 'type' => 'gateway_overview',
675
+ 'gateways' => $gateways
676
+ ),
677
+ array(
678
+ 'name' => 'dlm_default_gateway',
679
+ 'std' => 'paypal',
680
+ 'label' => __( 'Default Gateway', 'download-monitor' ),
681
+ 'desc' => __( 'This payment method will be pre-selected on your checkout page.', 'download-monitor' ),
682
+ 'type' => 'select',
683
+ 'options' => $gateways_formatted
684
+ ),
685
+ )
686
+ )
687
+ );
688
+
689
+ /** Generate sections for all gateways */
690
+ if ( ! empty( $gateways ) ) {
691
+ /** @var \Never5\DownloadMonitor\Shop\Checkout\PaymentGateway\PaymentGateway $gateway */
692
+ foreach ( $gateways as $gateway ) {
693
+
694
+ // all gateways have an 'enabled' option by default
695
+ $fields = array(
696
+ array(
697
+ 'name' => 'dlm_gateway_' . esc_attr( $gateway->get_id() ) . '_enabled',
698
+ 'std' => '0',
699
+ 'label' => __( 'Enabled', 'download-monitor' ),
700
+ 'cb_label' => __( 'Enable Gateway', 'download-monitor' ),
701
+ 'desc' => __( 'Check this to allow your customers to use this payment method to pay at your checkout page.', 'download-monitor' ),
702
+ 'type' => 'checkbox'
703
+ )
704
+ );
705
+
706
+ $gateway_settings = $gateway->get_settings();
707
+ if ( ! empty( $gateway_settings ) ) {
708
+ $escaped_id = esc_attr( $gateway->get_id() );
709
+ foreach ( $gateway_settings as $gw ) {
710
+ $prefixed_field = $gw;
711
+
712
+ $prefixed_field['name'] = 'dlm_gateway_' . $escaped_id . '_' . $prefixed_field['name'];
713
+
714
+ $fields[] = $prefixed_field;
715
+ }
716
+
717
+ }
718
+
719
+ //dlm_gateway_paypal_
720
+
721
+ $sections[ $gateway->get_id() ] = array(
722
+ 'title' => $gateway->get_title(),
723
+ 'fields' => $fields
724
+ );
725
+ }
726
+ }
727
+
728
+ return $sections;
729
+ }
730
+
731
+ }
src/CookieManager.php CHANGED
@@ -1,59 +1,59 @@
1
- <?php
2
-
3
- class DLM_Cookie_Manager {
4
-
5
- const KEY = 'wp_dlm_downloading';
6
-
7
- /**
8
- * Check if the cookie is exists for this download & version. If it does exists the requester has requested the exact same download & version in the past minute.
9
- *
10
- * @param DLM_Download $download
11
- *
12
- * @return bool
13
- */
14
- public static function exists( $download ) {
15
- $exists = false;
16
-
17
- // get JSON data
18
- $cdata = self::get_cookie_data();
19
-
20
- // check if no parse errors occurred
21
- if ( null != $cdata && is_array( $cdata ) && ! empty( $cdata ) ) {
22
-
23
- // check in cookie data for download AND version ID
24
- if ( $cdata['download'] == $download->get_id() && $cdata['version'] == $download->get_version()->get_version_number() ) {
25
- $exists = true;
26
- }
27
- }
28
-
29
-
30
- return $exists;
31
- }
32
-
33
- /**
34
- * Get cookie data
35
- *
36
- * @return array|null
37
- */
38
- public static function get_cookie_data() {
39
- $cdata = null;
40
- if ( ! empty( $_COOKIE[ self::KEY ] ) ) {
41
- $cdata = json_decode( base64_decode( sanitize_text_field( wp_unslash( $_COOKIE[ self::KEY ] ) ) ), true );
42
- }
43
-
44
- return $cdata;
45
- }
46
-
47
- /**
48
- * Set cookie
49
- *
50
- * @param DLM_Download $download
51
- */
52
- public static function set_cookie( $download ) {
53
- setcookie( self::KEY, base64_encode( json_encode( array(
54
- 'download' => $download->get_id(),
55
- 'version' => $download->get_version()->get_version_number()
56
- ) ) ), time() + 60, COOKIEPATH, COOKIE_DOMAIN, false, true );
57
- }
58
-
59
  }
1
+ <?php
2
+
3
+ class DLM_Cookie_Manager {
4
+
5
+ const KEY = 'wp_dlm_downloading';
6
+
7
+ /**
8
+ * Check if the cookie is exists for this download & version. If it does exists the requester has requested the exact same download & version in the past minute.
9
+ *
10
+ * @param DLM_Download $download
11
+ *
12
+ * @return bool
13
+ */
14
+ public static function exists( $download ) {
15
+ $exists = false;
16
+
17
+ // get JSON data
18
+ $cdata = self::get_cookie_data();
19
+
20
+ // check if no parse errors occurred
21
+ if ( null != $cdata && is_array( $cdata ) && ! empty( $cdata ) ) {
22
+
23
+ // check in cookie data for download AND version ID
24
+ if ( $cdata['download'] == $download->get_id() && $cdata['version'] == $download->get_version()->get_version_number() ) {
25
+ $exists = true;
26
+ }
27
+ }
28
+
29
+
30
+ return $exists;
31
+ }
32
+
33
+ /**
34
+ * Get cookie data
35
+ *
36
+ * @return array|null
37
+ */
38
+ public static function get_cookie_data() {
39
+ $cdata = null;
40
+ if ( ! empty( $_COOKIE[ self::KEY ] ) ) {
41
+ $cdata = json_decode( base64_decode( sanitize_text_field( wp_unslash( $_COOKIE[ self::KEY ] ) ) ), true );
42
+ }
43
+
44
+ return $cdata;
45
+ }
46
+
47
+ /**
48
+ * Set cookie
49
+ *
50
+ * @param DLM_Download $download
51
+ */
52
+ public static function set_cookie( $download ) {
53
+ setcookie( self::KEY, base64_encode( json_encode( array(
54
+ 'download' => $download->get_id(),
55
+ 'version' => $download->get_version()->get_version_number()
56
+ ) ) ), time() + 60, COOKIEPATH, COOKIE_DOMAIN, false, true );
57
+ }
58
+
59
  }
src/Download/Download.php CHANGED
@@ -1,882 +1,882 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- /**
8
- * DLM_Download class.
9
- */
10
- class DLM_Download {
11
-
12
- /** @var int */
13
- private $id = 0;
14
-
15
- /** @var string */
16
- private $title;
17
-
18
- /** @var string */
19
- private $slug;
20
-
21
- /** @var string */
22
- private $status;
23
-
24
- /** @var int */
25
- private $author;
26
-
27
- /** @var string */
28
- private $description = "";
29
-
30
- /** @var string */
31
- private $excerpt = "";
32
-
33
- /** @var int */
34
- private $download_count = 0;
35
-
36
- /** @var bool */
37
- private $redirect_only = false;
38
-
39
- /** @var bool */
40
- private $featured = false;
41
-
42
- /** @var bool */
43
- private $members_only = false;
44
-
45
- /** @var DLM_Download_Version */
46
- private $version = null;
47
-
48
- /** @var array */
49
- private $versions = array();
50
-
51
- /** @var array */
52
- private $version_ids = array();
53
-
54
- /**
55
- * @var WP_Post
56
- * @deprecated 4.0
57
- *
58
- * Please don't use the $post variable directly anymore.
59
- * The variable is left in for now for backwards compatibility but will be removed in the future!
60
- */
61
- public $post;
62
-
63
- /**
64
- * exists function.
65
- *
66
- * @access public
67
- * @return bool
68
- */
69
- public function exists() {
70
- return ( $this->get_id() > 0 && in_array( $this->get_status(), apply_filters( 'dlm_download_exists_status', array( 'publish' ) ) ) );
71
- }
72
-
73
- /**
74
- * @return int
75
- */
76
- public function get_id() {
77
- return $this->id;
78
- }
79
-
80
- /**
81
- * @param int $id
82
- */
83
- public function set_id( $id ) {
84
- $this->id = $id;
85
- }
86
-
87
- /**
88
- * @return string
89
- */
90
- public function get_title() {
91
- return $this->title;
92
- }
93
-
94
- /**
95
- * @param string $title
96
- */
97
- public function set_title( $title ) {
98
- $this->title = $title;
99
- }
100
-
101
- /**
102
- * the_title function.
103
- *
104
- * @access public
105
- * @return void
106
- */
107
- public function the_title() {
108
- echo wp_kses_post( $this->get_title() );
109
- }
110
-
111
- /**
112
- * @return string
113
- */
114
- public function get_slug() {
115
- return $this->slug;
116
- }
117
-
118
- /**
119
- * @param string $slug
120
- */
121
- public function set_slug( $slug ) {
122
- $this->slug = $slug;
123
- }
124
-
125
- /**
126
- * @return string
127
- */
128
- public function get_status() {
129
- return $this->status;
130
- }
131
-
132
- /**
133
- * @param string $status
134
- */
135
- public function set_status( $status ) {
136
- $this->status = $status;
137
- }
138
-
139
- /**
140
- * @return int
141
- */
142
- public function get_author() {
143
- return $this->author;
144
- }
145
-
146
- /**
147
- * @param int $author
148
- */
149
- public function set_author( $author ) {
150
- $this->author = $author;
151
- }
152
-
153
- /**
154
- * Helper method that returns author 'display_name'
155
- *
156
- * @access public
157
- * @return string
158
- */
159
- public function get_the_author() {
160
- $author_id = $this->get_author();
161
- $user = get_user_by( 'ID', $author_id );
162
- if ( $user ) {
163
- return $user->display_name;
164
- }
165
-
166
- return '';
167
- }
168
-
169
- /**
170
- * Helper method that prints author 'display_name'
171
- *
172
- * @access public
173
- * @return void
174
- */
175
- public function the_author() {
176
- echo esc_html( $this->get_the_author() );
177
- }
178
-
179
- /**
180
- * @return string
181
- */
182
- public function get_description() {
183
- return $this->description;
184
- }
185
-
186
- /**
187
- * @param string $description
188
- */
189
- public function set_description( $description ) {
190
- $this->description = $description;
191
- }
192
-
193
- /**
194
- * @return string
195
- */
196
- public function get_excerpt() {
197
- return $this->excerpt;
198
- }
199
-
200
- /**
201
- * Prints the excerpt
202
- */
203
- public function the_excerpt() {
204
- echo wp_kses_post( wpautop( do_shortcode( $this->get_excerpt() ) ) );
205
- }
206
-
207
- /**
208
- * Returns the excerpt with wpautop and do_shortcode
209
- */
210
- public function get_the_excerpt() {
211
- return wpautop( do_shortcode( $this->get_excerpt() ) );
212
- }
213
-
214
- /**
215
- * @param string $excerpt
216
- */
217
- public function set_excerpt( $excerpt ) {
218
- $this->excerpt = $excerpt;
219
- }
220
-
221
- /**
222
- * redirect_only function.
223
- *
224
- * @access public
225
- * @return bool
226
- */
227
- public function is_redirect_only() {
228
- return $this->redirect_only;
229
- }
230
-
231
- /**
232
- * @param bool $redirect_only
233
- */
234
- public function set_redirect_only( $redirect_only ) {
235
- $this->redirect_only = $redirect_only;
236
- }
237
-
238
- /**
239
- * is_featured function.
240
- *
241
- * @access public
242
- * @return bool
243
- */
244
- public function is_featured() {
245
- return $this->featured;
246
- }
247
-
248
- /**
249
- * @param bool $featured
250
- */
251
- public function set_featured( $featured ) {
252
- $this->featured = $featured;
253
- }
254
-
255
- /**
256
- * is_members_only function.
257
- *
258
- * @access public
259
- * @return bool
260
- */
261
- public function is_members_only() {
262
- return $this->members_only;
263
- }
264
-
265
- /**
266
- * @param bool $members_only
267
- */
268
- public function set_members_only( $members_only ) {
269
- $this->members_only = $members_only;
270
- }
271
-
272
- /**
273
- * @return int
274
- */
275
- public function get_download_count() {
276
-
277
- // set default download count
278
- $download_count = $this->download_count;
279
-
280
- // set download count of latest version if set
281
- if ( null != $this->get_version() && ! $this->get_version()->is_latest() ) {
282
- $download_count = $this->get_version()->get_download_count();
283
- }
284
-
285
- return apply_filters( 'dlm_download_count', $download_count, $this );
286
- }
287
-
288
- /**
289
- * @param int $download_count
290
- */
291
- public function set_download_count( $download_count ) {
292
- $this->download_count = $download_count;
293
- }
294
-
295
- /**
296
- * Get download image
297
- *
298
- * @param string $size
299
- *
300
- * @return string
301
- */
302
- public function get_image( $size = 'full' ) {
303
- if ( has_post_thumbnail( $this->id ) ) {
304
- return get_the_post_thumbnail( $this->id, $size );
305
- } else {
306
- return '<img alt="Placeholder" class="wp-post-image" src="' . apply_filters( 'dlm_placeholder_image_src', download_monitor()->get_plugin_url() . '/assets/images/placeholder.png', $this->id, $this, $size ) . '" />';
307
- }
308
- }
309
-
310
- /**
311
- * the_image function.
312
- *
313
- * @access public
314
- *
315
- * @param string $size (default: 'full')
316
- *
317
- * @return void
318
- */
319
- public function the_image( $size = 'full' ) {
320
- echo wp_kses_post( $this->get_image( $size ) );
321
- }
322
-
323
- /**
324
- * the_download_link function.
325
- *
326
- * @access public
327
- * @return void
328
- */
329
- public function the_download_link() {
330
- echo esc_url( $this->get_the_download_link() );
331
- }
332
-
333
- /**
334
- * get_the_download_link function.
335
- *
336
- * @access public
337
- * @return String
338
- */
339
- public function get_the_download_link() {
340
- $scheme = parse_url( get_option( 'home' ), PHP_URL_SCHEME );
341
- $endpoint = ( $endpoint = get_option( 'dlm_download_endpoint' ) ) ? $endpoint : 'download';
342
- $ep_value = get_option( 'dlm_download_endpoint_value' );
343
-
344
- switch ( $ep_value ) {
345
- case 'slug' :
346
- $value = $this->post->post_name;
347
- break;
348
- default :
349
- $value = $this->id;
350
- break;
351
- }
352
-
353
- if ( get_option( 'permalink_structure' ) ) {
354
- $link = home_url( '/' . $endpoint . '/' . $value . '/', $scheme );
355
- } else {
356
- $link = add_query_arg( $endpoint, $value, home_url( '', $scheme ) );
357
- }
358
-
359
- // only add version argument when current version isn't latest version
360
- if ( null !== $this->get_version() && false === $this->get_version()->is_latest() ) {
361
-
362
- if ( $this->get_version()->has_version_number() ) {
363
- $link = add_query_arg( 'version', $this->get_version()->get_version_slug(), $link );
364
- } else {
365
- $link = add_query_arg( 'v', $this->get_version()->get_id(), $link );
366
- }
367
- }
368
-
369
- return apply_filters( 'dlm_download_get_the_download_link', esc_url_raw( $link ), $this, $this->get_version() );
370
- }
371
-
372
- /**
373
- * Version related methods
374
- */
375
-
376
- /**
377
- * Returns if download has at least 1 version
378
- *
379
- * @return bool
380
- */
381
- public function has_version() {
382
- return ( null !== $this->get_version() && $this->get_version()->get_id() > 0 );
383
- }
384
-
385
- /**
386
- * @return DLM_Download_Version
387
- */
388
- public function get_version() {
389
-
390
- // set latest version as current version if no version is set
391
- if ( $this->version == null ) {
392
- $versions = $this->get_versions();
393
-
394
- if ( ! empty( $versions ) ) {
395
- $latest = array_shift( $versions );
396
- $latest->set_latest( true );
397
- $this->version = $latest;
398
- } else {
399
- // return an empty version if there is no version
400
- $this->version = new DLM_Download_Version();
401
-
402
- // set empty version as latest so download object doesn't think we're dealing with a 'special' version
403
- $this->version->set_latest( true );
404
- }
405
- }
406
-
407
- return $this->version;
408
- }
409
-
410
- /**
411
- * Set the download to a version other than the current / latest version it defaults to.
412
- *
413
- * @param DLM_Download_Version $version
414
- */
415
- public function set_version( DLM_Download_Version $version ) {
416
- // check if given version is a version of this download
417
- if ( $version->get_download_id() == $this->get_id() ) {
418
- $this->version = $version;
419
- }
420
- }
421
-
422
- /**
423
- * Get version ID by version name
424
- *
425
- * This used to be get_version_id(), moved to this method.
426
- *
427
- * @param string $name
428
- *
429
- * @return int
430
- */
431
- public function get_version_id_version_name( $name ) {
432
- $versions = $this->get_versions();
433
-
434
- foreach ( $versions as $version_id => $version ) {
435
- $version_str = $version->get_version();
436
- if ( ( is_numeric( $version_str ) && version_compare( $version_str, strtolower( $name ), '=' ) ) || sanitize_title_with_dashes( $version_str ) === sanitize_title_with_dashes( $name ) ) {
437
- return absint( $version_id );
438
- }
439
- }
440
-
441
- return 0;
442
- }
443
-
444
- /**
445
- * version_exists function.
446
- *
447
- * @access public
448
- *
449
- * @param int $version_id
450
- *
451
- * @return bool
452
- */
453
- public function version_exists( $version_id ) {
454
- return in_array( absint( $version_id ), array_keys( $this->get_versions() ) );
455
- }
456
-
457
- /**
458
- * get_file_version_ids function.
459
- *
460
- * @access public
461
- * @return array
462
- */
463
- public function get_version_ids() {
464
- if ( empty( $this->version_ids ) ) {
465
-
466
- if ( apply_filters( 'dlm_download_use_version_transient', true, $this ) ) {
467
-
468
- $transient_name = 'dlm_file_version_ids_' . $this->get_id();
469
-
470
- if ( false === ( $this->version_ids = get_transient( $transient_name ) ) ) {
471
- $this->version_ids = download_monitor()->service( 'version_manager' )->get_version_ids( $this->get_id() );
472
-
473
- set_transient( $transient_name, $this->version_ids, YEAR_IN_SECONDS );
474
- }
475
-
476
- } else {
477
- $this->version_ids = download_monitor()->service( 'version_manager' )->get_version_ids( $this->get_id() );
478
- }
479
-
480
- }
481
-
482
- return $this->version_ids;
483
- }
484
-
485
- /**
486
- * get_file_versions function.
487
- *
488
- * @access public
489
- * @return array
490
- */
491
- public function get_versions() {
492
-
493
- if ( ! empty( $this->versions ) ) {
494
- return $this->versions;
495
- }
496
-
497
- $version_ids = $this->get_version_ids();
498
-
499
- $this->versions = array();
500
-
501
- if ( count( $version_ids ) > 0 ) {
502
- $versions = download_monitor()->service( 'version_repository' )->retrieve( array( 'post__in' => $version_ids ) );
503
-
504
- /** @var DLM_Download_Version $version */
505
- foreach ( $versions as $version ) {
506
- $this->versions[ absint( $version->get_id() ) ] = $version;
507
- }
508
- }
509
-
510
- return apply_filters( 'dlm_download_get_versions', $this->versions, $this );
511
- }
512
-
513
- /**
514
- *
515
- * Deprecated methods below.
516
- *
517
- */
518
-
519
- /**
520
- * You shouldn't use the post variable at all.
521
- * Please use one of the available getters or setters to get the download information you're looking for.
522
- *
523
- * @deprecated 4.0
524
- *
525
- * @return WP_Post
526
- */
527
- public function get_post() {
528
- return $this->post;
529
- }
530
-
531
- /**
532
- * You shouldn't use the post variable at all.
533
- * Please use one of the available getters or setters to get the download information you're looking for.
534
- *
535
- * @deprecated 4.0
536
- *
537
- * @param WP_Post $post
538
- */
539
- public function set_post( $post ) {
540
- $this->post = $post;
541
- }
542
-
543
-
544
- /**
545
- * get_the_short_description function.
546
- * Deprecated, use get_excerpt() instead
547
- *
548
- * @deprecated 4.0
549
- *
550
- * @access public
551
- * @return string
552
- */
553
- public function get_the_short_description() {
554
- DLM_Debug_Logger::deprecated( "DLM_Download::get_the_short_description()" );
555
-
556
- return $this->get_excerpt();
557
- }
558
-
559
- /**
560
- * the_short_description function.
561
- * Deprecated, use the_excerpt() instead
562
- *
563
- * @deprecated 4.0
564
- *
565
- * @access public
566
- * @return void
567
- */
568
- public function the_short_description() {
569
- DLM_Debug_Logger::deprecated( "DLM_Download::the_short_description()" );
570
- $this->the_excerpt();
571
- }
572
-
573
- /**
574
- * redirect_only function.
575
- * Deprecated, use is_redirect_only() instead
576
- *
577
- * @access public
578
- *
579
- * @deprecated 4.0
580
- *
581
- * @return bool
582
- */
583
- public function redirect_only() {
584
- DLM_Debug_Logger::deprecated( "DLM_Download::redirect_only()" );
585
-
586
- return $this->is_redirect_only();
587
- }
588
-
589
- /**
590
- * get_the_title function.
591
- * Deprecated, use get_title() instead.
592
- *
593
- * @deprecated 4.0
594
- *
595
- * @access public
596
- * @return string
597
- */
598
- public function get_the_title() {
599
- DLM_Debug_Logger::deprecated( "DLM_Download::get_the_title()" );
600
-
601
- return $this->get_title();
602
- }
603
-
604
- /**
605
- * get_the_image function.
606
- * Deprecated, use get_image() instead.
607
- *
608
- * @access public
609
- *
610
- * @deprecated 4.0
611
- *
612
- * @param string $size (default: 'full')
613
- *
614
- * @return string
615
- */
616
- public function get_the_image( $size = 'full' ) {
617
- DLM_Debug_Logger::deprecated( "DLM_Download::get_the_image()" );
618
-
619
- return $this->get_image( $size );
620
- }
621
-
622
- /**
623
- * the_download_count function.
624
- *
625
- * @deprecated 4.0
626
- *
627
- * @access public
628
- * @return void
629
- */
630
- public function the_download_count() {
631
- DLM_Debug_Logger::deprecated( "DLM_Download::the_download_count()" );
632
-
633
- echo esc_html( $this->get_download_count() );
634
- }
635
-
636
- /**
637
- * get_the_download_count function.
638
- *
639
- * @deprecated 4.0
640
- *
641
- * @access public
642
- * @return int
643
- */
644
- public function get_the_download_count() {
645
- DLM_Debug_Logger::deprecated( "DLM_Download::get_the_download_count()" );
646
-
647
- return $this->get_download_count();
648
- }
649
-
650
- /**
651
- * Deprecated, use get_versions() instead
652
- *
653
- * @deprecated 4.0
654
- *
655
- * @return array
656
- */
657
- public function get_file_versions() {
658
- DLM_Debug_Logger::deprecated( "DLM_Download::get_file_versions()" );
659
-
660
- return $this->get_versions();
661
- }
662
-
663
- /**
664
- * Deprecated, use get_version_ids() instead
665
- *
666
- * @deprecated 4.0
667
- *
668
- * @return array
669
- */
670
- public function get_file_version_ids() {
671
- DLM_Debug_Logger::deprecated( "DLM_Download::get_file_version_ids()" );
672
-
673
- return $this->get_version_ids();
674
- }
675
-
676
- /**
677
- * @param string (deprecated, do not use)
678
- *
679
- * @return int
680
- */
681
- public function get_version_id( $version_string = '' ) {
682
-
683
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_version_id()' );
684
-
685
- if ( ! empty( $version_string ) ) {
686
- return $this->get_version_id_version_name( $version_string );
687
- }
688
-
689
- return 0;
690
- }
691
-
692
- /**
693
- * Deprecated, use get_version() instead
694
- *
695
- * @deprecated 4.0
696
- *
697
- * @access public
698
- *
699
- * @return DLM_Download_Version
700
- */
701
- public function get_file_version() {
702
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_file_version()' );
703
-
704
- return $this->get_version();
705
- }
706
-
707
- /**
708
- * Deprecated, use get_version()->get_version_number() instead
709
- *
710
- * @deprecated 4.0
711
- *
712
- * @access public
713
- * @return string
714
- */
715
- public function get_the_version_number() {
716
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_version_number()' );
717
-
718
- return $this->get_version()->get_version_number();
719
- }
720
-
721
- /**
722
- * Deprecated, use echo get_version()->get_version_number() instead
723
- *
724
- * @deprecated 4.0
725
- *
726
- * @access public
727
- * @return void
728
- */
729
- public function the_version_number() {
730
- DLM_Debug_Logger::deprecated( 'DLM_Download::the_version_number()' );
731
-
732
- echo esc_html( $this->get_version()->get_version_number() );
733
- }
734
-
735
- /**
736
- * Deprecated, use get_version()->has_version_number() instead
737
- *
738
- * @deprecated 4.0
739
- *
740
- * @access public
741
- * @return bool
742
- */
743
- public function has_version_number() {
744
- DLM_Debug_Logger::deprecated( 'DLM_Download::has_version_number()' );
745
-
746
- return $this->get_version()->has_version_number();
747
- }
748
-
749
- /**
750
- * Deprecated, use get_version()->get_filename() instead
751
- *
752
- * @deprecated 4.0
753
- *
754
- * @access public
755
- * @return string
756
- */
757
- public function get_the_filename() {
758
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
759
-
760
- return $this->get_version()->get_filename();
761
- }
762
-
763
- /**
764
- * Deprecated, use echo get_version()->get_filename() instead
765
- *
766
- * @deprecated 4.0
767
- *
768
- * @access public
769
- * @return void
770
- */
771
- public function the_filename() {
772
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
773
-
774
- echo esc_html( $this->get_version()->get_filename() );
775
- }
776
-
777
- /**
778
- * Deprecated, use echo get_version()->get_date() instead
779
- *
780
- * @deprecated 4.0
781
- *
782
- * @access public
783
- * @return string
784
- */
785
- public function get_the_file_date() {
786
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
787
-
788
- return $this->get_version()->get_date();
789
- }
790
-
791
- /**
792
- * Deprecated, use get_version()->get_filesize_formatted() instead
793
- *
794
- * @deprecated 4.0
795
- *
796
- * @access public
797
- * @return string
798
- */
799
- public function get_the_filesize() {
800
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filesize()' );
801
-
802
- return $this->get_version()->get_filesize_formatted();
803
- }
804
-
805
- /**
806
- * Deprecated, use echo get_version()->get_filesize_formatted() instead
807
- *
808
- * @deprecated 4.0
809
- *
810
- * @access public
811
- * @return void
812
- */
813
- public function the_filesize() {
814
- DLM_Debug_Logger::deprecated( 'DLM_Download::the_filesize()' );
815
-
816
- echo esc_html( $this->get_version()->get_filesize_formatted() );
817
- }
818
-
819
- /**
820
- * Deprecated, use get_version()->get_md5() (or hash you like) instead
821
- *
822
- * @deprecated 4.0
823
- *
824
- * @param string $type md5, sha1 or crc32
825
- *
826
- * @return string
827
- */
828
- public function get_the_hash( $type = 'md5' ) {
829
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_hash()' );
830
-
831
- if ( method_exists( $this->get_version(), "get_" . $type ) ) {
832
- return call_user_func( array( $this->get_version(), "get_" . $type ) );
833
- }
834
-
835
- return "";
836
- }
837
-
838
- /**
839
- * Deprecated, use echo get_version()->get_md5() (or hash you like) instead
840
- *
841
- * @deprecated 4.0
842
- *
843
- * @param string $type md5, sha1 or crc32
844
- *
845
- * @return string
846
- */
847
- public function the_hash( $type = 'md5' ) {
848
- DLM_Debug_Logger::deprecated( 'DLM_Download::the_hash()' );
849
-
850
- if ( method_exists( $this->get_version(), "get_" . $type ) ) {
851
- echo esc_html(call_user_func( array( $this->get_version(), "get_" . $type ) ));
852
- }
853
- }
854
-
855
- /**
856
- * Deprecated, use get_version()->get_filetype() instead
857
- *
858
- * @deprecated 4.0
859
- *
860
- * @access public
861
- * @return string
862
- */
863
- public function get_the_filetype() {
864
- DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filetype()' );
865
-
866
- return $this->get_version()->get_filetype();
867
- }
868
-
869
- /**
870
- * Deprecated, use echo get_version()->get_filetype() instead
871
- *
872
- * @deprecated 4.0
873
- *
874
- * @access public
875
- * @return void
876
- */
877
- public function the_filetype() {
878
- DLM_Debug_Logger::deprecated( 'DLM_Download::the_filetype()' );
879
-
880
- echo esc_html( $this->get_version()->get_filetype() );
881
- }
882
- }
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ /**
8
+ * DLM_Download class.
9
+ */
10
+ class DLM_Download {
11
+
12
+ /** @var int */
13
+ private $id = 0;
14
+
15
+ /** @var string */
16
+ private $title;
17
+
18
+ /** @var string */
19
+ private $slug;
20
+
21
+ /** @var string */
22
+ private $status;
23
+
24
+ /** @var int */
25
+ private $author;
26
+
27
+ /** @var string */
28
+ private $description = "";
29
+
30
+ /** @var string */
31
+ private $excerpt = "";
32
+
33
+ /** @var int */
34
+ private $download_count = 0;
35
+
36
+ /** @var bool */
37
+ private $redirect_only = false;
38
+
39
+ /** @var bool */
40
+ private $featured = false;
41
+
42
+ /** @var bool */
43
+ private $members_only = false;
44
+
45
+ /** @var DLM_Download_Version */
46
+ private $version = null;
47
+
48
+ /** @var array */
49
+ private $versions = array();
50
+
51
+ /** @var array */
52
+ private $version_ids = array();
53
+
54
+ /**
55
+ * @var WP_Post
56
+ * @deprecated 4.0
57
+ *
58
+ * Please don't use the $post variable directly anymore.
59
+ * The variable is left in for now for backwards compatibility but will be removed in the future!
60
+ */
61
+ public $post;
62
+
63
+ /**
64
+ * exists function.
65
+ *
66
+ * @access public
67
+ * @return bool
68
+ */
69
+ public function exists() {
70
+ return ( $this->get_id() > 0 && in_array( $this->get_status(), apply_filters( 'dlm_download_exists_status', array( 'publish' ) ) ) );
71
+ }
72
+
73
+ /**
74
+ * @return int
75
+ */
76
+ public function get_id() {
77
+ return $this->id;
78
+ }
79
+
80
+ /**
81
+ * @param int $id
82
+ */
83
+ public function set_id( $id ) {
84
+ $this->id = $id;
85
+ }
86
+
87
+ /**
88
+ * @return string
89
+ */
90
+ public function get_title() {
91
+ return $this->title;
92
+ }
93
+
94
+ /**
95
+ * @param string $title
96
+ */
97
+ public function set_title( $title ) {
98
+ $this->title = $title;
99
+ }
100
+
101
+ /**
102
+ * the_title function.
103
+ *
104
+ * @access public
105
+ * @return void
106
+ */
107
+ public function the_title() {
108
+ echo wp_kses_post( $this->get_title() );
109
+ }
110
+
111
+ /**
112
+ * @return string
113
+ */
114
+ public function get_slug() {
115
+ return $this->slug;
116
+ }
117
+
118
+ /**
119
+ * @param string $slug
120
+ */
121
+ public function set_slug( $slug ) {
122
+ $this->slug = $slug;
123
+ }
124
+
125
+ /**
126
+ * @return string
127
+ */
128
+ public function get_status() {
129
+ return $this->status;
130
+ }
131
+
132
+ /**
133
+ * @param string $status
134
+ */
135
+ public function set_status( $status ) {
136
+ $this->status = $status;
137
+ }
138
+
139
+ /**
140
+ * @return int
141
+ */
142
+ public function get_author() {
143
+ return $this->author;
144
+ }
145
+
146
+ /**
147
+ * @param int $author
148
+ */
149
+ public function set_author( $author ) {
150
+ $this->author = $author;
151
+ }
152
+
153
+ /**
154
+ * Helper method that returns author 'display_name'
155
+ *
156
+ * @access public
157
+ * @return string
158
+ */
159
+ public function get_the_author() {
160
+ $author_id = $this->get_author();
161
+ $user = get_user_by( 'ID', $author_id );
162
+ if ( $user ) {
163
+ return $user->display_name;
164
+ }
165
+
166
+ return '';
167
+ }
168
+
169
+ /**
170
+ * Helper method that prints author 'display_name'
171
+ *
172
+ * @access public
173
+ * @return void
174
+ */
175
+ public function the_author() {
176
+ echo esc_html( $this->get_the_author() );
177
+ }
178
+
179
+ /**
180
+ * @return string
181
+ */
182
+ public function get_description() {
183
+ return $this->description;
184
+ }
185
+
186
+ /**
187
+ * @param string $description
188
+ */
189
+ public function set_description( $description ) {
190
+ $this->description = $description;
191
+ }
192
+
193
+ /**
194
+ * @return string
195
+ */
196
+ public function get_excerpt() {
197
+ return $this->excerpt;
198
+ }
199
+
200
+ /**
201
+ * Prints the excerpt
202
+ */
203
+ public function the_excerpt() {
204
+ echo wp_kses_post( wpautop( do_shortcode( $this->get_excerpt() ) ) );
205
+ }
206
+
207
+ /**
208
+ * Returns the excerpt with wpautop and do_shortcode
209
+ */
210
+ public function get_the_excerpt() {
211
+ return wpautop( do_shortcode( $this->get_excerpt() ) );
212
+ }
213
+
214
+ /**
215
+ * @param string $excerpt
216
+ */
217
+ public function set_excerpt( $excerpt ) {
218
+ $this->excerpt = $excerpt;
219
+ }
220
+
221
+ /**
222
+ * redirect_only function.
223
+ *
224
+ * @access public
225
+ * @return bool
226
+ */
227
+ public function is_redirect_only() {
228
+ return $this->redirect_only;
229
+ }
230
+
231
+ /**
232
+ * @param bool $redirect_only
233
+ */
234
+ public function set_redirect_only( $redirect_only ) {
235
+ $this->redirect_only = $redirect_only;
236
+ }
237
+
238
+ /**
239
+ * is_featured function.
240
+ *
241
+ * @access public
242
+ * @return bool
243
+ */
244
+ public function is_featured() {
245
+ return $this->featured;
246
+ }
247
+
248
+ /**
249
+ * @param bool $featured
250
+ */
251
+ public function set_featured( $featured ) {
252
+ $this->featured = $featured;
253
+ }
254
+
255
+ /**
256
+ * is_members_only function.
257
+ *
258
+ * @access public
259
+ * @return bool
260
+ */
261
+ public function is_members_only() {
262
+ return $this->members_only;
263
+ }
264
+
265
+ /**
266
+ * @param bool $members_only
267
+ */
268
+ public function set_members_only( $members_only ) {
269
+ $this->members_only = $members_only;
270
+ }
271
+
272
+ /**
273
+ * @return int
274
+ */
275
+ public function get_download_count() {
276
+
277
+ // set default download count
278
+ $download_count = $this->download_count;
279
+
280
+ // set download count of latest version if set
281
+ if ( null != $this->get_version() && ! $this->get_version()->is_latest() ) {
282
+ $download_count = $this->get_version()->get_download_count();
283
+ }
284
+
285
+ return apply_filters( 'dlm_download_count', $download_count, $this );
286
+ }
287
+
288
+ /**
289
+ * @param int $download_count
290
+ */
291
+ public function set_download_count( $download_count ) {
292
+ $this->download_count = $download_count;
293
+ }
294
+
295
+ /**
296
+ * Get download image
297
+ *
298
+ * @param string $size
299
+ *
300
+ * @return string
301
+ */
302
+ public function get_image( $size = 'full' ) {
303
+ if ( has_post_thumbnail( $this->id ) ) {
304
+ return get_the_post_thumbnail( $this->id, $size );
305
+ } else {
306
+ return '<img alt="Placeholder" class="wp-post-image" src="' . apply_filters( 'dlm_placeholder_image_src', download_monitor()->get_plugin_url() . '/assets/images/placeholder.png', $this->id, $this, $size ) . '" />';
307
+ }
308
+ }
309
+
310
+ /**
311
+ * the_image function.
312
+ *
313
+ * @access public
314
+ *
315
+ * @param string $size (default: 'full')
316
+ *
317
+ * @return void
318
+ */
319
+ public function the_image( $size = 'full' ) {
320
+ echo wp_kses_post( $this->get_image( $size ) );
321
+ }
322
+
323
+ /**
324
+ * the_download_link function.
325
+ *
326
+ * @access public
327
+ * @return void
328
+ */
329
+ public function the_download_link() {
330
+ echo esc_url( $this->get_the_download_link() );
331
+ }
332
+
333
+ /**
334
+ * get_the_download_link function.
335
+ *
336
+ * @access public
337
+ * @return String
338
+ */
339
+ public function get_the_download_link() {
340
+ $scheme = parse_url( get_option( 'home' ), PHP_URL_SCHEME );
341
+ $endpoint = ( $endpoint = get_option( 'dlm_download_endpoint' ) ) ? $endpoint : 'download';
342
+ $ep_value = get_option( 'dlm_download_endpoint_value' );
343
+
344
+ switch ( $ep_value ) {
345
+ case 'slug' :
346
+ $value = $this->post->post_name;
347
+ break;
348
+ default :
349
+ $value = $this->id;
350
+ break;
351
+ }
352
+
353
+ if ( get_option( 'permalink_structure' ) ) {
354
+ $link = home_url( '/' . $endpoint . '/' . $value . '/', $scheme );
355
+ } else {
356
+ $link = add_query_arg( $endpoint, $value, home_url( '', $scheme ) );
357
+ }
358
+
359
+ // only add version argument when current version isn't latest version
360
+ if ( null !== $this->get_version() && false === $this->get_version()->is_latest() ) {
361
+
362
+ if ( $this->get_version()->has_version_number() ) {
363
+ $link = add_query_arg( 'version', $this->get_version()->get_version_slug(), $link );
364
+ } else {
365
+ $link = add_query_arg( 'v', $this->get_version()->get_id(), $link );
366
+ }
367
+ }
368
+
369
+ return apply_filters( 'dlm_download_get_the_download_link', esc_url_raw( $link ), $this, $this->get_version() );
370
+ }
371
+
372
+ /**
373
+ * Version related methods
374
+ */
375
+
376
+ /**
377
+ * Returns if download has at least 1 version
378
+ *
379
+ * @return bool
380
+ */
381
+ public function has_version() {
382
+ return ( null !== $this->get_version() && $this->get_version()->get_id() > 0 );
383
+ }
384
+
385
+ /**
386
+ * @return DLM_Download_Version
387
+ */
388
+ public function get_version() {
389
+
390
+ // set latest version as current version if no version is set
391
+ if ( $this->version == null ) {
392
+ $versions = $this->get_versions();
393
+
394
+ if ( ! empty( $versions ) ) {
395
+ $latest = array_shift( $versions );
396
+ $latest->set_latest( true );
397
+ $this->version = $latest;
398
+ } else {
399
+ // return an empty version if there is no version
400
+ $this->version = new DLM_Download_Version();
401
+
402
+ // set empty version as latest so download object doesn't think we're dealing with a 'special' version
403
+ $this->version->set_latest( true );
404
+ }
405
+ }
406
+
407
+ return $this->version;
408
+ }
409
+
410
+ /**
411
+ * Set the download to a version other than the current / latest version it defaults to.
412
+ *
413
+ * @param DLM_Download_Version $version
414
+ */
415
+ public function set_version( DLM_Download_Version $version ) {
416
+ // check if given version is a version of this download
417
+ if ( $version->get_download_id() == $this->get_id() ) {
418
+ $this->version = $version;
419
+ }
420
+ }
421
+
422
+ /**
423
+ * Get version ID by version name
424
+ *
425
+ * This used to be get_version_id(), moved to this method.
426
+ *
427
+ * @param string $name
428
+ *
429
+ * @return int
430
+ */
431
+ public function get_version_id_version_name( $name ) {
432
+ $versions = $this->get_versions();
433
+
434
+ foreach ( $versions as $version_id => $version ) {
435
+ $version_str = $version->get_version();
436
+ if ( ( is_numeric( $version_str ) && version_compare( $version_str, strtolower( $name ), '=' ) ) || sanitize_title_with_dashes( $version_str ) === sanitize_title_with_dashes( $name ) ) {
437
+ return absint( $version_id );
438
+ }
439
+ }
440
+
441
+ return 0;
442
+ }
443
+
444
+ /**
445
+ * version_exists function.
446
+ *
447
+ * @access public
448
+ *
449
+ * @param int $version_id
450
+ *
451
+ * @return bool
452
+ */
453
+ public function version_exists( $version_id ) {
454
+ return in_array( absint( $version_id ), array_keys( $this->get_versions() ) );
455
+ }
456
+
457
+ /**
458
+ * get_file_version_ids function.
459
+ *
460
+ * @access public
461
+ * @return array
462
+ */
463
+ public function get_version_ids() {
464
+ if ( empty( $this->version_ids ) ) {
465
+
466
+ if ( apply_filters( 'dlm_download_use_version_transient', true, $this ) ) {
467
+
468
+ $transient_name = 'dlm_file_version_ids_' . $this->get_id();
469
+
470
+ if ( false === ( $this->version_ids = get_transient( $transient_name ) ) ) {
471
+ $this->version_ids = download_monitor()->service( 'version_manager' )->get_version_ids( $this->get_id() );
472
+
473
+ set_transient( $transient_name, $this->version_ids, YEAR_IN_SECONDS );
474
+ }
475
+
476
+ } else {
477
+ $this->version_ids = download_monitor()->service( 'version_manager' )->get_version_ids( $this->get_id() );
478
+ }
479
+
480
+ }
481
+
482
+ return $this->version_ids;
483
+ }
484
+
485
+ /**
486
+ * get_file_versions function.
487
+ *
488
+ * @access public
489
+ * @return array
490
+ */
491
+ public function get_versions() {
492
+
493
+ if ( ! empty( $this->versions ) ) {
494
+ return $this->versions;
495
+ }
496
+
497
+ $version_ids = $this->get_version_ids();
498
+
499
+ $this->versions = array();
500
+
501
+ if ( count( $version_ids ) > 0 ) {
502
+ $versions = download_monitor()->service( 'version_repository' )->retrieve( array( 'post__in' => $version_ids ) );
503
+
504
+ /** @var DLM_Download_Version $version */
505
+ foreach ( $versions as $version ) {
506
+ $this->versions[ absint( $version->get_id() ) ] = $version;
507
+ }
508
+ }
509
+
510
+ return apply_filters( 'dlm_download_get_versions', $this->versions, $this );
511
+ }
512
+
513
+ /**
514
+ *
515
+ * Deprecated methods below.
516
+ *
517
+ */
518
+
519
+ /**
520
+ * You shouldn't use the post variable at all.
521
+ * Please use one of the available getters or setters to get the download information you're looking for.
522
+ *
523
+ * @deprecated 4.0
524
+ *
525
+ * @return WP_Post
526
+ */
527
+ public function get_post() {
528
+ return $this->post;
529
+ }
530
+
531
+ /**
532
+ * You shouldn't use the post variable at all.
533
+ * Please use one of the available getters or setters to get the download information you're looking for.
534
+ *
535
+ * @deprecated 4.0
536
+ *
537
+ * @param WP_Post $post
538
+ */
539
+ public function set_post( $post ) {
540
+ $this->post = $post;
541
+ }
542
+
543
+
544
+ /**
545
+ * get_the_short_description function.
546
+ * Deprecated, use get_excerpt() instead
547
+ *
548
+ * @deprecated 4.0
549
+ *
550
+ * @access public
551
+ * @return string
552
+ */
553
+ public function get_the_short_description() {
554
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_the_short_description()" );
555
+
556
+ return $this->get_excerpt();
557
+ }
558
+
559
+ /**
560
+ * the_short_description function.
561
+ * Deprecated, use the_excerpt() instead
562
+ *
563
+ * @deprecated 4.0
564
+ *
565
+ * @access public
566
+ * @return void
567
+ */
568
+ public function the_short_description() {
569
+ DLM_Debug_Logger::deprecated( "DLM_Download::the_short_description()" );
570
+ $this->the_excerpt();
571
+ }
572
+
573
+ /**
574
+ * redirect_only function.
575
+ * Deprecated, use is_redirect_only() instead
576
+ *
577
+ * @access public
578
+ *
579
+ * @deprecated 4.0
580
+ *
581
+ * @return bool
582
+ */
583
+ public function redirect_only() {
584
+ DLM_Debug_Logger::deprecated( "DLM_Download::redirect_only()" );
585
+
586
+ return $this->is_redirect_only();
587
+ }
588
+
589
+ /**
590
+ * get_the_title function.
591
+ * Deprecated, use get_title() instead.
592
+ *
593
+ * @deprecated 4.0
594
+ *
595
+ * @access public
596
+ * @return string
597
+ */
598
+ public function get_the_title() {
599
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_the_title()" );
600
+
601
+ return $this->get_title();
602
+ }
603
+
604
+ /**
605
+ * get_the_image function.
606
+ * Deprecated, use get_image() instead.
607
+ *
608
+ * @access public
609
+ *
610
+ * @deprecated 4.0
611
+ *
612
+ * @param string $size (default: 'full')
613
+ *
614
+ * @return string
615
+ */
616
+ public function get_the_image( $size = 'full' ) {
617
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_the_image()" );
618
+
619
+ return $this->get_image( $size );
620
+ }
621
+
622
+ /**
623
+ * the_download_count function.
624
+ *
625
+ * @deprecated 4.0
626
+ *
627
+ * @access public
628
+ * @return void
629
+ */
630
+ public function the_download_count() {
631
+ DLM_Debug_Logger::deprecated( "DLM_Download::the_download_count()" );
632
+
633
+ echo esc_html( $this->get_download_count() );
634
+ }
635
+
636
+ /**
637
+ * get_the_download_count function.
638
+ *
639
+ * @deprecated 4.0
640
+ *
641
+ * @access public
642
+ * @return int
643
+ */
644
+ public function get_the_download_count() {
645
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_the_download_count()" );
646
+
647
+ return $this->get_download_count();
648
+ }
649
+
650
+ /**
651
+ * Deprecated, use get_versions() instead
652
+ *
653
+ * @deprecated 4.0
654
+ *
655
+ * @return array
656
+ */
657
+ public function get_file_versions() {
658
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_file_versions()" );
659
+
660
+ return $this->get_versions();
661
+ }
662
+
663
+ /**
664
+ * Deprecated, use get_version_ids() instead
665
+ *
666
+ * @deprecated 4.0
667
+ *
668
+ * @return array
669
+ */
670
+ public function get_file_version_ids() {
671
+ DLM_Debug_Logger::deprecated( "DLM_Download::get_file_version_ids()" );
672
+
673
+ return $this->get_version_ids();
674
+ }
675
+
676
+ /**
677
+ * @param string (deprecated, do not use)
678
+ *
679
+ * @return int
680
+ */
681
+ public function get_version_id( $version_string = '' ) {
682
+
683
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_version_id()' );
684
+
685
+ if ( ! empty( $version_string ) ) {
686
+ return $this->get_version_id_version_name( $version_string );
687
+ }
688
+
689
+ return 0;
690
+ }
691
+
692
+ /**
693
+ * Deprecated, use get_version() instead
694
+ *
695
+ * @deprecated 4.0
696
+ *
697
+ * @access public
698
+ *
699
+ * @return DLM_Download_Version
700
+ */
701
+ public function get_file_version() {
702
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_file_version()' );
703
+
704
+ return $this->get_version();
705
+ }
706
+
707
+ /**
708
+ * Deprecated, use get_version()->get_version_number() instead
709
+ *
710
+ * @deprecated 4.0
711
+ *
712
+ * @access public
713
+ * @return string
714
+ */
715
+ public function get_the_version_number() {
716
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_version_number()' );
717
+
718
+ return $this->get_version()->get_version_number();
719
+ }
720
+
721
+ /**
722
+ * Deprecated, use echo get_version()->get_version_number() instead
723
+ *
724
+ * @deprecated 4.0
725
+ *
726
+ * @access public
727
+ * @return void
728
+ */
729
+ public function the_version_number() {
730
+ DLM_Debug_Logger::deprecated( 'DLM_Download::the_version_number()' );
731
+
732
+ echo esc_html( $this->get_version()->get_version_number() );
733
+ }
734
+
735
+ /**
736
+ * Deprecated, use get_version()->has_version_number() instead
737
+ *
738
+ * @deprecated 4.0
739
+ *
740
+ * @access public
741
+ * @return bool
742
+ */
743
+ public function has_version_number() {
744
+ DLM_Debug_Logger::deprecated( 'DLM_Download::has_version_number()' );
745
+
746
+ return $this->get_version()->has_version_number();
747
+ }
748
+
749
+ /**
750
+ * Deprecated, use get_version()->get_filename() instead
751
+ *
752
+ * @deprecated 4.0
753
+ *
754
+ * @access public
755
+ * @return string
756
+ */
757
+ public function get_the_filename() {
758
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
759
+
760
+ return $this->get_version()->get_filename();
761
+ }
762
+
763
+ /**
764
+ * Deprecated, use echo get_version()->get_filename() instead
765
+ *
766
+ * @deprecated 4.0
767
+ *
768
+ * @access public
769
+ * @return void
770
+ */
771
+ public function the_filename() {
772
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
773
+
774
+ echo esc_html( $this->get_version()->get_filename() );
775
+ }
776
+
777
+ /**
778
+ * Deprecated, use echo get_version()->get_date() instead
779
+ *
780
+ * @deprecated 4.0
781
+ *
782
+ * @access public
783
+ * @return string
784
+ */
785
+ public function get_the_file_date() {
786
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filename()' );
787
+
788
+ return $this->get_version()->get_date();
789
+ }
790
+
791
+ /**
792
+ * Deprecated, use get_version()->get_filesize_formatted() instead
793
+ *
794
+ * @deprecated 4.0
795
+ *
796
+ * @access public
797
+ * @return string
798
+ */
799
+ public function get_the_filesize() {
800
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filesize()' );
801
+
802
+ return $this->get_version()->get_filesize_formatted();
803
+ }
804
+
805
+ /**
806
+ * Deprecated, use echo get_version()->get_filesize_formatted() instead
807
+ *
808
+ * @deprecated 4.0
809
+ *
810
+ * @access public
811
+ * @return void
812
+ */
813
+ public function the_filesize() {
814
+ DLM_Debug_Logger::deprecated( 'DLM_Download::the_filesize()' );
815
+
816
+ echo esc_html( $this->get_version()->get_filesize_formatted() );
817
+ }
818
+
819
+ /**
820
+ * Deprecated, use get_version()->get_md5() (or hash you like) instead
821
+ *
822
+ * @deprecated 4.0
823
+ *
824
+ * @param string $type md5, sha1 or crc32
825
+ *
826
+ * @return string
827
+ */
828
+ public function get_the_hash( $type = 'md5' ) {
829
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_hash()' );
830
+
831
+ if ( method_exists( $this->get_version(), "get_" . $type ) ) {
832
+ return call_user_func( array( $this->get_version(), "get_" . $type ) );
833
+ }
834
+
835
+ return "";
836
+ }
837
+
838
+ /**
839
+ * Deprecated, use echo get_version()->get_md5() (or hash you like) instead
840
+ *
841
+ * @deprecated 4.0
842
+ *
843
+ * @param string $type md5, sha1 or crc32
844
+ *
845
+ * @return string
846
+ */
847
+ public function the_hash( $type = 'md5' ) {
848
+ DLM_Debug_Logger::deprecated( 'DLM_Download::the_hash()' );
849
+
850
+ if ( method_exists( $this->get_version(), "get_" . $type ) ) {
851
+ echo esc_html(call_user_func( array( $this->get_version(), "get_" . $type ) ));
852
+ }
853
+ }
854
+
855
+ /**
856
+ * Deprecated, use get_version()->get_filetype() instead
857
+ *
858
+ * @deprecated 4.0
859
+ *
860
+ * @access public
861
+ * @return string
862
+ */
863
+ public function get_the_filetype() {
864
+ DLM_Debug_Logger::deprecated( 'DLM_Download::get_the_filetype()' );
865
+
866
+ return $this->get_version()->get_filetype();
867
+ }
868
+
869
+ /**
870
+ * Deprecated, use echo get_version()->get_filetype() instead
871
+ *
872
+ * @deprecated 4.0
873
+ *
874
+ * @access public
875
+ * @return void
876
+ */
877
+ public function the_filetype() {
878
+ DLM_Debug_Logger::deprecated( 'DLM_Download::the_filetype()' );
879
+
880
+ echo esc_html( $this->get_version()->get_filetype() );
881
+ }
882
+ }
src/Logs/LoggingListTable.php CHANGED
@@ -1,445 +1,451 @@
1
- <?php
2
-
3
- /**
4
- * DLM_Logging_List_Table class.
5
- *
6
- * @extends WP_List_Table
7
- */
8
- class DLM_Logging_List_Table extends WP_List_Table {
9
-
10
- private $filter_status = '';
11
- private $logs_per_page = 25;
12
- private $filter_month = '';
13
- private $filter_user = 0;
14
-
15
- /** @var bool $display_delete_message */
16
- private $display_delete_message = false;
17
-
18
- /**
19
- * __construct function.
20
- *
21
- * @access public
22
- */
23
- public function __construct() {
24
- global $status, $page, $wpdb;
25
-
26
- parent::__construct( array(
27
- 'singular' => 'log',
28
- 'plural' => 'logs',
29
- 'ajax' => false
30
- ) );
31
-
32
- $this->filter_status = isset( $_REQUEST['filter_status'] ) ? sanitize_text_field( wp_unslash($_REQUEST['filter_status']) ) : '';
33
- $this->logs_per_page = ! empty( $_REQUEST['logs_per_page'] ) ? intval( $_REQUEST['logs_per_page'] ) : 25;
34
- $this->filter_month = ! empty( $_REQUEST['filter_month'] ) ? sanitize_text_field( wp_unslash($_REQUEST['filter_month']) ) : '';
35
- $this->filter_user = ! empty( $_REQUEST['filter_user'] ) ? intval( $_REQUEST['filter_user'] ) : 0;
36
-
37
- if ( $this->logs_per_page < 1 ) {
38
- $this->logs_per_page = 9999999999999;
39
- }
40
- }
41
-
42
- /**
43
- * The checkbox column
44
- *
45
- * @param DLM_Log_Item $item
46
- *
47
- * @return string
48
- */
49
- public function column_cb( $item ) {
50
- return sprintf(
51
- '<input type="checkbox" name="log[]" value="%s" />', $item->get_id()
52
- );
53
- }
54
-
55
- /**
56
- * Add bulk actions
57
- *
58
- * @return array
59
- */
60
- protected function get_bulk_actions() {
61
- $actions = array(
62
- 'delete' => __( 'Delete', 'download-monitor' )
63
- );
64
-
65
- return $actions;
66
- }
67
-
68
- /**
69
- * column_default function.
70
- *
71
- * @access public
72
- *
73
- * @param DLM_Log_Item $log
74
- * @param mixed $column_name
75
- *
76
- * @return string
77
- */
78
- public function column_default( $log, $column_name ) {
79
- switch ( $column_name ) {
80
- case 'status' :
81
- switch ( $log->get_download_status() ) {
82
- case 'failed' :
83
- $download_status = '<span class="failed" title="' . esc_attr( $log->get_download_status_message() ) . '">&nbsp;</span>';
84
- break;
85
- case 'redirected' :
86
- $download_status = '<span class="redirected" title="' . esc_attr( $log->get_download_status_message() ) . '">&nbsp;</span>';
87
- break;
88
- default :
89
- $download_status = '<span class="completed" title="' . __( 'Download Complete', 'download-monitor' ) . '">&nbsp;</span>';
90
- break;
91
- }
92
-
93
- return $download_status;
94
- break;
95
- case 'date' :
96
- $time_str = date_i18n( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), $log->get_download_date()->format( 'U' ) );
97
- return '<time title="' . $time_str . '"">' . sprintf( __( '%s ago', 'download-monitor' ), human_time_diff( $log->get_download_date()->format( 'U' ), current_time( 'timestamp' ) ) ) . '</time>';
98
- break;
99
- case 'download' :
100
- try {
101
- /** @var DLM_Download $download */
102
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $log->get_download_id() );
103
-
104
- try {
105
- $version_obj = download_monitor()->service( 'version_repository' )->retrieve_single( $log->get_version_id() );
106
- $download->set_version( $version_obj );
107
- } catch ( Exception $e ) {
108
-
109
- }
110
-
111
-
112
- $download_string = '<a href="' . admin_url( 'post.php?post=' . $download->get_id() . '&action=edit' ) . '">';
113
- $download_string .= '#' . $download->get_id() . ' &ndash; ' . $download->get_title();
114
- $download_string .= '</a>';
115
-
116
- if ( $log->get_version() ) {
117
- if ( $download->version_exists( $log->get_version_id() ) ) {
118
- $download_string .= sprintf( __( ' (v%s)', 'download-monitor' ), $log->get_version() );
119
- } else {
120
- $download_string .= sprintf( __( ' (v%s no longer exists)', 'download-monitor' ), $log->get_version() );
121
- }
122
- }
123
- } catch ( Exception $e ) {
124
- $download_string = sprintf( __( 'Download #%d (no longer exists)', 'download-monitor' ), $log->get_download_id() );
125
- }
126
-
127
- return $download_string;
128
- break;
129
- case 'file' :
130
- try {
131
- /** @var DLM_Download $download */
132
- $download = download_monitor()->service( 'download_repository' )->retrieve_single( $log->get_download_id() );
133
-
134
- try {
135
- $version_obj = download_monitor()->service( 'version_repository' )->retrieve_single( $log->get_version_id() );
136
- $download->set_version( $version_obj );
137
- } catch ( Exception $e ) {
138
-
139
- }
140
-
141
- if ( ! $download->version_exists( $log->get_version_id() ) || ! $download->get_version()->get_filename() ) {
142
- throw new Exception( "No version found" );
143
- }
144
-
145
- $download_string = '<code>' . $download->get_version()->get_filename() . '</code>';
146
- } catch ( Exception $e ) {
147
- $download_string = '&ndash;';
148
- }
149
-
150
- return $download_string;
151
- break;
152
- case 'user' :
153
- if ( $log->get_user_id() ) {
154
- $user = get_user_by( 'id', $log->get_user_id() );
155
- }
156
-
157
- if ( ! isset( $user ) || ! $user ) {
158
- $user_string = __( 'Non-member', 'download-monitor' );
159
- } else {
160
- $user_string = '<a href="' . admin_url( 'user-edit.php?user_id=' . $user->ID ) . '">';
161
- $user_string .= $user->user_login . ' &ndash; ';
162
- $user_string .= '<a href="mailto:' . $user->user_email . '">';
163
- $user_string .= $user->user_email;
164
- $user_string .= '</a>';
165
- }
166
-
167
- return $user_string;
168
- break;
169
- case 'user_ip' :
170
- return '<a href="http://whois.arin.net/rest/ip/' . $log->get_user_ip() . '" target="_blank">' . $log->get_user_ip() . '</a>';
171
- break;
172
- }
173
- }
174
-
175
- /**
176
- * get_columns function.
177
- *
178
- * @access public
179
- * @return array
180
- */
181
- public function get_columns() {
182
- $columns = array(
183
- 'cb' => '',
184
- 'status' => '',
185
- 'download' => __( 'Download', 'download-monitor' ),
186
- 'file' => __( 'File', 'download-monitor' ),
187
- 'user' => __( 'User', 'download-monitor' ),
188
- 'user_ip' => __( 'IP Address', 'download-monitor' ),
189
- 'date' => __( 'Date', 'download-monitor' ),
190
- );
191
-
192
- return $columns;
193
- }
194
-
195
- /**
196
- * Sortable columns
197
- *
198
- * @return array
199
- */
200
- public function get_sortable_columns() {
201
- return array(
202
- 'download' => array( 'download_id', false ),
203
- 'file' => array( 'version_id', false ),
204
- 'user' => array( 'user_id', false ),
205
- 'user_ip' => array( 'user_ip', false ),
206
- 'date' => array( 'download_date', false )
207
- );
208
- }
209
-
210
- /**
211
- * Generate the table navigation above or below the table
212
- */
213
- public function display_tablenav( $which ) {
214
-
215
- // output nonce
216
- if ( 'top' == $which ) {
217
- wp_nonce_field( 'bulk-' . $this->_args['plural'] );
218
- }
219
-
220
- // display 'delete' success message
221
- if ( 'top' == $which && true === $this->display_delete_message ) {
222
- ?>
223
- <div id="message" class="updated notice notice-success">
224
- <p><?php echo esc_html__( 'Log entries deleted', 'download-monitor' ); ?></p>
225
- </div>
226
- <?php
227
- }
228
-
229
- ?>
230
- <div class="tablenav <?php echo esc_attr( $which ); ?>">
231
-
232
- <div class="alignleft actions bulkactions">
233
- <?php $this->bulk_actions( $which ); ?>
234
- </div>
235
-
236
- <?php if ( 'top' == $which ) { ?>
237
-
238
- <div class="alignleft actions">
239
-
240
- <select name="filter_status">
241
- <option value=""><?php echo esc_html__( 'Any status', 'download-monitor' ); ?></option>
242
- <option
243
- value="failed" <?php selected( $this->filter_status, 'failed' ); ?>><?php echo esc_html__( 'Failed', 'download-monitor' ); ?></option>
244
- <option
245
- value="redirected" <?php selected( $this->filter_status, 'redirected' ); ?>><?php echo esc_html__( 'Redirected', 'download-monitor' ); ?></option>
246
- <option
247
- value="completed" <?php selected( $this->filter_status, 'completed' ); ?>><?php echo esc_html__( 'Completed', 'download-monitor' ); ?></option>
248
- </select>
249
- <?php
250
- global $wpdb, $wp_locale;
251
-
252
- $months = $wpdb->get_results( "
253
- SELECT DISTINCT YEAR( download_date ) AS year, MONTH( download_date ) AS month
254
- FROM {$wpdb->download_log}
255
- ORDER BY download_date DESC
256
- "
257
- );
258
-
259
- $month_count = count( $months );
260
-
261
- if ( $month_count && ! ( 1 == $month_count && 0 == $months[0]->month ) ) {
262
- $m = isset( $_GET['filter_month'] ) ? sanitize_text_field( wp_unslash($_GET['filter_month']) ) : 0;
263
- ?>
264
- <select name="filter_month">
265
- <option <?php selected( $m, 0 ); ?> value='0'><?php echo esc_html__( 'Show all dates' ); ?></option>
266
- <?php
267
- foreach ( $months as $arc_row ) {
268
- if ( 0 == $arc_row->year ) {
269
- continue;
270
- }
271
-
272
- $month = zeroise( $arc_row->month, 2 );
273
- $year = $arc_row->year;
274
-
275
- printf( "<option %s value='%s'>%s</option>\n",
276
- selected( $m, $year . '-' . $month, false ),
277
- esc_attr( $year . '-' . $month ),
278
-
279
- sprintf( esc_html__( '%1$s %2$d' ), esc_html($wp_locale->get_month( $month )), esc_html($year) )
280
- );
281
- }
282
- ?>
283
- </select>
284
- <?php } ?>
285
- <select name="filter_user">
286
- <option value="0"><?php echo esc_html__( 'Select a User', 'download-monitor' ); ?></option>
287
- <?php
288
- $users = $wpdb->get_results( "
289
- SELECT DISTINCT user_id
290
- FROM {$wpdb->download_log}" );
291
-
292
- foreach ( $users as $a_user ) {
293
- if ( $a_user->user_id == '0' ) {
294
- continue;
295
- }
296
- $the_user = get_userdata( $a_user->user_id );
297
- ?>
298
- <option value="<?php echo esc_attr( $a_user->user_id ); ?>" <?php echo ( $this->filter_user == $a_user->user_id ) ? 'selected="selected"' : ''; ?>>
299
- <?php echo esc_html( $the_user->display_name ); ?>
300
- </option><?php
301
- }
302
- ?>
303
- </select>
304
- <select name="logs_per_page">
305
- <option value="25"><?php echo esc_html__( '25 per page', 'download-monitor' ); ?></option>
306
- <option
307
- value="50" <?php selected( $this->logs_per_page, 50 ) ?>><?php echo esc_html__( '50 per page', 'download-monitor' ); ?></option>
308
- <option
309
- value="100" <?php selected( $this->logs_per_page, 100 ) ?>><?php echo esc_html__( '100 per page', 'download-monitor' ); ?></option>
310
- <option
311
- value="200" <?php selected( $this->logs_per_page, 200 ) ?>><?php echo esc_html__( '200 per page', 'download-monitor' ); ?></option>
312
- <option
313
- value="-1" <?php selected( $this->logs_per_page, - 1 ) ?>><?php echo esc_html__( 'Show All', 'download-monitor' ); ?></option>
314
- </select>
315
- <input type="hidden" name="post_type" value="dlm_download"/>
316
- <input type="hidden" name="page" value="download-monitor-logs"/>
317
- <input type="submit" value="<?php echo esc_html__( 'Filter', 'download-monitor' ); ?>" class="button"/>
318
- </div>
319
- <?php
320
- }
321
- ?>
322
- <?php
323
- $this->extra_tablenav( $which );
324
- $this->pagination( $which );
325
- ?>
326
- <br class="clear"/>
327
- </div>
328
- <?php
329
- }
330
-
331
- /**
332
- * prepare_items function.
333
- *
334
- * @access public
335
- * @return void
336
- */
337
- public function prepare_items() {
338
- global $wpdb;
339
-
340
- // process bulk action
341
- $this->process_bulk_action();
342
-
343
- // Init headers
344
- $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );
345
-
346
- $per_page = absint( $this->logs_per_page );
347
- $current_page = absint( $this->get_pagenum() );
348
-
349
- // setup filters
350
- $filters = array();
351
-
352
- // filter status
353
- if ( $this->filter_status ) {
354
- $filters[] = array(
355
- 'key' => 'download_status',
356
- 'value' => $this->filter_status
357
- );
358
- }
359
-
360
- // filter month
361
- if ( $this->filter_month ) {
362
- $filters[] = array(
363
- 'key' => 'download_date',
364
- 'value' => date( 'Y-m-01', strtotime( $this->filter_month ) ),
365
- 'operator' => '>='
366
- );
367
-
368
- $filters[] = array(
369
- 'key' => 'download_date',
370
- 'value' => date( 'Y-m-t', strtotime( $this->filter_month ) ),
371
- 'operator' => '<='
372
- );
373
- }
374
-
375
- // filter on user
376
- if ( $this->filter_user > 0 ) {
377
- $filters[] = array(
378
- 'key' => 'user_id',
379
- 'value' => $this->filter_user
380
- );
381
- }
382
-
383
- // check for order
384
- $order_by = ( ! empty( $_GET['orderby'] ) ) ? sanitize_sql_orderby( wp_unslash($_GET['orderby']) ) : 'download_date';
385
- $order = 'DESC';
386
- // phpcs:ignore
387
- if ( isset( $_GET['order'] ) && 'ASC' == strtoupper( $_GET['order'] ) ) {
388
- $order = 'ASC';
389
- }
390
-
391
- /** @var DLM_WordPress_Log_Item_Repository $log_item_repository */
392
- $log_item_repository = download_monitor()->service( 'log_item_repository' );
393
-
394
- $total_items = $log_item_repository->num_rows( $filters );
395
- $this->items = $log_item_repository->retrieve( $filters, $per_page, ( ( $current_page - 1 ) * $per_page ), $order_by, $order );
396
-
397
- // Pagination
398
- $this->set_pagination_args( array(
399
- 'total_items' => $total_items,
400
- 'per_page' => absint( $this->logs_per_page ),
401
- 'total_pages' => ( ( $total_items > 0 ) ? ceil( $total_items / absint( $this->logs_per_page ) ) : 1 )
402
- ) );
403
- }
404
-
405
- /**
406
- * Process bulk actions
407
- */
408
- public function process_bulk_action() {
409
-
410
- if ( 'delete' === $this->current_action() ) {
411
-
412
- // check nonce
413
- // phpcs:ignore
414
- if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'bulk-' . $this->_args['plural'] ) ) {
415
- wp_die( esc_html__( 'process_bulk_action() nonce check failed', 'download-monitor' ) );
416
- }
417
-
418
- // check capability
419
- if ( ! current_user_can( 'dlm_manage_logs' ) ) {
420
- wp_die( esc_html__( "You're not allowed to delete logs!", 'download-monitor' ) );
421
- }
422
-
423
- if ( empty( $_POST['log'] ) ) {
424
- wp_die( esc_html__( "We don't have logs to delete", 'download-monitor' ) );
425
- }
426
-
427
- // check
428
- if ( count( $_POST['log'] ) > 0 ) {
429
-
430
- // delete the posted logs
431
- // phpcs:ignore
432
- foreach ( $_POST['log'] as $log_id ) {
433
- download_monitor()->service( 'log_item_repository' )->delete( absint($log_id) );
434
- }
435
-
436
- // display delete message
437
- $this->display_delete_message = true;
438
-
439
- }
440
-
441
- }
442
-
443
- }
444
-
445
- }
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * DLM_Logging_List_Table class.
5
+ *
6
+ * @extends WP_List_Table
7
+ */
8
+ class DLM_Logging_List_Table extends WP_List_Table {
9
+
10
+ private $filter_status = '';
11
+ private $logs_per_page = 25;
12
+ private $filter_month = '';
13
+ private $filter_user = 0;
14
+
15
+ /** @var bool $display_delete_message */
16
+ private $display_delete_message = false;
17
+
18
+ /**
19
+ * __construct function.
20
+ *
21
+ * @access public
22
+ */
23
+ public function __construct() {
24
+ global $status, $page, $wpdb;
25
+
26
+ parent::__construct( array(
27
+ 'singular' => 'log',
28
+ 'plural' => 'logs',
29
+ 'ajax' => false
30
+ ) );
31
+
32
+ $this->filter_status = isset( $_REQUEST['filter_status'] ) ? sanitize_text_field( wp_unslash($_REQUEST['filter_status']) ) : '';
33
+ $this->logs_per_page = ! empty( $_REQUEST['logs_per_page'] ) ? intval( $_REQUEST['logs_per_page'] ) : 25;
34
+ $this->filter_month = ! empty( $_REQUEST['filter_month'] ) ? sanitize_text_field( wp_unslash($_REQUEST['filter_month']) ) : '';
35
+ $this->filter_user = ! empty( $_REQUEST['filter_user'] ) ? intval( $_REQUEST['filter_user'] ) : 0;
36
+
37
+ if ( $this->logs_per_page < 1 ) {
38
+ $this->logs_per_page = 9999999999999;
39
+ }
40
+ }
41
+
42
+ /**
43
+ * The checkbox column
44
+ *
45
+ * @param DLM_Log_Item $item
46
+ *
47
+ * @return string
48
+ */
49
+ public function column_cb( $item ) {
50
+ return sprintf(
51
+ '<input type="checkbox" name="log[]" value="%s" />', $item->get_id()
52
+ );
53
+ }
54
+
55
+ /**
56
+ * Add bulk actions
57
+ *
58
+ * @return array
59
+ */
60
+ protected function get_bulk_actions() {
61
+ $actions = array(
62
+ 'delete' => __( 'Delete', 'download-monitor' )
63
+ );
64
+
65
+ return $actions;
66
+ }
67
+
68
+ /**
69
+ * column_default function.
70
+ *
71
+ * @access public
72
+ *
73
+ * @param DLM_Log_Item $log
74
+ * @param mixed $column_name
75
+ *
76
+ * @return string
77
+ */
78
+ public function column_default( $log, $column_name ) {
79
+ switch ( $column_name ) {
80
+ case 'status' :
81
+ switch ( $log->get_download_status() ) {
82
+ case 'failed' :
83
+ $download_status = '<span class="failed" title="' . esc_attr( $log->get_download_status_message() ) . '">&nbsp;</span>';
84
+ break;
85
+ case 'redirected' :
86
+ $download_status = '<span class="redirected" title="' . esc_attr( $log->get_download_status_message() ) . '">&nbsp;</span>';
87
+ break;
88
+ default :
89
+ $download_status = '<span class="completed" title="' . __( 'Download Complete', 'download-monitor' ) . '">&nbsp;</span>';
90
+ break;
91
+ }
92
+
93
+ return $download_status;
94
+ break;
95
+ case 'date' :
96
+ $time_str = date_i18n( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), $log->get_download_date()->format( 'U' ) );
97
+ return '<time title="' . $time_str . '"">' . sprintf( __( '%s ago', 'download-monitor' ), human_time_diff( $log->get_download_date()->format( 'U' ), current_time( 'timestamp' ) ) ) . '</time>';
98
+ break;
99
+ case 'download' :
100
+ try {
101
+ /** @var DLM_Download $download */
102
+ $download = download_monitor()->service( 'download_repository' )->retrieve_single( $log->get_download_id() );
103
+
104
+ try {
105
+ $version_obj = download_monitor()->service( 'version_repository' )->retrieve_single( $log->get_version_id() );
106
+ $download->set_version( $version_obj );
107
+ } catch ( Exception $e ) {
108
+
109
+ }
110
+
111
+
112
+ $download_string = '<a href="' . admin_url( 'post.php?post=' . $download->get_id() . '&action=edit' ) . '">';
113
+ $download_string .= '#' . $download->get_id() . ' &ndash; ' . $download->get_title();
114
+ $download_string .= '</a>';
115
+
116
+ if ( $log->get_version() ) {
117
+ if ( $download->version_exists( $log->get_version_id() ) ) {
118
+ $download_string .= sprintf( __( ' (v%s)', 'download-monitor' ), $log->get_version() );
119
+ } else {
120
+ $download_string .= sprintf( __( ' (v%s no longer exists)', 'download-monitor' ), $log->get_version() );
121
+ }
122
+ }
123
+ } catch ( Exception $e ) {
124
+ $download_string = sprintf( __( 'Download #%d (no longer exists)', 'download-monitor' ), $log->get_download_id() );
125
+ }
126
+
127
+ return $download_string;
128
+ break;
129
+ case 'file' :
130
+ try {
131
+ /** @var DLM_Download $download */
132
+ $download = download_monitor()->service( 'download_repository' )->retrieve_single( $log->get_download_id() );
133
+
134
+ try {
135
+ $version_obj = download_monitor()->service( 'version_repository' )->retrieve_single( $log->get_version_id() );
136
+ $download->set_version( $version_obj );
137
+ } catch ( Exception $e ) {
138
+
139
+ }
140
+
141
+ if ( ! $download->version_exists( $log->get_version_id() ) || ! $download->get_version()->get_filename() ) {
142
+ throw new Exception( "No version found" );
143
+ }
144
+
145
+ $download_string = '<code>' . $download->get_version()->get_filename() . '</code>';
146
+ } catch ( Exception $e ) {
147
+ $download_string = '&ndash;';
148
+ }
149
+
150
+ return $download_string;
151
+ break;
152
+ case 'user' :
153
+ if ( $log->get_user_id() ) {
154
+ $user = get_user_by( 'id', $log->get_user_id() );
155
+ }
156
+
157
+ if ( ! isset( $user ) || ! $user ) {
158
+ $user_string = __( 'Non-member', 'download-monitor' );
159
+ } else {
160
+ $user_string = '<a href="' . admin_url( 'user-edit.php?user_id=' . $user->ID ) . '">';
161
+ $user_string .= $user->user_login . ' &ndash; ';
162
+ $user_string .= '<a href="mailto:' . $user->user_email . '">';
163
+ $user_string .= $user->user_email;
164
+ $user_string .= '</a>';
165
+ }
166
+
167
+ return $user_string;
168
+ break;
169
+ case 'user_ip' :
170
+ return '<a href="http://whois.arin.net/rest/ip/' . $log->get_user_ip() . '" target="_blank">' . $log->get_user_ip() . '</a>';
171
+ break;
172
+ }
173
+ }
174
+
175
+ /**
176
+ * get_columns function.
177
+ *
178
+ * @access public
179
+ * @return array
180
+ */
181
+ public function get_columns() {
182
+ $columns = array(
183
+ 'cb' => '',
184
+ 'status' => '',
185
+ 'download' => __( 'Download', 'download-monitor' ),
186
+ 'file' => __( 'File', 'download-monitor' ),
187
+ 'user' => __( 'User', 'download-monitor' ),
188
+ 'user_ip' => __( 'IP Address', 'download-monitor' ),
189
+ 'date' => __( 'Date', 'download-monitor' ),
190
+ );
191
+
192
+ return $columns;
193
+ }
194
+
195
+ /**
196
+ * Sortable columns
197
+ *
198
+ * @return array
199
+ */
200
+ public function get_sortable_columns() {
201
+ return array(
202
+ 'download' => array( 'download_id', false ),
203
+ 'file' => array( 'version_id', false ),
204
+ 'user' => array( 'user_id', false ),
205
+ 'user_ip' => array( 'user_ip', false ),
206
+ 'date' => array( 'download_date', false )
207
+ );
208
+ }
209
+
210
+ /**
211
+ * Generate the table navigation above or below the table
212
+ */
213
+ public function display_tablenav( $which ) {
214
+
215
+ // output nonce
216
+ if ( 'top' == $which ) {
217
+ wp_nonce_field( 'bulk-' . $this->_args['plural'] );
218
+ }
219
+
220
+ // display 'delete' success message
221
+ if ( 'top' == $which && true === $this->display_delete_message ) {
222
+ ?>
223
+ <div id="message" class="updated notice notice-success">
224
+ <p><?php echo esc_html__( 'Log entries deleted', 'download-monitor' ); ?></p>
225
+ </div>
226
+ <?php
227
+ }
228
+
229
+ ?>
230
+ <div class="tablenav <?php echo esc_attr( $which ); ?>">
231
+
232
+ <div class="alignleft actions bulkactions">
233
+ <?php $this->bulk_actions( $which ); ?>
234
+ </div>
235
+
236
+ <?php if ( 'top' == $which ) { ?>
237
+
238
+ <div class="alignleft actions">
239
+
240
+ <select name="filter_status">
241
+ <option value=""><?php echo esc_html__( 'Any status', 'download-monitor' ); ?></option>
242
+ <option
243
+ value="failed" <?php selected( $this->filter_status, 'failed' ); ?>><?php echo esc_html__( 'Failed', 'download-monitor' ); ?></option>
244
+ <option
245
+ value="redirected" <?php selected( $this->filter_status, 'redirected' ); ?>><?php echo esc_html__( 'Redirected', 'download-monitor' ); ?></option>
246
+ <option
247
+ value="completed" <?php selected( $this->filter_status, 'completed' ); ?>><?php echo esc_html__( 'Completed', 'download-monitor' ); ?></option>
248
+ </select>
249
+ <?php
250
+ global $wpdb, $wp_locale;
251
+
252
+ $months = $wpdb->get_results( "
253
+ SELECT DISTINCT YEAR( download_date ) AS year, MONTH( download_date ) AS month
254
+ FROM {$wpdb->download_log}
255
+ ORDER BY download_date DESC
256
+ "
257
+ );
258
+
259
+ $month_count = count( $months );
260
+
261
+ if ( $month_count && ! ( 1 == $month_count && 0 == $months[0]->month ) ) {
262
+ $m = isset( $_GET['filter_month'] ) ? sanitize_text_field( wp_unslash($_GET['filter_month']) ) : 0;
263
+ ?>
264
+ <select name="filter_month">
265
+ <option <?php selected( $m, 0 ); ?> value='0'><?php echo esc_html__( 'Show all dates' ); ?></option>
266
+ <?php
267
+ foreach ( $months as $arc_row ) {
268
+ if ( 0 == $arc_row->year ) {
269
+ continue;
270
+ }
271
+
272
+ $month = zeroise( $arc_row->month, 2 );
273
+ $year = $arc_row->year;
274
+
275
+ printf( "<option %s value='%s'>%s</option>\n",
276
+ selected( $m, $year . '-' . $month, false ),
277
+ esc_attr( $year . '-' . $month ),
278
+
279
+ sprintf( esc_html__( '%1$s %2$d' ), esc_html($wp_locale->get_month( $month )), esc_html($year) )
280
+ );
281
+ }
282
+ ?>
283
+ </select>
284
+ <?php } ?>
285
+ <select name="filter_user">
286
+ <option value="0"><?php echo esc_html__( 'Select a User', 'download-monitor' ); ?></option>
287
+ <?php
288
+ $users = $wpdb->get_results( "
289
+ SELECT DISTINCT user_id
290
+ FROM {$wpdb->download_log}" );
291
+
292
+ foreach ( $users as $a_user ) {
293
+ if ( $a_user->user_id == '0' ) {
294
+ continue;
295
+ }
296
+ $the_user = get_userdata( $a_user->user_id );
297
+
298
+ //skip users that no longer exist
299
+ if( ! $the_user ){
300
+ continue;
301
+ }
302
+
303
+ ?>
304
+ <option value="<?php echo esc_attr( $a_user->user_id ); ?>" <?php echo ( $this->filter_user == $a_user->user_id ) ? 'selected="selected"' : ''; ?>>
305
+ <?php echo esc_html( $the_user->display_name ); ?>
306
+ </option><?php
307
+ }
308
+ ?>
309
+ </select>
310
+ <select name="logs_per_page">
311
+ <option value="25"><?php echo esc_html__( '25 per page', 'download-monitor' ); ?></option>
312
+ <option
313
+ value="50" <?php selected( $this->logs_per_page, 50 ) ?>><?php echo esc_html__( '50 per page', 'download-monitor' ); ?></option>
314
+ <option
315
+ value="100" <?php selected( $this->logs_per_page, 100 ) ?>><?php echo esc_html__( '100 per page', 'download-monitor' ); ?></option>
316
+ <option
317
+ value="200" <?php selected( $this->logs_per_page, 200 ) ?>><?php echo esc_html__( '200 per page', 'download-monitor' ); ?></option>
318
+ <option
319
+ value="-1" <?php selected( $this->logs_per_page, - 1 ) ?>><?php echo esc_html__( 'Show All', 'download-monitor' ); ?></option>
320
+ </select>
321
+ <input type="hidden" name="post_type" value="dlm_download"/>
322
+ <input type="hidden" name="page" value="download-monitor-logs"/>
323
+ <input type="submit" value="<?php echo esc_html__( 'Filter', 'download-monitor' ); ?>" class="button"/>
324
+ </div>
325
+ <?php
326
+ }
327
+ ?>
328
+ <?php
329
+ $this->extra_tablenav( $which );
330
+ $this->pagination( $which );
331
+ ?>
332
+ <br class="clear"/>
333
+ </div>
334
+ <?php
335
+ }
336
+
337
+ /**
338
+ * prepare_items function.
339
+ *
340
+ * @access public
341
+ * @return void
342
+ */
343
+ public function prepare_items() {
344
+ global $wpdb;
345
+
346
+ // process bulk action
347
+ $this->process_bulk_action();
348
+
349
+ // Init headers
350
+ $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );
351
+
352
+ $per_page = absint( $this->logs_per_page );
353
+ $current_page = absint( $this->get_pagenum() );
354
+
355
+ // setup filters
356
+ $filters = array();
357
+
358
+ // filter status
359
+ if ( $this->filter_status ) {
360
+ $filters[] = array(
361
+ 'key' => 'download_status',
362
+ 'value' => $this->filter_status
363
+ );
364
+ }
365
+
366
+ // filter month
367
+ if ( $this->filter_month ) {
368
+ $filters[] = array(
369
+ 'key' => 'download_date',
370
+ 'value' => date( 'Y-m-01', strtotime( $this->filter_month ) ),
371
+ 'operator' => '>='
372
+ );
373
+
374
+ $filters[] = array(
375
+ 'key' => 'download_date',
376
+ 'value' => date( 'Y-m-t', strtotime( $this->filter_month ) ),
377
+ 'operator' => '<='
378
+ );
379
+ }
380
+
381
+ // filter on user
382
+ if ( $this->filter_user > 0 ) {
383
+ $filters[] = array(
384
+ 'key' => 'user_id',
385
+ 'value' => $this->filter_user
386
+ );
387
+ }
388
+
389
+ // check for order
390
+ $order_by = ( ! empty( $_GET['orderby'] ) ) ? sanitize_sql_orderby( wp_unslash($_GET['orderby']) ) : 'download_date';
391
+ $order = 'DESC';
392
+ // phpcs:ignore
393
+ if ( isset( $_GET['order'] ) && 'ASC' == strtoupper( $_GET['order'] ) ) {
394
+ $order = 'ASC';
395
+ }
396
+
397
+ /** @var DLM_WordPress_Log_Item_Repository $log_item_repository */
398
+ $log_item_repository = download_monitor()->service( 'log_item_repository' );
399
+
400
+ $total_items = $log_item_repository->num_rows( $filters );
401
+ $this->items = $log_item_repository->retrieve( $filters, $per_page, ( ( $current_page - 1 ) * $per_page ), $order_by, $order );
402
+
403
+ // Pagination
404
+ $this->set_pagination_args( array(
405
+ 'total_items' => $total_items,
406
+ 'per_page' => absint( $this->logs_per_page ),
407
+ 'total_pages' => ( ( $total_items > 0 ) ? ceil( $total_items / absint( $this->logs_per_page ) ) : 1 )
408
+ ) );
409
+ }
410
+
411
+ /**
412
+ * Process bulk actions
413
+ */
414
+ public function process_bulk_action() {
415
+
416
+ if ( 'delete' === $this->current_action() ) {
417
+
418
+ // check nonce
419
+ // phpcs:ignore
420
+ if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'bulk-' . $this->_args['plural'] ) ) {
421
+ wp_die( esc_html__( 'process_bulk_action() nonce check failed', 'download-monitor' ) );
422
+ }
423
+
424
+ // check capability
425
+ if ( ! current_user_can( 'dlm_manage_logs' ) ) {
426
+ wp_die( esc_html__( "You're not allowed to delete logs!", 'download-monitor' ) );
427
+ }
428
+
429
+ if ( empty( $_POST['log'] ) ) {
430
+ wp_die( esc_html__( "We don't have logs to delete", 'download-monitor' ) );
431
+ }
432
+
433
+ // check
434
+ if ( count( $_POST['log'] ) > 0 ) {
435
+
436
+ // delete the posted logs
437
+ // phpcs:ignore
438
+ foreach ( $_POST['log'] as $log_id ) {
439
+ download_monitor()->service( 'log_item_repository' )->delete( absint($log_id) );
440
+ }
441
+
442
+ // display delete message
443
+ $this->display_delete_message = true;
444
+
445
+ }
446
+
447
+ }
448
+
449
+ }
450
+
451
+ }
src/Product/Product.php CHANGED
@@ -1,307 +1,307 @@
1
- <?php
2
-
3
- /**
4
- * Class DLM_Product
5
- * The base class for all Download Monitor Extensions
6
- */
7
- class DLM_Product {
8
-
9
- /**
10
- * The store URL
11
- */
12
- const STORE_URL = 'https://www.download-monitor.com/?wc-api=';
13
-
14
- /**
15
- * Activation endpoint
16
- */
17
- const ENDPOINT_ACTIVATION = 'wp_plugin_licencing_activation_api';
18
-
19
- /**
20
- * Update endpoint
21
- */
22
- const ENDPOINT_UPDATE = 'wp_plugin_licencing_update_api';
23
-
24
- /**
25
- * @var String
26
- */
27
- private $product_id;
28
-
29
- /**
30
- * @var string
31
- */
32
- private $product_name = "";
33
-
34
- /**
35
- * @var String
36
- */
37
- private $plugin_name;
38
-
39
- /**
40
- * @var string
41
- */
42
- private $version = false;
43
-
44
- /**
45
- * @var DLM_Product_License
46
- */
47
- private $license = null;
48
-
49
- /**
50
- * Constructor
51
- *
52
- * @param String $product_id
53
- * @param string|bool $version
54
- * @param string $product_name
55
- */
56
- function __construct( $product_id, $version = false, $product_name = "" ) {
57
- $this->product_id = $product_id;
58
-
59
- // The plugin file name
60
- $this->plugin_name = $this->product_id . '/' . $this->product_id . '.php';
61
-
62
- // set product name
63
- $this->product_name = $product_name;
64
-
65
- // BC
66
- if ( empty( $this->product_name ) ) {
67
- $this->product_name = $this->product_id;
68
- }
69
-
70
- // Set plugin version
71
- $this->version = $version;
72
- }
73
-
74
- /**
75
- * @return String
76
- */
77
- public function get_product_id() {
78
- return $this->product_id;
79
- }
80
-
81
- /**
82
- * @param String $product_id
83
- */
84
- public function set_product_id( $product_id ) {
85
- $this->product_id = $product_id;
86
- }
87
-
88
- /**
89
- * @return string
90
- */
91
- public function get_product_name() {
92
- return $this->product_name;
93
- }
94
-
95
- /**
96
- * @param string $product_name
97
- */
98
- public function set_product_name( $product_name ) {
99
- $this->product_name = $product_name;
100
- }
101
-
102
- /**
103
- * @return String
104
- */
105
- public function get_plugin_name() {
106
- return $this->plugin_name;
107
- }
108
-
109
- /**
110
- * @param String $plugin_name
111
- */
112
- public function set_plugin_name( $plugin_name ) {
113
- $this->plugin_name = $plugin_name;
114
- }
115
-
116
- /**
117
- * Get the license, license will be automatically loaded if not set yet.
118
- *
119
- * @return DLM_Product_License
120
- */
121
- public function get_license() {
122
- if ( null === $this->license ) {
123
- $this->license = new DLM_Product_License( $this->product_id );
124
- }
125
-
126
- return $this->license;
127
- }
128
-
129
- /**
130
- * Set the license
131
- *
132
- * @param DLM_Product_License $license
133
- */
134
- public function set_license( $license ) {
135
- $this->license = $license;
136
- $this->license->store();
137
- }
138
-
139
- public function get_version() {
140
- return $this->version;
141
- }
142
-
143
- /**
144
- * Attempt to activate a plugin licence
145
- *
146
- * @return String
147
- */
148
- public function activate() {
149
-
150
- // Get License
151
- $license = $this->get_license();
152
-
153
- try {
154
-
155
- // Check License key
156
- if ( '' === $license->get_key() ) {
157
- throw new Exception( 'Please enter your license key.' );
158
- }
159
-
160
- // Check license email
161
- if ( '' === $license->get_email() ) {
162
- throw new Exception( 'Please enter the email address associated with your license.' );
163
- }
164
-
165
- // Do activate request
166
- $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(
167
- 'email' => $license->get_email(),
168
- 'licence_key' => $license->get_key(),
169
- 'api_product_id' => $this->product_id,
170
- 'request' => 'activate',
171
- 'instance' => site_url()
172
- ), '', '&' ) );
173
-
174
- // Check request
175
- if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
176
- throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
177
- }
178
-
179
- // Get activation result
180
- $activate_results = json_decode( wp_remote_retrieve_body( $request ), true );
181
-
182
- // Check if response is correct
183
- if ( ! empty( $activate_results['activated'] ) ) {
184
-
185
- // Set local activation status to true
186
- $license->set_status( 'active' );
187
- $this->set_license( $license );
188
-
189
- // Return Message
190
- return array(
191
- 'result' => 'success',
192
- 'message' => esc_html__( 'License successfully activated.', 'download-monitor' )
193
- );
194
-
195
- } elseif ( $activate_results === false ) {
196
- throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
197
- } elseif ( isset( $activate_results['error_code'] ) ) {
198
- throw new Exception( $activate_results['error'] );
199
- }
200
-
201
-
202
- } catch ( Exception $e ) {
203
-
204
- // Set local activation status to false
205
- $license->set_status( 'inactivate' );
206
- $this->set_license( $license );
207
-
208
- // Return error message
209
- return array( 'result' => 'failed', 'message' => $e->getMessage() );
210
- }
211
- }
212
-
213
- /**
214
- * Attempt to deactivate a licence
215
- */
216
- public function deactivate() {
217
-
218
- // Get License
219
- $license = $this->get_license();
220
-
221
- try {
222
-
223
- // Check License key
224
- if ( '' === $license->get_key() ) {
225
- throw new Exception( "Can't deactivate license without a license key." );
226
- }
227
-
228
- // The Request
229
- $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(
230
- 'api_product_id' => $this->product_id,
231
- 'licence_key' => $license->get_key(),
232
- 'request' => 'deactivate',
233
- 'instance' => site_url(),
234
- ), '', '&' ) );
235
-
236
- // Check request
237
- if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
238
- throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
239
- }
240
-
241
- // Get result
242
- $result = json_decode( wp_remote_retrieve_body( $request ), true );
243
-
244
- /** @todo check result * */
245
-
246
- // Set new license status
247
- $license->set_status( 'inactive' );
248
- $this->set_license( $license );
249
-
250
- return array( 'result' => 'success' );
251
-
252
- } catch ( Exception $e ) {
253
-
254
- // Return error message
255
- return array( 'result' => 'failed', 'message' => $e->getMessage() );
256
- }
257
-
258
- }
259
-
260
- /**
261
- * Handle errors from the API
262
- *
263
- * @param array $errors
264
- */
265
-
266
- public function handle_errors( $errors ) {
267
-
268
- // loop through errors
269
- foreach( $errors as $error_key => $error ) {
270
-
271
- // add error to WP
272
- DLM_Product_Manager::get()->error_handler()->add( $error );
273
-
274
- // check if error is no activation
275
- if( 'no_activation' == $error_key ) {
276
- // remove local activation if there's no license on API side
277
- $this->get_license()->set_status( 'inactive' );
278
- $this->get_license()->store();
279
- }
280
- }
281
-
282
- }
283
-
284
-
285
- /**
286
- * Gets a Google Analytics Campaign URL for this product
287
- *
288
- * @param string $link_identifier
289
- *
290
- * @return string The full URL
291
- */
292
- public function get_tracking_url( $link_identifier = '' ) {
293
- $tracking_vars = array(
294
- 'utm_campaign' => $this->get_product_name() . '_licensing',
295
- 'utm_medium' => 'link',
296
- 'utm_source' => $this->get_product_name(),
297
- 'utm_content' => $link_identifier
298
- );
299
-
300
- // url encode tracking vars
301
- $tracking_vars = urlencode_deep( $tracking_vars );
302
- $query_string = build_query( $tracking_vars );
303
-
304
- return 'https://www.download-monitor.com/pricing?' . $query_string;
305
- }
306
-
307
  }
1
+ <?php
2
+
3
+ /**
4
+ * Class DLM_Product
5
+ * The base class for all Download Monitor Extensions
6
+ */
7
+ class DLM_Product {
8
+
9
+ /**
10
+ * The store URL
11
+ */
12
+ const STORE_URL = 'https://www.download-monitor.com/?wc-api=';
13
+
14
+ /**
15
+ * Activation endpoint
16
+ */
17
+ const ENDPOINT_ACTIVATION = 'wp_plugin_licencing_activation_api';
18
+
19
+ /**
20
+ * Update endpoint
21
+ */
22
+ const ENDPOINT_UPDATE = 'wp_plugin_licencing_update_api';
23
+
24
+ /**
25
+ * @var String
26
+ */
27
+ private $product_id;
28
+
29
+ /**
30
+ * @var string
31
+ */
32
+ private $product_name = "";
33
+
34
+ /**
35
+ * @var String
36
+ */
37
+ private $plugin_name;
38
+
39
+ /**
40
+ * @var string
41
+ */
42
+ private $version = false;
43
+
44
+ /**
45
+ * @var DLM_Product_License
46
+ */
47
+ private $license = null;
48
+
49
+ /**
50
+ * Constructor
51
+ *
52
+ * @param String $product_id
53
+ * @param string|bool $version
54
+ * @param string $product_name
55
+ */
56
+ function __construct( $product_id, $version = false, $product_name = "" ) {
57
+ $this->product_id = $product_id;
58
+
59
+ // The plugin file name
60
+ $this->plugin_name = $this->product_id . '/' . $this->product_id . '.php';
61
+
62
+ // set product name
63
+ $this->product_name = $product_name;
64
+
65
+ // BC
66
+ if ( empty( $this->product_name ) ) {
67
+ $this->product_name = $this->product_id;
68
+ }
69
+
70
+ // Set plugin version
71
+ $this->version = $version;
72
+ }
73
+
74
+ /**
75
+ * @return String
76
+ */
77
+ public function get_product_id() {
78
+ return $this->product_id;
79
+ }
80
+
81
+ /**
82
+ * @param String $product_id
83
+ */
84
+ public function set_product_id( $product_id ) {
85
+ $this->product_id = $product_id;
86
+ }
87
+
88
+ /**
89
+ * @return string
90
+ */
91
+ public function get_product_name() {
92
+ return $this->product_name;
93
+ }
94
+
95
+ /**
96
+ * @param string $product_name
97
+ */
98
+ public function set_product_name( $product_name ) {
99
+ $this->product_name = $product_name;
100
+ }
101
+
102
+ /**
103
+ * @return String
104
+ */
105
+ public function get_plugin_name() {
106
+ return $this->plugin_name;
107
+ }
108
+
109
+ /**
110
+ * @param String $plugin_name
111
+ */
112
+ public function set_plugin_name( $plugin_name ) {
113
+ $this->plugin_name = $plugin_name;
114
+ }
115
+
116
+ /**
117
+ * Get the license, license will be automatically loaded if not set yet.
118
+ *
119
+ * @return DLM_Product_License
120
+ */
121
+ public function get_license() {
122
+ if ( null === $this->license ) {
123
+ $this->license = new DLM_Product_License( $this->product_id );
124
+ }
125
+
126
+ return $this->license;
127
+ }
128
+
129
+ /**
130
+ * Set the license
131
+ *
132
+ * @param DLM_Product_License $license
133
+ */
134
+ public function set_license( $license ) {
135
+ $this->license = $license;
136
+ $this->license->store();
137
+ }
138
+
139
+ public function get_version() {
140
+ return $this->version;
141
+ }
142
+
143
+ /**
144
+ * Attempt to activate a plugin licence
145
+ *
146
+ * @return String
147
+ */
148
+ public function activate() {
149
+
150
+ // Get License
151
+ $license = $this->get_license();
152
+
153
+ try {
154
+
155
+ // Check License key
156
+ if ( '' === $license->get_key() ) {
157
+ throw new Exception( 'Please enter your license key.' );
158
+ }
159
+
160
+ // Check license email
161
+ if ( '' === $license->get_email() ) {
162
+ throw new Exception( 'Please enter the email address associated with your license.' );
163
+ }
164
+
165
+ // Do activate request
166
+ $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(
167
+ 'email' => $license->get_email(),
168
+ 'licence_key' => $license->get_key(),
169
+ 'api_product_id' => $this->product_id,
170
+ 'request' => 'activate',
171
+ 'instance' => site_url()
172
+ ), '', '&' ) );
173
+
174
+ // Check request
175
+ if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
176
+ throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
177
+ }
178
+
179
+ // Get activation result
180
+ $activate_results = json_decode( wp_remote_retrieve_body( $request ), true );
181
+
182
+ // Check if response is correct
183
+ if ( ! empty( $activate_results['activated'] ) ) {
184
+
185
+ // Set local activation status to true
186
+ $license->set_status( 'active' );
187
+ $this->set_license( $license );
188
+
189
+ // Return Message
190
+ return array(
191
+ 'result' => 'success',
192
+ 'message' => esc_html__( 'License successfully activated.', 'download-monitor' )
193
+ );
194
+
195
+ } elseif ( $activate_results === false ) {
196
+ throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
197
+ } elseif ( isset( $activate_results['error_code'] ) ) {
198
+ throw new Exception( $activate_results['error'] );
199
+ }
200
+
201
+
202
+ } catch ( Exception $e ) {
203
+
204
+ // Set local activation status to false
205
+ $license->set_status( 'inactivate' );
206
+ $this->set_license( $license );
207
+
208
+ // Return error message
209
+ return array( 'result' => 'failed', 'message' => $e->getMessage() );
210
+ }
211
+ }
212
+
213
+ /**
214
+ * Attempt to deactivate a licence
215
+ */
216
+ public function deactivate() {
217
+
218
+ // Get License
219
+ $license = $this->get_license();
220
+
221
+ try {
222
+
223
+ // Check License key
224
+ if ( '' === $license->get_key() ) {
225
+ throw new Exception( "Can't deactivate license without a license key." );
226
+ }
227
+
228
+ // The Request
229
+ $request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(
230
+ 'api_product_id' => $this->product_id,
231
+ 'licence_key' => $license->get_key(),
232
+ 'request' => 'deactivate',
233
+ 'instance' => site_url(),
234
+ ), '', '&' ) );
235
+
236
+ // Check request
237
+ if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
238
+ throw new Exception( 'Connection failed to the License Key API server. Try again later.' );
239
+ }
240
+
241
+ // Get result
242
+ $result = json_decode( wp_remote_retrieve_body( $request ), true );
243
+
244
+ /** @todo check result * */
245
+
246
+ // Set new license status
247
+ $license->set_status( 'inactive' );
248
+ $this->set_license( $license );
249
+
250
+ return array( 'result' => 'success' );
251
+
252
+ } catch ( Exception $e ) {
253
+
254
+ // Return error message
255
+ return array( 'result' => 'failed', 'message' => $e->getMessage() );
256
+ }
257
+
258
+ }
259
+
260
+ /**
261
+ * Handle errors from the API
262
+ *
263
+ * @param array $errors
264
+ */
265
+
266
+ public function handle_errors( $errors ) {
267
+
268
+ // loop through errors
269
+ foreach( $errors as $error_key => $error ) {
270
+
271
+ // add error to WP
272
+ DLM_Product_Manager::get()->error_handler()->add( $error );
273
+
274
+ // check if error is no activation
275
+ if( 'no_activation' == $error_key ) {
276
+ // remove local activation if there's no license on API side
277
+ $this->get_license()->set_status( 'inactive' );
278
+ $this->get_license()->store();
279
+ }
280
+ }
281
+
282
+ }
283
+
284
+
285
+ /**
286
+ * Gets a Google Analytics Campaign URL for this product
287
+ *
288
+ * @param string $link_identifier
289
+ *
290
+ * @return string The full URL
291
+ */
292
+ public function get_tracking_url( $link_identifier = '' ) {
293
+ $tracking_vars = array(
294
+ 'utm_campaign' => $this->get_product_name() . '_licensing',
295
+ 'utm_medium' => 'link',
296
+ 'utm_source' => $this->get_product_name(),
297
+ 'utm_content' => $link_identifier
298
+ );
299
+
300
+ // url encode tracking vars
301
+ $tracking_vars = urlencode_deep( $tracking_vars );
302
+ $query_string = build_query( $tracking_vars );
303
+
304
+ return 'https://www.download-monitor.com/pricing?' . $query_string;
305
+ }
306
+
307
  }
src/Product/ProductManager.php CHANGED
@@ -1,296 +1,296 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) {
5
- exit;
6
- }
7
-
8
- class DLM_Product_Manager {
9
-
10
- /**
11
- * @var DLM_Product_Manager
12
- */
13
- private static $instance = null;
14
-
15
- /**
16
- * @var array<DLM_Product>
17
- */
18
- private $products = array();
19
-
20
- /**
21
- * @var DLM_Product_Error_Handler
22
- */
23
- private $error_handler;
24
-
25
- private $addons_requirements;
26
-
27
- /**
28
- * Private constructor
29
- */
30
- private function __construct() {
31
- $this->error_handler = DLM_Product_Error_Handler::get();
32
-
33
- add_action( 'after_plugin_row_download-monitor/download-monitor.php', array( $this, 'update_addons_notice' ), 999, 2 );
34
-
35
- $this->addons_requirements = apply_filters(
36
- 'dlm_addons_requirements',
37
- array(
38
- 'dlm-buttons' => array(
39
- 'version' => '4.0.3',
40
- ),
41
- 'dlm-captcha' => array(
42
- 'version' => '4.2.2',
43
- ),
44
- 'dlm-downloading-page' => array(
45
- 'version' => '4.0.2',
46
- ),
47
- 'dlm-google-drive' => array(
48
- 'version' => '4.0.1',
49
- ),
50
- 'dlm-terms-and-conditions' => array(
51
- 'version' => '4.0.2',
52
- ),
53
- 'dlm-twitter-lock' => array(
54
- 'version' => '4.0.2',
55
- ),
56
- 'dlm-advanced-access-manager' => array(
57
- 'version' => '4.0.4',
58
- ),
59
- 'dlm-email-notification' => array(
60
- 'version' => '4.1.7',
61
- ),
62
- 'dlm-csv-exporter' => array(
63
- 'version' => '4.0.1',
64
- ),
65
- 'dlm-gravity-forms' => array(
66
- 'version' => '4.0.3',
67
- ),
68
- 'dlm-ninja-forms' => array(
69
- 'version' => '4.1.0',
70
- ),
71
- 'dlm-email-lock' => array(
72
- 'version' => '4.2.2',
73
- ),
74
- 'dlm-download-duplicator' => array(
75
- 'version' => '4.0.3',
76
- ),
77
- 'dlm-csv-importer' => array(
78
- 'version' => '4.1.3',
79
- ),
80
- 'dlm-email-notification' => array(
81
- 'version' => '4.1.7',
82
- ),
83
- 'dlm-amazon-s3' => array(
84
- 'version' => '4.0.3',
85
- ),
86
- 'dlm-mailchimp-lock' => array(
87
- 'version' => '4.0.2',
88
- ),
89
- 'dlm-page-addon' => array(
90
- 'version' => '4.1.4',
91
- ),
92
- )
93
- );
94
- }
95
-
96
- /**
97
- * Singleton get method
98
- *
99
- * @since 1.0.0
100
- * @access public
101
- *
102
- * @return DLM_Product_Manager
103
- */
104
- public static function get() {
105
- if ( null == self::$instance ) {
106
- self::$instance = new self();
107
- }
108
-
109
- return self::$instance;
110
- }
111
-
112
- /**
113
- * @return DLM_Product_Error_Handler
114
- */
115
- public function error_handler() {
116
- return $this->error_handler;
117
- }
118
-
119
- /**
120
- * Setup Product Manager
121
- */
122
- public function setup() {
123
-
124
- add_action( 'admin_init', array( $this, 'load_extensions' ) );
125
- }
126
-
127
- /**
128
- * Load extensions
129
- *
130
- * @hooked admin_init
131
- */
132
- public function load_extensions() {
133
- // Load the registered extensions
134
- $registered_extensions = apply_filters( 'dlm_extensions', array() );
135
-
136
- // Check if we've got extensions
137
- if ( count( $registered_extensions ) > 0 ) {
138
-
139
- // Don't block local requests
140
- add_filter( 'block_local_requests', '__return_false' );
141
-
142
- // Load products
143
- $this->load_products( $registered_extensions );
144
-
145
- }
146
- }
147
-
148
-
149
- /**
150
- * Load Products
151
- *
152
- * @param array $extensions
153
- */
154
- private function load_products( $extensions ) {
155
-
156
- // Check
157
- if ( count( $extensions ) > 0 ) {
158
-
159
- // Loop
160
- foreach ( $extensions as $extension ) {
161
-
162
- // backwards compat
163
- if ( ! is_array( $extension ) ) {
164
- $extension = array(
165
- 'file' => $extension,
166
- 'version' => false,
167
- 'name' => '',
168
- );
169
- }
170
-
171
- // Setup new Product
172
- $product = new DLM_Product( $extension['file'], $extension['version'], $extension['name'] );
173
-
174
- // Set action for each extension
175
- do_action( 'dlm_extensions_action_' . $extension['file'], $extension, $product );
176
-
177
- // Add product to products property
178
- $this->products[ $extension['file'] ] = $product;
179
- }
180
- }
181
-
182
- }
183
-
184
- /**
185
- * Get products
186
- *
187
- * @return array<DLM_Product>
188
- */
189
- public function get_products() {
190
- return $this->products;
191
- }
192
-
193
- /**
194
- * Display update addons notice
195
- *
196
- * @param [type] $file
197
- * @param [type] $plugin_data
198
- * @return void
199
- */
200
- public function update_addons_notice( $file, $plugin_data ) {
201
-
202
- $addons = $this->get_products();
203
-
204
- if ( empty( $addons ) || empty( $this->addons_requirements ) ) {
205
- return;
206
- }
207
-
208
- $php_version = phpversion();
209
- $table_header = ''; // The table header of our markup.
210
- $table_end = '</div></td></tr>'; // The ending of the table
211
- $addons_content = ''; // The inline/row content containing info about each addon specified in the requirements.
212
- $html = ''; // General HTML to be shown in plugin inline notification.
213
-
214
- // Create the table header HTML markup.
215
- $table_header .= '<tr class="plugin-update-tr active"><td colspan="4" class="plugin-update colspanchange">';
216
- $table_header .= '<div class="dlm-plugin-inline-notice">';
217
- $table_header .= '<div class="dlm-plugin-inline-notice__header">';
218
- $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Extension', 'download-monitor' ) . '<span></div>';
219
- $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Requirements', 'download-monitor' ) . '</span></div>';
220
- $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Current', 'download-monitor' ) . '</span></div>';
221
- $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Actions', 'download-monitor' ) . '</span></div>';
222
- $table_header .= '</div>';
223
-
224
- foreach ( $addons as $slug => $addon ) {
225
-
226
- if ( isset( $this->addons_requirements[ $slug ] ) ) {
227
-
228
- $addon_present = false; // Verify if the addon doesn't meet one or multiple requirements.
229
- $addon_row_req = ''; // The addon row HTML markup for requirements info.
230
- $addon_row_curr = ''; // The addon row HTML markup for current info.
231
- $actions = ''; // The actions content for each addon.
232
-
233
- $plugin_slug = $addon->get_plugin_name();
234
- $plugin_name = $addon->get_product_name();
235
-
236
- if ( version_compare( $addon->get_version(), $this->addons_requirements[ $slug ]['version'], '<' ) ) {
237
-
238
- $addon_present = true;
239
- $required_version = $this->addons_requirements[ $slug ]['version'];
240
- $current_version = $addon->get_version();
241
-
242
- $addon_row_req .= '<p>' . esc_html__( 'Extension version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__required-version"> ' . esc_html( $required_version ) . '</span> ' . esc_html__( ' or higher', 'download-monitor' ) . '</p>';
243
- $addon_row_curr .= '<p>' . esc_html__( 'Extension version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__current-version"> ' . esc_html( $current_version ) . '</span></p>';
244
-
245
- if ( ! $addon->get_license()->is_active() ) {
246
-
247
- $actions .= '<div class="dlm-plugin-inline-notice__line"><a href="' . esc_url( admin_url( 'edit.php?post_type=dlm_download&page=dlm-installed-extensions' ) ) . '" target="_blank">' . esc_html__( 'Enter your license key', 'download-monitor' ) . '</a> or <a href="https://www.download-monitor.com/pricing/" target="_blank">' . esc_html__( 'Purchase a new one', 'download-monitor' ) . '</a></div>';
248
-
249
- } else {
250
- $actions .= '<div class="dlm-plugin-inline-notice__line">';
251
-
252
- $update_url = apply_filters( 'dlm_extension_inline_action_' . $plugin_slug, '', $addon );
253
-
254
- if ( ! empty( $update_url ) ) {
255
- $actions .= '<a href="' . esc_url( $update_url ) . '" target="_blank" class="update-link">' . esc_html__( 'Update', 'download-monitor' ) . ' ' . esc_html( $plugin_name ) . '</a>';
256
- } else {
257
- $actions .= '<a href="https://www.download-monitor.com/my-account/" target="_blank">' . esc_html__( 'Please update extension', 'download-monitor' ) . '</a>';
258
- }
259
-
260
- $actions .= '</div>';
261
-
262
- }
263
- }
264
-
265
- if ( isset( $this->addons_requirements[ $slug ]['php'] ) && version_compare( $php_version, $this->addons_requirements[ $slug ]['php'], '<' ) ) {
266
-
267
- $addon_present = true;
268
-
269
- $required_php_version = $this->addons_requirements[ $slug ]['php'];
270
-
271
- $addon_row_req .= '<p>' . esc_html__( 'PHP version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__required-version"> ' . esc_html( $required_php_version ) . '</span> ' . esc_html__( ' or higher', 'download-monitor' ) . '</p>';
272
- $addon_row_curr .= '<p>' . esc_html__( 'PHP version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__current-version"> ' . esc_html( $php_version ) . '</span></p>';
273
-
274
- }
275
- }
276
-
277
- // Now, let's create the addon row info content only if the addon doesn't meet the requirements.
278
- if ( $addon_present ) {
279
-
280
- $addons_content .= '<div class="dlm-plugin-inline-notice__row">';
281
- $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $plugin_name . '</div>';
282
- $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $addon_row_req . '</div>';
283
- $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $addon_row_curr . '</div>';
284
- $addons_content .= $actions;
285
- $addons_content .= '</div>';
286
- }
287
- }
288
-
289
- // If there is content in the addons_content variable it means there is something to be displayed, so display it.
290
- if ( ! empty( $addons_content ) ) {
291
- $html .= $table_header . $addons_content . $table_end;
292
- }
293
-
294
- echo wp_kses_post( $html );
295
- }
296
- }
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ class DLM_Product_Manager {
9
+
10
+ /**
11
+ * @var DLM_Product_Manager
12
+ */
13
+ private static $instance = null;
14
+
15
+ /**
16
+ * @var array<DLM_Product>
17
+ */
18
+ private $products = array();
19
+
20
+ /**
21
+ * @var DLM_Product_Error_Handler
22
+ */
23
+ private $error_handler;
24
+
25
+ private $addons_requirements;
26
+
27
+ /**
28
+ * Private constructor
29
+ */
30
+ private function __construct() {
31
+ $this->error_handler = DLM_Product_Error_Handler::get();
32
+
33
+ add_action( 'after_plugin_row_download-monitor/download-monitor.php', array( $this, 'update_addons_notice' ), 999, 2 );
34
+
35
+ $this->addons_requirements = apply_filters(
36
+ 'dlm_addons_requirements',
37
+ array(
38
+ 'dlm-buttons' => array(
39
+ 'version' => '4.0.3',
40
+ ),
41
+ 'dlm-captcha' => array(
42
+ 'version' => '4.2.2',
43
+ ),
44
+ 'dlm-downloading-page' => array(
45
+ 'version' => '4.0.2',
46
+ ),
47
+ 'dlm-google-drive' => array(
48
+ 'version' => '4.0.1',
49
+ ),
50
+ 'dlm-terms-and-conditions' => array(
51
+ 'version' => '4.0.2',
52
+ ),
53
+ 'dlm-twitter-lock' => array(
54
+ 'version' => '4.0.2',
55
+ ),
56
+ 'dlm-advanced-access-manager' => array(
57
+ 'version' => '4.0.4',
58
+ ),
59
+ 'dlm-email-notification' => array(
60
+ 'version' => '4.1.7',
61
+ ),
62
+ 'dlm-csv-exporter' => array(
63
+ 'version' => '4.0.1',
64
+ ),
65
+ 'dlm-gravity-forms' => array(
66
+ 'version' => '4.0.3',
67
+ ),
68
+ 'dlm-ninja-forms' => array(
69
+ 'version' => '4.1.0',
70
+ ),
71
+ 'dlm-email-lock' => array(
72
+ 'version' => '4.2.2',
73
+ ),
74
+ 'dlm-download-duplicator' => array(
75
+ 'version' => '4.0.3',
76
+ ),
77
+ 'dlm-csv-importer' => array(
78
+ 'version' => '4.1.3',
79
+ ),
80
+ 'dlm-email-notification' => array(
81
+ 'version' => '4.1.7',
82
+ ),
83
+ 'dlm-amazon-s3' => array(
84
+ 'version' => '4.0.3',
85
+ ),
86
+ 'dlm-mailchimp-lock' => array(
87
+ 'version' => '4.0.2',
88
+ ),
89
+ 'dlm-page-addon' => array(
90
+ 'version' => '4.1.4',
91
+ ),
92
+ )
93
+ );
94
+ }
95
+
96
+ /**
97
+ * Singleton get method
98
+ *
99
+ * @since 1.0.0
100
+ * @access public
101
+ *
102
+ * @return DLM_Product_Manager
103
+ */
104
+ public static function get() {
105
+ if ( null == self::$instance ) {
106
+ self::$instance = new self();
107
+ }
108
+
109
+ return self::$instance;
110
+ }
111
+
112
+ /**
113
+ * @return DLM_Product_Error_Handler
114
+ */
115
+ public function error_handler() {
116
+ return $this->error_handler;
117
+ }
118
+
119
+ /**
120
+ * Setup Product Manager
121
+ */
122
+ public function setup() {
123
+
124
+ add_action( 'admin_init', array( $this, 'load_extensions' ) );
125
+ }
126
+
127
+ /**
128
+ * Load extensions
129
+ *
130
+ * @hooked admin_init
131
+ */
132
+ public function load_extensions() {
133
+ // Load the registered extensions
134
+ $registered_extensions = apply_filters( 'dlm_extensions', array() );
135
+
136
+ // Check if we've got extensions
137
+ if ( count( $registered_extensions ) > 0 ) {
138
+
139
+ // Don't block local requests
140
+ add_filter( 'block_local_requests', '__return_false' );
141
+
142
+ // Load products
143
+ $this->load_products( $registered_extensions );
144
+
145
+ }
146
+ }
147
+
148
+
149
+ /**
150
+ * Load Products
151
+ *
152
+ * @param array $extensions
153
+ */
154
+ private function load_products( $extensions ) {
155
+
156
+ // Check
157
+ if ( count( $extensions ) > 0 ) {
158
+
159
+ // Loop
160
+ foreach ( $extensions as $extension ) {
161
+
162
+ // backwards compat
163
+ if ( ! is_array( $extension ) ) {
164
+ $extension = array(
165
+ 'file' => $extension,
166
+ 'version' => false,
167
+ 'name' => '',
168
+ );
169
+ }
170
+
171
+ // Setup new Product
172
+ $product = new DLM_Product( $extension['file'], $extension['version'], $extension['name'] );
173
+
174
+ // Set action for each extension
175
+ do_action( 'dlm_extensions_action_' . $extension['file'], $extension, $product );
176
+
177
+ // Add product to products property
178
+ $this->products[ $extension['file'] ] = $product;
179
+ }
180
+ }
181
+
182
+ }
183
+
184
+ /**
185
+ * Get products
186
+ *
187
+ * @return array<DLM_Product>
188
+ */
189
+ public function get_products() {
190
+ return $this->products;
191
+ }
192
+
193
+ /**
194
+ * Display update addons notice
195
+ *
196
+ * @param [type] $file
197
+ * @param [type] $plugin_data
198
+ * @return void
199
+ */
200
+ public function update_addons_notice( $file, $plugin_data ) {
201
+
202
+ $addons = $this->get_products();
203
+
204
+ if ( empty( $addons ) || empty( $this->addons_requirements ) ) {
205
+ return;
206
+ }
207
+
208
+ $php_version = phpversion();
209
+ $table_header = ''; // The table header of our markup.
210
+ $table_end = '</div></td></tr>'; // The ending of the table
211
+ $addons_content = ''; // The inline/row content containing info about each addon specified in the requirements.
212
+ $html = ''; // General HTML to be shown in plugin inline notification.
213
+
214
+ // Create the table header HTML markup.
215
+ $table_header .= '<tr class="plugin-update-tr active"><td colspan="4" class="plugin-update colspanchange">';
216
+ $table_header .= '<div class="dlm-plugin-inline-notice">';
217
+ $table_header .= '<div class="dlm-plugin-inline-notice__header">';
218
+ $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Extension', 'download-monitor' ) . '<span></div>';
219
+ $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Requirements', 'download-monitor' ) . '</span></div>';
220
+ $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Current', 'download-monitor' ) . '</span></div>';
221
+ $table_header .= '<div class="dlm-plugin-inline-notice__line"><span class="dlm-plugin-inline-notice__strong">' . esc_html__( 'Actions', 'download-monitor' ) . '</span></div>';
222
+ $table_header .= '</div>';
223
+
224
+ foreach ( $addons as $slug => $addon ) {
225
+
226
+ if ( isset( $this->addons_requirements[ $slug ] ) ) {
227
+
228
+ $addon_present = false; // Verify if the addon doesn't meet one or multiple requirements.
229
+ $addon_row_req = ''; // The addon row HTML markup for requirements info.
230
+ $addon_row_curr = ''; // The addon row HTML markup for current info.
231
+ $actions = ''; // The actions content for each addon.
232
+
233
+ $plugin_slug = $addon->get_plugin_name();
234
+ $plugin_name = $addon->get_product_name();
235
+
236
+ if ( version_compare( $addon->get_version(), $this->addons_requirements[ $slug ]['version'], '<' ) ) {
237
+
238
+ $addon_present = true;
239
+ $required_version = $this->addons_requirements[ $slug ]['version'];
240
+ $current_version = $addon->get_version();
241
+
242
+ $addon_row_req .= '<p>' . esc_html__( 'Extension version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__required-version"> ' . esc_html( $required_version ) . '</span> ' . esc_html__( ' or higher', 'download-monitor' ) . '</p>';
243
+ $addon_row_curr .= '<p>' . esc_html__( 'Extension version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__current-version"> ' . esc_html( $current_version ) . '</span></p>';
244
+
245
+ if ( ! $addon->get_license()->is_active() ) {
246
+
247
+ $actions .= '<div class="dlm-plugin-inline-notice__line"><a href="' . esc_url( admin_url( 'edit.php?post_type=dlm_download&page=dlm-installed-extensions' ) ) . '" target="_blank">' . esc_html__( 'Enter your license key', 'download-monitor' ) . '</a> or <a href="https://www.download-monitor.com/pricing/" target="_blank">' . esc_html__( 'Purchase a new one', 'download-monitor' ) . '</a></div>';
248
+
249
+ } else {
250
+ $actions .= '<div class="dlm-plugin-inline-notice__line">';
251
+
252
+ $update_url = apply_filters( 'dlm_extension_inline_action_' . $plugin_slug, '', $addon );
253
+
254
+ if ( ! empty( $update_url ) ) {
255
+ $actions .= '<a href="' . esc_url( $update_url ) . '" target="_blank" class="update-link">' . esc_html__( 'Update', 'download-monitor' ) . ' ' . esc_html( $plugin_name ) . '</a>';
256
+ } else {
257
+ $actions .= '<a href="https://www.download-monitor.com/my-account/" target="_blank">' . esc_html__( 'Please update extension', 'download-monitor' ) . '</a>';
258
+ }
259
+
260
+ $actions .= '</div>';
261
+
262
+ }
263
+ }
264
+
265
+ if ( isset( $this->addons_requirements[ $slug ]['php'] ) && version_compare( $php_version, $this->addons_requirements[ $slug ]['php'], '<' ) ) {
266
+
267
+ $addon_present = true;
268
+
269
+ $required_php_version = $this->addons_requirements[ $slug ]['php'];
270
+
271
+ $addon_row_req .= '<p>' . esc_html__( 'PHP version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__required-version"> ' . esc_html( $required_php_version ) . '</span> ' . esc_html__( ' or higher', 'download-monitor' ) . '</p>';
272
+ $addon_row_curr .= '<p>' . esc_html__( 'PHP version:', 'download-monitor' ) . '<span class="dlm-plugin-inline-notice__current-version"> ' . esc_html( $php_version ) . '</span></p>';
273
+
274
+ }
275
+ }
276
+
277
+ // Now, let's create the addon row info content only if the addon doesn't meet the requirements.
278
+ if ( $addon_present ) {
279
+
280
+ $addons_content .= '<div class="dlm-plugin-inline-notice__row">';
281
+ $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $plugin_name . '</div>';
282
+ $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $addon_row_req . '</div>';
283
+ $addons_content .= '<div class="dlm-plugin-inline-notice__line">' . $addon_row_curr . '</div>';
284
+ $addons_content .= $actions;
285
+ $addons_content .= '</div>';
286
+ }
287
+ }
288
+
289
+ // If there is content in the addons_content variable it means there is something to be displayed, so display it.
290
+ if ( ! empty( $addons_content ) ) {
291
+ $html .= $table_header . $addons_content . $table_end;
292
+ }
293
+
294
+ echo wp_kses_post( $html );
295
+ }
296
+ }
src/Shop/Admin/WritePanels.php CHANGED
@@ -1,153 +1,153 @@
1
- <?php
2
-
3
- namespace Never5\DownloadMonitor\Shop\Admin;
4
-
5
- use Never5\DownloadMonitor\Shop\Product\Product;
6
- use Never5\DownloadMonitor\Shop\Services\Services;
7
- use Never5\DownloadMonitor\Shop\Util\PostType;
8
-
9
- class WritePanels {
10
-
11
- /**
12
- * Setup the actions
13
- */
14
- public function setup() {
15
- add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
16
- add_action( 'save_post', array( $this, 'save_post' ), 1, 2 );
17
- add_action( 'dlm_product_save', array( $this, 'save_meta_boxes' ), 1, 2 );
18
- }
19
-
20
- /**
21
- * Add the meta boxes
22
- */
23
- public function add_meta_box() {
24
- add_meta_box( 'download-monitor-product-info', __( 'Product Information', 'download-monitor' ), array(
25
- $this,
26
- 'display_product_information'
27
- ), PostType::KEY, 'normal', 'high' );
28
- }
29
-
30
- /**
31
- * save_post function.
32
- *
33
- * @access public
34
- *
35
- * @param int $post_id
36
- * @param \WP_Post $post
37
- *
38
- * @return void
39
- */
40
- public function save_post( $post_id, $post ) {
41
- if ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) {
42
- return;
43
- }
44
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
45
- return;
46
- }
47
- if ( is_int( wp_is_post_revision( $post ) ) ) {
48
- return;
49
- }
50
- if ( is_int( wp_is_post_autosave( $post ) ) ) {
51
- return;
52
- }
53
- // validate nonce
54
- // phpcs:ignore
55
- if ( empty( $_POST['dlm_product_nonce'] ) || ! wp_verify_nonce( $_POST['dlm_product_nonce'], 'save_meta_data' ) ) {
56
- return;
57
- }
58
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
59
- return;
60
- }
61
- if ( $post->post_type != PostType::KEY ) {
62
- return;
63
- }
64
-
65
- // unset nonce because it's only valid of 1 post
66
- unset( $_POST['dlm_product_nonce'] );
67
-
68
- do_action( 'dlm_product_save', $post_id, $post );
69
- }
70
-
71
- /**
72
- * save function.
73
- *
74
- * @access public
75
- *
76
- * @param int $post_id
77
- * @param \WP_Post $post
78
- *
79
- * @return void
80
- */
81
- public function save_meta_boxes( $post_id, $post ) {
82
-
83
- /**
84
- * Fetch old download object
85
- * There are certain props we don't need to manually persist here because WP does this automatically for us.
86
- * These props are:
87
- * - Product Title
88
- * - Product Status
89
- * - Product Author
90
- * - Product Description & Excerpt
91
- *
92
- */
93
- /** @var Product $product */
94
- try {
95
- $product = Services::get()->service( 'product_repository' )->retrieve_single( $post_id );
96
- } catch ( \Exception $e ) {
97
- // product not found, no point in continuing
98
- return;
99
- }
100
- if( isset( $_POST['_dlm_price'] ) ) {
101
- $product->set_price_from_user_input( sanitize_text_field( wp_unslash( $_POST['_dlm_price'] ) ) );
102
- }
103
-
104
- if( isset( $_POST['_dlm_downloads'] ) ) {
105
-
106
- $product->set_download_ids( array_map( 'sanitize_text_field', $_POST['_dlm_downloads'] ) );
107
- }
108
- // persist download
109
- Services::get()->service( 'product_repository' )->persist( $product );
110
- }
111
-
112
- /**
113
- * @param \WP_Post $post
114
- */
115
- public function display_product_information( $post ) {
116
-
117
- try {
118
- /** @var Product $product */
119
- $product = Services::get()->service( 'product_repository' )->retrieve_single( $post->ID );
120
- } catch ( \Exception $e ) {
121
- $product = Services::get()->service( 'product_factory' )->make();
122
- }
123
-
124
- $price = "";
125
- $taxable = false;
126
- $tax_class = "";
127
-
128
- $price = $product->get_price_for_user_input();
129
-
130
- /**
131
- * Fetch downloads
132
- */
133
- /** @todo fetch actual downloads */
134
- $downloads = download_monitor()->service( 'download_repository' )->retrieve( array(
135
- 'orderby' => 'title',
136
- 'order' => 'ASC'
137
- ) );
138
-
139
- wp_nonce_field( 'save_meta_data', 'dlm_product_nonce' );
140
-
141
- download_monitor()->service( 'view_manager' )->display( 'meta-box/product-information', array(
142
- 'product' => $product,
143
- 'price' => $price,
144
- 'taxable' => $taxable,
145
- 'tax_class' => $tax_class,
146
- 'downloads' => $downloads,
147
- 'current_download_ids' => $product->get_download_ids()
148
- )
149
- );
150
- }
151
-
152
-
153
  }
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Admin;
4
+
5
+ use Never5\DownloadMonitor\Shop\Product\Product;
6
+ use Never5\DownloadMonitor\Shop\Services\Services;
7
+ use Never5\DownloadMonitor\Shop\Util\PostType;
8
+
9
+ class WritePanels {
10
+
11
+ /**
12
+ * Setup the actions
13
+ */
14
+ public function setup() {
15
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
16
+ add_action( 'save_post', array( $this, 'save_post' ), 1, 2 );
17
+ add_action( 'dlm_product_save', array( $this, 'save_meta_boxes' ), 1, 2 );
18
+ }
19
+
20
+ /**
21
+ * Add the meta boxes
22
+ */
23
+ public function add_meta_box() {
24
+ add_meta_box( 'download-monitor-product-info', __( 'Product Information', 'download-monitor' ), array(
25
+ $this,
26
+ 'display_product_information'
27
+ ), PostType::KEY, 'normal', 'high' );
28
+ }
29
+
30
+ /**
31
+ * save_post function.
32
+ *
33
+ * @access public
34
+ *
35
+ * @param int $post_id
36
+ * @param \WP_Post $post
37
+ *
38
+ * @return void
39
+ */
40
+ public function save_post( $post_id, $post ) {
41
+ if ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) {
42
+ return;
43
+ }
44
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
45
+ return;
46
+ }
47
+ if ( is_int( wp_is_post_revision( $post ) ) ) {
48
+ return;
49
+ }
50
+ if ( is_int( wp_is_post_autosave( $post ) ) ) {
51
+ return;
52
+ }
53
+ // validate nonce
54
+ // phpcs:ignore
55
+ if ( empty( $_POST['dlm_product_nonce'] ) || ! wp_verify_nonce( $_POST['dlm_product_nonce'], 'save_meta_data' ) ) {
56
+ return;
57
+ }
58
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
59
+ return;
60
+ }
61
+ if ( $post->post_type != PostType::KEY ) {
62
+ return;
63
+ }
64
+
65
+ // unset nonce because it's only valid of 1 post
66
+ unset( $_POST['dlm_product_nonce'] );
67
+
68
+ do_action( 'dlm_product_save', $post_id, $post );
69
+ }
70
+
71
+ /**
72
+ * save function.
73
+ *
74
+ * @access public
75
+ *
76
+ * @param int $post_id
77
+ * @param \WP_Post $post
78
+ *
79
+ * @return void
80
+ */
81
+ public function save_meta_boxes( $post_id, $post ) {
82
+
83
+ /**
84
+ * Fetch old download object
85
+ * There are certain props we don't need to manually persist here because WP does this automatically for us.
86
+ * These props are:
87
+ * - Product Title
88
+ * - Product Status
89
+ * - Product Author
90
+ * - Product Description & Excerpt
91
+ *
92
+ */
93
+ /** @var Product $product */
94
+ try {
95
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post_id );
96
+ } catch ( \Exception $e ) {
97
+ // product not found, no point in continuing
98
+ return;
99
+ }
100
+ if( isset( $_POST['_dlm_price'] ) ) {
101
+ $product->set_price_from_user_input( sanitize_text_field( wp_unslash( $_POST['_dlm_price'] ) ) );
102
+ }
103
+
104
+ if( isset( $_POST['_dlm_downloads'] ) ) {
105
+
106
+ $product->set_download_ids( array_map( 'sanitize_text_field', wp_unslash( $_POST['_dlm_downloads'] ) ) );
107
+ }
108
+ // persist download
109
+ Services::get()->service( 'product_repository' )->persist( $product );
110
+ }
111
+
112
+ /**
113
+ * @param \WP_Post $post
114
+ */
115
+ public function display_product_information( $post ) {
116
+
117
+ try {
118
+ /** @var Product $product */
119
+ $product = Services::get()->service( 'product_repository' )->retrieve_single( $post->ID );
120
+ } catch ( \Exception $e ) {
121
+ $product = Services::get()->service( 'product_factory' )->make();
122
+ }
123
+
124
+ $price = "";
125
+ $taxable = false;
126
+ $tax_class = "";
127
+
128
+ $price = $product->get_price_for_user_input();
129
+
130
+ /**
131
+ * Fetch downloads
132
+ */
133
+ /** @todo fetch actual downloads */
134
+ $downloads = download_monitor()->service( 'download_repository' )->retrieve( array(
135
+ 'orderby' => 'title',
136
+ 'order' => 'ASC'
137
+ ) );
138
+
139
+ wp_nonce_field( 'save_meta_data', 'dlm_product_nonce' );
140
+
141
+ download_monitor()->service( 'view_manager' )->display( 'meta-box/product-information', array(
142
+ 'product' => $product,
143
+ 'price' => $price,
144
+ 'taxable' => $taxable,
145
+ 'tax_class' => $tax_class,
146
+ 'downloads' => $downloads,
147
+ 'current_download_ids' => $product->get_download_ids()
148
+ )
149
+ );
150
+ }
151
+
152
+
153
  }
src/Shop/Session/Factory.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
- namespace Never5\DownloadMonitor\Shop\Session;
4
-
5
- class Factory {
6
-
7
- /**
8
- * Generate key
9
- *
10
- * @return string
11
- */
12
- private function generate_key() {
13
- return md5( uniqid( 'dlm_shop_session_key', true ) . sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) );
14
- }
15
-
16
- /**
17
- * Generate hash
18
- *
19
- * @param $key
20
- *
21
- * @return string
22
- */
23
- private function generate_hash( $key ) {
24
- $nonce = ( defined( 'NONCE_SALT' ) ? NONCE_SALT : 'nononce' );
25
-
26
- $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
27
- return md5( uniqid( 'dlm_shop_session_hash', true ) . mt_rand( 0, 99 ) . $remote_addr . $nonce . $key );
28
- }
29
-
30
- /**
31
- * Make new session with unique key and hash
32
- *
33
- * @return Session
34
- */
35
- public function make() {
36
-
37
- $session = new Session();
38
- $session->set_key( $this->generate_key() );
39
- $session->set_hash( $this->generate_hash( $session->get_key() ) );
40
-
41
- $session->set_items( array() );
42
- $session->set_coupons( array() );
43
-
44
- $session->reset_expiry();
45
-
46
- return $session;
47
-
48
- }
49
-
50
  }
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Shop\Session;
4
+
5
+ class Factory {
6
+
7
+ /**
8
+ * Generate key
9
+ *
10
+ * @return string
11
+ */
12
+ private function generate_key() {
13
+ return md5( uniqid( 'dlm_shop_session_key', true ) . isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '' );
14
+ }
15
+
16
+ /**
17
+ * Generate hash
18
+ *
19
+ * @param $key
20
+ *
21
+ * @return string
22
+ */
23
+ private function generate_hash( $key ) {
24
+ $nonce = ( defined( 'NONCE_SALT' ) ? NONCE_SALT : 'nononce' );
25
+
26
+ $remote_addr = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
27
+ return md5( uniqid( 'dlm_shop_session_hash', true ) . mt_rand( 0, 99 ) . $remote_addr . $nonce . $key );
28
+ }
29
+
30
+ /**
31
+ * Make new session with unique key and hash
32
+ *
33
+ * @return Session
34
+ */
35
+ public function make() {
36
+
37
+ $session = new Session();
38
+ $session->set_key( $this->generate_key() );
39
+ $session->set_hash( $this->generate_hash( $session->get_key() ) );
40
+
41
+ $session->set_items( array() );
42
+ $session->set_coupons( array() );
43
+
44
+ $session->reset_expiry();
45
+
46
+ return $session;
47
+
48
+ }
49
+
50
  }
src/Util/Onboarding.php CHANGED
@@ -1,265 +1,265 @@
1
- <?php
2
-
3
- namespace Never5\DownloadMonitor\Util;
4
-
5
- class Onboarding {
6
-
7
- /**
8
- * Setup onboarding
9
- */
10
- public function setup() {
11
-
12
- // add page
13
- add_action( 'admin_menu', array( $this, 'add_admin_page' ) );
14
-
15
- // add notice
16
- if ( false === get_option( 'dlm_hide_notice-onboarding' ) && ( ! isset( $_GET['page'] ) || ( isset( $_GET['page'] ) && 'dlm_onboarding' != $_GET['page'] ) ) ) {
17
- add_action( 'admin_notices', array( $this, 'add_notice' ) );
18
-
19
- /*
20
- // notice JS -.-
21
- add_action( 'in_admin_footer', function () {
22
- ?>
23
- <script type="text/javascript">
24
- jQuery( function ( $ ) {
25
- $( '.wpcm-notice' ).on( 'click', '.notice-dismiss', function ( event ) {
26
- $.get( '<?php echo Ajax\Manager::get_ajax_url( 'dismiss_notice' ); ?>', {
27
- id: $( this ).closest( '.wpcm-notice' ).data( 'id' ),
28
- nonce: '<?php echo wp_create_nonce( 'wpcm_ajax_nonce_dismiss_notice' ) ?>'
29
- }, function () {
30
- } );
31
- } );
32
- } );
33
- </script>
34
- <?php
35
- } );
36
- */
37
- }
38
-
39
- }
40
-
41
- /**
42
- * Add admin page
43
- */
44
- public function add_admin_page() {
45
- // add page
46
- $menu_hook = \add_submenu_page( null, 'DLM_ONBOARDING', 'DLM_ONBOARDING', 'edit_posts', 'dlm_onboarding', array(
47
- $this,
48
- 'page'
49
- ) );
50
-
51
- // load onboarding assets
52
- add_action( 'load-' . $menu_hook, array( $this, 'enqueue_assets' ) );
53
- }
54
-
55
- /**
56
- * Enqueue onboarding assets
57
- */
58
- public function enqueue_assets() {
59
-
60
- wp_enqueue_script(
61
- 'dlm_onboarding',
62
- plugins_url( '/assets/js/onboarding' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', download_monitor()->get_plugin_file() ),
63
- array( 'jquery' ),
64
- DLM_VERSION
65
- );
66
-
67
- wp_localize_script( 'dlm_onboarding', 'dlm_onboarding', array(
68
- 'ajax_url_create_page' => \DLM_Ajax_Manager::get_ajax_url( 'create_page' ),
69
- 'lbl_creating' => __( 'Creating', 'download-monitor' ) . '...',
70
- 'lbl_created' => __( 'Page Created', 'download-monitor' ),
71
- 'lbl_create_page' => __( 'Create Page', 'download-monitor' ),
72
- ) );
73
-
74
- }
75
-
76
- /**
77
- * Onboarding notice
78
- */
79
- public function add_notice() {
80
- ?>
81
- <div class="notice notice-warning is-dismissible dlm-notice dlm-onboarding-notice" data-id="onboarding" data-nonce="<?php echo esc_attr( wp_create_nonce( 'dlm_hide_notice-onboarding' ) ); ?>" id="onboarding">
82
- <p><?php printf( esc_html__( 'Download Monitor is almost ready for use, %sclick here%s to finish the installation process.', 'download-monitor' ), '<a href="' . esc_url( admin_url( 'edit.php?post_type=dlm_download&page=dlm_onboarding' ) ) . '">', '</a>' ); ?></p>
83
- </div>
84
- <?php
85
- }
86
-
87
- /**
88
- * Onboarding page
89
- */
90
- public function page() {
91
-
92
- // been there, done that
93
- update_option( 'dlm_hide_notice-onboarding', 1 );
94
-
95
- /** @var \DLM_Settings_Helper $settings */
96
- $settings = download_monitor()->service( "settings" );
97
-
98
- // the actual page
99
- ?>
100
- <div class="wrap dlm-onboarding">
101
-
102
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
103
- <h2><?php echo esc_html__( "Welcome to ", 'download-monitor' ); ?> Download Monitor</h2>
104
- <p>
105
- <?php echo esc_html__( "Thank you for installing Download Monitor! We'd like to help you setup the plugin correctly so you can start sharing your files as quickly as possible.", 'download-monitor' ); ?>
106
- <?php echo esc_html__( "With Download Monitor you can manage, track and offer downloads to your users using your WordPress website.", 'download-monitor' ); ?>
107
- <?php echo esc_html__( "On top of that, Download Monitor allows you to sell your downloads, turning your WordPress website into fully featured e-commerce website out of the box.", 'download-monitor' ); ?>
108
- </p>
109
- <p>
110
- <?php echo esc_html__( "You decide if you want to offer you downloads for free or want to start selling them (or both!). Whatever you decide, you chose the right plugin for the job!", 'download-monitor' ); ?>
111
- </p>
112
- </div>
113
-
114
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
115
- <h2><?php echo esc_html__( "Let's Create Your Pages", 'download-monitor' ); ?></h2>
116
- <p>
117
- <?php echo esc_html__( 'In order to function properly, Download Monitor needs to create some pages in your WordPress website.', 'download-monitor' ); ?>
118
- <?php echo esc_html__( "We can create these pages for you here. If you click the 'Create Page' button we will create that page and add the required shortcode to it. We'll also make sure the newly created page is set in your settings page.", 'download-monitor' ); ?>
119
- </p>
120
- <p>
121
- <?php echo esc_html__( "If you don't plan on selling downloads, you do not have to create the cart and checkout page. We recommend always creating the No Access page.", 'download-monitor' ); ?>
122
- </p>
123
- <table cellpadding="0" cellspacing="0" border="0" class="dlm-onboarding-pages">
124
- <tr>
125
- <th><?php echo esc_html__( 'No Access', 'download-monitor' ); ?></th>
126
- <td><?php echo esc_html__( "The page your visitors see when they are not allowed to download a file.", 'download-monitor' ); ?></td>
127
- <td>
128
- <?php
129
- /**
130
- * Check if no access page is already set in settings
131
- */
132
- $page_no_access = $settings->get_option( 'no_access_page' );
133
-
134
- if ( $page_no_access != 0 ) :
135
- ?>
136
- <a href="javascript:;"
137
- class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
138
- <?php
139
- else:
140
- ?>
141
- <a href="javascript:;"
142
- class="button button-primary button-hero dlm-create-page"
143
- data-page="no-access"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
144
- <?php
145
- endif;
146
- ?>
147
-
148
- </td>
149
- </tr>
150
- <tr>
151
- <th><?php echo esc_html__( 'Cart', 'download-monitor' ); ?></th>
152
- <td><?php echo esc_html__( 'Your shop cart page if you decide to sell downloads.', 'download-monitor' ); ?></td>
153
- <td>
154
- <?php
155
- /**
156
- * Check if no access page is already set in settings
157
- */
158
- $page_cart = $settings->get_option( 'page_cart' );
159
-
160
- if ( $page_cart != 0 ) :
161
- ?>
162
- <a href="javascript:;"
163
- class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
164
- <?php
165
- else:
166
- ?>
167
- <a href="javascript:;"
168
- class="button button-primary button-hero dlm-create-page"
169
- data-page="cart"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
170
- <?php
171
- endif;
172
- ?>
173
- </td>
174
- </tr>
175
- <tr>
176
- <th><?php echo esc_html__( 'Checkout', 'download-monitor' ); ?></th>
177
- <td><?php echo esc_html__( 'Your shop checkout page if you decide to sell downloads.', 'download-monitor' ); ?></td>
178
- <td>
179
- <?php
180
- /**
181
- * Check if no access page is already set in settings
182
- */
183
- $page_checkout = $settings->get_option( 'page_checkout' );
184
-
185
- if ( $page_checkout != 0 ) :
186
- ?>
187
- <a href="javascript:;"
188
- class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
189
- <?php
190
- else:
191
- ?>
192
- <a href="javascript:;"
193
- class="button button-primary button-hero dlm-create-page"
194
- data-page="checkout"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
195
- <?php
196
- endif;
197
- ?>
198
- </td>
199
- </tr>
200
-
201
- </table>
202
- </div>
203
-
204
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
205
- <h2><?php echo esc_html__( 'Extensions', 'download-monitor' ); ?></h2>
206
- <p>
207
- <?php echo esc_html__( 'Power up your Download Monitor website with our official extensions. Our extensions allow you to add specific functionality to your Download Monitor powered website and come with our premium support and updates.', 'download-monitor' ); ?>
208
- <?php echo esc_html__( "Here's a quick sample of what we offer.", 'download-monitor' ); ?>
209
- </p>
210
- </div>
211
-
212
- <div class="dlm-onboarding-section dlm-onboarding-section-three-col">
213
- <?php
214
- $extension_loader = new ExtensionLoader();
215
- $response = json_decode( $extension_loader->fetch() );
216
- if ( ! empty( $response->extensions ) ) :
217
- $i = 0;
218
- foreach ( $response->extensions as $extension ) :
219
- ?>
220
- <div class="dlm-onboarding-col">
221
- <img src="<?php echo esc_attr( $extension->image ); ?>"
222
- alt="<?php echo esc_attr( $extension->name ); ?>"/>
223
- <h3><?php echo esc_html( $extension->name ); ?></h3>
224
- <p><?php echo esc_html( $extension->desc ); ?></p>
225
- </div>
226
- <?php
227
- $i ++;
228
- if ( $i > 2 ) {
229
- break;
230
- }
231
- endforeach;
232
- endif;
233
- ?>
234
- </div>
235
-
236
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col dlm-onboarding-section-cta">
237
- <p>
238
- <a href="https://www.download-monitor.com/extensions/?utm_source=plugin&utm_medium=link&utm_campaign=onboarding"
239
- class="button button-primary button-hero"
240
- target="_blank"><?php echo esc_html__( 'View More Extensions', 'download-monitor' ); ?></a>
241
- </p>
242
- </div>
243
-
244
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
245
- <h2><?php echo esc_html__( "What's Next?", 'download-monitor' ); ?></h2>
246
-
247
- <p>
248
- <?php printf( esc_html__( "Now that your Download Monitor installation is done, it's time to setup your downloads. You can %sread more about creating your first Download here%s.", 'download-monitor' ), '<a href="https://www.download-monitor.com/kb/creating-your-first-download/?utm_source=plugin&utm_medium=link&utm_campaign=onboarding" target="_blank">', '</a>' ); ?>
249
- <?php echo esc_html__( "If you need any help in setting up your downloads or having any other question about Download Monitor, we'd be happy to help you via our support forums.", 'download-monitor' ); ?>
250
- <a href="https://wordpress.org/support/plugin/download-monitor/"
251
- target="_blank"><?php echo esc_html__( "Click here to visit our Support Forum.", 'download-monitor' ); ?></a>
252
- </p>
253
- </div>
254
-
255
- <div class="dlm-onboarding-section dlm-onboarding-section-one-col dlm-onboarding-section-cta">
256
- <p>
257
- <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=dlm_download' ) ); ?>"
258
- class="button button-primary button-hero"><?php echo esc_html__( 'Create Your First Download', 'download-monitor' ); ?></a>
259
- </p>
260
- </div>
261
-
262
- </div>
263
- <?php
264
- }
265
  }
1
+ <?php
2
+
3
+ namespace Never5\DownloadMonitor\Util;
4
+
5
+ class Onboarding {
6
+
7
+ /**
8
+ * Setup onboarding
9
+ */
10
+ public function setup() {
11
+
12
+ // add page
13
+ add_action( 'admin_menu', array( $this, 'add_admin_page' ) );
14
+
15
+ // add notice
16
+ if ( false === get_option( 'dlm_hide_notice-onboarding' ) && ( ! isset( $_GET['page'] ) || ( isset( $_GET['page'] ) && 'dlm_onboarding' != $_GET['page'] ) ) ) {
17
+ add_action( 'admin_notices', array( $this, 'add_notice' ) );
18
+
19
+ /*
20
+ // notice JS -.-
21
+ add_action( 'in_admin_footer', function () {
22
+ ?>
23
+ <script type="text/javascript">
24
+ jQuery( function ( $ ) {
25
+ $( '.wpcm-notice' ).on( 'click', '.notice-dismiss', function ( event ) {
26
+ $.get( '<?php echo Ajax\Manager::get_ajax_url( 'dismiss_notice' ); ?>', {
27
+ id: $( this ).closest( '.wpcm-notice' ).data( 'id' ),
28
+ nonce: '<?php echo wp_create_nonce( 'wpcm_ajax_nonce_dismiss_notice' ) ?>'
29
+ }, function () {
30
+ } );
31
+ } );
32
+ } );
33
+ </script>
34
+ <?php
35
+ } );
36
+ */
37
+ }
38
+
39
+ }
40
+
41
+ /**
42
+ * Add admin page
43
+ */
44
+ public function add_admin_page() {
45
+ // add page
46
+ $menu_hook = \add_submenu_page( null, 'DLM_ONBOARDING', 'DLM_ONBOARDING', 'edit_posts', 'dlm_onboarding', array(
47
+ $this,
48
+ 'page'
49
+ ) );
50
+
51
+ // load onboarding assets
52
+ add_action( 'load-' . $menu_hook, array( $this, 'enqueue_assets' ) );
53
+ }
54
+
55
+ /**
56
+ * Enqueue onboarding assets
57
+ */
58
+ public function enqueue_assets() {
59
+
60
+ wp_enqueue_script(
61
+ 'dlm_onboarding',
62
+ plugins_url( '/assets/js/onboarding' . ( ( ! SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', download_monitor()->get_plugin_file() ),
63
+ array( 'jquery' ),
64
+ DLM_VERSION
65
+ );
66
+
67
+ wp_localize_script( 'dlm_onboarding', 'dlm_onboarding', array(
68
+ 'ajax_url_create_page' => \DLM_Ajax_Manager::get_ajax_url( 'create_page' ),
69
+ 'lbl_creating' => __( 'Creating', 'download-monitor' ) . '...',
70
+ 'lbl_created' => __( 'Page Created', 'download-monitor' ),
71
+ 'lbl_create_page' => __( 'Create Page', 'download-monitor' ),
72
+ ) );
73
+
74
+ }
75
+
76
+ /**
77
+ * Onboarding notice
78
+ */
79
+ public function add_notice() {
80
+ ?>
81
+ <div class="notice notice-warning is-dismissible dlm-notice dlm-onboarding-notice" data-id="onboarding" data-nonce="<?php echo esc_attr( wp_create_nonce( 'dlm_hide_notice-onboarding' ) ); ?>" id="onboarding">
82
+ <p><?php printf( esc_html__( 'Download Monitor is almost ready for use, %sclick here%s to finish the installation process.', 'download-monitor' ), '<a href="' . esc_url( admin_url( 'edit.php?post_type=dlm_download&page=dlm_onboarding' ) ) . '">', '</a>' ); ?></p>
83
+ </div>
84
+ <?php
85
+ }
86
+
87
+ /**
88
+ * Onboarding page
89
+ */
90
+ public function page() {
91
+
92
+ // been there, done that
93
+ update_option( 'dlm_hide_notice-onboarding', 1 );
94
+
95
+ /** @var \DLM_Settings_Helper $settings */
96
+ $settings = download_monitor()->service( "settings" );
97
+
98
+ // the actual page
99
+ ?>
100
+ <div class="wrap dlm-onboarding">
101
+
102
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
103
+ <h2><?php echo esc_html__( "Welcome to ", 'download-monitor' ); ?> Download Monitor</h2>
104
+ <p>
105
+ <?php echo esc_html__( "Thank you for installing Download Monitor! We'd like to help you setup the plugin correctly so you can start sharing your files as quickly as possible.", 'download-monitor' ); ?>
106
+ <?php echo esc_html__( "With Download Monitor you can manage, track and offer downloads to your users using your WordPress website.", 'download-monitor' ); ?>
107
+ <?php echo esc_html__( "On top of that, Download Monitor allows you to sell your downloads, turning your WordPress website into fully featured e-commerce website out of the box.", 'download-monitor' ); ?>
108
+ </p>
109
+ <p>
110
+ <?php echo esc_html__( "You decide if you want to offer you downloads for free or want to start selling them (or both!). Whatever you decide, you chose the right plugin for the job!", 'download-monitor' ); ?>
111
+ </p>
112
+ </div>
113
+
114
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
115
+ <h2><?php echo esc_html__( "Let's Create Your Pages", 'download-monitor' ); ?></h2>
116
+ <p>
117
+ <?php echo esc_html__( 'In order to function properly, Download Monitor needs to create some pages in your WordPress website.', 'download-monitor' ); ?>
118
+ <?php echo esc_html__( "We can create these pages for you here. If you click the 'Create Page' button we will create that page and add the required shortcode to it. We'll also make sure the newly created page is set in your settings page.", 'download-monitor' ); ?>
119
+ </p>
120
+ <p>
121
+ <?php echo esc_html__( "If you don't plan on selling downloads, you do not have to create the cart and checkout page. We recommend always creating the No Access page.", 'download-monitor' ); ?>
122
+ </p>
123
+ <table cellpadding="0" cellspacing="0" border="0" class="dlm-onboarding-pages">
124
+ <tr>
125
+ <th><?php echo esc_html__( 'No Access', 'download-monitor' ); ?></th>
126
+ <td><?php echo esc_html__( "The page your visitors see when they are not allowed to download a file.", 'download-monitor' ); ?></td>
127
+ <td>
128
+ <?php
129
+ /**
130
+ * Check if no access page is already set in settings
131
+ */
132
+ $page_no_access = $settings->get_option( 'no_access_page' );
133
+
134
+ if ( $page_no_access != 0 ) :
135
+ ?>
136
+ <a href="javascript:;"
137
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
138
+ <?php
139
+ else:
140
+ ?>
141
+ <a href="javascript:;"
142
+ class="button button-primary button-hero dlm-create-page"
143
+ data-page="no-access"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
144
+ <?php
145
+ endif;
146
+ ?>
147
+
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <th><?php echo esc_html__( 'Cart', 'download-monitor' ); ?></th>
152
+ <td><?php echo esc_html__( 'Your shop cart page if you decide to sell downloads.', 'download-monitor' ); ?></td>
153
+ <td>
154
+ <?php
155
+ /**
156
+ * Check if no access page is already set in settings
157
+ */
158
+ $page_cart = $settings->get_option( 'page_cart' );
159
+
160
+ if ( $page_cart != 0 ) :
161
+ ?>
162
+ <a href="javascript:;"
163
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
164
+ <?php
165
+ else:
166
+ ?>
167
+ <a href="javascript:;"
168
+ class="button button-primary button-hero dlm-create-page"
169
+ data-page="cart"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
170
+ <?php
171
+ endif;
172
+ ?>
173
+ </td>
174
+ </tr>
175
+ <tr>
176
+ <th><?php echo esc_html__( 'Checkout', 'download-monitor' ); ?></th>
177
+ <td><?php echo esc_html__( 'Your shop checkout page if you decide to sell downloads.', 'download-monitor' ); ?></td>
178
+ <td>
179
+ <?php
180
+ /**
181
+ * Check if no access page is already set in settings
182
+ */
183
+ $page_checkout = $settings->get_option( 'page_checkout' );
184
+
185
+ if ( $page_checkout != 0 ) :
186
+ ?>
187
+ <a href="javascript:;"
188
+ class="button button-primary button-hero dlm-page-exists"><?php echo esc_html__( 'Page Created', 'download-monitor' ); ?></a>
189
+ <?php
190
+ else:
191
+ ?>
192
+ <a href="javascript:;"
193
+ class="button button-primary button-hero dlm-create-page"
194
+ data-page="checkout"><?php echo esc_html__( 'Create Page', 'download-monitor' ); ?></a>
195
+ <?php
196
+ endif;
197
+ ?>
198
+ </td>
199
+ </tr>
200
+
201
+ </table>
202
+ </div>
203
+
204
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
205
+ <h2><?php echo esc_html__( 'Extensions', 'download-monitor' ); ?></h2>
206
+ <p>
207
+ <?php echo esc_html__( 'Power up your Download Monitor website with our official extensions. Our extensions allow you to add specific functionality to your Download Monitor powered website and come with our premium support and updates.', 'download-monitor' ); ?>
208
+ <?php echo esc_html__( "Here's a quick sample of what we offer.", 'download-monitor' ); ?>
209
+ </p>
210
+ </div>
211
+
212
+ <div class="dlm-onboarding-section dlm-onboarding-section-three-col">
213
+ <?php
214
+ $extension_loader = new ExtensionLoader();
215
+ $response = json_decode( $extension_loader->fetch() );
216
+ if ( ! empty( $response->extensions ) ) :
217
+ $i = 0;
218
+ foreach ( $response->extensions as $extension ) :
219
+ ?>
220
+ <div class="dlm-onboarding-col">
221
+ <img src="<?php echo esc_attr( $extension->image ); ?>"
222
+ alt="<?php echo esc_attr( $extension->name ); ?>"/>
223
+ <h3><?php echo esc_html( $extension->name ); ?></h3>
224
+ <p><?php echo esc_html( $extension->desc ); ?></p>
225
+ </div>
226
+ <?php
227
+ $i ++;
228
+ if ( $i > 2 ) {
229
+ break;
230
+ }
231
+ endforeach;
232
+ endif;
233
+ ?>
234
+ </div>
235
+
236
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col dlm-onboarding-section-cta">
237
+ <p>
238
+ <a href="https://www.download-monitor.com/extensions/?utm_source=plugin&utm_medium=link&utm_campaign=onboarding"
239
+ class="button button-primary button-hero"
240
+ target="_blank"><?php echo esc_html__( 'View More Extensions', 'download-monitor' ); ?></a>
241
+ </p>
242
+ </div>
243
+
244
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col">
245
+ <h2><?php echo esc_html__( "What's Next?", 'download-monitor' ); ?></h2>
246
+
247
+ <p>
248
+ <?php printf( esc_html__( "Now that your Download Monitor installation is done, it's time to setup your downloads. You can %sread more about creating your first Download here%s.", 'download-monitor' ), '<a href="https://www.download-monitor.com/kb/creating-your-first-download/?utm_source=plugin&utm_medium=link&utm_campaign=onboarding" target="_blank">', '</a>' ); ?>
249
+ <?php echo esc_html__( "If you need any help in setting up your downloads or having any other question about Download Monitor, we'd be happy to help you via our support forums.", 'download-monitor' ); ?>
250
+ <a href="https://wordpress.org/support/plugin/download-monitor/"
251
+ target="_blank"><?php echo esc_html__( "Click here to visit our Support Forum.", 'download-monitor' ); ?></a>
252
+ </p>
253
+ </div>
254
+
255
+ <div class="dlm-onboarding-section dlm-onboarding-section-one-col dlm-onboarding-section-cta">
256
+ <p>
257
+ <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=dlm_download' ) ); ?>"
258
+ class="button button-primary button-hero"><?php echo esc_html__( 'Create Your First Download', 'download-monitor' ); ?></a>
259
+ </p>
260
+ </div>
261
+
262
+ </div>
263
+ <?php
264
+ }
265
  }
templates/shop/button/add-to-cart-box.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Add to cart button
4
- */
5
-
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- } // Exit if accessed directly
9
-
10
- /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
- /** @var string $atc_url */
12
- ?>
13
- <aside class="download-box">
14
-
15
- <?php echo wp_kses_post( $product->get_image() ); ?>
16
-
17
- <div class="download-count"><?php echo esc_html( dlm_format_money( $product->get_price() ) ); ?></div>
18
-
19
- <div class="download-box-content">
20
-
21
- <h1><?php echo esc_html( $product->get_title() ); ?></h1>
22
-
23
- <p><?php echo esc_html( $product->get_the_excerpt() ); ?></p>
24
-
25
- <a class="download-button" title="<?php echo esc_html__( 'Purchase Now', 'download-monitor' ); ?>" href="<?php echo esc_url( $atc_url ); ?>"
26
- rel="nofollow">
27
- <?php echo esc_html__( 'Purchase Now', 'download-monitor' ); ?>
28
- </a>
29
-
30
- </div>
31
  </aside>
1
+ <?php
2
+ /**
3
+ * Add to cart button
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
+
10
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
+ /** @var string $atc_url */
12
+ ?>
13
+ <aside class="download-box">
14
+
15
+ <?php echo wp_kses_post( $product->get_image() ); ?>
16
+
17
+ <div class="download-count"><?php echo esc_html( dlm_format_money( $product->get_price() ) ); ?></div>
18
+
19
+ <div class="download-box-content">
20
+
21
+ <h1><?php echo esc_html( $product->get_title() ); ?></h1>
22
+
23
+ <p><?php $product->the_excerpt(); ?></p>
24
+
25
+ <a class="download-button" title="<?php echo esc_html__( 'Purchase Now', 'download-monitor' ); ?>" href="<?php echo esc_url( $atc_url ); ?>"
26
+ rel="nofollow">
27
+ <?php echo esc_html__( 'Purchase Now', 'download-monitor' ); ?>
28
+ </a>
29
+
30
+ </div>
31
  </aside>
templates/shop/button/add-to-cart.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- /**
3
- * Add to cart button
4
- */
5
-
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- } // Exit if accessed directly
9
-
10
- /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
- /** @var string $atc_url */
12
- ?>
13
- <p><a class="aligncenter download-button" href="<?php echo esc_url ( $atc_url ); ?>" rel="nofollow">
14
- <?php printf( esc_html__( 'Purchase &ldquo;%s&rdquo;', 'download-monitor' ), esc_html( $product->get_title() ) ); ?>
15
- <small><?php echo esc_html( dlm_format_money( $product->get_price() ) ); ?>
16
- - <?php echo esc_html( $product->get_the_excerpt() ); ?></small>
17
  </a></p>
1
+ <?php
2
+ /**
3
+ * Add to cart button
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ } // Exit if accessed directly
9
+
10
+ /** @var \Never5\DownloadMonitor\Shop\Product\Product $product */
11
+ /** @var string $atc_url */
12
+ ?>
13
+ <p><a class="aligncenter download-button" href="<?php echo esc_url ( $atc_url ); ?>" rel="nofollow">
14
+ <?php printf( esc_html__( 'Purchase &ldquo;%s&rdquo;', 'download-monitor' ), esc_html( $product->get_title() ) ); ?>
15
+ <small><?php echo esc_html( dlm_format_money( $product->get_price() ) ); ?>
16
+ - <?php $product->the_excerpt(); ?></small>
17
  </a></p>
templates/shop/cart/item.php CHANGED
@@ -9,8 +9,8 @@ if ( ! defined( 'ABSPATH' ) ) {
9
  <td><a href="<?php echo esc_url( add_query_arg( array( 'dlm-remove-from-cart' => $item->get_product_id() ), $url_cart ) ); ?>"
10
  class="dlm-cart-remove-item"
11
  aria-label="<?php echo esc_attr__( 'Remove this item from your cart', 'download-monitor' ); ?>">x</a></td>
12
- <td><?php echo esc_html__( $item->get_label() ); ?></td>
13
- <td><?php echo esc_html__( dlm_format_money( $item->get_subtotal() ) ); ?></td>
14
- <td><?php echo esc_html__( $item->get_qty() ); ?></td>
15
- <td><?php echo esc_html__( dlm_format_money( $item->get_total() ) ); ?></td>
16
  </tr>
9
  <td><a href="<?php echo esc_url( add_query_arg( array( 'dlm-remove-from-cart' => $item->get_product_id() ), $url_cart ) ); ?>"
10
  class="dlm-cart-remove-item"
11
  aria-label="<?php echo esc_attr__( 'Remove this item from your cart', 'download-monitor' ); ?>">x</a></td>
12
+ <td><?php echo esc_html( $item->get_label() ); ?></td>
13
+ <td><?php echo esc_html( dlm_format_money( $item->get_subtotal() ) ); ?></td>
14
+ <td><?php echo esc_html( $item->get_qty() ); ?></td>
15
+ <td><?php echo esc_html( dlm_format_money( $item->get_total() ) ); ?></td>
16
  </tr>
vendor/composer/autoload_classmap.php CHANGED
@@ -1,372 +1,372 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'DLM_Admin' => $baseDir . '/src/Admin/Admin.php',
10
- 'DLM_Admin_Dashboard' => $baseDir . '/src/Admin/Dashboard.php',
11
- 'DLM_Admin_Extensions' => $baseDir . '/src/Admin/Extensions.php',
12
- 'DLM_Admin_Fields_Field' => $baseDir . '/src/Admin/Settings/Fields/Field.php',
13
- 'DLM_Admin_Fields_Field_ActionButton' => $baseDir . '/src/Admin/Settings/Fields/ActionButton.php',
14
- 'DLM_Admin_Fields_Field_Checkbox' => $baseDir . '/src/Admin/Settings/Fields/Checkbox.php',
15
- 'DLM_Admin_Fields_Field_Desc' => $baseDir . '/src/Admin/Settings/Fields/Desc.php',
16
- 'DLM_Admin_Fields_Field_Factory' => $baseDir . '/src/Admin/Settings/Fields/FieldFactory.php',
17
- 'DLM_Admin_Fields_Field_Lazy_Select' => $baseDir . '/src/Admin/Settings/Fields/LazySelect.php',
18
- 'DLM_Admin_Fields_Field_Password' => $baseDir . '/src/Admin/Settings/Fields/Password.php',
19
- 'DLM_Admin_Fields_Field_Select' => $baseDir . '/src/Admin/Settings/Fields/Select.php',
20
- 'DLM_Admin_Fields_Field_Text' => $baseDir . '/src/Admin/Settings/Fields/Text.php',
21
- 'DLM_Admin_Fields_Field_Textarea' => $baseDir . '/src/Admin/Settings/Fields/Textarea.php',
22
- 'DLM_Admin_Fields_Field_Title' => $baseDir . '/src/Admin/Settings/Fields/Title.php',
23
- 'DLM_Admin_Media_Browser' => $baseDir . '/src/Admin/MediaBrowser.php',
24
- 'DLM_Admin_Media_Insert' => $baseDir . '/src/Admin/MediaInsert.php',
25
- 'DLM_Admin_Scripts' => $baseDir . '/src/Admin/AdminScripts.php',
26
- 'DLM_Admin_Settings' => $baseDir . '/src/Admin/Settings/Settings.php',
27
- 'DLM_Admin_Writepanels' => $baseDir . '/src/Admin/WritePanels.php',
28
- 'DLM_Admin_OptionsUpsells' => $baseDir . '/src/Admin/OptionsUpsells.php',
29
- 'DLM_Ajax' => $baseDir . '/src/Ajax/Ajax.php',
30
- 'DLM_Ajax_CreatePage' => $baseDir . '/src/Ajax/CreatePage.php',
31
- 'DLM_Ajax_GetDownloads' => $baseDir . '/src/Ajax/GetDownloads.php',
32
- 'DLM_Ajax_GetVersions' => $baseDir . '/src/Ajax/GetVersions.php',
33
- 'DLM_Ajax_Handler' => $baseDir . '/src/AjaxHandler.php',
34
- 'DLM_Ajax_Manager' => $baseDir . '/src/Ajax/Manager.php',
35
- 'DLM_Category_Walker' => $baseDir . '/src/Admin/CategoryWalker.php',
36
- 'DLM_Constants' => $baseDir . '/src/Constants.php',
37
- 'DLM_Cookie_Manager' => $baseDir . '/src/CookieManager.php',
38
- 'DLM_Custom_Actions' => $baseDir . '/src/Admin/CustomActions.php',
39
- 'DLM_Custom_Columns' => $baseDir . '/src/Admin/CustomColumns.php',
40
- 'DLM_Custom_Labels' => $baseDir . '/src/Admin/CustomLabels.php',
41
- 'DLM_Debug_Logger' => $baseDir . '/src/DebugLogger.php',
42
- 'DLM_Download' => $baseDir . '/src/Download/Download.php',
43
- 'DLM_DownloadPreview_Config' => $baseDir . '/src/DownloadPreview/Config.php',
44
- 'DLM_DownloadPreview_Preview' => $baseDir . '/src/DownloadPreview/Preview.php',
45
- 'DLM_Download_Factory' => $baseDir . '/src/Download/DownloadFactory.php',
46
- 'DLM_Download_Handler' => $baseDir . '/src/DownloadHandler.php',
47
- 'DLM_Download_No_Access_Page_Endpoint' => $baseDir . '/src/DownloadNoAccessPageEndpoint.php',
48
- 'DLM_Download_Repository' => $baseDir . '/src/Download/DownloadRepository.php',
49
- 'DLM_Download_Version' => $baseDir . '/src/Version/Version.php',
50
- 'DLM_File_Manager' => $baseDir . '/src/FileManager.php',
51
- 'DLM_Gutenberg' => $baseDir . '/src/Gutenberg.php',
52
- 'DLM_Hasher' => $baseDir . '/src/Hasher.php',
53
- 'DLM_Installer' => $baseDir . '/src/Installer.php',
54
- 'DLM_Integrations_PostTypesOrder' => $baseDir . '/src/Integrations/PostTypesOrder.php',
55
- 'DLM_Integrations_YoastSEO' => $baseDir . '/src/Integrations/YoastSEO.php',
56
- 'DLM_LU_Ajax' => $baseDir . '/src/LegacyUpgrader/Ajax.php',
57
- 'DLM_LU_Checker' => $baseDir . '/src/LegacyUpgrader/Checker.php',
58
- 'DLM_LU_Content_Queue' => $baseDir . '/src/LegacyUpgrader/ContentQueue.php',
59
- 'DLM_LU_Content_Upgrader' => $baseDir . '/src/LegacyUpgrader/ContentUpgrader.php',
60
- 'DLM_LU_Download_Queue' => $baseDir . '/src/LegacyUpgrader/DownloadQueue.php',
61
- 'DLM_LU_Download_Upgrader' => $baseDir . '/src/LegacyUpgrader/DownloadUpgrader.php',
62
- 'DLM_LU_Message' => $baseDir . '/src/LegacyUpgrader/Message.php',
63
- 'DLM_LU_Page' => $baseDir . '/src/LegacyUpgrader/Page.php',
64
- 'DLM_Log_Export_CSV' => $baseDir . '/src/Logs/LogExportCSV.php',
65
- 'DLM_Log_Filters' => $baseDir . '/src/Logs/LogFilters.php',
66
- 'DLM_Log_Item' => $baseDir . '/src/Logs/LogItem.php',
67
- 'DLM_Log_Item_Repository' => $baseDir . '/src/Logs/LogItemRepository.php',
68
- 'DLM_Log_Page' => $baseDir . '/src/Logs/LogPage.php',
69
- 'DLM_Logging' => $baseDir . '/src/Logs/Logging.php',
70
- 'DLM_Logging_List_Table' => $baseDir . '/src/Logs/LoggingListTable.php',
71
- 'DLM_Post_Type_Manager' => $baseDir . '/src/PostTypeManager.php',
72
- 'DLM_Product' => $baseDir . '/src/Product/Product.php',
73
- 'DLM_Product_Error_Handler' => $baseDir . '/src/Product/ProductErrorHandler.php',
74
- 'DLM_Product_License' => $baseDir . '/src/Product/ProductLicense.php',
75
- 'DLM_Product_Manager' => $baseDir . '/src/Product/ProductManager.php',
76
- 'DLM_Reports_Ajax' => $baseDir . '/src/Admin/Reports/Ajax.php',
77
- 'DLM_Reports_Chart' => $baseDir . '/src/Admin/Reports/Chart.php',
78
- 'DLM_Reports_Page' => $baseDir . '/src/Admin/Reports/Page.php',
79
- 'DLM_Search' => $baseDir . '/src/Search.php',
80
- 'DLM_Services' => $baseDir . '/src/Services.php',
81
- 'DLM_Settings_Helper' => $baseDir . '/src/Admin/Settings/SettingsHelper.php',
82
- 'DLM_Settings_Page' => $baseDir . '/src/Admin/Settings/Page.php',
83
- 'DLM_Shortcodes' => $baseDir . '/src/Shortcodes.php',
84
- 'DLM_Taxonomy_Manager' => $baseDir . '/src/TaxonomyManager.php',
85
- 'DLM_Template_Handler' => $baseDir . '/src/TemplateHandler.php',
86
- 'DLM_Transient_Manager' => $baseDir . '/src/TransientManager.php',
87
- 'DLM_Upgrade_Manager' => $baseDir . '/src/UpgradeManager.php',
88
- 'DLM_Utils' => $baseDir . '/src/Utils.php',
89
- 'DLM_Version_Manager' => $baseDir . '/src/Version/VersionManager.php',
90
- 'DLM_Version_Repository' => $baseDir . '/src/Version/VersionRepository.php',
91
- 'DLM_View_Manager' => $baseDir . '/src/Admin/ViewManager.php',
92
- 'DLM_Widget_Downloads' => $baseDir . '/src/Widgets/Downloads.php',
93
- 'DLM_Widget_Manager' => $baseDir . '/src/Widgets/Manager.php',
94
- 'DLM_WordPress_Download_Repository' => $baseDir . '/src/Download/WordPressDownloadRepository.php',
95
- 'DLM_WordPress_Log_Item_Repository' => $baseDir . '/src/Logs/WordPressLogItemRepository.php',
96
- 'DLM_WordPress_Version_Repository' => $baseDir . '/src/Version/WordPressVersionRepository.php',
97
- 'DateTimeImmutable' => $baseDir . '/src/Polyfill/DateTimeImmutable/DateTimeImmutable.php',
98
- 'DateTimeInterface' => $baseDir . '/src/Polyfill/DateTimeImmutable/DateTimeInterface.php',
99
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Address' => $baseDir . '/src/Dependencies/PayPal/Api/Address.php',
100
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Agreement' => $baseDir . '/src/Dependencies/PayPal/Api/Agreement.php',
101
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementDetails' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementDetails.php',
102
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementStateDescriptor' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementStateDescriptor.php',
103
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransaction' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementTransaction.php',
104
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransactions' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementTransactions.php',
105
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AlternatePayment' => $baseDir . '/src/Dependencies/PayPal/Api/AlternatePayment.php',
106
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Amount' => $baseDir . '/src/Dependencies/PayPal/Api/Amount.php',
107
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Authorization' => $baseDir . '/src/Dependencies/PayPal/Api/Authorization.php',
108
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccount' => $baseDir . '/src/Dependencies/PayPal/Api/BankAccount.php',
109
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccountsList' => $baseDir . '/src/Dependencies/PayPal/Api/BankAccountsList.php',
110
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankToken' => $baseDir . '/src/Dependencies/PayPal/Api/BankToken.php',
111
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BaseAddress' => $baseDir . '/src/Dependencies/PayPal/Api/BaseAddress.php',
112
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Billing' => $baseDir . '/src/Dependencies/PayPal/Api/Billing.php',
113
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingAgreementToken' => $baseDir . '/src/Dependencies/PayPal/Api/BillingAgreementToken.php',
114
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingInfo' => $baseDir . '/src/Dependencies/PayPal/Api/BillingInfo.php',
115
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CancelNotification' => $baseDir . '/src/Dependencies/PayPal/Api/CancelNotification.php',
116
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Capture' => $baseDir . '/src/Dependencies/PayPal/Api/Capture.php',
117
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccount' => $baseDir . '/src/Dependencies/PayPal/Api/CarrierAccount.php',
118
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccountToken' => $baseDir . '/src/Dependencies/PayPal/Api/CarrierAccountToken.php',
119
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CartBase' => $baseDir . '/src/Dependencies/PayPal/Api/CartBase.php',
120
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ChargeModel' => $baseDir . '/src/Dependencies/PayPal/Api/ChargeModel.php',
121
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Cost' => $baseDir . '/src/Dependencies/PayPal/Api/Cost.php',
122
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CountryCode' => $baseDir . '/src/Dependencies/PayPal/Api/CountryCode.php',
123
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreateProfileResponse' => $baseDir . '/src/Dependencies/PayPal/Api/CreateProfileResponse.php',
124
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Credit' => $baseDir . '/src/Dependencies/PayPal/Api/Credit.php',
125
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCard' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCard.php',
126
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardHistory' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardHistory.php',
127
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardList' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardList.php',
128
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardToken' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardToken.php',
129
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditFinancingOffered' => $baseDir . '/src/Dependencies/PayPal/Api/CreditFinancingOffered.php',
130
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Currency' => $baseDir . '/src/Dependencies/PayPal/Api/Currency.php',
131
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CurrencyConversion' => $baseDir . '/src/Dependencies/PayPal/Api/CurrencyConversion.php',
132
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CustomAmount' => $baseDir . '/src/Dependencies/PayPal/Api/CustomAmount.php',
133
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\DetailedRefund' => $baseDir . '/src/Dependencies/PayPal/Api/DetailedRefund.php',
134
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Details' => $baseDir . '/src/Dependencies/PayPal/Api/Details.php',
135
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Error' => $baseDir . '/src/Dependencies/PayPal/Api/Error.php',
136
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ErrorDetails' => $baseDir . '/src/Dependencies/PayPal/Api/ErrorDetails.php',
137
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExtendedBankAccount' => $baseDir . '/src/Dependencies/PayPal/Api/ExtendedBankAccount.php',
138
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExternalFunding' => $baseDir . '/src/Dependencies/PayPal/Api/ExternalFunding.php',
139
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FileAttachment' => $baseDir . '/src/Dependencies/PayPal/Api/FileAttachment.php',
140
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FlowConfig' => $baseDir . '/src/Dependencies/PayPal/Api/FlowConfig.php',
141
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FmfDetails' => $baseDir . '/src/Dependencies/PayPal/Api/FmfDetails.php',
142
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingDetail' => $baseDir . '/src/Dependencies/PayPal/Api/FundingDetail.php',
143
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingInstrument' => $baseDir . '/src/Dependencies/PayPal/Api/FundingInstrument.php',
144
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingOption' => $baseDir . '/src/Dependencies/PayPal/Api/FundingOption.php',
145
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingSource' => $baseDir . '/src/Dependencies/PayPal/Api/FundingSource.php',
146
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FuturePayment' => $baseDir . '/src/Dependencies/PayPal/Api/FuturePayment.php',
147
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\HyperSchema' => $baseDir . '/src/Dependencies/PayPal/Api/HyperSchema.php',
148
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Image' => $baseDir . '/src/Dependencies/PayPal/Api/Image.php',
149
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Incentive' => $baseDir . '/src/Dependencies/PayPal/Api/Incentive.php',
150
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InputFields' => $baseDir . '/src/Dependencies/PayPal/Api/InputFields.php',
151
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentInfo' => $baseDir . '/src/Dependencies/PayPal/Api/InstallmentInfo.php',
152
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentOption' => $baseDir . '/src/Dependencies/PayPal/Api/InstallmentOption.php',
153
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Invoice' => $baseDir . '/src/Dependencies/PayPal/Api/Invoice.php',
154
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceAddress' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceAddress.php',
155
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceItem' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceItem.php',
156
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceNumber' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceNumber.php',
157
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceSearchResponse' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceSearchResponse.php',
158
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Item' => $baseDir . '/src/Dependencies/PayPal/Api/Item.php',
159
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ItemList' => $baseDir . '/src/Dependencies/PayPal/Api/ItemList.php',
160
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Links' => $baseDir . '/src/Dependencies/PayPal/Api/Links.php',
161
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Measurement' => $baseDir . '/src/Dependencies/PayPal/Api/Measurement.php',
162
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantInfo' => $baseDir . '/src/Dependencies/PayPal/Api/MerchantInfo.php',
163
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantPreferences' => $baseDir . '/src/Dependencies/PayPal/Api/MerchantPreferences.php',
164
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Metadata' => $baseDir . '/src/Dependencies/PayPal/Api/Metadata.php',
165
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\NameValuePair' => $baseDir . '/src/Dependencies/PayPal/Api/NameValuePair.php',
166
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Notification' => $baseDir . '/src/Dependencies/PayPal/Api/Notification.php',
167
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdAddress' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdAddress.php',
168
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdError' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdError.php',
169
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdSession' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdSession.php',
170
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdTokeninfo' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdTokeninfo.php',
171
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdUserinfo' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdUserinfo.php',
172
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Order' => $baseDir . '/src/Dependencies/PayPal/Api/Order.php',
173
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OverrideChargeModel' => $baseDir . '/src/Dependencies/PayPal/Api/OverrideChargeModel.php',
174
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Participant' => $baseDir . '/src/Dependencies/PayPal/Api/Participant.php',
175
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Patch' => $baseDir . '/src/Dependencies/PayPal/Api/Patch.php',
176
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PatchRequest' => $baseDir . '/src/Dependencies/PayPal/Api/PatchRequest.php',
177
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payee' => $baseDir . '/src/Dependencies/PayPal/Api/Payee.php',
178
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payer' => $baseDir . '/src/Dependencies/PayPal/Api/Payer.php',
179
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayerInfo' => $baseDir . '/src/Dependencies/PayPal/Api/PayerInfo.php',
180
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payment' => $baseDir . '/src/Dependencies/PayPal/Api/Payment.php',
181
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCard' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentCard.php',
182
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCardToken' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentCardToken.php',
183
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDefinition' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentDefinition.php',
184
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDetail' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentDetail.php',
185
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentExecution' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentExecution.php',
186
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentHistory' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentHistory.php',
187
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentInstruction' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentInstruction.php',
188
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentOptions' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentOptions.php',
189
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentSummary' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentSummary.php',
190
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentTerm' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentTerm.php',
191
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payout' => $baseDir . '/src/Dependencies/PayPal/Api/Payout.php',
192
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatch' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutBatch.php',
193
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatchHeader' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutBatchHeader.php',
194
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItem' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutItem.php',
195
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItemDetails' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutItemDetails.php',
196
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutSenderBatchHeader' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutSenderBatchHeader.php',
197
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Phone' => $baseDir . '/src/Dependencies/PayPal/Api/Phone.php',
198
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Plan' => $baseDir . '/src/Dependencies/PayPal/Api/Plan.php',
199
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PlanList' => $baseDir . '/src/Dependencies/PayPal/Api/PlanList.php',
200
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PotentialPayerInfo' => $baseDir . '/src/Dependencies/PayPal/Api/PotentialPayerInfo.php',
201
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Presentation' => $baseDir . '/src/Dependencies/PayPal/Api/Presentation.php',
202
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PrivateLabelCard' => $baseDir . '/src/Dependencies/PayPal/Api/PrivateLabelCard.php',
203
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ProcessorResponse' => $baseDir . '/src/Dependencies/PayPal/Api/ProcessorResponse.php',
204
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RecipientBankingInstruction' => $baseDir . '/src/Dependencies/PayPal/Api/RecipientBankingInstruction.php',
205
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RedirectUrls' => $baseDir . '/src/Dependencies/PayPal/Api/RedirectUrls.php',
206
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Refund' => $baseDir . '/src/Dependencies/PayPal/Api/Refund.php',
207
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundDetail' => $baseDir . '/src/Dependencies/PayPal/Api/RefundDetail.php',
208
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundRequest' => $baseDir . '/src/Dependencies/PayPal/Api/RefundRequest.php',
209
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RelatedResources' => $baseDir . '/src/Dependencies/PayPal/Api/RelatedResources.php',
210
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Sale' => $baseDir . '/src/Dependencies/PayPal/Api/Sale.php',
211
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Search' => $baseDir . '/src/Dependencies/PayPal/Api/Search.php',
212
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingAddress' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingAddress.php',
213
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingCost' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingCost.php',
214
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingInfo' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingInfo.php',
215
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Tax' => $baseDir . '/src/Dependencies/PayPal/Api/Tax.php',
216
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Template' => $baseDir . '/src/Dependencies/PayPal/Api/Template.php',
217
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateData' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateData.php',
218
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettings' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateSettings.php',
219
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettingsMetadata' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateSettingsMetadata.php',
220
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Templates' => $baseDir . '/src/Dependencies/PayPal/Api/Templates.php',
221
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Terms' => $baseDir . '/src/Dependencies/PayPal/Api/Terms.php',
222
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transaction' => $baseDir . '/src/Dependencies/PayPal/Api/Transaction.php',
223
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TransactionBase' => $baseDir . '/src/Dependencies/PayPal/Api/TransactionBase.php',
224
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transactions' => $baseDir . '/src/Dependencies/PayPal/Api/Transactions.php',
225
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignature' => $baseDir . '/src/Dependencies/PayPal/Api/VerifyWebhookSignature.php',
226
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignatureResponse' => $baseDir . '/src/Dependencies/PayPal/Api/VerifyWebhookSignatureResponse.php',
227
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebProfile' => $baseDir . '/src/Dependencies/PayPal/Api/WebProfile.php',
228
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Webhook' => $baseDir . '/src/Dependencies/PayPal/Api/Webhook.php',
229
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEvent' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEvent.php',
230
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventList.php',
231
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventType' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventType.php',
232
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventTypeList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventTypeList.php',
233
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookList.php',
234
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Auth\\OAuthTokenCredential' => $baseDir . '/src/Dependencies/PayPal/Auth/OAuthTokenCredential.php',
235
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Cache\\AuthorizationCache' => $baseDir . '/src/Dependencies/PayPal/Cache/AuthorizationCache.php',
236
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ArrayUtil' => $baseDir . '/src/Dependencies/PayPal/Common/ArrayUtil.php',
237
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalModel' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalModel.php',
238
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalResourceModel' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalResourceModel.php',
239
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalUserAgent' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalUserAgent.php',
240
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ReflectionUtil' => $baseDir . '/src/Dependencies/PayPal/Common/ReflectionUtil.php',
241
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Converter\\FormatConverter' => $baseDir . '/src/Dependencies/PayPal/Converter/FormatConverter.php',
242
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConfigManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalConfigManager.php',
243
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConstants' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalConstants.php',
244
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalCredentialManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalCredentialManager.php',
245
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConfig' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalHttpConfig.php',
246
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConnection' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalHttpConnection.php',
247
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalLoggingManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalLoggingManager.php',
248
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConfigurationException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalConfigurationException.php',
249
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConnectionException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalConnectionException.php',
250
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalInvalidCredentialException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalInvalidCredentialException.php',
251
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalMissingCredentialException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalMissingCredentialException.php',
252
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\IPayPalHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/IPayPalHandler.php',
253
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\OauthHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/OauthHandler.php',
254
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\RestHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/RestHandler.php',
255
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalDefaultLogFactory' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalDefaultLogFactory.php',
256
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogFactory' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalLogFactory.php',
257
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogger' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalLogger.php',
258
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\ApiContext' => $baseDir . '/src/Dependencies/PayPal/Rest/ApiContext.php',
259
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\IResource' => $baseDir . '/src/Dependencies/PayPal/Rest/IResource.php',
260
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Security\\Cipher' => $baseDir . '/src/Dependencies/PayPal/Security/Cipher.php',
261
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Transport\\PayPalRestCall' => $baseDir . '/src/Dependencies/PayPal/Transport/PayPalRestCall.php',
262
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\ArgumentValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/ArgumentValidator.php',
263
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\JsonValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/JsonValidator.php',
264
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\NumericValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/NumericValidator.php',
265
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\UrlValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/UrlValidator.php',
266
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Container' => $baseDir . '/src/Dependencies/Pimple/Container.php',
267
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\ExpectedInvokableException' => $baseDir . '/src/Dependencies/Pimple/Exception/ExpectedInvokableException.php',
268
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\FrozenServiceException' => $baseDir . '/src/Dependencies/Pimple/Exception/FrozenServiceException.php',
269
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\InvalidServiceIdentifierException' => $baseDir . '/src/Dependencies/Pimple/Exception/InvalidServiceIdentifierException.php',
270
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\UnknownIdentifierException' => $baseDir . '/src/Dependencies/Pimple/Exception/UnknownIdentifierException.php',
271
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\Container' => $baseDir . '/src/Dependencies/Pimple/Psr11/Container.php',
272
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\ServiceLocator' => $baseDir . '/src/Dependencies/Pimple/Psr11/ServiceLocator.php',
273
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceIterator' => $baseDir . '/src/Dependencies/Pimple/ServiceIterator.php',
274
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' => $baseDir . '/src/Dependencies/Pimple/ServiceProviderInterface.php',
275
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Invokable' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/Invokable.php',
276
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\NonInvokable' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/NonInvokable.php',
277
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/PimpleServiceProvider.php',
278
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Service' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/Service.php',
279
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => $baseDir . '/src/Dependencies/Pimple/Tests/PimpleServiceProviderInterfaceTest.php',
280
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleTest' => $baseDir . '/src/Dependencies/Pimple/Tests/PimpleTest.php',
281
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ContainerTest' => $baseDir . '/src/Dependencies/Pimple/Tests/Psr11/ContainerTest.php',
282
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ServiceLocatorTest' => $baseDir . '/src/Dependencies/Pimple/Tests/Psr11/ServiceLocatorTest.php',
283
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\ServiceIteratorTest' => $baseDir . '/src/Dependencies/Pimple/Tests/ServiceIteratorTest.php',
284
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
285
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerInterface.php',
286
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
287
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\AbstractLogger' => $baseDir . '/src/Dependencies/Psr/Log/AbstractLogger.php',
288
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\InvalidArgumentException' => $baseDir . '/src/Dependencies/Psr/Log/InvalidArgumentException.php',
289
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LogLevel' => $baseDir . '/src/Dependencies/Psr/Log/LogLevel.php',
290
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareInterface' => $baseDir . '/src/Dependencies/Psr/Log/LoggerAwareInterface.php',
291
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareTrait' => $baseDir . '/src/Dependencies/Psr/Log/LoggerAwareTrait.php',
292
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerInterface' => $baseDir . '/src/Dependencies/Psr/Log/LoggerInterface.php',
293
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerTrait' => $baseDir . '/src/Dependencies/Psr/Log/LoggerTrait.php',
294
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\NullLogger' => $baseDir . '/src/Dependencies/Psr/Log/NullLogger.php',
295
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\DummyTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
296
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
297
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
298
- 'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => $baseDir . '/src/Shop/Access/Manager.php',
299
- 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => $baseDir . '/src/Shop/Admin/DownloadOption.php',
300
- 'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => $baseDir . '/src/Shop/Admin/Fields/GatewayOverview.php',
301
- 'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => $baseDir . '/src/Shop/Admin/OrderTable.php',
302
- 'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => $baseDir . '/src/Shop/Admin/Pages/Orders.php',
303
- 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => $baseDir . '/src/Shop/Admin/ProductTableColumns.php',
304
- 'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => $baseDir . '/src/Shop/Admin/WritePanels.php',
305
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => $baseDir . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
306
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => $baseDir . '/src/Shop/Ajax/Ajax.php',
307
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\Manager' => $baseDir . '/src/Shop/Ajax/Manager.php',
308
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\PlaceOrder' => $baseDir . '/src/Shop/Ajax/PlaceOrder.php',
309
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Cart' => $baseDir . '/src/Shop/Cart/Cart.php',
310
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Coupon' => $baseDir . '/src/Shop/Cart/Coupon.php',
311
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Hooks' => $baseDir . '/src/Shop/Cart/Hooks.php',
312
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Factory' => $baseDir . '/src/Shop/Cart/Item/Factory.php',
313
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Item' => $baseDir . '/src/Shop/Cart/Item/Item.php',
314
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Manager' => $baseDir . '/src/Shop/Cart/Manager.php',
315
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\Field' => $baseDir . '/src/Shop/Checkout/Field.php',
316
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Manager' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Manager.php',
317
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\ExecutePaymentListener' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php',
318
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\PayPalGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php',
319
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
320
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Result.php',
321
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
322
- 'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => $baseDir . '/src/Shop/Email/Handler.php',
323
- 'Never5\\DownloadMonitor\\Shop\\Email\\Message' => $baseDir . '/src/Shop/Email/Message.php',
324
- 'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => $baseDir . '/src/Shop/Email/VarParser.php',
325
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Country' => $baseDir . '/src/Shop/Helper/Country.php',
326
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Currency' => $baseDir . '/src/Shop/Helper/Currency.php',
327
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Format' => $baseDir . '/src/Shop/Helper/Format.php',
328
- 'Never5\\DownloadMonitor\\Shop\\Order\\Factory' => $baseDir . '/src/Shop/Order/Factory.php',
329
- 'Never5\\DownloadMonitor\\Shop\\Order\\Manager' => $baseDir . '/src/Shop/Order/Manager.php',
330
- 'Never5\\DownloadMonitor\\Shop\\Order\\Order' => $baseDir . '/src/Shop/Order/Order.php',
331
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCoupon' => $baseDir . '/src/Shop/Order/OrderCoupon.php',
332
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCustomer' => $baseDir . '/src/Shop/Order/OrderCustomer.php',
333
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderItem' => $baseDir . '/src/Shop/Order/OrderItem.php',
334
- 'Never5\\DownloadMonitor\\Shop\\Order\\Repository' => $baseDir . '/src/Shop/Order/Repository.php',
335
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Factory' => $baseDir . '/src/Shop/Order/Status/Factory.php',
336
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Manager' => $baseDir . '/src/Shop/Order/Status/Manager.php',
337
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\OrderStatus' => $baseDir . '/src/Shop/Order/Status/OrderStatus.php',
338
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\Factory' => $baseDir . '/src/Shop/Order/Transaction/Factory.php',
339
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => $baseDir . '/src/Shop/Order/Transaction/OrderTransaction.php',
340
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => $baseDir . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
341
- 'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => $baseDir . '/src/Shop/Order/WordPressRepository.php',
342
- 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => $baseDir . '/src/Shop/Product/Factory.php',
343
- 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => $baseDir . '/src/Shop/Product/Product.php',
344
- 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => $baseDir . '/src/Shop/Product/Repository.php',
345
- 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => $baseDir . '/src/Shop/Product/WordPressRepository.php',
346
- 'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => $baseDir . '/src/Shop/Services/ServiceProvider.php',
347
- 'Never5\\DownloadMonitor\\Shop\\Services\\Services' => $baseDir . '/src/Shop/Services/Services.php',
348
- 'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => $baseDir . '/src/Shop/Session/Cookie.php',
349
- 'Never5\\DownloadMonitor\\Shop\\Session\\Factory' => $baseDir . '/src/Shop/Session/Factory.php',
350
- 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Factory' => $baseDir . '/src/Shop/Session/Item/Factory.php',
351
- 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Item' => $baseDir . '/src/Shop/Session/Item/Item.php',
352
- 'Never5\\DownloadMonitor\\Shop\\Session\\Manager' => $baseDir . '/src/Shop/Session/Manager.php',
353
- 'Never5\\DownloadMonitor\\Shop\\Session\\Repository' => $baseDir . '/src/Shop/Session/Repository.php',
354
- 'Never5\\DownloadMonitor\\Shop\\Session\\Session' => $baseDir . '/src/Shop/Session/Session.php',
355
- 'Never5\\DownloadMonitor\\Shop\\Session\\WordPressRepository' => $baseDir . '/src/Shop/Session/WordPressRepository.php',
356
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Buy' => $baseDir . '/src/Shop/Shortcode/Buy.php',
357
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Cart' => $baseDir . '/src/Shop/Shortcode/Cart.php',
358
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Checkout' => $baseDir . '/src/Shop/Shortcode/Checkout.php',
359
- 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxClassManager' => $baseDir . '/src/Shop/Tax/TaxClassManager.php',
360
- 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => $baseDir . '/src/Shop/Tax/TaxRate.php',
361
- 'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => $baseDir . '/src/Shop/Util/Assets.php',
362
- 'Never5\\DownloadMonitor\\Shop\\Util\\Page' => $baseDir . '/src/Shop/Util/Page.php',
363
- 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => $baseDir . '/src/Shop/Util/PostType.php',
364
- 'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => $baseDir . '/src/Shop/Util/Redirect.php',
365
- 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => $baseDir . '/src/Shop/Util/TemplateInjector.php',
366
- 'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => $baseDir . '/src/Util/ExtensionLoader.php',
367
- 'Never5\\DownloadMonitor\\Util\\Onboarding' => $baseDir . '/src/Util/Onboarding.php',
368
- 'Never5\\DownloadMonitor\\Util\\PageCreator' => $baseDir . '/src/Util/PageCreator.php',
369
- 'WP_DLM' => $baseDir . '/src/DLM.php',
370
- 'DLM_Admin_Helper' => $baseDir . '/src/Admin/class-dlm-admin-helper.php',
371
- 'DLM_Uninstall' => $baseDir . '/includes/admin/uninstall/class-dlm-uninstall.php',
372
- );
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'DLM_Admin' => $baseDir . '/src/Admin/Admin.php',
10
+ 'DLM_Admin_Dashboard' => $baseDir . '/src/Admin/Dashboard.php',
11
+ 'DLM_Admin_Extensions' => $baseDir . '/src/Admin/Extensions.php',
12
+ 'DLM_Admin_Fields_Field' => $baseDir . '/src/Admin/Settings/Fields/Field.php',
13
+ 'DLM_Admin_Fields_Field_ActionButton' => $baseDir . '/src/Admin/Settings/Fields/ActionButton.php',
14
+ 'DLM_Admin_Fields_Field_Checkbox' => $baseDir . '/src/Admin/Settings/Fields/Checkbox.php',
15
+ 'DLM_Admin_Fields_Field_Desc' => $baseDir . '/src/Admin/Settings/Fields/Desc.php',
16
+ 'DLM_Admin_Fields_Field_Factory' => $baseDir . '/src/Admin/Settings/Fields/FieldFactory.php',
17
+ 'DLM_Admin_Fields_Field_Lazy_Select' => $baseDir . '/src/Admin/Settings/Fields/LazySelect.php',
18
+ 'DLM_Admin_Fields_Field_Password' => $baseDir . '/src/Admin/Settings/Fields/Password.php',
19
+ 'DLM_Admin_Fields_Field_Select' => $baseDir . '/src/Admin/Settings/Fields/Select.php',
20
+ 'DLM_Admin_Fields_Field_Text' => $baseDir . '/src/Admin/Settings/Fields/Text.php',
21
+ 'DLM_Admin_Fields_Field_Textarea' => $baseDir . '/src/Admin/Settings/Fields/Textarea.php',
22
+ 'DLM_Admin_Fields_Field_Title' => $baseDir . '/src/Admin/Settings/Fields/Title.php',
23
+ 'DLM_Admin_Media_Browser' => $baseDir . '/src/Admin/MediaBrowser.php',
24
+ 'DLM_Admin_Media_Insert' => $baseDir . '/src/Admin/MediaInsert.php',
25
+ 'DLM_Admin_Scripts' => $baseDir . '/src/Admin/AdminScripts.php',
26
+ 'DLM_Admin_Settings' => $baseDir . '/src/Admin/Settings/Settings.php',
27
+ 'DLM_Admin_Writepanels' => $baseDir . '/src/Admin/WritePanels.php',
28
+ 'DLM_Admin_OptionsUpsells' => $baseDir . '/src/Admin/OptionsUpsells.php',
29
+ 'DLM_Ajax' => $baseDir . '/src/Ajax/Ajax.php',
30
+ 'DLM_Ajax_CreatePage' => $baseDir . '/src/Ajax/CreatePage.php',
31
+ 'DLM_Ajax_GetDownloads' => $baseDir . '/src/Ajax/GetDownloads.php',
32
+ 'DLM_Ajax_GetVersions' => $baseDir . '/src/Ajax/GetVersions.php',
33
+ 'DLM_Ajax_Handler' => $baseDir . '/src/AjaxHandler.php',
34
+ 'DLM_Ajax_Manager' => $baseDir . '/src/Ajax/Manager.php',
35
+ 'DLM_Category_Walker' => $baseDir . '/src/Admin/CategoryWalker.php',
36
+ 'DLM_Constants' => $baseDir . '/src/Constants.php',
37
+ 'DLM_Cookie_Manager' => $baseDir . '/src/CookieManager.php',
38
+ 'DLM_Custom_Actions' => $baseDir . '/src/Admin/CustomActions.php',
39
+ 'DLM_Custom_Columns' => $baseDir . '/src/Admin/CustomColumns.php',
40
+ 'DLM_Custom_Labels' => $baseDir . '/src/Admin/CustomLabels.php',
41
+ 'DLM_Debug_Logger' => $baseDir . '/src/DebugLogger.php',
42
+ 'DLM_Download' => $baseDir . '/src/Download/Download.php',
43
+ 'DLM_DownloadPreview_Config' => $baseDir . '/src/DownloadPreview/Config.php',
44
+ 'DLM_DownloadPreview_Preview' => $baseDir . '/src/DownloadPreview/Preview.php',
45
+ 'DLM_Download_Factory' => $baseDir . '/src/Download/DownloadFactory.php',
46
+ 'DLM_Download_Handler' => $baseDir . '/src/DownloadHandler.php',
47
+ 'DLM_Download_No_Access_Page_Endpoint' => $baseDir . '/src/DownloadNoAccessPageEndpoint.php',
48
+ 'DLM_Download_Repository' => $baseDir . '/src/Download/DownloadRepository.php',
49
+ 'DLM_Download_Version' => $baseDir . '/src/Version/Version.php',
50
+ 'DLM_File_Manager' => $baseDir . '/src/FileManager.php',
51
+ 'DLM_Gutenberg' => $baseDir . '/src/Gutenberg.php',
52
+ 'DLM_Hasher' => $baseDir . '/src/Hasher.php',
53
+ 'DLM_Installer' => $baseDir . '/src/Installer.php',
54
+ 'DLM_Integrations_PostTypesOrder' => $baseDir . '/src/Integrations/PostTypesOrder.php',
55
+ 'DLM_Integrations_YoastSEO' => $baseDir . '/src/Integrations/YoastSEO.php',
56
+ 'DLM_LU_Ajax' => $baseDir . '/src/LegacyUpgrader/Ajax.php',
57
+ 'DLM_LU_Checker' => $baseDir . '/src/LegacyUpgrader/Checker.php',
58
+ 'DLM_LU_Content_Queue' => $baseDir . '/src/LegacyUpgrader/ContentQueue.php',
59
+ 'DLM_LU_Content_Upgrader' => $baseDir . '/src/LegacyUpgrader/ContentUpgrader.php',
60
+ 'DLM_LU_Download_Queue' => $baseDir . '/src/LegacyUpgrader/DownloadQueue.php',
61
+ 'DLM_LU_Download_Upgrader' => $baseDir . '/src/LegacyUpgrader/DownloadUpgrader.php',
62
+ 'DLM_LU_Message' => $baseDir . '/src/LegacyUpgrader/Message.php',
63
+ 'DLM_LU_Page' => $baseDir . '/src/LegacyUpgrader/Page.php',
64
+ 'DLM_Log_Export_CSV' => $baseDir . '/src/Logs/LogExportCSV.php',
65
+ 'DLM_Log_Filters' => $baseDir . '/src/Logs/LogFilters.php',
66
+ 'DLM_Log_Item' => $baseDir . '/src/Logs/LogItem.php',
67
+ 'DLM_Log_Item_Repository' => $baseDir . '/src/Logs/LogItemRepository.php',
68
+ 'DLM_Log_Page' => $baseDir . '/src/Logs/LogPage.php',
69
+ 'DLM_Logging' => $baseDir . '/src/Logs/Logging.php',
70
+ 'DLM_Logging_List_Table' => $baseDir . '/src/Logs/LoggingListTable.php',
71
+ 'DLM_Post_Type_Manager' => $baseDir . '/src/PostTypeManager.php',
72
+ 'DLM_Product' => $baseDir . '/src/Product/Product.php',
73
+ 'DLM_Product_Error_Handler' => $baseDir . '/src/Product/ProductErrorHandler.php',
74
+ 'DLM_Product_License' => $baseDir . '/src/Product/ProductLicense.php',
75
+ 'DLM_Product_Manager' => $baseDir . '/src/Product/ProductManager.php',
76
+ 'DLM_Reports_Ajax' => $baseDir . '/src/Admin/Reports/Ajax.php',
77
+ 'DLM_Reports_Chart' => $baseDir . '/src/Admin/Reports/Chart.php',
78
+ 'DLM_Reports_Page' => $baseDir . '/src/Admin/Reports/Page.php',
79
+ 'DLM_Search' => $baseDir . '/src/Search.php',
80
+ 'DLM_Services' => $baseDir . '/src/Services.php',
81
+ 'DLM_Settings_Helper' => $baseDir . '/src/Admin/Settings/SettingsHelper.php',
82
+ 'DLM_Settings_Page' => $baseDir . '/src/Admin/Settings/Page.php',
83
+ 'DLM_Shortcodes' => $baseDir . '/src/Shortcodes.php',
84
+ 'DLM_Taxonomy_Manager' => $baseDir . '/src/TaxonomyManager.php',
85
+ 'DLM_Template_Handler' => $baseDir . '/src/TemplateHandler.php',
86
+ 'DLM_Transient_Manager' => $baseDir . '/src/TransientManager.php',
87
+ 'DLM_Upgrade_Manager' => $baseDir . '/src/UpgradeManager.php',
88
+ 'DLM_Utils' => $baseDir . '/src/Utils.php',
89
+ 'DLM_Version_Manager' => $baseDir . '/src/Version/VersionManager.php',
90
+ 'DLM_Version_Repository' => $baseDir . '/src/Version/VersionRepository.php',
91
+ 'DLM_View_Manager' => $baseDir . '/src/Admin/ViewManager.php',
92
+ 'DLM_Widget_Downloads' => $baseDir . '/src/Widgets/Downloads.php',
93
+ 'DLM_Widget_Manager' => $baseDir . '/src/Widgets/Manager.php',
94
+ 'DLM_WordPress_Download_Repository' => $baseDir . '/src/Download/WordPressDownloadRepository.php',
95
+ 'DLM_WordPress_Log_Item_Repository' => $baseDir . '/src/Logs/WordPressLogItemRepository.php',
96
+ 'DLM_WordPress_Version_Repository' => $baseDir . '/src/Version/WordPressVersionRepository.php',
97
+ 'DateTimeImmutable' => $baseDir . '/src/Polyfill/DateTimeImmutable/DateTimeImmutable.php',
98
+ 'DateTimeInterface' => $baseDir . '/src/Polyfill/DateTimeImmutable/DateTimeInterface.php',
99
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Address' => $baseDir . '/src/Dependencies/PayPal/Api/Address.php',
100
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Agreement' => $baseDir . '/src/Dependencies/PayPal/Api/Agreement.php',
101
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementDetails' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementDetails.php',
102
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementStateDescriptor' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementStateDescriptor.php',
103
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransaction' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementTransaction.php',
104
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransactions' => $baseDir . '/src/Dependencies/PayPal/Api/AgreementTransactions.php',
105
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AlternatePayment' => $baseDir . '/src/Dependencies/PayPal/Api/AlternatePayment.php',
106
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Amount' => $baseDir . '/src/Dependencies/PayPal/Api/Amount.php',
107
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Authorization' => $baseDir . '/src/Dependencies/PayPal/Api/Authorization.php',
108
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccount' => $baseDir . '/src/Dependencies/PayPal/Api/BankAccount.php',
109
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccountsList' => $baseDir . '/src/Dependencies/PayPal/Api/BankAccountsList.php',
110
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankToken' => $baseDir . '/src/Dependencies/PayPal/Api/BankToken.php',
111
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BaseAddress' => $baseDir . '/src/Dependencies/PayPal/Api/BaseAddress.php',
112
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Billing' => $baseDir . '/src/Dependencies/PayPal/Api/Billing.php',
113
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingAgreementToken' => $baseDir . '/src/Dependencies/PayPal/Api/BillingAgreementToken.php',
114
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingInfo' => $baseDir . '/src/Dependencies/PayPal/Api/BillingInfo.php',
115
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CancelNotification' => $baseDir . '/src/Dependencies/PayPal/Api/CancelNotification.php',
116
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Capture' => $baseDir . '/src/Dependencies/PayPal/Api/Capture.php',
117
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccount' => $baseDir . '/src/Dependencies/PayPal/Api/CarrierAccount.php',
118
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccountToken' => $baseDir . '/src/Dependencies/PayPal/Api/CarrierAccountToken.php',
119
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CartBase' => $baseDir . '/src/Dependencies/PayPal/Api/CartBase.php',
120
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ChargeModel' => $baseDir . '/src/Dependencies/PayPal/Api/ChargeModel.php',
121
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Cost' => $baseDir . '/src/Dependencies/PayPal/Api/Cost.php',
122
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CountryCode' => $baseDir . '/src/Dependencies/PayPal/Api/CountryCode.php',
123
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreateProfileResponse' => $baseDir . '/src/Dependencies/PayPal/Api/CreateProfileResponse.php',
124
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Credit' => $baseDir . '/src/Dependencies/PayPal/Api/Credit.php',
125
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCard' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCard.php',
126
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardHistory' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardHistory.php',
127
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardList' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardList.php',
128
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardToken' => $baseDir . '/src/Dependencies/PayPal/Api/CreditCardToken.php',
129
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditFinancingOffered' => $baseDir . '/src/Dependencies/PayPal/Api/CreditFinancingOffered.php',
130
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Currency' => $baseDir . '/src/Dependencies/PayPal/Api/Currency.php',
131
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CurrencyConversion' => $baseDir . '/src/Dependencies/PayPal/Api/CurrencyConversion.php',
132
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CustomAmount' => $baseDir . '/src/Dependencies/PayPal/Api/CustomAmount.php',
133
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\DetailedRefund' => $baseDir . '/src/Dependencies/PayPal/Api/DetailedRefund.php',
134
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Details' => $baseDir . '/src/Dependencies/PayPal/Api/Details.php',
135
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Error' => $baseDir . '/src/Dependencies/PayPal/Api/Error.php',
136
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ErrorDetails' => $baseDir . '/src/Dependencies/PayPal/Api/ErrorDetails.php',
137
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExtendedBankAccount' => $baseDir . '/src/Dependencies/PayPal/Api/ExtendedBankAccount.php',
138
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExternalFunding' => $baseDir . '/src/Dependencies/PayPal/Api/ExternalFunding.php',
139
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FileAttachment' => $baseDir . '/src/Dependencies/PayPal/Api/FileAttachment.php',
140
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FlowConfig' => $baseDir . '/src/Dependencies/PayPal/Api/FlowConfig.php',
141
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FmfDetails' => $baseDir . '/src/Dependencies/PayPal/Api/FmfDetails.php',
142
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingDetail' => $baseDir . '/src/Dependencies/PayPal/Api/FundingDetail.php',
143
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingInstrument' => $baseDir . '/src/Dependencies/PayPal/Api/FundingInstrument.php',
144
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingOption' => $baseDir . '/src/Dependencies/PayPal/Api/FundingOption.php',
145
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingSource' => $baseDir . '/src/Dependencies/PayPal/Api/FundingSource.php',
146
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FuturePayment' => $baseDir . '/src/Dependencies/PayPal/Api/FuturePayment.php',
147
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\HyperSchema' => $baseDir . '/src/Dependencies/PayPal/Api/HyperSchema.php',
148
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Image' => $baseDir . '/src/Dependencies/PayPal/Api/Image.php',
149
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Incentive' => $baseDir . '/src/Dependencies/PayPal/Api/Incentive.php',
150
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InputFields' => $baseDir . '/src/Dependencies/PayPal/Api/InputFields.php',
151
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentInfo' => $baseDir . '/src/Dependencies/PayPal/Api/InstallmentInfo.php',
152
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentOption' => $baseDir . '/src/Dependencies/PayPal/Api/InstallmentOption.php',
153
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Invoice' => $baseDir . '/src/Dependencies/PayPal/Api/Invoice.php',
154
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceAddress' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceAddress.php',
155
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceItem' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceItem.php',
156
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceNumber' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceNumber.php',
157
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceSearchResponse' => $baseDir . '/src/Dependencies/PayPal/Api/InvoiceSearchResponse.php',
158
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Item' => $baseDir . '/src/Dependencies/PayPal/Api/Item.php',
159
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ItemList' => $baseDir . '/src/Dependencies/PayPal/Api/ItemList.php',
160
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Links' => $baseDir . '/src/Dependencies/PayPal/Api/Links.php',
161
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Measurement' => $baseDir . '/src/Dependencies/PayPal/Api/Measurement.php',
162
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantInfo' => $baseDir . '/src/Dependencies/PayPal/Api/MerchantInfo.php',
163
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantPreferences' => $baseDir . '/src/Dependencies/PayPal/Api/MerchantPreferences.php',
164
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Metadata' => $baseDir . '/src/Dependencies/PayPal/Api/Metadata.php',
165
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\NameValuePair' => $baseDir . '/src/Dependencies/PayPal/Api/NameValuePair.php',
166
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Notification' => $baseDir . '/src/Dependencies/PayPal/Api/Notification.php',
167
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdAddress' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdAddress.php',
168
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdError' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdError.php',
169
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdSession' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdSession.php',
170
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdTokeninfo' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdTokeninfo.php',
171
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdUserinfo' => $baseDir . '/src/Dependencies/PayPal/Api/OpenIdUserinfo.php',
172
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Order' => $baseDir . '/src/Dependencies/PayPal/Api/Order.php',
173
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OverrideChargeModel' => $baseDir . '/src/Dependencies/PayPal/Api/OverrideChargeModel.php',
174
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Participant' => $baseDir . '/src/Dependencies/PayPal/Api/Participant.php',
175
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Patch' => $baseDir . '/src/Dependencies/PayPal/Api/Patch.php',
176
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PatchRequest' => $baseDir . '/src/Dependencies/PayPal/Api/PatchRequest.php',
177
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payee' => $baseDir . '/src/Dependencies/PayPal/Api/Payee.php',
178
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payer' => $baseDir . '/src/Dependencies/PayPal/Api/Payer.php',
179
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayerInfo' => $baseDir . '/src/Dependencies/PayPal/Api/PayerInfo.php',
180
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payment' => $baseDir . '/src/Dependencies/PayPal/Api/Payment.php',
181
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCard' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentCard.php',
182
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCardToken' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentCardToken.php',
183
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDefinition' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentDefinition.php',
184
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDetail' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentDetail.php',
185
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentExecution' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentExecution.php',
186
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentHistory' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentHistory.php',
187
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentInstruction' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentInstruction.php',
188
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentOptions' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentOptions.php',
189
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentSummary' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentSummary.php',
190
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentTerm' => $baseDir . '/src/Dependencies/PayPal/Api/PaymentTerm.php',
191
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payout' => $baseDir . '/src/Dependencies/PayPal/Api/Payout.php',
192
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatch' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutBatch.php',
193
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatchHeader' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutBatchHeader.php',
194
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItem' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutItem.php',
195
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItemDetails' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutItemDetails.php',
196
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutSenderBatchHeader' => $baseDir . '/src/Dependencies/PayPal/Api/PayoutSenderBatchHeader.php',
197
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Phone' => $baseDir . '/src/Dependencies/PayPal/Api/Phone.php',
198
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Plan' => $baseDir . '/src/Dependencies/PayPal/Api/Plan.php',
199
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PlanList' => $baseDir . '/src/Dependencies/PayPal/Api/PlanList.php',
200
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PotentialPayerInfo' => $baseDir . '/src/Dependencies/PayPal/Api/PotentialPayerInfo.php',
201
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Presentation' => $baseDir . '/src/Dependencies/PayPal/Api/Presentation.php',
202
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PrivateLabelCard' => $baseDir . '/src/Dependencies/PayPal/Api/PrivateLabelCard.php',
203
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ProcessorResponse' => $baseDir . '/src/Dependencies/PayPal/Api/ProcessorResponse.php',
204
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RecipientBankingInstruction' => $baseDir . '/src/Dependencies/PayPal/Api/RecipientBankingInstruction.php',
205
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RedirectUrls' => $baseDir . '/src/Dependencies/PayPal/Api/RedirectUrls.php',
206
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Refund' => $baseDir . '/src/Dependencies/PayPal/Api/Refund.php',
207
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundDetail' => $baseDir . '/src/Dependencies/PayPal/Api/RefundDetail.php',
208
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundRequest' => $baseDir . '/src/Dependencies/PayPal/Api/RefundRequest.php',
209
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RelatedResources' => $baseDir . '/src/Dependencies/PayPal/Api/RelatedResources.php',
210
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Sale' => $baseDir . '/src/Dependencies/PayPal/Api/Sale.php',
211
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Search' => $baseDir . '/src/Dependencies/PayPal/Api/Search.php',
212
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingAddress' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingAddress.php',
213
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingCost' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingCost.php',
214
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingInfo' => $baseDir . '/src/Dependencies/PayPal/Api/ShippingInfo.php',
215
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Tax' => $baseDir . '/src/Dependencies/PayPal/Api/Tax.php',
216
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Template' => $baseDir . '/src/Dependencies/PayPal/Api/Template.php',
217
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateData' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateData.php',
218
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettings' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateSettings.php',
219
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettingsMetadata' => $baseDir . '/src/Dependencies/PayPal/Api/TemplateSettingsMetadata.php',
220
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Templates' => $baseDir . '/src/Dependencies/PayPal/Api/Templates.php',
221
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Terms' => $baseDir . '/src/Dependencies/PayPal/Api/Terms.php',
222
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transaction' => $baseDir . '/src/Dependencies/PayPal/Api/Transaction.php',
223
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TransactionBase' => $baseDir . '/src/Dependencies/PayPal/Api/TransactionBase.php',
224
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transactions' => $baseDir . '/src/Dependencies/PayPal/Api/Transactions.php',
225
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignature' => $baseDir . '/src/Dependencies/PayPal/Api/VerifyWebhookSignature.php',
226
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignatureResponse' => $baseDir . '/src/Dependencies/PayPal/Api/VerifyWebhookSignatureResponse.php',
227
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebProfile' => $baseDir . '/src/Dependencies/PayPal/Api/WebProfile.php',
228
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Webhook' => $baseDir . '/src/Dependencies/PayPal/Api/Webhook.php',
229
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEvent' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEvent.php',
230
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventList.php',
231
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventType' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventType.php',
232
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventTypeList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookEventTypeList.php',
233
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookList' => $baseDir . '/src/Dependencies/PayPal/Api/WebhookList.php',
234
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Auth\\OAuthTokenCredential' => $baseDir . '/src/Dependencies/PayPal/Auth/OAuthTokenCredential.php',
235
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Cache\\AuthorizationCache' => $baseDir . '/src/Dependencies/PayPal/Cache/AuthorizationCache.php',
236
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ArrayUtil' => $baseDir . '/src/Dependencies/PayPal/Common/ArrayUtil.php',
237
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalModel' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalModel.php',
238
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalResourceModel' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalResourceModel.php',
239
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalUserAgent' => $baseDir . '/src/Dependencies/PayPal/Common/PayPalUserAgent.php',
240
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ReflectionUtil' => $baseDir . '/src/Dependencies/PayPal/Common/ReflectionUtil.php',
241
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Converter\\FormatConverter' => $baseDir . '/src/Dependencies/PayPal/Converter/FormatConverter.php',
242
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConfigManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalConfigManager.php',
243
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConstants' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalConstants.php',
244
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalCredentialManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalCredentialManager.php',
245
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConfig' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalHttpConfig.php',
246
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConnection' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalHttpConnection.php',
247
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalLoggingManager' => $baseDir . '/src/Dependencies/PayPal/Core/PayPalLoggingManager.php',
248
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConfigurationException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalConfigurationException.php',
249
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConnectionException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalConnectionException.php',
250
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalInvalidCredentialException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalInvalidCredentialException.php',
251
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalMissingCredentialException' => $baseDir . '/src/Dependencies/PayPal/Exception/PayPalMissingCredentialException.php',
252
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\IPayPalHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/IPayPalHandler.php',
253
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\OauthHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/OauthHandler.php',
254
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\RestHandler' => $baseDir . '/src/Dependencies/PayPal/Handler/RestHandler.php',
255
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalDefaultLogFactory' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalDefaultLogFactory.php',
256
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogFactory' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalLogFactory.php',
257
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogger' => $baseDir . '/src/Dependencies/PayPal/Log/PayPalLogger.php',
258
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\ApiContext' => $baseDir . '/src/Dependencies/PayPal/Rest/ApiContext.php',
259
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\IResource' => $baseDir . '/src/Dependencies/PayPal/Rest/IResource.php',
260
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Security\\Cipher' => $baseDir . '/src/Dependencies/PayPal/Security/Cipher.php',
261
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Transport\\PayPalRestCall' => $baseDir . '/src/Dependencies/PayPal/Transport/PayPalRestCall.php',
262
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\ArgumentValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/ArgumentValidator.php',
263
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\JsonValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/JsonValidator.php',
264
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\NumericValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/NumericValidator.php',
265
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\UrlValidator' => $baseDir . '/src/Dependencies/PayPal/Validation/UrlValidator.php',
266
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Container' => $baseDir . '/src/Dependencies/Pimple/Container.php',
267
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\ExpectedInvokableException' => $baseDir . '/src/Dependencies/Pimple/Exception/ExpectedInvokableException.php',
268
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\FrozenServiceException' => $baseDir . '/src/Dependencies/Pimple/Exception/FrozenServiceException.php',
269
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\InvalidServiceIdentifierException' => $baseDir . '/src/Dependencies/Pimple/Exception/InvalidServiceIdentifierException.php',
270
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\UnknownIdentifierException' => $baseDir . '/src/Dependencies/Pimple/Exception/UnknownIdentifierException.php',
271
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\Container' => $baseDir . '/src/Dependencies/Pimple/Psr11/Container.php',
272
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\ServiceLocator' => $baseDir . '/src/Dependencies/Pimple/Psr11/ServiceLocator.php',
273
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceIterator' => $baseDir . '/src/Dependencies/Pimple/ServiceIterator.php',
274
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' => $baseDir . '/src/Dependencies/Pimple/ServiceProviderInterface.php',
275
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Invokable' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/Invokable.php',
276
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\NonInvokable' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/NonInvokable.php',
277
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/PimpleServiceProvider.php',
278
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Service' => $baseDir . '/src/Dependencies/Pimple/Tests/Fixtures/Service.php',
279
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => $baseDir . '/src/Dependencies/Pimple/Tests/PimpleServiceProviderInterfaceTest.php',
280
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleTest' => $baseDir . '/src/Dependencies/Pimple/Tests/PimpleTest.php',
281
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ContainerTest' => $baseDir . '/src/Dependencies/Pimple/Tests/Psr11/ContainerTest.php',
282
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ServiceLocatorTest' => $baseDir . '/src/Dependencies/Pimple/Tests/Psr11/ServiceLocatorTest.php',
283
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\ServiceIteratorTest' => $baseDir . '/src/Dependencies/Pimple/Tests/ServiceIteratorTest.php',
284
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
285
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerInterface.php',
286
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
287
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\AbstractLogger' => $baseDir . '/src/Dependencies/Psr/Log/AbstractLogger.php',
288
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\InvalidArgumentException' => $baseDir . '/src/Dependencies/Psr/Log/InvalidArgumentException.php',
289
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LogLevel' => $baseDir . '/src/Dependencies/Psr/Log/LogLevel.php',
290
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareInterface' => $baseDir . '/src/Dependencies/Psr/Log/LoggerAwareInterface.php',
291
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareTrait' => $baseDir . '/src/Dependencies/Psr/Log/LoggerAwareTrait.php',
292
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerInterface' => $baseDir . '/src/Dependencies/Psr/Log/LoggerInterface.php',
293
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerTrait' => $baseDir . '/src/Dependencies/Psr/Log/LoggerTrait.php',
294
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\NullLogger' => $baseDir . '/src/Dependencies/Psr/Log/NullLogger.php',
295
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\DummyTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
296
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
297
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
298
+ 'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => $baseDir . '/src/Shop/Access/Manager.php',
299
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => $baseDir . '/src/Shop/Admin/DownloadOption.php',
300
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => $baseDir . '/src/Shop/Admin/Fields/GatewayOverview.php',
301
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => $baseDir . '/src/Shop/Admin/OrderTable.php',
302
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => $baseDir . '/src/Shop/Admin/Pages/Orders.php',
303
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => $baseDir . '/src/Shop/Admin/ProductTableColumns.php',
304
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => $baseDir . '/src/Shop/Admin/WritePanels.php',
305
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => $baseDir . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
306
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => $baseDir . '/src/Shop/Ajax/Ajax.php',
307
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\Manager' => $baseDir . '/src/Shop/Ajax/Manager.php',
308
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\PlaceOrder' => $baseDir . '/src/Shop/Ajax/PlaceOrder.php',
309
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Cart' => $baseDir . '/src/Shop/Cart/Cart.php',
310
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Coupon' => $baseDir . '/src/Shop/Cart/Coupon.php',
311
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Hooks' => $baseDir . '/src/Shop/Cart/Hooks.php',
312
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Factory' => $baseDir . '/src/Shop/Cart/Item/Factory.php',
313
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Item' => $baseDir . '/src/Shop/Cart/Item/Item.php',
314
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Manager' => $baseDir . '/src/Shop/Cart/Manager.php',
315
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\Field' => $baseDir . '/src/Shop/Checkout/Field.php',
316
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Manager' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Manager.php',
317
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\ExecutePaymentListener' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php',
318
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\PayPalGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php',
319
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
320
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Result.php',
321
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => $baseDir . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
322
+ 'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => $baseDir . '/src/Shop/Email/Handler.php',
323
+ 'Never5\\DownloadMonitor\\Shop\\Email\\Message' => $baseDir . '/src/Shop/Email/Message.php',
324
+ 'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => $baseDir . '/src/Shop/Email/VarParser.php',
325
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Country' => $baseDir . '/src/Shop/Helper/Country.php',
326
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Currency' => $baseDir . '/src/Shop/Helper/Currency.php',
327
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Format' => $baseDir . '/src/Shop/Helper/Format.php',
328
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Factory' => $baseDir . '/src/Shop/Order/Factory.php',
329
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Manager' => $baseDir . '/src/Shop/Order/Manager.php',
330
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Order' => $baseDir . '/src/Shop/Order/Order.php',
331
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCoupon' => $baseDir . '/src/Shop/Order/OrderCoupon.php',
332
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCustomer' => $baseDir . '/src/Shop/Order/OrderCustomer.php',
333
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderItem' => $baseDir . '/src/Shop/Order/OrderItem.php',
334
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Repository' => $baseDir . '/src/Shop/Order/Repository.php',
335
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Factory' => $baseDir . '/src/Shop/Order/Status/Factory.php',
336
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Manager' => $baseDir . '/src/Shop/Order/Status/Manager.php',
337
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\OrderStatus' => $baseDir . '/src/Shop/Order/Status/OrderStatus.php',
338
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\Factory' => $baseDir . '/src/Shop/Order/Transaction/Factory.php',
339
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => $baseDir . '/src/Shop/Order/Transaction/OrderTransaction.php',
340
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => $baseDir . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
341
+ 'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => $baseDir . '/src/Shop/Order/WordPressRepository.php',
342
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => $baseDir . '/src/Shop/Product/Factory.php',
343
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => $baseDir . '/src/Shop/Product/Product.php',
344
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => $baseDir . '/src/Shop/Product/Repository.php',
345
+ 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => $baseDir . '/src/Shop/Product/WordPressRepository.php',
346
+ 'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => $baseDir . '/src/Shop/Services/ServiceProvider.php',
347
+ 'Never5\\DownloadMonitor\\Shop\\Services\\Services' => $baseDir . '/src/Shop/Services/Services.php',
348
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => $baseDir . '/src/Shop/Session/Cookie.php',
349
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Factory' => $baseDir . '/src/Shop/Session/Factory.php',
350
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Factory' => $baseDir . '/src/Shop/Session/Item/Factory.php',
351
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Item' => $baseDir . '/src/Shop/Session/Item/Item.php',
352
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Manager' => $baseDir . '/src/Shop/Session/Manager.php',
353
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Repository' => $baseDir . '/src/Shop/Session/Repository.php',
354
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Session' => $baseDir . '/src/Shop/Session/Session.php',
355
+ 'Never5\\DownloadMonitor\\Shop\\Session\\WordPressRepository' => $baseDir . '/src/Shop/Session/WordPressRepository.php',
356
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Buy' => $baseDir . '/src/Shop/Shortcode/Buy.php',
357
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Cart' => $baseDir . '/src/Shop/Shortcode/Cart.php',
358
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Checkout' => $baseDir . '/src/Shop/Shortcode/Checkout.php',
359
+ 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxClassManager' => $baseDir . '/src/Shop/Tax/TaxClassManager.php',
360
+ 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => $baseDir . '/src/Shop/Tax/TaxRate.php',
361
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => $baseDir . '/src/Shop/Util/Assets.php',
362
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Page' => $baseDir . '/src/Shop/Util/Page.php',
363
+ 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => $baseDir . '/src/Shop/Util/PostType.php',
364
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => $baseDir . '/src/Shop/Util/Redirect.php',
365
+ 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => $baseDir . '/src/Shop/Util/TemplateInjector.php',
366
+ 'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => $baseDir . '/src/Util/ExtensionLoader.php',
367
+ 'Never5\\DownloadMonitor\\Util\\Onboarding' => $baseDir . '/src/Util/Onboarding.php',
368
+ 'Never5\\DownloadMonitor\\Util\\PageCreator' => $baseDir . '/src/Util/PageCreator.php',
369
+ 'WP_DLM' => $baseDir . '/src/DLM.php',
370
+ 'DLM_Admin_Helper' => $baseDir . '/src/Admin/class-dlm-admin-helper.php',
371
+ 'DLM_Uninstall' => $baseDir . '/includes/admin/uninstall/class-dlm-uninstall.php',
372
+ );
vendor/composer/autoload_static.php CHANGED
@@ -1,398 +1,398 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a
8
- {
9
- public static $prefixLengthsPsr4 = array (
10
- 'N' =>
11
- array (
12
- 'Never5\\DownloadMonitor\\' => 23,
13
- ),
14
- );
15
-
16
- public static $prefixDirsPsr4 = array (
17
- 'Never5\\DownloadMonitor\\' =>
18
- array (
19
- 0 => __DIR__ . '/../..' . '/src',
20
- ),
21
- );
22
-
23
- public static $classMap = array (
24
- 'DLM_Admin' => __DIR__ . '/../..' . '/src/Admin/Admin.php',
25
- 'DLM_Admin_Dashboard' => __DIR__ . '/../..' . '/src/Admin/Dashboard.php',
26
- 'DLM_Admin_Extensions' => __DIR__ . '/../..' . '/src/Admin/Extensions.php',
27
- 'DLM_Admin_Fields_Field' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Field.php',
28
- 'DLM_Admin_Fields_Field_ActionButton' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/ActionButton.php',
29
- 'DLM_Admin_Fields_Field_Checkbox' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Checkbox.php',
30
- 'DLM_Admin_Fields_Field_Desc' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Desc.php',
31
- 'DLM_Admin_Fields_Field_Factory' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/FieldFactory.php',
32
- 'DLM_Admin_Fields_Field_Lazy_Select' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/LazySelect.php',
33
- 'DLM_Admin_Fields_Field_Password' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Password.php',
34
- 'DLM_Admin_Fields_Field_Select' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Select.php',
35
- 'DLM_Admin_Fields_Field_Text' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Text.php',
36
- 'DLM_Admin_Fields_Field_Textarea' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Textarea.php',
37
- 'DLM_Admin_Fields_Field_Title' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Title.php',
38
- 'DLM_Admin_Media_Browser' => __DIR__ . '/../..' . '/src/Admin/MediaBrowser.php',
39
- 'DLM_Admin_Media_Insert' => __DIR__ . '/../..' . '/src/Admin/MediaInsert.php',
40
- 'DLM_Admin_Scripts' => __DIR__ . '/../..' . '/src/Admin/AdminScripts.php',
41
- 'DLM_Admin_Settings' => __DIR__ . '/../..' . '/src/Admin/Settings/Settings.php',
42
- 'DLM_Admin_Writepanels' => __DIR__ . '/../..' . '/src/Admin/WritePanels.php',
43
- 'DLM_Admin_OptionsUpsells' => __DIR__ . '/../..' . '/src/Admin/OptionsUpsells.php',
44
- 'DLM_Ajax' => __DIR__ . '/../..' . '/src/Ajax/Ajax.php',
45
- 'DLM_Ajax_CreatePage' => __DIR__ . '/../..' . '/src/Ajax/CreatePage.php',
46
- 'DLM_Ajax_GetDownloads' => __DIR__ . '/../..' . '/src/Ajax/GetDownloads.php',
47
- 'DLM_Ajax_GetVersions' => __DIR__ . '/../..' . '/src/Ajax/GetVersions.php',
48
- 'DLM_Ajax_Handler' => __DIR__ . '/../..' . '/src/AjaxHandler.php',
49
- 'DLM_Ajax_Manager' => __DIR__ . '/../..' . '/src/Ajax/Manager.php',
50
- 'DLM_Category_Walker' => __DIR__ . '/../..' . '/src/Admin/CategoryWalker.php',
51
- 'DLM_Constants' => __DIR__ . '/../..' . '/src/Constants.php',
52
- 'DLM_Cookie_Manager' => __DIR__ . '/../..' . '/src/CookieManager.php',
53
- 'DLM_Custom_Actions' => __DIR__ . '/../..' . '/src/Admin/CustomActions.php',
54
- 'DLM_Custom_Columns' => __DIR__ . '/../..' . '/src/Admin/CustomColumns.php',
55
- 'DLM_Custom_Labels' => __DIR__ . '/../..' . '/src/Admin/CustomLabels.php',
56
- 'DLM_Debug_Logger' => __DIR__ . '/../..' . '/src/DebugLogger.php',
57
- 'DLM_Download' => __DIR__ . '/../..' . '/src/Download/Download.php',
58
- 'DLM_DownloadPreview_Config' => __DIR__ . '/../..' . '/src/DownloadPreview/Config.php',
59
- 'DLM_DownloadPreview_Preview' => __DIR__ . '/../..' . '/src/DownloadPreview/Preview.php',
60
- 'DLM_Download_Factory' => __DIR__ . '/../..' . '/src/Download/DownloadFactory.php',
61
- 'DLM_Download_Handler' => __DIR__ . '/../..' . '/src/DownloadHandler.php',
62
- 'DLM_Download_No_Access_Page_Endpoint' => __DIR__ . '/../..' . '/src/DownloadNoAccessPageEndpoint.php',
63
- 'DLM_Download_Repository' => __DIR__ . '/../..' . '/src/Download/DownloadRepository.php',
64
- 'DLM_Download_Version' => __DIR__ . '/../..' . '/src/Version/Version.php',
65
- 'DLM_File_Manager' => __DIR__ . '/../..' . '/src/FileManager.php',
66
- 'DLM_Gutenberg' => __DIR__ . '/../..' . '/src/Gutenberg.php',
67
- 'DLM_Hasher' => __DIR__ . '/../..' . '/src/Hasher.php',
68
- 'DLM_Installer' => __DIR__ . '/../..' . '/src/Installer.php',
69
- 'DLM_Integrations_PostTypesOrder' => __DIR__ . '/../..' . '/src/Integrations/PostTypesOrder.php',
70
- 'DLM_Integrations_YoastSEO' => __DIR__ . '/../..' . '/src/Integrations/YoastSEO.php',
71
- 'DLM_LU_Ajax' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Ajax.php',
72
- 'DLM_LU_Checker' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Checker.php',
73
- 'DLM_LU_Content_Queue' => __DIR__ . '/../..' . '/src/LegacyUpgrader/ContentQueue.php',
74
- 'DLM_LU_Content_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/ContentUpgrader.php',
75
- 'DLM_LU_Download_Queue' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadQueue.php',
76
- 'DLM_LU_Download_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadUpgrader.php',
77
- 'DLM_LU_Message' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Message.php',
78
- 'DLM_LU_Page' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Page.php',
79
- 'DLM_Log_Export_CSV' => __DIR__ . '/../..' . '/src/Logs/LogExportCSV.php',
80
- 'DLM_Log_Filters' => __DIR__ . '/../..' . '/src/Logs/LogFilters.php',
81
- 'DLM_Log_Item' => __DIR__ . '/../..' . '/src/Logs/LogItem.php',
82
- 'DLM_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/LogItemRepository.php',
83
- 'DLM_Log_Page' => __DIR__ . '/../..' . '/src/Logs/LogPage.php',
84
- 'DLM_Logging' => __DIR__ . '/../..' . '/src/Logs/Logging.php',
85
- 'DLM_Logging_List_Table' => __DIR__ . '/../..' . '/src/Logs/LoggingListTable.php',
86
- 'DLM_Post_Type_Manager' => __DIR__ . '/../..' . '/src/PostTypeManager.php',
87
- 'DLM_Product' => __DIR__ . '/../..' . '/src/Product/Product.php',
88
- 'DLM_Product_Error_Handler' => __DIR__ . '/../..' . '/src/Product/ProductErrorHandler.php',
89
- 'DLM_Product_License' => __DIR__ . '/../..' . '/src/Product/ProductLicense.php',
90
- 'DLM_Product_Manager' => __DIR__ . '/../..' . '/src/Product/ProductManager.php',
91
- 'DLM_Reports_Ajax' => __DIR__ . '/../..' . '/src/Admin/Reports/Ajax.php',
92
- 'DLM_Reports_Chart' => __DIR__ . '/../..' . '/src/Admin/Reports/Chart.php',
93
- 'DLM_Reports_Page' => __DIR__ . '/../..' . '/src/Admin/Reports/Page.php',
94
- 'DLM_Search' => __DIR__ . '/../..' . '/src/Search.php',
95
- 'DLM_Services' => __DIR__ . '/../..' . '/src/Services.php',
96
- 'DLM_Settings_Helper' => __DIR__ . '/../..' . '/src/Admin/Settings/SettingsHelper.php',
97
- 'DLM_Settings_Page' => __DIR__ . '/../..' . '/src/Admin/Settings/Page.php',
98
- 'DLM_Shortcodes' => __DIR__ . '/../..' . '/src/Shortcodes.php',
99
- 'DLM_Taxonomy_Manager' => __DIR__ . '/../..' . '/src/TaxonomyManager.php',
100
- 'DLM_Template_Handler' => __DIR__ . '/../..' . '/src/TemplateHandler.php',
101
- 'DLM_Transient_Manager' => __DIR__ . '/../..' . '/src/TransientManager.php',
102
- 'DLM_Upgrade_Manager' => __DIR__ . '/../..' . '/src/UpgradeManager.php',
103
- 'DLM_Utils' => __DIR__ . '/../..' . '/src/Utils.php',
104
- 'DLM_Version_Manager' => __DIR__ . '/../..' . '/src/Version/VersionManager.php',
105
- 'DLM_Version_Repository' => __DIR__ . '/../..' . '/src/Version/VersionRepository.php',
106
- 'DLM_View_Manager' => __DIR__ . '/../..' . '/src/Admin/ViewManager.php',
107
- 'DLM_Widget_Downloads' => __DIR__ . '/../..' . '/src/Widgets/Downloads.php',
108
- 'DLM_Widget_Manager' => __DIR__ . '/../..' . '/src/Widgets/Manager.php',
109
- 'DLM_WordPress_Download_Repository' => __DIR__ . '/../..' . '/src/Download/WordPressDownloadRepository.php',
110
- 'DLM_WordPress_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/WordPressLogItemRepository.php',
111
- 'DLM_WordPress_Version_Repository' => __DIR__ . '/../..' . '/src/Version/WordPressVersionRepository.php',
112
- 'DateTimeImmutable' => __DIR__ . '/../..' . '/src/Polyfill/DateTimeImmutable/DateTimeImmutable.php',
113
- 'DateTimeInterface' => __DIR__ . '/../..' . '/src/Polyfill/DateTimeImmutable/DateTimeInterface.php',
114
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Address' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Address.php',
115
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Agreement' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Agreement.php',
116
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementDetails.php',
117
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementStateDescriptor' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementStateDescriptor.php',
118
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransaction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementTransaction.php',
119
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransactions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementTransactions.php',
120
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AlternatePayment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AlternatePayment.php',
121
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Amount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Amount.php',
122
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Authorization' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Authorization.php',
123
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankAccount.php',
124
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccountsList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankAccountsList.php',
125
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankToken.php',
126
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BaseAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BaseAddress.php',
127
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Billing' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Billing.php',
128
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingAgreementToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BillingAgreementToken.php',
129
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BillingInfo.php',
130
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CancelNotification' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CancelNotification.php',
131
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Capture' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Capture.php',
132
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CarrierAccount.php',
133
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccountToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CarrierAccountToken.php',
134
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CartBase' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CartBase.php',
135
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ChargeModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ChargeModel.php',
136
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Cost' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Cost.php',
137
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CountryCode' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CountryCode.php',
138
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreateProfileResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreateProfileResponse.php',
139
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Credit' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Credit.php',
140
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCard.php',
141
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardHistory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardHistory.php',
142
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardList.php',
143
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardToken.php',
144
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditFinancingOffered' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditFinancingOffered.php',
145
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Currency' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Currency.php',
146
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CurrencyConversion' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CurrencyConversion.php',
147
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CustomAmount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CustomAmount.php',
148
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\DetailedRefund' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/DetailedRefund.php',
149
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Details' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Details.php',
150
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Error' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Error.php',
151
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ErrorDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ErrorDetails.php',
152
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExtendedBankAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ExtendedBankAccount.php',
153
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExternalFunding' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ExternalFunding.php',
154
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FileAttachment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FileAttachment.php',
155
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FlowConfig' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FlowConfig.php',
156
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FmfDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FmfDetails.php',
157
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingDetail.php',
158
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingInstrument' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingInstrument.php',
159
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingOption' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingOption.php',
160
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingSource' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingSource.php',
161
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FuturePayment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FuturePayment.php',
162
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\HyperSchema' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/HyperSchema.php',
163
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Image' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Image.php',
164
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Incentive' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Incentive.php',
165
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InputFields' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InputFields.php',
166
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InstallmentInfo.php',
167
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentOption' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InstallmentOption.php',
168
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Invoice' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Invoice.php',
169
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceAddress.php',
170
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceItem' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceItem.php',
171
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceNumber' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceNumber.php',
172
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceSearchResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceSearchResponse.php',
173
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Item' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Item.php',
174
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ItemList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ItemList.php',
175
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Links' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Links.php',
176
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Measurement' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Measurement.php',
177
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/MerchantInfo.php',
178
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantPreferences' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/MerchantPreferences.php',
179
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Metadata' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Metadata.php',
180
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\NameValuePair' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/NameValuePair.php',
181
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Notification' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Notification.php',
182
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdAddress.php',
183
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdError' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdError.php',
184
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdSession' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdSession.php',
185
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdTokeninfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdTokeninfo.php',
186
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdUserinfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdUserinfo.php',
187
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Order' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Order.php',
188
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OverrideChargeModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OverrideChargeModel.php',
189
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Participant' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Participant.php',
190
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Patch' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Patch.php',
191
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PatchRequest' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PatchRequest.php',
192
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payee' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payee.php',
193
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payer' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payer.php',
194
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayerInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayerInfo.php',
195
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payment.php',
196
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentCard.php',
197
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCardToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentCardToken.php',
198
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDefinition' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentDefinition.php',
199
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentDetail.php',
200
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentExecution' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentExecution.php',
201
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentHistory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentHistory.php',
202
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentInstruction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentInstruction.php',
203
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentOptions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentOptions.php',
204
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentSummary' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentSummary.php',
205
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentTerm' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentTerm.php',
206
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payout' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payout.php',
207
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatch' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutBatch.php',
208
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatchHeader' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutBatchHeader.php',
209
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItem' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutItem.php',
210
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItemDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutItemDetails.php',
211
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutSenderBatchHeader' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutSenderBatchHeader.php',
212
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Phone' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Phone.php',
213
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Plan' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Plan.php',
214
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PlanList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PlanList.php',
215
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PotentialPayerInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PotentialPayerInfo.php',
216
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Presentation' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Presentation.php',
217
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PrivateLabelCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PrivateLabelCard.php',
218
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ProcessorResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ProcessorResponse.php',
219
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RecipientBankingInstruction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RecipientBankingInstruction.php',
220
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RedirectUrls' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RedirectUrls.php',
221
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Refund' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Refund.php',
222
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RefundDetail.php',
223
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundRequest' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RefundRequest.php',
224
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RelatedResources' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RelatedResources.php',
225
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Sale' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Sale.php',
226
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Search' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Search.php',
227
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingAddress.php',
228
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingCost' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingCost.php',
229
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingInfo.php',
230
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Tax' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Tax.php',
231
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Template' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Template.php',
232
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateData' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateData.php',
233
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettings' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateSettings.php',
234
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettingsMetadata' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateSettingsMetadata.php',
235
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Templates' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Templates.php',
236
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Terms' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Terms.php',
237
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transaction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Transaction.php',
238
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TransactionBase' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TransactionBase.php',
239
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transactions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Transactions.php',
240
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignature' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/VerifyWebhookSignature.php',
241
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignatureResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/VerifyWebhookSignatureResponse.php',
242
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebProfile' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebProfile.php',
243
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Webhook' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Webhook.php',
244
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEvent' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEvent.php',
245
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventList.php',
246
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventType' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventType.php',
247
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventTypeList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventTypeList.php',
248
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookList.php',
249
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Auth\\OAuthTokenCredential' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Auth/OAuthTokenCredential.php',
250
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Cache\\AuthorizationCache' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Cache/AuthorizationCache.php',
251
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ArrayUtil' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/ArrayUtil.php',
252
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalModel.php',
253
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalResourceModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalResourceModel.php',
254
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalUserAgent' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalUserAgent.php',
255
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ReflectionUtil' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/ReflectionUtil.php',
256
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Converter\\FormatConverter' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Converter/FormatConverter.php',
257
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConfigManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalConfigManager.php',
258
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConstants' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalConstants.php',
259
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalCredentialManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalCredentialManager.php',
260
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConfig' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalHttpConfig.php',
261
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConnection' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalHttpConnection.php',
262
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalLoggingManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalLoggingManager.php',
263
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConfigurationException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalConfigurationException.php',
264
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConnectionException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalConnectionException.php',
265
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalInvalidCredentialException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalInvalidCredentialException.php',
266
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalMissingCredentialException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalMissingCredentialException.php',
267
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\IPayPalHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/IPayPalHandler.php',
268
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\OauthHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/OauthHandler.php',
269
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\RestHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/RestHandler.php',
270
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalDefaultLogFactory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalDefaultLogFactory.php',
271
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogFactory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalLogFactory.php',
272
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogger' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalLogger.php',
273
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\ApiContext' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Rest/ApiContext.php',
274
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\IResource' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Rest/IResource.php',
275
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Security\\Cipher' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Security/Cipher.php',
276
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Transport\\PayPalRestCall' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Transport/PayPalRestCall.php',
277
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\ArgumentValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/ArgumentValidator.php',
278
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\JsonValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/JsonValidator.php',
279
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\NumericValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/NumericValidator.php',
280
- 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\UrlValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/UrlValidator.php',
281
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Container' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Container.php',
282
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\ExpectedInvokableException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/ExpectedInvokableException.php',
283
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\FrozenServiceException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/FrozenServiceException.php',
284
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\InvalidServiceIdentifierException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/InvalidServiceIdentifierException.php',
285
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\UnknownIdentifierException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/UnknownIdentifierException.php',
286
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\Container' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Psr11/Container.php',
287
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\ServiceLocator' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Psr11/ServiceLocator.php',
288
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceIterator' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/ServiceIterator.php',
289
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/ServiceProviderInterface.php',
290
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Invokable' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/Invokable.php',
291
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\NonInvokable' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/NonInvokable.php',
292
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/PimpleServiceProvider.php',
293
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Service' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/Service.php',
294
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/PimpleServiceProviderInterfaceTest.php',
295
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/PimpleTest.php',
296
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ContainerTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Psr11/ContainerTest.php',
297
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ServiceLocatorTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Psr11/ServiceLocatorTest.php',
298
- 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\ServiceIteratorTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/ServiceIteratorTest.php',
299
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
300
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerInterface.php',
301
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
302
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\AbstractLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/AbstractLogger.php',
303
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\InvalidArgumentException' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/InvalidArgumentException.php',
304
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LogLevel' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LogLevel.php',
305
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerAwareInterface.php',
306
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerAwareTrait.php',
307
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerInterface.php',
308
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerTrait' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerTrait.php',
309
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\NullLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/NullLogger.php',
310
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\DummyTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
311
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
312
- 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
313
- 'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => __DIR__ . '/../..' . '/src/Shop/Access/Manager.php',
314
- 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => __DIR__ . '/../..' . '/src/Shop/Admin/DownloadOption.php',
315
- 'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => __DIR__ . '/../..' . '/src/Shop/Admin/Fields/GatewayOverview.php',
316
- 'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => __DIR__ . '/../..' . '/src/Shop/Admin/OrderTable.php',
317
- 'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => __DIR__ . '/../..' . '/src/Shop/Admin/Pages/Orders.php',
318
- 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => __DIR__ . '/../..' . '/src/Shop/Admin/ProductTableColumns.php',
319
- 'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => __DIR__ . '/../..' . '/src/Shop/Admin/WritePanels.php',
320
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => __DIR__ . '/../..' . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
321
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => __DIR__ . '/../..' . '/src/Shop/Ajax/Ajax.php',
322
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\Manager' => __DIR__ . '/../..' . '/src/Shop/Ajax/Manager.php',
323
- 'Never5\\DownloadMonitor\\Shop\\Ajax\\PlaceOrder' => __DIR__ . '/../..' . '/src/Shop/Ajax/PlaceOrder.php',
324
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Cart' => __DIR__ . '/../..' . '/src/Shop/Cart/Cart.php',
325
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Coupon' => __DIR__ . '/../..' . '/src/Shop/Cart/Coupon.php',
326
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Hooks' => __DIR__ . '/../..' . '/src/Shop/Cart/Hooks.php',
327
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Factory' => __DIR__ . '/../..' . '/src/Shop/Cart/Item/Factory.php',
328
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Item' => __DIR__ . '/../..' . '/src/Shop/Cart/Item/Item.php',
329
- 'Never5\\DownloadMonitor\\Shop\\Cart\\Manager' => __DIR__ . '/../..' . '/src/Shop/Cart/Manager.php',
330
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\Field' => __DIR__ . '/../..' . '/src/Shop/Checkout/Field.php',
331
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Manager' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Manager.php',
332
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\ExecutePaymentListener' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php',
333
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\PayPalGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php',
334
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
335
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Result.php',
336
- 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
337
- 'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => __DIR__ . '/../..' . '/src/Shop/Email/Handler.php',
338
- 'Never5\\DownloadMonitor\\Shop\\Email\\Message' => __DIR__ . '/../..' . '/src/Shop/Email/Message.php',
339
- 'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => __DIR__ . '/../..' . '/src/Shop/Email/VarParser.php',
340
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Country' => __DIR__ . '/../..' . '/src/Shop/Helper/Country.php',
341
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Currency' => __DIR__ . '/../..' . '/src/Shop/Helper/Currency.php',
342
- 'Never5\\DownloadMonitor\\Shop\\Helper\\Format' => __DIR__ . '/../..' . '/src/Shop/Helper/Format.php',
343
- 'Never5\\DownloadMonitor\\Shop\\Order\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Factory.php',
344
- 'Never5\\DownloadMonitor\\Shop\\Order\\Manager' => __DIR__ . '/../..' . '/src/Shop/Order/Manager.php',
345
- 'Never5\\DownloadMonitor\\Shop\\Order\\Order' => __DIR__ . '/../..' . '/src/Shop/Order/Order.php',
346
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCoupon' => __DIR__ . '/../..' . '/src/Shop/Order/OrderCoupon.php',
347
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCustomer' => __DIR__ . '/../..' . '/src/Shop/Order/OrderCustomer.php',
348
- 'Never5\\DownloadMonitor\\Shop\\Order\\OrderItem' => __DIR__ . '/../..' . '/src/Shop/Order/OrderItem.php',
349
- 'Never5\\DownloadMonitor\\Shop\\Order\\Repository' => __DIR__ . '/../..' . '/src/Shop/Order/Repository.php',
350
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Status/Factory.php',
351
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Manager' => __DIR__ . '/../..' . '/src/Shop/Order/Status/Manager.php',
352
- 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\OrderStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Status/OrderStatus.php',
353
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/Factory.php',
354
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransaction.php',
355
- 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
356
- 'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Order/WordPressRepository.php',
357
- 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => __DIR__ . '/../..' . '/src/Shop/Product/Factory.php',
358
- 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => __DIR__ . '/../..' . '/src/Shop/Product/Product.php',
359
- 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => __DIR__ . '/../..' . '/src/Shop/Product/Repository.php',
360
- 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Product/WordPressRepository.php',
361
- 'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => __DIR__ . '/../..' . '/src/Shop/Services/ServiceProvider.php',
362
- 'Never5\\DownloadMonitor\\Shop\\Services\\Services' => __DIR__ . '/../..' . '/src/Shop/Services/Services.php',
363
- 'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => __DIR__ . '/../..' . '/src/Shop/Session/Cookie.php',
364
- 'Never5\\DownloadMonitor\\Shop\\Session\\Factory' => __DIR__ . '/../..' . '/src/Shop/Session/Factory.php',
365
- 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Factory' => __DIR__ . '/../..' . '/src/Shop/Session/Item/Factory.php',
366
- 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Item' => __DIR__ . '/../..' . '/src/Shop/Session/Item/Item.php',
367
- 'Never5\\DownloadMonitor\\Shop\\Session\\Manager' => __DIR__ . '/../..' . '/src/Shop/Session/Manager.php',
368
- 'Never5\\DownloadMonitor\\Shop\\Session\\Repository' => __DIR__ . '/../..' . '/src/Shop/Session/Repository.php',
369
- 'Never5\\DownloadMonitor\\Shop\\Session\\Session' => __DIR__ . '/../..' . '/src/Shop/Session/Session.php',
370
- 'Never5\\DownloadMonitor\\Shop\\Session\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Session/WordPressRepository.php',
371
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Buy' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Buy.php',
372
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Cart' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Cart.php',
373
- 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Checkout' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Checkout.php',
374
- 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxClassManager' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxClassManager.php',
375
- 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxRate.php',
376
- 'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => __DIR__ . '/../..' . '/src/Shop/Util/Assets.php',
377
- 'Never5\\DownloadMonitor\\Shop\\Util\\Page' => __DIR__ . '/../..' . '/src/Shop/Util/Page.php',
378
- 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => __DIR__ . '/../..' . '/src/Shop/Util/PostType.php',
379
- 'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => __DIR__ . '/../..' . '/src/Shop/Util/Redirect.php',
380
- 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => __DIR__ . '/../..' . '/src/Shop/Util/TemplateInjector.php',
381
- 'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => __DIR__ . '/../..' . '/src/Util/ExtensionLoader.php',
382
- 'Never5\\DownloadMonitor\\Util\\Onboarding' => __DIR__ . '/../..' . '/src/Util/Onboarding.php',
383
- 'Never5\\DownloadMonitor\\Util\\PageCreator' => __DIR__ . '/../..' . '/src/Util/PageCreator.php',
384
- 'WP_DLM' => __DIR__ . '/../..' . '/src/DLM.php',
385
- 'DLM_Admin_Helper' => __DIR__ . '/../..' . '/src/Admin/class-dlm-admin-helper.php',
386
- 'DLM_Uninstall' => __DIR__ . '/../..' . '/includes/admin/uninstall/class-dlm-uninstall.php',
387
- );
388
-
389
- public static function getInitializer(ClassLoader $loader)
390
- {
391
- return \Closure::bind(function () use ($loader) {
392
- $loader->prefixLengthsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixLengthsPsr4;
393
- $loader->prefixDirsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixDirsPsr4;
394
- $loader->classMap = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$classMap;
395
-
396
- }, null, ClassLoader::class);
397
- }
398
- }
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a
8
+ {
9
+ public static $prefixLengthsPsr4 = array (
10
+ 'N' =>
11
+ array (
12
+ 'Never5\\DownloadMonitor\\' => 23,
13
+ ),
14
+ );
15
+
16
+ public static $prefixDirsPsr4 = array (
17
+ 'Never5\\DownloadMonitor\\' =>
18
+ array (
19
+ 0 => __DIR__ . '/../..' . '/src',
20
+ ),
21
+ );
22
+
23
+ public static $classMap = array (
24
+ 'DLM_Admin' => __DIR__ . '/../..' . '/src/Admin/Admin.php',
25
+ 'DLM_Admin_Dashboard' => __DIR__ . '/../..' . '/src/Admin/Dashboard.php',
26
+ 'DLM_Admin_Extensions' => __DIR__ . '/../..' . '/src/Admin/Extensions.php',
27
+ 'DLM_Admin_Fields_Field' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Field.php',
28
+ 'DLM_Admin_Fields_Field_ActionButton' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/ActionButton.php',
29
+ 'DLM_Admin_Fields_Field_Checkbox' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Checkbox.php',
30
+ 'DLM_Admin_Fields_Field_Desc' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Desc.php',
31
+ 'DLM_Admin_Fields_Field_Factory' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/FieldFactory.php',
32
+ 'DLM_Admin_Fields_Field_Lazy_Select' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/LazySelect.php',
33
+ 'DLM_Admin_Fields_Field_Password' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Password.php',
34
+ 'DLM_Admin_Fields_Field_Select' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Select.php',
35
+ 'DLM_Admin_Fields_Field_Text' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Text.php',
36
+ 'DLM_Admin_Fields_Field_Textarea' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Textarea.php',
37
+ 'DLM_Admin_Fields_Field_Title' => __DIR__ . '/../..' . '/src/Admin/Settings/Fields/Title.php',
38
+ 'DLM_Admin_Media_Browser' => __DIR__ . '/../..' . '/src/Admin/MediaBrowser.php',
39
+ 'DLM_Admin_Media_Insert' => __DIR__ . '/../..' . '/src/Admin/MediaInsert.php',
40
+ 'DLM_Admin_Scripts' => __DIR__ . '/../..' . '/src/Admin/AdminScripts.php',
41
+ 'DLM_Admin_Settings' => __DIR__ . '/../..' . '/src/Admin/Settings/Settings.php',
42
+ 'DLM_Admin_Writepanels' => __DIR__ . '/../..' . '/src/Admin/WritePanels.php',
43
+ 'DLM_Admin_OptionsUpsells' => __DIR__ . '/../..' . '/src/Admin/OptionsUpsells.php',
44
+ 'DLM_Ajax' => __DIR__ . '/../..' . '/src/Ajax/Ajax.php',
45
+ 'DLM_Ajax_CreatePage' => __DIR__ . '/../..' . '/src/Ajax/CreatePage.php',
46
+ 'DLM_Ajax_GetDownloads' => __DIR__ . '/../..' . '/src/Ajax/GetDownloads.php',
47
+ 'DLM_Ajax_GetVersions' => __DIR__ . '/../..' . '/src/Ajax/GetVersions.php',
48
+ 'DLM_Ajax_Handler' => __DIR__ . '/../..' . '/src/AjaxHandler.php',
49
+ 'DLM_Ajax_Manager' => __DIR__ . '/../..' . '/src/Ajax/Manager.php',
50
+ 'DLM_Category_Walker' => __DIR__ . '/../..' . '/src/Admin/CategoryWalker.php',
51
+ 'DLM_Constants' => __DIR__ . '/../..' . '/src/Constants.php',
52
+ 'DLM_Cookie_Manager' => __DIR__ . '/../..' . '/src/CookieManager.php',
53
+ 'DLM_Custom_Actions' => __DIR__ . '/../..' . '/src/Admin/CustomActions.php',
54
+ 'DLM_Custom_Columns' => __DIR__ . '/../..' . '/src/Admin/CustomColumns.php',
55
+ 'DLM_Custom_Labels' => __DIR__ . '/../..' . '/src/Admin/CustomLabels.php',
56
+ 'DLM_Debug_Logger' => __DIR__ . '/../..' . '/src/DebugLogger.php',
57
+ 'DLM_Download' => __DIR__ . '/../..' . '/src/Download/Download.php',
58
+ 'DLM_DownloadPreview_Config' => __DIR__ . '/../..' . '/src/DownloadPreview/Config.php',
59
+ 'DLM_DownloadPreview_Preview' => __DIR__ . '/../..' . '/src/DownloadPreview/Preview.php',
60
+ 'DLM_Download_Factory' => __DIR__ . '/../..' . '/src/Download/DownloadFactory.php',
61
+ 'DLM_Download_Handler' => __DIR__ . '/../..' . '/src/DownloadHandler.php',
62
+ 'DLM_Download_No_Access_Page_Endpoint' => __DIR__ . '/../..' . '/src/DownloadNoAccessPageEndpoint.php',
63
+ 'DLM_Download_Repository' => __DIR__ . '/../..' . '/src/Download/DownloadRepository.php',
64
+ 'DLM_Download_Version' => __DIR__ . '/../..' . '/src/Version/Version.php',
65
+ 'DLM_File_Manager' => __DIR__ . '/../..' . '/src/FileManager.php',
66
+ 'DLM_Gutenberg' => __DIR__ . '/../..' . '/src/Gutenberg.php',
67
+ 'DLM_Hasher' => __DIR__ . '/../..' . '/src/Hasher.php',
68
+ 'DLM_Installer' => __DIR__ . '/../..' . '/src/Installer.php',
69
+ 'DLM_Integrations_PostTypesOrder' => __DIR__ . '/../..' . '/src/Integrations/PostTypesOrder.php',
70
+ 'DLM_Integrations_YoastSEO' => __DIR__ . '/../..' . '/src/Integrations/YoastSEO.php',
71
+ 'DLM_LU_Ajax' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Ajax.php',
72
+ 'DLM_LU_Checker' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Checker.php',
73
+ 'DLM_LU_Content_Queue' => __DIR__ . '/../..' . '/src/LegacyUpgrader/ContentQueue.php',
74
+ 'DLM_LU_Content_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/ContentUpgrader.php',
75
+ 'DLM_LU_Download_Queue' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadQueue.php',
76
+ 'DLM_LU_Download_Upgrader' => __DIR__ . '/../..' . '/src/LegacyUpgrader/DownloadUpgrader.php',
77
+ 'DLM_LU_Message' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Message.php',
78
+ 'DLM_LU_Page' => __DIR__ . '/../..' . '/src/LegacyUpgrader/Page.php',
79
+ 'DLM_Log_Export_CSV' => __DIR__ . '/../..' . '/src/Logs/LogExportCSV.php',
80
+ 'DLM_Log_Filters' => __DIR__ . '/../..' . '/src/Logs/LogFilters.php',
81
+ 'DLM_Log_Item' => __DIR__ . '/../..' . '/src/Logs/LogItem.php',
82
+ 'DLM_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/LogItemRepository.php',
83
+ 'DLM_Log_Page' => __DIR__ . '/../..' . '/src/Logs/LogPage.php',
84
+ 'DLM_Logging' => __DIR__ . '/../..' . '/src/Logs/Logging.php',
85
+ 'DLM_Logging_List_Table' => __DIR__ . '/../..' . '/src/Logs/LoggingListTable.php',
86
+ 'DLM_Post_Type_Manager' => __DIR__ . '/../..' . '/src/PostTypeManager.php',
87
+ 'DLM_Product' => __DIR__ . '/../..' . '/src/Product/Product.php',
88
+ 'DLM_Product_Error_Handler' => __DIR__ . '/../..' . '/src/Product/ProductErrorHandler.php',
89
+ 'DLM_Product_License' => __DIR__ . '/../..' . '/src/Product/ProductLicense.php',
90
+ 'DLM_Product_Manager' => __DIR__ . '/../..' . '/src/Product/ProductManager.php',
91
+ 'DLM_Reports_Ajax' => __DIR__ . '/../..' . '/src/Admin/Reports/Ajax.php',
92
+ 'DLM_Reports_Chart' => __DIR__ . '/../..' . '/src/Admin/Reports/Chart.php',
93
+ 'DLM_Reports_Page' => __DIR__ . '/../..' . '/src/Admin/Reports/Page.php',
94
+ 'DLM_Search' => __DIR__ . '/../..' . '/src/Search.php',
95
+ 'DLM_Services' => __DIR__ . '/../..' . '/src/Services.php',
96
+ 'DLM_Settings_Helper' => __DIR__ . '/../..' . '/src/Admin/Settings/SettingsHelper.php',
97
+ 'DLM_Settings_Page' => __DIR__ . '/../..' . '/src/Admin/Settings/Page.php',
98
+ 'DLM_Shortcodes' => __DIR__ . '/../..' . '/src/Shortcodes.php',
99
+ 'DLM_Taxonomy_Manager' => __DIR__ . '/../..' . '/src/TaxonomyManager.php',
100
+ 'DLM_Template_Handler' => __DIR__ . '/../..' . '/src/TemplateHandler.php',
101
+ 'DLM_Transient_Manager' => __DIR__ . '/../..' . '/src/TransientManager.php',
102
+ 'DLM_Upgrade_Manager' => __DIR__ . '/../..' . '/src/UpgradeManager.php',
103
+ 'DLM_Utils' => __DIR__ . '/../..' . '/src/Utils.php',
104
+ 'DLM_Version_Manager' => __DIR__ . '/../..' . '/src/Version/VersionManager.php',
105
+ 'DLM_Version_Repository' => __DIR__ . '/../..' . '/src/Version/VersionRepository.php',
106
+ 'DLM_View_Manager' => __DIR__ . '/../..' . '/src/Admin/ViewManager.php',
107
+ 'DLM_Widget_Downloads' => __DIR__ . '/../..' . '/src/Widgets/Downloads.php',
108
+ 'DLM_Widget_Manager' => __DIR__ . '/../..' . '/src/Widgets/Manager.php',
109
+ 'DLM_WordPress_Download_Repository' => __DIR__ . '/../..' . '/src/Download/WordPressDownloadRepository.php',
110
+ 'DLM_WordPress_Log_Item_Repository' => __DIR__ . '/../..' . '/src/Logs/WordPressLogItemRepository.php',
111
+ 'DLM_WordPress_Version_Repository' => __DIR__ . '/../..' . '/src/Version/WordPressVersionRepository.php',
112
+ 'DateTimeImmutable' => __DIR__ . '/../..' . '/src/Polyfill/DateTimeImmutable/DateTimeImmutable.php',
113
+ 'DateTimeInterface' => __DIR__ . '/../..' . '/src/Polyfill/DateTimeImmutable/DateTimeInterface.php',
114
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Address' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Address.php',
115
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Agreement' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Agreement.php',
116
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementDetails.php',
117
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementStateDescriptor' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementStateDescriptor.php',
118
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransaction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementTransaction.php',
119
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AgreementTransactions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AgreementTransactions.php',
120
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\AlternatePayment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/AlternatePayment.php',
121
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Amount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Amount.php',
122
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Authorization' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Authorization.php',
123
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankAccount.php',
124
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankAccountsList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankAccountsList.php',
125
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BankToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BankToken.php',
126
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BaseAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BaseAddress.php',
127
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Billing' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Billing.php',
128
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingAgreementToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BillingAgreementToken.php',
129
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\BillingInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/BillingInfo.php',
130
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CancelNotification' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CancelNotification.php',
131
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Capture' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Capture.php',
132
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CarrierAccount.php',
133
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CarrierAccountToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CarrierAccountToken.php',
134
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CartBase' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CartBase.php',
135
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ChargeModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ChargeModel.php',
136
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Cost' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Cost.php',
137
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CountryCode' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CountryCode.php',
138
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreateProfileResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreateProfileResponse.php',
139
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Credit' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Credit.php',
140
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCard.php',
141
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardHistory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardHistory.php',
142
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardList.php',
143
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditCardToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditCardToken.php',
144
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CreditFinancingOffered' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CreditFinancingOffered.php',
145
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Currency' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Currency.php',
146
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CurrencyConversion' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CurrencyConversion.php',
147
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\CustomAmount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/CustomAmount.php',
148
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\DetailedRefund' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/DetailedRefund.php',
149
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Details' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Details.php',
150
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Error' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Error.php',
151
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ErrorDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ErrorDetails.php',
152
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExtendedBankAccount' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ExtendedBankAccount.php',
153
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ExternalFunding' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ExternalFunding.php',
154
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FileAttachment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FileAttachment.php',
155
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FlowConfig' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FlowConfig.php',
156
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FmfDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FmfDetails.php',
157
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingDetail.php',
158
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingInstrument' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingInstrument.php',
159
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingOption' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingOption.php',
160
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FundingSource' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FundingSource.php',
161
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\FuturePayment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/FuturePayment.php',
162
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\HyperSchema' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/HyperSchema.php',
163
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Image' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Image.php',
164
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Incentive' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Incentive.php',
165
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InputFields' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InputFields.php',
166
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InstallmentInfo.php',
167
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InstallmentOption' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InstallmentOption.php',
168
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Invoice' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Invoice.php',
169
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceAddress.php',
170
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceItem' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceItem.php',
171
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceNumber' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceNumber.php',
172
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\InvoiceSearchResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/InvoiceSearchResponse.php',
173
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Item' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Item.php',
174
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ItemList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ItemList.php',
175
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Links' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Links.php',
176
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Measurement' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Measurement.php',
177
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/MerchantInfo.php',
178
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\MerchantPreferences' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/MerchantPreferences.php',
179
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Metadata' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Metadata.php',
180
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\NameValuePair' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/NameValuePair.php',
181
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Notification' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Notification.php',
182
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdAddress.php',
183
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdError' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdError.php',
184
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdSession' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdSession.php',
185
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdTokeninfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdTokeninfo.php',
186
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OpenIdUserinfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OpenIdUserinfo.php',
187
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Order' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Order.php',
188
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\OverrideChargeModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/OverrideChargeModel.php',
189
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Participant' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Participant.php',
190
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Patch' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Patch.php',
191
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PatchRequest' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PatchRequest.php',
192
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payee' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payee.php',
193
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payer' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payer.php',
194
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayerInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayerInfo.php',
195
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payment' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payment.php',
196
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentCard.php',
197
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentCardToken' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentCardToken.php',
198
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDefinition' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentDefinition.php',
199
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentDetail.php',
200
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentExecution' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentExecution.php',
201
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentHistory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentHistory.php',
202
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentInstruction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentInstruction.php',
203
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentOptions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentOptions.php',
204
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentSummary' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentSummary.php',
205
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PaymentTerm' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PaymentTerm.php',
206
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Payout' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Payout.php',
207
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatch' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutBatch.php',
208
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutBatchHeader' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutBatchHeader.php',
209
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItem' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutItem.php',
210
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutItemDetails' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutItemDetails.php',
211
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PayoutSenderBatchHeader' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PayoutSenderBatchHeader.php',
212
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Phone' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Phone.php',
213
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Plan' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Plan.php',
214
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PlanList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PlanList.php',
215
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PotentialPayerInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PotentialPayerInfo.php',
216
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Presentation' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Presentation.php',
217
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\PrivateLabelCard' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/PrivateLabelCard.php',
218
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ProcessorResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ProcessorResponse.php',
219
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RecipientBankingInstruction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RecipientBankingInstruction.php',
220
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RedirectUrls' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RedirectUrls.php',
221
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Refund' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Refund.php',
222
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundDetail' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RefundDetail.php',
223
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RefundRequest' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RefundRequest.php',
224
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\RelatedResources' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/RelatedResources.php',
225
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Sale' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Sale.php',
226
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Search' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Search.php',
227
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingAddress' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingAddress.php',
228
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingCost' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingCost.php',
229
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\ShippingInfo' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/ShippingInfo.php',
230
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Tax' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Tax.php',
231
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Template' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Template.php',
232
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateData' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateData.php',
233
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettings' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateSettings.php',
234
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TemplateSettingsMetadata' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TemplateSettingsMetadata.php',
235
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Templates' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Templates.php',
236
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Terms' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Terms.php',
237
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transaction' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Transaction.php',
238
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\TransactionBase' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/TransactionBase.php',
239
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Transactions' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Transactions.php',
240
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignature' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/VerifyWebhookSignature.php',
241
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\VerifyWebhookSignatureResponse' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/VerifyWebhookSignatureResponse.php',
242
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebProfile' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebProfile.php',
243
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\Webhook' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/Webhook.php',
244
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEvent' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEvent.php',
245
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventList.php',
246
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventType' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventType.php',
247
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookEventTypeList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookEventTypeList.php',
248
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Api\\WebhookList' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Api/WebhookList.php',
249
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Auth\\OAuthTokenCredential' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Auth/OAuthTokenCredential.php',
250
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Cache\\AuthorizationCache' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Cache/AuthorizationCache.php',
251
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ArrayUtil' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/ArrayUtil.php',
252
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalModel.php',
253
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalResourceModel' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalResourceModel.php',
254
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\PayPalUserAgent' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/PayPalUserAgent.php',
255
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Common\\ReflectionUtil' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Common/ReflectionUtil.php',
256
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Converter\\FormatConverter' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Converter/FormatConverter.php',
257
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConfigManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalConfigManager.php',
258
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalConstants' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalConstants.php',
259
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalCredentialManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalCredentialManager.php',
260
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConfig' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalHttpConfig.php',
261
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalHttpConnection' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalHttpConnection.php',
262
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Core\\PayPalLoggingManager' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Core/PayPalLoggingManager.php',
263
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConfigurationException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalConfigurationException.php',
264
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalConnectionException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalConnectionException.php',
265
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalInvalidCredentialException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalInvalidCredentialException.php',
266
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Exception\\PayPalMissingCredentialException' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Exception/PayPalMissingCredentialException.php',
267
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\IPayPalHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/IPayPalHandler.php',
268
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\OauthHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/OauthHandler.php',
269
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Handler\\RestHandler' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Handler/RestHandler.php',
270
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalDefaultLogFactory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalDefaultLogFactory.php',
271
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogFactory' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalLogFactory.php',
272
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Log\\PayPalLogger' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Log/PayPalLogger.php',
273
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\ApiContext' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Rest/ApiContext.php',
274
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Rest\\IResource' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Rest/IResource.php',
275
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Security\\Cipher' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Security/Cipher.php',
276
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Transport\\PayPalRestCall' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Transport/PayPalRestCall.php',
277
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\ArgumentValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/ArgumentValidator.php',
278
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\JsonValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/JsonValidator.php',
279
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\NumericValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/NumericValidator.php',
280
+ 'Never5\\DownloadMonitor\\Dependencies\\PayPal\\Validation\\UrlValidator' => __DIR__ . '/../..' . '/src/Dependencies/PayPal/Validation/UrlValidator.php',
281
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Container' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Container.php',
282
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\ExpectedInvokableException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/ExpectedInvokableException.php',
283
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\FrozenServiceException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/FrozenServiceException.php',
284
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\InvalidServiceIdentifierException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/InvalidServiceIdentifierException.php',
285
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Exception\\UnknownIdentifierException' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Exception/UnknownIdentifierException.php',
286
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\Container' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Psr11/Container.php',
287
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Psr11\\ServiceLocator' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Psr11/ServiceLocator.php',
288
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceIterator' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/ServiceIterator.php',
289
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/ServiceProviderInterface.php',
290
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Invokable' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/Invokable.php',
291
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\NonInvokable' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/NonInvokable.php',
292
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\PimpleServiceProvider' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/PimpleServiceProvider.php',
293
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Fixtures\\Service' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Fixtures/Service.php',
294
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleServiceProviderInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/PimpleServiceProviderInterfaceTest.php',
295
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\PimpleTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/PimpleTest.php',
296
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ContainerTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Psr11/ContainerTest.php',
297
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\Psr11\\ServiceLocatorTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/Psr11/ServiceLocatorTest.php',
298
+ 'Never5\\DownloadMonitor\\Dependencies\\Pimple\\Tests\\ServiceIteratorTest' => __DIR__ . '/../..' . '/src/Dependencies/Pimple/Tests/ServiceIteratorTest.php',
299
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
300
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerInterface.php',
301
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
302
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\AbstractLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/AbstractLogger.php',
303
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\InvalidArgumentException' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/InvalidArgumentException.php',
304
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LogLevel' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LogLevel.php',
305
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerAwareInterface.php',
306
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerAwareTrait.php',
307
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerInterface.php',
308
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\LoggerTrait' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/LoggerTrait.php',
309
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\NullLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/NullLogger.php',
310
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\DummyTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
311
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/LoggerInterfaceTest.php',
312
+ 'Never5\\DownloadMonitor\\Dependencies\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Log/Test/TestLogger.php',
313
+ 'Never5\\DownloadMonitor\\Shop\\Access\\Manager' => __DIR__ . '/../..' . '/src/Shop/Access/Manager.php',
314
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\DownloadOption' => __DIR__ . '/../..' . '/src/Shop/Admin/DownloadOption.php',
315
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\Fields\\GatewayOverview' => __DIR__ . '/../..' . '/src/Shop/Admin/Fields/GatewayOverview.php',
316
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\OrderTable' => __DIR__ . '/../..' . '/src/Shop/Admin/OrderTable.php',
317
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\Pages\\Orders' => __DIR__ . '/../..' . '/src/Shop/Admin/Pages/Orders.php',
318
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\ProductTableColumns' => __DIR__ . '/../..' . '/src/Shop/Admin/ProductTableColumns.php',
319
+ 'Never5\\DownloadMonitor\\Shop\\Admin\\WritePanels' => __DIR__ . '/../..' . '/src/Shop/Admin/WritePanels.php',
320
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\AdminChangeOrderStatus' => __DIR__ . '/../..' . '/src/Shop/Ajax/AdminChangeOrderStatus.php',
321
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\Ajax' => __DIR__ . '/../..' . '/src/Shop/Ajax/Ajax.php',
322
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\Manager' => __DIR__ . '/../..' . '/src/Shop/Ajax/Manager.php',
323
+ 'Never5\\DownloadMonitor\\Shop\\Ajax\\PlaceOrder' => __DIR__ . '/../..' . '/src/Shop/Ajax/PlaceOrder.php',
324
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Cart' => __DIR__ . '/../..' . '/src/Shop/Cart/Cart.php',
325
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Coupon' => __DIR__ . '/../..' . '/src/Shop/Cart/Coupon.php',
326
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Hooks' => __DIR__ . '/../..' . '/src/Shop/Cart/Hooks.php',
327
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Factory' => __DIR__ . '/../..' . '/src/Shop/Cart/Item/Factory.php',
328
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Item\\Item' => __DIR__ . '/../..' . '/src/Shop/Cart/Item/Item.php',
329
+ 'Never5\\DownloadMonitor\\Shop\\Cart\\Manager' => __DIR__ . '/../..' . '/src/Shop/Cart/Manager.php',
330
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\Field' => __DIR__ . '/../..' . '/src/Shop/Checkout/Field.php',
331
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Manager' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Manager.php',
332
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\ExecutePaymentListener' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PayPal/ExecutePaymentListener.php',
333
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PayPal\\PayPalGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PayPal/PayPalGateway.php',
334
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\PaymentGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/PaymentGateway.php',
335
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Result' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Result.php',
336
+ 'Never5\\DownloadMonitor\\Shop\\Checkout\\PaymentGateway\\Test\\TestGateway' => __DIR__ . '/../..' . '/src/Shop/Checkout/PaymentGateway/Test/TestGateway.php',
337
+ 'Never5\\DownloadMonitor\\Shop\\Email\\Handler' => __DIR__ . '/../..' . '/src/Shop/Email/Handler.php',
338
+ 'Never5\\DownloadMonitor\\Shop\\Email\\Message' => __DIR__ . '/../..' . '/src/Shop/Email/Message.php',
339
+ 'Never5\\DownloadMonitor\\Shop\\Email\\VarParser' => __DIR__ . '/../..' . '/src/Shop/Email/VarParser.php',
340
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Country' => __DIR__ . '/../..' . '/src/Shop/Helper/Country.php',
341
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Currency' => __DIR__ . '/../..' . '/src/Shop/Helper/Currency.php',
342
+ 'Never5\\DownloadMonitor\\Shop\\Helper\\Format' => __DIR__ . '/../..' . '/src/Shop/Helper/Format.php',
343
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Factory.php',
344
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Manager' => __DIR__ . '/../..' . '/src/Shop/Order/Manager.php',
345
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Order' => __DIR__ . '/../..' . '/src/Shop/Order/Order.php',
346
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCoupon' => __DIR__ . '/../..' . '/src/Shop/Order/OrderCoupon.php',
347
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderCustomer' => __DIR__ . '/../..' . '/src/Shop/Order/OrderCustomer.php',
348
+ 'Never5\\DownloadMonitor\\Shop\\Order\\OrderItem' => __DIR__ . '/../..' . '/src/Shop/Order/OrderItem.php',
349
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Repository' => __DIR__ . '/../..' . '/src/Shop/Order/Repository.php',
350
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Status/Factory.php',
351
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\Manager' => __DIR__ . '/../..' . '/src/Shop/Order/Status/Manager.php',
352
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Status\\OrderStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Status/OrderStatus.php',
353
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\Factory' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/Factory.php',
354
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransaction' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransaction.php',
355
+ 'Never5\\DownloadMonitor\\Shop\\Order\\Transaction\\OrderTransactionStatus' => __DIR__ . '/../..' . '/src/Shop/Order/Transaction/OrderTransactionStatus.php',
356
+ 'Never5\\DownloadMonitor\\Shop\\Order\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Order/WordPressRepository.php',
357
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Factory' => __DIR__ . '/../..' . '/src/Shop/Product/Factory.php',
358
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Product' => __DIR__ . '/../..' . '/src/Shop/Product/Product.php',
359
+ 'Never5\\DownloadMonitor\\Shop\\Product\\Repository' => __DIR__ . '/../..' . '/src/Shop/Product/Repository.php',
360
+ 'Never5\\DownloadMonitor\\Shop\\Product\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Product/WordPressRepository.php',
361
+ 'Never5\\DownloadMonitor\\Shop\\Services\\ServiceProvider' => __DIR__ . '/../..' . '/src/Shop/Services/ServiceProvider.php',
362
+ 'Never5\\DownloadMonitor\\Shop\\Services\\Services' => __DIR__ . '/../..' . '/src/Shop/Services/Services.php',
363
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Cookie' => __DIR__ . '/../..' . '/src/Shop/Session/Cookie.php',
364
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Factory' => __DIR__ . '/../..' . '/src/Shop/Session/Factory.php',
365
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Factory' => __DIR__ . '/../..' . '/src/Shop/Session/Item/Factory.php',
366
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Item\\Item' => __DIR__ . '/../..' . '/src/Shop/Session/Item/Item.php',
367
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Manager' => __DIR__ . '/../..' . '/src/Shop/Session/Manager.php',
368
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Repository' => __DIR__ . '/../..' . '/src/Shop/Session/Repository.php',
369
+ 'Never5\\DownloadMonitor\\Shop\\Session\\Session' => __DIR__ . '/../..' . '/src/Shop/Session/Session.php',
370
+ 'Never5\\DownloadMonitor\\Shop\\Session\\WordPressRepository' => __DIR__ . '/../..' . '/src/Shop/Session/WordPressRepository.php',
371
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Buy' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Buy.php',
372
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Cart' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Cart.php',
373
+ 'Never5\\DownloadMonitor\\Shop\\Shortcode\\Checkout' => __DIR__ . '/../..' . '/src/Shop/Shortcode/Checkout.php',
374
+ 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxClassManager' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxClassManager.php',
375
+ 'Never5\\DownloadMonitor\\Shop\\Tax\\TaxRate' => __DIR__ . '/../..' . '/src/Shop/Tax/TaxRate.php',
376
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Assets' => __DIR__ . '/../..' . '/src/Shop/Util/Assets.php',
377
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Page' => __DIR__ . '/../..' . '/src/Shop/Util/Page.php',
378
+ 'Never5\\DownloadMonitor\\Shop\\Util\\PostType' => __DIR__ . '/../..' . '/src/Shop/Util/PostType.php',
379
+ 'Never5\\DownloadMonitor\\Shop\\Util\\Redirect' => __DIR__ . '/../..' . '/src/Shop/Util/Redirect.php',
380
+ 'Never5\\DownloadMonitor\\Shop\\Util\\TemplateInjector' => __DIR__ . '/../..' . '/src/Shop/Util/TemplateInjector.php',
381
+ 'Never5\\DownloadMonitor\\Util\\ExtensionLoader' => __DIR__ . '/../..' . '/src/Util/ExtensionLoader.php',
382
+ 'Never5\\DownloadMonitor\\Util\\Onboarding' => __DIR__ . '/../..' . '/src/Util/Onboarding.php',
383
+ 'Never5\\DownloadMonitor\\Util\\PageCreator' => __DIR__ . '/../..' . '/src/Util/PageCreator.php',
384
+ 'WP_DLM' => __DIR__ . '/../..' . '/src/DLM.php',
385
+ 'DLM_Admin_Helper' => __DIR__ . '/../..' . '/src/Admin/class-dlm-admin-helper.php',
386
+ 'DLM_Uninstall' => __DIR__ . '/../..' . '/includes/admin/uninstall/class-dlm-uninstall.php',
387
+ );
388
+
389
+ public static function getInitializer(ClassLoader $loader)
390
+ {
391
+ return \Closure::bind(function () use ($loader) {
392
+ $loader->prefixLengthsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixLengthsPsr4;
393
+ $loader->prefixDirsPsr4 = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$prefixDirsPsr4;
394
+ $loader->classMap = ComposerStaticInit80ce4473100edd20fd6c17775a76ce9a::$classMap;
395
+
396
+ }, null, ClassLoader::class);
397
+ }
398
+ }