Skip to content

Commit

Permalink
Merge pull request #984 from Codeinwp/feat/marketing
Browse files Browse the repository at this point in the history
Feat/marketing
  • Loading branch information
selul authored Jul 9, 2024
2 parents 91464a0 + 6a53753 commit 5c58fbf
Show file tree
Hide file tree
Showing 25 changed files with 388 additions and 22,823 deletions.
1 change: 1 addition & 0 deletions assets/img/x-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/js/build/dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/build/exclude.js

Large diffs are not rendered by default.

22,569 changes: 2 additions & 22,567 deletions assets/js/build/publish_now.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions composer.lock

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

2 changes: 1 addition & 1 deletion cron-system/includes/class-debug-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function rop_service_debug() {
</td>
</tr>
<tr>
<td valign="top"><?php _e( 'Check connection with<br/>ROP Cron SyStem: ', 'tweet-old-post' ); ?></td>
<td valign="top"><?php _e( 'Check connection with<br/>Revive Social Cron SyStem: ', 'tweet-old-post' ); ?></td>
<td>
<?php _e( 'WordPress -> Server:', 'tweet-old-post' ); ?>
<span id="server_responded">N/A</span>
Expand Down
108 changes: 45 additions & 63 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Rop_Admin {
*/
private $allowed_screens;

const RN_LINK = 'https://revive.social/plugins/revive-network/';
/**
* The ID of this plugin.
*
Expand Down Expand Up @@ -158,7 +159,7 @@ public function bitly_shortener_upgrade_notice() {
}
?>
<div class="notice notice-error is-dismissible">
<?php echo sprintf( __( '%1$s%2$sRevive Old Posts:%3$s Please upgrade your Bit.ly keys. See this %4$sarticle for instructions.%5$s%6$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/976-how-to-connect-bit-ly-to-revive-old-posts" target="_blank">', '</a>', '</p>' ); ?>
<?php echo sprintf( __( '%1$s%2$sRevive Social:%3$s Please upgrade your Bit.ly keys. See this %4$sarticle for instructions.%5$s%6$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/976-how-to-connect-bit-ly-to-revive-old-posts" target="_blank">', '</a>', '</p>' ); ?>
</div>
<?php
}
Expand Down Expand Up @@ -300,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 @@ -552,29 +553,6 @@ public function rop_main_page() {
<?php
}

/**
* The display method for the addons page.
*
* @since 8.6.0
* @access public
*/
public function rop_addons_page() {
$this->wrong_pro_version();
?>
<div id="wrap">
<div><p style="font-size: 40px; color: #000;">Revive Old Posts - Addons</p></div>

<div style="background: #ffffff; padding: 10px; width: 400px; border-radius: 5px; box-shadow: 0px 0px 5px black;">
<img src="<?php echo ROP_LITE_URL . 'assets/img/revivenetwork.jpg'; ?>" alt="Revive Network">
<p style="font-size: 14px"><?php echo Rop_I18n::get_labels( 'misc.revive_network_desc' ); ?>
<br>
<br>
<a style="align: right"href="https://revive.social/plugins/revive-network/?utm_source=rop&utm_medium=cta&utm_campaign=revive_network_upsell&utm_content=addons_page" target="_blank"><button style="cursor: pointer;"><?php echo Rop_I18n::get_labels( 'misc.revive_network_learn_more_btn' ); ?></button></a>
</p>
</div>
</div>
<?php
}

/**
* Notice for wrong pro version usage.
Expand All @@ -583,7 +561,7 @@ private function wrong_pro_version() {
if ( defined( 'ROP_PRO_VERSION' ) && ( - 1 === version_compare( ROP_PRO_VERSION, '2.0.0' ) ) ) {
?>
<div class="error">
<p>In order to use the premium features for <b>v8.0</b> of Revive Old Posts you will need to update the
<p>In order to use the premium features for <b>v8.0</b> of Revive Social you will need to update the
Premium addon to at least 2.0. In case that you don't see the update, please download from your <a
href="https://revive.social/your-purchases/" target="_blank">purchase history</a></p>
</div>
Expand Down Expand Up @@ -614,8 +592,8 @@ public function content_filters() {
*/
public function menu_pages() {
add_menu_page(
__( 'Revive Old Posts', 'tweet-old-post' ),
__( 'Revive Old Posts', 'tweet-old-post' ),
__( 'Revive Social', 'tweet-old-post' ),
__( 'Revive Social', 'tweet-old-post' ),
'manage_options',
'TweetOldPost',
array(
Expand Down Expand Up @@ -647,35 +625,30 @@ public function menu_pages() {
'content_filters',
)
);
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_submenu_page(
'TweetOldPost',
__( 'Addons', 'tweet-old-post' ),
__( 'Addons', 'tweet-old-post' ),
'manage_options',
'rop_addons_page',
array(
$this,
'rop_addons_page',
)
);
global $submenu;
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
}
}

/**
* Open roadmap in new tab
*
* @since 8.5.0
* @access public
*/
function rop_roadmap_new_tab() {
?>
<script type="text/javascript">
jQuery( document ).ready( function ( $ ) {
$( "ul#adminmenu a[href$='https://trello.com/b/svAZqXO1/roadmap-revive-old-posts']" ).attr( 'target', '_blank' );
} );
</script>
<?php
}

/**
* Publish now upsell
Expand All @@ -699,7 +672,7 @@ public function publish_now_upsell() {
__(
'Share to more accounts by upgrading to the extended version for ',
'tweet-old-post'
) . '<a href="' . ROP_PRO_URL . '" target="_blank">Revive Old Posts </a>
) . '<a href="' . tsdk_utmify( Rop_I18n::UPSELL_LINK, 'editor', 'publish_now' ) . '" target="_blank">Revive Social </a>
</div>';
}
}
Expand Down Expand Up @@ -735,7 +708,7 @@ public function rop_publish_now_metabox() {
foreach ( $screens as $screen ) {
add_meta_box(
'rop_publish_now_metabox',
'Revive Old Posts',
'Revive Social',
array( $this, 'rop_publish_now_metabox_html' ),
$screen,
'side',
Expand Down Expand Up @@ -1243,7 +1216,7 @@ public function rop_linkedin_api_v2_notice() {

?>
<div class="notice notice-error">
<?php echo sprintf( __( '%1$s%2$sRevive Old Posts:%3$s The Linkedin API Has been updated. You need to reconnect your LinkedIn account to continue posting to LinkedIn. Please see %4$sthis article for instructions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/1040-how-to-move-to-linkedin-api-v2" target="_blank">', '</a>', '<a style="float: right;" href="?rop-linkedin-api-notice-dismissed">Dismiss</a>', '</p>' ); ?>
<?php echo sprintf( __( '%1$s%2$sRevive Social:%3$s The Linkedin API Has been updated. You need to reconnect your LinkedIn account to continue posting to LinkedIn. Please see %4$sthis article for instructions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/1040-how-to-move-to-linkedin-api-v2" target="_blank">', '</a>', '<a style="float: right;" href="?rop-linkedin-api-notice-dismissed">Dismiss</a>', '</p>' ); ?>

</div>
<?php
Expand Down Expand Up @@ -1305,7 +1278,7 @@ public function rop_wp_cron_notice() {

?>
<div class="notice notice-error">
<?php echo sprintf( __( '%1$s%2$sRevive Old Posts:%3$s The WordPress Cron seems is disabled on your website. This can cause sharing issues with Revive Old Posts. If sharing is not working, then see %4$shere for solutions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/686-fix-revive-old-post-not-posting" target="_blank">', '</a>', '<a style="float: right;" href="?rop-wp-cron-notice-dismissed">Dismiss</a>', '</p>' ); ?>
<?php echo sprintf( __( '%1$s%2$sRevive Social:%3$s The WordPress Cron seems is disabled on your website. This can cause sharing issues with Revive Social. If sharing is not working, then see %4$shere for solutions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/686-fix-revive-old-post-not-posting" target="_blank">', '</a>', '<a style="float: right;" href="?rop-wp-cron-notice-dismissed">Dismiss</a>', '</p>' ); ?>

</div>
<?php
Expand Down Expand Up @@ -1451,7 +1424,7 @@ public function rop_cron_event_status_notice() {

?>
<div class="notice notice-error">
<?php echo sprintf( __( '%1$s%2$sRevive Old Posts:%3$s There might be an issue preventing Revive Old Posts from sharing to your connected accounts. If sharing is not working, then see %4$shere for solutions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/686-fix-revive-old-post-not-posting" target="_blank">', '</a>', '<a style="float: right;" href="?rop-cron-event-status-notice-dismissed">Dismiss</a>', '</p>' ); ?>
<?php echo sprintf( __( '%1$s%2$sRevive Social:%3$s There might be an issue preventing Revive Social from sharing to your connected accounts. If sharing is not working, then see %4$shere for solutions.%5$s%6$s%7$s', 'tweet-old-post' ), '<p>', '<b>', '</b>', '<a href="https://docs.revive.social/article/686-fix-revive-old-post-not-posting" target="_blank">', '</a>', '<a style="float: right;" href="?rop-cron-event-status-notice-dismissed">Dismiss</a>', '</p>' ); ?>

</div>
<?php
Expand Down Expand Up @@ -1702,9 +1675,9 @@ public function rop_remove_remote_cron_notice() {
)
);

$rop = __( 'Revive Old Posts: ', 'tweet-old-post' );
$rop = __( 'Revive Social: ', 'tweet-old-post' );
$admin_url = admin_url( 'admin.php?page=TweetOldPost' );
$notice_text = sprintf( __( 'We\'ve removed the Remote Cron service feature of Revive Old Posts. If you used this option in the past, then please %1$shead to the Revive Old Posts dashboard%2$s to start sharing using the default WordPress cron. If post sharing is not working for you, then please see %3$shere for solutions.%2$s', 'tweet-old-post' ), "<a href='$admin_url'>", '</a>', "<a href='https://docs.revive.social/article/686-fix-revive-old-post-not-posting' target='blank'>" );
$notice_text = sprintf( __( 'We\'ve removed the Remote Cron service feature of Revive Social. If you used this option in the past, then please %1$shead to the Revive Social dashboard%2$s to start sharing using the default WordPress cron. If post sharing is not working for you, then please see %3$shere for solutions.%2$s', 'tweet-old-post' ), "<a href='$admin_url'>", '</a>', "<a href='https://docs.revive.social/article/686-fix-revive-old-post-not-posting' target='blank'>" );

$message = <<<HTML
<p style="font-size: 14px">
Expand Down Expand Up @@ -1851,15 +1824,24 @@ public function register_survey() {
* @return array
*/
public function rop_upgrade_to_pro_plugin_action( $actions, $plugin_file ) {
$global_settings = new \Rop_Global_Settings();
$global_settings = new \Rop_Global_Settings();
$actions['settings'] = '<a href="' . admin_url( 'admin.php?page=TweetOldPost' ) . '">' . __( 'Settings', 'tweet-old-post' ) . '</a>';
if ( $global_settings->license_type() < 1 ) {
return array_merge(
array(
'upgrade_link' => '<a href="' . tsdk_utmify( Rop_I18n::UPSELL_LINK, 'rowaction', 'plugins' ) . '" target="_blank" title="' . __( 'More Features', 'tweet-old-post' ) . '" style="color: #006400;font-weight:700;">' . __( 'Upgrade to Pro', 'tweet-old-post' ) . '</a>',
'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>',
),
$actions
);
}

return $actions;
}
}
9 changes: 6 additions & 3 deletions includes/admin/class-rop-global-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ class Rop_Global_Settings {
'credentials' => array(
'consumer_key' => array(
'name' => 'API Key',
'description' => 'Your Twitter application api key',
'description' => 'Your X (Twitter) application api key',
),
'consumer_secret' => array(
'name' => 'API secret key',
'description' => 'Your Twitter application api secret',
'description' => 'Your X (Twitter) application api secret',
),
),
'two_step_sign_in' => true,
Expand All @@ -121,6 +121,7 @@ class Rop_Global_Settings {
'gmb' => array(
'active' => false,
'name' => 'Gmb',
'fullname' => 'Google My Business',
),
'vk' => array(
'active' => false,
Expand Down Expand Up @@ -562,7 +563,9 @@ function ( $value ) {
$available_services[ $key ] = $service;
}
}

$available_services['instagram'] = $available_services['facebook'];
$available_services['instagram']['name'] = 'Instagram';
$available_services['instagram']['active'] = false;
return $available_services;
}

Expand Down
10 changes: 5 additions & 5 deletions includes/admin/class-rop-pointers.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function create_rop_menu_pointer() {
'next_trigger' => array(),
'options' => array(
'content' => '<h3>' . esc_html__( 'Get Started', 'tweet-old-post' ) . '</h3>' .
'<p>' . esc_html__( 'Click here to get started with Revive Old Posts (ROP).', 'tweet-old-post' ) . '</p>',
'<p>' . esc_html__( 'Click here to get started with Revive Social.', 'tweet-old-post' ) . '</p>',
'position' => array(
'edge' => 'left',
'align' => 'left',
Expand Down Expand Up @@ -218,7 +218,7 @@ public function create_rop_dashboard_pointers() {
),
'options' => array(
'content' => '<h3>' . esc_html__( 'Post Types', 'tweet-old-post' ) . '</h3>' .
'<p>' . esc_html__( 'ROP works with any post type, from products to posts, to custom post types.', 'tweet-old-post' ) . '</p>' .
'<p>' . esc_html__( 'Revive Social works with any post type, from products to posts, to custom post types.', 'tweet-old-post' ) . '</p>' .
'<p>' . esc_html__( 'You can share media straight from your media library!', 'tweet-old-post' ) . '</p>' .
'<p>' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '<strong>', '<a href="https://docs.revive.social/article/968-share-different-post-types-w-revive-old-posts?utm_source=rop_pointer&utm_medium=admin_pointers&utm_campaign=rop" target="_blank">', '</a>', '</strong>' ) . '</p>',
'position' => array(
Expand Down Expand Up @@ -255,7 +255,7 @@ public function create_rop_dashboard_pointers() {
),
'options' => array(
'content' => '<h3>' . esc_html__( 'Share on Publish', 'tweet-old-post' ) . '</h3>' .
'<p>' . esc_html__( 'ROP not only works on autopilot, it can also be used to push new posts to your social networks immediately.', 'tweet-old-post' ) . '</p>' .
'<p>' . esc_html__( 'Revive Social not only works on autopilot, it can also be used to push new posts to your social networks immediately.', 'tweet-old-post' ) . '</p>' .
'<p>' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '<strong>', '<a href="https://docs.revive.social/article/933-how-to-share-posts-immediately-with-revive-old-posts?utm_source=rop_pointer&utm_medium=admin_pointers&utm_campaign=rop" target="_blank">', '</a>', '</strong>' ) . '</p>',
'position' => array(
'edge' => 'left',
Expand All @@ -272,7 +272,7 @@ public function create_rop_dashboard_pointers() {
),
'options' => array(
'content' => '<h3>' . esc_html__( 'Share Content Variations', 'tweet-old-post' ) . '</h3>' .
'<p>' . esc_html__( 'You can add multiple custom messages to individual posts as share variations! ROP will randomly select one to share.', 'tweet-old-post' ) . '</p>' .
'<p>' . esc_html__( 'You can add multiple custom messages to individual posts as share variations! Revive Social will randomly select one to share.', 'tweet-old-post' ) . '</p>' .
'<p>' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '<strong>', '<a href="https://docs.revive.social/article/971-how-to-add-variations-to-revive-old-posts-shares?utm_source=rop_pointer&utm_medium=admin_pointers&utm_campaign=rop" target="_blank">', '</a>', '</strong>' ) . '</p>',
'position' => array(
'edge' => 'left',
Expand Down Expand Up @@ -322,7 +322,7 @@ public function create_rop_dashboard_pointers() {
),
'options' => array(
'content' => '<h3>' . esc_html__( 'Sharing Queue', 'tweet-old-post' ) . '</h3>' .
'<p>' . esc_html__( 'You\'ll be able to have look at the posts scheduled to go out by ROP. You can even skip or block them from sharing in the future.', 'tweet-old-post' ) . '</p>' .
'<p>' . esc_html__( 'You\'ll be able to have look at the posts scheduled to go out by Revive Social. You can even skip or block them from sharing in the future.', 'tweet-old-post' ) . '</p>' .
'<p>' . sprintf( __( '%1$s%2$sLearn more about this feature%3$s%4$s.', 'tweet-old-post' ), '<strong>', '<a href="https://docs.revive.social/article/973-working-with-revive-old-posts-sharing-queue?utm_source=rop_pointer&utm_medium=admin_pointers&utm_campaign=rop" target="_blank">', '</a>', '</strong>' ) . '</p>',
'position' => array(
'edge' => 'left',
Expand Down
Loading

0 comments on commit 5c58fbf

Please sign in to comment.