1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* Callbacks for test pages that include AddThis functionality.
|
5
|
*/
|
6
|
|
7
|
/**
|
8
|
* Page callback to test a page load without any js loaded.
|
9
|
*
|
10
|
* @return array
|
11
|
* Render array for a page.
|
12
|
*/
|
13
|
function addthis_test_no_js() {
|
14
|
$content = array();
|
15
|
|
16
|
$content['explanation'] = array(
|
17
|
'#markup' => 'No widget js is loaded on this page. Unless specified in the settings.',
|
18
|
);
|
19
|
|
20
|
return $content;
|
21
|
}
|
22
|
|
23
|
/**
|
24
|
* Page callback to test a page load with js loaded.
|
25
|
*
|
26
|
* @return array
|
27
|
* Render array for this page.
|
28
|
*/
|
29
|
function addthis_test_with_js() {
|
30
|
$content = array();
|
31
|
|
32
|
$content['explanation'] = array(
|
33
|
'#markup' => 'Widget js is loaded on this page through hook_page_build().<br>
|
34
|
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
35
|
<div class="addthis_sharing_toolbox"></div>',
|
36
|
);
|
37
|
|
38
|
return $content;
|
39
|
}
|
40
|
|