pro_extenstions();
$this->fs = freemius( 10461 );
$hide_notice = get_transient( 'post_smtp_skip_banner' );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
$this->fs->add_action( 'addons/after_addons', array( $this, 'promote_bundles_fs' ) );
if( !$hide_notice ) {
add_action( 'post_smtp_dashboard_after_config', array( $this, 'promote_bundles_dashboard' ) );
}
add_filter( 'gettext', array( $this, 'change_fs_submenu_text' ), 10, 3 );
add_action( 'admin_action_ps_skip_pro_banner', array( $this, 'skip_pro_banner' ) );
add_action( 'init', array( $this, 'init' ) );
}
/**
* Gather pro extenstions
*
* @since 2.2
* @version 1.0
*/
public function pro_extenstions() {
if( !class_exists( 'Post_Smtp_Office365' ) ) {
$this->data[] = array(
'extenstion' => 'Office365 API (Pro)',
'logo' => POST_SMTP_ASSETS . 'images/logos/office365.png',
'pro' => POST_SMTP_ASSETS . 'images/icons/pro.png',
'url' => 'https://postmansmtp.com/extensions/office-365-extension-for-post-smtp/'
);
}
if( !class_exists( 'Post_Smtp_Amazon_Ses' ) ) {
$this->data[] = array(
'extenstion' => 'Amazon SES (Pro)',
'logo' => POST_SMTP_ASSETS . 'images/logos/amazonses.png',
'pro' => POST_SMTP_ASSETS . 'images/icons/pro.png',
'url' => 'https://postmansmtp.com/extensions/post-smtp-extension-for-amazon-ses/'
);
}
if( !class_exists( 'PostSMTP_ZohoMail' ) ) {
$this->data[] = array(
'extenstion' => 'Zoho (Pro)',
'logo' => POST_SMTP_ASSETS . 'images/logos/zoho.jpg',
'pro' => POST_SMTP_ASSETS . 'images/icons/pro.png',
'url' => 'https://postmansmtp.com/extensions/zoho-mail-pro-extension/'
);
}
}
/**
* Enqueue Script | Action call-back
*
* @since 2.2
* @version 1.0
*/
public function admin_enqueue_scripts() {
$pluginData = apply_filters( 'postman_get_plugin_metadata', null );
wp_register_script( 'postman-suggest-pro-sockets', POST_SMTP_ASSETS . 'js/postman-admin.js', array( 'jquery' ), $pluginData['version'], true );
wp_enqueue_script( 'postman-suggest-pro-sockets' );
wp_localize_script(
'postman-suggest-pro-sockets',
'postmanPro',
$this->data
);
}
/**
* Promote bundles HTML
*
* @since 2.5.9.3
* @version 1.0
*/
public function promote_bundles_html() {
?>