Changeset 2408325
- Timestamp:
- 10/28/2020 02:12:31 PM (5 years ago)
- Location:
- follow-hook/trunk
- Files:
-
- 3 edited
-
follow-hook.php (modified) (29 diffs)
-
readme.txt (modified) (3 diffs)
-
time.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
follow-hook/trunk/follow-hook.php
r2318605 r2408325 4 4 Plugin URI: https://followhook.com/ 5 5 Description: A custom CRM plugin developed by Kyler Boudreau and Ian Lincicome. 6 Version: 1.2. 17 Author: Kyler Boudreau and Ian Lincicome of Follow Hook 6 Version: 1.2.2 7 Author: Kyler Boudreau and Ian Lincicome of Follow Hook 8 8 Author URI: https://followhook.com 9 9 License: GPL2 … … 13 13 the Free Software Foundation, either version 2 of the License, or 14 14 any later version. 15 15 16 16 Follow Hook is distributed in the hope that it will be useful, 17 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 19 GNU General Public License for more details. 20 20 21 21 You should have received a copy of the GNU General Public License 22 22 along with Follow Hook. If not, see http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. … … 152 152 function Follow_Hook_addJSscripts() { 153 153 $cdir = plugin_dir_url(__FILE__); 154 wp_enqueue_script('date-js-code', $cdir.'js/js-date-functions.js'); 154 wp_enqueue_script('date-js-code', $cdir.'js/js-date-functions.js'); 155 155 }//end Follow_Hook_addJSscripts PHP function 156 156 … … 174 174 if(is_a( $post, 'WP_Post') && has_shortcode($post->post_content, 'manage_communication_preferences')) { 175 175 $cdir = plugin_dir_url(__FILE__); 176 wp_enqueue_style('fh_mcp_style', $cdir.'css/opt-in-opt-out.css'); 177 } 178 }//End Follow_Hook_add_manage_communication_preferences_style function 176 wp_enqueue_style('fh_mcp_style', $cdir.'css/opt-in-opt-out.css'); 177 } 178 }//End Follow_Hook_add_manage_communication_preferences_style function 179 179 add_action('wp_enqueue_scripts', 'Follow_Hook_add_manage_communication_preferences_style'); 180 180 … … 186 186 if($currents =='people' && $currenta == 'edit'){ 187 187 $cdir = plugin_dir_url(__FILE__); 188 wp_enqueue_script('cal-js-code', $cdir.'js/calendar-code.js'); 188 wp_enqueue_script('cal-js-code', $cdir.'js/calendar-code.js'); 189 189 } 190 190 } … … 195 195 if ($page !== 'toplevel_page_follow_hook_settings') return; 196 196 $cdir = plugin_dir_url(__FILE__); 197 wp_enqueue_script('cal-js-code', $cdir.'js/calendar-code.js'); 197 wp_enqueue_script('cal-js-code', $cdir.'js/calendar-code.js'); 198 198 }//end Follow_Hook_add_JS_to_calendar_for_dash function 199 199 … … 228 228 if(is_a( $post, 'WP_Post') && has_shortcode($post->post_content, 'manage_communication_preferences')) { 229 229 $cdir = plugin_dir_url(__FILE__); 230 wp_enqueue_script('fh_mcp_js', $cdir.'js/opt-out.js'); 231 } 232 }//End Follow_Hook_add_manage_communication_preferences_js function 230 wp_enqueue_script('fh_mcp_js', $cdir.'js/opt-out.js'); 231 } 232 }//End Follow_Hook_add_manage_communication_preferences_js function 233 233 add_action('wp_enqueue_scripts', 'Follow_Hook_add_manage_communication_preferences_js'); 234 234 … … 261 261 wp_enqueue_script('jquery-ui-datepicker'); 262 262 wp_register_style('jquery-ui', $cdir.'css/jquery-ui.css'); 263 wp_enqueue_style('jquery-ui'); 263 wp_enqueue_style('jquery-ui'); 264 264 //Here I added css for span into buttons for campaign admin pages: 265 265 wp_enqueue_style('button_span', $cdir.'css/span_buttons.css'); … … 298 298 add_action('admin_enqueue_scripts', 'Follow_Hook_my_custom_fonts'); 299 299 function Follow_Hook_my_custom_fonts() { 300 wp_enqueue_style('custom_wp_admin_fonts', plugins_url('css/admin.css', __FILE__)); 300 wp_enqueue_style('custom_wp_admin_fonts', plugins_url('css/admin.css', __FILE__)); 301 301 } 302 302 … … 308 308 wp_enqueue_script('fix_FH_icon', plugins_url('js/fix_FH_icon.js', __FILE__)); 309 309 wp_localize_script('fix_FH_icon', 'myScript', array( 310 'ppath' => $ppath, 310 'ppath' => $ppath, 311 311 'ppath2' => $ppath2, 312 312 )); … … 887 887 remove_menu_page('edit.php?post_type=touchpoints'); 888 888 remove_menu_page('edit.php?post_type=people'); 889 889 890 890 //Then add menu items: 891 891 $page_title='Follow Hook'; … … 912 912 add_submenu_page(NULL, 'Select GDPR for Forms', 'Select GDPR for Forms',$capability, 'forms_GDPR_admin_pg','Follow_Hook_create_GDPR_pg'); 913 913 //custom fields link: 914 add_submenu_page($menu_slug,'Custom Fields', 'Custom Fields',$capability, 'Follow_Hook_custom_fields_admin_pg', 'Follow_Hook_custom_fields_admin_pg'); 914 add_submenu_page($menu_slug,'Custom Fields', 'Custom Fields',$capability, 'Follow_Hook_custom_fields_admin_pg', 'Follow_Hook_custom_fields_admin_pg'); 915 915 //add_submenu_page($menu_slug, 'Test Page 2', 'Test Page 2',$capability, 'testpg2','testpg2');//remove when not testing by commenting out! 916 916 }//end follow_hook_free_admin_menu function to build the cultivate menu in wp-admin for free plugin … … 997 997 $formdata = $submission->get_posted_data(); 998 998 //get the submitted form's ID: 999 $form_id = $formdata['_wpcf7']; 999 //$form_id = $formdata['_wpcf7']; 1000 1001 //$form_id = $formdata['_wpcf7']; 1002 $wpcf = WPCF7_ContactForm::get_current(); 1003 $form_id = $wpcf->id; 1004 1005 1000 1006 $log .= "CF7 Form ID: $form_id\n"; 1001 1007 //if $form_id is in formids array, then use data to build a new people post: … … 1056 1062 1057 1063 //if cfld is email or _email, then check for existing email before moving forward: 1058 1064 1059 1065 if($cfld == "email" || $cfld == "_email"){ 1060 1066 $args = array( … … 1078 1084 }//end if found people with email 1079 1085 }//end if cfld is email or _email then check for existing email... 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1086 1092 if($cfld=='_status'){ 1087 1093 $_status = $GDPR_opt; … … 1092 1098 //$log .= "*Field name $cfld set to $vl\n"; 1093 1099 } 1094 1100 1095 1101 }//and for each result 1096 1102 $ii++; … … 1408 1414 $tFile = $cdir.'time.txt'; 1409 1415 $ftime = ""; 1410 if($file = fopen($tFile, "r")){ 1416 if($file = fopen($tFile, "r")){ 1411 1417 //Output a line of the file until the end is reached: 1412 1418 if($file){ … … 1422 1428 Follow_Hook_log_debug("failed to read time.txt time\n","a.log"); 1423 1429 } 1424 1430 1425 1431 $lasttime = new DateTime($ftime); 1426 1432 $dt = new DateTime("now");//for use of keeping track of function runs 1427 1433 1428 1434 $dtf = $dt->format('Y-m-d H:i:s');//formats $dt to display it 1429 1435 Follow_Hook_log_debug("Current time: $dtf\n","a.log"); … … 1445 1451 Follow_Hook_log_debug("------NOT enough time since last run function stopped!\n","a.log"); 1446 1452 return; 1447 } 1453 } 1448 1454 //store the time the function is being ran: 1449 1455 //store time in time.txt: … … 1451 1457 fwrite($fh, $dtf); 1452 1458 fclose($fh); 1453 if(function_exists('check_import_queue')) check_import_queue(); 1459 if(function_exists('check_import_queue')) check_import_queue(); 1454 1460 }//end if it's been more than cron_min 1455 1461 //}//end if times don't match! … … 1555 1561 function Follow_Hook_remove_TP_on_del_pod_from_person($object_id, $tt_ids, $taxonomy) { 1556 1562 // Follow_Hook_log_debug("\n---Follow_Hook_remove_TP_on_del_pod_from_person function fired!---\n\n"); 1557 1563 1558 1564 //Follow_Hook_log_debug("Obj ID: $object_id\n"); 1559 1565 //Follow_Hook_log_debug("tt id: $tt_ids\n"); … … 1921 1927 add_filter('update_post_metadata', 'FH_check_people_email', 10, 4); 1922 1928 add_filter( 'add_post_metadata', 'FH_check_people_email', 10, 4 ); 1923 // define the update_post_metadata callback 1924 function FH_check_people_email($array, $post_id, $k, $val) { 1929 // define the update_post_metadata callback 1930 function FH_check_people_email($array, $post_id, $k, $val) { 1925 1931 1926 1932 $post_type = get_post_type($post_id); … … 1928 1934 return $null; 1929 1935 }else{ 1930 // make filter magic happen here... 1936 // make filter magic happen here... 1931 1937 //Follow_Hook_log_debug("array value: $array\n","eml.log"); 1932 1938 Follow_Hook_log_debug("Post ID: $post_id\n","eml.log"); … … 1934 1940 Follow_Hook_log_debug("Val: $val\n","eml.log"); 1935 1941 //Follow_Hook_log_debug("next value: $a\n","eml.log"); 1936 //return $array; 1942 //return $array; 1937 1943 //see if email exists: 1938 1944 global $wpdb; … … 1943 1949 //If email exists don't save it and throw error: 1944 1950 if(!empty($exists)){ 1945 1951 1946 1952 $foundid = $exists[0]; 1947 1953 Follow_Hook_log_debug("Found email for user with id: $foundid\n\n","eml.log"); … … 1951 1957 //add_action( 'admin_notices', 'FH_people_admin_notice',10, 2 ); 1952 1958 fh_error('email_exists','Oops! The email you have entered belongs to another person, please use another email address.'); 1953 Follow_Hook_log_debug("Sent error.... This user id: $post_id Other user using email id: $foundid\n\n","eml.log"); 1959 Follow_Hook_log_debug("Sent error.... This user id: $post_id Other user using email id: $foundid\n\n","eml.log"); 1954 1960 //throw wp-admin error: 1955 1961 1956 1962 $_SESSION['Follow_Hook_my_admin_notices'] .= '<div class="notice notice-error is-dismissible"><p>Opps! Sorry, a person with email '.$val.' already exists, please use a different email address to continue.</p></div>'; 1957 1963 return false; … … 2014 2020 2015 2021 //add_action( 'admin_notices', 'FH_people_admin_notice' ); 2016 2022 2017 2023 2018 2024 … … 2047 2053 $screen = get_current_screen(); 2048 2054 if($screen->post_type == 'people') { 2049 wp_enqueue_script('del_tp_hist', plugins_url('js/del_tp_history.js', __FILE__)); 2055 wp_enqueue_script('del_tp_hist', plugins_url('js/del_tp_history.js', __FILE__)); 2050 2056 }//end if people screen 2051 2057 } … … 2061 2067 $personsid = '';//sets the person's ID as blank 2062 2068 } 2063 2069 2064 2070 //now build the option name as personal_tp_note_ or _tp_note_(it should be one or the other) followed by tp id: 2065 2071 //$opt_name = "personal_tp_note_".$tpidof; -
follow-hook/trunk/readme.txt
r2318605 r2408325 4 4 Plugin Name: Follow Hook CRM 5 5 Plugin URI: https://followhook.com/ 6 Tags: CRM, Contact Management, ConvertKit, Mailchimp, Email Marketing, Text Marketing, Project Broadcast6 Tags: CRM, Contact Management, Project Broadcast, ConvertKit, Mailchimp, Contact Form 7, Email Marketing, Text Marketing 7 7 Author URI: https://followhook.com/ 8 8 Author: Kyler Boudreau and Ian Lincicome of Follow Hook 9 Requires at least: 5. 010 Tested up to: 5. 49 Requires at least: 5.5.0 10 Tested up to: 5.5.1 11 11 Stable tag: trunk 12 Version: 2.0.112 Version: 1.2.2 13 13 Requires PHP: 7.1 14 14 License URI: https://followhook.com/downloads/follow-hook/ … … 65 65 For general CRM documentation, please visit [Follow Hook University](https://followhook.com/university/). 66 66 67 == Upgrade Notice ==68 = 2.0 =69 This is the first free version of Follow Hook made available publicly via wordpress.org70 71 67 == Frequently Asked Questions == 72 68 … … 108 104 * Version 1.0.3 converted Follow Hook Tags into Follow Hook Groups 109 105 * Version 1.0.4 fixes a hard-coded URL by replacing it with it's dynamic counter-part. 110 * Version 1.2.0 includes code that works in tandem with V1.4.1 of the Pro add-on. 106 * Version 1.2.1 includes code that works in tandem with V1.4.1 of the Pro add-on. 107 * Version 1.2.2 includes fix for Contact Form 7 submissions. -
follow-hook/trunk/time.txt
r2141463 r2408325 1 2020-10-28 13:41:17
Note: See TracChangeset
for help on using the changeset viewer.