Skip to content

Commit

Permalink
add modal on pro networks
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed Jul 9, 2024
1 parent eb0ebb6 commit 1b8a402
Show file tree
Hide file tree
Showing 14 changed files with 81,974 additions and 229 deletions.
56,446 changes: 56,444 additions & 2 deletions assets/js/build/dashboard.js

Large diffs are not rendered by default.

25,212 changes: 25,210 additions & 2 deletions assets/js/build/exclude.js

Large diffs are not rendered by default.

313 changes: 150 additions & 163 deletions assets/js/build/publish_now.js

Large diffs are not rendered by default.

43 changes: 25 additions & 18 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Rop_Admin {
*/
private $allowed_screens;

const RN_LINK = 'https://revive.social/plugins/revive-network/';
const RN_LINK = 'https://revive.social/plugins/revive-network/';
/**
* The ID of this plugin.
*
Expand Down Expand Up @@ -301,7 +301,7 @@ public function enqueue_scripts() {
return;
}
wp_enqueue_media();
wp_register_script( $this->plugin_name . '-dashboard', ROP_LITE_URL . 'assets/js/build/dashboard.js', array(), ( ROP_DEBUG ) ? time() : $this->version, false );
wp_register_script( $this->plugin_name . '-dashboard', ROP_LITE_URL . 'assets/js/build/dashboard.js', array('wp-url'), ( ROP_DEBUG ) ? time() : $this->version, false );
wp_register_script( $this->plugin_name . '-exclude', ROP_LITE_URL . 'assets/js/build/exclude.js', array(), ( ROP_DEBUG ) ? time() : $this->version, false );

$rop_api_settings = array(
Expand Down Expand Up @@ -627,20 +627,24 @@ public function menu_pages() {
);
if ( ! defined( 'REVIVE_NETWORK_VERSION' ) ) {
$rss_to_social = __( 'RSS to Social', 'wpcf7-redirect' ) . '<span id="rop-rn-menu" class="dashicons dashicons-external" style="font-size:initial;"></span>';
add_action( 'admin_footer', function () {
?><script type="text/javascript">
jQuery(document).ready(function ($) {
$('.tsdk-upg-menu-item').parent().attr('target', '_blank');
});
</script>
<?php
} );
add_action(
'admin_footer',
function () {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('.tsdk-upg-menu-item').parent().attr('target', '_blank');
});
</script>
<?php
}
);

global $submenu;
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' )
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
}
}
Expand All @@ -665,10 +669,10 @@ public function publish_now_upsell() {

if ( $settings->get_instant_sharing() && count( $active_accounts ) >= 2 && ! defined( 'ROP_PRO_VERSION' ) ) {
echo '<div class="misc-pub-section " style="font-size: 11px;text-align: center;line-height: 1.7em;color: #888;"><span class="dashicons dashicons-lock"></span>' .
__(
'Share to more accounts by upgrading to the extended version for ',
'tweet-old-post'
) . '<a href="' . tsdk_utmify( Rop_I18n::UPSELL_LINK, 'editor', 'publish_now' ) . '" target="_blank">Revive Old Posts </a>
__(
'Share to more accounts by upgrading to the extended version for ',
'tweet-old-post'
) . '<a href="' . tsdk_utmify( Rop_I18n::UPSELL_LINK, 'editor', 'publish_now' ) . '" target="_blank">Revive Old Posts </a>
</div>';
}
}
Expand Down Expand Up @@ -1825,11 +1829,14 @@ public function rop_upgrade_to_pro_plugin_action( $actions, $plugin_file ) {
if ( $global_settings->license_type() < 1 ) {
return array_merge(
array(
'upgrade_link' => '<a href="' . add_query_arg( [
'upgrade_link' => '<a href="' . add_query_arg(
array(
'utm_source' => 'wpadmin',
'utm_medium' => 'plugins',
'utm_campaign' => 'rowaction'
], Rop_I18n::UPSELL_LINK ) . '" title="' . __( 'More Features', 'tweet-old-post' ) . '" target="_blank" rel="noopener noreferrer" style="color: #009E29; font-weight: 700;" onmouseover="this.style.color=\'#008a20\';" onmouseout="this.style.color=\'#009528\';" >' . __( 'Get Revive Social Pro', 'tweet-old-post' ) . '</a>',
'utm_campaign' => 'rowaction',
),
Rop_I18n::UPSELL_LINK
) . '" title="' . __( 'More Features', 'tweet-old-post' ) . '" target="_blank" rel="noopener noreferrer" style="color: #009E29; font-weight: 700;" onmouseover="this.style.color=\'#008a20\';" onmouseout="this.style.color=\'#009528\';" >' . __( 'Get Revive Social Pro', 'tweet-old-post' ) . '</a>',
),
$actions
);
Expand Down
1 change: 1 addition & 0 deletions includes/admin/class-rop-global-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class Rop_Global_Settings {
'gmb' => array(
'active' => false,
'name' => 'Gmb',
'fullname' => 'Google My Business',
),
'vk' => array(
'active' => false,
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/notices/class-rop-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function rop_revive_network_nag_delayed() {
$nonce = wp_create_nonce( 'rop_notice_nonce_value' );

$dismiss_url = admin_url( 'admin-ajax.php?action=rop_notice_dismissed&rop_notice_id=' . $notice_id . '&rop_notice_nonce=' . $nonce );
$upsell_link = tsdk_utmify(Rop_Admin::RN_LINK,'rn','admin_notice');
$upsell_link = tsdk_utmify( Rop_Admin::RN_LINK, 'rn', 'admin_notice' );
$markup = <<<UPSELLHTML
<div class="update-nag rop-revive-network-admin-notice">
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/services/class-rop-gmb-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Rop_Gmb_Service extends Rop_Services_Abstract {
* @access public
*/
public function init() {
$this->display_name = 'Gmb';
$this->display_name = 'Google My Business';
}

/**
Expand Down
3 changes: 3 additions & 0 deletions includes/class-rop-i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ public static function get_labels( $key = '' ) {
'preloader_message_default' => __( 'Loading...', 'tweet-old-post' ),
'only_in_pro' => __( 'Available in Pro', 'tweet-old-post' ),
'limit_reached' => __( 'Limit reached', 'tweet-old-post' ),
'upsell_upgrade_now' => __( 'Upgrade to PRO', 'tweet-old-post' ),
'upsell_service_title' => __( 'Sharing to %1$s is a PRO feature', 'tweet-old-post' ),
'upsell_service_body' => __( 'We\'re sorry, %1$s is not available on your plan. Please upgrade to the Pro plan to unlock all these features and get more traffic.', 'tweet-old-post' ),
),
'settings' => array(
'yes_text' => __( 'Yes', 'tweet-old-post' ),
Expand Down
30 changes: 12 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"npm": "^6.1.0",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"sprintf-js": "^1.1.3",
"vue": "^2.7.15",
"vue-clickaway": "^2.1.0",
"vue-js-toggle-button": "^1.3.3",
Expand Down
6 changes: 3 additions & 3 deletions tweet-old-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ function ( $compatibilities ) {
add_filter(
'tweet_old_post_welcome_metadata',
function () {
return [
return array(
'is_enabled' => ! defined( 'ROP_PRO_DIR_PATH' ),
'pro_name' => 'Revive Old Post Pro',
'logo' => ROP_LITE_URL . 'assets/img/logo_rop.png',
'cta_link' => tsdk_utmify( add_query_arg( [ 'discount' => 'LOYALUSER582' ], Rop_I18n::UPSELL_LINK ), 'rop-welcome', 'notice' )
];
'cta_link' => tsdk_utmify( add_query_arg( array( 'discount' => 'LOYALUSER582' ), Rop_I18n::UPSELL_LINK ), 'rop-welcome', 'notice' ),
);
}
);
$vendor_file = ROP_LITE_PATH . '/vendor/autoload.php';
Expand Down
30 changes: 15 additions & 15 deletions vue/src/vue-elements/queue-tab-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@
v-if="start_status"
class="d-inline-block mt-2 column col-4 float-right text-right"
>
<button
class="btn btn-secondary"
@click="refreshQueue(true)"
>
<i
v-if="!is_loading"
class="fa fa-refresh"
/>
<i
v-else
class="fa fa-spinner fa-spin"
/>
{{ labels.refresh_btn }}
</button>
</div>
<button
class="btn btn-secondary"
@click="refreshQueue(true)"
>
<i
v-if="!is_loading"
class="fa fa-refresh"
/>
<i
v-else
class="fa fa-spinner fa-spin"
/>
{{ labels.refresh_btn }}
</button>
</div>
</div>
<div
v-else-if="start_status && queueCount === 0"
Expand Down
6 changes: 3 additions & 3 deletions vue/src/vue-elements/settings-tab-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,9 @@
<p class="text-gray">
{{ labels.tracking }}<br>
<a
:href="tracking_info_link"
target="_blank"
>
:href="tracking_info_link"
target="_blank"
>
{{ labels.tracking_info }}
</a>
</p>
Expand Down
Loading

0 comments on commit 1b8a402

Please sign in to comment.