Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.txt
#	wp-simple-chat.php
  • Loading branch information
tobeyadr committed Apr 30, 2021
2 parents 36f2088 + f1e0766 commit e51d951
Show file tree
Hide file tree
Showing 8 changed files with 472 additions and 13 deletions.
45 changes: 43 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Say hello to the easiest way to add Facebook Chat to your website.

== Description ==

Facebook business chat for WordPress

👉 [Official Site](https://wpsimplechat.com/) | 📃 [Documentation](https://wpsimplechat.com/allow-chat-on-your-website/)

❤️ Free service provided by [Groundhogg](https://www.groundhogg.io/) and [MailHawk!](https://mailhawk.io/)

## Add Facebook Business Chat to your site in 5 minutes!

Having chat on your site is paramount to providing a quick and cohesive customer experience for your visitors.

By being able to chat with customers you can answer their questions in real time, and provide useful tips an insights without them having to find it on your site.
Expand All @@ -23,6 +31,25 @@ This plugin has a direct connection to Facebook and doesn't require you to sign

We currently do not provide any premium version of this tool, we just hope that you find it helpful.

## 🔎 At A Glance

* Add Facebook Business Chat to your site.
* Control the greeting message on globally and per page.
* Communicate with visitors off site through Facebook Messenger.
* Guest chat and Facebook login supported.

## ⚙️ FEATURES

* Device display and control settings.
* Show different greetings depending on their logged in status.
* Integration with [Groundhogg](https://groundhogg.io) enables you to personalize the greeting message.

## Our Sites
* [Groundhogg](https://groundhogg.io), The best CRM and Marketing Automation plugin for WordPress.
* [MailHawk](https://mailhawk.io), The easiest way to send email from your WordPress site.
* [FormLift.net](https://formlift.net), Create better Keap/Infusionsoft webforms.
* [AdrianTobey.com](https://adriantobey.com), CEO & Founder.

== Installation ==
= Plugin Repo =

Expand All @@ -37,18 +64,32 @@ We currently do not provide any premium version of this tool, we just hope that
* unzip
* activate through the plugins manager

== Screenshots ==
1. Settings
2. Chat bubble

== Frequently Asked Questions ==

= Does WP Simple Chat require any paid chat service? =
No, WP Simple Chat uses Facebook's Business Page Chat plugin which is free to use as long as you have a facebook business page.

= Do visitors need to be logged into Facebook to use the chat? =
No, if you enable the guest chat features in Facebook any non-logged in user will be able to chat with you.

= Do visitors need to be on the site to chat? =
No, once a visitor starts the chat it opens the chat in their Facebook Messenger, so you can continue the conversation off-site.

== Changelog ==

= 1.1.5 =
= 1.1.6 =
* TWEAKED Removed "Facebook" from plugin display name.

= 1.1.5 =
* ADDED Groundhogg affiliation.
* ADDED MailHawk connect.

= 1.1.4 =
* TWEAKED Reformatted a bunch of code
* TWEAKED Reformatted a bunch of code.
* FIXED Tested up to number.

= 1.1.3 =
Expand Down
13 changes: 11 additions & 2 deletions admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SimpleChat\Admin;

use ExtendedCore\Admin\Admin_Page;
use SimpleChat\Mailhawk_Connect;
use SimpleChat\Plugin;
use function ExtendedCore\get_array_var;
use function ExtendedCore\get_request_var;
Expand Down Expand Up @@ -175,6 +176,7 @@ protected function get_settings() {
public function view() {

?>
<h2 style="font-weight: 300">A <a target="_blank" href="https://www.groundhogg.io/"><img width="125" style="vertical-align: middle;margin: 0 10px" src="<?php echo SIMPLE_CHAT_ASSETS_URL . 'groundhogg-logo.png' ?>"/></a> Product!</h2>
<form method="post"><?php

wp_nonce_field( 'save' );
Expand Down Expand Up @@ -233,7 +235,14 @@ public function view() {

submit_button();

?></form><?php
?></form>
<div class="mailhawk-connect">
<h3><?php _e( 'Sending email from this site?', 'wp-simple-chat' ); ?></h3>
<?php Mailhawk_Connect::instance()->connect_ui(); ?>
</div>
<?php



}

Expand Down Expand Up @@ -280,4 +289,4 @@ public function process_save() {
protected function get_filter_prefix() {
return "simple_chat";
}
}
}
Binary file added assets/groundhogg-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions includes/core/db/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ public function build_advanced_where_statement( $where ) {
foreach ( $where as $condition ) {

if ( ! is_array( $condition ) ) {
// Todo?

} else if ( isset_not_empty( $condition, 'relationship' ) ) {

$clause[] = $this->build_advanced_where_statement( $condition );
Expand Down Expand Up @@ -1023,4 +1023,4 @@ public function get_last_changed() {
*/
abstract public function create_table();

}
}
22 changes: 19 additions & 3 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function get_simchat_options() {
* Get a simple chat option
*
* @param string $option_name
* @param bool $default
* @param bool $default
*
* @return mixed
*/
Expand Down Expand Up @@ -103,6 +103,22 @@ function simchat_option_name( $option = '' ) {
*
* @return bool
*/
function is_groundhogg_installed(){
function is_groundhogg_installed() {
return defined( 'GROUNDHOGG_VERSION' );
}
}

/**
* Add the settings link
*
* @param $links
*
* @return mixed
*/
function settings_link( $links ) {
$settings_link = '<a href="' . esc_url( admin_url( "options-general.php?page=wp-simple-chat" ) ) . '">' . __( 'Settings' ) . '</a>';
array_unshift( $links, $settings_link );

return $links;
}

add_filter( "plugin_action_links_" . SIMPLE_CHAT_PLUGIN_BASE, __NAMESPACE__ . '\settings_link' );
Loading

0 comments on commit e51d951

Please sign in to comment.