Plugin Directory

Changeset 2249375


Ignore:
Timestamp:
02/24/2020 03:10:20 PM (6 years ago)
Author:
highways
Message:

Version 1.0.1

Location:
highways-sync-for-intercom/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • highways-sync-for-intercom/trunk/highways-sync-for-intercom.php

    r2248936 r2249375  
    44 * Plugin URI:  https://www.highways.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * Description: A complete WordPress to Intercom Sync Plugin
    6  * Version: 1.0
     6 * Version: 1.0.1
    77 * Author: Highways.io
    88 * Author URI: https://www.highways.io/?utm_source=wp-plugins&utm_campaign=intercom-wp&utm_medium=wp-dash
     
    2222if ( ! defined( 'ABSPATH' ) ) exit;
    2323
    24 define( 'INTERCOM_WP_VERSION', '1.0' );
     24define( 'INTERCOM_WP_VERSION', '1.0.1' );
    2525define( 'INTERCOM_WP_PREVIOUS_STABLE_VERSION', '1.0' );
    2626define( 'INTERCOM_WP_NAME', 'Highways Sync for Intercom' );
  • highways-sync-for-intercom/trunk/includes/plugin.php

    r2248936 r2249375  
    7575        }
    7676       
    77         /* Intercom */
     77        /* Intercom SDK */
    7878       
    7979        require INTERCOM_WP_PATH . '/includes/intercom.php';
     
    8686       
    8787        $this->webhooks = new \Intercom_WP\Webhooks;
     88       
     89        /* Chat Bubble */
     90       
     91        require INTERCOM_WP_PATH . '/includes/chat-bubble.php';
     92       
     93        $chat = new \Intercom_WP\Chat_Bubble;
    8894       
    8995        /* Action Scheduler */
     
    125131        array('intercom_wp_intercom_api_key', 'XXXXOjA4ZmJiODkwXzJmMzRfNGYXXXXiM2Q0X2QzMDk4MGJmOTBkMToXXXX=')
    126132        ); 
     133       
     134        /* Check for official Intercom Plugin options */
     135       
     136        $app_id = '';
     137        $secret = '';
     138       
     139        $intercom_options = get_option('intercom');
     140       
     141        if(is_array($intercom_options)) {
     142           
     143            $options = get_option( 'intercom_wp_settings' );
     144           
     145            if(!$options || !is_array($options)) {
     146                   
     147                $options = [];
     148            }
     149           
     150            $app_id = isset($intercom_options['app_id']) ? $intercom_options['app_id'] : false;
     151           
     152            if($app_id) {
     153               
     154                $options['intercom_wp_intercom_app_id'] = $app_id;
     155            }
     156           
     157            $secret = isset($intercom_options['secret']) ? $intercom_options['secret'] : false;
     158           
     159            if($secret) {
     160               
     161                $options['intercom_wp_intercom_secret'] = $secret;
     162            }
     163           
     164            update_option('intercom_wp_settings', $options);
     165        }
     166       
     167        add_settings_field(
     168        'intercom_wp_intercom_app_id',
     169        __( 'Intercom App ID', INTERCOM_WP_TEXT_DOMAIN ),
     170        [$this, 'intercom_wp_render_field'],
     171        'intercomWP',
     172        'intercomWP_section',
     173        array('intercom_wp_intercom_app_id', 'abcd123')
     174        );
     175       
     176        add_settings_field(
     177        'intercom_wp_intercom_secret',
     178        __( 'Intercom Verification Secret', INTERCOM_WP_TEXT_DOMAIN ),
     179        [$this, 'intercom_wp_render_field'],
     180        'intercomWP',
     181        'intercomWP_section',
     182        array('intercom_wp_intercom_secret', 'xxxxBMbJEcSstXXXXfZdmLoSgMeXXXXyJuXXXXX')
     183        );
     184       
     185        /* End official Intercom Plugin options */
     186       
     187        add_settings_field('enable_chat_bubble', 'Enable Chat Bubble', [$this, 'intercom_wp_checkbox'], 'intercomWP', 'intercomWP_section', ['field' => 'enable_chat_bubble']);
     188       
     189        add_settings_field('enable_web_verification', 'Enable User Verification (Recommended)', [$this, 'intercom_wp_checkbox'], 'intercomWP', 'intercomWP_section', ['field' => 'enable_web_verification']);
    127190       
    128191        add_settings_field('enable_sync_calls', 'Enable Synchronous Calls', [$this, 'intercom_wp_checkbox'], 'intercomWP', 'intercomWP_section', ['field' => 'enable_sync_calls']);
  • highways-sync-for-intercom/trunk/readme.txt

    r2248936 r2249375  
    9696== Changelog ==
    9797
     98= 1.0.1 =
     99* Added Intercom chat bubble functionality
     100* Added User Verification for web chat
     101
    98102= 1.0 =
    99103* First Commit
Note: See TracChangeset for help on using the changeset viewer.