diff --git a/assets/css/rop_core.css b/assets/css/rop_core.css index 1c47314e6..db8c02c34 100644 --- a/assets/css/rop_core.css +++ b/assets/css/rop_core.css @@ -382,7 +382,7 @@ a.active { font-size: 1.4rem; } -#rop_core h4, +#rop_core h4:not(.themeisle-sale-title), #rop_core .h4 { font-size: 1.2rem; } diff --git a/includes/admin/class-rop-admin.php b/includes/admin/class-rop-admin.php index 1ede6959f..fbd4879f4 100644 --- a/includes/admin/class-rop-admin.php +++ b/includes/admin/class-rop-admin.php @@ -69,6 +69,8 @@ function() use ( $global_settings ) { return $global_settings->license_type(); } ); + + add_filter( 'themeisle_sdk_blackfriday_data', array( $this, 'add_black_friday_data' ) ); } @@ -444,10 +446,6 @@ function( $data, $page_slug ) use ( $accounts_count, $is_post_sharing_active ) { ); } do_action( 'themeisle_internal_page', ROP_PRODUCT_SLUG, 'dashboard' ); - - if ( ! defined( 'ROP_PRO_VERSION' ) ) { - do_action( 'themeisle_sdk_load_banner', 'rop' ); - } } /** @@ -682,7 +680,7 @@ public function menu_pages() { ) ); if ( ! defined( 'REVIVE_NETWORK_VERSION' ) ) { - $rss_to_social = __( 'RSS to Social', 'wpcf7-redirect' ) . ''; + $rss_to_social = __( 'RSS to Social', 'tweet-old-post' ) . ''; add_action( 'admin_footer', function () { @@ -1845,4 +1843,47 @@ public function get_languages() { } return apply_filters( 'wpml_active_languages', null, array( 'skip_missing' => 1 ) ); } + + /** + * Add the Black Friday configuration. + * + * @param array $configs An array of configurations. + * + * @return array The configurations. + */ + public static function add_black_friday_data( $configs ) { + $config = $configs['default']; + + // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name. + $message_template = __( 'Our biggest sale of the year: %1$sup to %2$s OFF%3$s on %4$s. Don\'t miss this limited-time offer.', 'tweet-old-post' ); + $product_label = __( 'Revive Social', 'tweet-old-post' ); + $discount = '50%'; + + $plan = apply_filters( 'product_rop_license_plan', 0 ); + $license = apply_filters( 'product_rop_license_key', false ); + $is_pro = 0 < $plan; + + if ( $is_pro ) { + // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name. + $message_template = __( 'Get %1$sup to %2$s off%3$s when you upgrade your %4$s plan or renew early.', 'tweet-old-post' ); + $product_label = __( 'Revive Social Pro', 'tweet-old-post' ); + $discount = '20%'; + } + + $product_label = sprintf( '%s', $product_label ); + $url_params = array( + 'utm_term' => $is_pro ? 'plan-' . $plan : 'free', + 'lkey' => ! empty( $license ) ? $license : false, + ); + + $config['message'] = sprintf( $message_template, '', $discount, '', $product_label ); + $config['sale_url'] = add_query_arg( + $url_params, + tsdk_translate_link( tsdk_utmify( 'https://themeisle.com/rs-bf', 'bfcm', 'revive' ) ) + ); + + $configs[ ROP_PRODUCT_SLUG ] = $config; + + return $configs; + } } diff --git a/phpcs.xml b/phpcs.xml index 43812f690..70e12e60b 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -12,7 +12,7 @@ vue/* dist/* - + @@ -51,9 +51,16 @@ + + + + + + + 0 - + \ No newline at end of file diff --git a/vue/src/vue-elements/main-page-panel.vue b/vue/src/vue-elements/main-page-panel.vue index 159d1f83e..edbf99222 100644 --- a/vue/src/vue-elements/main-page-panel.vue +++ b/vue/src/vue-elements/main-page-panel.vue @@ -15,10 +15,6 @@ -
+
+