set_basename( false, __FILE__ ); } else { if ( !function_exists( 'pctag_fs' ) ) { if ( !defined( 'PCTAG_PLUGIN_BASE' ) ) { define( 'PCTAG_PLUGIN_BASE', plugin_basename( __FILE__ ) ); } if ( !defined( 'PCTAG_PLUGIN_DIR' ) ) { define( 'PCTAG_PLUGIN_DIR', plugins_url( '', __FILE__ ) ); } require_once __DIR__ . '/vendor/autoload.php'; // Create a helper function for easy SDK access. function pctag_fs() { global $pctag_fs; if ( !isset( $pctag_fs ) ) { // Include Freemius SDK. require_once dirname( __FILE__ ) . '/vendor/freemius/start.php'; $pctag_fs = fs_dynamic_init( array( 'id' => '3054', 'slug' => 'pctags-pinterest-conversion-tags', 'premium_slug' => 'pctags-pinterest-conversion-tag-premium', 'type' => 'plugin', 'public_key' => 'pk_7f3d162827e52ef0e6f8e46b2725f', 'is_premium' => false, 'has_addons' => false, 'has_paid_plans' => true, 'trial' => array( 'days' => 7, 'is_require_payment' => true, ), 'has_affiliation' => 'all', 'menu' => array( 'slug' => 'pctag', 'first-path' => 'admin.php?page=pctag', 'support' => false, ), 'is_live' => true, ) ); } return $pctag_fs; } // Init Freemius. pctag_fs(); // Signal that SDK was initiated. do_action( 'pctag_fs_loaded' ); function pctag_fs_settings_url() { return admin_url( 'admin.php?page=pctag' ); } pctag_fs()->add_filter( 'connect_url', 'pctag_fs_settings_url' ); pctag_fs()->add_filter( 'after_skip_url', 'pctag_fs_settings_url' ); pctag_fs()->add_filter( 'after_connect_url', 'pctag_fs_settings_url' ); pctag_fs()->add_filter( 'after_pending_connect_url', 'pctag_fs_settings_url' ); function pctag_fs_custom_icon() { return dirname( __FILE__ ) . '/admin/assets/imgs/icon.jpg'; } pctag_fs()->add_filter( 'plugin_icon', 'pctag_fs_custom_icon' ); // freemius opt-in function pctag_fs_custom_connect_message( $message, $user_first_name, $product_title, $user_login, $site_link, $freemius_link ) { $break = "

"; $more_plugins = '

Meta Tags for SEO, Auto internal links for SEO, Bulk auto image Alt Text, Bulk auto image Title Tag, Mobile view, Wordpress Better-Robots.txt, Wp Google Street View, VidSeo, ...

'; return sprintf( esc_html__( 'Hey %1$s, %2$s Click on Allow & Continue to activate PCTAGs and track conversions on your website :)! The Pinterest tag (with base & event codes) allows you to track actions people take on your website after viewing your Promoted Pin, measure return on ad spend (RoAS) and create audiences to target on your Promoted Pins. %2$s Never miss an important update -- opt-in to our security and feature updates notifications. %2$s See you on the other side.', 'add-pinterest-conversion-tags' ), $user_first_name, $break ) . $more_plugins; } pctag_fs()->add_filter( 'connect_message', 'pctag_fs_custom_connect_message', 10, 6 ); } class pctag { function __construct() { register_deactivation_hook( __FILE__, array(&$this, 'deactivate') ); add_action( 'init', array(&$this, 'pctag_textdomain') ); } public function deactivate() { if ( \Pagup\Pctag\Core\Option::check( 'pctag_remove_settings' ) ) { delete_option( 'pctag' ); } } function pctag_textdomain() { load_plugin_textdomain( "add-pinterest-conversion-tags", false, basename( dirname( __FILE__ ) ) . '/languages' ); } } $pctag = new pctag(); /*----------------------------------------- TRACK CONTROLLER ------------------------------------------*/ require_once \Pagup\Pctag\Core\Plugin::path( 'admin/controllers/TrackingController.php' ); /*----------------------------------------- Settings ------------------------------------------*/ if ( is_admin() ) { include_once \Pagup\Pctag\Core\Plugin::path( 'admin/Settings.php' ); } }