diff --git a/css/src/plugins/form.scss b/css/src/plugins/form.scss deleted file mode 100644 index 6f619670..00000000 --- a/css/src/plugins/form.scss +++ /dev/null @@ -1,48 +0,0 @@ -.form { - &-check { - input { - display: inline-block !important; - width: auto !important; - margin: 0 4px 0 0; - } - label { - display: inline-block !important; - } - padding: 4px 0; - } - &-group { - padding-bottom: 8px; - label { - display: block; - } - & > label { - margin-bottom: 2px; - } - input, textarea { - display: block; - width: 100%; - } - &:last-child { - padding-bottom: 0; - } - p { - &:first-child { - margin-top: 0; - } - &:last-child { - margin-bottom: 0; - } - } - .error { - margin: 0 !important; - } - } -} - -.wpra-plugin-disable-poll { - &__logo { - img { - max-height: 40px; - } - } -} diff --git a/css/src/plugins/index.scss b/css/src/plugins/index.scss deleted file mode 100644 index f9c2b5e4..00000000 --- a/css/src/plugins/index.scss +++ /dev/null @@ -1,25 +0,0 @@ -$white: #fff; -$radius: 4px; - -@mixin breakpoint($point) { - @if $point == desktop { - @media (min-width: 70em) { @content ; } - } - @else if $point == laptop { - @media (min-width: 64em) { @content ; } - } - @else if $point == tablet { - @media (max-width: 50em) { @content ; } - } - @else if $point == phablet { - @media (min-width: 37.5em) { @content ; } - } - @else if $point == mobileonly { - @media (max-width: 37.5em) { @content ; } - - } -} - -@import "./../intro/loading"; -@import "modal"; -@import "form"; diff --git a/css/src/plugins/modal.scss b/css/src/plugins/modal.scss deleted file mode 100644 index 449a3bd3..00000000 --- a/css/src/plugins/modal.scss +++ /dev/null @@ -1,173 +0,0 @@ -.modal { - &-opened { - overflow: hidden; - } - - position: fixed; - background-color: rgba(0, 0, 0, 0.65); - width: 100%; - height: 100%; - left: 0; - top: 0; - z-index: 9999; - overflow-y: auto; - - @include breakpoint(mobile) { - z-index: 100000; - } - - &__body { - width: 100%; - max-width: 30rem; - margin: 5rem auto; - - background-color: $white; - border-radius: $radius; - - &--no-content-padding { - .modal__content { - padding: 0; - } - } - - &--wide { - max-width: 50rem; - } - - @include breakpoint(mobile) { - min-height: 100vh; - margin: 0; - border-radius: 0; - } - } - - &__header { - padding: .5rem 1rem; - font-size: 20px; - font-weight: bold; - line-height: 1.5; - border-bottom: 1px solid #eee; - - &.invisible-header { - border: none; - font-size: unset; - font-weight: unset; - padding-top: 12px !important; - h3 { - margin-top: 0; - line-height: 1.5; - margin-bottom: 0; - } - p { - margin-top: .25rem; - font-size: 14px; - opacity: .6; - margin-bottom: 0; - } - & + .modal__content { - padding-top: 6px !important; - } - } - - @include breakpoint(mobile) { - position: relative; - - .modal--right { - position: absolute; - top: 0; - padding: 6px 1rem 0 1rem; - right: 0; - background-color: white; - } - } - - &-buttons { - font-weight: normal; - } - } - - &__close { - opacity: .5; - cursor: pointer; - &:hover { - opacity: .8; - } - } - - &--right { - float: right; - } - - &__content { - padding: 1rem; - } - - &__footer { - padding: 1rem; - border-top: 1px solid #eee; - text-align: right; - - .button { - display: inline-block !important; - margin-left: 4px !important; - } - .footer-confirm { - margin: 0; - padding: 0; - display: flex; - align-items: center; - - @include breakpoint(mobile) { - display: block; - &__message { - padding-right: 0; - padding-bottom: 10px; - } - } - - &__buttons { - flex-shrink: 0; - - &--left { - margin-right: auto; - flex-grow: 1; - text-align: left; - } - } - - &__message { - margin-right: auto; - &.__right { - flex-grow: 1; - padding-right: 10px; - text-align: right; - } - } - } - } -} - -.modal-transition { - &-enter, &-leave-to { - opacity: 0; - - .modal__body { - opacity: 0; - transform: scaleX(.8) scaleY(.7); - } - } - - &-enter-active, &-leave-active { - transition: opacity 0.25s ease-out; - - .modal__body { - transition: all .25s cubic-bezier(.665,1.65,0,.845); - } - } -} - -.button-clear { - border: none !important; - background: transparent !important; - box-shadow: none !important; -} diff --git a/includes/admin-plugins.php b/includes/admin-plugins.php deleted file mode 100644 index 788154e1..00000000 --- a/includes/admin-plugins.php +++ /dev/null @@ -1,122 +0,0 @@ - WPRSS_IMG, - 'url' => 'https://hooks.zapier.com/hooks/catch/305784/puf5uf/', - 'audience' => 0, // how many people should see the disable poll (in percents) - 'model' => [ - 'reason' => 'Other', - 'follow_up' => null, - 'date' => date('j M Y'), - 'addons' => $addons, - ], - 'form' => [ - [ - 'label' => '', - 'type' => 'radio', - 'name' => 'reason', - 'options' => - [ - [ - 'value' => 'I no longer need the plugin', - 'label' => __('I no longer need the plugin', 'wprss'), - ], - [ - 'value' => 'I found a better alternative', - 'label' => __('I found a better alternative', 'wprss'), - ], - [ - 'value' => 'I couldn\'t get the plugin to work', - 'label' => __('I couldn\'t get the plugin to work', 'wprss'), - ], - [ - 'value' => 'I\'m temporarily deactivating the plugin, but I\'ll be back', - 'label' => __('I\'m temporarily deactivating the plugin, but I\'ll be back', 'wprss'), - ], - [ - 'value' => 'I have a WP RSS Aggregator add-on', - 'label' => __('I have a WP RSS Aggregator add-on', 'wprss'), - ], - [ - 'value' => 'Other', - 'label' => __('Other', 'wprss'), - ], - ], - ], - [ - 'label' => __('Would you mind sharing its name?', 'wprss'), - 'type' => 'textarea', - 'name' => 'follow_up', - 'condition' => - [ - 'field' => 'reason', - 'operator' => '=', - 'value' => 'I found a better alternative', - ], - ], - [ - 'type' => 'content', - 'label' => __( - 'Have you contacted our support team or checked out our Knowledge Base?', - 'wprss' - ), - 'condition' => - [ - 'field' => 'reason', - 'operator' => '=', - 'value' => __('I couldn\'t get the plugin to work', 'wprss'), - ], - ], - [ - 'type' => 'content', - 'className' => 'error', - 'label' => __('This core plugin is required for all our premium add-ons. Please don\'t deactivate it if you currently have premium add-ons installed and activated.', - 'wprss'), - 'condition' => - [ - 'field' => 'reason', - 'operator' => '=', - 'value' => __('I have a WP RSS Aggregator add-on', 'wprss'), - ], - ], - [ - 'label' => __('Please share your reason...', 'wprss'), - 'type' => 'textarea', - 'name' => 'follow_up', - 'condition' => - [ - 'field' => 'reason', - 'operator' => '=', - 'value' => __('Other', 'wprss'), - ], - ], - ], - ]); - - echo '
'; - }); -}); diff --git a/includes/functions.php b/includes/functions.php index 808678e0..1d6e01f4 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -400,13 +400,24 @@ function wprss_translate_n($single, $plural, $number) /** * Subscribe an email address to the newsletter. * - * @paran string $name The name of the subscriber. + * The endpoint URL is filterable via `wprss_newsletter_subscribe_url`. When + * the filter returns an empty string, the subscription is a no-op and the + * function returns false without making a request. + * + * @param string $name The name of the subscriber. * @param string $email The email address to subscribe. * @return bool True on success, false on failure. */ function wprss_sub_to_newsletter($name, $email) { - $response = wp_remote_post('https://hooks.zapier.com/hooks/catch/305784/32i6y28/', [ + $url = apply_filters('wprss_newsletter_subscribe_url', ''); + + if (empty($url)) { + wpra_get_logger()->info('Newsletter subscribe is not configured; skipping.'); + return false; + } + + $response = wp_remote_post($url, [ 'body' => [ 'subscribe' => [ 'name' => $name, diff --git a/js/src/modules/plugins/PluginDisablePoll.vue b/js/src/modules/plugins/PluginDisablePoll.vue deleted file mode 100644 index 70f863fe..00000000 --- a/js/src/modules/plugins/PluginDisablePoll.vue +++ /dev/null @@ -1,122 +0,0 @@ - -- Your feedback will help us to improve our plugins and service. -
-