Plugin Directory

Changeset 1857792


Ignore:
Timestamp:
04/13/2018 09:50:58 AM (8 years ago)
Author:
clientity
Message:

Added: hide chat window when wp user is logged as admin

Location:
clientity-chatbot
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • clientity-chatbot/tags/1.0.7/clientity-chatbot.php

    r1736448 r1857792  
    55Description: Chatbot to convert visits into leads
    66Author: Clientity
    7 Version: 1.0.6
     7Version: 1.0.7
    88*/
    99
     
    1414
    1515if ( ! defined( 'CLIENTITY_PLUGIN_NAME' ) ) define( 'CLIENTITY_PLUGIN_NAME', 'clientity-chatbot' );
    16 if ( ! defined( 'CLIENTITY_PLUGIN_VERSION' ) ) define( 'CLIENTITY_PLUGIN_VERSION', '1.0.6' );
     16if ( ! defined( 'CLIENTITY_PLUGIN_VERSION' ) ) define( 'CLIENTITY_PLUGIN_VERSION', '1.0.7' );
    1717
    1818
     
    4545function clientity_enqueue_scripts()
    4646{
    47     if ( is_admin() ) return; // only for admin area
     47    if ( is_admin() ) return; // Hide in admin area
     48   
     49    if( current_user_can('administrator') ) return;  // Hide if user is logged as admin
    4850     
    4951    $show_widget = false;
     
    7981        $show_widget = false;
    8082    }
     83   
     84   
     85    // Check excluded posts:
     86   
     87    // TO DO
     88   
    8189   
    8290   
  • clientity-chatbot/trunk/clientity-chatbot.php

    r1736448 r1857792  
    55Description: Chatbot to convert visits into leads
    66Author: Clientity
    7 Version: 1.0.6
     7Version: 1.0.7
    88*/
    99
     
    1414
    1515if ( ! defined( 'CLIENTITY_PLUGIN_NAME' ) ) define( 'CLIENTITY_PLUGIN_NAME', 'clientity-chatbot' );
    16 if ( ! defined( 'CLIENTITY_PLUGIN_VERSION' ) ) define( 'CLIENTITY_PLUGIN_VERSION', '1.0.6' );
     16if ( ! defined( 'CLIENTITY_PLUGIN_VERSION' ) ) define( 'CLIENTITY_PLUGIN_VERSION', '1.0.7' );
    1717
    1818
     
    4545function clientity_enqueue_scripts()
    4646{
    47     if ( is_admin() ) return; // only for admin area
     47    if ( is_admin() ) return; // Hide in admin area
     48   
     49    if( current_user_can('administrator') ) return;  // Hide if user is logged as admin
    4850     
    4951    $show_widget = false;
     
    7981        $show_widget = false;
    8082    }
     83   
     84   
     85    // Check excluded posts:
     86   
     87    // TO DO
     88   
    8189   
    8290   
Note: See TracChangeset for help on using the changeset viewer.