Last active
November 2, 2019 02:02
-
-
Save robdecker/c7bc19173d814f536b5a to your computer and use it in GitHub Desktop.
[Block content in render array] #d7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_module_share_sidebar() { | |
return array( | |
'#theme' => 'item_list', | |
'#type' => 'ul', | |
'#attributes' => array( | |
'class' => array('share-this'), | |
), | |
'#attached' => array( | |
'js' => array( | |
array( | |
'data' => 'var switchTo5x=true;', | |
'type' => 'inline', | |
), | |
array( | |
'data' => 'http://w.sharethis.com/button/buttons.js', | |
'type' => 'external', | |
), | |
array( | |
'data' => 'stLight.options({doNotHash: false, doNotCopy: false, hashAddressBar: false});', | |
'type' => 'inline', | |
), | |
), | |
), | |
'#items' => array( | |
array( | |
'data' => '<span class="st_facebook_large" displayText="Facebook"></span>', | |
), | |
array( | |
'data' => '<span class="st_twitter_large" displayText="Tweet"></span>', | |
), | |
array( | |
'data' => '<span class="st_googleplus_large" displayText="Google +"></span>', | |
), | |
array( | |
'data' => '<span class="st_pinterest_large" displayText="Pinterest"></span>', | |
), | |
array( | |
'data' => '<span class="st_sharethis_large" displayText="ShareThis"></span>', | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment