Skip to Content


Call the necessary Twitter widget.js for native Twitter buttons.

PHP April 27, 2017


This function runs automatically, so it is not called manually. Is this incorrect?

Additional Notes

This script only needs to be called once regardless of how many Twitter buttons are on the page.

Source File

Located in /libs/Functions.php on line 1182.

No Hooks

This function does not have any filters or actions available. Request one?
        public function twitter_widget_script(){
            if ( empty($this->twitter_widget_loaded) ){
                <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);;js.src=p+'://';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
                $this->twitter_widget_loaded = true;


This function can not be short-circuited with an override filter. Request one?