Uname:Linux ns69.hostinglotus.net 4.18.0-553.141.2.el8_10.x86_64 #1 SMP Wed Jul 8 10:28:18 EDT 2026 x86_64

403WebShell
403Webshell
Server IP : 119.59.104.26  /  Your IP : 216.73.217.55
Web Server : Apache/2
System : Linux ns69.hostinglotus.net 4.18.0-553.141.2.el8_10.x86_64 #1 SMP Wed Jul 8 10:28:18 EDT 2026 x86_64
User : com12370 ( 1517)
PHP Version : 7.2.34
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/com12370/public_html/wp-content/themes/titan/admin/widgets/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/com12370/public_html/wp-content/themes/titan/admin/widgets/plugins/class.pitwitterfeed.php
<?php

/**

 * Created by ninhle - wiloke team

 * @since 1.0

 */



class piTWitterFeed extends WP_Widget

{

    public $aDef = array('title'=>'RECENT TWEETS', 'username'=>'wilokethemes', 'limit'=>2, 'consumer_key'=>'', 'consumer_secret'=>'', 'access_token'=>'', 'access_token_secret'=>'', 'cache_interval'=>15);

    public function __construct()

    {

        parent::__construct('pi_twiiterfeed', PI_THEMENAME . 'Twitter Feed', array('class'=>'pi_twiiterfeed'));

    }



    public function form($aInstance)

    {

        $aInstance = wp_parse_args($aInstance, $this->aDef);



        piWidgets::pi_text_field('Title', $this->get_field_id('title'), $this->get_field_name('title'), $aInstance['title']);

        piWidgets::pi_text_field('Username', $this->get_field_id('username'), $this->get_field_id('username'), $aInstance['username']);

        piWidgets::pi_text_field('Limit', $this->get_field_id('limit'), $this->get_field_name('limit'), $aInstance['limit']);

        piWidgets::pi_text_field('Comsumer Key', $this->get_field_id('consumer_key'), $this->get_field_name('consumer_key'), $aInstance['consumer_key']);

        piWidgets::pi_text_field('Comsumer Secret', $this->get_field_id('consumer_secret'), $this->get_field_name('consumer_secret'), $aInstance['consumer_secret']);

        piWidgets::pi_text_field('Access Token', $this->get_field_id('access_token'), $this->get_field_name('access_token'), $aInstance['access_token']);

        piWidgets::pi_text_field('Access Token Secret', $this->get_field_id('access_token_secret'), $this->get_field_name('access_token_secret'), $aInstance['access_token_secret']);

        piWidgets::pi_text_field('Cache Interval', $this->get_field_id('cache_interval'), $this->get_field_name('cache_interval'), $aInstance['cache_interval']);



        echo '<p>';

            echo '<code><a href="http://blog.wiloke.com/how-to-get-twitter-api/" target="_blank">'.__('Creating Twitter Application', 'titan') .'</a></code>';

        echo '</p>';

    }





    public function update($aNewinstance, $aOldinstance)

    {

        $aInstance = $aOldinstance;

        foreach ( $aNewinstance as $key => $val )

        {

            $aInstance[$key] = strip_tags($val);

        }

        return $aInstance;

    }



    public function widget($atts, $aInstance)

    {



        $aInstance = wp_parse_args($aInstance, $this->aDef);



        print $atts['before_widget'];

            if ( !empty($aInstance['title']) )

            {

                print $atts['before_title'] . $aInstance['title'] . $atts['after_title'];

            }



            if ( empty($aInstance['consumer_key']) || empty($aInstance['access_token']) || empty($aInstance['access_token_secret']) || empty($aInstance['access_token']) )

            {

                _e('You haven\'t configured your twitter api', 'titan');

            }else{

                require_once PI_LIB_PATH.'twitter/twitteroauth.php';



                $initTWitter = new TwitterOAuth($aInstance['consumer_key'], $aInstance['consumer_secret'], $aInstance['access_token'], $aInstance['access_token_secret'], $aInstance['cache_interval']);

                $initTWitter->ssl_verifypeer = true;



                $tweets = $initTWitter->get('statuses/user_timeline', array('screen_name' => $aInstance['username'], 'include_rts' => 'false', 'count' => $aInstance['limit']));

                if ( !empty($tweets) )

                {

                    $tweets = json_decode($tweets);



                    if( is_array($tweets) )

                    {

                        echo '<div class="widget-tweet-content">';

                        foreach($tweets as $control)

                        {

                            echo '<div class="item">';

                                echo '<i class="fa fa-twitter"></i>';

                                $status =  preg_replace('/http:\/\/([^\s]+)/i', '<a href="http://$1" target="_blank">$1</a>', $control->text);

                                print '<div class="item-content"><p>' . $status . '</p></div>';

                            echo '</div>';

                        }

                        echo '</div>';

                    }



                }else{

                    _e('There isn\'t any tweet yet', 'titan');

                }

            }

        print $atts['after_widget'];

    }

}


Youez - 2016 - github.com/yon3zu
LinuXploit