Zendesk Chat - Version 1.4.8

Version Description

  • Remove old files in base directory
Download this release

Release Info

Developer zendesk_official
Plugin Icon 128x128 Zendesk Chat
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.7 to 1.4.8

Files changed (7) hide show
  1. JSON.php +0 -825
  2. README.md +0 -7
  3. accountconfig.php +0 -206
  4. readme.txt +4 -1
  5. zopim.css +0 -30
  6. zopim.js +0 -3
  7. zopim.php +2 -2
JSON.php DELETED
@@ -1,825 +0,0 @@
1
- <?php
2
- if ( ! class_exists( 'Services_JSON' ) ):
3
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
-
5
- /**
6
- * Converts to and from JSON format.
7
- *
8
- * JSON (JavaScript Object Notation) is a lightweight data-interchange
9
- * format. It is easy for humans to read and write. It is easy for machines
10
- * to parse and generate. It is based on a subset of the JavaScript
11
- * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
12
- * This feature can also be found in Python. JSON is a text format that is
13
- * completely language independent but uses conventions that are familiar
14
- * to programmers of the C-family of languages, including C, C++, C#, Java,
15
- * JavaScript, Perl, TCL, and many others. These properties make JSON an
16
- * ideal data-interchange language.
17
- *
18
- * This package provides a simple encoder and decoder for JSON notation. It
19
- * is intended for use with client-side Javascript applications that make
20
- * use of HTTPRequest to perform server communication functions - data can
21
- * be encoded into JSON notation for use in a client-side javascript, or
22
- * decoded from incoming Javascript requests. JSON format is native to
23
- * Javascript, and can be directly eval()'ed with no further parsing
24
- * overhead
25
- *
26
- * All strings should be in ASCII or UTF-8 format!
27
- *
28
- * LICENSE: Redistribution and use in source and binary forms, with or
29
- * without modification, are permitted provided that the following
30
- * conditions are met: Redistributions of source code must retain the
31
- * above copyright notice, this list of conditions and the following
32
- * disclaimer. Redistributions in binary form must reproduce the above
33
- * copyright notice, this list of conditions and the following disclaimer
34
- * in the documentation and/or other materials provided with the
35
- * distribution.
36
- *
37
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
38
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
39
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
40
- * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
41
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
42
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
43
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
45
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
46
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
47
- * DAMAGE.
48
- *
49
- * @category
50
- * @package Services_JSON
51
- * @author Michal Migurski <mike-json@teczno.com>
52
- * @author Matt Knapp <mdknapp[at]gmail[dot]com>
53
- * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
54
- * @copyright 2005 Michal Migurski
55
- * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
56
- * @license http://www.opensource.org/licenses/bsd-license.php
57
- * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
58
- */
59
-
60
- /**
61
- * Marker constant for Services_JSON::decode(), used to flag stack state
62
- */
63
- define( 'SERVICES_JSON_SLICE', 1 );
64
-
65
- /**
66
- * Marker constant for Services_JSON::decode(), used to flag stack state
67
- */
68
- define( 'SERVICES_JSON_IN_STR', 2 );
69
-
70
- /**
71
- * Marker constant for Services_JSON::decode(), used to flag stack state
72
- */
73
- define( 'SERVICES_JSON_IN_ARR', 3 );
74
-
75
- /**
76
- * Marker constant for Services_JSON::decode(), used to flag stack state
77
- */
78
- define( 'SERVICES_JSON_IN_OBJ', 4 );
79
-
80
- /**
81
- * Marker constant for Services_JSON::decode(), used to flag stack state
82
- */
83
- define( 'SERVICES_JSON_IN_CMT', 5 );
84
-
85
- /**
86
- * Behavior switch for Services_JSON::decode()
87
- */
88
- define( 'SERVICES_JSON_LOOSE_TYPE', 16 );
89
-
90
- /**
91
- * Behavior switch for Services_JSON::decode()
92
- */
93
- define( 'SERVICES_JSON_SUPPRESS_ERRORS', 32 );
94
-
95
- /**
96
- * Converts to and from JSON format.
97
- *
98
- * Brief example of use:
99
- *
100
- * <code>
101
- * // create a new instance of Services_JSON
102
- * $json = new Services_JSON();
103
- *
104
- * // convert a complexe value to JSON notation, and send it to the browser
105
- * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
106
- * $output = $json->encode($value);
107
- *
108
- * print($output);
109
- * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
110
- *
111
- * // accept incoming POST data, assumed to be in JSON notation
112
- * $input = file_get_contents('php://input', 1000000);
113
- * $value = $json->decode($input);
114
- * </code>
115
- */
116
- class Services_JSON {
117
- /**
118
- * constructs a new JSON instance
119
- *
120
- * @param int $use object behavior flags; combine with boolean-OR
121
- *
122
- * possible values:
123
- * - SERVICES_JSON_LOOSE_TYPE: loose typing.
124
- * "{...}" syntax creates associative arrays
125
- * instead of objects in decode().
126
- * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
127
- * Values which can't be encoded (e.g. resources)
128
- * appear as NULL instead of throwing errors.
129
- * By default, a deeply-nested resource will
130
- * bubble up with an error, so all return values
131
- * from encode() should be checked with isError()
132
- */
133
- function Services_JSON( $use = 0 ) {
134
- $this->use = $use;
135
- }
136
-
137
- /**
138
- * convert a string from one UTF-16 char to one UTF-8 char
139
- *
140
- * Normally should be handled by mb_convert_encoding, but
141
- * provides a slower PHP-only method for installations
142
- * that lack the multibye string extension.
143
- *
144
- * @param string $utf16 UTF-16 character
145
- *
146
- * @return string UTF-8 character
147
- * @access private
148
- */
149
- function utf162utf8( $utf16 ) {
150
- // oh please oh please oh please oh please oh please
151
- if ( function_exists( 'mb_convert_encoding' ) ) {
152
- return mb_convert_encoding( $utf16, 'UTF-8', 'UTF-16' );
153
- }
154
-
155
- $bytes = ( ord( $utf16{0} ) << 8 ) | ord( $utf16{1} );
156
-
157
- switch ( true ) {
158
- case ( ( 0x7F & $bytes ) == $bytes ):
159
- // this case should never be reached, because we are in ASCII range
160
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
161
- return chr( 0x7F & $bytes );
162
-
163
- case ( 0x07FF & $bytes ) == $bytes:
164
- // return a 2-byte UTF-8 character
165
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
166
- return chr( 0xC0 | ( ( $bytes >> 6 ) & 0x1F ) )
167
- . chr( 0x80 | ( $bytes & 0x3F ) );
168
-
169
- case ( 0xFFFF & $bytes ) == $bytes:
170
- // return a 3-byte UTF-8 character
171
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
172
- return chr( 0xE0 | ( ( $bytes >> 12 ) & 0x0F ) )
173
- . chr( 0x80 | ( ( $bytes >> 6 ) & 0x3F ) )
174
- . chr( 0x80 | ( $bytes & 0x3F ) );
175
- }
176
-
177
- // ignoring UTF-32 for now, sorry
178
- return '';
179
- }
180
-
181
- /**
182
- * convert a string from one UTF-8 char to one UTF-16 char
183
- *
184
- * Normally should be handled by mb_convert_encoding, but
185
- * provides a slower PHP-only method for installations
186
- * that lack the multibye string extension.
187
- *
188
- * @param string $utf8 UTF-8 character
189
- *
190
- * @return string UTF-16 character
191
- * @access private
192
- */
193
- function utf82utf16( $utf8 ) {
194
- // oh please oh please oh please oh please oh please
195
- if ( function_exists( 'mb_convert_encoding' ) ) {
196
- return mb_convert_encoding( $utf8, 'UTF-16', 'UTF-8' );
197
- }
198
-
199
- switch ( strlen( $utf8 ) ) {
200
- case 1:
201
- // this case should never be reached, because we are in ASCII range
202
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
203
- return $utf8;
204
-
205
- case 2:
206
- // return a UTF-16 character from a 2-byte UTF-8 char
207
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
208
- return chr( 0x07 & ( ord( $utf8{0} ) >> 2 ) )
209
- . chr( ( 0xC0 & ( ord( $utf8{0} ) << 6 ) )
210
- | ( 0x3F & ord( $utf8{1} ) ) );
211
-
212
- case 3:
213
- // return a UTF-16 character from a 3-byte UTF-8 char
214
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
215
- return chr( ( 0xF0 & ( ord( $utf8{0} ) << 4 ) )
216
- | ( 0x0F & ( ord( $utf8{1} ) >> 2 ) ) )
217
- . chr( ( 0xC0 & ( ord( $utf8{1} ) << 6 ) )
218
- | ( 0x7F & ord( $utf8{2} ) ) );
219
- }
220
-
221
- // ignoring UTF-32 for now, sorry
222
- return '';
223
- }
224
-
225
- /**
226
- * encodes an arbitrary variable into JSON format
227
- *
228
- * @param mixed $var any number, boolean, string, array, or object to be encoded.
229
- * see argument 1 to Services_JSON() above for array-parsing behavior.
230
- * if var is a strng, note that encode() always expects it
231
- * to be in ASCII or UTF-8 format!
232
- *
233
- * @return mixed JSON string representation of input var or an error if a problem occurs
234
- * @access public
235
- */
236
- function encode( $var ) {
237
- switch ( gettype( $var ) ) {
238
- case 'boolean':
239
- return $var ? 'true' : 'false';
240
-
241
- case 'NULL':
242
- return 'null';
243
-
244
- case 'integer':
245
- return (int) $var;
246
-
247
- case 'double':
248
- case 'float':
249
- return (float) $var;
250
-
251
- case 'string':
252
- // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
253
- $ascii = '';
254
- $strlen_var = strlen( $var );
255
-
256
- /*
257
- * Iterate over every character in the string,
258
- * escaping with a slash or encoding to UTF-8 where necessary
259
- */
260
- for ( $c = 0; $c < $strlen_var; ++ $c ) {
261
-
262
- $ord_var_c = ord( $var{$c} );
263
-
264
- switch ( true ) {
265
- case $ord_var_c == 0x08:
266
- $ascii .= '\b';
267
- break;
268
- case $ord_var_c == 0x09:
269
- $ascii .= '\t';
270
- break;
271
- case $ord_var_c == 0x0A:
272
- $ascii .= '\n';
273
- break;
274
- case $ord_var_c == 0x0C:
275
- $ascii .= '\f';
276
- break;
277
- case $ord_var_c == 0x0D:
278
- $ascii .= '\r';
279
- break;
280
-
281
- case $ord_var_c == 0x22:
282
- case $ord_var_c == 0x2F:
283
- case $ord_var_c == 0x5C:
284
- // double quote, slash, slosh
285
- $ascii .= '\\' . $var{$c};
286
- break;
287
-
288
- case ( ( $ord_var_c >= 0x20 ) && ( $ord_var_c <= 0x7F ) ):
289
- // characters U-00000000 - U-0000007F (same as ASCII)
290
- $ascii .= $var{$c};
291
- break;
292
-
293
- case ( ( $ord_var_c & 0xE0 ) == 0xC0 ):
294
- // characters U-00000080 - U-000007FF, mask 110XXXXX
295
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
296
- $char = pack( 'C*', $ord_var_c, ord( $var{$c + 1} ) );
297
- $c += 1;
298
- $utf16 = $this->utf82utf16( $char );
299
- $ascii .= sprintf( '\u%04s', bin2hex( $utf16 ) );
300
- break;
301
-
302
- case ( ( $ord_var_c & 0xF0 ) == 0xE0 ):
303
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
304
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
305
- $char = pack( 'C*', $ord_var_c,
306
- ord( $var{$c + 1} ),
307
- ord( $var{$c + 2} ) );
308
- $c += 2;
309
- $utf16 = $this->utf82utf16( $char );
310
- $ascii .= sprintf( '\u%04s', bin2hex( $utf16 ) );
311
- break;
312
-
313
- case ( ( $ord_var_c & 0xF8 ) == 0xF0 ):
314
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
315
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
316
- $char = pack( 'C*', $ord_var_c,
317
- ord( $var{$c + 1} ),
318
- ord( $var{$c + 2} ),
319
- ord( $var{$c + 3} ) );
320
- $c += 3;
321
- $utf16 = $this->utf82utf16( $char );
322
- $ascii .= sprintf( '\u%04s', bin2hex( $utf16 ) );
323
- break;
324
-
325
- case ( ( $ord_var_c & 0xFC ) == 0xF8 ):
326
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
327
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
328
- $char = pack( 'C*', $ord_var_c,
329
- ord( $var{$c + 1} ),
330
- ord( $var{$c + 2} ),
331
- ord( $var{$c + 3} ),
332
- ord( $var{$c + 4} ) );
333
- $c += 4;
334
- $utf16 = $this->utf82utf16( $char );
335
- $ascii .= sprintf( '\u%04s', bin2hex( $utf16 ) );
336
- break;
337
-
338
- case ( ( $ord_var_c & 0xFE ) == 0xFC ):
339
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
340
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
341
- $char = pack( 'C*', $ord_var_c,
342
- ord( $var{$c + 1} ),
343
- ord( $var{$c + 2} ),
344
- ord( $var{$c + 3} ),
345
- ord( $var{$c + 4} ),
346
- ord( $var{$c + 5} ) );
347
- $c += 5;
348
- $utf16 = $this->utf82utf16( $char );
349
- $ascii .= sprintf( '\u%04s', bin2hex( $utf16 ) );
350
- break;
351
- }
352
- }
353
-
354
- return '"' . $ascii . '"';
355
-
356
- case 'array':
357
- /*
358
- * As per JSON spec if any array key is not an integer
359
- * we must treat the the whole array as an object. We
360
- * also try to catch a sparsely populated associative
361
- * array with numeric keys here because some JS engines
362
- * will create an array with empty indexes up to
363
- * max_index which can cause memory issues and because
364
- * the keys, which may be relevant, will be remapped
365
- * otherwise.
366
- *
367
- * As per the ECMA and JSON specification an object may
368
- * have any string as a property. Unfortunately due to
369
- * a hole in the ECMA specification if the key is a
370
- * ECMA reserved word or starts with a digit the
371
- * parameter is only accessible using ECMAScript's
372
- * bracket notation.
373
- */
374
-
375
- // treat as a JSON object
376
- if ( is_array( $var ) && count( $var ) && ( array_keys( $var ) !== range( 0,
377
- sizeof( $var ) - 1 ) )
378
- ) {
379
- $properties = array_map( array( $this, 'name_value' ),
380
- array_keys( $var ),
381
- array_values( $var ) );
382
-
383
- foreach ( $properties as $property ) {
384
- if ( Services_JSON::isError( $property ) ) {
385
- return $property;
386
- }
387
- }
388
-
389
- return '{' . join( ',', $properties ) . '}';
390
- }
391
-
392
- // treat it like a regular array
393
- $elements = array_map( array( $this, 'encode' ), $var );
394
-
395
- foreach ( $elements as $element ) {
396
- if ( Services_JSON::isError( $element ) ) {
397
- return $element;
398
- }
399
- }
400
-
401
- return '[' . join( ',', $elements ) . ']';
402
-
403
- case 'object':
404
- $vars = get_object_vars( $var );
405
-
406
- $properties = array_map( array( $this, 'name_value' ),
407
- array_keys( $vars ),
408
- array_values( $vars ) );
409
-
410
- foreach ( $properties as $property ) {
411
- if ( Services_JSON::isError( $property ) ) {
412
- return $property;
413
- }
414
- }
415
-
416
- return '{' . join( ',', $properties ) . '}';
417
-
418
- default:
419
- return ( $this->use & SERVICES_JSON_SUPPRESS_ERRORS )
420
- ? 'null'
421
- : new Services_JSON_Error( gettype( $var ) . " can not be encoded as JSON string" );
422
- }
423
- }
424
-
425
- /**
426
- * array-walking function for use in generating JSON-formatted name-value pairs
427
- *
428
- * @param string $name name of key to use
429
- * @param mixed $value reference to an array element to be encoded
430
- *
431
- * @return string JSON-formatted name-value pair, like '"name":value'
432
- * @access private
433
- */
434
- function name_value( $name, $value ) {
435
- $encoded_value = $this->encode( $value );
436
-
437
- if ( Services_JSON::isError( $encoded_value ) ) {
438
- return $encoded_value;
439
- }
440
-
441
- return $this->encode( strval( $name ) ) . ':' . $encoded_value;
442
- }
443
-
444
- /**
445
- * reduce a string by removing leading and trailing comments and whitespace
446
- *
447
- * @param $str string string value to strip of comments and whitespace
448
- *
449
- * @return string string value stripped of comments and whitespace
450
- * @access private
451
- */
452
- function reduce_string( $str ) {
453
- $str = preg_replace( array(
454
-
455
- // eliminate single line comments in '// ...' form
456
- '#^\s*//(.+)$#m',
457
- // eliminate multi-line comments in '/* ... */' form, at start of string
458
- '#^\s*/\*(.+)\*/#Us',
459
- // eliminate multi-line comments in '/* ... */' form, at end of string
460
- '#/\*(.+)\*/\s*$#Us'
461
-
462
- ), '', $str );
463
-
464
- // eliminate extraneous space
465
- return trim( $str );
466
- }
467
-
468
- /**
469
- * decodes a JSON string into appropriate variable
470
- *
471
- * @param string $str JSON-formatted string
472
- *
473
- * @return mixed number, boolean, string, array, or object
474
- * corresponding to given JSON input string.
475
- * See argument 1 to Services_JSON() above for object-output behavior.
476
- * Note that decode() always returns strings
477
- * in ASCII or UTF-8 format!
478
- * @access public
479
- */
480
- function decode( $str ) {
481
- $str = $this->reduce_string( $str );
482
-
483
- switch ( strtolower( $str ) ) {
484
- case 'true':
485
- return true;
486
-
487
- case 'false':
488
- return false;
489
-
490
- case 'null':
491
- return null;
492
-
493
- default:
494
- $m = array();
495
-
496
- if ( is_numeric( $str ) ) {
497
- // Lookie-loo, it's a number
498
-
499
- // This would work on its own, but I'm trying to be
500
- // good about returning integers where appropriate:
501
- // return (float)$str;
502
-
503
- // Return float or int, as appropriate
504
- return ( (float) $str == (integer) $str )
505
- ? (integer) $str
506
- : (float) $str;
507
-
508
- } elseif ( preg_match( '/^("|\').*(\1)#x2F;s', $str, $m ) && $m[1] == $m[2] ) {
509
- // STRINGS RETURNED IN UTF-8 FORMAT
510
- $delim = substr( $str, 0, 1 );
511
- $chrs = substr( $str, 1, - 1 );
512
- $utf8 = '';
513
- $strlen_chrs = strlen( $chrs );
514
-
515
- for ( $c = 0; $c < $strlen_chrs; ++ $c ) {
516
-
517
- $substr_chrs_c_2 = substr( $chrs, $c, 2 );
518
- $ord_chrs_c = ord( $chrs{$c} );
519
-
520
- switch ( true ) {
521
- case $substr_chrs_c_2 == '\b':
522
- $utf8 .= chr( 0x08 );
523
- ++ $c;
524
- break;
525
- case $substr_chrs_c_2 == '\t':
526
- $utf8 .= chr( 0x09 );
527
- ++ $c;
528
- break;
529
- case $substr_chrs_c_2 == '\n':
530
- $utf8 .= chr( 0x0A );
531
- ++ $c;
532
- break;
533
- case $substr_chrs_c_2 == '\f':
534
- $utf8 .= chr( 0x0C );
535
- ++ $c;
536
- break;
537
- case $substr_chrs_c_2 == '\r':
538
- $utf8 .= chr( 0x0D );
539
- ++ $c;
540
- break;
541
-
542
- case $substr_chrs_c_2 == '\\"':
543
- case $substr_chrs_c_2 == '\\\'':
544
- case $substr_chrs_c_2 == '\\\\':
545
- case $substr_chrs_c_2 == '\\/':
546
- if ( ( $delim == '"' && $substr_chrs_c_2 != '\\\'' ) ||
547
- ( $delim == "'" && $substr_chrs_c_2 != '\\"' )
548
- ) {
549
- $utf8 .= $chrs{++ $c};
550
- }
551
- break;
552
-
553
- case preg_match( '/\\\u[0-9A-F]{4}/i', substr( $chrs, $c, 6 ) ):
554
- // single, escaped unicode character
555
- $utf16 = chr( hexdec( substr( $chrs, ( $c + 2 ), 2 ) ) )
556
- . chr( hexdec( substr( $chrs, ( $c + 4 ), 2 ) ) );
557
- $utf8 .= $this->utf162utf8( $utf16 );
558
- $c += 5;
559
- break;
560
-
561
- case ( $ord_chrs_c >= 0x20 ) && ( $ord_chrs_c <= 0x7F ):
562
- $utf8 .= $chrs{$c};
563
- break;
564
-
565
- case ( $ord_chrs_c & 0xE0 ) == 0xC0:
566
- // characters U-00000080 - U-000007FF, mask 110XXXXX
567
- //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
568
- $utf8 .= substr( $chrs, $c, 2 );
569
- ++ $c;
570
- break;
571
-
572
- case ( $ord_chrs_c & 0xF0 ) == 0xE0:
573
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
574
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
575
- $utf8 .= substr( $chrs, $c, 3 );
576
- $c += 2;
577
- break;
578
-
579
- case ( $ord_chrs_c & 0xF8 ) == 0xF0:
580
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
581
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
582
- $utf8 .= substr( $chrs, $c, 4 );
583
- $c += 3;
584
- break;
585
-
586
- case ( $ord_chrs_c & 0xFC ) == 0xF8:
587
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
588
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
589
- $utf8 .= substr( $chrs, $c, 5 );
590
- $c += 4;
591
- break;
592
-
593
- case ( $ord_chrs_c & 0xFE ) == 0xFC:
594
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
595
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
596
- $utf8 .= substr( $chrs, $c, 6 );
597
- $c += 5;
598
- break;
599
-
600
- }
601
-
602
- }
603
-
604
- return $utf8;
605
-
606
- } elseif ( preg_match( '/^\[.*\]#x2F;s', $str ) || preg_match( '/^\{.*\}#x2F;s', $str ) ) {
607
- // array, or object notation
608
-
609
- if ( $str{0} == '[' ) {
610
- $stk = array( SERVICES_JSON_IN_ARR );
611
- $arr = array();
612
- } else {
613
- if ( $this->use & SERVICES_JSON_LOOSE_TYPE ) {
614
- $stk = array( SERVICES_JSON_IN_OBJ );
615
- $obj = array();
616
- } else {
617
- $stk = array( SERVICES_JSON_IN_OBJ );
618
- $obj = new stdClass();
619
- }
620
- }
621
-
622
- array_push( $stk, array(
623
- 'what' => SERVICES_JSON_SLICE,
624
- 'where' => 0,
625
- 'delim' => false
626
- ) );
627
-
628
- $chrs = substr( $str, 1, - 1 );
629
- $chrs = $this->reduce_string( $chrs );
630
-
631
- if ( $chrs == '' ) {
632
- if ( reset( $stk ) == SERVICES_JSON_IN_ARR ) {
633
- return $arr;
634
-
635
- } else {
636
- return $obj;
637
-
638
- }
639
- }
640
-
641
- //print("\nparsing {$chrs}\n");
642
-
643
- $strlen_chrs = strlen( $chrs );
644
-
645
- for ( $c = 0; $c <= $strlen_chrs; ++ $c ) {
646
-
647
- $top = end( $stk );
648
- $substr_chrs_c_2 = substr( $chrs, $c, 2 );
649
-
650
- if ( ( $c == $strlen_chrs ) || ( ( $chrs{$c} == ',' ) && ( $top['what'] == SERVICES_JSON_SLICE ) ) ) {
651
- // found a comma that is not inside a string, array, etc.,
652
- // OR we've reached the end of the character list
653
- $slice = substr( $chrs, $top['where'], ( $c - $top['where'] ) );
654
- array_push( $stk,
655
- array( 'what' => SERVICES_JSON_SLICE, 'where' => ( $c + 1 ), 'delim' => false ) );
656
- //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
657
-
658
- if ( reset( $stk ) == SERVICES_JSON_IN_ARR ) {
659
- // we are in an array, so just push an element onto the stack
660
- array_push( $arr, $this->decode( $slice ) );
661
-
662
- } elseif ( reset( $stk ) == SERVICES_JSON_IN_OBJ ) {
663
- // we are in an object, so figure
664
- // out the property name and set an
665
- // element in an associative array,
666
- // for now
667
- $parts = array();
668
-
669
- if ( preg_match( '/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?#x2F;Uis', $slice,
670
- $parts ) ) {
671
- // "name":value pair
672
- $key = $this->decode( $parts[1] );
673
- $val = $this->decode( $parts[2] );
674
-
675
- if ( $this->use & SERVICES_JSON_LOOSE_TYPE ) {
676
- $obj[ $key ] = $val;
677
- } else {
678
- $obj->$key = $val;
679
- }
680
- } elseif ( preg_match( '/^\s*(\w+)\s*:\s*(\S.*),?#x2F;Uis', $slice, $parts ) ) {
681
- // name:value pair, where name is unquoted
682
- $key = $parts[1];
683
- $val = $this->decode( $parts[2] );
684
-
685
- if ( $this->use & SERVICES_JSON_LOOSE_TYPE ) {
686
- $obj[ $key ] = $val;
687
- } else {
688
- $obj->$key = $val;
689
- }
690
- }
691
-
692
- }
693
-
694
- } elseif ( ( ( $chrs{$c} == '"' ) || ( $chrs{$c} == "'" ) ) && ( $top['what'] != SERVICES_JSON_IN_STR ) ) {
695
- // found a quote, and we are not inside a string
696
- array_push( $stk,
697
- array( 'what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c} ) );
698
- //print("Found start of string at {$c}\n");
699
-
700
- } elseif ( ( $chrs{$c} == $top['delim'] ) &&
701
- ( $top['what'] == SERVICES_JSON_IN_STR ) &&
702
- ( ( strlen( substr( $chrs, 0, $c ) ) - strlen( rtrim( substr( $chrs, 0, $c ),
703
- '\\' ) ) ) % 2 != 1 )
704
- ) {
705
- // found a quote, we're in a string, and it's not escaped
706
- // we know that it's not escaped becase there is _not_ an
707
- // odd number of backslashes at the end of the string so far
708
- array_pop( $stk );
709
- //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
710
-
711
- } elseif ( ( $chrs{$c} == '[' ) &&
712
- in_array( $top['what'],
713
- array( SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ ) )
714
- ) {
715
- // found a left-bracket, and we are in an array, object, or slice
716
- array_push( $stk,
717
- array( 'what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false ) );
718
- //print("Found start of array at {$c}\n");
719
-
720
- } elseif ( ( $chrs{$c} == ']' ) && ( $top['what'] == SERVICES_JSON_IN_ARR ) ) {
721
- // found a right-bracket, and we're in an array
722
- array_pop( $stk );
723
- //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
724
-
725
- } elseif ( ( $chrs{$c} == '{' ) &&
726
- in_array( $top['what'],
727
- array( SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ ) )
728
- ) {
729
- // found a left-brace, and we are in an array, object, or slice
730
- array_push( $stk,
731
- array( 'what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false ) );
732
- //print("Found start of object at {$c}\n");
733
-
734
- } elseif ( ( $chrs{$c} == '}' ) && ( $top['what'] == SERVICES_JSON_IN_OBJ ) ) {
735
- // found a right-brace, and we're in an object
736
- array_pop( $stk );
737
- //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
738
-
739
- } elseif ( ( $substr_chrs_c_2 == '/*' ) &&
740
- in_array( $top['what'],
741
- array( SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ ) )
742
- ) {
743
- // found a comment start, and we are in an array, object, or slice
744
- array_push( $stk,
745
- array( 'what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false ) );
746
- $c ++;
747
- //print("Found start of comment at {$c}\n");
748
-
749
- } elseif ( ( $substr_chrs_c_2 == '*/' ) && ( $top['what'] == SERVICES_JSON_IN_CMT ) ) {
750
- // found a comment end, and we're in one now
751
- array_pop( $stk );
752
- $c ++;
753
-
754
- for ( $i = $top['where']; $i <= $c; ++ $i ) {
755
- $chrs = substr_replace( $chrs, ' ', $i, 1 );
756
- }
757
-
758
- //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
759
-
760
- }
761
-
762
- }
763
-
764
- if ( reset( $stk ) == SERVICES_JSON_IN_ARR ) {
765
- return $arr;
766
-
767
- } elseif ( reset( $stk ) == SERVICES_JSON_IN_OBJ ) {
768
- return $obj;
769
-
770
- }
771
-
772
- }
773
- }
774
- }
775
-
776
- /**
777
- * @todo Ultimately, this should just call PEAR::isError()
778
- */
779
- function isError( $data, $code = null ) {
780
- if ( class_exists( 'pear' ) ) {
781
- return PEAR::isError( $data, $code );
782
- } elseif ( is_object( $data ) && ( get_class( $data ) == 'services_json_error' ||
783
- is_subclass_of( $data, 'services_json_error' ) )
784
- ) {
785
- return true;
786
- }
787
-
788
- return false;
789
- }
790
- }
791
-
792
- if ( class_exists( 'PEAR_Error' ) ) {
793
-
794
- class Services_JSON_Error extends PEAR_Error {
795
- function Services_JSON_Error(
796
- $message = 'unknown error',
797
- $code = null,
798
- $mode = null,
799
- $options = null,
800
- $userinfo = null
801
- ) {
802
- parent::PEAR_Error( $message, $code, $mode, $options, $userinfo );
803
- }
804
- }
805
-
806
- } else {
807
-
808
- /**
809
- * @todo Ultimately, this class shall be descended from PEAR_Error
810
- */
811
- class Services_JSON_Error {
812
- function Services_JSON_Error(
813
- $message = 'unknown error',
814
- $code = null,
815
- $mode = null,
816
- $options = null,
817
- $userinfo = null
818
- ) {
819
-
820
- }
821
- }
822
-
823
- }
824
- endif;
825
- ?>
README.md DELETED
@@ -1,7 +0,0 @@
1
- # zendesk-chat-wordpress
2
-
3
- ## Releasing new versions of the plugin to wordpress.org
4
-
5
- If you are a developer looking to release a new version of the plugin
6
-
7
- See: [This guide](https://zendesk.atlassian.net/wiki/display/ENG/Publishing+new+versions+of+plugins+to+Wordpress.org)
accountconfig.php DELETED
@@ -1,206 +0,0 @@
1
- <?php
2
- // Settings page in the admin panel
3
- function zopim_account_config() {
4
- ?>
5
- <div class="wrap">
6
- <?php
7
- if ( isset( $_GET["action"] ) && $_GET["action"] == "deactivate" ) {
8
- update_option( 'zopimSalt', "" );
9
- update_option( 'zopimCode', "zopim" );
10
- }
11
-
12
- $message = "";
13
- $authenticated = "";
14
-
15
- if ( isset( $_POST["action"] ) && $_POST["action"] == "login" ) {
16
-
17
- if ( $_POST["zopimUsername"] != "" && $_POST["zopimPassword"] != "" ) {
18
- $logindata = array( "email" => $_POST["zopimUsername"], "password" => $_POST["zopimPassword"] );
19
- $loginresult = json_to_array( zopim_post_request( ZOPIM_LOGIN_URL, $logindata ) );
20
-
21
- if ( isset( $loginresult->error ) ) {
22
- $error["login"] = "<b>" . __( 'Could not log in to Zopim. Please check your login details.',
23
- 'zopim' ) . "</b>";
24
- $gotologin = 1;
25
- update_option( 'zopimSalt', "wronglogin" );
26
- } else if ( isset( $loginresult->salt ) ) {
27
- update_option( 'zopimUsername', $_POST["zopimUsername"] );
28
- update_option( 'zopimSalt', $loginresult->salt );
29
- $account = zopim_get_account_details( get_option( 'zopimSalt' ) );
30
- $editor = zopim_set_editor( get_option( 'zopimSalt' ) );
31
-
32
- if ( isset( $account ) ) {
33
- update_option( 'zopimCode', $account->account_key );
34
-
35
- if ( get_option( 'zopimGreetings' ) == "" ) {
36
- $jsongreetings = to_json( $account->settings->greetings );
37
- update_option( 'zopimGreetings', $jsongreetings );
38
- }
39
- }
40
- } else if ( isset( $loginresult->wp_error ) ) {
41
- update_option( 'zopimSalt', "" );
42
- $error["login"] = "<b>" . __( "Could not log in to Zopim. We were unable to contact Zopim servers. Please check with your server administrator to ensure that <a href='http://www.php.net/manual/en/book.curl.php'>PHP Curl</a> is installed and permissions are set correctly",
43
- "zopim" ) . "</b>";
44
- }
45
- } else {
46
- update_option( 'zopimSalt', "wronglogin" );
47
- $gotologin = 1;
48
- $error["login"] = "<b>" . __( 'Could not log in to Zopim. Please check your login details.',
49
- 'zopim' ) . "</b>";
50
- }
51
- } else if ( isset( $_POST["action"] ) && $_POST["action"] == "signup" ) {
52
- $createdata = array(
53
- "email" => $_POST["zopimnewemail"],
54
- "first_name" => $_POST["zopimfirstname"],
55
- "last_name" => $_POST["zopimlastname"],
56
- "display_name" => $_POST["zopimfirstname"] . " " . $_POST["zopimlastname"],
57
- "eref" => $_POST["zopimeref"],
58
- "source" => "wordpress",
59
- "recaptcha_challenge_field" => $_POST["recaptcha_challenge_field"],
60
- "recaptcha_response_field" => $_POST["recaptcha_response_field"]
61
- );
62
-
63
- $signupresult = json_to_array( zopim_post_request( ZOPIM_SIGNUP_URL, $createdata ) );
64
- if ( isset( $signupresult->error ) ) {
65
- $message = "<div style='color:#c33;'>";
66
- $message .= sprintf( __( 'Error during activation: <b>%s</b>. Please try again.</div>', 'zopim' ),
67
- $signupresult->error );
68
- } else if ( isset( $signupresult->account_key ) ) {
69
- $message = "<b>" . __( 'Thank you for signing up. Please check your mail for your password to complete the process.',
70
- 'zopim' ) . "</b>";
71
- $gotologin = 1;
72
- } else {
73
- $message = "<b>" . __( "Could not activate account. The wordpress installation was unable to contact Zopim servers. Please check with your server administrator to ensure that <a href='http://www.php.net/manual/en/book.curl.php'>PHP Curl</a> is installed and permissions are set correctly.",
74
- 'zopim' ) . "</b>";
75
- }
76
- }
77
-
78
- if ( get_option( 'zopimCode' ) != "" && get_option( 'zopimCode' ) != "zopim" ) {
79
- $accountDetails = zopim_get_account_details( get_option( 'zopimSalt' ) );
80
-
81
- if ( ! isset( $accountDetails ) || isset( $accountDetails->error ) ) {
82
- $gotologin = 1;
83
- $error["auth"] = '
84
- <div class="metabox-holder">
85
- <div class="postbox">
86
- <h3 class="hndle"><span>' . __( 'Account no longer linked!', 'zopim' ) . '</span></h3>
87
- <div style="padding:10px;line-height:17px;">'
88
- . __( 'We could not verify your Zopim account. Please check your password and try again.', 'zopim' )
89
- . '</div>
90
- </div>
91
- </div>';
92
- } else {
93
- $authenticated = "ok";
94
- }
95
- }
96
-
97
- if ( $authenticated == "ok" ) {
98
-
99
- if ( $accountDetails->package_id == "trial" ) {
100
- $accountDetails->package_id = __( 'Free Lite Package + 14 Days Full-features', 'zopim' );
101
- } else {
102
- $accountDetails->package_id .= __( ' Package', 'zopim' );
103
- }
104
-
105
- ?>
106
- <div id="icon-options-general" class="icon32"><br/></div>
107
- <h2><?php _e( 'Set up your Zopim Account', 'zopim' ); ?></h2>
108
- <br/>
109
- <div style="background:#FFFEEB;padding:25px;border:1px solid #eee;">
110
- <span style="float:right;">
111
- <a href="admin.php?page=zopim_account_config&action=deactivate"><?php _e( 'Deactivate',
112
- 'zopim' ); ?></a>
113
- </span>
114
- <?php _e( 'Currently Activated Account', 'zopim' ); ?> &rarr;
115
- <b><?php echo get_option( 'zopimUsername' ); ?></b>
116
-
117
- <div style="display:inline-block;margin-left:5px;background:#444;color:#fff;font-size:10px;text-transform:uppercase;padding:3px 8px;-moz-border-radius:5px;-webkit-border-radius:5px;"><?php echo ucwords( $accountDetails->package_id ); ?></div>
118
- <!--<br><p><br>You can <a href="admin.php?page=zopim_customize_widget">customize</a> the chat widget, or <a href="admin.php?page=zopim_dashboard">launch the dashboard</a> for advanced features.-->
119
- <br><br><?php _e( 'To start using Zopim chat, launch our dashboard for access to all features, including widget customization!',
120
- 'zopim' ); ?>
121
- <br><br><a href="<?php echo ZOPIM_DASHBOARD_LINK . "&username=" . get_option( 'zopimUsername' ); ?>"
122
- style="text-decoration:none;" target="_blank" data-popup="true">
123
- <div class="zopim_btn_orange"><?php _e( 'Launch Dashboard', 'zopim' ); ?></div>
124
- </a>&nbsp;&nbsp;(<?php _e( 'This will open up a new browser tab', 'zopim' ); ?>)
125
-
126
-
127
- <form method="post" action="admin.php?page=zopim_account_config">
128
- <?php
129
- if ( isset( $_POST['widget-options'] ) ) {
130
- $opts = $_POST['widget-options'];
131
- update_option( 'zopimWidgetOptions', $opts );
132
- echo '<i>' . __( 'Widget options updated.', 'zopim' ) . '<br/></i>';
133
- }
134
-
135
- ?>
136
- <p>
137
- <?php _e( 'Optional code for customization with Zopim API:', 'zopim' ); ?>
138
- <br/>
139
- <textarea name="widget-options"
140
- style="width:680px; height: 200px;"><?php echo esc_textarea( zopim_get_widget_options() ); ?></textarea>
141
- <br/>
142
- <input class="button-primary" type="submit" value="Update widget options"/>
143
- </p>
144
- </form>
145
-
146
- </div>
147
- <?php } else { ?>
148
- <div id="icon-options-general" class="icon32"><br/></div><h2><?php _e( 'Set up your Zopim Account',
149
- 'zopim' ); ?></h2>
150
- <?php if ( isset( $error["auth"] ) ) {
151
- echo $error["auth"];
152
- } else if ( $message == "" ) { ?>
153
- <?php _e( 'Congratulations on successfully installing the Zopim WordPress plugin!', 'zopim' ); ?><br>
154
- <br>
155
- <?php } else {
156
- echo $message;
157
- } ?>
158
- <div id="existingform">
159
- <div class="metabox-holder">
160
- <div class="postbox">
161
- <h3 class="hndle"><span><?php _e( 'Link up with your Zopim account', 'zopim' ); ?></span></h3>
162
-
163
- <div style="padding:10px;">
164
- <?php if ( isset( $error["login"] ) ) {
165
- echo '<span class="error">' . $error["login"] . '</span>';
166
- } ?>
167
- <form method="post" action="admin.php?page=zopim_account_config">
168
- <input type="hidden" name="action" value="login">
169
- <table class="form-table">
170
-
171
- <tr valign="top">
172
- <th scope="row"><?php _e( 'Zopim Username (E-mail)', 'zopim' ); ?></th>
173
- <td><input type="text" name="zopimUsername"
174
- value="<?php echo get_option( 'zopimUsername' ); ?>"/></td>
175
- </tr>
176
-
177
- <tr valign="top">
178
- <th scope="row"><?php _e( 'Zopim Password', 'zopim' ); ?></th>
179
- <td><input type="password" name="zopimPassword" value=""/></td>
180
- </tr>
181
-
182
- </table>
183
- <br/>
184
- <?php _e( 'The Zopim chat widget will display on your blog after your account is linked up.', 'zopim' ); ?>
185
- <br/>
186
-
187
- <p class="submit">
188
- <input id="linkup" type="submit" onclick="animateButton()" class="button-primary"
189
- value="<?php _e( 'Link Up', 'zopim' ) ?>"/>
190
- &nbsp;<?php _e( 'Don\'t have a Zopim account?', 'zopim' ); ?> <a
191
- href="<?php echo ZOPIM_SIGNUP_REDIRECT_URL; ?>" target="_blank"
192
- data-popup="true"><?php _e( 'Sign up now', 'zopim' ); ?></a>.
193
- </p>
194
-
195
- </form>
196
-
197
- </div>
198
- </div>
199
- </div>
200
- </div>
201
-
202
- </div>
203
-
204
-
205
- <?php }
206
- } ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: zendesk_official
3
Tags: chat, chat online, contact plugin, contact us, customer support, free chat, chat software, IM chat, live chat, live chat inc, live chat services, live chat software, live chatting, live help, live support, live web chat, livechat, live help, live support, olark, online chat, online support, php live chat, snapengage, support software, website chat, wordpress chat, wordpress live chat, wordpress live chat plugin, Zopim, zendesk, Zopim live chat, banckle, clickdesk, click desk
4
Requires at least: 3.1
5
Tested up to: 4.4
6
- Stable tag: 1.4.7
7
8
Zendesk Chat (previously Zopim) lets you monitor and chat with visitors surfing your store in real-time. Impress them personally and ease them into their purchase.
9
@@ -48,6 +48,9 @@ What are you waiting for? Download Zendesk Chat plugin now and <a href="https://
48
* Arabic | Bulgarian | Chinese | Croatian | Czech | Danish | Dutch; Flemish | Estonian | Faroese | Finnish | French | Georgian | German | Greek | Hebrew | Hungarian | Icelandic | Indonesian | Italian | Japanese | Korean | Kurdish | Latvian | Lithuanian | Macedonian | Malay | Norwegian Bokmal | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish; Castilian | Swedish | Thai | Turkish | Ukranian | Urdu | Vietnamese
49
50
== Changelog ==
51
= 1.4.7 =
52
* Fix issue with php7 compatibility checker
53
3
Tags: chat, chat online, contact plugin, contact us, customer support, free chat, chat software, IM chat, live chat, live chat inc, live chat services, live chat software, live chatting, live help, live support, live web chat, livechat, live help, live support, olark, online chat, online support, php live chat, snapengage, support software, website chat, wordpress chat, wordpress live chat, wordpress live chat plugin, Zopim, zendesk, Zopim live chat, banckle, clickdesk, click desk
4
Requires at least: 3.1
5
Tested up to: 4.4
6
+ Stable tag: 1.4.8
7
8
Zendesk Chat (previously Zopim) lets you monitor and chat with visitors surfing your store in real-time. Impress them personally and ease them into their purchase.
9
48
* Arabic | Bulgarian | Chinese | Croatian | Czech | Danish | Dutch; Flemish | Estonian | Faroese | Finnish | French | Georgian | German | Greek | Hebrew | Hungarian | Icelandic | Indonesian | Italian | Japanese | Korean | Kurdish | Latvian | Lithuanian | Macedonian | Malay | Norwegian Bokmal | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish; Castilian | Swedish | Thai | Turkish | Ukranian | Urdu | Vietnamese
49
50
== Changelog ==
51
+ = 1.4.8 =
52
+ * Remove old files in base directory
53
+
54
= 1.4.7 =
55
* Fix issue with php7 compatibility checker
56
zopim.css DELETED
@@ -1,30 +0,0 @@
1
- .zopim_btn_orange {
2
- display: inline-block;
3
- width: 150px;
4
- padding: 10px 0px;
5
- background: #F38313;
6
- color: #fff;
7
- border-radius: 5px;
8
- font-weight: 700;
9
- font-style: normal;
10
- font-size: 14px;
11
- border: none;
12
- text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.2);
13
- text-decoration: none;
14
- text-align: center;
15
- border: 1px solid #E37A13;
16
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
17
- }
18
-
19
- .error {
20
- color: red;
21
- }
22
-
23
- .animate{
24
- background: url('https://dashboard.zopim.com/dashboard/images/spinner.gif') !important;
25
- background-repeat: no-repeat !important;
26
- background-color: #2ea2cc !important;
27
- background-position: center center !important;
28
- color: #2ea2cc !important;
29
- opacity: 0.5;
30
- }
zopim.js DELETED
@@ -1,3 +0,0 @@
1
- function animateButton() {
2
- document.getElementById("linkup").className += " animate";
3
- }
zopim.php CHANGED
@@ -5,13 +5,13 @@ Plugin Name: Zendesk Chat Widget
5
Plugin URI: http://www.zendesk.com/chat?iref=wp_plugin
6
Description: Zendesk Chat is an award winning chat solution that helps website owners to engage their visitors and convert customers into fans!
7
Author: Zopim
8
- Version: 1.4.7
9
Author URI: http://www.zendesk.com/chat?iref=wp_plugin
10
Text Domain: zopim
11
Domain path: /language
12
*/
13
14
- define( 'VERSION_NUMBER', "1.4.7" );
15
define( 'ZOPIM_BASE_URL', "https://www.zopim.com/" );
16
define( 'ZOPIM_ACCOUNT_URL', "https://account.zopim.com/" );
17
define( 'ZOPIM_SIGNUP_REDIRECT_URL', ZOPIM_ACCOUNT_URL . "?aref=MjUxMjY4:1TeORR:9SP1e-iPTuAVXROJA6UU5seC8x4&visit_id=6ffe00ec3cfc11e2b5ab22000a1db8fa&utm_source=account%2Bsetup%2Bpage&utm_medium=link&utm_campaign=wp%2Bsignup2#signup" );
5
Plugin URI: http://www.zendesk.com/chat?iref=wp_plugin
6
Description: Zendesk Chat is an award winning chat solution that helps website owners to engage their visitors and convert customers into fans!
7
Author: Zopim
8
+ Version: 1.4.8
9
Author URI: http://www.zendesk.com/chat?iref=wp_plugin
10
Text Domain: zopim
11
Domain path: /language
12
*/
13
14
+ define( 'VERSION_NUMBER', "1.4.8" );
15
define( 'ZOPIM_BASE_URL', "https://www.zopim.com/" );
16
define( 'ZOPIM_ACCOUNT_URL', "https://account.zopim.com/" );
17
define( 'ZOPIM_SIGNUP_REDIRECT_URL', ZOPIM_ACCOUNT_URL . "?aref=MjUxMjY4:1TeORR:9SP1e-iPTuAVXROJA6UU5seC8x4&visit_id=6ffe00ec3cfc11e2b5ab22000a1db8fa&utm_source=account%2Bsetup%2Bpage&utm_medium=link&utm_campaign=wp%2Bsignup2#signup" );