diff --git a/includes/admin/shortners/class-rop-rvivly-shortner.php b/includes/admin/shortners/class-rop-rvivly-shortner.php index 8023f5ac4..98da56949 100644 --- a/includes/admin/shortners/class-rop-rvivly-shortner.php +++ b/includes/admin/shortners/class-rop-rvivly-shortner.php @@ -62,7 +62,23 @@ public function set_website( $website = false ) { * @return string */ public function shorten_url( $url ) { - $instance = $this; - return apply_filters( 'rop_shorten_url', $url, 'rviv.ly', $this->website, $this->credentials, $instance ); + $shortURL = $url; + + $response = $this->callAPI( + 'https://rviv.ly/yourls-api.php', + array( 'method' => 'post' ), + array( 'action' => 'shorturl', 'format' => 'simple', 'signature' => substr( md5( $this->website . md5( 'themeisle' ) ), 0, 10 ), 'url' => $url, 'website' => base64_encode( $this->website ) ), + null + ); + + $shortURL = $url; + if ( intval( $response['error'] ) == 200 ) { + $shortURL = $response['response']; + } + if ( $shortURL == null || $shortURL === '' ) { + $shortURL = $url; + } + + return $shortURL; } } diff --git a/vue/src/vue-elements/post-format.vue b/vue/src/vue-elements/post-format.vue index d44e7a403..42e290444 100644 --- a/vue/src/vue-elements/post-format.vue +++ b/vue/src/vue-elements/post-format.vue @@ -470,15 +470,15 @@
-
-

- {{ labels.hashtag_field_upsell }} -

+ v-if="isNewUserPro && (post_format.short_url_service !== 'rviv.ly' && post_format.short_url_service !== 'wp_short_url')" + class="columns " + > +
+

+ {{ labels.hashtag_field_upsell }} +

+
-