@@ -69,6 +69,8 @@ function() use ( $global_settings ) {
6969 return $ global_settings ->license_type ();
7070 }
7171 );
72+
73+ add_filter ( 'themeisle_sdk_blackfriday_data ' , array ( $ this , 'add_black_friday_data ' ) );
7274 }
7375
7476
@@ -444,10 +446,6 @@ function( $data, $page_slug ) use ( $accounts_count, $is_post_sharing_active ) {
444446 );
445447 }
446448 do_action ( 'themeisle_internal_page ' , ROP_PRODUCT_SLUG , 'dashboard ' );
447-
448- if ( ! defined ( 'ROP_PRO_VERSION ' ) ) {
449- do_action ( 'themeisle_sdk_load_banner ' , 'rop ' );
450- }
451449 }
452450
453451 /**
@@ -682,7 +680,7 @@ public function menu_pages() {
682680 )
683681 );
684682 if ( ! defined ( 'REVIVE_NETWORK_VERSION ' ) ) {
685- $ rss_to_social = __ ( 'RSS to Social ' , 'wpcf7-redirect ' ) . '<span id="rop-rn-menu" class="dashicons dashicons-external" style="font-size:initial;"></span> ' ;
683+ $ rss_to_social = __ ( 'RSS to Social ' , 'tweet-old-post ' ) . '<span id="rop-rn-menu" class="dashicons dashicons-external" style="font-size:initial;"></span> ' ;
686684 add_action (
687685 'admin_footer ' ,
688686 function () {
@@ -1845,4 +1843,47 @@ public function get_languages() {
18451843 }
18461844 return apply_filters ( 'wpml_active_languages ' , null , array ( 'skip_missing ' => 1 ) );
18471845 }
1846+
1847+ /**
1848+ * Add the Black Friday configuration.
1849+ *
1850+ * @param array $configs An array of configurations.
1851+ *
1852+ * @return array The configurations.
1853+ */
1854+ public static function add_black_friday_data ( $ configs ) {
1855+ $ config = $ configs ['default ' ];
1856+
1857+ // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
1858+ $ 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 ' );
1859+ $ product_label = __ ( 'Revive Social ' , 'tweet-old-post ' );
1860+ $ discount = '50% ' ;
1861+
1862+ $ plan = apply_filters ( 'product_rop_license_plan ' , 0 );
1863+ $ license = apply_filters ( 'product_rop_license_key ' , false );
1864+ $ is_pro = 0 < $ plan ;
1865+
1866+ if ( $ is_pro ) {
1867+ // translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
1868+ $ message_template = __ ( 'Get %1$sup to %2$s off%3$s when you upgrade your %4$s plan or renew early. ' , 'tweet-old-post ' );
1869+ $ product_label = __ ( 'Revive Social Pro ' , 'tweet-old-post ' );
1870+ $ discount = '20% ' ;
1871+ }
1872+
1873+ $ product_label = sprintf ( '<strong>%s</strong> ' , $ product_label );
1874+ $ url_params = array (
1875+ 'utm_term ' => $ is_pro ? 'plan- ' . $ plan : 'free ' ,
1876+ 'lkey ' => ! empty ( $ license ) ? $ license : false ,
1877+ );
1878+
1879+ $ config ['message ' ] = sprintf ( $ message_template , '<strong> ' , $ discount , '</strong> ' , $ product_label );
1880+ $ config ['sale_url ' ] = add_query_arg (
1881+ $ url_params ,
1882+ tsdk_translate_link ( tsdk_utmify ( 'https://themeisle.com/rs-bf ' , 'bfcm ' , 'revive ' ) )
1883+ );
1884+
1885+ $ configs [ ROP_PRODUCT_SLUG ] = $ config ;
1886+
1887+ return $ configs ;
1888+ }
18481889}
0 commit comments