From d40a7d241e7aa97caaeb93e8712753da471bda27 Mon Sep 17 00:00:00 2001 From: Zack Katz Date: Wed, 19 Apr 2017 14:56:52 -0600 Subject: [PATCH] Version 2.1.2 --- contact-form-newsletter.php | 76 ++---------------- ctct_php_library/Authentication.php | 0 ctct_php_library/Collections.php | 0 ctct_php_library/Components.php | 0 ctct_php_library/ConstantContact.php | 0 ctct_php_library/LICENSE | 0 ctct_php_library/README | 0 ctct_php_library/config.php | 0 ctct_php_library/example_verification.php | 0 ctct_php_library/examples/addContact.php | 0 .../examples/contactReporting.php | 0 ctct_php_library/examples/createcampaign.php | 0 .../examples/example_verification.php | 0 ctct_php_library/index.php | 0 favicon.png | Bin 0 -> 747 bytes 15 files changed, 5 insertions(+), 71 deletions(-) mode change 100644 => 100755 ctct_php_library/Authentication.php mode change 100644 => 100755 ctct_php_library/Collections.php mode change 100644 => 100755 ctct_php_library/Components.php mode change 100644 => 100755 ctct_php_library/ConstantContact.php mode change 100644 => 100755 ctct_php_library/LICENSE mode change 100644 => 100755 ctct_php_library/README mode change 100644 => 100755 ctct_php_library/config.php mode change 100644 => 100755 ctct_php_library/example_verification.php mode change 100644 => 100755 ctct_php_library/examples/addContact.php mode change 100644 => 100755 ctct_php_library/examples/contactReporting.php mode change 100644 => 100755 ctct_php_library/examples/createcampaign.php mode change 100644 => 100755 ctct_php_library/examples/example_verification.php mode change 100644 => 100755 ctct_php_library/index.php create mode 100644 favicon.png diff --git a/contact-form-newsletter.php b/contact-form-newsletter.php index 460a9ec..9328824 100644 --- a/contact-form-newsletter.php +++ b/contact-form-newsletter.php @@ -3,7 +3,7 @@ Plugin Name: Fast Secure Contact Form Newsletter Add-on Plugin URI: http://www.katzwebservices.com Description: Integrate Constant Contact with Fast Secure Contact Form -Version: 2.1.1 +Version: 2.1.2 Author: Katz Web Services, Inc. Author URI: http://www.katzwebservices.com @@ -33,13 +33,9 @@ class FSCF_CTCT { * Add actions to load the plugin */ public function __construct() { - $this->version = '2.1.1'; + $this->version = '2.1.2'; self::$path = plugin_dir_path( __FILE__ ); - // PressTrends WordPress Action - add_action('admin_init', array(&$this, 'presstrends')); - add_action('fscfctct_event', array(&$this, 'track_event'), 1, 1 ); - /** * If the server doesn't support PHP 5.3, sorry, but you're outta luck. */ @@ -51,7 +47,6 @@ public function __construct() { } require_once(self::$path."ctct_php_library/ConstantContact.php"); - require_once(self::$path."nameparse.php"); add_action('fsctf_newsletter_tab', array(&$this, 'adminDisplayForm')); add_action('admin_init', array(&$this, 'adminProcessSettings')); @@ -622,6 +617,8 @@ function generateContactArray(&$data = array(), $post = array(), $form = array() $fields['emailAddress'] = self::getIfSet($post, 'email'); $fields['emailAddress'] = $fields['emailAddress'] ? $fields['emailAddress'] : self::getIfSet($data, 'from_email'); + require_once(self::$path."nameparse.php"); + // 1. Parse the from_name parameter for initial data. $fields = $this->parseName(@$data['from_name'], $fields); @@ -823,72 +820,9 @@ function addUpdateContact($fields, $lists) { return $AddedContact; } - - function track_event($event_name) { - // PressTrends Account API Key & Theme/Plugin Unique Auth Code - $api_key = 'mc9ossbhdx30z6l7x4dnchacxpzhp6e054t4'; - $auth = 'fkw7nfo4tk63nr0u6oohfyqxnesb8gc46'; - $api_base = 'http://api.presstrends.io/index.php/api/events/track/auth/'; - $api_string = $api_base . $auth . '/api/' . $api_key . '/'; - $site_url = base64_encode(site_url()); - $event_string = $api_string . 'name/' . urlencode($event_name) . '/url/' . $site_url . '/'; - wp_remote_get( $event_string ); - } - - function presstrends() { - // PressTrends Account API Key - $api_key = 'mc9ossbhdx30z6l7x4dnchacxpzhp6e054t4'; - $auth = 'fkw7nfo4tk63nr0u6oohfyqxnesb8gc46'; - // Start of Metrics - global $wpdb; - $data = get_transient( 'presstrends_cache_data' ); - if ( !$data || $data == '' ) { - $api_base = 'http://api.presstrends.io/index.php/api/pluginsites/update/auth/'; - $url = $api_base . $auth . '/api/' . $api_key . '/'; - $count_posts = wp_count_posts(); - $count_pages = wp_count_posts( 'page' ); - $comments_count = wp_count_comments(); - if ( function_exists( 'wp_get_theme' ) ) { - $theme_data = wp_get_theme(); - $theme_name = urlencode( $theme_data->Name ); - } else { - $theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' ); - $theme_name = $theme_data['Name']; - } - $plugin_name = '&'; - foreach ( get_plugins() as $plugin_info ) { - if(strlen($plugin_name.$plugin_info['Name'] . '&') > 3000) { continue; } // Too long! - $plugin_name .= $plugin_info['Name'] . '&'; - } - // CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE - $plugin_data = get_plugin_data( __FILE__ ); - $posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" ); - $data = array( - 'url' => stripslashes( str_replace( array( 'http://', '/', ':' ), '', site_url() ) ), - 'posts' => $count_posts->publish, - 'pages' => $count_pages->publish, - 'comments' => $comments_count->total_comments, - 'approved' => $comments_count->approved, - 'spam' => $comments_count->spam, - 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ), - 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0, - 'theme_version' => $plugin_data['Version'], - 'theme_name' => $theme_name, - 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ), - 'plugins' => count( get_option( 'active_plugins' ) ), - 'plugin' => urlencode( $plugin_name ), - 'wpversion' => get_bloginfo( 'version' ), - ); - foreach ( $data as $k => $v ) { - $url .= $k . '/' . $v . '/'; - } - wp_remote_get( $url ); - set_transient( 'presstrends_cache_data', $data, 60 * 60 * 24 ); - } - } } -$FSCF_CTCT = new FSCF_CTCT; +new FSCF_CTCT; /** * Required to trigger tab for FSCF diff --git a/ctct_php_library/Authentication.php b/ctct_php_library/Authentication.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/Collections.php b/ctct_php_library/Collections.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/Components.php b/ctct_php_library/Components.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/ConstantContact.php b/ctct_php_library/ConstantContact.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/LICENSE b/ctct_php_library/LICENSE old mode 100644 new mode 100755 diff --git a/ctct_php_library/README b/ctct_php_library/README old mode 100644 new mode 100755 diff --git a/ctct_php_library/config.php b/ctct_php_library/config.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/example_verification.php b/ctct_php_library/example_verification.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/examples/addContact.php b/ctct_php_library/examples/addContact.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/examples/contactReporting.php b/ctct_php_library/examples/contactReporting.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/examples/createcampaign.php b/ctct_php_library/examples/createcampaign.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/examples/example_verification.php b/ctct_php_library/examples/example_verification.php old mode 100644 new mode 100755 diff --git a/ctct_php_library/index.php b/ctct_php_library/index.php old mode 100644 new mode 100755 diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..59f7be08653df00766c9bc6f661b68c26db8a5a0 GIT binary patch literal 747 zcmVJNR5%fxQ%gt{Q5gQt%xHJK54*nYW>JP(NreSU4;PUw!bKR_ zV-ZpN2-?}os7>1<$`%zwL62SbBw8i3C`wvnP-c0rudAtZ=g#w-(|@kHONtJB^UpB< z_sw^{{|uy*CgB=kn((hn^(u}Dy4)cA@4Co{nFnAJ{49ti?izF9&b4oxiJ}p&+ zoreA4Dy+eq(38!m?(PSeR%l;ZK!)HmgK$4yhCA{c-18t<3_;#TqO}L5t*8GWAO)nG z0nhZq|9l;M_A7+YAW#A>bcm3F69UIWRo4SVRfer^t0d>ypWi8(||OiWB$=st4^q1lXOJMV!B2Sfp5loz8aeIT3%gbh7fg=G6V z)E;~Ymg?xCDNqAAtXvKU_H096?+Iw>J8%b1(wibk7KMy9z^Lm&(W*}9@zpd0nu0S5 z!|^#;3n4{7sp`1>=ryX#OL6|x5kz(^rwl@972CmzY4*yFKLauO3_LpkxDzls+Sa4C zJc^C=HK?zvz}i$Lk_kFj1}(Dt_ni2RS`4_#?Tj_X^if5d>i{on8l{XdK8s4 zLC(`QxU-OllvniK`;WgQQYB+7Mca+3?Wh1qPyMMd3>{-x3vWMVu%&Sg%*xGxJv@$J du8%=G`wItk#W8